diff --git a/frontend/564.5eb6603768afa44f.js b/frontend/564.5eb6603768afa44f.js deleted file mode 100644 index 743c7931..00000000 --- a/frontend/564.5eb6603768afa44f.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[564],{9564:(oi,Fr,Nt)=>{"use strict";Nt.r(Fr),Nt.d(Fr,{CLNModule:()=>af});var ht=Nt(9808),qt=Nt(1402),Pn=Nt(8878),A=Nt(5e3),wt=Nt(7093),Y=Nt(5899);function I(r,y){1&r&&A._UZ(0,"mat-progress-bar",3)}let n=(()=>{class r{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(s=>{switch(!0){case s instanceof qt.OD:this.loading=!0;break;case s instanceof qt.m2:case s instanceof qt.gk:case s instanceof qt.Q3:this.loading=!1}})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,I,1,0,"mat-progress-bar",1),A._UZ(2,"router-outlet",null,2),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",s.loading))},directives:[wt.xw,wt.yH,wt.Wh,ht.O5,Y.pW,qt.lC],styles:[""],data:{animation:[Pn.g]}}),r})();var c=Nt(7579),i=Nt(2722),o=Nt(1365),l=Nt(534),h=Nt(801),a=Nt(7731),g=Nt(9828),E=Nt(5043),u=Nt(5620),C=Nt(6642),e=Nt(62),f=Nt(9444),B=Nt(3954),w=Nt(9224),Q=Nt(7423),p=Nt(2181),S=Nt(5245),m=Nt(3322);const d=function(r){return{backgroundColor:r}};function v(r,y){if(1&r&&A._UZ(0,"span",6),2&r){const t=A.oxw();A.Q6J("ngStyle",A.VKq(1,d,"#"+(null==t.information?null:t.information.color)))}}function D(r,y){if(1&r&&(A.TgZ(0,"div")(1,"h4",1),A._uU(2,"Color"),A.qZA(),A.TgZ(3,"div",2),A._UZ(4,"span",7),A._uU(5),A.ALo(6,"uppercase"),A.qZA()()),2&r){const t=A.oxw();A.xp6(4),A.Q6J("ngStyle",A.VKq(4,d,"#"+(null==t.information?null:t.information.color))),A.xp6(1),A.hij(" ",A.lcZ(6,2,null==t.information?null:t.information.color)," ")}}function U(r,y){if(1&r&&(A.TgZ(0,"span",2),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(t)}}let T=(()=>{class r{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.information&&this.information.chains&&this.information.chains.length>0&&(this.chains=[""],this.information.chains.forEach(t=>{this.chains.push(this.commonService.titleCase(t.chain)+" "+this.commonService.titleCase(t.network))}))}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(e.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[A.TTD],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div")(2,"h4",1),A._uU(3,"Alias"),A.qZA(),A.TgZ(4,"div",2),A._uU(5),A.YNc(6,v,1,3,"span",3),A.qZA()(),A.YNc(7,D,7,6,"div",4),A.TgZ(8,"div")(9,"h4",1),A._uU(10,"Implementation"),A.qZA(),A.TgZ(11,"div",2),A._uU(12),A.qZA()(),A.TgZ(13,"div")(14,"h4",1),A._uU(15,"Chain"),A.qZA(),A.YNc(16,U,2,1,"span",5),A.qZA()()),2&t&&(A.xp6(5),A.hij(" ",null==s.information?null:s.information.alias," "),A.xp6(1),A.Q6J("ngIf",!s.showColorFieldSeparately),A.xp6(1),A.Q6J("ngIf",s.showColorFieldSeparately),A.xp6(5),A.Oqu(null!=s.information&&s.information.lnImplementation||null!=s.information&&s.information.version?(null==s.information?null:s.information.lnImplementation)+" "+(null==s.information?null:s.information.version):""),A.xp6(4),A.Q6J("ngForOf",s.chains))},directives:[wt.xw,wt.yH,wt.Wh,ht.O5,ht.PC,m.Zl,ht.sg],pipes:[ht.gd],styles:[""]}),r})();function F(r,y){if(1&r&&(A.TgZ(0,"div",2)(1,"div")(2,"h4",3),A._uU(3,"Lightning"),A.qZA(),A.TgZ(4,"div",4),A._uU(5),A.ALo(6,"number"),A.qZA(),A._UZ(7,"mat-progress-bar",5),A.qZA(),A.TgZ(8,"div")(9,"h4",3),A._uU(10,"On-chain"),A.qZA(),A.TgZ(11,"div",4),A._uU(12),A.ALo(13,"number"),A.qZA(),A._UZ(14,"mat-progress-bar",5),A.qZA(),A.TgZ(15,"div")(16,"h4",3),A._uU(17,"Total"),A.qZA(),A.TgZ(18,"div",4),A._uU(19),A.ALo(20,"number"),A.qZA()()()),2&r){const t=A.oxw();A.xp6(5),A.hij("",A.lcZ(6,5,t.balances.lightning)," Sats"),A.xp6(2),A.s9C("value",t.balances.lightning/t.balances.total*100),A.xp6(5),A.hij("",A.lcZ(13,7,t.balances.onchain)," Sats"),A.xp6(2),A.s9C("value",t.balances.onchain/t.balances.total*100),A.xp6(5),A.hij("",A.lcZ(20,9,t.balances.total)," Sats")}}function R(r,y){if(1&r&&(A.TgZ(0,"div",6)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let L=(()=>{class r{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(t,s){if(1&t&&(A.YNc(0,F,21,11,"div",0),A.YNc(1,R,3,1,"ng-template",null,1,A.W1O)),2&t){const z=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",z)}},directives:[ht.O5,wt.xw,wt.yH,wt.Wh,Y.pW],pipes:[ht.JJ],styles:[""]}),r})();var Z=Nt(7322),aA=Nt(7238),AA=Nt(4834),lA=Nt(8129);const pA=function(){return["../connections/channels/open"]},cA=function(r){return{filter:r}};function gA(r,y){if(1&r&&(A.TgZ(0,"div",19)(1,"a",20),A._uU(2),A.ALo(3,"slice"),A.qZA(),A.TgZ(4,"div",6)(5,"mat-hint",21)(6,"strong",8),A._uU(7,"Local:"),A.qZA(),A._uU(8),A.ALo(9,"number"),A.qZA(),A.TgZ(10,"mat-hint",22),A._UZ(11,"fa-icon",23),A._uU(12),A.ALo(13,"number"),A.qZA(),A.TgZ(14,"mat-hint",24)(15,"strong",8),A._uU(16,"Remote:"),A.qZA(),A._uU(17),A.ALo(18,"number"),A.qZA()(),A._UZ(19,"mat-progress-bar",25),A.qZA()),2&r){const t=y.$implicit,s=A.oxw(3);A.xp6(1),A.s9C("matTooltip",t.alias||t.id),A.s9C("matTooltipDisabled",(t.alias||t.id).length<26),A.Q6J("routerLink",A.DdM(23,pA))("state",A.VKq(24,cA,t.id)),A.xp6(1),A.AsE(" ",A.Dn7(3,11,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":""," "),A.xp6(6),A.hij("",A.xi3(9,15,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats"),A.xp6(3),A.Q6J("icon",s.faBalanceScale),A.xp6(1),A.hij(" (",A.lcZ(13,18,t.balancedness||0),") "),A.xp6(5),A.hij("",A.xi3(18,20,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats"),A.xp6(2),A.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function BA(r,y){if(1&r&&(A.TgZ(0,"div",17),A.YNc(1,gA,20,26,"div",18),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngForOf",t.activeChannels)}}function yA(r,y){if(1&r&&(A.TgZ(0,"div",3)(1,"div",4)(2,"span",5),A._uU(3,"Total Capacity"),A.qZA(),A.TgZ(4,"div",6)(5,"mat-hint",7)(6,"strong",8),A._uU(7,"Local:"),A.qZA(),A._uU(8),A.ALo(9,"number"),A.qZA(),A.TgZ(10,"mat-hint",9),A._UZ(11,"fa-icon",10),A._uU(12),A.ALo(13,"number"),A.qZA(),A.TgZ(14,"mat-hint",11)(15,"strong",8),A._uU(16,"Remote:"),A.qZA(),A._uU(17),A.ALo(18,"number"),A.qZA()(),A._UZ(19,"mat-progress-bar",12),A.qZA(),A.TgZ(20,"div",13),A._UZ(21,"mat-divider",14),A.qZA(),A.TgZ(22,"div",15),A.YNc(23,BA,2,1,"div",16),A.qZA()()),2&r){const t=A.oxw(),s=A.MAs(2);A.xp6(8),A.hij("",A.xi3(9,7,(null==t.channelBalances?null:t.channelBalances.localBalance)||0,"1.0-0")," Sats"),A.xp6(3),A.Q6J("icon",t.faBalanceScale),A.xp6(1),A.hij(" (",A.lcZ(13,10,(null==t.channelBalances?null:t.channelBalances.balancedness)||0),") "),A.xp6(5),A.hij("",A.xi3(18,12,(null==t.channelBalances?null:t.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),A.xp6(2),A.s9C("value",null!=t.channelBalances&&t.channelBalances.localBalance&&(null==t.channelBalances?null:t.channelBalances.localBalance)>0?+(null==t.channelBalances?null:t.channelBalances.localBalance)/(+(null==t.channelBalances?null:t.channelBalances.localBalance)+ +(null==t.channelBalances?null:t.channelBalances.remoteBalance))*100:0),A.xp6(4),A.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",s)}}function xA(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",26),A._uU(1," No channels available. "),A.TgZ(2,"button",27),A.NdJ("click",function(){return A.CHM(t),A.oxw().goToChannels()}),A._uU(3,"Open Channel"),A.qZA()()}}function _(r,y){if(1&r&&(A.TgZ(0,"div",28)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let MA=(()=>{class r{constructor(t){this.router=t,this.faBalanceScale=h.DL8,this.faDumbbell=h.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/cln/connections")}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",activeChannels:"activeChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["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(t,s){if(1&t&&(A.YNc(0,yA,24,15,"div",0),A.YNc(1,xA,4,0,"ng-template",null,1,A.W1O),A.YNc(3,_,3,1,"ng-template",null,2,A.W1O)),2&t){const z=A.MAs(4);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",z)}},directives:[ht.O5,wt.xw,wt.Wh,wt.yH,Z.bx,f.BN,aA.gM,Y.pW,AA.d,lA.$V,ht.sg,qt.yS,Q.lW],pipes:[ht.JJ,ht.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),r})();function uA(r,y){if(1&r&&(A.TgZ(0,"div")(1,"h4",4),A._uU(2,"Transactions"),A.qZA(),A.TgZ(3,"div",5),A._uU(4),A.ALo(5,"number"),A.qZA()()),2&r){const t=A.oxw(2);A.xp6(4),A.Oqu(A.lcZ(5,1,null==t.fees?null:t.fees.totalTxCount))}}function QA(r,y){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4,"Total"),A.qZA(),A.TgZ(5,"div",5),A._uU(6),A.ALo(7,"number"),A.qZA()()(),A.TgZ(8,"div",6),A.YNc(9,uA,6,3,"div",7),A.qZA()()),2&r){const t=A.oxw();A.xp6(6),A.hij("",A.lcZ(7,2,(null==t.fees?null:t.fees.feeCollected)/1e3)," Sats"),A.xp6(3),A.Q6J("ngIf",null==t.fees?null:t.fees.totalTxCount)}}function SA(r,y){if(1&r&&(A.TgZ(0,"div",8)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let bA=(()=>{class r{constructor(){this.totalFees=[{name:"Total",value:0}]}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],[4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,QA,10,4,"div",0),A.YNc(1,SA,3,1,"ng-template",null,1,A.W1O)),2&t){const z=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",z)}},directives:[ht.O5,wt.xw,wt.yH,wt.Wh],pipes:[ht.JJ],styles:[""]}),r})();function ZA(r,y){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4,"Active"),A.qZA(),A.TgZ(5,"div",5),A._UZ(6,"span",6),A._uU(7),A.ALo(8,"number"),A.qZA()(),A.TgZ(9,"div")(10,"h4",4),A._uU(11,"Pending"),A.qZA(),A.TgZ(12,"div",5),A._UZ(13,"span",7),A._uU(14),A.ALo(15,"number"),A.qZA()(),A.TgZ(16,"div")(17,"h4",4),A._uU(18,"Inactive"),A.qZA(),A.TgZ(19,"div",5),A._UZ(20,"span",8),A._uU(21),A.ALo(22,"number"),A.qZA()()(),A.TgZ(23,"div",3)(24,"div")(25,"h4",4),A._uU(26,"Capacity"),A.qZA(),A.TgZ(27,"div",5),A._uU(28),A.ALo(29,"number"),A.qZA()(),A.TgZ(30,"div")(31,"h4",4),A._uU(32,"Capacity"),A.qZA(),A.TgZ(33,"div",5),A._uU(34),A.ALo(35,"number"),A.qZA()(),A.TgZ(36,"div")(37,"h4",4),A._uU(38,"Capacity"),A.qZA(),A.TgZ(39,"div",5),A._uU(40),A.ALo(41,"number"),A.qZA()()()()),2&r){const t=A.oxw();A.xp6(7),A.Oqu(A.lcZ(8,6,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.channels)||0)),A.xp6(7),A.Oqu(A.lcZ(15,8,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.channels)||0)),A.xp6(7),A.Oqu(A.lcZ(22,10,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.channels)||0)),A.xp6(7),A.hij("",A.lcZ(29,12,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.capacity)||0)," Sats"),A.xp6(6),A.hij("",A.lcZ(35,14,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.capacity)||0)," Sats"),A.xp6(6),A.hij("",A.lcZ(41,16,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.capacity)||0)," Sats")}}function q(r,y){if(1&r&&(A.TgZ(0,"div",9)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let J=(()=>{class r{constructor(){this.channelsStatus={active:{},pending:{},inactive:{}}}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(t,s){if(1&t&&(A.YNc(0,ZA,42,18,"div",0),A.YNc(1,q,3,1,"ng-template",null,1,A.W1O)),2&t){const z=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",z)}},directives:[ht.O5,wt.xw,wt.yH,wt.Wh],pipes:[ht.JJ],styles:[""]}),r})();function $(r,y){if(1&r&&(A.TgZ(0,"mat-hint",19)(1,"strong",20),A._uU(2,"Capacity: "),A.qZA(),A._uU(3),A.ALo(4,"number"),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(3),A.hij("",A.xi3(4,1,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats")}}function W(r,y){if(1&r&&(A.TgZ(0,"mat-hint",19)(1,"strong",20),A._uU(2,"Capacity: "),A.qZA(),A._uU(3),A.ALo(4,"number"),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(3),A.hij("",A.xi3(4,1,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats")}}function hA(r,y){if(1&r&&A._UZ(0,"mat-progress-bar",21),2&r){const t=A.oxw().$implicit,s=A.oxw(3);A.s9C("value",s.totalLiquidity>0?(+t.msatoshi_to_them/1e3||0)/s.totalLiquidity*100:0)}}function vA(r,y){if(1&r&&A._UZ(0,"mat-progress-bar",21),2&r){const t=A.oxw().$implicit,s=A.oxw(3);A.s9C("value",s.totalLiquidity>0?(+t.msatoshi_to_us/1e3||0)/s.totalLiquidity*100:0)}}const nA=function(){return["../connections/channels/open"]},EA=function(r){return{filter:r}};function GA(r,y){if(1&r&&(A.TgZ(0,"div",14)(1,"a",15),A._uU(2),A.ALo(3,"slice"),A.qZA(),A.TgZ(4,"div",16),A.YNc(5,$,5,4,"mat-hint",17),A.YNc(6,W,5,4,"mat-hint",17),A.qZA(),A.YNc(7,hA,1,1,"mat-progress-bar",18),A.YNc(8,vA,1,1,"mat-progress-bar",18),A.qZA()),2&r){const t=y.$implicit,s=A.oxw(3);A.xp6(1),A.s9C("matTooltip",t.alias||t.id),A.s9C("matTooltipDisabled",(t.alias||t.id).length<26),A.Q6J("routerLink",A.DdM(14,nA))("state",A.VKq(15,EA,t.id)),A.xp6(1),A.AsE(" ",A.Dn7(3,10,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":""," "),A.xp6(3),A.Q6J("ngIf","In"===s.direction),A.xp6(1),A.Q6J("ngIf","Out"===s.direction),A.xp6(1),A.Q6J("ngIf","In"===s.direction),A.xp6(1),A.Q6J("ngIf","Out"===s.direction)}}function nt(r,y){if(1&r&&(A.TgZ(0,"div",12),A.YNc(1,GA,9,17,"div",13),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngForOf",t.activeChannels)}}const lt=function(r,y,t){return{"mb-4":r,"mb-2":y,"mb-1":t}};function TA(r,y){if(1&r&&(A.TgZ(0,"div",3)(1,"div",4)(2,"span",5),A._uU(3,"Total Capacity"),A.qZA(),A.TgZ(4,"mat-hint",6),A._uU(5),A.ALo(6,"number"),A.qZA(),A._UZ(7,"mat-progress-bar",7),A.qZA(),A.TgZ(8,"div",8),A._UZ(9,"mat-divider",9),A.qZA(),A.TgZ(10,"div",10),A.YNc(11,nt,2,1,"div",11),A.qZA()()),2&r){const t=A.oxw(),s=A.MAs(2);A.Q6J("ngClass",A.kEZ(7,lt,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD,t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),A.xp6(5),A.hij("",A.xi3(6,4,t.totalLiquidity,"1.0-0")," Sats"),A.xp6(6),A.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",s)}}function it(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"button",24),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).goToChannels()}),A._uU(1,"Open Channel"),A.qZA()}}function vt(r,y){if(1&r&&(A.TgZ(0,"div",22),A._uU(1," No channels available. "),A.YNc(2,it,2,0,"button",23),A.qZA()),2&r){const t=A.oxw();A.xp6(2),A.Q6J("ngIf","Out"===t.direction)}}function It(r,y){if(1&r&&(A.TgZ(0,"div",25)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let Mt=(()=>{class r{constructor(t,s){this.router=t,this.commonService=s,this.screenSize="",this.screenSizeEnum=a.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/cln/connections")}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0),A.Y36(e.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",activeChannels:"activeChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],["fxLayout","column","fxFlex.gt-sm","88","fxFlex","84","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100","class","w-100",4,"ngIf","ngIfElse"],["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 center",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(t,s){if(1&t&&(A.YNc(0,TA,12,11,"div",0),A.YNc(1,vt,3,1,"ng-template",null,1,A.W1O),A.YNc(3,It,3,1,"ng-template",null,2,A.W1O)),2&t){const z=A.MAs(4);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",z)}},directives:[ht.O5,wt.xw,wt.Wh,wt.yH,ht.mk,m.oO,Z.bx,Y.pW,AA.d,lA.$V,ht.sg,qt.yS,aA.gM,Q.lW],pipes:[ht.JJ,ht.OU],styles:[""]}),r})();var JA=Nt(3251),qA=Nt(9300),at=Nt(6087),et=Nt(4847),FA=Nt(2075),dt=Nt(8966),mt=Nt(429),OA=Nt(3075),H=Nt(7531),k=Nt(3390),b=Nt(6534),CA=Nt(4107),wA=Nt(508),RA=Nt(2368);function rA(r,y){if(1&r&&(A.TgZ(0,"mat-option",27),A._uU(1),A.ALo(2,"titlecase"),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(A.lcZ(2,2,t))}}function Bt(r,y){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.invoiceError)}}function Yt(r,y){if(1&r&&(A.TgZ(0,"div",28),A._UZ(1,"fa-icon",29),A.YNc(2,Bt,2,1,"span",30),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.invoiceError)}}let j=(()=>{class r{constructor(t,s,z,dA,st,Ae){this.dialogRef=t,this.data=s,this.store=z,this.decimalPipe=dA,this.commonService=st,this.actions=Ae,this.faExclamationTriangle=h.eHv,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.timeUnitEnum=a.Qk,this.timeUnits=a.LO,this.selTimeUnit=a.Qk.SECS,this.invoiceError="",this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(g.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(g.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.actions.pipe((0,i.R)(this.unSubs[2]),(0,qA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewInvoice"===t.payload.action&&(t.payload.status===a.Bn.ERROR&&(this.invoiceError=t.payload.message),t.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(t){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let s=this.expiry?this.expiry:3600;this.selTimeUnit!==a.Qk.SECS&&(s=this.commonService.convertTime(this.expiry,this.selTimeUnit,a.Qk.SECS)),this.store.dispatch((0,mt.Rd)({payload:{label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:s,private:this.private}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=a.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[3])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,a.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onTimeUnitChange(t){this.expiry&&this.selTimeUnit!==t.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,t.value)),this.selTimeUnit=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(dt.so),A.Y36(dt.WI),A.Y36(u.yh),A.Y36(ht.JJ),A.Y36(e.v),A.Y36(C.eX))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-create-invoices"]],decls:39,vars:16,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invoiceValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","name","expiry","placeholder","Expiry","type","number","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","50","fxLayoutAlign","start center",1,"mt-2"],["tabindex","6","color","primary","name","private",3,"ngModel","ngModelChange"],["matTooltip","Include routing hints for private channels","matTooltipPosition","above",1,"info-icon"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,s){if(1&t){const z=A.EpF();A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Create Invoice"),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),A.NdJ("ngModelChange",function(st){return s.description=st}),A.qZA()(),A.TgZ(13,"div",11)(14,"mat-form-field",12)(15,"input",13),A.NdJ("ngModelChange",function(st){return s.invoiceValue=st})("keyup",function(){return s.onInvoiceValueChange()}),A.qZA(),A.TgZ(16,"span",14),A._uU(17," Sats "),A.qZA(),A.TgZ(18,"mat-hint"),A._uU(19),A.qZA()(),A.TgZ(20,"mat-form-field",15)(21,"input",16),A.NdJ("ngModelChange",function(st){return s.expiry=st}),A.qZA(),A.TgZ(22,"span",14),A._uU(23),A.ALo(24,"titlecase"),A.qZA()(),A.TgZ(25,"mat-form-field",17)(26,"mat-select",18),A.NdJ("selectionChange",function(st){return s.onTimeUnitChange(st)}),A.YNc(27,rA,3,4,"mat-option",19),A.qZA()()(),A.TgZ(28,"div",20)(29,"mat-slide-toggle",21),A.NdJ("ngModelChange",function(st){return s.private=st}),A._uU(30,"Private Routing Hints"),A.qZA(),A.TgZ(31,"mat-icon",22),A._uU(32,"info_outline"),A.qZA()(),A.YNc(33,Yt,3,2,"div",23),A.TgZ(34,"div",24)(35,"button",25),A.NdJ("click",function(){return s.resetData()}),A._uU(36,"Clear Field"),A.qZA(),A.TgZ(37,"button",26),A.NdJ("click",function(){A.CHM(z);const st=A.MAs(10);return s.onAddInvoice(st)}),A._uU(38,"Create Invoice"),A.qZA()()()()()()}2&t&&(A.xp6(6),A.Q6J("mat-dialog-close",!1),A.xp6(6),A.Q6J("ngModel",s.description),A.xp6(3),A.Q6J("ngModel",s.invoiceValue)("step",100)("min",1),A.xp6(4),A.Oqu(s.invoiceValueHint),A.xp6(2),A.Q6J("ngModel",s.expiry)("step",s.selTimeUnit===s.timeUnitEnum.SECS?300:s.selTimeUnit===s.timeUnitEnum.MINS?10:s.selTimeUnit===s.timeUnitEnum.HOURS?2:1)("min",1),A.xp6(2),A.hij(" ",A.lcZ(24,14,s.selTimeUnit)," "),A.xp6(3),A.Q6J("value",s.selTimeUnit),A.xp6(1),A.Q6J("ngForOf",s.timeUnits),A.xp6(2),A.Q6J("ngModel",s.private),A.xp6(4),A.Q6J("ngIf",""!==s.invoiceError))},directives:[wt.xw,wt.yH,w.dk,wt.Wh,Q.lW,dt.ZT,w.dn,OA._Y,OA.JL,OA.F,Z.KE,H.Nt,OA.Fj,k.h,OA.JJ,OA.On,OA.wV,OA.qQ,b.q,Z.R9,Z.bx,CA.gD,ht.sg,wA.ey,RA.Rr,S.Hw,aA.gM,ht.O5,f.BN],pipes:[ht.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();var XA=Nt(5566),KA=Nt(7861),DA=Nt(3093);function jA(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"input",7),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().description=z}),A.qZA()(),A.TgZ(4,"mat-form-field",8)(5,"input",9),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().invoiceValue=z})("keyup",function(){return A.CHM(t),A.oxw().onInvoiceValueChange()}),A.qZA(),A.TgZ(6,"span",10),A._uU(7," Sats "),A.qZA(),A.TgZ(8,"mat-hint"),A._uU(9),A.qZA()(),A.TgZ(10,"div",11)(11,"button",12),A.NdJ("click",function(){return A.CHM(t),A.oxw().resetData()}),A._uU(12,"Clear Field"),A.qZA(),A.TgZ(13,"button",13),A.NdJ("click",function(){A.CHM(t);const z=A.MAs(1);return A.oxw().onAddInvoice(z)}),A._uU(14,"Create Invoice"),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.description),A.xp6(2),A.Q6J("ngModel",t.invoiceValue)("step",100)("min",1),A.xp6(4),A.Oqu(t.invoiceValueHint)}}function ct(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",14)(1,"button",15),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDeleteExpiredInvoices()}),A._uU(2,"Delete Expired"),A.qZA(),A.TgZ(3,"button",16),A.NdJ("click",function(){return A.CHM(t),A.oxw().openCreateInvoiceModal()}),A._uU(4,"Create Invoice"),A.qZA()()}}function Lt(r,y){1&r&&A._UZ(0,"mat-progress-bar",46)}function xt(r,y){1&r&&(A.TgZ(0,"th",47),A._uU(1," Expiry Date "),A.qZA())}const Rt=function(r){return{"mr-0":r}};function Vt(r,y){if(1&r&&A._UZ(0,"span",52),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Rt,t.screenSize===t.screenSizeEnum.XS))}}function Le(r,y){if(1&r&&A._UZ(0,"span",53),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Rt,t.screenSize===t.screenSizeEnum.XS))}}function ie(r,y){if(1&r&&A._UZ(0,"span",54),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Rt,t.screenSize===t.screenSizeEnum.XS))}}function te(r,y){if(1&r&&(A.TgZ(0,"td",48),A.YNc(1,Vt,1,3,"span",49),A.YNc(2,Le,1,3,"span",50),A.YNc(3,ie,1,3,"span",51),A._uU(4),A.ALo(5,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Q6J("ngIf","paid"===(null==t?null:t.status)),A.xp6(1),A.Q6J("ngIf","unpaid"===(null==t?null:t.status)),A.xp6(1),A.Q6J("ngIf","expired"===(null==t?null:t.status)),A.xp6(1),A.hij(" ",A.xi3(5,4,1e3*(null==t?null:t.expires_at),"dd/MMM/y HH:mm")," ")}}function ye(r,y){1&r&&(A.TgZ(0,"th",47),A._uU(1," Date Settled "),A.qZA())}function be(r,y){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.paid_at),"dd/MMM/y HH:mm")||"-")}}function Re(r,y){1&r&&(A.TgZ(0,"th",47),A._uU(1," Type "),A.qZA())}function vn(r,y){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11&&!t.label.includes("keysend-")?"Bolt11":"Keysend")}}function Dn(r,y){1&r&&(A.TgZ(0,"th",47),A._uU(1," Description "),A.qZA())}const re=function(r){return{"max-width":r}};function en(r,y){if(1&r&&(A.TgZ(0,"td",48)(1,"div",55)(2,"span",56),A._uU(3),A.qZA()()()),2&r){const t=y.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,re,s.screenSize===s.screenSizeEnum.XS?"10rem":"32rem")),A.xp6(2),A.Oqu(null==t?null:t.description)}}function Te(r,y){1&r&&(A.TgZ(0,"th",57),A._uU(1," Amount (Sats) "),A.qZA())}function nn(r,y){if(1&r&&(A.TgZ(0,"td",48)(1,"span",58),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0"),"")}}function Xe(r,y){1&r&&(A.TgZ(0,"th",57),A._uU(1," Amount Settled (Sats) "),A.qZA())}function bn(r,y){if(1&r&&(A.TgZ(0,"td",48)(1,"span",58),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_received)/1e3,(null==t?null:t.msatoshi_received)<1e3?"1.0-4":"1.0-0"),"")}}function Gn(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",59)(1,"div",60)(2,"mat-select",61),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",62),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}const Jt=function(r){return{"px-3":r}};function bt(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",63)(1,"div",64)(2,"mat-select",65),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",62),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onInvoiceClick(dA)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",62),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onRefreshInvoice(dA)}),A._uU(7,"Refresh"),A.qZA()()()()}if(2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Jt,t.screenSize!==t.screenSizeEnum.XS))}}function Xt(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No invoice available."),A.qZA())}function oe(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting invoices..."),A.qZA())}function In(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function dn(r,y){if(1&r&&(A.TgZ(0,"td",66),A.YNc(1,Xt,2,0,"p",67),A.YNc(2,oe,2,0,"p",67),A.YNc(3,In,2,1,"p",67),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Fn=function(r){return{"display-none":r}};function Kn(r,y){if(1&r&&A._UZ(0,"tr",68),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Fn,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function gr(r,y){1&r&&A._UZ(0,"tr",69)}function Yn(r,y){1&r&&A._UZ(0,"tr",70)}const WA=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},YA=function(){return["no_invoice"]};function tt(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",17)(1,"div",18)(2,"div",19),A._UZ(3,"fa-icon",20),A.TgZ(4,"span",21),A._uU(5,"Invoices History"),A.qZA()(),A.TgZ(6,"mat-form-field",22)(7,"input",23),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(z){return A.CHM(t),A.oxw().selFilter=z}),A.qZA()()(),A.TgZ(8,"div",24),A.YNc(9,Lt,1,0,"mat-progress-bar",25),A.TgZ(10,"table",26,27),A.ynx(12,28),A.YNc(13,xt,2,0,"th",29),A.YNc(14,te,6,7,"td",30),A.BQk(),A.ynx(15,31),A.YNc(16,ye,2,0,"th",29),A.YNc(17,be,3,4,"td",30),A.BQk(),A.ynx(18,32),A.YNc(19,Re,2,0,"th",29),A.YNc(20,vn,2,1,"td",30),A.BQk(),A.ynx(21,33),A.YNc(22,Dn,2,0,"th",29),A.YNc(23,en,4,4,"td",30),A.BQk(),A.ynx(24,34),A.YNc(25,Te,2,0,"th",35),A.YNc(26,nn,4,4,"td",30),A.BQk(),A.ynx(27,36),A.YNc(28,Xe,2,0,"th",35),A.YNc(29,bn,4,4,"td",30),A.BQk(),A.ynx(30,37),A.YNc(31,Gn,6,0,"th",38),A.YNc(32,bt,8,3,"td",39),A.BQk(),A.ynx(33,40),A.YNc(34,dn,4,3,"td",41),A.BQk(),A.YNc(35,Kn,1,3,"tr",42),A.YNc(36,gr,1,0,"tr",43),A.YNc(37,Yn,1,0,"tr",44),A.qZA()(),A._UZ(38,"mat-paginator",45),A.qZA()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("icon",t.faHistory),A.xp6(4),A.Q6J("ngModel",t.selFilter),A.xp6(2),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.invoices)("ngClass",A.VKq(12,WA,""!==t.errorMessage)),A.xp6(25),A.Q6J("matFooterRowDef",A.DdM(14,YA)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let UA=(()=>{class r{constructor(t,s,z,dA,st,Ae,un){this.logger=t,this.store=s,this.decimalPipe=z,this.commonService=dA,this.rtlEffects=st,this.datePipe=Ae,this.actions=un,this.calledFrom="transactions",this.faHistory=h.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgSticky=!1,this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["expires_at","msatoshi","actions"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["expires_at","type","description","msatoshi","msatoshi_received","actions"]):(this.flgSticky=!0,this.displayedColumns=["expires_at","paid_at","type","description","msatoshi","msatoshi_received","actions"])}ngOnInit(){this.store.select(g.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(g.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(g.gc).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.invoiceJSONArr=t.listInvoices.invoices||[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(t)}),this.actions.pipe((0,i.R)(this.unSubs[3]),(0,qA.h)(t=>t.type===a.AB.SET_LOOKUP_CLN||t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.SET_LOOKUP_CLN&&this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&t.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(t.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,KA.qR)({payload:{data:{pageSize:this.pageSize,component:j}}}))}onAddInvoice(t){this.invoiceValue||(this.invoiceValue=0);const s=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue,this.store.dispatch((0,mt.Rd)({payload:{label:this.newlyAddedInvoiceMemo,amount:1e3*this.invoiceValue,description:this.description,expiry:s,private:this.private}})),this.resetData()}onDeleteExpiredInvoices(){this.store.dispatch((0,KA.c1)({payload:{data:{type:"CONFIRM",titleMessage:"Delete Expired Invoices",noBtnText:"Cancel",yesBtnText:"Delete Invoices"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[4])).subscribe(t=>{t&&this.store.dispatch((0,mt.g6)({payload:null}))})}onInvoiceClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{invoice:{msatoshi:t.msatoshi,label:t.label,expires_at:t.expires_at,paid_at:t.paid_at,bolt11:t.bolt11,payment_hash:t.payment_hash,description:t.description,status:t.status,msatoshi_received:t.msatoshi_received},newlyAdded:!1,component:XA.y}}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[5])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,a.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onRefreshInvoice(t){this.store.dispatch((0,mt.n7)({payload:t.label}))}updateInvoicesData(t){this.invoiceJSONArr=this.invoiceJSONArr.map(s=>s.label===t.label?t:s)}loadInvoicesTable(t){this.invoices=new FA.by(t?[...t]:[]),this.invoices.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(s,z)=>((s.paid_at?this.datePipe.transform(new Date(1e3*s.paid_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(s.expires_at?this.datePipe.transform(new Date(1e3*s.expires_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(s.bolt12?"bolt12":s.bolt11?"bolt11":"keysend")+JSON.stringify(s).toLowerCase()).includes(z),this.invoices.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(ht.JJ),A.Y36(e.v),A.Y36(DA.V),A.Y36(ht.uU),A.Y36(C.eX))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-lightning-invoices-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},inputs:{calledFrom:"calledFrom"},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["matInput","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","name","invoiceValue","type","number","tabindex","3",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","9","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","10",3,"click"],["fxLayout","row"],["mat-stroked-button","","color","warn","tabindex","7","type","button",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","expires_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","paid_at"],["matColumnDef","type"],["matColumnDef","description"],["matColumnDef","msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_received"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Paid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unpaid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Expired","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Paid","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Unpaid","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Expired","matTooltipPosition","right",1,"dot","red",3,"ngClass"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,jA,15,5,"form",1),A.YNc(2,ct,5,0,"div",2),A.YNc(3,tt,39,15,"div",3),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf","home"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom))},directives:[wt.xw,wt.yH,wt.Wh,ht.O5,OA._Y,OA.JL,OA.F,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,OA.wV,OA.qQ,b.q,Z.R9,Z.bx,Q.lW,f.BN,lA.$V,Y.pW,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,aA.gM,ht.PC,m.Zl,CA.gD,CA.$L,wA.ey,FA.mD,FA.yh,FA.Ke,FA.Q2,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.uU,ht.JJ],styles:[".mat-column-description[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();var PA=Nt(5698),zA=Nt(8104),HA=Nt(9814),$A=Nt(7446);const LA=["sendPaymentForm"],ot=["paymentAmt"],VA=["offerAmt"],Qt=["paymentReq"],St=["offerReq"];function Ut(r,y){if(1&r&&(A.TgZ(0,"mat-radio-button",22),A._uU(1,"Offer"),A.qZA()),2&r){const t=A.oxw(2);A.s9C("value",t.paymentTypes.OFFER)}}function kt(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-radio-group",18),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().paymentType=z})("change",function(){return A.CHM(t),A.oxw().onPaymentTypeChange()}),A.TgZ(1,"mat-radio-button",19),A._uU(2,"Invoice"),A.qZA(),A.TgZ(3,"mat-radio-button",20),A._uU(4,"Keysend"),A.qZA(),A.YNc(5,Ut,2,1,"mat-radio-button",21),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("ngModel",t.paymentType),A.xp6(1),A.s9C("value",t.paymentTypes.INVOICE),A.xp6(2),A.s9C("value",t.paymentTypes.KEYSEND),A.xp6(2),A.Q6J("ngIf",t.selNode.enableOffers)}}function Wt(r,y){1&r&&A.GkF(0)}function ne(r,y){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentError)}}function Et(r,y){if(1&r&&(A.TgZ(0,"div",23),A._UZ(1,"fa-icon",24),A.YNc(2,ne,2,1,"span",25),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.paymentError)}}function Pt(r,y){if(1&r&&(A.TgZ(0,"mat-hint"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentDecodedHint)}}function jt(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Payment request is required."),A.qZA())}function Ht(r,y){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentDecodedHint)}}function ce(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Payment amount is required."),A.qZA())}function Zt(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",29,30),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw(2).paymentAmount=z})("change",function(z){return A.CHM(t),A.oxw(2).onAmountChange(z)}),A.qZA(),A.TgZ(3,"mat-hint"),A._uU(4,"It is a zero amount invoice, enter amount to be paid."),A.qZA(),A.YNc(5,ce,2,0,"mat-error",25),A.qZA()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.paymentAmount),A.xp6(4),A.Q6J("ngIf",!t.paymentAmount)}}function ue(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"textarea",26,27),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().onPaymentRequestEntry(z)})("matTextareaAutosize",function(){return!0}),A.qZA(),A.YNc(3,Pt,2,1,"mat-hint",25),A.YNc(4,jt,2,0,"mat-error",25),A.YNc(5,Ht,2,1,"mat-error",25),A.qZA(),A.YNc(6,Zt,6,2,"mat-form-field",28)}if(2&r){const t=A.MAs(2),s=A.oxw();A.xp6(1),A.Q6J("ngModel",s.paymentRequest),A.xp6(2),A.Q6J("ngIf",s.paymentRequest&&""!==s.paymentDecodedHint),A.xp6(1),A.Q6J("ngIf",!s.paymentRequest),A.xp6(1),A.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),A.xp6(1),A.Q6J("ngIf",s.zeroAmtInvoice)}}function ge(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Pubkey is required."),A.qZA())}function ve(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Keysend amount is required."),A.qZA())}function Ge(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",31),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().pubkey=z}),A.qZA(),A.YNc(2,ge,2,0,"mat-error",25),A.qZA(),A.TgZ(3,"mat-form-field",1)(4,"input",32,33),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().keysendAmount=z}),A.qZA(),A.YNc(6,ve,2,0,"mat-error",25),A.qZA()}if(2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngModel",t.pubkey),A.xp6(1),A.Q6J("ngIf",!t.pubkey),A.xp6(2),A.Q6J("ngModel",t.keysendAmount),A.xp6(2),A.Q6J("ngIf",!t.keysendAmount)}}function Se(r,y){if(1&r&&(A.TgZ(0,"mat-hint"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.offerDecodedHint)}}function xe(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Offer request is required."),A.qZA())}function Ne(r,y){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.offerDecodedHint)}}function $e(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Offer amount is required."),A.qZA())}function yn(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",40,41),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw(2).offerAmount=z})("change",function(z){return A.CHM(t),A.oxw(2).onAmountChange(z)}),A.qZA(),A.TgZ(3,"mat-hint"),A._uU(4,"It is a zero amount offer, enter amount to be paid."),A.qZA(),A.YNc(5,$e,2,0,"mat-error",25),A.qZA()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.offerAmount),A.xp6(4),A.Q6J("ngIf",!t.offerAmount)}}function an(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",42)(1,"input",43),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw(2).offerTitle=z}),A.qZA()()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.offerTitle)}}function Mn(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"textarea",34,35),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().onPaymentRequestEntry(z)})("matTextareaAutosize",function(){return!0}),A.qZA(),A.YNc(3,Se,2,1,"mat-hint",25),A.YNc(4,xe,2,0,"mat-error",25),A.YNc(5,Ne,2,1,"mat-error",25),A.qZA(),A.YNc(6,yn,6,2,"mat-form-field",28),A.TgZ(7,"div",36)(8,"mat-checkbox",37),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().flgSaveToDB=z}),A._uU(9,"Bookmark Offer"),A.qZA(),A.TgZ(10,"mat-icon",38),A._uU(11,"info_outline"),A.qZA()(),A.YNc(12,an,2,1,"mat-form-field",39)}if(2&r){const t=A.MAs(2),s=A.oxw();A.xp6(1),A.Q6J("ngModel",s.offerRequest),A.xp6(2),A.Q6J("ngIf",s.offerRequest&&""!==s.offerDecodedHint),A.xp6(1),A.Q6J("ngIf",!s.offerRequest),A.xp6(1),A.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),A.xp6(1),A.Q6J("ngIf",s.zeroAmtOffer),A.xp6(2),A.Q6J("ngModel",s.flgSaveToDB),A.xp6(4),A.Q6J("ngIf",s.flgSaveToDB||""!==s.offerTitle)}}let xn=(()=>{class r{constructor(t,s,z,dA,st,Ae,un,Qe){this.dialogRef=t,this.data=s,this.store=z,this.logger=dA,this.commonService=st,this.decimalPipe=Ae,this.actions=un,this.dataService=Qe,this.faExclamationTriangle=h.eHv,this.paymentTypes=a.IX,this.paymentType=a.IX.INVOICE,this.selNode={},this.offerDecoded={},this.offerRequest="",this.offerDecodedHint="",this.offerDescription="",this.offerVendor="",this.offerTitle="",this.zeroAmtOffer=!1,this.offerInvoice=null,this.offerAmount=null,this.flgSaveToDB=!1,this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentAmount=null,this.pubkey="",this.keysendAmount=null,this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=a.Vc[0],this.feeLimitTypes=a.Vc,this.paymentError="",this.isCompatibleVersion=!1,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x]}set payReq(t){t&&(this.paymentReq=t)}set offrReq(t){t&&(this.offerReq=t)}ngOnInit(){if(this.data&&this.data.paymentType)switch(this.paymentType=this.data.paymentType,this.paymentType){case a.IX.INVOICE:this.paymentRequest=this.data.invoiceBolt11;break;case a.IX.KEYSEND:this.pubkey=this.data.pubkeyKeysend;break;case a.IX.OFFER:this.onPaymentRequestEntry(this.data.bolt12),this.offerTitle=this.data.offerTitle,this.flgSaveToDB=!1}this.store.select(g.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(g.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.isCompatibleVersion=this.commonService.isVersionCompatible(t.version,"0.9.0")&&this.commonService.isVersionCompatible(t.api_version,"0.4.0")}),this.store.select(g.ZW).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.activeChannels=t.activeChannels,this.logger.info(t)}),this.actions.pipe((0,i.R)(this.unSubs[3]),(0,qA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN||t.type===a.AB.SEND_PAYMENT_STATUS_CLN||t.type===a.AB.SET_OFFER_INVOICE_CLN)).subscribe(t=>{t.type===a.AB.SEND_PAYMENT_STATUS_CLN&&this.dialogRef.close(),t.type===a.AB.SET_OFFER_INVOICE_CLN&&(this.offerInvoice=t.payload,this.sendPayment()),t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&("SendPayment"===t.payload.action&&(delete this.paymentDecoded.msatoshi,this.paymentError=t.payload.message),"DecodePayment"===t.payload.action&&(this.paymentType===a.IX.INVOICE&&(this.paymentDecodedHint="ERROR: "+t.payload.message,this.paymentReq.control.setErrors({decodeError:!0})),this.paymentType===a.IX.OFFER&&(this.offerDecodedHint="ERROR: "+t.payload.message,this.offerReq.control.setErrors({decodeError:!0}))),"FetchOfferInvoice"===t.payload.action&&this.paymentType===a.IX.OFFER&&(this.paymentError=t.payload.message))})}onSendPayment(){switch(this.paymentType){case a.IX.KEYSEND:if(!this.pubkey||""===this.pubkey.trim()||!this.keysendAmount||this.keysendAmount<=0)return!0;this.keysendPayment();break;case a.IX.INVOICE:if(!this.paymentRequest||this.zeroAmtInvoice&&(0===this.paymentAmount||!this.paymentAmount))return this.paymentReq.control.markAsTouched(),this.paymentAmt.control.markAsTouched(),!0;this.paymentDecoded.created_at?this.sendPayment():(this.resetInvoiceDetails(),this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,i.R)(this.unSubs[4])).subscribe(t=>{"bolt12 offer"===t.type&&t.offer_id?(this.paymentDecodedHint="ERROR: Select Offer option to pay the bolt12 offer invoice.",this.paymentReq.control.setErrors({decodeError:!0})):(this.paymentDecoded=t,this.setPaymentDecodedDetails())}));break;case a.IX.OFFER:if(!this.offerRequest||this.zeroAmtOffer&&(0===this.offerAmount||!this.offerAmount))return this.offerReq.control.markAsTouched(),this.offerAmt.control.markAsTouched(),!0;this.offerDecoded.offer_id?this.sendPayment():(this.resetOfferDetails(),this.dataService.decodePayment(this.offerRequest,!0).pipe((0,i.R)(this.unSubs[5])).subscribe(t=>{"bolt11 invoice"===t.type&&t.payment_hash?(this.offerDecodedHint="ERROR: Select Invoice option to pay the bolt11 invoice.",this.offerReq.control.setErrors({decodeError:!0})):(this.offerDecoded=t,this.setOfferDecodedDetails())}))}}keysendPayment(){this.store.dispatch((0,mt.oV)({payload:{uiMessage:a.m6.SEND_KEYSEND,paymentType:a.IX.KEYSEND,pubkey:this.pubkey,amount:1e3*this.keysendAmount,fromDialog:!0}}))}sendPayment(){this.paymentError="",this.paymentType===a.IX.INVOICE?this.store.dispatch((0,mt.oV)(this.zeroAmtInvoice?{payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*this.paymentAmount,fromDialog:!0}}:{payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!0}})):this.paymentType===a.IX.OFFER&&this.store.dispatch(this.offerInvoice?(0,mt.oV)({payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.OFFER,invoice:this.offerInvoice.invoice,saveToDB:this.flgSaveToDB,bolt12:this.offerRequest,amount:1e3*this.offerAmount,zeroAmtOffer:this.zeroAmtOffer,title:this.offerTitle,vendor:this.offerVendor,description:this.offerDescription,fromDialog:!0}}):(0,mt.eM)(this.zeroAmtOffer?{payload:{offer:this.offerRequest,msatoshi:1e3*this.offerAmount}}:{payload:{offer:this.offerRequest}}))}onPaymentRequestEntry(t){this.paymentType===a.IX.INVOICE?(this.paymentRequest=t,this.resetInvoiceDetails()):this.paymentType===a.IX.OFFER&&(this.offerRequest=t,this.resetOfferDetails()),t.length>100&&this.dataService.decodePayment(t,!0).pipe((0,i.R)(this.unSubs[6])).subscribe(s=>{this.paymentType===a.IX.INVOICE?"bolt12 offer"===s.type&&s.offer_id?(this.paymentDecodedHint="ERROR: Select Offer option to pay the bolt12 offer invoice.",this.paymentReq.control.setErrors({decodeError:!0})):(this.paymentDecoded=s,this.setPaymentDecodedDetails()):this.paymentType===a.IX.OFFER&&("bolt11 invoice"===s.type&&s.payment_hash?(this.offerDecodedHint="ERROR: Select Invoice option to pay the bolt11 invoice.",this.offerReq.control.setErrors({decodeError:!0})):(this.offerDecoded=s,this.setOfferDecodedDetails()))})}resetOfferDetails(){this.offerInvoice=null,this.offerAmount=null,this.offerDecodedHint="",this.zeroAmtOffer=!1,this.paymentError="",this.offerReq&&this.offerReq.control.setErrors(null)}resetInvoiceDetails(){this.paymentAmount=null,this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentError="",this.paymentReq&&this.paymentReq.control.setErrors(null)}onAmountChange(t){this.paymentType===a.IX.INVOICE&&(delete this.paymentDecoded.msatoshi,this.paymentDecoded.msatoshi=+t.target.value),this.paymentType===a.IX.OFFER&&(delete this.offerDecoded.amount,delete this.offerDecoded.amount_msat,this.offerDecoded.amount=1e3*+t.target.value,this.offerDecoded.amount_msat=t.target.value+"msat")}onPaymentTypeChange(){this.paymentError="",this.paymentDecodedHint="",this.offerDecodedHint="",this.offerInvoice=null}setOfferDecodedDetails(){this.offerDecoded.offer_id&&!this.offerDecoded.amount_msat?(this.offerDecoded.amount_msat="0msat",this.offerDecoded.amount=0,this.zeroAmtOffer=!0,this.offerDescription=this.offerDecoded.description,this.offerVendor=this.offerDecoded.vendor?this.offerDecoded.vendor:this.offerDecoded.issuer?this.offerDecoded.issuer:"",this.offerDecodedHint="Zero Amount Offer | Description: "+this.offerDecoded.description):(this.zeroAmtOffer=!1,this.offerDecoded.amount=+(this.offerDecoded.amount||this.offerDecoded.amount_msat.slice(0,-4)),this.offerAmount=this.offerDecoded.amount?this.offerDecoded.amount/1e3:0,this.offerDescription=this.offerDecoded.description,this.offerVendor=this.offerDecoded.vendor?this.offerDecoded.vendor:this.offerDecoded.issuer?this.offerDecoded.issuer:"",this.selNode.fiatConversion?this.commonService.convertCurrency(this.offerAmount,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[7])).subscribe({next:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,a.Xz.OTHER)+") | Description: "+this.offerDecoded.description},error:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description+". Unable to convert currency."}}):this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description)}setPaymentDecodedDetails(){this.paymentDecoded.created_at&&!this.paymentDecoded.msatoshi?(this.paymentDecoded.msatoshi=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[8])).subscribe({next:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,a.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description)}resetData(){switch(this.paymentType){case a.IX.KEYSEND:this.pubkey="",this.keysendAmount=null;break;case a.IX.INVOICE:this.paymentRequest="",this.paymentDecoded={},this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=a.Vc[0],this.resetInvoiceDetails();break;case a.IX.OFFER:this.offerRequest="",this.offerDecoded={},this.flgSaveToDB=!1,this.resetOfferDetails()}this.paymentError=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(dt.so),A.Y36(dt.WI),A.Y36(u.yh),A.Y36(E.mQ),A.Y36(e.v),A.Y36(ht.JJ),A.Y36(C.eX),A.Y36(zA.D))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-lightning-send-payments"]],viewQuery:function(t,s){if(1&t&&(A.Gf(LA,5),A.Gf(ot,5),A.Gf(VA,5),A.Gf(Qt,5),A.Gf(St,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.form=z.first),A.iGM(z=A.CRH())&&(s.paymentAmt=z.first),A.iGM(z=A.CRH())&&(s.offerAmt=z.first),A.iGM(z=A.CRH())&&(s.payReq=z.first),A.iGM(z=A.CRH())&&(s.offrReq=z.first)}},decls:25,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","12","fxFlex","10","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["class","my-1","color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",3,"ngModel","ngModelChange","change",4,"ngIf"],["fxLayoutAlign","space-between stretch","fxLayout","column",3,"submit","reset"],["sendPaymentForm","ngForm"],[4,"ngTemplateOutlet"],["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"],["mat-button","","color","primary","type","submit","tabindex","8"],["invoiceBlock",""],["keysendBlock",""],["offerBlock",""],["color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",1,"my-1",3,"ngModel","ngModelChange","change"],["fxFlex","20","tabindex","1",3,"value"],["fxFlex","20","tabindex","2",3,"value"],["fxFlex","20","tabindex","3",3,"value",4,"ngIf"],["fxFlex","20","tabindex","3",3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"],["autoFocus","","matInput","","placeholder","Payment Request","rows","4","name","paymentRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],["fxFlex","100",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["autoFocus","","matInput","","placeholder","Pubkey","name","pubkey","tabindex","4","required","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Amount (Sats)","name","keysendAmount","tabindex","5","required","",3,"ngModel","ngModelChange"],["keysendAmt","ngModel"],["autoFocus","","matInput","","placeholder","Offer Request","rows","4","name","offerRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["offerReq","ngModel"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"mt-1"],["fxFlex","none","tabindex","6","color","primary",3,"ngModel","ngModelChange"],["matTooltip","Save offer in database for future payments","matTooltipPosition","below","fxFlex","none",1,"info-icon"],["fxFlex","100","class","mt-1",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amountoffer","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["offerAmt","ngModel"],["fxFlex","100",1,"mt-1"],["matInput","","placeholder","Title to Save","tabindex","7",3,"ngModel","ngModelChange"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Send Payment"),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6),A.YNc(9,kt,6,4,"mat-radio-group",7),A.TgZ(10,"form",8,9),A.NdJ("submit",function(){return s.onSendPayment()})("reset",function(){return s.resetData()}),A.YNc(12,Wt,1,0,"ng-container",10),A.YNc(13,Et,3,2,"div",11),A.TgZ(14,"div",12)(15,"button",13),A._uU(16,"Clear Fields"),A.qZA(),A.TgZ(17,"button",14),A._uU(18,"Send Payment"),A.qZA()()()()()(),A.YNc(19,ue,7,5,"ng-template",null,15,A.W1O),A.YNc(21,Ge,7,4,"ng-template",null,16,A.W1O),A.YNc(23,Mn,13,7,"ng-template",null,17,A.W1O)),2&t){const z=A.MAs(20),dA=A.MAs(22),st=A.MAs(24);A.xp6(6),A.Q6J("mat-dialog-close",!1),A.xp6(3),A.Q6J("ngIf",s.isCompatibleVersion),A.xp6(3),A.Q6J("ngTemplateOutlet",s.paymentType===s.paymentTypes.KEYSEND?dA:s.paymentType===s.paymentTypes.OFFER?st:z),A.xp6(1),A.Q6J("ngIf",""!==s.paymentError)}},directives:[wt.xw,wt.yH,w.dk,wt.Wh,Q.lW,dt.ZT,w.dn,ht.O5,HA.VQ,OA.JJ,OA.On,HA.U0,OA._Y,OA.JL,OA.F,ht.tP,f.BN,Z.KE,H.Nt,OA.Fj,k.h,OA.Q7,Z.bx,Z.TO,$A.oG,S.Hw,aA.gM],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();var qe=Nt(4947);const fn=["sendPaymentForm"];function cn(r,y){if(1&r&&(A.TgZ(0,"mat-hint"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentDecodedHint)}}function Xn(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Payment request is required."),A.qZA())}function Yr(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"textarea",7,8),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().onPaymentRequestEntry(z)})("matTextareaAutosize",function(){return!0}),A.qZA(),A.YNc(5,cn,2,1,"mat-hint",9),A.YNc(6,Xn,2,0,"mat-error",9),A.qZA(),A.TgZ(7,"div",10)(8,"button",11),A.NdJ("click",function(){return A.CHM(t),A.oxw().resetData()}),A._uU(9,"Clear Field"),A.qZA(),A.TgZ(10,"button",12),A.NdJ("click",function(){return A.CHM(t),A.oxw().onSendPayment()}),A._uU(11,"Send Payment"),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.paymentRequest),A.xp6(2),A.Q6J("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),A.xp6(1),A.Q6J("ngIf",!t.paymentRequest)}}function Tr(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",13)(1,"button",12),A.NdJ("click",function(){return A.CHM(t),A.oxw().openSendPaymentModal()}),A._uU(2,"Send Payment"),A.qZA()()}}function rr(r,y){1&r&&A._UZ(0,"mat-progress-bar",50)}function Tn(r,y){1&r&&(A.TgZ(0,"th",51),A._uU(1,"Created At"),A.qZA())}const Sn=function(r){return{"mr-0":r}};function mA(r,y){if(1&r&&A._UZ(0,"span",55),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function O(r,y){if(1&r&&A._UZ(0,"span",56),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function N(r,y){if(1&r&&(A.TgZ(0,"td",52),A.YNc(1,mA,1,3,"span",53),A.YNc(2,O,1,3,"span",54),A._uU(3),A.ALo(4,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Q6J("ngIf","complete"===t.status),A.xp6(1),A.Q6J("ngIf","complete"!==t.status),A.xp6(1),A.hij(" ",A.xi3(4,3,1e3*(null==t?null:t.created_at),"dd/MMM/y HH:mm")," ")}}function X(r,y){1&r&&(A.TgZ(0,"th",51),A._uU(1," Type "),A.qZA())}function K(r,y){if(1&r&&(A.TgZ(0,"td",52),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11?"Bolt11":"Keysend")}}function fA(r,y){1&r&&(A.TgZ(0,"th",51),A._uU(1,"Payment Hash"),A.qZA())}const IA=function(r){return{"max-width":r}};function At(r,y){if(1&r&&(A.TgZ(0,"td",52)(1,"span",57)(2,"span",58),A._uU(3),A.qZA()()()),2&r){const t=y.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,IA,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.payment_hash)}}function rt(r,y){1&r&&(A.TgZ(0,"th",59),A._uU(1,"Sats Sent"),A.qZA())}function ft(r,y){if(1&r&&(A.TgZ(0,"td",52)(1,"span",60),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0"))}}function Ct(r,y){1&r&&(A.TgZ(0,"th",59),A._uU(1,"Sats Received"),A.qZA())}function Dt(r,y){if(1&r&&(A.TgZ(0,"td",52)(1,"span",60),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Ft(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",61)(1,"div",62)(2,"mat-select",63),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",64),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Tt(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",65)(1,"button",66),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onPaymentClick(dA)}),A._uU(2,"View Info"),A.qZA()()}}function Ot(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No payment available."),A.qZA())}function Kt(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting payments..."),A.qZA())}function fe(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function Ee(r,y){if(1&r&&(A.TgZ(0,"td",67),A.YNc(1,Ot,2,0,"p",9),A.YNc(2,Kt,2,0,"p",9),A.YNc(3,fe,2,1,"p",9),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}function pe(r,y){if(1&r&&A._UZ(0,"span",71),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function rn(r,y){if(1&r&&A._UZ(0,"span",72),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function Me(r,y){if(1&r&&A._UZ(0,"span",71),2&r){const t=A.oxw(5);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function je(r,y){if(1&r&&A._UZ(0,"span",72),2&r){const t=A.oxw(5);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function wn(r,y){if(1&r&&(A.TgZ(0,"span",74),A.YNc(1,Me,1,3,"span",69),A.YNc(2,je,1,3,"span",70),A._uU(3),A.ALo(4,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Q6J("ngIf","complete"===t.status),A.xp6(1),A.Q6J("ngIf","complete"!==t.status),A.xp6(1),A.hij(" ",A.xi3(4,3,1e3*t.created_at,"dd/MMM/y HH:mm")," ")}}function Ke(r,y){if(1&r&&(A.ynx(0),A.YNc(1,wn,5,6,"span",73),A.BQk()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Cn(r,y){if(1&r&&(A.TgZ(0,"td",52)(1,"span",68),A.YNc(2,pe,1,3,"span",69),A.YNc(3,rn,1,3,"span",70),A._uU(4),A.qZA(),A.YNc(5,Ke,2,1,"ng-container",9),A.qZA()),2&r){const t=y.$implicit;A.xp6(2),A.Q6J("ngIf","complete"===t.status),A.xp6(1),A.Q6J("ngIf","complete"!==t.status),A.xp6(1),A.hij(" Total Attempts: ",null==t?null:t.total_parts," "),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function Vn(r,y){if(1&r&&(A.TgZ(0,"span",68),A._uU(1),A.qZA()),2&r){const t=A.oxw(2).$implicit;A.xp6(1),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11?"Bolt11":"Keysend")}}function qn(r,y){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,Vn,2,1,"span",75),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Nn(r,y){if(1&r&&(A.TgZ(0,"td",52)(1,"span",68),A._uU(2),A.qZA(),A.YNc(3,qn,2,1,"span",9),A.qZA()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11?"Bolt11":"Keysend"),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function zr(r,y){if(1&r&&(A.TgZ(0,"span",68),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" Part ID ",t.partid?t.partid:0," ")}}function Jn(r,y){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,zr,2,1,"span",75),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function ir(r,y){if(1&r&&(A.TgZ(0,"td",52)(1,"span",76)(2,"span",58),A._uU(3),A.qZA()(),A.YNc(4,Jn,2,1,"span",9),A.qZA()),2&r){const t=y.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(3,IA,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.payment_hash),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function dr(r,y){if(1&r&&(A.TgZ(0,"span",77),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",A.xi3(2,1,t.msatoshi_sent/1e3,t.msatoshi_sent<1e3?"1.0-4":"1.0-0")," ")}}function _n(r,y){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,dr,3,4,"span",78),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Br(r,y){if(1&r&&(A.TgZ(0,"td",52)(1,"span",77),A._uU(2),A.ALo(3,"number"),A.qZA(),A.YNc(4,_n,2,1,"span",9),A.qZA()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,2,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0")),A.xp6(2),A.Q6J("ngIf",t.is_expanded)}}function Lr(r,y){if(1&r&&(A.TgZ(0,"span",77),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",A.xi3(2,1,t.msatoshi/1e3,t.msatoshi<1e3?"1.0-4":"1.0-0")," ")}}function Wn(r,y){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,Lr,3,4,"span",78),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function br(r,y){if(1&r&&(A.TgZ(0,"td",52)(1,"span",77),A._uU(2),A.ALo(3,"number"),A.qZA(),A.YNc(4,Wn,2,1,"span",9),A.qZA()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,2,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0")),A.xp6(2),A.Q6J("ngIf",t.is_expanded)}}function Mr(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",60)(1,"button",82),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(4).onPaymentClick(dA)}),A._uU(2),A.qZA()()}if(2&r){const t=y.$implicit;A.xp6(2),A.hij("View ",t.partid?t.partid:0,"")}}function Gr(r,y){if(1&r&&(A.TgZ(0,"div"),A.YNc(1,Mr,3,1,"div",81),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Hr(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",79)(1,"span",60)(2,"button",80),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return dA.is_expanded=!dA.is_expanded}),A._uU(3),A.qZA()(),A.YNc(4,Gr,2,1,"div",9),A.qZA()}if(2&r){const t=y.$implicit;A.xp6(3),A.Oqu(t.is_expanded?"Hide":"Show"),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function si(r,y){1&r&&A._UZ(0,"tr",83)}const Jr=function(r){return{"display-none":r}};function ar(r,y){if(1&r&&A._UZ(0,"tr",84),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Jr,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function Or(r,y){1&r&&A._UZ(0,"tr",85)}function Zn(r,y){1&r&&A._UZ(0,"tr",83)}const Li=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},bi=function(){return["no_payment"]};function oo(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",14)(1,"div",15)(2,"div",16),A._UZ(3,"fa-icon",17),A.TgZ(4,"span",18),A._uU(5,"Payments History"),A.qZA()(),A.TgZ(6,"mat-form-field",19)(7,"input",20),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(z){return A.CHM(t),A.oxw().selFilter=z}),A.qZA()()(),A.TgZ(8,"div",21)(9,"div",22),A.YNc(10,rr,1,0,"mat-progress-bar",23),A.TgZ(11,"table",24,25),A.ynx(13,26),A.YNc(14,Tn,2,0,"th",27),A.YNc(15,N,5,6,"td",28),A.BQk(),A.ynx(16,29),A.YNc(17,X,2,0,"th",27),A.YNc(18,K,2,1,"td",28),A.BQk(),A.ynx(19,30),A.YNc(20,fA,2,0,"th",27),A.YNc(21,At,4,4,"td",28),A.BQk(),A.ynx(22,31),A.YNc(23,rt,2,0,"th",32),A.YNc(24,ft,4,4,"td",28),A.BQk(),A.ynx(25,33),A.YNc(26,Ct,2,0,"th",32),A.YNc(27,Dt,4,4,"td",28),A.BQk(),A.ynx(28,34),A.YNc(29,Ft,6,0,"th",35),A.YNc(30,Tt,3,0,"td",36),A.BQk(),A.ynx(31,37),A.YNc(32,Ee,4,3,"td",38),A.BQk(),A.ynx(33,39),A.YNc(34,Cn,6,4,"td",28),A.BQk(),A.ynx(35,40),A.YNc(36,Nn,4,2,"td",28),A.BQk(),A.ynx(37,41),A.YNc(38,ir,5,5,"td",28),A.BQk(),A.ynx(39,42),A.YNc(40,Br,5,5,"td",28),A.BQk(),A.ynx(41,43),A.YNc(42,br,5,5,"td",28),A.BQk(),A.ynx(43,44),A.YNc(44,Hr,5,2,"td",45),A.BQk(),A.YNc(45,si,1,0,"tr",46),A.YNc(46,ar,1,3,"tr",47),A.YNc(47,Or,1,0,"tr",48),A.YNc(48,Zn,1,0,"tr",46),A.qZA()()(),A._UZ(49,"mat-paginator",49),A.qZA()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("icon",t.faHistory),A.xp6(4),A.Q6J("ngModel",t.selFilter),A.xp6(3),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.payments)("ngClass",A.VKq(15,Li,""!==t.errorMessage)),A.xp6(34),A.Q6J("matRowDefColumns",t.mppColumns)("matRowDefWhen",t.is_group),A.xp6(1),A.Q6J("matFooterRowDef",A.DdM(17,bi)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)("matRowDefWhen",!t.is_group),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let aa=(()=>{class r{constructor(t,s,z,dA,st,Ae,un,Qe,tn){this.logger=t,this.commonService=s,this.store=z,this.rtlEffects=dA,this.clnEffects=st,this.decimalPipe=Ae,this.titleCasePipe=un,this.datePipe=Qe,this.dataService=tn,this.calledFrom="transactions",this.faHistory=h.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.paymentJSONArr=[],this.displayedColumns=[],this.mppColumns=[],this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["created_at","actions"],this.mppColumns=["groupTotal","groupAction"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtRecv","groupAction"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["created_at","type","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupType","groupAmtSent","groupAmtRecv","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["created_at","type","payment_hash","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupType","groupHash","groupAmtSent","groupAmtRecv","groupAction"])}ngOnInit(){this.store.select(g.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(g.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(g.PP).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.paymentJSONArr=t.payments||[],this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr)}is_group(t,s){return s.is_group}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.created_at?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.created_at?(this.paymentDecoded.msatoshi||(this.paymentDecoded.msatoshi=0),this.sendPayment()):this.resetData()})}sendPayment(){this.newlyAddedPayment=this.paymentDecoded.payment_hash,this.paymentDecoded.msatoshi&&0!==this.paymentDecoded.msatoshi?(this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:50,type:a.Gi.DATE_TIME},{key:"num_satoshis",value:this.paymentDecoded.msatoshi/1e3,title:"Amount (Sats)",width:50,type:a.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:a.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,PA.q)(1)).subscribe(s=>{s&&(this.store.dispatch((0,mt.oV)({payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:40,type:a.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:a.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",getInputs:[{placeholder:"Amount (Sats)",inputType:a.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,PA.q)(1)).subscribe(z=>{z&&(this.paymentDecoded.msatoshi=z[0].inputValue,this.store.dispatch((0,mt.oV)({payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*z[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,i.R)(this.unSubs[1])).subscribe(s=>{this.paymentDecoded=s,this.paymentDecoded.msatoshi?this.selNode.fiatConversion?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[3])).subscribe({next:z=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+z.symbol+this.decimalPipe.transform(z.OTHER?z.OTHER:0,a.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:z=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description:this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description})}openSendPaymentModal(){this.store.dispatch((0,KA.qR)({payload:{data:{component:xn}}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}onPaymentClick(t){const s=[[{key:"payment_preimage",value:t.payment_preimage,title:"Payment Preimage",width:100,type:a.Gi.STRING}],[{key:"id",value:t.id,title:"ID",width:20,type:a.Gi.STRING},{key:"destination",value:t.destination,title:"Destination",width:80,type:a.Gi.STRING}],[{key:"created_at",value:t.created_at,title:"Creation Date",width:50,type:a.Gi.DATE_TIME},{key:"status",value:this.titleCasePipe.transform(t.status),title:"Status",width:50,type:a.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"Amount (mSats)",width:50,type:a.Gi.NUMBER},{key:"msatoshi_sent",value:t.msatoshi_sent,title:"Amount Sent (mSats)",width:50,type:a.Gi.NUMBER}]];t.bolt11&&""!==t.bolt11&&s.unshift([{key:"bolt11",value:t.bolt11,title:"Bolt 11",width:100,type:a.Gi.STRING}]),t.bolt12&&""!==t.bolt12&&s.unshift([{key:"bolt12",value:t.bolt12,title:"Bolt 12",width:100,type:a.Gi.STRING}]),t.memo&&""!==t.memo&&s.splice(2,0,[{key:"memo",value:t.memo,title:"Memo",width:100,type:a.Gi.STRING}]),t.hasOwnProperty("partid")?s.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:80,type:a.Gi.STRING},{key:"partid",value:t.partid,title:"Part ID",width:20,type:a.Gi.STRING}]):s.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:a.Gi.STRING}]),this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Payment Information",message:s}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}loadPaymentsTable(t){this.payments=new FA.by(t?[...t]:[]),this.payments.data=this.paymentJSONArr,this.payments.sort=this.sort,this.payments.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.payments.filterPredicate=(s,z)=>((s.created_at?this.datePipe.transform(new Date(1e3*s.created_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(s.bolt12?"bolt12":s.bolt11?"bolt11":"keysend")+JSON.stringify(s).toLowerCase()).includes(z),this.payments.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const s=JSON.parse(JSON.stringify(this.payments.data)).reduce((z,dA)=>dA.mpps?z.concat(dA.mpps):(delete dA.is_group,delete dA.is_expanded,delete dA.total_parts,z.concat(dA)),[]);this.commonService.downloadFile(s,"Payments")}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh),A.Y36(DA.V),A.Y36(qe.J),A.Y36(ht.JJ),A.Y36(ht.rS),A.Y36(ht.uU),A.Y36(zA.D))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-lightning-payments"]],viewQuery:function(t,s){if(1&t&&(A.Gf(fn,5),A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.form=z.first),A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},inputs:{calledFrom:"calledFrom"},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","created_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","payment_hash"],["matColumnDef","msatoshi_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","groupTotal"],["matColumnDef","groupType"],["matColumnDef","groupHash"],["matColumnDef","groupAmtSent"],["matColumnDef","groupAmtRecv"],["matColumnDef","groupAction"],["mat-cell","","class","px-3",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Failed","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"mpp-row-span"],["class","dot green mt-0","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow mt-0","matTooltip","Incomplete/Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green","mt-0",3,"ngClass"],["matTooltip","Incomplete/Failed","matTooltipPosition","right",1,"dot","yellow","mt-0",3,"ngClass"],["fxLayoutAlign","start center","class","mpp-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"mpp-row-span","pl-3"],["fxLayoutAlign","start center","class","mpp-row-span",4,"ngFor","ngForOf"],["fxLayout","row",1,"ellipsis-parent","mpp-row-span",3,"ngStyle"],["fxLayoutAlign","end center",1,"mpp-row-span"],["fxLayoutAlign","end center","class","mpp-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-mpp-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-mpp-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,Yr,12,3,"form",1),A.YNc(2,Tr,3,0,"div",2),A.YNc(3,oo,50,18,"div",3),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf","home"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom))},directives:[wt.xw,wt.yH,wt.Wh,ht.O5,OA._Y,OA.JL,OA.F,Z.KE,H.Nt,OA.Fj,OA.Q7,lA.$V,OA.JJ,OA.On,Z.bx,Z.TO,Q.lW,f.BN,Y.pW,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,aA.gM,ht.PC,m.Zl,CA.gD,CA.$L,wA.ey,FA.mD,FA.yh,ht.sg,FA.nj,FA.Gk,FA.Ke,FA.Q2,FA.as,FA.XQ,at.NW],pipes:[ht.uU,ht.JJ],styles:[".mat-column-payment_hash[_ngcontent-%COMP%]{flex:0 0 25%;width:25%}.mat-column-payment_hash[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%], .mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.mpp-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:17rem}"]}),r})();function so(r,y){if(1&r&&(A.TgZ(0,"button",26)(1,"mat-icon"),A._uU(2,"more_vert"),A.qZA()()),2&r){A.oxw();const t=A.MAs(11);A.Q6J("matMenuTriggerFor",t)}}function lo(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){const dA=A.CHM(t).index,st=A.oxw().$implicit;return A.oxw(2).onNavigateTo(st.links[dA])}),A._uU(1),A.qZA()}if(2&r){const t=y.$implicit;A.xp6(1),A.Oqu(t)}}function co(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){return A.CHM(t),A.oxw(3).onsortChannelsBy()}),A._uU(1),A.qZA()}if(2&r){const t=A.oxw(3);A.xp6(1),A.hij("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}function go(r,y){1&r&&A._UZ(0,"mat-progress-bar",28)}function Bo(r,y){if(1&r&&A._UZ(0,"rtl-cln-node-info",29),2&r){const t=A.oxw(3);A.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function oa(r,y){if(1&r&&A._UZ(0,"rtl-cln-balances-info",30),2&r){const t=A.oxw(3);A.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function uo(r,y){if(1&r&&A._UZ(0,"rtl-cln-channel-capacity-info",31),2&r){const t=A.oxw(3);A.Q6J("sortBy",t.sortField)("channelBalances",t.channelBalances)("activeChannels",t.activeChannelsCapacity)("errorMessage",t.errorMessages[4]+" "+t.errorMessages[3])}}function sa(r,y){if(1&r&&A._UZ(0,"rtl-cln-fee-info",32),2&r){const t=A.oxw(3);A.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[4]+" "+t.errorMessages[5])}}function la(r,y){if(1&r&&A._UZ(0,"rtl-cln-channel-status-info",33),2&r){const t=A.oxw(3);A.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function fo(r,y){1&r&&(A.TgZ(0,"h3"),A._uU(1,"Error! Unable to find information!"),A.qZA())}const ca=function(r){return{"dashboard-card-content":!0,"error-border":r}};function ho(r,y){if(1&r&&(A.TgZ(0,"mat-grid-tile",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-title",10)(4,"div"),A._UZ(5,"fa-icon",11),A.TgZ(6,"span"),A._uU(7),A.qZA()(),A.TgZ(8,"div"),A.YNc(9,so,3,1,"button",12),A.TgZ(10,"mat-menu",13,14),A.YNc(12,lo,2,1,"button",15),A.YNc(13,co,2,1,"button",16),A.qZA()()()(),A.TgZ(14,"mat-card-content",17),A.YNc(15,go,1,0,"mat-progress-bar",18),A.TgZ(16,"div",19),A.YNc(17,Bo,1,2,"rtl-cln-node-info",20),A.YNc(18,oa,1,2,"rtl-cln-balances-info",21),A.YNc(19,uo,1,4,"rtl-cln-channel-capacity-info",22),A.YNc(20,sa,1,2,"rtl-cln-fee-info",23),A.YNc(21,la,1,2,"rtl-cln-channel-status-info",24),A.YNc(22,fo,2,0,"h3",25),A.qZA()()()()),2&r){const t=y.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(5),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(2),A.Q6J("ngIf",t.links[0]),A.xp6(3),A.Q6J("ngForOf",t.goToOptions),A.xp6(1),A.Q6J("ngIf","capacity"===t.id),A.xp6(1),A.s9C("fxFlex","capacity"===t.id?90:70),A.Q6J("ngClass",A.VKq(16,ca,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"capacity"===t.id&&(s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.ERROR)||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR))),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"capacity"===t.id&&(s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.INITIATED)||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","balance"),A.xp6(1),A.Q6J("ngSwitchCase","capacity"),A.xp6(1),A.Q6J("ngSwitchCase","fee"),A.xp6(1),A.Q6J("ngSwitchCase","status")}}function Eo(r,y){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3),A._UZ(2,"fa-icon",4),A.TgZ(3,"span",5),A._uU(4),A.qZA()(),A.TgZ(5,"mat-grid-list",6),A.YNc(6,ho,23,18,"mat-grid-tile",7),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Q6J("icon",t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.ERROR?t.faFrown:t.faSmile),A.xp6(2),A.Oqu(t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.COMPLETED?"Welcome "+t.information.alias+"! Your node is up and running.":t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),A.xp6(1),A.Q6J("rowHeight",t.operatorCardHeight),A.xp6(1),A.Q6J("ngForOf",t.operatorCards)}}function wo(r,y){if(1&r&&(A.TgZ(0,"button",26)(1,"mat-icon"),A._uU(2,"more_vert"),A.qZA()()),2&r){A.oxw();const t=A.MAs(9);A.Q6J("matMenuTriggerFor",t)}}function Co(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){const dA=A.CHM(t).index,st=A.oxw(2).$implicit;return A.oxw(2).onNavigateTo(st.links[dA])}),A._uU(1),A.qZA()}if(2&r){const t=y.$implicit;A.xp6(1),A.Oqu(t)}}function Qo(r,y){if(1&r&&(A.TgZ(0,"mat-card-header")(1,"mat-card-title",10)(2,"div"),A._UZ(3,"fa-icon",11),A.TgZ(4,"span"),A._uU(5),A.qZA()(),A.TgZ(6,"div"),A.YNc(7,wo,3,1,"button",12),A.TgZ(8,"mat-menu",13,42),A.YNc(10,Co,2,1,"button",15),A.qZA()()()()),2&r){const t=A.oxw().$implicit;A.xp6(3),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(2),A.Q6J("ngIf",t.links[0]),A.xp6(3),A.Q6J("ngForOf",t.goToOptions)}}function Mo(r,y){1&r&&A._UZ(0,"mat-progress-bar",28)}function po(r,y){if(1&r&&A._UZ(0,"rtl-cln-node-info",43),2&r){const t=A.oxw(3);A.Q6J("information",t.information)}}function Io(r,y){if(1&r&&A._UZ(0,"rtl-cln-balances-info",30),2&r){const t=A.oxw(3);A.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function ga(r,y){if(1&r&&A._UZ(0,"rtl-cln-channel-liquidity-info",44),2&r){const t=A.oxw(3);A.Q6J("direction","In")("totalLiquidity",t.totalInboundLiquidity)("activeChannels",t.allInboundChannels)("errorMessage",t.errorMessages[4])}}function mo(r,y){if(1&r&&A._UZ(0,"rtl-cln-channel-liquidity-info",44),2&r){const t=A.oxw(3);A.Q6J("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("activeChannels",t.allOutboundChannels)("errorMessage",t.errorMessages[4])}}function vo(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){const dA=A.CHM(t).index,st=A.oxw(3).$implicit;return A.oxw(2).onNavigateTo(st.links[dA])}),A._uU(1),A.qZA()}if(2&r){const t=y.$implicit;A.xp6(1),A.Oqu(t)}}function Do(r,y){if(1&r&&(A.TgZ(0,"button",26)(1,"mat-icon"),A._uU(2,"more_vert"),A.qZA()(),A.TgZ(3,"mat-menu",13,53),A.YNc(5,vo,2,1,"button",15),A.qZA()),2&r){const t=A.MAs(4),s=A.oxw(2).$implicit;A.Q6J("matMenuTriggerFor",t),A.xp6(5),A.Q6J("ngForOf",s.goToOptions)}}function yo(r,y){1&r&&(A.TgZ(0,"span",45)(1,"mat-tab-group",46)(2,"mat-tab",47),A._UZ(3,"rtl-cln-lightning-invoices-table",48),A.qZA(),A.TgZ(4,"mat-tab",49),A._UZ(5,"rtl-cln-lightning-payments",50),A.qZA(),A.TgZ(6,"mat-tab",51),A.YNc(7,Do,6,2,"ng-template",52),A.qZA()()()),2&r&&(A.xp6(3),A.Q6J("calledFrom","home"),A.xp6(2),A.Q6J("calledFrom","home"),A.xp6(1),A.Q6J("disabled",!0))}function $n(r,y){1&r&&(A.TgZ(0,"h3"),A._uU(1,"Error! Unable to find information!"),A.qZA())}const ur=function(r){return{"p-0":r}};function li(r,y){if(1&r&&(A.TgZ(0,"mat-grid-tile",8)(1,"mat-card",36),A.YNc(2,Qo,11,4,"mat-card-header",37),A.TgZ(3,"mat-card-content",38),A.YNc(4,Mo,1,0,"mat-progress-bar",18),A.TgZ(5,"div",19),A.YNc(6,po,1,1,"rtl-cln-node-info",39),A.YNc(7,Io,1,2,"rtl-cln-balances-info",21),A.YNc(8,ga,1,4,"rtl-cln-channel-liquidity-info",40),A.YNc(9,mo,1,4,"rtl-cln-channel-liquidity-info",40),A.YNc(10,yo,8,3,"span",41),A.YNc(11,$n,2,0,"h3",25),A.qZA()()()()),2&r){const t=y.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(1),A.Q6J("ngClass",A.VKq(13,ur,"transactions"===t.id)),A.xp6(1),A.Q6J("ngIf","transactions"!==t.id),A.xp6(1),A.s9C("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),A.Q6J("ngClass",A.VKq(15,ca,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR)),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","balance"),A.xp6(1),A.Q6J("ngSwitchCase","inboundLiq"),A.xp6(1),A.Q6J("ngSwitchCase","outboundLiq"),A.xp6(1),A.Q6J("ngSwitchCase","transactions")}}function xo(r,y){if(1&r&&(A.TgZ(0,"div",34),A._UZ(1,"fa-icon",4),A.TgZ(2,"span",5),A._uU(3),A.qZA()(),A.TgZ(4,"mat-grid-list",35),A.YNc(5,li,12,17,"mat-grid-tile",7),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faSmile),A.xp6(2),A.hij("Welcome ",t.information.alias,"! Your node is up and running."),A.xp6(1),A.Q6J("rowHeight",t.merchantCardHeight),A.xp6(1),A.Q6J("ngForOf",t.merchantCards)}}let Fo=(()=>{class r{constructor(t,s,z,dA,st){this.logger=t,this.store=s,this.actions=z,this.commonService=dA,this.router=st,this.faSmile=l.ctA,this.faFrown=l.KfU,this.faAngleDoubleDown=h.Sbq,this.faAngleDoubleUp=h.Vfw,this.faChartPie=h.OS1,this.faBolt=h.BDt,this.faServer=h.xf3,this.faNetworkWired=h.kXW,this.userPersonaEnum=a.ol,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.totalBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.activeChannels=[],this.channelsStatus={active:{},pending:{},inactive:{}},this.activeChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="330px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.errorMessages=["","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusFees=null,this.apiCallStatusBalance=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFHistory=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.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/pending"],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===a.cu.SM||this.screenSize===a.cu.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/pending"],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/pending"],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(g.Hz).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.errorMessages[5]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusFHistory=t.apisCallStatus[1],this.apiCallStatusNodeInfo.status===a.Bn.ERROR&&(this.errorMessages[0]=this.apiCallStatusNodeInfo.message?"object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message:""),this.apiCallStatusFHistory.status===a.Bn.ERROR&&(this.errorMessages[5]=this.apiCallStatusFHistory.message?"object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message:""),this.selNode=t.nodeSettings,this.information=t.information}),this.store.select(g.JG).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===a.Bn.ERROR&&(this.errorMessages[1]=this.apiCallStatusFees.message?"object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message:""),this.fees=t.fees,this.logger.info(t)}),this.store.select(g.ZW).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusChannels=t.apiCallStatus,this.apiCallStatusChannels.status===a.Bn.ERROR&&(this.errorMessages[4]=this.apiCallStatusChannels.message?"object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message:""),this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.activeChannels=t.activeChannels,this.activeChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels,"balancedness")))||[],this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter(s=>!!s.msatoshi_to_them&&s.msatoshi_to_them>0),"msatoshi_to_them")))||[],this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter(s=>!!s.msatoshi_to_us&&s.msatoshi_to_us>0),"msatoshi_to_us")))||[],this.activeChannels.forEach(s=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil((s.msatoshi_to_them||0)/1e3),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor((s.msatoshi_to_us||0)/1e3)}),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.logger.info(t)}),this.store.select(g.Rn).pipe((0,i.R)(this.unSubs[3]),(0,o.M)(this.store.select(g.Wj))).subscribe(([t,s])=>{this.errorMessages[2]="",this.apiCallStatusBalance=t.apiCallStatus,this.apiCallStatusBalance.status===a.Bn.ERROR&&(this.errorMessages[2]=this.apiCallStatusBalance.message?"object"==typeof this.apiCallStatusBalance.message?JSON.stringify(this.apiCallStatusBalance.message):this.apiCallStatusBalance.message:""),this.errorMessages[3]="",this.apiCallStatusLRBal=s.apiCallStatus,this.apiCallStatusLRBal.status===a.Bn.ERROR&&(this.errorMessages[3]=this.apiCallStatusLRBal.message?"object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message:""),this.totalBalance=t.balance,this.balances.onchain=t.balance.totalBalance||0,this.balances.lightning=s.localRemoteBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const z=s.localRemoteBalance.localBalance?+s.localRemoteBalance.localBalance:0,dA=s.localRemoteBalance.remoteBalance?+s.localRemoteBalance.remoteBalance:0;this.channelBalances={localBalance:z,remoteBalance:dA,balancedness:+(1-Math.abs((z-dA)/(z+dA))).toFixed(3)},this.channelsStatus.active.capacity=s.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=s.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=s.localRemoteBalance.inactiveBalance||0,this.logger.info(t),this.logger.info(s)})}onNavigateTo(t){this.router.navigateByUrl("/cln/"+t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.activeChannelsCapacity=this.activeChannels.sort((t,s)=>{const z=(t.msatoshi_to_us?+t.msatoshi_to_us:0)+(t.msatoshi_to_them?+t.msatoshi_to_them:0),dA=(s.msatoshi_to_them?+s.msatoshi_to_them:0)+(s.msatoshi_to_them?+s.msatoshi_to_them:0);return z>dA?-1:z{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.eX),A.Y36(e.v),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-0"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10",3,"rowHeight"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click",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","activeChannels","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","activeChannels","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container","mb-0"],["cols","6",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start"],["fxLayout","column",1,"w-100","dashboard-tabs-group"],["label","Receive"],[1,"h-100",3,"calledFrom"],["label","Pay"],[3,"calledFrom"],[3,"disabled"],["mat-tab-label",""],["menuTransactions","matMenu"]],template:function(t,s){if(1&t&&(A.YNc(0,Eo,7,4,"div",0),A.YNc(1,xo,6,4,"ng-template",null,1,A.W1O)),2&t){const z=A.MAs(2);A.Q6J("ngIf",(null==s.selNode?null:s.selNode.userPersona)===s.userPersonaEnum.OPERATOR)("ngIfElse",z)}},directives:[ht.O5,wt.xw,wt.Wh,f.BN,B.Il,ht.sg,B.DX,w.a8,wt.yH,w.dk,w.n5,Q.lW,p.p6,S.Hw,p.VK,p.OP,w.dn,ht.mk,m.oO,Y.pW,ht.RF,ht.n9,T,L,MA,bA,J,ht.ED,Mt,JA.SP,JA.uX,UA,aa,JA.uD],styles:[""]}),r})();var Ba=Nt(9841),Yo=Nt(8012),ua=Nt(8377),Sr=Nt(7261),or=Nt(1125),pr=Nt(5615);const To=["form"],So=["formSweepAll"],No=["stepper"];function Uo(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Bitcoin address is required."),A.qZA())}function Po(r,y){1&r&&(A.TgZ(0,"mat-hint"),A._uU(1,"Amount replaced by UTXO balance"),A.qZA())}function Ro(r,y){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.amountError)}}function zo(r,y){if(1&r&&(A.TgZ(0,"mat-option",38),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(t)}}function Lo(r,y){if(1&r&&(A.TgZ(0,"mat-option",38),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function bo(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function Go(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",39)(1,"input",40,41),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw(2).customFeeRate=z}),A.qZA(),A.YNc(3,bo,2,0,"mat-error",14),A.qZA()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),A.xp6(2),A.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function Ho(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function fa(r,y){if(1&r&&(A.TgZ(0,"mat-option",38),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t),A.xp6(1),A.hij("",A.lcZ(2,2,t.value)," Sats")}}function Jo(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",23)(1,"mat-expansion-panel",42),A.NdJ("closed",function(){return A.CHM(t),A.oxw(2).onAdvancedPanelToggle(!0)})("opened",function(){return A.CHM(t),A.oxw(2).onAdvancedPanelToggle(!1)}),A.TgZ(2,"mat-expansion-panel-header")(3,"mat-panel-title")(4,"span"),A._uU(5),A.qZA()()(),A.TgZ(6,"div",22)(7,"div",43)(8,"mat-form-field",44)(9,"mat-select",45),A.NdJ("selectionChange",function(z){return A.CHM(t),A.oxw(2).onUTXOSelectionChange(z)})("valueChange",function(z){return A.CHM(t),A.oxw(2).selUTXOs=z}),A.TgZ(10,"mat-select-trigger"),A._uU(11),A.ALo(12,"number"),A.qZA(),A.YNc(13,fa,3,4,"mat-option",21),A.qZA()(),A.TgZ(14,"div",46)(15,"mat-slide-toggle",47),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw(2).flgUseAllBalance=z})("change",function(){return A.CHM(t),A.oxw(2).onUTXOAllBalanceChange()}),A._uU(16," Use selected UTXOs balance "),A.qZA(),A.TgZ(17,"mat-icon",48),A._uU(18,"info_outline"),A.qZA()()()()()()}if(2&r){const t=A.oxw(2);A.xp6(5),A.Oqu(t.advancedTitle),A.xp6(4),A.Q6J("value",t.selUTXOs),A.xp6(2),A.AsE("",A.lcZ(12,7,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),A.xp6(2),A.Q6J("ngForOf",t.utxos),A.xp6(2),A.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function Oo(r,y){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.sendFundError)}}function ko(r,y){if(1&r&&(A.TgZ(0,"div",49),A._UZ(1,"fa-icon",50),A.YNc(2,Oo,2,1,"span",14),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.sendFundError)}}const ha=function(r,y){return{"mr-6":r,"mr-2":y}};function jo(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"form",9,10),A.NdJ("submit",function(){return A.CHM(t),A.oxw().onSendFunds()})("reset",function(){return A.CHM(t),A.oxw().resetData()}),A.TgZ(2,"mat-form-field",11)(3,"input",12,13),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().transaction.address=z}),A.qZA(),A.YNc(5,Uo,2,0,"mat-error",14),A.qZA(),A.TgZ(6,"mat-form-field",15)(7,"input",16,17),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().transaction.satoshis=z}),A.qZA(),A.YNc(9,Po,2,0,"mat-hint",14),A.TgZ(10,"span",18),A._uU(11),A.qZA(),A.YNc(12,Ro,2,1,"mat-error",14),A.qZA(),A.TgZ(13,"mat-form-field",19)(14,"mat-select",20),A.NdJ("selectionChange",function(z){return A.CHM(t),A.oxw().onAmountUnitChange(z)}),A.YNc(15,zo,2,2,"mat-option",21),A.qZA()(),A.TgZ(16,"div",22)(17,"div",23)(18,"div",24)(19,"mat-form-field",25)(20,"mat-select",26),A.NdJ("valueChange",function(z){return A.CHM(t),A.oxw().selFeeRate=z})("selectionChange",function(){return A.CHM(t),A.oxw().customFeeRate=null}),A.YNc(21,Lo,2,2,"mat-option",21),A.qZA()(),A.YNc(22,Go,4,5,"mat-form-field",27),A.qZA(),A.TgZ(23,"div",28)(24,"mat-checkbox",29),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().flgMinConf=z})("change",function(){A.CHM(t);const z=A.oxw();return z.flgMinConf?z.selFeeRate=null:z.minConfValue=null}),A.qZA(),A.TgZ(25,"mat-form-field",30)(26,"input",31,32),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().minConfValue=z}),A.qZA(),A.YNc(28,Ho,2,0,"mat-error",14),A.qZA()()(),A.YNc(29,Jo,19,9,"div",33),A._UZ(30,"div",22),A.YNc(31,ko,3,2,"div",34),A.TgZ(32,"div",35)(33,"button",36),A._uU(34,"Clear Fields"),A.qZA(),A.TgZ(35,"button",37),A._uU(36,"Send Funds"),A.qZA()()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.transaction.address),A.xp6(2),A.Q6J("ngIf",!t.transaction.address),A.xp6(2),A.Q6J("ngModel",t.transaction.satoshis)("type",t.flgUseAllBalance?"text":"number")("step",100)("min",0)("disabled",t.flgUseAllBalance),A.xp6(2),A.Q6J("ngIf",t.flgUseAllBalance),A.xp6(2),A.hij(" ",t.selAmountUnit," "),A.xp6(1),A.Q6J("ngIf",!t.transaction.satoshis),A.xp6(2),A.Q6J("value",t.selAmountUnit)("disabled",t.flgUseAllBalance),A.xp6(1),A.Q6J("ngForOf",t.amountUnits),A.xp6(4),A.Q6J("fxFlex","customperkb"!==t.selFeeRate||t.flgMinConf?"100":"48"),A.xp6(1),A.Q6J("value",t.selFeeRate)("disabled",t.flgMinConf),A.xp6(1),A.Q6J("ngForOf",t.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf),A.xp6(2),A.Q6J("ngModel",t.flgMinConf)("ngClass",A.WLB(28,ha,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),A.xp6(2),A.Q6J("ngModel",t.minConfValue)("step",1)("min",0)("required",t.flgMinConf)("disabled",!t.flgMinConf),A.xp6(2),A.Q6J("ngIf",t.flgMinConf&&!t.minConfValue),A.xp6(1),A.Q6J("ngIf",t.isCompatibleVersion),A.xp6(2),A.Q6J("ngIf",""!==t.sendFundError)}}function Ko(r,y){if(1&r&&A._uU(0),2&r){const t=A.oxw(3);A.Oqu(t.passwordFormLabel)}}function Vo(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Password is required."),A.qZA())}function Wo(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-step",55)(1,"form",73),A.YNc(2,Ko,1,1,"ng-template",67),A.TgZ(3,"div",0)(4,"mat-form-field",1),A._UZ(5,"input",74),A.YNc(6,Vo,2,0,"mat-error",14),A.qZA()(),A.TgZ(7,"div",75)(8,"button",76),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onAuthenticate()}),A._uU(9,"Confirm"),A.qZA()()()()}if(2&r){const t=A.oxw(2);A.Q6J("stepControl",t.passwordFormGroup)("editable",t.flgEditable),A.xp6(1),A.Q6J("formGroup",t.passwordFormGroup),A.xp6(5),A.Q6J("ngIf",null==t.passwordFormGroup.controls.password.errors?null:t.passwordFormGroup.controls.password.errors.required)}}function Zo(r,y){if(1&r&&A._uU(0),2&r){const t=A.oxw(2);A.Oqu(t.sendFundFormLabel)}}function Xo(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Bitcoin address is required."),A.qZA())}function qo(r,y){if(1&r&&(A.TgZ(0,"mat-option",38),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function _o(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function se(r,y){if(1&r&&(A.TgZ(0,"mat-form-field",39),A._UZ(1,"input",77),A.YNc(2,_o,2,0,"mat-error",14),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("step",.1)("min",0),A.xp6(1),A.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.customFeeRate.value)}}function $o(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function ci(r,y){if(1&r&&A._uU(0),2&r){const t=A.oxw(2);A.Oqu(t.confirmFormLabel)}}function gi(r,y){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.sendFundError)}}function Nr(r,y){if(1&r&&(A.TgZ(0,"div",49),A._UZ(1,"fa-icon",50),A.YNc(2,gi,2,1,"span",14),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.sendFundError)}}function fr(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",51)(1,"mat-vertical-stepper",52,53),A.NdJ("selectionChange",function(z){return A.CHM(t),A.oxw().stepSelectionChanged(z)}),A.YNc(3,Wo,10,4,"mat-step",54),A.TgZ(4,"mat-step",55)(5,"form",56),A.YNc(6,Zo,1,1,"ng-template",57),A.TgZ(7,"div",22)(8,"mat-form-field",1),A._UZ(9,"input",58),A.YNc(10,Xo,2,0,"mat-error",14),A.qZA(),A.TgZ(11,"div",59)(12,"div",24)(13,"mat-form-field",25)(14,"mat-select",60),A.YNc(15,qo,2,2,"mat-option",21),A.qZA()(),A.YNc(16,se,3,3,"mat-form-field",27),A.qZA(),A.TgZ(17,"div",28),A._UZ(18,"mat-checkbox",61),A.TgZ(19,"mat-form-field",30),A._UZ(20,"input",62),A.YNc(21,$o,2,0,"mat-error",14),A.qZA()()()(),A.TgZ(22,"div",63)(23,"button",64),A._uU(24,"Next"),A.qZA()()()(),A.TgZ(25,"mat-step",65)(26,"form",66),A.YNc(27,ci,1,1,"ng-template",67),A.TgZ(28,"div",51)(29,"div",68),A._UZ(30,"fa-icon",69),A.TgZ(31,"span"),A._uU(32,"You are about to sweep all funds from RTL. Are you sure?"),A.qZA()(),A.YNc(33,Nr,3,2,"div",34),A.TgZ(34,"div",63)(35,"button",70),A.NdJ("click",function(){return A.CHM(t),A.oxw().onSendFunds()}),A._uU(36,"Sweep All Funds"),A.qZA()()()()()(),A.TgZ(37,"div",71)(38,"button",72),A._uU(39),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(1),A.Q6J("linear",!0),A.xp6(2),A.Q6J("ngIf",!t.appConfig.sso.rtlSSO),A.xp6(1),A.Q6J("stepControl",t.sendFundFormGroup)("editable",t.flgEditable),A.xp6(1),A.Q6J("formGroup",t.sendFundFormGroup),A.xp6(5),A.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionAddress.errors?null:t.sendFundFormGroup.controls.transactionAddress.errors.required),A.xp6(3),A.Q6J("fxFlex","customperkb"!==t.sendFundFormGroup.controls.selFeeRate.value||t.sendFundFormGroup.controls.flgMinConf.value?"100":"48"),A.xp6(2),A.Q6J("ngForOf",t.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value),A.xp6(2),A.Q6J("ngClass",A.WLB(20,ha,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),A.xp6(2),A.Q6J("step",1)("min",0)("required",t.sendFundFormGroup.controls.flgMinConf.value),A.xp6(1),A.Q6J("ngIf",t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.minConfValue.value),A.xp6(4),A.Q6J("stepControl",t.confirmFormGroup),A.xp6(1),A.Q6J("formGroup",t.confirmFormGroup),A.xp6(4),A.Q6J("icon",t.faExclamationTriangle),A.xp6(3),A.Q6J("ngIf",""!==t.sendFundError),A.xp6(5),A.Q6J("mat-dialog-close",!1),A.xp6(1),A.Oqu(t.flgValidated?"Close":"Cancel")}}let Bi=(()=>{class r{constructor(t,s,z,dA,st,Ae,un,Qe,tn,ia){this.dialogRef=t,this.data=s,this.logger=z,this.store=dA,this.commonService=st,this.decimalPipe=Ae,this.actions=un,this.formBuilder=Qe,this.rtlEffects=tn,this.snackBar=ia,this.faExclamationTriangle=h.eHv,this.sweepAll=!1,this.selNode={},this.addressTypes=[],this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=null,this.selectedAddress=a._t[1],this.blockchainBalance={},this.information={},this.isCompatibleVersion=!1,this.newAddress="",this.transaction={},this.feeRateTypes=a.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.sendFundError="",this.fiatConversion=!1,this.amountUnits=a.uA,this.selAmountUnit=a.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=a.Xz,this.advancedTitle="Advanced Options",this.flgValidated=!1,this.flgEditable=!0,this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds",this.confirmFormLabel="Confirm sweep",this.amountError="Amount is Required.",this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.sweepAll=this.data.sweepAll,this.passwordFormGroup=this.formBuilder.group({hiddenPassword:["",[OA.kI.required]],password:["",[OA.kI.required]]}),this.sendFundFormGroup=this.formBuilder.group({transactionAddress:["",OA.kI.required],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}]}),this.confirmFormGroup=this.formBuilder.group({}),this.sendFundFormGroup.controls.flgMinConf.valueChanges.pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{t?(this.sendFundFormGroup.controls.selFeeRate.disable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.reset(),this.sendFundFormGroup.controls.minConfValue.enable(),this.sendFundFormGroup.controls.minConfValue.setValidators([OA.kI.required]),this.sendFundFormGroup.controls.minConfValue.setValue(null)):(this.sendFundFormGroup.controls.selFeeRate.enable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.setValue(null),this.sendFundFormGroup.controls.minConfValue.disable(),this.sendFundFormGroup.controls.minConfValue.setValidators(null),this.sendFundFormGroup.controls.minConfValue.setErrors(null))}),this.sendFundFormGroup.controls.selFeeRate.valueChanges.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.sendFundFormGroup.controls.customFeeRate.setValue(null),this.sendFundFormGroup.controls.customFeeRate.reset(),this.sendFundFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.sendFundFormGroup.controls.flgMinConf.value?null:[OA.kI.required])}),(0,Ba.a)([this.store.select(ua.dT),this.store.select(ua.Yj)]).pipe((0,i.R)(this.unSubs[1])).subscribe(([t,s])=>{this.fiatConversion=t.settings.fiatConversion,this.amountUnits=t.settings.currencyUnits,this.appConfig=s}),this.store.select(g.ey).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.information=t,this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")}),this.store.select(g.T4).pipe((0,i.R)(this.unSubs[3])).subscribe(t=>{this.utxos=this.commonService.sortAscByKey(t.utxos.filter(s=>"confirmed"===s.status),"value"),this.logger.info(t)}),this.actions.pipe((0,i.R)(this.unSubs[4]),(0,qA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN||t.type===a.AB.SET_CHANNEL_TRANSACTION_RES_CLN)).subscribe(t=>{t.type===a.AB.SET_CHANNEL_TRANSACTION_RES_CLN&&(this.store.dispatch((0,KA.jW)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&"SetChannelTransaction"===t.payload.action&&(this.sendFundError=t.payload.message)})}onAuthenticate(){if(!this.passwordFormGroup.controls.password.value)return!0;this.flgValidated=!1,this.store.dispatch((0,KA.QO)({payload:Yo(this.passwordFormGroup.controls.password.value).toString()})),this.rtlEffects.isAuthorizedRes.pipe((0,PA.q)(1)).subscribe(t=>{"ERROR"!==t?(this.passwordFormGroup.controls.hiddenPassword.setValue(this.passwordFormGroup.controls.password.value),this.stepper.next()):(this.dialogRef.close(),this.snackBar.open("Unauthorized User. Logging out from RTL."))})}onSendFunds(){if(this.sendFundError="",this.flgUseAllBalance&&(this.transaction.satoshis="all"),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.transaction.utxos=[],this.selUTXOs.forEach(t=>this.transaction.utxos.push(t.txid+":"+t.output))),this.sweepAll){if(!this.sendFundFormGroup.controls.transactionAddress.value||""===this.sendFundFormGroup.controls.transactionAddress.value||this.sendFundFormGroup.controls.flgMinConf.value&&(!this.sendFundFormGroup.controls.minConfValue.value||this.sendFundFormGroup.controls.minConfValue.value<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis="all",this.transaction.address=this.sendFundFormGroup.controls.transactionAddress.value,this.sendFundFormGroup.controls.flgMinConf.value?(delete this.transaction.feeRate,this.transaction.minconf=this.sendFundFormGroup.controls.flgMinConf.value?this.sendFundFormGroup.controls.minConfValue.value:null):(delete this.transaction.minconf,this.transaction.feeRate="customperkb"===this.sendFundFormGroup.controls.selFeeRate.value&&!this.sendFundFormGroup.controls.flgMinConf.value&&this.sendFundFormGroup.controls.customFeeRate.value?1e3*this.sendFundFormGroup.controls.customFeeRate.value+"perkb":this.sendFundFormGroup.controls.selFeeRate.value),delete this.transaction.utxos,this.store.dispatch((0,mt.Wi)({payload:this.transaction}))}else{if(this.transaction.minconf=this.flgMinConf?this.minConfValue:null,this.transaction.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,!this.transaction.address||""===this.transaction.address||!this.transaction.satoshis||+this.transaction.satoshis<=0||this.flgMinConf&&(!this.transaction.minconf||this.transaction.minconf<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis&&"all"!==this.transaction.satoshis&&this.selAmountUnit!==a.NT.SATS?this.commonService.convertCurrency(+this.transaction.satoshis,this.selAmountUnit===this.amountUnits[2]?a.NT.OTHER:this.selAmountUnit,a.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,i.R)(this.unSubs[5])).subscribe({next:t=>{this.transaction.satoshis=t[a.NT.SATS],this.selAmountUnit=a.NT.SATS,this.store.dispatch((0,mt.Wi)({payload:this.transaction}))},error:t=>{this.transaction.satoshis=null,this.selAmountUnit=a.NT.SATS,this.amountError="Conversion Error: "+t}}):this.store.dispatch((0,mt.Wi)({payload:this.transaction}))}}resetData(){this.sendFundError="",this.transaction={},this.flgMinConf=!1,this.totalSelectedUTXOAmount=null,this.selUTXOs=[],this.flgUseAllBalance=!1,this.selAmountUnit=a.uA[0]}stepSelectionChanged(t){switch(this.sendFundError="",t.selectedIndex){case 0:default:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds";break;case 1:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds";break;case 2:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds | Address: "+this.sendFundFormGroup.controls.transactionAddress.value+(this.sendFundFormGroup.controls.flgMinConf.value?" | Min Confirmation Blocks: "+this.sendFundFormGroup.controls.minConfValue.value:this.sendFundFormGroup.controls.selFeeRate.value?" | Fee Rate: "+this.feeRateTypes.find(s=>s.feeRateId===this.sendFundFormGroup.controls.selFeeRate.value).feeRateType:"")}t.selectedIndex0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((z,dA)=>(s.value=z.value+dA.value,s)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=null,this.transaction.satoshis=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.flgUseAllBalance?(this.transaction.satoshis=this.totalSelectedUTXOAmount,this.selAmountUnit=a.uA[0]):this.transaction.satoshis=null}onAmountUnitChange(t){const s=this,z=this.selAmountUnit===this.amountUnits[2]?a.NT.OTHER:this.selAmountUnit;let dA=t.value===this.amountUnits[2]?a.NT.OTHER:t.value;this.transaction.satoshis&&this.selAmountUnit!==t.value&&this.commonService.convertCurrency(+this.transaction.satoshis,z,dA,this.amountUnits[2],this.fiatConversion).pipe((0,i.R)(this.unSubs[6])).subscribe({next:st=>{this.selAmountUnit=t.value,s.transaction.satoshis=s.decimalPipe.transform(st[dA],s.currencyUnitFormats[dA]).replace(/,/g,"")},error:st=>{s.transaction.satoshis=null,this.amountError="Conversion Error: "+st,this.selAmountUnit=z,dA=z}})}onAdvancedPanelToggle(t){this.advancedTitle=t&&this.selUTXOs.length&&this.selUTXOs.length>0?"Advanced Options | Selected UTXOs: "+this.selUTXOs.length+" | Selected UTXO Amount: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats":"Advanced Options"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(dt.so),A.Y36(dt.WI),A.Y36(E.mQ),A.Y36(u.yh),A.Y36(e.v),A.Y36(ht.JJ),A.Y36(C.eX),A.Y36(OA.qu),A.Y36(DA.V),A.Y36(Sr.ux))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain-send-modal"]],viewQuery:function(t,s){if(1&t&&(A.Gf(To,7),A.Gf(So,5),A.Gf(No,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.form=z.first),A.iGM(z=A.CRH())&&(s.formSweepAll=z.first),A.iGM(z=A.CRH())&&(s.stepper=z.first)}},decls:12,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100","class","overflow-x-hidden",3,"submit","reset",4,"ngIf","ngIfElse"],["sweepAllBlock",""],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","address","required","",3,"ngModel","ngModelChange"],["address","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amount","tabindex","2","required","",3,"ngModel","type","step","min","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","disabled","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","48","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",4,"ngIf"],["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"],["mat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxLayout","column","fxFlex","100","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","35","fxLayoutAlign","start end"],["tabindex","8","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","60","fxLayout","row","fxLayoutAlign","start center"],["tabindex","9","color","primary","name","flgUseAllBalance",3,"ngModel","disabled","ngModelChange","change"],["matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",1,"info-icon"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable",4,"ngIf"],[3,"stepControl","editable"],["fxLayout","column",1,"my-1","pr-1",3,"formGroup"],["matStepLabel","","disabled","true"],["matInput","","formControlName","transactionAddress","placeholder","Bitcoin Address","tabindex","4","name","address","required",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","8","type","default","matStepperNext",""],[3,"stepControl"],["fxLayout","column","fxLayoutAlign","start",1,"my-1","pr-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100",1,"w-100","alert","alert-warn"],[1,"mt-1","mr-1","alert-icon",3,"icon"],["mat-button","","color","primary","tabindex","9","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","space-between",1,"my-1","pr-1",3,"formGroup"],["autoFocus","","matInput","","placeholder","Password","type","password","tabindex","1","formControlName","password","required",""],["fxLayout","row",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","default",3,"click"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6),A.YNc(9,jo,37,31,"form",7),A.qZA()()(),A.YNc(10,fr,40,23,"ng-template",null,8,A.W1O)),2&t){const z=A.MAs(11);A.xp6(5),A.Oqu(s.sweepAll?"Sweep All Funds":"Send Funds"),A.xp6(1),A.Q6J("mat-dialog-close",!1),A.xp6(3),A.Q6J("ngIf",!s.sweepAll)("ngIfElse",z)}},directives:[wt.xw,wt.yH,w.dk,wt.Wh,Q.lW,dt.ZT,w.dn,ht.O5,OA._Y,OA.JL,OA.F,Z.KE,H.Nt,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,Z.TO,b.q,Z.bx,Z.R9,CA.gD,ht.sg,wA.ey,OA.wV,OA.qQ,$A.oG,ht.mk,m.oO,or.ib,or.yz,or.yK,CA.$L,RA.Rr,S.Hw,aA.gM,f.BN,pr.Vq,pr.C0,OA.sg,pr.VY,OA.u,pr.Ic],pipes:[ht.JJ],styles:[""]}),r})();var Gi=Nt(1203),ui=Nt(7544);function As(r,y){1&r&&A._UZ(0,"mat-progress-bar",27)}function Ur(r,y){1&r&&(A.TgZ(0,"th",28),A._uU(1," Transaction ID "),A.qZA())}function Pr(r,y){1&r&&(A.TgZ(0,"span",36)(1,"mat-icon",37),A._uU(2,"warning"),A.qZA()())}function Hi(r,y){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,Pr,3,0,"span",35),A.qZA()),2&r){const t=A.oxw().$implicit;A.oxw();const s=A.MAs(32);A.xp6(1),A.Q6J("ngIf",t.value<1e3)("ngIfElse",s)}}function Ji(r,y){1&r&&A._UZ(0,"span",38)}function Oi(r,y){if(1&r&&(A._UZ(0,"span",39),A.ALo(1,"titlecase")),2&r){const t=A.oxw().$implicit;A.s9C("matTooltip",A.lcZ(1,1,t.status))}}const ts=function(r){return{"max-width":r}};function Ea(r,y){if(1&r&&(A.TgZ(0,"td",29)(1,"span",30),A.YNc(2,Hi,2,2,"span",31),A.YNc(3,Ji,1,0,"span",32),A.YNc(4,Oi,2,3,"span",33),A.TgZ(5,"span",34),A._uU(6),A.qZA()()()),2&r){const t=y.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(5,ts,s.screenSize===s.screenSizeEnum.XS?"10rem":"50rem")),A.xp6(1),A.Q6J("ngIf",s.numDustUTXOs>0&&!s.isDustUTXO),A.xp6(1),A.Q6J("ngIf","confirmed"===t.status),A.xp6(1),A.Q6J("ngIf","confirmed"!==t.status),A.xp6(2),A.Oqu(t.txid)}}function es(r,y){1&r&&(A.TgZ(0,"th",40),A._uU(1," Output "),A.qZA())}function ns(r,y){if(1&r&&(A.TgZ(0,"td",29)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.output)," ")}}function rs(r,y){1&r&&(A.TgZ(0,"th",40),A._uU(1," Value (Sats) "),A.qZA())}function is(r,y){if(1&r&&(A.TgZ(0,"span",41),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Oqu(A.lcZ(2,1,t.value))}}function as(r,y){if(1&r&&(A.TgZ(0,"span",44),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.hij("(",A.lcZ(2,1,-1*t.value),")")}}function wa(r,y){if(1&r&&(A.TgZ(0,"td",29),A.YNc(1,is,3,3,"span",42),A.YNc(2,as,3,3,"span",43),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Q6J("ngIf",t.value>0||0===t.value),A.xp6(1),A.Q6J("ngIf",t.value<0)}}function os(r,y){1&r&&(A.TgZ(0,"th",40),A._uU(1," Blockheight "),A.qZA())}function ss(r,y){if(1&r&&(A.TgZ(0,"td",29)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.blockheight)," ")}}function Ir(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",45)(1,"div",46)(2,"mat-select",47),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",48),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function zt(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",49)(1,"button",50),A.NdJ("click",function(z){const st=A.CHM(t).$implicit;return A.oxw().onUTXOClick(st,z)}),A._uU(2,"View Info"),A.qZA()()}}function fi(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No utxos available."),A.qZA())}function hi(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting utxos..."),A.qZA())}function mr(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function Ca(r,y){if(1&r&&(A.TgZ(0,"td",51),A.YNc(1,fi,2,0,"p",31),A.YNc(2,hi,2,0,"p",31),A.YNc(3,mr,2,1,"p",31),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Ei=function(r){return{"display-none":r}};function ls(r,y){if(1&r&&A._UZ(0,"tr",52),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,Ei,(null==t.listUTXOs?null:t.listUTXOs.data)&&(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)>0))}}function Qa(r,y){1&r&&A._UZ(0,"tr",53)}function cs(r,y){1&r&&A._UZ(0,"tr",54)}function kr(r,y){1&r&&A._UZ(0,"mat-icon",37)}const wi=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},gs=function(){return["no_utxo"]};let da=(()=>{class r{constructor(t,s,z){this.logger=t,this.commonService=s,this.store=z,this.numDustUTXOs=0,this.isDustUTXO=!1,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["txid","value","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["txid","output","value","blockheight","actions"]):(this.flgSticky=!0,this.displayedColumns=["txid","output","value","blockheight","actions"])}ngOnInit(){this.store.select(g.T4).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.logger.info(t)})}ngAfterViewInit(){this.utxos&&this.utxos.length>0&&this.sort&&this.paginator&&this.loadUTXOsTable(this.utxos)}ngOnChanges(){this.utxos&&this.utxos.length>0&&this.loadUTXOsTable(this.utxos)}applyFilter(){this.listUTXOs.filter=this.selFilter.trim().toLowerCase()}onUTXOClick(t,s){const z=[[{key:"txid",value:t.txid,title:"Transaction ID",width:100}],[{key:"output",value:t.output,title:"Output",width:50,type:a.Gi.NUMBER},{key:"value",value:t.value,title:"Value (Sats)",width:50,type:a.Gi.NUMBER}],[{key:"status",value:this.commonService.titleCase(t.status),title:"Status",width:50,type:a.Gi.STRING},{key:"blockheight",value:t.blockheight,title:"Blockheight",width:50,type:a.Gi.NUMBER}],[{key:"address",value:t.address,title:"Address",width:100}]];this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"UTXO Information",message:z}}}))}loadUTXOsTable(t){this.listUTXOs=new FA.by([...t]),this.listUTXOs.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.listUTXOs.sort=this.sort,this.listUTXOs.filterPredicate=(s,z)=>JSON.stringify(s).toLowerCase().includes(z),this.listUTXOs.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listUTXOs)}onDownloadCSV(){this.listUTXOs.data&&this.listUTXOs.data.length>0&&this.commonService.downloadFile(this.listUTXOs.data,"UTXOs")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain-utxos"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},inputs:{numDustUTXOs:"numDustUTXOs",isDustUTXO:"isDustUTXO",utxos:"utxos"},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("UTXOs")}]),A.TTD],decls:33,vars:14,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch",1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","txid"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","output"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","value"],["matColumnDef","blockheight"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_utxo"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["emptySpace",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[4,"ngIf"],["class","dot green","matTooltip","Confirmed","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltipPosition","right",3,"matTooltip",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Risk of dust attack","matTooltipPosition","right",4,"ngIf","ngIfElse"],["matTooltip","Risk of dust attack","matTooltipPosition","right"],["fxLayoutAlign","start center","color","warn",1,"mr-1"],["matTooltip","Confirmed","matTooltipPosition","right",1,"dot","green"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center",1,"red"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"div",2),A.TgZ(3,"mat-form-field",3)(4,"input",4),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.TgZ(5,"div",5)(6,"div",6),A.YNc(7,As,1,0,"mat-progress-bar",7),A.TgZ(8,"table",8,9),A.ynx(10,10),A.YNc(11,Ur,2,0,"th",11),A.YNc(12,Ea,7,7,"td",12),A.BQk(),A.ynx(13,13),A.YNc(14,es,2,0,"th",14),A.YNc(15,ns,4,3,"td",12),A.BQk(),A.ynx(16,15),A.YNc(17,rs,2,0,"th",14),A.YNc(18,wa,3,2,"td",12),A.BQk(),A.ynx(19,16),A.YNc(20,os,2,0,"th",14),A.YNc(21,ss,4,3,"td",12),A.BQk(),A.ynx(22,17),A.YNc(23,Ir,6,0,"th",18),A.YNc(24,zt,3,0,"td",19),A.BQk(),A.ynx(25,20),A.YNc(26,Ca,4,3,"td",21),A.BQk(),A.YNc(27,ls,1,3,"tr",22),A.YNc(28,Qa,1,0,"tr",23),A.YNc(29,cs,1,0,"tr",24),A.qZA(),A._UZ(30,"mat-paginator",25),A.qZA()()(),A.YNc(31,kr,1,0,"ng-template",null,26,A.W1O)),2&t&&(A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(3),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.listUTXOs)("ngClass",A.VKq(11,wi,""!==s.errorMessage)),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(13,gs)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[wt.xw,wt.Wh,wt.yH,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,lA.$V,ht.O5,Y.pW,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,ht.PC,m.Zl,aA.gM,S.Hw,CA.gD,CA.$L,wA.ey,Q.lW,FA.mD,FA.yh,FA.Ke,FA.Q2,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.rS,ht.JJ],styles:[".mat-column-txid[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-txid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();function Ma(r,y){if(1&r&&(A.TgZ(0,"span",5),A._uU(1,"UTXOs"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.numUtxos)}}function pa(r,y){if(1&r&&(A.TgZ(0,"span",5),A._uU(1,"Dust UTXOs"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.numDustUtxos)}}let Bs=(()=>{class r{constructor(t,s){this.logger=t,this.store=s,this.selectedTableIndex=0,this.selectedTableIndexChange=new A.vpe,this.utxos=[],this.numUtxos=0,this.dustUtxos=[],this.numDustUtxos=0,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.store.select(g.T4).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{t.utxos&&t.utxos.length>0&&(this.utxos=t.utxos,this.numUtxos=this.utxos.length,this.dustUtxos=t.utxos.filter(s=>+s.value<1e3),this.numDustUtxos=this.dustUtxos.length),t.utxos&&t.utxos.length>0&&(this.utxos=t.utxos,this.numUtxos=this.utxos.length),this.logger.info(t)})}onSelectedIndexChanged(t){this.selectedTableIndexChange.emit(t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-utxo-tables"]],inputs:{selectedTableIndex:"selectedTableIndex"},outputs:{selectedTableIndexChange:"selectedTableIndexChange"},decls:8,vars:7,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"bordered-box"],[3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],["xLayout","row","fxFlex","100",3,"utxos","numDustUTXOs","isDustUTXO"],["fxLayout","row","fxFlex","100",3,"utxos","numDustUTXOs","isDustUTXO"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"mat-tab-group",1),A.NdJ("selectedIndexChange",function(dA){return s.onSelectedIndexChanged(dA)}),A.TgZ(2,"mat-tab"),A.YNc(3,Ma,2,1,"ng-template",2),A._UZ(4,"rtl-cln-on-chain-utxos",3),A.qZA(),A.TgZ(5,"mat-tab"),A.YNc(6,pa,2,1,"ng-template",2),A._UZ(7,"rtl-cln-on-chain-utxos",4),A.qZA()()()),2&t&&(A.xp6(1),A.Q6J("selectedIndex",s.selectedTableIndex),A.xp6(3),A.Q6J("utxos",s.utxos)("numDustUTXOs",s.numDustUtxos)("isDustUTXO",!1),A.xp6(3),A.Q6J("utxos",s.dustUtxos)("numDustUTXOs",s.numDustUtxos)("isDustUTXO",!0))},directives:[wt.xw,wt.yH,wt.Wh,JA.SP,JA.uX,JA.uD,ui.k,da],styles:[""]}),r})();const us=function(r,y){return[r,y]};function jr(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",12),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=null==dA?null:dA.link}),A._uU(1),A.qZA()}if(2&r){const t=y.$implicit,s=A.oxw();A.Q6J("active",s.activeLink===(null==t?null:t.link))("routerLink",A.WLB(3,us,null==t?null:t.link,null==s.selectedTable?null:s.selectedTable.name)),A.xp6(1),A.Oqu(null==t?null:t.name)}}let fs=(()=>{class r{constructor(t,s,z){this.store=t,this.router=s,this.activatedRoute=z,this.selNode={},this.faExchangeAlt=h.Ssp,this.faChartPie=h.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"},{link:"sweep",name:"Sweep All"}],this.activeLink=this.links[0].link,this.tables=[{id:0,name:"utxos"},{id:1,name:"dustUtxos"}],this.selectedTable=this.tables[0],this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.selectedTable=this.tables.find(s=>s.name===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const z=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=z?z.link:this.links[0].link,this.selectedTable=this.tables.find(dA=>dA.name===s.urlAfterRedirects.substring(s.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(g.lw).pipe((0,i.R)(this.unSubs[1])).subscribe(s=>{this.selNode=s}),this.store.select(g.Rn).pipe((0,i.R)(this.unSubs[2])).subscribe(s=>{this.balances=[{title:"Total Balance",dataValue:s.balance.totalBalance||0},{title:"Confirmed",dataValue:s.balance.confBalance},{title:"Unconfirmed",dataValue:s.balance.unconfBalance}]})}openSendFundsModal(t){this.store.dispatch((0,KA.qR)({payload:{data:{sweepAll:t,component:Bi}}}))}onSelectedTableIndexChanged(t){this.selectedTable=this.tables.find(s=>s.id===t),this.router.navigate(["./",this.activeLink,this.selectedTable.name],{relativeTo:this.activatedRoute})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(qt.F0),A.Y36(qt.gz))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain"]],decls:21,vars:5,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100",3,"selectedTableIndex","selectedTableIndexChange"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"On-chain Balance"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),A._UZ(7,"rtl-currency-unit-converter",5),A.qZA()()(),A.TgZ(8,"div",0),A._UZ(9,"fa-icon",1),A.TgZ(10,"span",2),A._uU(11,"On-chain Transactions"),A.qZA()(),A.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",7),A.YNc(16,jr,2,6,"div",8),A.qZA(),A.TgZ(17,"div",9),A._UZ(18,"router-outlet"),A.qZA(),A.TgZ(19,"div",10)(20,"rtl-cln-utxo-tables",11),A.NdJ("selectedTableIndexChange",function(dA){return s.onSelectedTableIndexChanged(dA)}),A.qZA()()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartPie),A.xp6(6),A.Q6J("values",s.balances),A.xp6(2),A.Q6J("icon",s.faExchangeAlt),A.xp6(7),A.Q6J("ngForOf",s.links),A.xp6(4),A.Q6J("selectedTableIndex",null==s.selectedTable?null:s.selectedTable.id))},directives:[wt.xw,wt.Wh,f.BN,w.a8,w.dn,Gi.D,JA.BU,ht.sg,JA.Nj,qt.rH,wt.yH,qt.lC,Bs],styles:[""]}),r})();function hs(r,y){if(1&r&&(A.TgZ(0,"span",10),A._uU(1,"Channels"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.activeChannels)}}function Es(r,y){if(1&r&&(A.TgZ(0,"span",10),A._uU(1,"Peers"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.activePeers)}}let Ia=(()=>{class r{constructor(t,s,z){this.store=t,this.logger=s,this.router=z,this.activePeers=0,this.activeChannels=0,this.faUsers=h.FVb,this.faChartPie=h.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(t=>t instanceof qt.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(s=>s.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(g.ZW).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.activeChannels=t.activeChannels.length||0}),this.store.select(g.Wi).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.logger.info(t)}),this.store.select(g.Rn).pipe((0,i.R)(this.unSubs[3])).subscribe(t=>{this.balances=[{title:"Total Balance",dataValue:t.balance.totalBalance||0},{title:"Confirmed",dataValue:t.balance.confBalance},{title:"Unconfirmed",dataValue:t.balance.unconfBalance}]})}onSelectedTabChange(t){this.router.navigateByUrl("/cln/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(E.mQ),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-connections"]],decls:22,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"On-chain Balance"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),A._UZ(7,"rtl-currency-unit-converter",5),A.qZA()()(),A.TgZ(8,"div",0),A._UZ(9,"fa-icon",1),A.TgZ(10,"span",2),A._uU(11,"Connections"),A.qZA()(),A.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"mat-tab-group",7),A.NdJ("selectedIndexChange",function(dA){return s.activeLink=dA})("selectedTabChange",function(dA){return s.onSelectedTabChange(dA)}),A.TgZ(16,"mat-tab"),A.YNc(17,hs,2,1,"ng-template",8),A.qZA(),A.TgZ(18,"mat-tab"),A.YNc(19,Es,2,1,"ng-template",8),A.qZA()(),A.TgZ(20,"div",9),A._UZ(21,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartPie),A.xp6(6),A.Q6J("values",s.balances),A.xp6(2),A.Q6J("icon",s.faUsers),A.xp6(6),A.Q6J("selectedIndex",s.activeLink))},directives:[wt.xw,wt.Wh,f.BN,w.a8,w.dn,Gi.D,JA.SP,JA.uX,JA.uD,ui.k,wt.yH,qt.lC],styles:[""]}),r})();function ws(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",11),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=y.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let Cs=(()=>{class r{constructor(t,s,z){this.logger=t,this.store=s,this.router=z,this.faExchangeAlt=h.Ssp,this.faChartPie=h.OS1,this.currencyUnits=[],this.routerUrl="",this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.selNode={},this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const z=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=z?z.link:this.links[0].link,this.routerUrl=s.urlAfterRedirects}}),this.store.select(g.lw).pipe((0,i.R)(this.unSubs[1])).subscribe(s=>{if(this.selNode=s,this.selNode.enableOffers){this.store.dispatch((0,mt.yl)()),this.store.dispatch((0,mt.uT)()),this.links.push({link:"offers",name:"Offers"}),this.links.push({link:"offrBookmarks",name:"Paid Offer Bookmarks"});const z=this.links.find(dA=>this.router.url.includes(dA.link));this.activeLink=z?z.link:this.links[0].link}}),this.store.select(g.Wj).pipe((0,i.R)(this.unSubs[2]),(0,o.M)(this.store.select(g.lw))).subscribe(([s,z])=>{this.currencyUnits=z.currencyUnits,this.balances=z.userPersona===a.ol.OPERATOR?[{title:"Local Capacity",dataValue:s.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:s.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:s.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:s.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(s)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Lightning Balance"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),A._UZ(7,"rtl-currency-unit-converter",5),A.qZA()()(),A.TgZ(8,"div",6),A._UZ(9,"fa-icon",1),A.TgZ(10,"span",2),A._uU(11,"Lightning Transactions"),A.qZA()(),A.TgZ(12,"div",7)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",8),A.YNc(16,ws,2,3,"div",9),A.qZA(),A.TgZ(17,"div",10),A._UZ(18,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartPie),A.xp6(6),A.Q6J("values",s.balances),A.xp6(2),A.Q6J("icon",s.faExchangeAlt),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[wt.xw,wt.Wh,f.BN,w.a8,w.dn,Gi.D,JA.BU,ht.sg,JA.Nj,qt.rH,wt.yH,qt.lC],styles:[""]}),r})();function Qs(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",11),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=y.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let ds=(()=>{class r{constructor(t){this.router=t,this.faMapSigns=h.SuH,this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"routingpeers",name:"Routing Peers"},{link:"failedtransactions",name:"Failed Transactions"},{link:"localfail",name:"Local Failed Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const z=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=z?z.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-routing"]],decls:13,vars:2,consts:[["fxLayout","column",1,"mb-2"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"fa-icon",2),A.TgZ(3,"span",3),A._uU(4,"Routing"),A.qZA()(),A.TgZ(5,"div",4)(6,"mat-card",5)(7,"mat-card-content",6)(8,"div",7)(9,"nav",8),A.YNc(10,Qs,2,3,"div",9),A.qZA()(),A.TgZ(11,"div",10),A._UZ(12,"router-outlet"),A.qZA()()()()()),2&t&&(A.xp6(2),A.Q6J("icon",s.faMapSigns),A.xp6(8),A.Q6J("ngForOf",s.links))},directives:[wt.xw,wt.Wh,f.BN,wt.yH,w.a8,w.dn,JA.BU,ht.sg,JA.Nj,qt.rH,qt.lC],styles:[""]}),r})();var Kr=Nt(6895);function ma(r,y){if(1&r&&(A.TgZ(0,"span",6),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(t)}}function Ms(r,y){1&r&&(A.TgZ(0,"th",27),A._uU(1,"Type"),A.qZA())}function ps(r,y){if(1&r&&(A.TgZ(0,"td",28),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.type," ")}}function Is(r,y){1&r&&(A.TgZ(0,"th",27),A._uU(1,"Address"),A.qZA())}function ms(r,y){if(1&r&&(A.TgZ(0,"td",28),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.address," ")}}function vs(r,y){1&r&&(A.TgZ(0,"th",27),A._uU(1,"Port"),A.qZA())}function Un(r,y){if(1&r&&(A.TgZ(0,"td",28),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.port," ")}}function Ds(r,y){1&r&&(A.TgZ(0,"th",29)(1,"span",30),A._uU(2,"Actions"),A.qZA()())}function ys(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",31)(1,"span",30)(2,"button",32),A.NdJ("copied",function(z){return A.CHM(t),A.oxw(2).onCopyNodeURI(z)}),A._uU(3,"Copy Node URI"),A.qZA()()()}if(2&r){const t=y.$implicit,s=A.oxw(2);A.xp6(2),A.Q6J("payload",(null==s.lookupResult?null:s.lookupResult.nodeid)+"@"+t.address+":"+t.port)}}function xs(r,y){1&r&&A._UZ(0,"tr",33)}function Fs(r,y){1&r&&A._UZ(0,"tr",34)}const Ys=function(r){return{"background-color":r}};function Ts(r,y){if(1&r&&(A.TgZ(0,"div",1),A._UZ(1,"mat-divider",2),A.TgZ(2,"div",3)(3,"div",4)(4,"h4",5),A._uU(5,"Alias"),A.qZA(),A.TgZ(6,"span",6),A._uU(7),A.TgZ(8,"span",7),A._uU(9),A.qZA()()(),A.TgZ(10,"div",8)(11,"h4",5),A._uU(12,"Pub Key"),A.qZA(),A.TgZ(13,"span",9),A._uU(14),A.qZA()()(),A._UZ(15,"mat-divider",10),A.TgZ(16,"div",3)(17,"div",4)(18,"h4",5),A._uU(19,"Last Update"),A.qZA(),A.TgZ(20,"span",6),A._uU(21),A.ALo(22,"date"),A.qZA()(),A.TgZ(23,"div",8)(24,"h4",5),A._uU(25,"Features"),A.qZA(),A.YNc(26,ma,2,1,"span",11),A.qZA()(),A._UZ(27,"mat-divider",10),A.TgZ(28,"div",12)(29,"h4",13),A._uU(30,"Addresses"),A.qZA(),A.TgZ(31,"div",14)(32,"table",15,16),A.ynx(34,17),A.YNc(35,Ms,2,0,"th",18),A.YNc(36,ps,2,1,"td",19),A.BQk(),A.ynx(37,20),A.YNc(38,Is,2,0,"th",18),A.YNc(39,ms,2,1,"td",19),A.BQk(),A.ynx(40,21),A.YNc(41,vs,2,0,"th",18),A.YNc(42,Un,2,1,"td",19),A.BQk(),A.ynx(43,22),A.YNc(44,Ds,3,0,"th",23),A.YNc(45,ys,4,1,"td",24),A.BQk(),A.YNc(46,xs,1,0,"tr",25),A.YNc(47,Fs,1,0,"tr",26),A.qZA()()()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(null==t.lookupResult?null:t.lookupResult.alias),A.xp6(1),A.Q6J("ngStyle",A.VKq(15,Ys,"#"+(null==t.lookupResult?null:t.lookupResult.color))),A.xp6(1),A.Oqu(null!=t.lookupResult&&t.lookupResult.color?"#"+(null==t.lookupResult?null:t.lookupResult.color):""),A.xp6(5),A.Oqu(null==t.lookupResult?null:t.lookupResult.nodeid),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(A.xi3(22,12,1e3*(null==t.lookupResult?null:t.lookupResult.last_timestamp),"dd/MMM/y HH:mm")),A.xp6(5),A.Q6J("ngForOf",t.featureDescriptions),A.xp6(1),A.Q6J("inset",!0),A.xp6(5),A.Q6J("dataSource",t.addresses),A.xp6(14),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}let Ss=(()=>{class r{constructor(t,s){this.logger=t,this.snackBar=s,this.featureDescriptions=[],this.displayedColumns=["type","address","port","actions"]}ngOnInit(){if(this.addresses=new FA.by(this.lookupResult&&this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses||[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(t,s)=>t[s]&&isNaN(t[s])?t[s].toLocaleLowerCase():t[s]?+t[s]:null,this.lookupResult.features&&""!==this.lookupResult.features.trim()){const t=parseInt(this.lookupResult.features,16);a.Df.forEach(s=>{t&(1<{class r{constructor(t){this.store=t,this.lookupResult=[],this.node1_match=!1,this.node2_match=!1,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.store.select(g.ey).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.lookupResult.length>0&&this.lookupResult[0].source===t.id&&(this.node1_match=!0),this.lookupResult.length>1&&this.lookupResult[1].source===t.id&&(this.node2_match=!0)})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start",1,"mt-1","bordered-box","padding-gap-large"],["fxLayout","column"],["class","page-title font-bold-500",4,"ngIf"],[3,"inset"],["fxLayout","column","fxFlex","20",1,"my-1"],[1,"font-bold-500"],[1,"foreground-secondary-text"],["fxLayout","column","fxFlex","10",1,"my-1"],[1,"page-title","font-bold-500"]],template:function(t,s){1&t&&A.YNc(0,ki,204,91,"div",0),2&t&&A.Q6J("ngIf",s.lookupResult)},directives:[ht.O5,wt.xw,AA.d,wt.Wh,wt.yH],pipes:[ht.JJ,ht.uU],styles:[".mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%], .mat-list-base[_ngcontent-%COMP%] .mat-list-option[_ngcontent-%COMP%]{height:38px!important}"]}),r})();const Er=["form"];function ji(r,y){if(1&r&&(A.TgZ(0,"mat-radio-button",17),A._uU(1),A.qZA()),2&r){const t=y.$implicit,s=A.oxw();A.Q6J("value",t.id)("checked",s.selectedFieldId===t.id),A.xp6(1),A.hij(" ",t.name," ")}}function Ps(r,y){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function Ci(r,y){if(1&r&&(A.TgZ(0,"div"),A._UZ(1,"rtl-cln-node-lookup",26),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Q6J("lookupResult",t.nodeLookupValue)}}function Qi(r,y){if(1&r&&(A.TgZ(0,"span",24),A.YNc(1,Ci,2,1,"div",25),A.qZA()),2&r){const t=A.oxw(2),s=A.MAs(19);A.xp6(1),A.Q6J("ngIf",""!==t.nodeLookupValue.nodeid)("ngIfElse",s)}}function di(r,y){if(1&r&&(A.TgZ(0,"div"),A._UZ(1,"rtl-cln-channel-lookup",26),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Q6J("lookupResult",t.channelLookupValue)}}function De(r,y){if(1&r&&(A.TgZ(0,"span",24),A.YNc(1,di,2,1,"div",25),A.qZA()),2&r){const t=A.oxw(2),s=A.MAs(19);A.xp6(1),A.Q6J("ngIf",t.channelLookupValue.length>0)("ngIfElse",s)}}function Rs(r,y){1&r&&(A.TgZ(0,"span",24)(1,"h3"),A._uU(2,"Error! Unable to find details!"),A.qZA()())}function wr(r,y){if(1&r&&(A.TgZ(0,"div",18)(1,"div",19)(2,"span",20),A._uU(3),A.qZA()(),A.TgZ(4,"div",21),A.YNc(5,Qi,2,2,"span",22),A.YNc(6,De,2,2,"span",22),A.YNc(7,Rs,3,0,"span",23),A.qZA()()),2&r){const t=A.oxw();A.xp6(3),A.hij("",t.lookupFields[t.selectedFieldId].name," Details"),A.xp6(1),A.Q6J("ngSwitch",t.selectedFieldId),A.xp6(1),A.Q6J("ngSwitchCase",0),A.xp6(1),A.Q6J("ngSwitchCase",1)}}function zs(r,y){1&r&&(A.TgZ(0,"h3"),A._uU(1,"Error! Unable to find details!"),A.qZA())}const Ls=function(r){return{"mt-1":!0,"mt-2":r}};let bs=(()=>{class r{constructor(t,s,z,dA){this.logger=t,this.commonService=s,this.store=z,this.actions=dA,this.lookupKey="",this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Pubkey"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=h.wn1,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(t=>t.type===a.AB.SET_LOOKUP_CLN||t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{if(t.type===a.AB.SET_LOOKUP_CLN){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue="object"!=typeof t.payload[0]?{nodeid:""}:JSON.parse(JSON.stringify(t.payload[0]));break;case 1:this.channelLookupValue="object"!=typeof t.payload[0]?[]:JSON.parse(JSON.stringify(t.payload))}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&"Lookup"===t.payload.action&&(this.flgLoading[0]="error")})}onLookup(){if(!this.lookupKey)return!0;switch(this.flgSetLookupValue=!1,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.selectedFieldId){case 0:this.store.dispatch((0,mt.Sf)({payload:this.lookupKey.trim()}));break;case 1:this.store.dispatch((0,mt.$A)({payload:{uiMessage:a.m6.SEARCHING_CHANNEL,shortChannelID:this.lookupKey.trim(),showError:!1}}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh),A.Y36(C.eX))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-lookups"]],viewQuery:function(t,s){if(1&t&&A.Gf(Er,7),2&t){let z;A.iGM(z=A.CRH())&&(s.form=z.first)}},decls:20,vars:9,consts:[["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"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[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"],["errorBlock",""],[1,"mr-4",3,"value","checked"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[4,"ngIf","ngIfElse"],[3,"lookupResult"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-content",2)(3,"form",3,4)(5,"div",5)(6,"mat-radio-group",6),A.NdJ("ngModelChange",function(dA){return s.selectedFieldId=dA})("change",function(dA){return s.onSelectChange(dA)}),A.YNc(7,ji,2,3,"mat-radio-button",7),A.qZA()(),A.TgZ(8,"mat-form-field",8)(9,"input",9,10),A.NdJ("change",function(){return s.clearLookupValue()})("ngModelChange",function(dA){return s.lookupKey=dA}),A.qZA(),A.YNc(11,Ps,2,1,"mat-error",11),A.qZA(),A.TgZ(12,"div",12)(13,"button",13),A.NdJ("click",function(){return s.resetData()}),A._uU(14,"Clear"),A.qZA(),A.TgZ(15,"button",14),A.NdJ("click",function(){return s.onLookup()}),A._uU(16,"Lookup"),A.qZA()()(),A.YNc(17,wr,8,4,"div",15),A.qZA()()(),A.YNc(18,zs,2,0,"ng-template",null,16,A.W1O)),2&t&&(A.xp6(6),A.Q6J("ngModel",s.selectedFieldId),A.xp6(1),A.Q6J("ngForOf",s.lookupFields),A.xp6(1),A.Q6J("ngClass",A.VKq(7,Ls,s.screenSize===s.screenSizeEnum.XS||s.screenSize===s.screenSizeEnum.SM)),A.xp6(1),A.Q6J("placeholder",(null==s.lookupFields[s.selectedFieldId]?null:s.lookupFields[s.selectedFieldId].placeholder)||"Lookup Key")("ngModel",s.lookupKey),A.xp6(2),A.Q6J("ngIf",!s.lookupKey),A.xp6(6),A.Q6J("ngIf",s.flgSetLookupValue))},directives:[wt.xw,wt.yH,wt.Wh,w.dn,OA._Y,OA.JL,OA.F,HA.VQ,OA.JJ,OA.On,ht.sg,HA.U0,Z.KE,ht.mk,m.oO,H.Nt,OA.Fj,OA.Q7,ht.O5,Z.TO,Q.lW,ht.RF,ht.n9,Ss,Ve,ht.ED],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}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),r})();var Cr=(()=>{return(r=Cr||(Cr={})).KB="KB",r.KW="KW",Cr;var r})();function sr(r,y){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4," Opening "),A.TgZ(5,"mat-icon",5),A._uU(6,"info_outline"),A.qZA()(),A.TgZ(7,"div",6),A._uU(8),A.ALo(9,"number"),A.qZA()(),A.TgZ(10,"div")(11,"h4",4),A._uU(12," Mutual Close "),A.TgZ(13,"mat-icon",7),A._uU(14,"info_outline"),A.qZA()(),A.TgZ(15,"div",6),A._uU(16),A.ALo(17,"number"),A.qZA()(),A.TgZ(18,"div")(19,"h4",4),A._uU(20," Unilateral Close "),A.TgZ(21,"mat-icon",8),A._uU(22,"info_outline"),A.qZA()(),A.TgZ(23,"div",6),A._uU(24),A.ALo(25,"number"),A.qZA()(),A.TgZ(26,"div")(27,"h4",4),A._uU(28," Delayed To Us "),A.TgZ(29,"mat-icon",9),A._uU(30,"info_outline"),A.qZA()(),A.TgZ(31,"div",6),A._uU(32),A.ALo(33,"number"),A.qZA()()(),A.TgZ(34,"div",3)(35,"div")(36,"h4",4),A._uU(37," Minimum Acceptable "),A.TgZ(38,"mat-icon",10),A._uU(39,"info_outline"),A.qZA()(),A.TgZ(40,"div",6),A._uU(41),A.ALo(42,"number"),A.qZA()(),A.TgZ(43,"div")(44,"h4",4),A._uU(45," Maximum Acceptable "),A.TgZ(46,"mat-icon",11),A._uU(47,"info_outline"),A.qZA()(),A.TgZ(48,"div",6),A._uU(49),A.ALo(50,"number"),A.qZA()(),A.TgZ(51,"div")(52,"h4",4),A._uU(53," HTLC Resolution "),A.TgZ(54,"mat-icon",12),A._uU(55,"info_outline"),A.qZA()(),A.TgZ(56,"div",6),A._uU(57),A.ALo(58,"number"),A.qZA()(),A.TgZ(59,"div")(60,"h4",4),A._uU(61," Penalty "),A.TgZ(62,"mat-icon",13),A._uU(63,"info_outline"),A.qZA()(),A.TgZ(64,"div",6),A._uU(65),A.ALo(66,"number"),A.qZA()()()()),2&r){const t=A.oxw();A.xp6(8),A.Oqu(A.lcZ(9,8,null==t.perkbw?null:t.perkbw.opening)),A.xp6(8),A.Oqu(A.lcZ(17,10,null==t.perkbw?null:t.perkbw.mutual_close)),A.xp6(8),A.Oqu(A.lcZ(25,12,null==t.perkbw?null:t.perkbw.unilateral_close)),A.xp6(8),A.Oqu(A.lcZ(33,14,null==t.perkbw?null:t.perkbw.delayed_to_us)),A.xp6(9),A.Oqu(A.lcZ(42,16,null==t.perkbw?null:t.perkbw.min_acceptable)),A.xp6(8),A.Oqu(A.lcZ(50,18,null==t.perkbw?null:t.perkbw.max_acceptable)),A.xp6(8),A.Oqu(A.lcZ(58,20,null==t.perkbw?null:t.perkbw.htlc_resolution)),A.xp6(8),A.Oqu(A.lcZ(66,22,null==t.perkbw?null:t.perkbw.penalty))}}function Da(r,y){if(1&r&&(A.TgZ(0,"div",14)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let Rr=(()=>{class r{constructor(){this.perkbw={}}ngAfterContentChecked(){this.feeRateStyle===Cr.KB?this.perkbw=this.feeRates.perkb:this.feeRateStyle===Cr.KW&&(this.perkbw=this.feeRates.perkw)}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-fee-rates"]],inputs:{feeRateStyle:"feeRateStyle",feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start center",1,"dashboard-info-title"],["matTooltip","Default feerate for fundchannel and withdraw","matTooltipPosition","below",1,"info-icon","info-icon-primary"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Feerate to aim for in cooperative shutdown. Note that since mutual close is a negotiation, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate for commitment_transaction in a live channel which we originally funded","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate for returning unilateral close funds to our wallet","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","The smallest feerate that you can use, usually the minimum relayed feerate of the backend","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate for returning unilateral close HTLC outputs to our wallet","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate to start at when penalizing a cheat attempt","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,sr,67,24,"div",0),A.YNc(1,Da,3,1,"ng-template",null,1,A.W1O)),2&t){const z=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",z)}},directives:[ht.O5,wt.xw,wt.yH,wt.Wh,S.Hw,aA.gM],pipes:[ht.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),r})();function ya(r,y){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4," Opening Channel "),A.TgZ(5,"mat-icon",5),A._uU(6,"info_outline"),A.qZA()(),A.TgZ(7,"div",6),A._uU(8),A.ALo(9,"number"),A.qZA()(),A.TgZ(10,"div")(11,"h4",4),A._uU(12," Mutual Close "),A.TgZ(13,"mat-icon",7),A._uU(14,"info_outline"),A.qZA()(),A.TgZ(15,"div",6),A._uU(16),A.ALo(17,"number"),A.qZA()(),A.TgZ(18,"div")(19,"h4",4),A._uU(20," Unilateral Close "),A.TgZ(21,"mat-icon",8),A._uU(22,"info_outline"),A.qZA()(),A.TgZ(23,"div",6),A._uU(24),A.ALo(25,"number"),A.qZA()(),A.TgZ(26,"div",9),A._UZ(27,"h4",4)(28,"div",6),A.qZA()(),A.TgZ(29,"div",3)(30,"div")(31,"h4",4),A._uU(32," HTLC Timeout "),A.TgZ(33,"mat-icon",10),A._uU(34,"info_outline"),A.qZA()(),A.TgZ(35,"div",6),A._uU(36),A.ALo(37,"number"),A.qZA()(),A.TgZ(38,"div")(39,"h4",4),A._uU(40," HTLC Success "),A.TgZ(41,"mat-icon",11),A._uU(42,"info_outline"),A.qZA()(),A.TgZ(43,"div",6),A._uU(44),A.ALo(45,"number"),A.qZA()(),A.TgZ(46,"div",9),A._UZ(47,"h4",4)(48,"div",6),A.qZA(),A.TgZ(49,"div",9),A._UZ(50,"h4",4)(51,"div",6),A.qZA()()()),2&r){const t=A.oxw();A.xp6(8),A.Oqu(A.lcZ(9,5,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.opening_channel_satoshis)),A.xp6(8),A.Oqu(A.lcZ(17,7,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.mutual_close_satoshis)),A.xp6(8),A.Oqu(A.lcZ(25,9,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.unilateral_close_satoshis)),A.xp6(12),A.Oqu(A.lcZ(37,11,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_timeout_satoshis)),A.xp6(8),A.Oqu(A.lcZ(45,13,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_success_satoshis))}}function Gs(r,y){if(1&r&&(A.TgZ(0,"div",12)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let Mi=(()=>{class r{constructor(){}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-onchain-fee-estimates"]],inputs:{feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start center",1,"dashboard-info-title"],["matTooltip","Estimated cost of typical channel open","matTooltipPosition","below",1,"info-icon","info-icon-primary"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Estimated cost of typical channel close","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Estimated cost of typical unilateral close (without HTLCs)","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["fxFlex","12"],["matTooltip","Estimated cost of typical HTLC timeout transaction","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Estimated cost of typical HTLC fulfillment transaction","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,ya,52,15,"div",0),A.YNc(1,Gs,3,1,"ng-template",null,1,A.W1O)),2&t){const z=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",z)}},directives:[ht.O5,wt.xw,wt.yH,wt.Wh,S.Hw,aA.gM],pipes:[ht.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),r})();function pi(r,y){1&r&&A._UZ(0,"mat-progress-bar",19)}function vr(r,y){if(1&r&&A._UZ(0,"rtl-cln-node-info",20),2&r){const t=A.oxw(3);A.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Hs(r,y){if(1&r&&A._UZ(0,"rtl-cln-channel-status-info",21),2&r){const t=A.oxw(3);A.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function Ii(r,y){if(1&r&&A._UZ(0,"rtl-cln-fee-info",22),2&r){const t=A.oxw(3);A.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function Vr(r,y){if(1&r&&A._UZ(0,"rtl-cln-fee-rates",23),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function Js(r,y){if(1&r&&A._UZ(0,"rtl-cln-fee-rates",23),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[6])}}function Os(r,y){if(1&r&&A._UZ(0,"rtl-cln-onchain-fee-estimates",24),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}const xa=function(r){return{"dashboard-card-content":!0,"error-border":r}};function Fa(r,y){if(1&r&&(A.TgZ(0,"mat-grid-tile",4)(1,"div",5)(2,"div",6)(3,"div",7),A._UZ(4,"fa-icon",8),A.TgZ(5,"span"),A._uU(6),A.qZA()()(),A.TgZ(7,"div",9)(8,"mat-card",10)(9,"mat-card-content",11),A.YNc(10,pi,1,0,"mat-progress-bar",12),A.TgZ(11,"div",13),A.YNc(12,vr,1,2,"rtl-cln-node-info",14),A.YNc(13,Hs,1,2,"rtl-cln-channel-status-info",15),A.YNc(14,Ii,1,2,"rtl-cln-fee-info",16),A.YNc(15,Vr,1,3,"rtl-cln-fee-rates",17),A.YNc(16,Js,1,3,"rtl-cln-fee-rates",17),A.YNc(17,Os,1,2,"rtl-cln-onchain-fee-estimates",18),A.qZA()()()()()()),2&r){const t=y.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(4),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(3),A.Q6J("ngClass",A.VKq(13,xa,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR)),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","status"),A.xp6(1),A.Q6J("ngSwitchCase","fee"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKB"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKW"),A.xp6(1),A.Q6J("ngSwitchCase","onChainFeeEstimates")}}function ks(r,y){if(1&r&&(A.TgZ(0,"mat-grid-list",2),A.YNc(1,Fa,18,15,"mat-grid-tile",3),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngForOf",t.nodeCardsOperator)}}function js(r,y){1&r&&A._UZ(0,"mat-progress-bar",19)}function Ks(r,y){if(1&r&&A._UZ(0,"rtl-cln-node-info",20),2&r){const t=A.oxw(3);A.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Vs(r,y){if(1&r&&A._UZ(0,"rtl-cln-channel-status-info",21),2&r){const t=A.oxw(3);A.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function Ws(r,y){if(1&r&&A._UZ(0,"rtl-cln-fee-info",22),2&r){const t=A.oxw(3);A.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function Zs(r,y){if(1&r&&A._UZ(0,"rtl-cln-fee-rates",23),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function Xs(r,y){if(1&r&&A._UZ(0,"rtl-cln-fee-rates",23),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[5])}}function qs(r,y){if(1&r&&A._UZ(0,"rtl-cln-onchain-fee-estimates",24),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}function _s(r,y){if(1&r&&(A.TgZ(0,"mat-grid-tile",4)(1,"div",5)(2,"div",6)(3,"div",25),A._UZ(4,"fa-icon",8),A.TgZ(5,"span"),A._uU(6),A.qZA()()(),A.TgZ(7,"div",9)(8,"mat-card",10)(9,"mat-card-content",11),A.YNc(10,js,1,0,"mat-progress-bar",12),A.TgZ(11,"div",13),A.YNc(12,Ks,1,2,"rtl-cln-node-info",14),A.YNc(13,Vs,1,2,"rtl-cln-channel-status-info",15),A.YNc(14,Ws,1,2,"rtl-cln-fee-info",16),A.YNc(15,Zs,1,3,"rtl-cln-fee-rates",17),A.YNc(16,Xs,1,3,"rtl-cln-fee-rates",17),A.YNc(17,qs,1,2,"rtl-cln-onchain-fee-estimates",18),A.qZA()()()()()()),2&r){const t=y.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(4),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(3),A.Q6J("ngClass",A.VKq(13,xa,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR)),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","status"),A.xp6(1),A.Q6J("ngSwitchCase","fee"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKB"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKW"),A.xp6(1),A.Q6J("ngSwitchCase","onChainFeeEstimates")}}function $s(r,y){if(1&r&&(A.TgZ(0,"mat-grid-list",2),A.YNc(1,_s,18,15,"mat-grid-tile",3),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngForOf",t.nodeCardsMerchant)}}let A0=(()=>{class r{constructor(t,s,z){this.logger=t,this.commonService=s,this.store=z,this.faBolt=h.BDt,this.faServer=h.xf3,this.faNetworkWired=h.kXW,this.faLink=h.nNP,this.selNode={},this.information={},this.channelsStatus={active:{},pending:{},inactive:{}},this.feeRatesPerKB={},this.feeRatesPerKW={},this.nodeCardsOperator=[],this.nodeCardsMerchant=[],this.screenSize="",this.screenSizeEnum=a.cu,this.userPersonaEnum=a.ol,this.errorMessages=["","","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFees=null,this.apiCallStatusFHistory=null,this.apiCallStatusPerKB=null,this.apiCallStatusPerKW=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:6,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:6,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:6,rows:1},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}]):(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:2,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:2,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:2,rows:3},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}])}ngOnInit(){this.store.select(g.Hz).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusNodeInfo.status===a.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.selNode=t.nodeSettings,this.information=t.information,this.logger.info(t)}),this.store.select(g.ZW).pipe((0,i.R)(this.unSubs[1]),(0,o.M)(this.store.select(g.Wj))).subscribe(([t,s])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusLRBal=t.apiCallStatus,this.apiCallStatusChannels=s.apiCallStatus,this.apiCallStatusLRBal.status===a.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message),this.apiCallStatusChannels.status===a.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.channelsStatus.active.capacity=s.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=s.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=s.localRemoteBalance.inactiveBalance||0}),this.store.select(g.JG).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===a.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees}),this.store.select(g.Bo).pipe((0,i.R)(this.unSubs[3])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusFHistory=t.apiCallStatus,this.apiCallStatusFHistory.status===a.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message),t.forwardingHistory&&t.forwardingHistory.listForwards.length&&(this.fees.totalTxCount=t.forwardingHistory.listForwards.length)}),this.store.select(g.zm).pipe((0,i.R)(this.unSubs[4])).subscribe(t=>{this.errorMessages[5]="",this.apiCallStatusPerKB=t.apiCallStatus,this.apiCallStatusPerKB.status===a.Bn.ERROR&&(this.errorMessages[5]="object"==typeof this.apiCallStatusPerKB.message?JSON.stringify(this.apiCallStatusPerKB.message):this.apiCallStatusPerKB.message),this.feeRatesPerKB=t.feeRatesPerKB}),this.store.select(g.hx).pipe((0,i.R)(this.unSubs[5])).subscribe(t=>{this.errorMessages[6]="",this.apiCallStatusPerKW=t.apiCallStatus,this.apiCallStatusPerKW.status===a.Bn.ERROR&&(this.errorMessages[6]="object"==typeof this.apiCallStatusPerKW.message?JSON.stringify(this.apiCallStatusPerKW.message):this.apiCallStatusPerKW.message),this.feeRatesPerKW=t.feeRatesPerKW})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-network-info"]],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch",1,"mb-4"],["cols","6","rowHeight","100px",4,"ngIf"],["cols","6","rowHeight","100px"],["class","node-grid-tile",3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"node-grid-tile",3,"colspan","rowspan"],["fxLayout","column","fxLayoutAlign","stretch start","fxFlex","100",1,"h-100"],["fxLayout","row","fxLayoutAlign","start start",1,"w-100"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-2"],[1,"mr-1",3,"icon"],["fxLayout","column","fxLayoutAlign","stretch center","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","center stretch",1,"w-100","h-93"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","w-96","h-93"],["fxLayout","column","fxFlex","100",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","feeRateStyle","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","errorMessage",4,"ngSwitchCase"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],[1,"h-100",3,"feeRates","feeRateStyle","errorMessage"],[1,"h-100",3,"feeRates","errorMessage"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-15px"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,ks,2,1,"mat-grid-list",1),A.YNc(2,$s,2,1,"mat-grid-list",1),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",s.selNode.userPersona===s.userPersonaEnum.OPERATOR),A.xp6(1),A.Q6J("ngIf",s.selNode.userPersona===s.userPersonaEnum.MERCHANT))},directives:[wt.xw,wt.Wh,ht.O5,B.Il,ht.sg,B.DX,wt.yH,f.BN,w.a8,w.dn,ht.mk,m.oO,Y.pW,ht.RF,ht.n9,T,J,bA,Rr,Mi],styles:[""]}),r})();function mi(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",8),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=y.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let Ki=(()=>{class r{constructor(t){this.router=t,this.faUserCheck=h.hkK,this.links=[{link:"sign",name:"Sign"},{link:"verify",name:"Verify"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const z=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=z?z.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-sign-verify-message"]],decls:11,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Sign/Verify Message"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),A.YNc(8,mi,2,3,"div",6),A.qZA(),A.TgZ(9,"div",7),A._UZ(10,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faUserCheck),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[wt.xw,wt.Wh,f.BN,w.a8,w.dn,JA.BU,ht.sg,JA.Nj,qt.rH,wt.yH,qt.lC],styles:[""]}),r})();var vi=Nt(9122);function Ya(r,y){if(1&r&&(A.TgZ(0,"mat-option",7),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t),A.xp6(1),A.hij(" ",t.addressTp," ")}}let t0=(()=>{class r{constructor(t,s){this.store=t,this.clnEffects=s,this.addressTypes=a._t,this.selectedAddressType=a._t[0],this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,mt._E)({payload:this.selectedAddressType})),this.clnEffects.setNewAddressCL.pipe((0,PA.q)(1)).subscribe(t=>{this.newAddress=t,setTimeout(()=>{this.store.dispatch((0,KA.qR)({payload:{data:{address:this.newAddress,addressType:this.selectedAddressType.addressTp,component:vi.n}}}))},0)})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(qe.J))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain-receive"]],decls:8,vars:2,consts:[["fxLayout","column",1,"padding-gap-x"],["fxLayout","row","fxLayoutAlign","space-between end","fxLayoutAlign.gt-sm","start end"],["fxFlex","48","fxFlex.gt-md","25","fxLayoutAlign","start end",1,"mr-2"],["placeholder","Address Type","name","address_type","tabindex","1",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"mt-2"],["mat-flat-button","","color","primary","tabindex","2",1,"top-minus-15px",3,"click"],[3,"value"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-select",3),A.NdJ("ngModelChange",function(dA){return s.selectedAddressType=dA}),A.YNc(4,Ya,2,2,"mat-option",4),A.qZA()(),A.TgZ(5,"div",5)(6,"button",6),A.NdJ("click",function(){return s.onGenerateAddress()}),A._uU(7,"Generate Address"),A.qZA()()()()),2&t&&(A.xp6(3),A.Q6J("ngModel",s.selectedAddressType),A.xp6(1),A.Q6J("ngForOf",s.addressTypes))},directives:[wt.xw,wt.Wh,Z.KE,wt.yH,CA.gD,OA.JJ,OA.On,ht.sg,wA.ey,Q.lW],styles:[""]}),r})(),Wr=(()=>{class r{constructor(t,s){this.store=t,this.activatedRoute=s,this.sweepAll=!1,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.activatedRoute.data.pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.sweepAll=t.sweepAll})}openSendFundsModal(){this.store.dispatch((0,KA.qR)({payload:{data:{sweepAll:this.sweepAll,component:Bi}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(qt.gz))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"button",2),A.NdJ("click",function(){return s.openSendFundsModal()}),A._uU(3),A.qZA()()()),2&t&&(A.xp6(3),A.Oqu(s.sweepAll?"Sweep All":"Send Funds"))},directives:[wt.xw,wt.yH,wt.Wh,Q.lW],styles:[""]}),r})();var Rn=Nt(8675),Ar=Nt(4004),Di=Nt(1079),yi=Nt(9843);const Vi=["form"];function e0(r,y){if(1&r&&(A.TgZ(0,"mat-option",42),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(t.alias?t.alias:t.id?t.id:"")}}function Zr(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Peer alias is required."),A.qZA())}function Ta(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Peer not found in the list."),A.qZA())}function n0(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",39),A.NdJ("change",function(){return A.CHM(t),A.oxw().onSelectedPeerChanged()}),A.qZA(),A.TgZ(2,"mat-autocomplete",40,41),A.NdJ("optionSelected",function(){return A.CHM(t),A.oxw().onSelectedPeerChanged()}),A.YNc(4,e0,2,2,"mat-option",26),A.ALo(5,"async"),A.qZA(),A.YNc(6,Zr,2,0,"mat-error",17),A.YNc(7,Ta,2,0,"mat-error",17),A.qZA()}if(2&r){const t=A.MAs(3),s=A.oxw();A.xp6(1),A.Q6J("formControl",s.selectedPeer)("matAutocomplete",t),A.xp6(1),A.Q6J("displayWith",s.displayFn),A.xp6(2),A.Q6J("ngForOf",A.lcZ(5,6,s.filteredPeers)),A.xp6(2),A.Q6J("ngIf",null==s.selectedPeer.errors?null:s.selectedPeer.errors.required),A.xp6(1),A.Q6J("ngIf",null==s.selectedPeer.errors?null:s.selectedPeer.errors.notfound)}}function r0(r,y){1&r&&A.GkF(0)}function i0(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount is required."),A.qZA())}function a0(r,y){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function o0(r,y){if(1&r&&(A.TgZ(0,"mat-option",42),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function s0(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function l0(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",43)(1,"input",44,45),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().customFeeRate=z}),A.qZA(),A.YNc(3,s0,2,0,"mat-error",17),A.qZA()}if(2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),A.xp6(2),A.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function c0(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function g0(r,y){if(1&r&&(A.TgZ(0,"mat-option",42),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t),A.xp6(1),A.hij("",A.lcZ(2,2,t.value)," Sats")}}function B0(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",22)(1,"mat-form-field",46)(2,"mat-select",47),A.NdJ("selectionChange",function(z){return A.CHM(t),A.oxw().onUTXOSelectionChange(z)})("valueChange",function(z){return A.CHM(t),A.oxw().selUTXOs=z}),A.TgZ(3,"mat-select-trigger"),A._uU(4),A.ALo(5,"number"),A.qZA(),A.YNc(6,g0,3,4,"mat-option",26),A.qZA()(),A.TgZ(7,"div",28)(8,"mat-slide-toggle",48),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().flgUseAllBalance=z})("change",function(){return A.CHM(t),A.oxw().onUTXOAllBalanceChange()}),A._uU(9," Use selected UTXOs balance "),A.qZA(),A.TgZ(10,"mat-icon",49),A._uU(11,"info_outline"),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(2),A.Q6J("value",t.selUTXOs),A.xp6(2),A.AsE("",A.lcZ(5,6,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),A.xp6(2),A.Q6J("ngForOf",t.utxos),A.xp6(2),A.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function u0(r,y){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.channelConnectionError)}}function f0(r,y){if(1&r&&(A.TgZ(0,"div",50),A._UZ(1,"fa-icon",51),A.YNc(2,u0,2,1,"span",17),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.channelConnectionError)}}function h0(r,y){if(1&r&&(A.TgZ(0,"mat-expansion-panel",53)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),A._uU(4,"Peer: \xa0"),A.qZA(),A.TgZ(5,"strong",54),A._uU(6),A.qZA()()(),A.TgZ(7,"div",9)(8,"div",0)(9,"div",1)(10,"h4",55),A._uU(11,"Pubkey"),A.qZA(),A.TgZ(12,"span",56),A._uU(13),A.qZA()()(),A._UZ(14,"mat-divider",57),A.TgZ(15,"div",0)(16,"div",58)(17,"h4",55),A._uU(18,"Address"),A.qZA(),A.TgZ(19,"span",59),A._uU(20),A.qZA()(),A.TgZ(21,"div",58)(22,"h4",55),A._uU(23,"Connected"),A.qZA(),A.TgZ(24,"span",59),A._uU(25),A.qZA()()()()()),2&r){const t=A.oxw(2);A.xp6(6),A.Oqu((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.id)),A.xp6(7),A.Oqu(t.peer.id),A.xp6(7),A.Oqu(null==t.peer?null:t.peer.netaddr),A.xp6(5),A.Oqu(t.peer.connected?"True":"False")}}function xi(r,y){if(1&r&&A.YNc(0,h0,26,4,"mat-expansion-panel",52),2&r){const t=A.oxw();A.Q6J("ngIf",t.peer)}}const Ie=function(r,y){return{"mr-6":r,"mr-2":y}};let ee=(()=>{class r{constructor(t,s,z,dA,st,Ae){this.dialogRef=t,this.data=s,this.store=z,this.actions=dA,this.decimalPipe=st,this.commonService=Ae,this.selectedPeer=new OA.NI,this.faExclamationTriangle=h.eHv,this.isCompatibleVersion=!1,this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=0,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.fundingAmount=null,this.selectedPubkey="",this.isPrivate=!1,this.feeRateTypes=a.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.isCompatibleVersion=this.data.message.isCompatibleVersion,this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.utxos=this.data.message.utxos,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(z=>z.type===a.AB.UPDATE_API_CALL_STATUS_CLN||z.type===a.AB.FETCH_CHANNELS_CLN)).subscribe(z=>{z.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&z.payload.status===a.Bn.ERROR&&"SaveNewChannel"===z.payload.action&&(this.channelConnectionError=z.payload.message),z.type===a.AB.FETCH_CHANNELS_CLN&&this.dialogRef.close()});let t="",s="";this.sortedPeers=this.peers.sort((z,dA)=>(t=z.alias?z.alias.toLowerCase():z.id?z.id.toLowerCase():"",s=dA.alias?dA.alias.toLowerCase():z.id.toLowerCase(),ts?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,i.R)(this.unSubs[1]),(0,Rn.O)(""),(0,Ar.U)(z=>"string"==typeof z?z:z.alias?z.alias:z.id),(0,Ar.U)(z=>z?this.filterPeers(z):this.sortedPeers.slice()))}filterPeers(t){return this.sortedPeers.filter(s=>0===s.alias.toLowerCase().indexOf(t?t.toLowerCase():""))}displayFn(t){return t&&t.alias?t.alias:t&&t.id?t.id:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.id?this.selectedPeer.value.id:null,"string"==typeof this.selectedPeer.value){const t=this.peers.filter(s=>s.alias.length===this.selectedPeer.value.length&&0===s.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===t.length&&t[0].id&&(this.selectedPubkey=t[0].id)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.flgMinConf=!1,this.selFeeRate="",this.minConfValue=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(t){t&&(this.flgMinConf||this.selFeeRate||this.selUTXOs.length&&0!==this.selUTXOs.length)?(this.advancedTitle="Advanced Options",this.flgMinConf&&(this.advancedTitle=this.advancedTitle+" | Min Confirmation Blocks: "+this.minConfValue),this.selFeeRate&&(this.advancedTitle=this.advancedTitle+" | Fee Rate: "+(this.customFeeRate?this.customFeeRate+" (Sats/vByte)":this.feeRateTypes.find(s=>s.feeRateId===this.selFeeRate).feeRateType)),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.advancedTitle=this.advancedTitle+" | Total Selected: "+this.selUTXOs.length+" | Selected UTXOs: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats")):this.advancedTitle="Advanced Options"}onUTXOSelectionChange(t){const s={value:0};this.selUTXOs.length&&this.selUTXOs.length>0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((z,dA)=>(s.value=z.value+dA.value,s)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=0,this.fundingAmount=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.fundingAmount=this.flgUseAllBalance?this.totalSelectedUTXOAmount:null}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||this.flgMinConf&&!this.minConfValue||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;const t={peerId:this.peer&&this.peer.id?this.peer.id:this.selectedPubkey,satoshis:this.flgUseAllBalance?"all":this.fundingAmount.toString(),announce:!this.isPrivate,minconf:this.flgMinConf?this.minConfValue:null};t.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,this.selUTXOs.length&&this.selUTXOs.length>0&&(t.utxos=[],this.selUTXOs.forEach(s=>t.utxos.push(s.txid+":"+s.output))),this.store.dispatch((0,mt.YX)({payload:t}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(dt.so),A.Y36(dt.WI),A.Y36(u.yh),A.Y36(C.eX),A.Y36(ht.JJ),A.Y36(e.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-open-channel"]],viewQuery:function(t,s){if(1&t&&A.Gf(Vi,7),2&t){let z;A.iGM(z=A.CRH())&&(s.form=z.first)}},decls:56,vars:34,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","70","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amount",3,"ngModel","step","min","max","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","25","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","54","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","42","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",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","7","type","reset",1,"mr-1"],["autoFocus","","mat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxFlex","54","fxLayoutAlign","start end"],["tabindex","6","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["tabindex","7","color","primary","name","flgUseAllBalance",3,"ngModel","disabled","ngModelChange","change"],["matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","before",1,"info-icon"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8),A.NdJ("submit",function(){return s.onOpenChannel()})("reset",function(){return s.resetData()}),A.TgZ(11,"div",9),A.YNc(12,n0,8,8,"mat-form-field",10),A.qZA(),A.YNc(13,r0,1,0,"ng-container",11),A.TgZ(14,"div",9)(15,"div",12)(16,"mat-form-field",13)(17,"input",14,15),A.NdJ("ngModelChange",function(dA){return s.fundingAmount=dA}),A.qZA(),A.TgZ(19,"mat-hint"),A._uU(20),A.ALo(21,"number"),A.qZA(),A.TgZ(22,"span",16),A._uU(23," Sats "),A.qZA(),A.YNc(24,i0,2,0,"mat-error",17),A.YNc(25,a0,2,1,"mat-error",17),A.qZA(),A.TgZ(26,"div",18)(27,"mat-slide-toggle",19),A.NdJ("ngModelChange",function(dA){return s.isPrivate=dA}),A._uU(28,"Private Channel"),A.qZA()()(),A.TgZ(29,"mat-expansion-panel",20),A.NdJ("closed",function(){return s.onAdvancedPanelToggle(!0)})("opened",function(){return s.onAdvancedPanelToggle(!1)}),A.TgZ(30,"mat-expansion-panel-header")(31,"mat-panel-title")(32,"span"),A._uU(33),A.qZA()()(),A.TgZ(34,"div",21)(35,"div",22)(36,"div",23)(37,"mat-form-field",24)(38,"mat-select",25),A.NdJ("valueChange",function(dA){return s.selFeeRate=dA})("selectionChange",function(){return s.customFeeRate=null}),A.YNc(39,o0,2,2,"mat-option",26),A.qZA()(),A.YNc(40,l0,4,5,"mat-form-field",27),A.qZA(),A.TgZ(41,"div",28)(42,"mat-checkbox",29),A.NdJ("ngModelChange",function(dA){return s.flgMinConf=dA})("change",function(){return s.flgMinConf?s.selFeeRate=null:s.minConfValue=null}),A.qZA(),A.TgZ(43,"mat-form-field",30)(44,"input",31,32),A.NdJ("ngModelChange",function(dA){return s.minConfValue=dA}),A.qZA(),A.YNc(46,c0,2,0,"mat-error",17),A.qZA()()(),A.YNc(47,B0,12,8,"div",33),A.qZA()()(),A.YNc(48,f0,3,2,"div",34),A.TgZ(49,"div",35)(50,"button",36),A._uU(51,"Clear Fields"),A.qZA(),A.TgZ(52,"button",37),A._uU(53,"Open Channel"),A.qZA()()()()()(),A.YNc(54,xi,1,1,"ng-template",null,38,A.W1O)),2&t){const z=A.MAs(18),dA=A.MAs(55);A.xp6(5),A.Oqu(s.alertTitle),A.xp6(7),A.Q6J("ngIf",!s.peer&&s.peers&&s.peers.length>0),A.xp6(1),A.Q6J("ngTemplateOutlet",dA),A.xp6(4),A.Q6J("ngModel",s.fundingAmount)("step",1e3)("min",1)("max",s.totalBalance)("disabled",s.flgUseAllBalance),A.xp6(3),A.AsE("Remaining Bal: ",A.lcZ(21,29,s.totalBalance-(s.fundingAmount?s.fundingAmount:0)),"",s.flgUseAllBalance?". Amount replaced by UTXO balance":"",""),A.xp6(4),A.Q6J("ngIf",(null==z.errors?null:z.errors.required)||!s.fundingAmount),A.xp6(1),A.Q6J("ngIf",null==z.errors?null:z.errors.max),A.xp6(2),A.Q6J("ngModel",s.isPrivate),A.xp6(6),A.Oqu(s.advancedTitle),A.xp6(4),A.Q6J("fxFlex","customperkb"!==s.selFeeRate||s.flgMinConf?"100":"48"),A.xp6(1),A.Q6J("value",s.selFeeRate)("disabled",s.flgMinConf),A.xp6(1),A.Q6J("ngForOf",s.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===s.selFeeRate&&!s.flgMinConf),A.xp6(2),A.Q6J("ngModel",s.flgMinConf)("ngClass",A.WLB(31,Ie,s.screenSize===s.screenSizeEnum.XS||s.screenSize===s.screenSizeEnum.SM,s.screenSize===s.screenSizeEnum.MD||s.screenSize===s.screenSizeEnum.LG||s.screenSize===s.screenSizeEnum.XL)),A.xp6(2),A.Q6J("ngModel",s.minConfValue)("step",1)("min",0)("required",s.flgMinConf)("disabled",!s.flgMinConf),A.xp6(2),A.Q6J("ngIf",s.flgMinConf&&!s.minConfValue),A.xp6(1),A.Q6J("ngIf",s.isCompatibleVersion),A.xp6(1),A.Q6J("ngIf",""!==s.channelConnectionError)}},directives:[wt.xw,wt.yH,w.dk,wt.Wh,Q.lW,w.dn,OA._Y,OA.JL,OA.F,ht.O5,Z.KE,H.Nt,OA.Fj,Di.ZL,OA.Q7,OA.JJ,OA.oH,Di.XC,ht.sg,wA.ey,Z.TO,ht.tP,OA.wV,OA.qQ,OA.Fd,b.q,yi.F,OA.On,Z.bx,Z.R9,RA.Rr,or.ib,or.yz,or.yK,CA.gD,$A.oG,ht.mk,m.oO,CA.$L,S.Hw,aA.gM,f.BN,k.h,AA.d],pipes:[ht.Ov,ht.JJ],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),r})();function E0(r,y){if(1&r&&(A.TgZ(0,"span",7),A._uU(1,"Open"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.openChannels)}}function Sa(r,y){if(1&r&&(A.TgZ(0,"span",7),A._uU(1,"Pending/Inactive"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.pendingChannels)}}let Xr=(()=>{class r{constructor(t,s,z,dA){this.logger=t,this.store=s,this.commonService=z,this.router=dA,this.openChannels=0,this.pendingChannels=0,this.selNode={},this.information={},this.peers=[],this.utxos=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending/Inactive"}],this.activeLink=0,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(t=>t instanceof qt.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(s=>s.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(g.OL).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.selNode=t.nodeSettings,this.information=t.information,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(g.Wi).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.peers=t.peers}),this.store.select(g.T4).pipe((0,i.R)(this.unSubs[3])).subscribe(t=>{this.utxos=this.commonService.sortAscByKey(t.utxos.filter(s=>"confirmed"===s.status),"value")}),this.store.select(g.ZW).pipe((0,i.R)(this.unSubs[4])).subscribe(t=>{this.openChannels=t.activeChannels.length||0,this.pendingChannels=t.pendingChannels.length+t.inactiveChannels.length||0,this.logger.info(t)})}onOpenChannel(){const t={peers:this.peers,information:this.information,balance:this.totalBalance,utxos:this.utxos,isCompatibleVersion:this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")};this.store.dispatch((0,KA.qR)({payload:{data:{alertTitle:"Open Channel",message:t,component:ee}}}))}onSelectedTabChange(t){this.router.navigateByUrl("/cln/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(e.v),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channels-tables"]],decls:12,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"button",2),A.NdJ("click",function(){return s.onOpenChannel()}),A._uU(3,"Open Channel"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-tab-group",4),A.NdJ("selectedIndexChange",function(dA){return s.activeLink=dA})("selectedTabChange",function(dA){return s.onSelectedTabChange(dA)}),A.TgZ(6,"mat-tab"),A.YNc(7,E0,2,1,"ng-template",5),A.qZA(),A.TgZ(8,"mat-tab"),A.YNc(9,Sa,2,1,"ng-template",5),A.qZA()(),A.TgZ(10,"div",6),A._UZ(11,"router-outlet"),A.qZA()()()),2&t&&(A.xp6(5),A.Q6J("selectedIndex",s.activeLink))},directives:[wt.xw,wt.yH,wt.Wh,Q.lW,JA.SP,JA.uX,JA.uD,ui.k,qt.lC],styles:[""]}),r})();function Na(r,y){if(1&r&&(A.TgZ(0,"div")(1,"div",9)(2,"div",1)(3,"h4",11),A._uU(4,"Funding Transaction Id"),A.qZA(),A.TgZ(5,"span",12),A._uU(6),A.qZA()()(),A._UZ(7,"mat-divider",13),A.qZA()),2&r){const t=A.oxw();A.xp6(6),A.Oqu(t.channel.funding_txid),A.xp6(1),A.Q6J("inset",!0)}}function w0(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Show Advanced"),A.qZA())}function C0(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Hide Advanced"),A.qZA())}function Ua(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"button",23),A.NdJ("copied",function(z){return A.CHM(t),A.oxw().onCopyChanID(z)}),A._uU(1,"Copy Short Channel ID"),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("payload",t.channel.short_channel_id)}}function Q0(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"button",24),A.NdJ("click",function(){return A.CHM(t),A.oxw().onClose()}),A._uU(1,"OK"),A.qZA()}}const hn=function(r){return{"xs-scroll-y":r}},Wi=function(r,y){return{"mt-2":r,"mt-1":y}};let Zi=(()=>{class r{constructor(t,s,z,dA,st){this.dialogRef=t,this.data=s,this.logger=z,this.commonService=dA,this.snackBar=st,this.faReceipt=h.dLy,this.showAdvanced=!1,this.showCopy=!0,this.showCopyField=null,this.screenSize="",this.screenSizeEnum=a.cu}ngOnInit(){this.channel=this.data.channel,this.showCopy=this.data.showCopy,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("Short channel ID "+t+" copied."),this.logger.info("Copied Text: "+t)}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(dt.so),A.Y36(dt.WI),A.Y36(E.mQ),A.Y36(e.v),A.Y36(Sr.ux))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-information"]],decls:94,vars:40,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","25"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3),A._UZ(4,"fa-icon",4),A.TgZ(5,"span",5),A._uU(6,"Channel Information"),A.qZA()(),A.TgZ(7,"button",6),A.NdJ("click",function(){return s.onClose()}),A._uU(8,"X"),A.qZA()(),A.TgZ(9,"mat-card-content",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h4",11),A._uU(14,"Short Channel ID"),A.qZA(),A.TgZ(15,"span",12),A._uU(16),A.qZA()(),A.TgZ(17,"div",10)(18,"h4",11),A._uU(19,"Peer Alias"),A.qZA(),A.TgZ(20,"span",12),A._uU(21),A.qZA()()(),A._UZ(22,"mat-divider",13),A.TgZ(23,"div",9)(24,"div",1)(25,"h4",11),A._uU(26,"Channel ID"),A.qZA(),A.TgZ(27,"span",12),A._uU(28),A.qZA()()(),A._UZ(29,"mat-divider",13),A.TgZ(30,"div",9)(31,"div",1)(32,"h4",11),A._uU(33,"Peer Public Key"),A.qZA(),A.TgZ(34,"span",12),A._uU(35),A.qZA()()(),A._UZ(36,"mat-divider",13),A.TgZ(37,"div",9)(38,"div",14)(39,"h4",11),A._uU(40,"mSatoshi to Us"),A.qZA(),A.TgZ(41,"span",15),A._uU(42),A.ALo(43,"number"),A.qZA()(),A.TgZ(44,"div",14)(45,"h4",11),A._uU(46,"Spendable (mSats)"),A.qZA(),A.TgZ(47,"span",15),A._uU(48),A.ALo(49,"number"),A.qZA()(),A.TgZ(50,"div",14)(51,"h4",11),A._uU(52,"Total (mSats)"),A.qZA(),A.TgZ(53,"span",15),A._uU(54),A.ALo(55,"number"),A.qZA()(),A.TgZ(56,"div",14)(57,"h4",11),A._uU(58,"State"),A.qZA(),A.TgZ(59,"span",15),A._uU(60),A.qZA()()(),A._UZ(61,"mat-divider",13),A.TgZ(62,"div",9)(63,"div",14)(64,"h4",11),A._uU(65,"Our Reserve (Sats)"),A.qZA(),A.TgZ(66,"span",15),A._uU(67),A.ALo(68,"number"),A.qZA()(),A.TgZ(69,"div",14)(70,"h4",11),A._uU(71,"Their Reserve (Sats)"),A.qZA(),A.TgZ(72,"span",15),A._uU(73),A.ALo(74,"number"),A.qZA()(),A.TgZ(75,"div",14)(76,"h4",11),A._uU(77,"Connected"),A.qZA(),A.TgZ(78,"span",15),A._uU(79),A.qZA()(),A.TgZ(80,"div",14)(81,"h4",11),A._uU(82,"Private"),A.qZA(),A.TgZ(83,"span",15),A._uU(84),A.qZA()()(),A._UZ(85,"mat-divider",13),A.YNc(86,Na,8,2,"div",16),A.TgZ(87,"div",17)(88,"button",18),A.NdJ("click",function(){return s.onShowAdvanced()}),A.YNc(89,w0,2,0,"p",19),A.YNc(90,C0,2,0,"ng-template",null,20,A.W1O),A.qZA(),A.YNc(92,Ua,2,1,"button",21),A.YNc(93,Q0,2,0,"button",22),A.qZA()()()()()),2&t){const z=A.MAs(91);A.xp6(4),A.Q6J("icon",s.faReceipt),A.xp6(5),A.Q6J("ngClass",A.VKq(35,hn,s.screenSize===s.screenSizeEnum.XS)),A.xp6(7),A.Oqu(s.channel.short_channel_id),A.xp6(5),A.Oqu(s.channel.alias),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(s.channel.channel_id),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(s.channel.id),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(A.lcZ(43,25,s.channel.msatoshi_to_us)),A.xp6(6),A.Oqu(A.lcZ(49,27,s.channel.spendable_msatoshi)),A.xp6(6),A.Oqu(A.lcZ(55,29,s.channel.msatoshi_total)),A.xp6(6),A.Oqu(s.channel.state),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(A.lcZ(68,31,s.channel.our_channel_reserve_satoshis)),A.xp6(6),A.Oqu(A.lcZ(74,33,s.channel.their_channel_reserve_satoshis)),A.xp6(6),A.Oqu(s.channel.connected?"Yes":"No"),A.xp6(5),A.Oqu(s.channel.private?"Yes":"No"),A.xp6(1),A.Q6J("inset",!0),A.xp6(1),A.Q6J("ngIf",s.showAdvanced),A.xp6(1),A.Q6J("ngClass",A.WLB(37,Wi,!s.showAdvanced,s.showAdvanced)),A.xp6(2),A.Q6J("ngIf",!s.showAdvanced)("ngIfElse",z),A.xp6(3),A.Q6J("ngIf",s.showCopy),A.xp6(1),A.Q6J("ngIf",!s.showCopy)}},directives:[wt.xw,wt.Wh,wt.yH,w.dk,f.BN,Q.lW,w.dn,ht.mk,m.oO,AA.d,ht.O5,k.h,Kr.y],pipes:[ht.JJ],styles:[""]}),r})();function Fi(r,y){1&r&&A._UZ(0,"mat-progress-bar",33)}function d0(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1," Short Channel ID "),A.qZA())}function Dr(r,y){if(1&r&&(A.TgZ(0,"span",40),A._UZ(1,"fa-icon",41),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faEyeSlash)}}function tr(r,y){if(1&r&&(A.TgZ(0,"span",42),A._UZ(1,"fa-icon",41),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faEye)}}const er=function(r){return{"max-width":r}};function lr(r,y){if(1&r&&(A.TgZ(0,"td",35)(1,"div",36),A.YNc(2,Dr,2,1,"span",37),A.YNc(3,tr,2,1,"span",38),A.TgZ(4,"span",39),A._uU(5),A.qZA()()()),2&r){const t=y.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(4,er,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(1),A.Q6J("ngIf",t.private),A.xp6(1),A.Q6J("ngIf",!t.private),A.xp6(2),A.Oqu(null==t?null:t.short_channel_id)}}function M0(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1," Alias "),A.qZA())}function p0(r,y){if(1&r&&(A.TgZ(0,"td",35)(1,"div",36)(2,"span",39),A._uU(3),A.qZA()()()),2&r){const t=y.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,er,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.alias)}}function I0(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1," Connected "),A.qZA())}function Yi(r,y){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function m0(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1," Private "),A.qZA())}function Pa(r,y){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.private?"Private":"Public"," ")}}function v0(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1," State "),A.qZA())}function D0(r,y){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.state,"")}}function de(r,y){1&r&&(A.TgZ(0,"th",43),A._uU(1," Local Balance (Sats) "),A.qZA())}function Ra(r,y){if(1&r&&(A.TgZ(0,"td",35)(1,"span",44),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_to_us)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function y0(r,y){1&r&&(A.TgZ(0,"th",43),A._uU(1," Remote Balance (Sats) "),A.qZA())}function x0(r,y){if(1&r&&(A.TgZ(0,"td",35)(1,"span",44),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_to_them)/1e3,(null==t?null:t.msatoshi_to_them)<1e3?"1.0-4":"1.0-0")," ")}}function za(r,y){1&r&&(A.TgZ(0,"th",43),A._uU(1," Total mSatoshis "),A.qZA())}function F0(r,y){if(1&r&&(A.TgZ(0,"td",35)(1,"span",44),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.msatoshi_total)," ")}}function Y0(r,y){1&r&&(A.TgZ(0,"th",43),A._uU(1," Spendable Satoshi "),A.qZA())}function T0(r,y){if(1&r&&(A.TgZ(0,"td",35)(1,"span",44),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.spendable_msatoshi)," ")}}function La(r,y){1&r&&(A.TgZ(0,"th",45),A._uU(1,"Balance Score "),A.qZA())}function Ti(r,y){if(1&r&&(A.TgZ(0,"td",46)(1,"div",47)(2,"mat-hint",48),A._uU(3),A.ALo(4,"number"),A.qZA()(),A._UZ(5,"mat-progress-bar",49),A.qZA()),2&r){const t=y.$implicit;A.xp6(3),A.Oqu(A.lcZ(4,2,t.balancedness||0)),A.xp6(2),A.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function ba(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",50)(1,"div",51)(2,"mat-select",52),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",53),A.NdJ("click",function(){return A.CHM(t),A.oxw().onChannelUpdate("all")}),A._uU(5,"Update Fee Policy"),A.qZA(),A.TgZ(6,"mat-option",53),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(7,"Download CSV"),A.qZA()()()()}}function S0(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",54)(1,"div",55)(2,"mat-select",56),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",53),A.NdJ("click",function(z){const st=A.CHM(t).$implicit;return A.oxw().onChannelClick(st,z)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",53),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onViewRemotePolicy(dA)}),A._uU(7,"View Remote Fee"),A.qZA(),A.TgZ(8,"mat-option",53),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onChannelUpdate(dA)}),A._uU(9,"Update Fee Policy"),A.qZA(),A.TgZ(10,"mat-option",53),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onChannelClose(dA)}),A._uU(11,"Close Channel"),A.qZA()()()()}}function N0(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No peers connected. Add a peer in order to open a channel."),A.qZA())}function U0(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No channel available."),A.qZA())}function P0(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting channels..."),A.qZA())}function R0(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function z0(r,y){if(1&r&&(A.TgZ(0,"td",57),A.YNc(1,N0,2,0,"p",58),A.YNc(2,U0,2,0,"p",58),A.YNc(3,P0,2,0,"p",58),A.YNc(4,R0,2,1,"p",58),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const L0=function(r){return{"display-none":r}};function Si(r,y){if(1&r&&A._UZ(0,"tr",59),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,L0,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function b0(r,y){1&r&&A._UZ(0,"tr",60)}function Xi(r,y){1&r&&A._UZ(0,"tr",61)}const Ga=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},G0=function(){return["no_peer"]};let qr=(()=>{class r{constructor(t,s,z,dA,st,Ae){var un,Qe,tn,ia;this.logger=t,this.store=s,this.rtlEffects=z,this.clnEffects=dA,this.commonService=st,this.router=Ae,this.faEye=h.Mdf,this.faEyeSlash=h.Aq,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=a.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi_to_us","msatoshi_to_them","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","actions"]):(this.flgSticky=!0,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","balancedness","actions"]),this.selFilter=(null===(Qe=null===(un=this.router.getCurrentNavigation().extras)||void 0===un?void 0:un.state)||void 0===Qe?void 0:Qe.filter)?null===(ia=null===(tn=this.router.getCurrentNavigation().extras)||void 0===tn?void 0:tn.state)||void 0===ia?void 0:ia.filter:""}ngOnInit(){this.store.select(g.jK).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(g.ZW).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.channelsData=t.activeChannels,this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}onViewRemotePolicy(t){this.store.dispatch((0,mt.$A)({payload:{uiMessage:a.m6.GET_REMOTE_POLICY,shortChannelID:t.short_channel_id,showError:!0}})),this.clnEffects.setLookupCL.pipe((0,PA.q)(1)).subscribe(s=>{if(0===s.length)return!1;let z={};z=s[0].source!==this.information.id?s[0]:s[1];const dA=[[{key:"base_fee_millisatoshi",value:z.base_fee_millisatoshi,title:"Base Fees (mSats)",width:34,type:a.Gi.NUMBER},{key:"fee_per_millionth",value:z.fee_per_millionth,title:"Fee/Millionth",width:33,type:a.Gi.NUMBER},{key:"delay",value:z.delay,title:"Delay",width:33,type:a.Gi.NUMBER}]],st="Remote policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id);setTimeout(()=>{this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Remote Channel Policy",titleMessage:st,message:dA}}}))},0)})}onChannelUpdate(t){"all"!==t&&"ONCHAIN"===t.state||("all"===t?(this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update All",message:[],titleMessage:"Update fee policy for all channels",flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:1,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[1])).subscribe(z=>{z&&this.store.dispatch((0,mt.pW)({payload:{baseFeeMsat:z[0].inputValue,feeRate:z[1].inputValue,channelId:"all"}}))})):(this.myChanPolicy={fee_base_msat:0,fee_rate_milli_msat:0},this.store.dispatch((0,mt.$A)({payload:{uiMessage:a.m6.GET_CHAN_POLICY,shortChannelID:t.short_channel_id,showError:!1}})),this.clnEffects.setLookupCL.pipe((0,PA.q)(1)).subscribe(s=>{this.myChanPolicy=s.length>0&&s[0].source===this.information.id?{fee_base_msat:s[0].base_fee_millisatoshi,fee_rate_milli_msat:s[0].fee_per_millionth}:s.length>1&&s[1].source===this.information.id?{fee_base_msat:s[1].base_fee_millisatoshi,fee_rate_milli_msat:s[1].fee_per_millionth}:{fee_base_msat:0,fee_rate_milli_msat:0},this.logger.info(this.myChanPolicy);const z="Update fee policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),dA=[];setTimeout(()=>{this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:dA,titleMessage:z,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:""===this.myChanPolicy.fee_base_msat?0:this.myChanPolicy.fee_base_msat,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:this.myChanPolicy.fee_rate_milli_msat,min:1,width:48,hintFunction:this.percentHintFunction}]}}}))},0)}),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[2])).subscribe(s=>{s&&this.store.dispatch((0,mt.pW)({payload:{baseFeeMsat:s[0].inputValue,feeRate:s[1].inputValue,channelId:t.channel_id}}))})),this.applyFilter())}percentHintFunction(t){return(t/1e4).toString()+"%"}onChannelClose(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Close Channel",titleMessage:"Closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[3])).subscribe(s=>{s&&this.store.dispatch((0,mt.BL)({payload:{id:t.id,channelId:t.channel_id,force:!1}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{channel:t,showCopy:!0,component:Zi}}}))}loadChannelsTable(t){t.sort((s,z)=>s.active===z.active?0:z.active?1:-1),this.channels=new FA.by([...t]),this.channels.filterPredicate=(s,z)=>((s.connected?"connected":"disconnected")+(s.channel_id?s.channel_id.toLowerCase():"")+(s.short_channel_id?s.short_channel_id.toLowerCase():"")+(s.id?s.id.toLowerCase():"")+(s.alias?s.alias.toLowerCase():"")+(s.private?"private":"public")+(s.state?s.state.toLowerCase():"")+(s.funding_txid?s.funding_txid.toLowerCase():"")+(s.msatoshi_to_us?s.msatoshi_to_us:"")+(s.msatoshi_total?s.msatoshi_total:"")+(s.their_channel_reserve_satoshis?s.their_channel_reserve_satoshis:"")+(s.our_channel_reserve_satoshis?s.our_channel_reserve_satoshis:"")+(s.spendable_msatoshi?s.spendable_msatoshi:"")).includes(z),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.channels.paginator=this.paginator,this.applyFilter(),this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Open-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(DA.V),A.Y36(qe.J),A.Y36(e.v),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-open-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Channels")}])],decls:48,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_to_them"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"div",2),A.TgZ(3,"mat-form-field",3)(4,"input",4),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.YNc(5,Fi,1,0,"mat-progress-bar",5),A.TgZ(6,"div",6)(7,"table",7,8),A.ynx(9,9),A.YNc(10,d0,2,0,"th",10),A.YNc(11,lr,6,6,"td",11),A.BQk(),A.ynx(12,12),A.YNc(13,M0,2,0,"th",10),A.YNc(14,p0,4,4,"td",11),A.BQk(),A.ynx(15,13),A.YNc(16,I0,2,0,"th",10),A.YNc(17,Yi,2,1,"td",11),A.BQk(),A.ynx(18,14),A.YNc(19,m0,2,0,"th",10),A.YNc(20,Pa,2,1,"td",11),A.BQk(),A.ynx(21,15),A.YNc(22,v0,2,0,"th",10),A.YNc(23,D0,2,1,"td",11),A.BQk(),A.ynx(24,16),A.YNc(25,de,2,0,"th",17),A.YNc(26,Ra,4,4,"td",11),A.BQk(),A.ynx(27,18),A.YNc(28,y0,2,0,"th",17),A.YNc(29,x0,4,4,"td",11),A.BQk(),A.ynx(30,19),A.YNc(31,za,2,0,"th",17),A.YNc(32,F0,4,3,"td",11),A.BQk(),A.ynx(33,20),A.YNc(34,Y0,2,0,"th",17),A.YNc(35,T0,4,3,"td",11),A.BQk(),A.ynx(36,21),A.YNc(37,La,2,0,"th",22),A.YNc(38,Ti,6,4,"td",23),A.BQk(),A.ynx(39,24),A.YNc(40,ba,8,0,"th",25),A.YNc(41,S0,12,0,"td",26),A.BQk(),A.ynx(42,27),A.YNc(43,z0,5,4,"td",28),A.BQk(),A.YNc(44,Si,1,3,"tr",29),A.YNc(45,b0,1,0,"tr",30),A.YNc(46,Xi,1,0,"tr",31),A.qZA()(),A._UZ(47,"mat-paginator",32),A.qZA()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(1),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(2),A.Q6J("dataSource",s.channels)("ngClass",A.VKq(11,Ga,""!==s.errorMessage)),A.xp6(37),A.Q6J("matFooterRowDef",A.DdM(13,G0)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[wt.xw,wt.Wh,wt.yH,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,ht.O5,Y.pW,lA.$V,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,ht.PC,m.Zl,aA.gM,f.BN,Z.bx,CA.gD,CA.$L,wA.ey,FA.mD,FA.yh,FA.Ke,FA.Q2,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.JJ],styles:[".mat-column-short_channel_id[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-short_channel_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 22%;width:22%}.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),r})();const En=["outputIdx"];function Ni(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Output Index required."),A.qZA())}function Ha(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Invalid index value."),A.qZA())}function H0(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fees is required."),A.qZA())}function J0(r,y){if(1&r&&(A.TgZ(0,"div",27),A._UZ(1,"fa-icon",13),A.TgZ(2,"span"),A._uU(3),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(2),A.Oqu(t.bumpFeeError)}}let O0=(()=>{class r{constructor(t,s,z,dA,st,Ae){this.actions=t,this.dialogRef=s,this.data=z,this.store=dA,this.logger=st,this.snackBar=Ae,this.newAddress="",this.fees=null,this.outputIndex=null,this.faCopy=h.kZ_,this.faInfoCircle=h.sqG,this.faExclamationTriangle=h.eHv,this.bumpFeeError="",this.unSubs=[new c.x,new c.x]}set payReq(t){t&&(this.outputIdx=t)}ngOnInit(){this.bumpFeeChannel=this.data.channel}onBumpFee(){if(!this.outputIndex&&0!==this.outputIndex||!this.fees)return!0;this.bumpFeeError="",this.store.dispatch((0,mt._E)({payload:a._t[0]})),this.actions.pipe((0,qA.h)(t=>t.type===a.AB.SET_NEW_ADDRESS_CLN),(0,PA.q)(1)).subscribe(t=>{this.store.dispatch((0,mt.Wi)({payload:{address:t.payload,satoshis:"all",feeRate:this.fees,utxos:[this.bumpFeeChannel.funding_txid+":"+this.outputIndex.toString()]}}))}),this.actions.pipe((0,qA.h)(t=>t.type===a.AB.SET_CHANNEL_TRANSACTION_RES_CLN),(0,PA.q)(1)).subscribe(t=>{this.store.dispatch((0,KA.jW)({payload:"Successfully bumped the fee. Use the block explorer to verify transaction."})),this.dialogRef.close()}),this.actions.pipe((0,qA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN),(0,i.R)(this.unSubs[0])).subscribe(t=>{t.payload.status===a.Bn.ERROR&&("SetChannelTransaction"===t.payload.action||"GenerateNewAddress"===t.payload.action)&&(this.logger.error(t.payload.message),this.bumpFeeError=t.payload.message)})}onCopyID(t){this.snackBar.open("Transaction ID copied.")}resetData(){this.bumpFeeError="",this.fees=null,this.outputIndex=null,this.outputIdx.control.setErrors(null)}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(C.eX),A.Y36(dt.so),A.Y36(dt.WI),A.Y36(u.yh),A.Y36(E.mQ),A.Y36(Sr.ux))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-bump-fee"]],viewQuery:function(t,s){if(1&t&&A.Gf(En,5),2&t){let z;A.iGM(z=A.CRH())&&(s.payReq=z.first)}},decls:47,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxLayout","column",1,"bordered-box","mb-1","p-2"],["fxLayoutAlign","start center",1,"pb-1","word-break"],["matSuffix","","rtlClipboard","","matTooltip","Copy transaction ID",1,"ml-1",3,"icon","payload","copied"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxFlex","100"],[1,"pl-1"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","49"],["autoFocus","","matInput","","placeholder","Output Index","type","number","tabindex","1","required","","name","outputIdx",3,"ngModel","step","min","ngModelChange"],["outputIdx","ngModel"],[4,"ngIf"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","fees","required","","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center"],["mat-button","","color","primary","type","reset","tabindex","5","default","",1,"mr-1",3,"click"],["mat-button","","color","primary","type","submit","tabindex","6",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Bump Fee"),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7)(10,"div",8)(11,"p",9),A._uU(12),A.TgZ(13,"fa-icon",10),A.NdJ("copied",function(dA){return s.onCopyID(dA)}),A.qZA()(),A.TgZ(14,"div",11)(15,"div",12),A._UZ(16,"fa-icon",13),A.TgZ(17,"span",14),A._uU(18,"Bumping fee on pending open channels is an advanced feature, attempt it only if you are familiar with the functionality of Bitcoin transactions. "),A.TgZ(19,"div"),A._uU(20,"Before attempting fee bump ensure the following:"),A.qZA(),A.TgZ(21,"div",15),A._uU(22,"1: Use a Bitcoin block explorer to ensure that channel opening transaction is not confirmed."),A.qZA(),A.TgZ(23,"div",15),A._uU(24,"2: The channel opening transaction must have a sizable change output, which can be spent further. The fee cannot be bumped without the change output."),A.qZA(),A.TgZ(25,"div",15),A._uU(26,"3: Find the index value of the change output via a block explorer."),A.qZA(),A.TgZ(27,"div",15),A._uU(28,"4: Enter the index value of the change output in the form below and the desired fee rate."),A.qZA(),A.TgZ(29,"div",15),A._uU(30,"5: Upon successful fee bump, use your block explorer to track the child transaction in the mempool, which should be linked with the change output transaction."),A.qZA()()(),A.TgZ(31,"div",16)(32,"mat-form-field",17)(33,"input",18,19),A.NdJ("ngModelChange",function(dA){return s.outputIndex=dA}),A.qZA(),A.YNc(35,Ni,2,0,"mat-error",20),A.YNc(36,Ha,2,0,"mat-error",20),A.qZA(),A.TgZ(37,"mat-form-field",17)(38,"input",21,22),A.NdJ("ngModelChange",function(dA){return s.fees=dA}),A.qZA(),A.YNc(40,H0,2,0,"mat-error",20),A.qZA()(),A.YNc(41,J0,4,2,"div",23),A.qZA()(),A.TgZ(42,"div",24)(43,"button",25),A.NdJ("click",function(){return s.resetData()}),A._uU(44,"Clear"),A.qZA(),A.TgZ(45,"button",26),A.NdJ("click",function(){return s.onBumpFee()}),A._uU(46),A.qZA()()()()()()),2&t){const z=A.MAs(34);A.xp6(12),A.hij("Bump fee for transaction id: ",null==s.bumpFeeChannel?null:s.bumpFeeChannel.funding_txid," "),A.xp6(1),A.Q6J("icon",s.faCopy)("payload",null==s.bumpFeeChannel?null:s.bumpFeeChannel.funding_txid),A.xp6(3),A.Q6J("icon",s.faInfoCircle),A.xp6(17),A.Q6J("ngModel",s.outputIndex)("step",1)("min",0),A.xp6(2),A.Q6J("ngIf",null==z.errors?null:z.errors.required),A.xp6(1),A.Q6J("ngIf",null==z.errors?null:z.errors.pendingChannelOutputIndex),A.xp6(2),A.Q6J("ngModel",s.fees)("step",1)("min",0),A.xp6(2),A.Q6J("ngIf",!s.fees),A.xp6(1),A.Q6J("ngIf",""!==s.bumpFeeError),A.xp6(5),A.Oqu(""!==s.bumpFeeError?"Retry Bump Fee":"Bump Fee")}},directives:[wt.xw,wt.yH,w.dk,wt.Wh,Q.lW,w.dn,OA._Y,OA.JL,OA.F,f.BN,Z.R9,Kr.y,aA.gM,Z.KE,H.Nt,OA.wV,OA.qQ,OA.Fj,b.q,k.h,OA.Q7,OA.JJ,OA.On,ht.O5,Z.TO],styles:[""]}),r})();function k0(r,y){1&r&&A._UZ(0,"mat-progress-bar",30)}function j0(r,y){1&r&&(A.TgZ(0,"th",31),A._uU(1," Short Channel ID "),A.qZA())}function K0(r,y){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.short_channel_id,"")}}function V0(r,y){1&r&&(A.TgZ(0,"th",31),A._uU(1," Alias "),A.qZA())}function W0(r,y){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(null==t?null:t.alias)}}function Ja(r,y){1&r&&(A.TgZ(0,"th",31),A._uU(1," Connected "),A.qZA())}function Z0(r,y){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function X0(r,y){1&r&&(A.TgZ(0,"th",31),A._uU(1," Private "),A.qZA())}function q0(r,y){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.private?"Private":"Public"," ")}}function cr(r,y){1&r&&(A.TgZ(0,"th",31),A._uU(1," State "),A.qZA())}const _0=function(r){return{"max-width":r}};function Ui(r,y){if(1&r&&(A.TgZ(0,"td",33),A._uU(1),A.qZA()),2&r){const t=y.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(2,_0,s.screenSize===s.screenSizeEnum.XS?"10rem":"")),A.xp6(1),A.hij(" ",s.CLNChannelPendingState[null==t?null:t.state]," ")}}function $0(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1," mSatoshi To Us "),A.qZA())}function Al(r,y){if(1&r&&(A.TgZ(0,"td",32)(1,"span",35),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.msatoshi_to_us)," ")}}function tl(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1," Total (Sats) "),A.qZA())}function Oa(r,y){if(1&r&&(A.TgZ(0,"td",32)(1,"span",35),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,(null==t?null:t.msatoshi_total)/1e3)," ")}}function el(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1," Spendable Satoshi "),A.qZA())}function nl(r,y){if(1&r&&(A.TgZ(0,"td",32)(1,"span",35),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.spendable_msatoshi)," ")}}function rl(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",36)(1,"div",37)(2,"mat-select",38),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",39),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function il(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",39),A.NdJ("click",function(){A.CHM(t);const z=A.oxw().$implicit;return A.oxw().onChannelClose(z)}),A._uU(1,"Close Channel"),A.qZA()}}function ka(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",39),A.NdJ("click",function(){A.CHM(t);const z=A.oxw().$implicit;return A.oxw().onBumpFee(z)}),A._uU(1,"Bump Fee"),A.qZA()}}function al(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",40)(1,"div",37)(2,"mat-select",41),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",39),A.NdJ("click",function(z){const st=A.CHM(t).$implicit;return A.oxw().onChannelClick(st,z)}),A._uU(5,"View Info"),A.qZA(),A.YNc(6,il,2,0,"mat-option",42),A.YNc(7,ka,2,0,"mat-option",42),A.qZA()()()}if(2&r){const t=y.$implicit,s=A.oxw();A.xp6(6),A.Q6J("ngIf",s.isCompatibleVersion&&("CHANNELD_SHUTTING_DOWN"===t.state||"CLOSINGD_SIGEXCHANGE"===t.state||!t.connected&&"CHANNELD_NORMAL"===t.state)),A.xp6(1),A.Q6J("ngIf","CHANNELD_AWAITING_LOCKIN"===t.state)}}function ja(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No peers connected. Add a peer in order to open a channel."),A.qZA())}function Ka(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No pending/inactive channel available."),A.qZA())}function Va(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting pending/inactive channels..."),A.qZA())}function ol(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function sl(r,y){if(1&r&&(A.TgZ(0,"td",43),A.YNc(1,ja,2,0,"p",44),A.YNc(2,Ka,2,0,"p",44),A.YNc(3,Va,2,0,"p",44),A.YNc(4,ol,2,1,"p",44),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const ll=function(r){return{"display-none":r}};function cl(r,y){if(1&r&&A._UZ(0,"tr",45),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,ll,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function gl(r,y){1&r&&A._UZ(0,"tr",46)}function Wa(r,y){1&r&&A._UZ(0,"tr",47)}const Bl=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},ul=function(){return["no_peer"]};let fl=(()=>{class r{constructor(t,s,z,dA){this.logger=t,this.store=s,this.rtlEffects=z,this.commonService=dA,this.isCompatibleVersion=!1,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=a.vn,this.selFilter="",this.flgSticky=!1,this.CLNChannelPendingState=a.Zs,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","state","actions"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"])}ngOnInit(){this.store.select(g.jK).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.information.api_version&&(this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.api_version,"0.4.2")),this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(g.ZW).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.channelsData=[...t.pendingChannels,...t.inactiveChannels],this.channelsData=this.channelsData.sort((s,z)=>this.CLNChannelPendingState[s.state]>=this.CLNChannelPendingState[z.state]?1:-1),this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onBumpFee(t){this.store.dispatch((0,KA.qR)({payload:{data:{channel:t,component:O0}}}))}onChannelClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{channel:t,showCopy:!0,component:Zi}}}))}onChannelClose(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Force Close Channel",titleMessage:"Force closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Force Close"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[2])).subscribe(s=>{s&&this.store.dispatch((0,mt.BL)({payload:{id:t.id,channelId:t.channel_id,force:!0}}))})}loadChannelsTable(t){t.sort((s,z)=>s.active===z.active?0:z.active?1:-1),this.channels=new FA.by([...t]),this.channels.filterPredicate=(s,z)=>((s.connected?"connected":"disconnected")+(s.channel_id?s.channel_id.toLowerCase():"")+(s.short_channel_id?s.short_channel_id.toLowerCase():"")+(s.id?s.id.toLowerCase():"")+(s.alias?s.alias.toLowerCase():"")+(s.private?"private":"public")+(s.state&&this.CLNChannelPendingState[s.state]?this.CLNChannelPendingState[s.state].toLowerCase():"")+(s.funding_txid?s.funding_txid.toLowerCase():"")+(s.msatoshi_to_us?s.msatoshi_to_us:"")+(s.msatoshi_total?s.msatoshi_total:"")+(s.their_channel_reserve_satoshis?s.their_channel_reserve_satoshis:"")+(s.our_channel_reserve_satoshis?s.our_channel_reserve_satoshis:"")+(s.spendable_msatoshi?s.spendable_msatoshi:"")).includes(z),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(s,z)=>"state"===z?this.CLNChannelPendingState[s.state]:s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Pending-inactive-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(DA.V),A.Y36(e.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-pending-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Channels")}])],decls:42,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pr-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pr-3"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"div",2),A.TgZ(3,"mat-form-field",3)(4,"input",4),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.YNc(5,k0,1,0,"mat-progress-bar",5),A.TgZ(6,"div",6)(7,"table",7,8),A.ynx(9,9),A.YNc(10,j0,2,0,"th",10),A.YNc(11,K0,2,1,"td",11),A.BQk(),A.ynx(12,12),A.YNc(13,V0,2,0,"th",10),A.YNc(14,W0,2,1,"td",11),A.BQk(),A.ynx(15,13),A.YNc(16,Ja,2,0,"th",10),A.YNc(17,Z0,2,1,"td",11),A.BQk(),A.ynx(18,14),A.YNc(19,X0,2,0,"th",10),A.YNc(20,q0,2,1,"td",11),A.BQk(),A.ynx(21,15),A.YNc(22,cr,2,0,"th",10),A.YNc(23,Ui,2,4,"td",16),A.BQk(),A.ynx(24,17),A.YNc(25,$0,2,0,"th",18),A.YNc(26,Al,4,3,"td",11),A.BQk(),A.ynx(27,19),A.YNc(28,tl,2,0,"th",18),A.YNc(29,Oa,4,3,"td",11),A.BQk(),A.ynx(30,20),A.YNc(31,el,2,0,"th",18),A.YNc(32,nl,4,3,"td",11),A.BQk(),A.ynx(33,21),A.YNc(34,rl,6,0,"th",22),A.YNc(35,al,8,2,"td",23),A.BQk(),A.ynx(36,24),A.YNc(37,sl,5,4,"td",25),A.BQk(),A.YNc(38,cl,1,3,"tr",26),A.YNc(39,gl,1,0,"tr",27),A.YNc(40,Wa,1,0,"tr",28),A.qZA()(),A._UZ(41,"mat-paginator",29),A.qZA()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(1),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(2),A.Q6J("dataSource",s.channels)("ngClass",A.VKq(11,Bl,""!==s.errorMessage)),A.xp6(31),A.Q6J("matFooterRowDef",A.DdM(13,ul)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[wt.xw,wt.Wh,wt.yH,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,ht.O5,Y.pW,lA.$V,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,ht.PC,m.Zl,CA.gD,CA.$L,wA.ey,FA.mD,FA.yh,FA.Ke,FA.Q2,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-state[_ngcontent-%COMP%]{flex:1 1 15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();const hl=["peersForm"],El=["stepper"];function wl(r,y){if(1&r&&A._uU(0),2&r){const t=A.oxw();A.Oqu(t.peerFormLabel)}}function Za(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Address is required."),A.qZA())}function Xa(r,y){if(1&r&&(A.TgZ(0,"div",40),A._UZ(1,"fa-icon",41),A.TgZ(2,"span"),A._uU(3),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(2),A.Oqu(t.peerConnectionError)}}function Cl(r,y){if(1&r&&A._uU(0),2&r){const t=A.oxw();A.Oqu(t.channelFormLabel)}}function Ql(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount is required."),A.qZA())}function dl(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount must be a positive number."),A.qZA())}function on(r,y){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function yr(r,y){if(1&r&&(A.TgZ(0,"mat-option",42),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function Ml(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function qa(r,y){if(1&r&&(A.TgZ(0,"mat-form-field",43),A._UZ(1,"input",44),A.YNc(2,Ml,2,0,"mat-error",14),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("step",.1)("min",0),A.xp6(1),A.Q6J("ngIf","customperkb"===t.channelFormGroup.controls.selFeeRate.value&&!t.channelFormGroup.controls.flgMinConf.value&&!t.channelFormGroup.controls.customFeeRate.value)}}function pl(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function Il(r,y){if(1&r&&(A.TgZ(0,"div",40),A._UZ(1,"fa-icon",41),A.TgZ(2,"span"),A._uU(3),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(2),A.Oqu(t.channelConnectionError)}}const _a=function(r,y){return{"mr-6":r,"mr-2":y}};let ml=(()=>{class r{constructor(t,s,z,dA,st,Ae,un){this.dialogRef=t,this.data=s,this.store=z,this.formBuilder=dA,this.actions=st,this.logger=Ae,this.commonService=un,this.faExclamationTriangle=h.eHv,this.peerAddress="",this.totalBalance=0,this.feeRateTypes=a.vn,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.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.id&&this.data.message.peer.netaddr?this.data.message.peer.id+"@"+this.data.message.peer.netaddr:this.data.message.peer&&this.data.message.peer.id&&!this.data.message.peer.netaddr?this.data.message.peer.id:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[OA.kI.required]],peerAddress:[this.peerAddress,[OA.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[OA.kI.required,OA.kI.min(1),OA.kI.max(this.totalBalance)]],isPrivate:[!1],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}],hiddenAmount:["",[OA.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.channelFormGroup.controls.flgMinConf.valueChanges.pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{t?(this.channelFormGroup.controls.selFeeRate.setValue(null),this.channelFormGroup.controls.selFeeRate.disable(),this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.minConfValue.reset(),this.channelFormGroup.controls.minConfValue.enable(),this.channelFormGroup.controls.minConfValue.setValidators([OA.kI.required])):(this.channelFormGroup.controls.selFeeRate.enable(),this.channelFormGroup.controls.minConfValue.setValue(null),this.channelFormGroup.controls.minConfValue.disable(),this.channelFormGroup.controls.minConfValue.setValidators(null))}),this.channelFormGroup.controls.selFeeRate.valueChanges.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.customFeeRate.reset(),this.channelFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.channelFormGroup.controls.flgMinConf.value?null:[OA.kI.required])}),this.actions.pipe((0,i.R)(this.unSubs[2]),(0,qA.h)(t=>t.type===a.AB.NEWLY_ADDED_PEER_CLN||t.type===a.AB.FETCH_CHANNELS_CLN||t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.NEWLY_ADDED_PEER_CLN&&(this.logger.info(t.payload),this.flgEditable=!1,this.newlyAddedPeer=t.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),t.type===a.AB.FETCH_CHANNELS_CLN&&this.dialogRef.close(),t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&("SaveNewPeer"===t.payload.action?this.peerConnectionError=t.payload.message:"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch((0,mt.El)({payload:{id:this.peerFormGroup.controls.peerAddress.value}}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||this.channelFormGroup.controls.flgMinConf.value&&!this.channelFormGroup.controls.minConfValue.value)return!0;this.channelConnectionError="",this.store.dispatch((0,mt.YX)({payload:{peerId:this.newlyAddedPeer.id,satoshis:this.channelFormGroup.controls.fundingAmount.value,announce:!this.channelFormGroup.controls.isPrivate.value,feeRate:"customperkb"===this.channelFormGroup.controls.selFeeRate.value&&!this.channelFormGroup.controls.flgMinConf.value&&this.channelFormGroup.controls.customFeeRate.value?1e3*this.channelFormGroup.controls.customFeeRate.value+"perkb":this.channelFormGroup.controls.selFeeRate.value,minconf:this.channelFormGroup.controls.flgMinConf.value?this.channelFormGroup.controls.minConfValue.value:null}}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(t){switch(t.selectedIndex){case 0: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.id):"Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 2:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer.id):"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)"}t.selectedIndex{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(dt.so),A.Y36(dt.WI),A.Y36(u.yh),A.Y36(OA.qu),A.Y36(C.eX),A.Y36(E.mQ),A.Y36(e.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-connect-peer"]],viewQuery:function(t,s){if(1&t&&(A.Gf(hl,5),A.Gf(El,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.form=z.first),A.iGM(z=A.CRH())&&(s.stepper=z.first)}},decls:57,vars:30,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-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","ngSubmit"],["matStepLabel","","disabled","true"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","autoFocus","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["fxFlex","60","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","35","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["fxFlex","98"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["mat-button","","color","primary","tabindex","8","type","submit"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Connect to a new peer"),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"div",7)(10,"mat-vertical-stepper",8,9),A.NdJ("selectionChange",function(dA){return s.stepSelectionChanged(dA)}),A.TgZ(12,"mat-step",10)(13,"form",11),A.YNc(14,wl,1,1,"ng-template",12),A.TgZ(15,"mat-form-field",1),A._UZ(16,"input",13),A.YNc(17,Za,2,0,"mat-error",14),A.qZA(),A.YNc(18,Xa,4,2,"div",15),A.TgZ(19,"div",16)(20,"button",17),A.NdJ("click",function(){return s.onConnectPeer()}),A._uU(21),A.qZA()()()(),A.TgZ(22,"mat-step",10)(23,"form",18),A.NdJ("ngSubmit",function(){return s.onOpenChannel()}),A.YNc(24,Cl,1,1,"ng-template",19),A.TgZ(25,"div",20)(26,"div",21)(27,"mat-form-field",22),A._UZ(28,"input",23),A.TgZ(29,"mat-hint"),A._uU(30),A.qZA(),A.TgZ(31,"span",24),A._uU(32," Sats "),A.qZA(),A.YNc(33,Ql,2,0,"mat-error",14),A.YNc(34,dl,2,0,"mat-error",14),A.YNc(35,on,2,1,"mat-error",14),A.qZA(),A.TgZ(36,"div",25)(37,"mat-slide-toggle",26),A._uU(38,"Private Channel"),A.qZA()()(),A.TgZ(39,"div",27)(40,"div",28)(41,"mat-form-field",29)(42,"mat-select",30),A.YNc(43,yr,2,2,"mat-option",31),A.qZA()(),A.YNc(44,qa,3,3,"mat-form-field",32),A.qZA(),A.TgZ(45,"div",33),A._UZ(46,"mat-checkbox",34),A.TgZ(47,"mat-form-field",35),A._UZ(48,"input",36),A.YNc(49,pl,2,0,"mat-error",14),A.qZA()()()(),A.YNc(50,Il,4,2,"div",15),A.TgZ(51,"div",16)(52,"button",37),A._uU(53),A.qZA()()()()(),A.TgZ(54,"div",38)(55,"button",39),A._uU(56),A.qZA()()()()()()),2&t&&(A.xp6(10),A.Q6J("linear",!0),A.xp6(2),A.Q6J("stepControl",s.peerFormGroup)("editable",s.flgEditable),A.xp6(1),A.Q6J("formGroup",s.peerFormGroup),A.xp6(4),A.Q6J("ngIf",null==s.peerFormGroup.controls.peerAddress.errors?null:s.peerFormGroup.controls.peerAddress.errors.required),A.xp6(1),A.Q6J("ngIf",""!==s.peerConnectionError),A.xp6(3),A.Oqu(""!==s.peerConnectionError?"Retry":"Add Peer"),A.xp6(1),A.Q6J("stepControl",s.channelFormGroup)("editable",s.flgEditable),A.xp6(1),A.Q6J("formGroup",s.channelFormGroup),A.xp6(5),A.Q6J("step",1e3),A.xp6(2),A.hij("Remaining Bal: ",s.totalBalance-(s.channelFormGroup.controls.fundingAmount.value?s.channelFormGroup.controls.fundingAmount.value:0),""),A.xp6(3),A.Q6J("ngIf",null==s.channelFormGroup.controls.fundingAmount.errors?null:s.channelFormGroup.controls.fundingAmount.errors.required),A.xp6(1),A.Q6J("ngIf",null==s.channelFormGroup.controls.fundingAmount.errors?null:s.channelFormGroup.controls.fundingAmount.errors.min),A.xp6(1),A.Q6J("ngIf",null==s.channelFormGroup.controls.fundingAmount.errors?null:s.channelFormGroup.controls.fundingAmount.errors.max),A.xp6(6),A.Q6J("fxFlex","customperkb"!==s.channelFormGroup.controls.selFeeRate.value||s.channelFormGroup.controls.flgMinConf.value?"100":"48"),A.xp6(2),A.Q6J("ngForOf",s.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===s.channelFormGroup.controls.selFeeRate.value&&!s.channelFormGroup.controls.flgMinConf.value),A.xp6(2),A.Q6J("ngClass",A.WLB(27,_a,s.screenSize===s.screenSizeEnum.XS||s.screenSize===s.screenSizeEnum.SM,s.screenSize===s.screenSizeEnum.MD||s.screenSize===s.screenSizeEnum.LG||s.screenSize===s.screenSizeEnum.XL)),A.xp6(2),A.Q6J("step",1)("min",0)("required",s.channelFormGroup.controls.flgMinConf.value),A.xp6(1),A.Q6J("ngIf",s.channelFormGroup.controls.flgMinConf.value&&!s.channelFormGroup.controls.minConfValue.value),A.xp6(1),A.Q6J("ngIf",""!==s.channelConnectionError),A.xp6(3),A.Oqu(""!==s.channelConnectionError?"Retry":"Open Channel"),A.xp6(2),A.Q6J("mat-dialog-close",!1),A.xp6(1),A.Oqu(null!=s.newlyAddedPeer&&s.newlyAddedPeer.id?"Do It Later":"Close"))},directives:[wt.xw,wt.yH,w.dk,wt.Wh,Q.lW,w.dn,pr.Vq,pr.C0,OA._Y,OA.JL,OA.sg,pr.VY,Z.KE,H.Nt,OA.Fj,k.h,OA.JJ,OA.u,OA.Q7,ht.O5,Z.TO,f.BN,OA.wV,Z.bx,Z.R9,RA.Rr,CA.gD,ht.sg,wA.ey,OA.qQ,b.q,$A.oG,ht.mk,m.oO,dt.ZT],styles:[""]}),r})();function vl(r,y){1&r&&A._UZ(0,"mat-progress-bar",32)}function $a(r,y){1&r&&(A.TgZ(0,"th",33),A._uU(1," Alias "),A.qZA())}const Ao=function(r){return{"mr-0":r}};function xr(r,y){if(1&r&&A._UZ(0,"span",37),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Ao,t.screenSize===t.screenSizeEnum.XS))}}function Dl(r,y){if(1&r&&A._UZ(0,"span",38),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Ao,t.screenSize===t.screenSizeEnum.XS))}}const qi=function(r){return{"max-width":r}};function yl(r,y){if(1&r&&(A.TgZ(0,"td",34),A.YNc(1,xr,1,3,"span",35),A.YNc(2,Dl,1,3,"span",36),A._uU(3),A.qZA()),2&r){const t=y.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(4,qi,s.screenSize===s.screenSizeEnum.XS?"10rem":"40rem")),A.xp6(1),A.Q6J("ngIf",null==t?null:t.connected),A.xp6(1),A.Q6J("ngIf",!(null!=t&&t.connected)),A.xp6(1),A.hij(" ",null==t?null:t.alias," ")}}function xl(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1," ID "),A.qZA())}function to(r,y){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=y.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(2,qi,s.screenSize===s.screenSizeEnum.XS?"10rem":"40rem")),A.xp6(1),A.hij(" ",null==t?null:t.id," ")}}function _i(r,y){1&r&&(A.TgZ(0,"th",33),A._uU(1," Network Address "),A.qZA())}function nr(r,y){1&r&&(A.TgZ(0,"span"),A._uU(1,","),A._UZ(2,"br"),A.qZA())}function Fl(r,y){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.YNc(2,nr,3,0,"span",42),A.qZA()),2&r){const t=y.$implicit,s=y.last;A.xp6(1),A.Oqu(t),A.xp6(1),A.Q6J("ngIf",!s)}}function Yl(r,y){if(1&r&&(A.TgZ(0,"td",34),A.YNc(1,Fl,3,2,"span",41),A.qZA()),2&r){const t=y.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(2,qi,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(1),A.Q6J("ngForOf",null==t?null:t.netaddr)}}function Tl(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",43)(1,"div",44)(2,"mat-select",45),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",46),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Sl(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",46),A.NdJ("click",function(){A.CHM(t);const z=A.oxw().$implicit;return A.oxw().onPeerDetach(z)}),A._uU(1,"Disconnect"),A.qZA()}}function Gl(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",46),A.NdJ("click",function(){A.CHM(t);const z=A.oxw().$implicit;return A.oxw().onConnectPeer(z)}),A._uU(1,"Reconnect"),A.qZA()}}function Nl(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",47)(1,"div",48)(2,"mat-select",45),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",46),A.NdJ("click",function(z){const st=A.CHM(t).$implicit;return A.oxw().onPeerClick(st,z)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",46),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onOpenChannel(dA)}),A._uU(7,"Open Channel"),A.qZA(),A.YNc(8,Sl,2,0,"mat-option",49),A.YNc(9,Gl,2,0,"mat-option",49),A.qZA()()()}if(2&r){const t=y.$implicit;A.xp6(8),A.Q6J("ngIf",t.connected),A.xp6(1),A.Q6J("ngIf",!t.connected)}}function Ul(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No connected peer."),A.qZA())}function Pl(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting peers..."),A.qZA())}function Rl(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function eo(r,y){if(1&r&&(A.TgZ(0,"td",50),A.YNc(1,Ul,2,0,"p",42),A.YNc(2,Pl,2,0,"p",42),A.YNc(3,Rl,2,1,"p",42),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const zl=function(r){return{"display-none":r}};function eA(r,y){if(1&r&&A._UZ(0,"tr",51),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,zl,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function G(r,y){1&r&&A._UZ(0,"tr",52)}function V(r,y){1&r&&A._UZ(0,"tr",53)}const M=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},x=function(){return["no_peer"]};let P=(()=>{class r{constructor(t,s,z,dA,st){this.logger=t,this.store=s,this.rtlEffects=z,this.actions=dA,this.commonService=st,this.faUsers=h.FVb,this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","id","netaddr","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","id","netaddr","actions"])}ngOnInit(){this.store.select(g.Ao).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.availableBalance=t.balance.totalBalance||0}),this.store.select(g.Wi).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.peersData=t.peers||[],this.peersData.length>0&&this.loadPeersTable(this.peersData),this.logger.info(t)}),this.actions.pipe((0,i.R)(this.unSubs[2]),(0,qA.h)(t=>t.type===a.AB.SET_PEERS_CLN)).subscribe(t=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.id,message:[[{key:"id",value:t.id,title:"Public Key",width:100}],[{key:"netaddr",value:t.netaddr,title:"Address",width:100}],[{key:"alias",value:t.alias,title:"Alias",width:50},{key:"connected",value:t.connected?"True":"False",title:"Connected",width:50}]]}}}))}onConnectPeer(t){this.store.dispatch((0,KA.qR)({payload:{data:{message:{peer:t.id?t:null,information:this.information,balance:this.availableBalance},component:ml}}}))}onOpenChannel(t){this.store.dispatch((0,KA.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:ee}}}))}onPeerDetach(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.id),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[3])).subscribe(z=>{z&&this.store.dispatch((0,mt.z)({payload:{id:t.id,force:!1}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(t){this.peers=new FA.by([...t]),this.peers.sortingDataAccessor=(s,z)=>{if("netaddr"===z){if(s.netaddr&&s.netaddr[0]){const dA=s.netaddr[0].toString().split(".");return dA[0]?+dA[0]:s.netaddr[0]}return""}return s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null},this.peers.sort=this.sort,this.peers.filterPredicate=(s,z)=>JSON.stringify(s).toLowerCase().includes(z),this.peers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(DA.V),A.Y36(C.eX),A.Y36(e.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-peers"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Peers")}])],decls:36,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["peersForm","ngForm"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","30","fxFlex.gt-xs","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","id"],["mat-header-cell","","class","px-3","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","netaddr"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["class","dot green","matTooltip","Connected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Disconnected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Connected","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Disconnected","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["fxFlex","100","fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"form",1,2)(3,"button",3),A.NdJ("click",function(){return s.onConnectPeer({})}),A._uU(4,"Add Peer"),A.qZA()(),A.TgZ(5,"div",4)(6,"div",5)(7,"div",6),A._UZ(8,"fa-icon",7),A.TgZ(9,"span",8),A._uU(10,"Connected Peers"),A.qZA()(),A.TgZ(11,"mat-form-field",9)(12,"div",10)(13,"input",11),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()()(),A.TgZ(14,"div",12),A.YNc(15,vl,1,0,"mat-progress-bar",13),A.TgZ(16,"table",14,15),A.ynx(18,16),A.YNc(19,$a,2,0,"th",17),A.YNc(20,yl,4,6,"td",18),A.BQk(),A.ynx(21,19),A.YNc(22,xl,2,0,"th",20),A.YNc(23,to,2,4,"td",21),A.BQk(),A.ynx(24,22),A.YNc(25,_i,2,0,"th",17),A.YNc(26,Yl,2,4,"td",18),A.BQk(),A.ynx(27,23),A.YNc(28,Tl,6,0,"th",24),A.YNc(29,Nl,10,2,"td",25),A.BQk(),A.ynx(30,26),A.YNc(31,eo,4,3,"td",27),A.BQk(),A.YNc(32,eA,1,3,"tr",28),A.YNc(33,G,1,0,"tr",29),A.YNc(34,V,1,0,"tr",30),A.qZA()(),A._UZ(35,"mat-paginator",31),A.qZA()()),2&t&&(A.xp6(8),A.Q6J("icon",s.faUsers),A.xp6(5),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.peers)("ngClass",A.VKq(12,M,""!==s.errorMessage)),A.xp6(16),A.Q6J("matFooterRowDef",A.DdM(14,x)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[wt.xw,wt.yH,wt.Wh,OA._Y,OA.JL,OA.F,Q.lW,f.BN,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,lA.$V,ht.O5,Y.pW,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,ht.PC,m.Zl,aA.gM,ht.sg,CA.gD,CA.$L,wA.ey,FA.mD,FA.yh,FA.Ke,FA.Q2,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-id[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:2rem}.mat-column-netaddr[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();const tA=["queryRoutesForm"];function oA(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Destination pubkey is required."),A.qZA())}function sA(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount is required."),A.qZA())}function iA(r,y){1&r&&A._UZ(0,"mat-progress-bar",38)}function NA(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1," ID "),A.qZA())}function kA(r,y){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.id," ")}}function gt(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1," Alias "),A.qZA())}function _A(r,y){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.alias," ")}}function ut(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1," Channel "),A.qZA())}function pt(r,y){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.channel," ")}}function yt(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1," Direction "),A.qZA())}function Gt(r,y){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.direction," ")}}function $t(r,y){1&r&&(A.TgZ(0,"th",41),A._uU(1," Delay "),A.qZA())}function _t(r,y){if(1&r&&(A.TgZ(0,"td",40)(1,"span",42),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.delay)," ")}}function ae(r,y){1&r&&(A.TgZ(0,"th",41),A._uU(1," Amount (Sats) "),A.qZA())}function Be(r,y){if(1&r&&(A.TgZ(0,"td",40)(1,"span",42),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,(null==t?null:t.msatoshi)/1e3)," ")}}function we(r,y){1&r&&(A.TgZ(0,"th",43),A._uU(1," Amount mSat "),A.qZA())}function Ce(r,y){if(1&r&&(A.TgZ(0,"td",44),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.amount_msat," ")}}function He(r,y){1&r&&(A.TgZ(0,"th",45)(1,"span",42),A._uU(2,"Actions"),A.qZA()())}function sn(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",44)(1,"button",46),A.NdJ("click",function(z){const st=A.CHM(t).$implicit;return A.oxw().onHopClick(st,z)}),A._uU(2,"View Info"),A.qZA()()}}function Je(r,y){1&r&&A._UZ(0,"tr",47)}function le(r,y){1&r&&A._UZ(0,"tr",48)}const ln=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}};let We=(()=>{class r{constructor(t,s,z){this.store=t,this.clnEffects=s,this.commonService=z,this.destinationPubkey="",this.amount=null,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=h.FpQ,this.faExclamationTriangle=h.eHv,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi","actions"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","direction","msatoshi","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","direction","delay","msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","channel","direction","delay","msatoshi","actions"])}ngOnInit(){this.clnEffects.setQueryRoutesCL.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.qrHops=new FA.by([]),this.qrHops.data=[],t.routes&&t.routes.length&&t.routes.length>0?(this.flgLoading[0]=!1,this.qrHops=new FA.by([...t.routes]),this.qrHops.data=t.routes):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null})}onQueryRoutes(){if(!this.destinationPubkey||!this.amount)return!0;this.flgLoading[0]=!0,this.store.dispatch((0,mt.WO)({payload:{destPubkey:this.destinationPubkey,amount:1e3*this.amount}}))}resetData(){this.destinationPubkey="",this.amount=null,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"id",value:t.id,title:"ID",width:100,type:a.Gi.STRING}],[{key:"channel",value:t.channel,title:"Channel",width:50,type:a.Gi.STRING},{key:"alias",value:t.alias,title:"Peer Alias",width:50,type:a.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"mSatoshi",width:50,type:a.Gi.NUMBER},{key:"amount_msat",value:t.amount_msat,title:"Amount mSat",width:50,type:a.Gi.STRING}],[{key:"direction",value:t.direction,title:"Direction",width:50,type:a.Gi.STRING},{key:"delay",value:t.delay,title:"Delay",width:50,type:a.Gi.NUMBER}]]}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(qe.J),A.Y36(e.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-query-routes"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(tA,7)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.form=z.first)}},decls:54,vars:16,consts:[["fxLayout","column","fxFlex","100",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Pubkey","name","destinationPubkey","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-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","row","fxLayoutAlign","start center",1,"page-sub-title-container","mt-2","mb-1"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],[1,"table-container","mb-6",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","channel"],["matColumnDef","direction"],["matColumnDef","delay"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","amount_msat"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["mat-header-cell","",1,"pl-4","pr-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,s){if(1&t){const z=A.EpF();A.TgZ(0,"div",0)(1,"form",1,2),A.NdJ("ngSubmit",function(){return A.CHM(z),A.MAs(2).form.valid&&s.onQueryRoutes()}),A.TgZ(3,"div",3),A._UZ(4,"fa-icon",4),A.TgZ(5,"span"),A._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),A.qZA()(),A.TgZ(7,"mat-form-field",5)(8,"input",6,7),A.NdJ("ngModelChange",function(st){return s.destinationPubkey=st}),A.qZA(),A.YNc(10,oA,2,0,"mat-error",8),A.qZA(),A.TgZ(11,"mat-form-field",9)(12,"input",10),A.NdJ("ngModelChange",function(st){return s.amount=st}),A.qZA(),A.YNc(13,sA,2,0,"mat-error",8),A.qZA(),A.TgZ(14,"div",11)(15,"button",12),A.NdJ("click",function(){return s.resetData()}),A._uU(16,"Clear"),A.qZA(),A.TgZ(17,"button",13),A._uU(18,"Query Route"),A.qZA()()(),A.TgZ(19,"div",14)(20,"div",15),A._UZ(21,"fa-icon",16),A.TgZ(22,"span",17),A._uU(23,"Transaction Route"),A.qZA()()(),A.TgZ(24,"div",18),A.YNc(25,iA,1,0,"mat-progress-bar",19),A.TgZ(26,"table",20,21),A.ynx(28,22),A.YNc(29,NA,2,0,"th",23),A.YNc(30,kA,2,1,"td",24),A.BQk(),A.ynx(31,25),A.YNc(32,gt,2,0,"th",23),A.YNc(33,_A,2,1,"td",24),A.BQk(),A.ynx(34,26),A.YNc(35,ut,2,0,"th",23),A.YNc(36,pt,2,1,"td",24),A.BQk(),A.ynx(37,27),A.YNc(38,yt,2,0,"th",23),A.YNc(39,Gt,2,1,"td",24),A.BQk(),A.ynx(40,28),A.YNc(41,$t,2,0,"th",29),A.YNc(42,_t,4,3,"td",24),A.BQk(),A.ynx(43,30),A.YNc(44,ae,2,0,"th",29),A.YNc(45,Be,4,3,"td",24),A.BQk(),A.ynx(46,31),A.YNc(47,we,2,0,"th",32),A.YNc(48,Ce,2,1,"td",33),A.BQk(),A.ynx(49,34),A.YNc(50,He,3,0,"th",35),A.YNc(51,sn,3,0,"td",33),A.BQk(),A.YNc(52,Je,1,0,"tr",36),A.YNc(53,le,1,0,"tr",37),A.qZA()()()}2&t&&(A.xp6(4),A.Q6J("icon",s.faExclamationTriangle),A.xp6(4),A.Q6J("ngModel",s.destinationPubkey),A.xp6(2),A.Q6J("ngIf",!s.destinationPubkey),A.xp6(2),A.Q6J("ngModel",s.amount)("step",1e3)("min",0),A.xp6(1),A.Q6J("ngIf",!s.amount),A.xp6(8),A.Q6J("icon",s.faRoute),A.xp6(4),A.Q6J("ngIf",!0===s.flgLoading[0]),A.xp6(1),A.Q6J("dataSource",s.qrHops)("ngClass",A.VKq(14,ln,"error"===s.flgLoading[0])),A.xp6(26),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns))},directives:[wt.xw,wt.yH,OA._Y,OA.JL,OA.F,wt.Wh,f.BN,Z.KE,H.Nt,OA.Fj,OA.Q7,OA.JJ,OA.On,ht.O5,Z.TO,OA.wV,OA.qQ,b.q,Q.lW,lA.$V,Y.pW,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,FA.as,FA.XQ,FA.nj,FA.Gk],pipes:[ht.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{flex:0 0 5%;width:5%}.mat-column-pubkey_alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();function Oe(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Message is required."),A.qZA())}let he=(()=>{class r{constructor(t,s,z){this.dataService=t,this.snackBar=s,this.logger=z,this.message="",this.signedMessage="",this.signature="",this.unSubs=[new c.x,new c.x]}onSign(){if(!this.message||""===this.message)return!0;this.dataService.signMessage(this.message).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.signedMessage=this.message,this.signature=t.zbase})}onMessageChange(){this.signedMessage!==this.message&&(this.signature="")}onCopyField(t){this.snackBar.open("Signature copied."),this.logger.info("Copied Text: "+t)}resetData(){this.message="",this.signature="",this.signedMessage=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(zA.D),A.Y36(Sr.ux),A.Y36(E.mQ))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-sign"]],decls:20,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to sign","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3","type","submit",3,"click"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","4","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),A.NdJ("ngModelChange",function(dA){return s.message=dA})("keyup",function(){return s.onMessageChange()}),A.qZA(),A.YNc(5,Oe,2,0,"mat-error",5),A.qZA(),A.TgZ(6,"div",6)(7,"button",7),A.NdJ("click",function(){return s.resetData()}),A._uU(8,"Clear Field"),A.qZA(),A.TgZ(9,"button",8),A.NdJ("click",function(){return s.onSign()}),A._uU(10,"Sign"),A.qZA()(),A._UZ(11,"mat-divider",9),A.TgZ(12,"div",10)(13,"p"),A._uU(14,"Generated Signature"),A.qZA()(),A.TgZ(15,"div",11),A._uU(16),A.qZA(),A.TgZ(17,"div",12)(18,"button",13),A.NdJ("copied",function(dA){return s.onCopyField(dA)}),A._uU(19,"Copy Signature"),A.qZA()()()()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.message),A.xp6(1),A.Q6J("ngIf",!s.message),A.xp6(6),A.Q6J("inset",!0),A.xp6(5),A.Oqu(s.signature),A.xp6(2),A.Q6J("payload",s.signature))},directives:[wt.xw,wt.yH,wt.Wh,OA._Y,OA.JL,OA.F,Z.KE,H.Nt,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,ht.O5,Z.TO,Q.lW,AA.d,Kr.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();function _e(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Message is required."),A.qZA())}function Ue(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Signature is required."),A.qZA())}function Fe(r,y){1&r&&(A.TgZ(0,"p",13)(1,"mat-icon",14),A._uU(2,"close"),A.qZA(),A._uU(3,"Verification failed, please double check message and signature"),A.qZA())}function An(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Pubkey Used"),A.qZA())}function zn(r,y){if(1&r&&(A.TgZ(0,"div",20)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw(2);A.xp6(2),A.Oqu(null==t.verifyRes?null:t.verifyRes.pubkey)}}function gn(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",21)(1,"button",22),A.NdJ("copied",function(z){return A.CHM(t),A.oxw(2).onCopyField(z)}),A._uU(2,"Copy Pubkey"),A.qZA()()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("payload",null==t.verifyRes?null:t.verifyRes.pubkey)}}function pn(r,y){if(1&r&&(A.TgZ(0,"div",15),A._UZ(1,"mat-divider",16),A.TgZ(2,"div",17),A.YNc(3,An,2,0,"p",5),A.qZA(),A.YNc(4,zn,3,1,"div",18),A.YNc(5,gn,3,1,"div",19),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("inset",!0),A.xp6(2),A.Q6J("ngIf",t.verifyRes.verified),A.xp6(1),A.Q6J("ngIf",t.verifyRes.verified),A.xp6(1),A.Q6J("ngIf",t.verifyRes.verified)}}let Hn=(()=>{class r{constructor(t,s,z){this.dataService=t,this.snackBar=s,this.logger=z,this.message="",this.verifiedMessage="",this.signature="",this.verifiedSignature="",this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null},this.unSubs=[new c.x,new c.x]}onVerify(){if(!this.message||""===this.message||!this.signature||""===this.signature)return!0;this.dataService.verifyMessage(this.message,this.signature).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.verifyRes=t,this.showVerifyStatus=!0,this.verifiedMessage=this.message,this.verifiedSignature=this.signature})}onChange(){(this.verifiedMessage!==this.message||this.verifiedSignature!==this.signature)&&(this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null})}resetData(){this.message="",this.signature="",this.verifyRes=null,this.showVerifyStatus=!1}onCopyField(t){this.snackBar.open("Pubkey copied."),this.logger.info("Copied Text: "+t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(zA.D),A.Y36(Sr.ux),A.Y36(E.mQ))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-verify"]],decls:17,vars:6,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to verify","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Signature provided","name","signature","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["sign","ngModel"],["fxFlex","100","class","color-warn","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start","class","bordered-box read-only h-4 padding-gap",4,"ngIf"],["fxLayout","row","class","mt-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","5","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),A.NdJ("ngModelChange",function(dA){return s.message=dA})("keyup",function(){return s.onChange()}),A.qZA(),A.YNc(5,_e,2,0,"mat-error",5),A.qZA(),A.TgZ(6,"mat-form-field",3)(7,"input",6,7),A.NdJ("ngModelChange",function(dA){return s.signature=dA})("keyup",function(){return s.onChange()}),A.qZA(),A.YNc(9,Ue,2,0,"mat-error",5),A.qZA(),A.YNc(10,Fe,4,0,"p",8),A.TgZ(11,"div",9)(12,"button",10),A.NdJ("click",function(){return s.resetData()}),A._uU(13,"Clear Fields"),A.qZA(),A.TgZ(14,"button",11),A.NdJ("click",function(){return s.onVerify()}),A._uU(15,"Verify"),A.qZA()(),A.YNc(16,pn,6,4,"div",12),A.qZA()()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.message),A.xp6(1),A.Q6J("ngIf",!s.message),A.xp6(2),A.Q6J("ngModel",s.signature),A.xp6(2),A.Q6J("ngIf",!s.signature),A.xp6(1),A.Q6J("ngIf",s.showVerifyStatus&&!s.verifyRes.verified),A.xp6(6),A.Q6J("ngIf",s.showVerifyStatus&&s.verifyRes.verified))},directives:[wt.xw,wt.yH,wt.Wh,OA._Y,OA.JL,OA.F,Z.KE,H.Nt,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,ht.O5,Z.TO,S.Hw,Q.lW,AA.d,Kr.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();function On(r,y){if(1&r&&(A.TgZ(0,"div",5),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function mn(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",6),A._UZ(1,"div",7),A.TgZ(2,"mat-form-field",8)(3,"input",9),A.NdJ("ngModelChange",function(z){return A.CHM(t),A.oxw().filterValue=z})("input",function(){return A.CHM(t),A.oxw().applyFilter()})("keyup",function(){return A.CHM(t),A.oxw().applyFilter()}),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.filterValue)}}function Qn(r,y){1&r&&A._UZ(0,"mat-progress-bar",33)}function kn(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1,"Status"),A.qZA())}function jn(r,y){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(null==t?null:t.status)}}function me(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1,"Received Time"),A.qZA())}function Pe(r,y){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/y HH:mm"))}}function Ye(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1,"Resolved Time"),A.qZA())}function Ze(r,y){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.resolved_time),"dd/MMM/y HH:mm"))}}function ke(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1,"In Channel"),A.qZA())}function Bn(r,y){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(null==t?null:t.in_channel_alias)}}function $i(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1,"Out Channel"),A.qZA())}function Ln(r,y){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(null==t?null:t.out_channel_alias)}}function Aa(r,y){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Amount In (Sats)"),A.qZA())}function ta(r,y){if(1&r&&(A.TgZ(0,"td",35)(1,"span",37),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Ll(r,y){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Amount Out (Sats)"),A.qZA())}function bl(r,y){if(1&r&&(A.TgZ(0,"td",35)(1,"span",37),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Pi(r,y){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Fee (mSat)"),A.qZA())}function _r(r,y){if(1&r&&(A.TgZ(0,"td",35)(1,"span",37),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.lcZ(3,1,null==t?null:t.fee))}}function ea(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",38)(1,"div",39)(2,"mat-select",40),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",41),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Ri(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",42)(1,"button",43),A.NdJ("click",function(z){const st=A.CHM(t).$implicit;return A.oxw(2).onForwardingEventClick(st,z)}),A._uU(2,"View Info"),A.qZA()()}}function zi(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No forwarding history available."),A.qZA())}function $r(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting forwarding history..."),A.qZA())}function Ai(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function ti(r,y){if(1&r&&(A.TgZ(0,"td",44),A.YNc(1,zi,2,0,"p",45),A.YNc(2,$r,2,0,"p",45),A.YNc(3,Ai,2,1,"p",45),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const ei=function(r){return{"display-none":r}};function ni(r,y){if(1&r&&A._UZ(0,"tr",46),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,ei,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function ri(r,y){1&r&&A._UZ(0,"tr",47)}function ii(r,y){1&r&&A._UZ(0,"tr",48)}const ai=function(){return["no_event"]};function Qr(r,y){if(1&r&&(A.TgZ(0,"div",10),A.YNc(1,Qn,1,0,"mat-progress-bar",11),A.TgZ(2,"table",12,13),A.ynx(4,14),A.YNc(5,kn,2,0,"th",15),A.YNc(6,jn,2,1,"td",16),A.BQk(),A.ynx(7,17),A.YNc(8,me,2,0,"th",15),A.YNc(9,Pe,3,4,"td",16),A.BQk(),A.ynx(10,18),A.YNc(11,Ye,2,0,"th",15),A.YNc(12,Ze,3,4,"td",16),A.BQk(),A.ynx(13,19),A.YNc(14,ke,2,0,"th",15),A.YNc(15,Bn,2,1,"td",16),A.BQk(),A.ynx(16,20),A.YNc(17,$i,2,0,"th",15),A.YNc(18,Ln,2,1,"td",16),A.BQk(),A.ynx(19,21),A.YNc(20,Aa,2,0,"th",22),A.YNc(21,ta,4,4,"td",16),A.BQk(),A.ynx(22,23),A.YNc(23,Ll,2,0,"th",22),A.YNc(24,bl,4,4,"td",16),A.BQk(),A.ynx(25,24),A.YNc(26,Pi,2,0,"th",22),A.YNc(27,_r,4,3,"td",16),A.BQk(),A.ynx(28,25),A.YNc(29,ea,6,0,"th",26),A.YNc(30,Ri,3,0,"td",27),A.BQk(),A.ynx(31,28),A.YNc(32,ti,4,3,"td",29),A.BQk(),A.YNc(33,ni,1,3,"tr",30),A.YNc(34,ri,1,0,"tr",31),A.YNc(35,ii,1,0,"tr",32),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.forwardingHistoryEvents),A.xp6(31),A.Q6J("matFooterRowDef",A.DdM(6,ai)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function no(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-paginator",49),A.NdJ("page",function(z){return A.CHM(t),A.oxw().onPageChange(z)}),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("length",t.totalForwardedTransactions)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let na=(()=>{class r{constructor(t,s,z,dA,st){this.logger=t,this.commonService=s,this.store=z,this.datePipe=dA,this.router=st,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.displayedColumns=[],this.flgSticky=!1,this.indexOffset=-1,this.totalForwardedTransactions=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["in_msatoshi","out_msatoshi","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_msatoshi","out_msatoshi","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.pipe((0,PA.q)(1)).subscribe(t=>{var s;t.cln.apisCallStatus.FetchForwardingHistoryS.status===a.Bn.UN_INITIATED&&!(null===(s=t.cln.forwardingHistory.listForwards)||void 0===s?void 0:s.length)&&this.store.dispatch((0,mt.u0)({payload:{status:a.OO.SETTLED}}))}),this.store.select(g.Bo).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.eventsData.length<=0&&t.forwardingHistory.listForwards&&(this.totalForwardedTransactions=t.forwardingHistory.totalForwards||0,this.successfulEvents=t.forwardingHistory.listForwards||[],this.successfulEvents.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.successfulEvents.slice(0,this.pageSize)),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadForwardingEventsTable(this.successfulEvents.slice(0,this.pageSize))}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:a.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,this.indexOffset=0,this.totalForwardedTransactions=this.eventsData.length,this.paginator&&this.paginator.firstPage(),t.eventsData.firstChange||this.loadForwardingEventsTable(this.successfulEvents.slice(0,this.pageSize))),t.filterValue&&!t.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Event Information",message:[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:a.Gi.STRING}],[{key:"status",value:"Settled",title:"Status",width:50,type:a.Gi.STRING},{key:"fee",value:t.fee,title:"Fee (mSats)",width:50,type:a.Gi.NUMBER}],[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:a.Gi.DATE_TIME},{key:"resolved_time",value:t.resolved_time,title:"Resolved Time",width:50,type:a.Gi.DATE_TIME}],[{key:"in_channel",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:a.Gi.STRING},{key:"out_channel",value:t.out_channel_alias,title:"Outbound Channel",width:50,type:a.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"In (mSats)",width:50,type:a.Gi.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Out (mSats)",width:50,type:a.Gi.NUMBER}]]}}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new FA.by([...t]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.forwardingHistoryEvents.filterPredicate=(s,z)=>{var dA,st;return((s.received_time?(null===(dA=this.datePipe.transform(new Date(1e3*s.received_time),"dd/MMM/YYYY HH:mm"))||void 0===dA?void 0:dA.toLowerCase())+" ":"")+(s.resolved_time?(null===(st=this.datePipe.transform(new Date(1e3*s.resolved_time),"dd/MMM/YYYY HH:mm"))||void 0===st?void 0:st.toLowerCase())+" ":"")+(s.in_channel?s.in_channel.toLowerCase()+" ":"")+(s.out_channel?s.out_channel.toLowerCase()+" ":"")+(s.in_channel_alias?s.in_channel_alias.toLowerCase()+" ":"")+(s.out_channel_alias?s.out_channel_alias.toLowerCase()+" ":"")+(s.in_msatoshi?s.in_msatoshi/1e3+" ":"")+(s.out_msatoshi?s.out_msatoshi/1e3+" ":"")+(s.fee?s.fee+" ":"")).includes(z)},this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}onPageChange(t){this.pageSize!==t.pageSize?(this.pageSize=t.pageSize,this.indexOffset=0):this.indexOffset=t.pageIndex*this.pageSize,this.loadForwardingEventsTable(this.successfulEvents.slice(this.indexOffset,this.indexOffset+this.pageSize))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh),A.Y36(ht.uU),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-forwarding-history"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Events")}]),A.TTD],decls:5,vars:4,consts:[["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,"length","pageSize","pageSizeOptions","showFirstLastButtons","page",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","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["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,"dataSource"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,On,2,1,"div",1),A.YNc(2,mn,4,1,"div",2),A.YNc(3,Qr,36,7,"div",3),A.YNc(4,no,1,4,"mat-paginator",4),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[wt.xw,wt.Wh,ht.O5,wt.yH,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,lA.$V,Y.pW,FA.BZ,et.YE,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,CA.gD,CA.$L,wA.ey,Q.lW,FA.mD,FA.yh,FA.Ke,FA.Q2,ht.mk,m.oO,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.uU,ht.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();function ro(r,y){if(1&r&&(A.TgZ(0,"div",5),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function io(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",6),A._UZ(1,"div",7),A.TgZ(2,"mat-form-field",8)(3,"input",9),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(z){return A.CHM(t),A.oxw().selFilter=z}),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.selFilter)}}function ra(r,y){1&r&&A._UZ(0,"mat-progress-bar",32)}function Wl(r,y){1&r&&(A.TgZ(0,"th",33),A._uU(1,"Received Time"),A.qZA())}function Zl(r,y){if(1&r&&(A.TgZ(0,"td",34),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/y HH:mm"))}}function Xl(r,y){1&r&&(A.TgZ(0,"th",33),A._uU(1,"Resolved Time"),A.qZA())}function ql(r,y){if(1&r&&(A.TgZ(0,"td",34),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.resolved_time),"dd/MMM/y HH:mm"))}}function _l(r,y){1&r&&(A.TgZ(0,"th",33),A._uU(1,"In Channel"),A.qZA())}function $l(r,y){if(1&r&&(A.TgZ(0,"td",34),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(null==t?null:t.in_channel_alias)}}function Ac(r,y){1&r&&(A.TgZ(0,"th",33),A._uU(1,"Out Channel"),A.qZA())}function tc(r,y){if(1&r&&(A.TgZ(0,"td",34),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(null==t?null:t.out_channel_alias)}}function ec(r,y){1&r&&(A.TgZ(0,"th",35),A._uU(1,"Amount In (Sats)"),A.qZA())}function nc(r,y){if(1&r&&(A.TgZ(0,"td",34)(1,"span",36),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function rc(r,y){1&r&&(A.TgZ(0,"th",35),A._uU(1,"Amount Out (Sats)"),A.qZA())}function ic(r,y){if(1&r&&(A.TgZ(0,"td",34)(1,"span",36),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function ac(r,y){1&r&&(A.TgZ(0,"th",35),A._uU(1,"Fee (mSats)"),A.qZA())}function oc(r,y){if(1&r&&(A.TgZ(0,"td",34)(1,"span",36),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,null==t?null:t.fee,"1.0-0"))}}function sc(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",37)(1,"div",38)(2,"mat-select",39),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",40),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function lc(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",41)(1,"button",42),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onFailedEventClick(dA)}),A._uU(2,"View Info"),A.qZA()()}}function cc(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No failed transaction available."),A.qZA())}function gc(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting failed transactions..."),A.qZA())}function Bc(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function uc(r,y){if(1&r&&(A.TgZ(0,"td",43),A.YNc(1,cc,2,0,"p",44),A.YNc(2,gc,2,0,"p",44),A.YNc(3,Bc,2,1,"p",44),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const fc=function(r){return{"display-none":r}};function hc(r,y){if(1&r&&A._UZ(0,"tr",45),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,fc,(null==t.failedForwardingEvents?null:t.failedForwardingEvents.data)&&(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)>0))}}function Ec(r,y){1&r&&A._UZ(0,"tr",46)}function wc(r,y){1&r&&A._UZ(0,"tr",47)}const Cc=function(){return["no_event"]};function Qc(r,y){if(1&r&&(A.TgZ(0,"div",10),A.YNc(1,ra,1,0,"mat-progress-bar",11),A.TgZ(2,"table",12,13),A.ynx(4,14),A.YNc(5,Wl,2,0,"th",15),A.YNc(6,Zl,3,4,"td",16),A.BQk(),A.ynx(7,17),A.YNc(8,Xl,2,0,"th",15),A.YNc(9,ql,3,4,"td",16),A.BQk(),A.ynx(10,18),A.YNc(11,_l,2,0,"th",15),A.YNc(12,$l,2,1,"td",16),A.BQk(),A.ynx(13,19),A.YNc(14,Ac,2,0,"th",15),A.YNc(15,tc,2,1,"td",16),A.BQk(),A.ynx(16,20),A.YNc(17,ec,2,0,"th",21),A.YNc(18,nc,4,4,"td",16),A.BQk(),A.ynx(19,22),A.YNc(20,rc,2,0,"th",21),A.YNc(21,ic,4,4,"td",16),A.BQk(),A.ynx(22,23),A.YNc(23,ac,2,0,"th",21),A.YNc(24,oc,4,4,"td",16),A.BQk(),A.ynx(25,24),A.YNc(26,sc,6,0,"th",25),A.YNc(27,lc,3,0,"td",26),A.BQk(),A.ynx(28,27),A.YNc(29,uc,4,3,"td",28),A.BQk(),A.YNc(30,hc,1,3,"tr",29),A.YNc(31,Ec,1,0,"tr",30),A.YNc(32,wc,1,0,"tr",31),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.failedForwardingEvents),A.xp6(28),A.Q6J("matFooterRowDef",A.DdM(6,Cc)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function dc(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-paginator",48),A.NdJ("page",function(z){return A.CHM(t),A.oxw().onPageChange(z)}),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("length",t.totalFailedTransactions)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Mc=(()=>{class r{constructor(t,s,z,dA,st){this.logger=t,this.commonService=s,this.store=z,this.datePipe=dA,this.router=st,this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.selFilter="",this.indexOffset=-1,this.totalFailedTransactions=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["received_time","in_channel","in_msatoshi","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_channel","out_channel","in_msatoshi","out_msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.dispatch((0,mt.u0)({payload:{status:a.OO.FAILED}})),this.store.select(g.xQ).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.totalFailedTransactions=t.failedForwardingHistory.totalForwards||0,this.failedEvents=t.failedForwardingHistory.listForwards||[],this.failedEvents.length>0&&this.sort&&this.paginator&&this.loadFailedEventsTable(this.failedEvents.slice(0,this.pageSize)),this.logger.info(t)})}ngAfterViewInit(){this.failedEvents.length>0&&this.loadFailedEventsTable(this.failedEvents.slice(0,this.pageSize))}onFailedEventClick(t){const s=[[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:a.Gi.DATE_TIME},{key:"resolved_time",value:t.resolved_time,title:"Resolved Time",width:50,type:a.Gi.DATE_TIME}],[{key:"in_channel_alias",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:a.Gi.STRING},{key:"out_channel_alias",value:t.out_channel_alias,title:"Outbound Channel",width:50,type:a.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"Amount In (mSats)",width:33,type:a.Gi.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Amount Out (mSats)",width:33,type:a.Gi.NUMBER},{key:"fee",value:t.fee,title:"Fee (mSats)",width:34,type:a.Gi.NUMBER}]];t.payment_hash&&s.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:a.Gi.STRING}]),this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Failed Event Information",message:s}}}))}loadFailedEventsTable(t){this.failedForwardingEvents=new FA.by([...t]),this.failedForwardingEvents.sort=this.sort,this.failedForwardingEvents.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.failedForwardingEvents.filterPredicate=(s,z)=>{var dA,st;const Ae=s.received_time?null===(dA=this.datePipe.transform(new Date(1e3*s.received_time),"dd/MMM/YYYY HH:mm"))||void 0===dA?void 0:dA.toLowerCase():""+(s.resolved_time?null===(st=this.datePipe.transform(new Date(1e3*s.resolved_time),"dd/MMM/YYYY HH:mm"))||void 0===st?void 0:st.toLowerCase():"")+(s.payment_hash?s.payment_hash.toLowerCase():"")+(s.in_channel?s.in_channel.toLowerCase():"")+(s.out_channel?s.out_channel.toLowerCase():"")+(s.in_channel_alias?s.in_channel_alias.toLowerCase():"")+(s.out_channel_alias?s.out_channel_alias.toLowerCase():"")+(s.in_msatoshi?s.in_msatoshi/1e3:"")+(s.out_msatoshi?s.out_msatoshi/1e3:"")+(s.fee?s.fee:"");return(null==Ae?void 0:Ae.includes(z))||!1},this.applyFilter(),this.logger.info(this.failedForwardingEvents)}onDownloadCSV(){this.failedForwardingEvents&&this.failedForwardingEvents.data&&this.failedForwardingEvents.data.length>0&&this.commonService.downloadFile(this.failedForwardingEvents.data,"Failed-transactions")}applyFilter(){this.failedForwardingEvents.filter=this.selFilter.trim().toLowerCase()}onPageChange(t){this.pageSize!==t.pageSize?(this.pageSize=t.pageSize,this.indexOffset=0):this.indexOffset=t.pageIndex*this.pageSize,this.loadFailedEventsTable(this.failedEvents.slice(this.indexOffset,this.indexOffset+this.pageSize))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh),A.Y36(ht.uU),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-failed-history"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Failed events")}])],decls:5,vars:4,consts:[["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,"length","pageSize","pageSizeOptions","showFirstLastButtons","page",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","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource"],["table",""],["matColumnDef","received_time"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,ro,2,1,"div",1),A.YNc(2,io,4,1,"div",2),A.YNc(3,Qc,33,7,"div",3),A.YNc(4,dc,1,4,"mat-paginator",4),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[wt.xw,wt.Wh,ht.O5,wt.yH,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,lA.$V,Y.pW,FA.BZ,et.YE,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,CA.gD,CA.$L,wA.ey,Q.lW,FA.mD,FA.yh,FA.Ke,FA.Q2,ht.mk,m.oO,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.uU,ht.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();const pc=["tableIn"],Ic=["tableOut"],mc=["paginatorIn"],vc=["paginatorOut"];function Dc(r,y){if(1&r&&(A.TgZ(0,"div",3),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function yc(r,y){1&r&&A._UZ(0,"mat-progress-bar",36)}function xc(r,y){1&r&&(A.TgZ(0,"th",37),A._uU(1,"Channel ID"),A.qZA())}const ao=function(r){return{"max-width":r}};function Fc(r,y){if(1&r&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&r){const t=y.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,ao,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.channel_id)}}function Yc(r,y){1&r&&(A.TgZ(0,"th",37),A._uU(1,"Peer Alias"),A.qZA())}function Tc(r,y){if(1&r&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&r){const t=y.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,ao,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.alias)}}function Sc(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Events"),A.qZA())}function Nc(r,y){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.lcZ(3,1,t.events))}}function Uc(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Amount (Sats)"),A.qZA())}function Pc(r,y){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function Rc(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Fee (Sats)"),A.qZA())}function zc(r,y){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function Lc(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No incoming routing peer available."),A.qZA())}function bc(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting incoming routing peers..."),A.qZA())}function Gc(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function Hc(r,y){if(1&r&&(A.TgZ(0,"td",42),A.YNc(1,Lc,2,0,"p",43),A.YNc(2,bc,2,0,"p",43),A.YNc(3,Gc,2,1,"p",43),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Hl=function(r){return{"display-none":r}};function Jc(r,y){if(1&r&&A._UZ(0,"tr",44),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Hl,(null==t.RoutingPeersIncoming?null:t.RoutingPeersIncoming.data)&&(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)>0))}}function Oc(r,y){1&r&&A._UZ(0,"tr",45)}function kc(r,y){1&r&&A._UZ(0,"tr",46)}function jc(r,y){1&r&&A._UZ(0,"mat-progress-bar",36)}function Kc(r,y){1&r&&(A.TgZ(0,"th",37),A._uU(1,"Channel ID"),A.qZA())}function Vc(r,y){if(1&r&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&r){const t=y.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,ao,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.channel_id)}}function Wc(r,y){1&r&&(A.TgZ(0,"th",37),A._uU(1,"Peer Alias"),A.qZA())}function Zc(r,y){if(1&r&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&r){const t=y.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,ao,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.alias)}}function Xc(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Events"),A.qZA())}function qc(r,y){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.lcZ(3,1,t.events))}}function _c(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Amount (Sats)"),A.qZA())}function $c(r,y){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function Ag(r,y){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Fee (Sats)"),A.qZA())}function tg(r,y){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function eg(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No outgoing routing peer available."),A.qZA())}function ng(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting outgoing routing peers..."),A.qZA())}function rg(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function ig(r,y){if(1&r&&(A.TgZ(0,"td",42),A.YNc(1,eg,2,0,"p",43),A.YNc(2,ng,2,0,"p",43),A.YNc(3,rg,2,1,"p",43),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}function ag(r,y){if(1&r&&A._UZ(0,"tr",44),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Hl,(null==t.RoutingPeersOutgoing?null:t.RoutingPeersOutgoing.data)&&(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)>0))}}function og(r,y){1&r&&A._UZ(0,"tr",45)}function sg(r,y){1&r&&A._UZ(0,"tr",46)}const lg=function(r,y){return{"mt-2":r,"mt-1":y}},cg=function(){return["no_incoming_event"]},gg=function(r){return{"mt-2":r}},Bg=function(){return["no_outgoing_event"]};function ug(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7),A._uU(4,"Incoming"),A.qZA(),A.TgZ(5,"mat-form-field",8)(6,"input",9),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyIncomingFilter()})("ngModelChange",function(z){return A.CHM(t),A.oxw().filterIn=z}),A.qZA()()(),A.TgZ(7,"div",10),A.YNc(8,yc,1,0,"mat-progress-bar",11),A.TgZ(9,"table",12,13),A.ynx(11,14),A.YNc(12,xc,2,0,"th",15),A.YNc(13,Fc,2,4,"td",16),A.BQk(),A.ynx(14,17),A.YNc(15,Yc,2,0,"th",15),A.YNc(16,Tc,2,4,"td",16),A.BQk(),A.ynx(17,18),A.YNc(18,Sc,2,0,"th",19),A.YNc(19,Nc,4,3,"td",20),A.BQk(),A.ynx(20,21),A.YNc(21,Uc,2,0,"th",19),A.YNc(22,Pc,4,4,"td",20),A.BQk(),A.ynx(23,22),A.YNc(24,Rc,2,0,"th",19),A.YNc(25,zc,4,4,"td",20),A.BQk(),A.ynx(26,23),A.YNc(27,Hc,4,3,"td",24),A.BQk(),A.YNc(28,Jc,1,3,"tr",25),A.YNc(29,Oc,1,0,"tr",26),A.YNc(30,kc,1,0,"tr",27),A.qZA()(),A._UZ(31,"mat-paginator",28,29),A.qZA(),A.TgZ(33,"div",30)(34,"div",6)(35,"div",7),A._uU(36,"Outgoing"),A.qZA(),A.TgZ(37,"mat-form-field",8)(38,"input",9),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyOutgoingFilter()})("ngModelChange",function(z){return A.CHM(t),A.oxw().filterOut=z}),A.qZA()()(),A.TgZ(39,"div",31),A.YNc(40,jc,1,0,"mat-progress-bar",11),A.TgZ(41,"table",32,33),A.ynx(43,14),A.YNc(44,Kc,2,0,"th",15),A.YNc(45,Vc,2,4,"td",16),A.BQk(),A.ynx(46,17),A.YNc(47,Wc,2,0,"th",15),A.YNc(48,Zc,2,4,"td",16),A.BQk(),A.ynx(49,18),A.YNc(50,Xc,2,0,"th",19),A.YNc(51,qc,4,3,"td",20),A.BQk(),A.ynx(52,21),A.YNc(53,_c,2,0,"th",19),A.YNc(54,$c,4,4,"td",20),A.BQk(),A.ynx(55,22),A.YNc(56,Ag,2,0,"th",19),A.YNc(57,tg,4,4,"td",20),A.BQk(),A.ynx(58,34),A.YNc(59,ig,4,3,"td",24),A.BQk(),A.YNc(60,ag,1,3,"tr",25),A.YNc(61,og,1,0,"tr",26),A.YNc(62,sg,1,0,"tr",27),A.qZA(),A._UZ(63,"mat-paginator",28,35),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(2),A.Q6J("ngClass",A.WLB(22,lg,t.screenSize===t.screenSizeEnum.XS,t.screenSize===t.screenSizeEnum.SM)),A.xp6(4),A.Q6J("ngModel",t.filterIn),A.xp6(2),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.RoutingPeersIncoming),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(25,cg)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS),A.xp6(3),A.Q6J("ngClass",A.VKq(26,gg,t.screenSize!==t.screenSizeEnum.LG)),A.xp6(4),A.Q6J("ngModel",t.filterOut),A.xp6(2),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.RoutingPeersOutgoing),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(28,Bg)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let fg=(()=>{class r{constructor(t,s,z){this.logger=t,this.commonService=s,this.store=z,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.displayedColumns=[],this.RoutingPeersIncoming=[],this.RoutingPeersOutgoing=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","total_fee"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","total_fee"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","total_amount","total_fee"]):(this.flgSticky=!0,this.displayedColumns=["channel_id","alias","events","total_amount","total_fee"])}ngOnInit(){this.store.select(g.Bo).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.successfulEvents=t.forwardingHistory.listForwards||[],this.successfulEvents.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadRoutingPeersTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:a.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,t.eventsData.firstChange||this.loadRoutingPeersTable(this.successfulEvents))}loadRoutingPeersTable(t){if(t.length>0){const s=this.groupRoutingPeers(t);this.RoutingPeersIncoming=new FA.by(s[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(z,dA)=>JSON.stringify(z).toLowerCase().includes(dA),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new FA.by(s[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(z,dA)=>JSON.stringify(z).toLowerCase().includes(dA),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new FA.by([]),this.RoutingPeersOutgoing=new FA.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter(),this.logger.info(this.RoutingPeersIncoming),this.logger.info(this.RoutingPeersOutgoing)}groupRoutingPeers(t){const s=[],z=[];return t.forEach(dA=>{const st=s.find(un=>un.channel_id===dA.in_channel),Ae=z.find(un=>un.channel_id===dA.out_channel);st?(st.events++,st.total_amount=+st.total_amount+ +dA.in_msatoshi,st.total_fee=dA.in_msatoshi-dA.out_msatoshi+ +st.total_fee):s.push({channel_id:dA.in_channel,alias:dA.in_channel_alias,events:1,total_amount:dA.in_msatoshi,total_fee:dA.in_msatoshi-dA.out_msatoshi}),Ae?(Ae.events++,Ae.total_amount=+Ae.total_amount+ +dA.out_msatoshi,Ae.total_fee=dA.in_msatoshi-dA.out_msatoshi+ +Ae.total_fee):z.push({channel_id:dA.out_channel,alias:dA.out_channel_alias,events:1,total_amount:dA.out_msatoshi,total_fee:dA.in_msatoshi-dA.out_msatoshi})}),[this.commonService.sortDescByKey(s,"total_fee"),this.commonService.sortDescByKey(z,"total_fee")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-routing-peers"]],viewQuery:function(t,s){if(1&t&&(A.Gf(pc,5,et.YE),A.Gf(Ic,5,et.YE),A.Gf(mc,5),A.Gf(vc,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sortIn=z.first),A.iGM(z=A.CRH())&&(s.sortOut=z.first),A.iGM(z=A.CRH())&&(s.paginatorIn=z.first),A.iGM(z=A.CRH())&&(s.paginatorOut=z.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Peers")}]),A.TTD],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["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",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"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",1,"overflow-auto","incoming-table",3,"dataSource"],["tableIn",""],["matColumnDef","channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","total_amount"],["matColumnDef","total_fee"],["matColumnDef","no_incoming_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","end stretch"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,Dc,2,1,"div",1),A.YNc(2,ug,65,29,"div",2),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[wt.xw,wt.Wh,ht.O5,wt.yH,ht.mk,m.oO,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,lA.$V,Y.pW,FA.BZ,et.YE,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,ht.PC,m.Zl,FA.mD,FA.yh,FA.Ke,FA.Q2,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.JJ],styles:[".mat-column-channelId[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();function hg(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",7),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=y.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let Eg=(()=>{class r{constructor(t){this.router=t,this.faChartBar=h.koM,this.links=[{link:"routingreport",name:"Routing"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const z=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=z?z.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Reports"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),A.YNc(8,hg,2,3,"div",6),A.qZA(),A._UZ(9,"router-outlet"),A.qZA()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartBar),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[wt.xw,wt.Wh,f.BN,w.a8,w.dn,JA.BU,ht.sg,JA.Nj,qt.rH,qt.lC],styles:[""]}),r})();var Jl=Nt(7772),Ol=Nt(7671),kl=Nt(1210);function wg(r,y){1&r&&(A.TgZ(0,"div",14),A._UZ(1,"mat-progress-bar",15),A.TgZ(2,"p"),A._uU(3,"Getting Forwarding History..."),A.qZA()())}function Cg(r,y){if(1&r&&(A.TgZ(0,"div",16),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function Qg(r,y){if(1&r&&(A.TgZ(0,"div",17),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=A.oxw();A.Q6J("@fadeIn",t.totalFeeMsat),A.xp6(1),A.AsE("",A.xi3(2,3,t.totalFeeMsat/1e3||0,"1.0-2")," Sats/",A.lcZ(3,6,t.filteredEventsBySelectedPeriod.length||0)," Events")}}function dg(r,y){1&r&&(A.TgZ(0,"div",14),A._uU(1,"No routing report for the selected period"),A.qZA())}function Mg(r,y){if(1&r&&(A.TgZ(0,"span")(1,"span",20),A._uU(2),A.ALo(3,"number"),A.qZA(),A.TgZ(4,"span",20),A._uU(5),A.ALo(6,"number"),A.qZA()()),2&r){const t=y.model,s=A.oxw(2);A.xp6(2),A.hij("Events: ",A.lcZ(3,2,(s.selReportBy===s.reportBy.EVENTS?t.value:t.extra.totalEvents)||0),""),A.xp6(3),A.hij("Fee: ",A.xi3(6,4,(s.selReportBy===s.reportBy.EVENTS?t.extra.totalFees:t.value)||0,"1.0-2"),"")}}function pg(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"ngx-charts-bar-vertical",18),A.NdJ("select",function(z){return A.CHM(t),A.oxw().onChartBarSelected(z)})("mouseup",function(z){return A.CHM(t),A.oxw().onChartMouseUp(z)}),A.YNc(1,Mg,7,7,"ng-template",null,19,A.W1O),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("view",t.view)("results",t.routingReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function Ig(r,y){if(1&r&&A._UZ(0,"rtl-cln-forwarding-history",21),2&r){const t=A.oxw();A.Q6J("eventsData",t.filteredEventsBySelectedPeriod)("filterValue",t.eventFilterValue)}}let mg=(()=>{class r{constructor(t,s,z,dA){this.logger=t,this.commonService=s,this.store=z,this.dataService=dA,this.reportPeriod=a.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.reportBy=a.Xr,this.selReportBy=a.Xr.FEES,this.totalFeeMsat=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=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===a.cu.XS||this.screenSize===a.cu.SM),this.store.pipe((0,PA.q)(1)).subscribe(t=>{var s;t.cln.apisCallStatus.FetchForwardingHistoryS.status===a.Bn.UN_INITIATED&&!(null===(s=t.cln.forwardingHistory.listForwards)||void 0===s?void 0:s.length)&&this.store.dispatch((0,mt.u0)({payload:{status:a.OO.SETTLED}}))}),this.store.select(g.Bo).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{t.forwardingHistory.status===a.OO.SETTLED&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR?this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:"":this.apiCallStatus.status===a.Bn.COMPLETED&&(this.events=t.forwardingHistory.listForwards||[],this.filterForwardingEvents(this.startDate,this.endDate)),this.logger.info(t))}),this.commonService.containerSizeUpdated.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case a.cu.MD:this.screenPaddingX=t.width/10;break;case a.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}filterForwardingEvents(t,s){const z=Math.round(t.getTime()/1e3),dA=Math.round(s.getTime()/1e3);this.filteredEventsBySelectedPeriod=[],this.routingReportData=[],this.totalFeeMsat=null,this.events&&this.events.length>0&&(this.events.forEach(st=>{st.received_time&&st.received_time>=z&&st.received_time0&&"ngx-charts"===t.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(t){this.eventFilterValue=this.reportPeriod===a.op[1]?t.name+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+a.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(t){const s=Math.round(t.getTime()/1e3),z=[];if(this.totalFeeMsat=0,this.reportPeriod===a.op[1]){for(let dA=0;dA<12;dA++)z.push({name:a.gg[dA].name,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(dA=>{const st=dA.received_time?new Date(1e3*+dA.received_time).getMonth():12;return z[st].value=dA.fee?z[st].value+ +dA.fee/1e3:z[st].value,z[st].extra.totalEvents=z[st].extra.totalEvents+1,this.totalFeeMsat=dA.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +dA.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}else{for(let dA=0;dA{const st=dA.received_time?Math.floor((+dA.received_time-s)/this.secondsInADay):0;return z[st].value=dA.fee?z[st].value+ +dA.fee/1e3:z[st].value,z[st].extra.totalEvents=z[st].extra.totalEvents+1,this.totalFeeMsat=dA.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +dA.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}return z}prepareEventsReport(t){const s=Math.round(t.getTime()/1e3),z=[];if(this.totalFeeMsat=0,this.reportPeriod===a.op[1]){for(let dA=0;dA<12;dA++)z.push({name:a.gg[dA].name,value:0,extra:{totalFees:0}});this.filteredEventsBySelectedPeriod.map(dA=>{const st=dA.received_time?new Date(1e3*+dA.received_time).getMonth():12;return z[st].value=z[st].value+1,z[st].extra.totalFees=dA.fee?z[st].extra.totalFees+ +dA.fee/1e3:z[st].extra.totalFees,this.totalFeeMsat=dA.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +dA.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}else{for(let dA=0;dA{const st=dA.received_time?Math.floor((+dA.received_time-s)/this.secondsInADay):0;return z[st].value=z[st].value+1,z[st].extra.totalFees=dA.fee?z[st].extra.totalFees+ +dA.fee/1e3:z[st].extra.totalFees,this.totalFeeMsat=dA.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +dA.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}return z}onSelectionChange(t){const s=t.selDate.getMonth(),z=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===a.op[1]?(this.startDate=new Date(z,0,1,0,0,0),this.endDate=new Date(z,11,31,23,59,59)):(this.startDate=new Date(z,s,1,0,0,0),this.endDate=new Date(z,s,this.getMonthDays(s,z),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(t,s){return 1===t&&s%4==0?a.gg[t].days+1:a.gg[t].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(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh),A.Y36(zA.D))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-routing-report"]],hostBindings:function(t,s){1&t&&A.NdJ("mouseup",function(dA){return s.onChartMouseUp(dA)})},decls:19,vars:9,consts:[["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 start",1,"my-1",3,"ngModel","ngModelChange","change"],[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 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1 error-border",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],[1,"mt-1"],["class","one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup",4,"ngIf"],[3,"eventsData","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],["mode","indeterminate"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1","error-border"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),A.NdJ("stepChanged",function(dA){return s.onSelectionChange(dA)}),A.qZA(),A.TgZ(2,"div",2)(3,"mat-radio-group",3),A.NdJ("ngModelChange",function(dA){return s.selReportBy=dA})("change",function(){return s.onSelReportByChange()}),A.TgZ(4,"span",4),A._uU(5,"Report By: "),A.qZA(),A.TgZ(6,"mat-radio-button",5),A._uU(7,"Fees"),A.qZA(),A.TgZ(8,"mat-radio-button",6),A._uU(9,"Events"),A.qZA()()(),A.TgZ(10,"div",7),A.YNc(11,wg,4,0,"div",8),A.YNc(12,Cg,2,1,"div",9),A.YNc(13,Qg,4,8,"div",10),A.YNc(14,dg,2,0,"div",8),A.TgZ(15,"div",11),A.YNc(16,pg,3,11,"ngx-charts-bar-vertical",12),A.qZA(),A.TgZ(17,"div",11),A.YNc(18,Ig,1,2,"rtl-cln-forwarding-history",13),A.qZA()()()),2&t&&(A.xp6(3),A.Q6J("ngModel",s.selReportBy),A.xp6(3),A.s9C("value",s.reportBy.FEES),A.xp6(2),A.s9C("value",s.reportBy.EVENTS),A.xp6(3),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.ERROR),A.xp6(1),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.COMPLETED&&s.routingReportData.length>0&&s.filteredEventsBySelectedPeriod.length>0),A.xp6(1),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.COMPLETED&&(s.routingReportData.length<=0||s.filteredEventsBySelectedPeriod.length<=0)),A.xp6(2),A.Q6J("ngIf",s.routingReportData.length>0&&s.filteredEventsBySelectedPeriod.length>0),A.xp6(2),A.Q6J("ngIf",s.filteredEventsBySelectedPeriod&&s.filteredEventsBySelectedPeriod.length>0))},directives:[wt.xw,wt.Wh,wt.yH,Ol.D,HA.VQ,OA.JJ,OA.On,HA.U0,ht.O5,Y.pW,kl.K$,na],pipes:[ht.JJ],styles:[""],data:{animation:[Jl.J]}}),r})();var vg=Nt(165);function Dg(r,y){if(1&r&&(A.TgZ(0,"div",10),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.AsE(" Paid ",A.xi3(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod/1e3||0,"1.0-2")," Sats/",A.lcZ(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function yg(r,y){if(1&r&&(A.TgZ(0,"div",10),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.AsE(" Received ",A.xi3(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod/1e3||0,"1.0-2")," Sats/",A.lcZ(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function xg(r,y){if(1&r&&(A.TgZ(0,"div",8),A.YNc(1,Dg,4,7,"div",9),A.YNc(2,yg,4,7,"div",9),A.qZA()),2&r){const t=A.oxw();A.Q6J("@fadeIn",t.transactionsReportSummary),A.xp6(1),A.Q6J("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod),A.xp6(1),A.Q6J("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function Fg(r,y){1&r&&(A.TgZ(0,"div",11),A._uU(1,"No transactions report for the selected period"),A.qZA())}function Yg(r,y){if(1&r&&(A.TgZ(0,"span",14),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=y.model;A.xp6(1),A.HOy("",t.name,": ",A.xi3(2,4,t.value||0,"1.0-2"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",A.lcZ(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function Tg(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"ngx-charts-bar-vertical-2d",12),A.NdJ("select",function(z){return A.CHM(t),A.oxw().onChartBarSelected(z)})("mouseup",function(z){return A.CHM(t),A.oxw().onChartMouseUp(z)}),A.YNc(1,Yg,4,9,"ng-template",null,13,A.W1O),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("view",t.view)("results",t.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",t.reportPeriod===t.scrollRanges[0]?2:4)}}function Sg(r,y){if(1&r&&A._UZ(0,"rtl-transactions-report-table",15),2&r){const t=A.oxw();A.Q6J("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let Ng=(()=>{class r{constructor(t,s,z){this.logger=t,this.commonService=s,this.store=z,this.scrollRanges=a.op,this.reportPeriod=a.op[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[],this.transactionsNonZeroReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Amount (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===a.cu.XS||this.screenSize===a.cu.SM),this.store.select(g.PP).pipe((0,i.R)(this.unSubs[0]),(0,o.M)(this.store.select(g.gc))).subscribe(([t,s])=>{this.payments=t.payments,this.invoices=s.listInvoices.invoices,this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()}),this.commonService.containerSizeUpdated.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case a.cu.MD:this.screenPaddingX=t.width/10;break;case a.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(t){this.transactionFilterValue=this.reportPeriod===a.op[1]?t.series+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+a.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,s){const z=Math.round(t.getTime()/1e3),dA=Math.round(s.getTime()/1e3),st=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const Ae=this.payments.filter(Qe=>"complete"===Qe.status&&Qe.created_at>=z&&Qe.created_at"paid"===Qe.status&&Qe.paid_at>=z&&Qe.paid_at{const tn=new Date(1e3*Qe.created_at).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+Qe.msatoshi_sent,st[tn].series[0].value=st[tn].series[0].value+Qe.msatoshi_sent/1e3,st[tn].series[0].extra.total=st[tn].series[0].extra.total+1,this.transactionsReportSummary}),un.map(Qe=>{const tn=new Date(1e3*+Qe.paid_at).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+Qe.msatoshi_received,st[tn].series[1].value=st[tn].series[1].value+Qe.msatoshi_received/1e3,st[tn].series[1].extra.total=st[tn].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let Qe=0;Qe{const tn=Math.floor((+Qe.created_at-z)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+Qe.msatoshi_sent,st[tn].series[0].value=st[tn].series[0].value+Qe.msatoshi_sent/1e3,st[tn].series[0].extra.total=st[tn].series[0].extra.total+1,this.transactionsReportSummary}),un.map(Qe=>{const tn=Math.floor((+Qe.paid_at-z)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+Qe.msatoshi_received,st[tn].series[1].value=st[tn].series[1].value+Qe.msatoshi_received/1e3,st[tn].series[1].extra.total=st[tn].series[1].extra.total+1,this.transactionsReportSummary})}return st}prepareTableData(){return this.transactionsReportData.reduce((t,s)=>s.series[0].extra.total>0||s.series[1].extra.total>0?t.concat({date:s.date,amount_paid:s.series[0].value,num_payments:s.series[0].extra.total,amount_received:s.series[1].value,num_invoices:s.series[1].extra.total}):t,[])}onSelectionChange(t){const s=t.selDate.getMonth(),z=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===a.op[1]?(this.startDate=new Date(z,0,1,0,0,0),this.endDate=new Date(z,11,31,23,59,59)):(this.startDate=new Date(z,s,1,0,0,0),this.endDate=new Date(z,s,this.getMonthDays(s,z),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(t,s){return 1===t&&s%4==0?a.gg[t].days+1:a.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-transactions-report"]],hostBindings:function(t,s){1&t&&A.NdJ("mouseup",function(dA){return s.onChartMouseUp(dA)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[3,"dataList","dataRange","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"dataList","dataRange","filterValue"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),A.NdJ("stepChanged",function(dA){return s.onSelectionChange(dA)}),A.qZA(),A.TgZ(2,"div",2),A.YNc(3,xg,3,3,"div",3),A.YNc(4,Fg,2,0,"div",4),A.TgZ(5,"div",5),A.YNc(6,Tg,3,13,"ngx-charts-bar-vertical-2d",6),A.qZA(),A.TgZ(7,"div",5),A.YNc(8,Sg,1,3,"rtl-transactions-report-table",7),A.qZA()()()),2&t&&(A.xp6(3),A.Q6J("ngIf",s.transactionsNonZeroReportData.length>0),A.xp6(1),A.Q6J("ngIf",s.transactionsNonZeroReportData.length<=0),A.xp6(2),A.Q6J("ngIf",s.transactionsNonZeroReportData.length>0),A.xp6(2),A.Q6J("ngIf",s.transactionsNonZeroReportData.length>0))},directives:[wt.xw,wt.Wh,wt.yH,Ol.D,ht.O5,kl.H5,vg.g],pipes:[ht.JJ],styles:[""],data:{animation:[Jl.J]}}),r})();var ze=Nt(1643),Ug=Nt(9442);function Pg(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",8),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=y.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let Rg=(()=>{class r{constructor(t){this.router=t,this.faSearch=h.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const z=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=z?z.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-graph"]],decls:11,vars:2,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Graph Lookups"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),A.YNc(8,Pg,2,3,"div",6),A.qZA(),A.TgZ(9,"div",7),A._UZ(10,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faSearch),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[wt.xw,wt.Wh,f.BN,w.a8,w.dn,JA.BU,ht.sg,JA.Nj,qt.rH,wt.yH,qt.lC],styles:[""]}),r})();var zg=Nt(4641),Lg=Nt(8493);function bg(r,y){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.offerError)}}function Gg(r,y){if(1&r&&(A.TgZ(0,"div",21),A._UZ(1,"fa-icon",22),A.YNc(2,bg,2,1,"span",23),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.offerError)}}let Hg=(()=>{class r{constructor(t,s,z,dA,st,Ae){this.dialogRef=t,this.data=s,this.store=z,this.decimalPipe=dA,this.commonService=st,this.actions=Ae,this.faExclamationTriangle=h.eHv,this.selNode={},this.description="",this.vendor="",this.offerValueHint="",this.information={},this.pageSize=a.IV,this.offerError="",this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(g.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(g.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t,this.vendor=this.information.alias}),this.actions.pipe((0,i.R)(this.unSubs[2]),(0,qA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewOffer"===t.payload.action&&(t.payload.status===a.Bn.ERROR&&(this.offerError=t.payload.message),t.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddOffer(){this.offerError="",this.store.dispatch((0,mt.dh)({payload:{amount:this.offerValue?this.offerValue+"sats":"any",description:this.description,vendor:this.vendor}}))}resetData(){this.description="",this.vendor=this.information.alias,this.offerValue=null,this.offerValueHint="",this.offerError=""}onOfferValueChange(){this.selNode.fiatConversion&&this.offerValue>99&&(this.offerValueHint="",this.commonService.convertCurrency(this.offerValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[3])).subscribe({next:t=>{this.offerValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,a.Xz.OTHER)+" "+t.unit},error:t=>{this.offerValueHint="Conversion Error: "+t}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(dt.so),A.Y36(dt.WI),A.Y36(u.yh),A.Y36(ht.JJ),A.Y36(e.v),A.Y36(C.eX))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-create-offer"]],decls:28,vars:8,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","6","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addOfferForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","1","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","2","name","offerValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","58","fxLayoutAlign","start end"],["matInput","","placeholder","Vendor","tabindex","3","name","vendor",3,"ngModel","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","4","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","5",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Create Offer"),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),A.NdJ("ngModelChange",function(dA){return s.description=dA}),A.qZA()(),A.TgZ(13,"div",11)(14,"mat-form-field",12)(15,"input",13),A.NdJ("ngModelChange",function(dA){return s.offerValue=dA})("keyup",function(){return s.onOfferValueChange()}),A.qZA(),A.TgZ(16,"span",14),A._uU(17," Sats "),A.qZA(),A.TgZ(18,"mat-hint"),A._uU(19),A.qZA()(),A.TgZ(20,"mat-form-field",15)(21,"input",16),A.NdJ("ngModelChange",function(dA){return s.vendor=dA}),A.qZA()()(),A.YNc(22,Gg,3,2,"div",17),A.TgZ(23,"div",18)(24,"button",19),A.NdJ("click",function(){return s.resetData()}),A._uU(25,"Clear Field"),A.qZA(),A.TgZ(26,"button",20),A.NdJ("click",function(){return s.onAddOffer()}),A._uU(27,"Create Offer"),A.qZA()()()()()()),2&t&&(A.xp6(6),A.Q6J("mat-dialog-close",!1),A.xp6(6),A.Q6J("ngModel",s.description),A.xp6(3),A.Q6J("ngModel",s.offerValue)("step",100)("min",1),A.xp6(4),A.Oqu(s.offerValueHint),A.xp6(2),A.Q6J("ngModel",s.vendor),A.xp6(1),A.Q6J("ngIf",""!==s.offerError))},directives:[wt.xw,wt.yH,w.dk,wt.Wh,Q.lW,dt.ZT,w.dn,OA._Y,OA.JL,OA.F,Z.KE,H.Nt,OA.Fj,k.h,OA.JJ,OA.On,OA.wV,OA.qQ,b.q,Z.R9,Z.bx,ht.O5,f.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();var jl=Nt(1462);function Jg(r,y){1&r&&A._UZ(0,"mat-progress-bar",28)}function Og(r,y){1&r&&(A.TgZ(0,"th",29),A._uU(1," Offer ID "),A.qZA())}const Kl=function(r){return{"mr-0":r}};function kg(r,y){if(1&r&&A._UZ(0,"span",35),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Kl,t.screenSize===t.screenSizeEnum.XS))}}function jg(r,y){if(1&r&&A._UZ(0,"span",36),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Kl,t.screenSize===t.screenSizeEnum.XS))}}const Kg=function(r){return{"max-width":r}};function Vg(r,y){if(1&r&&(A.TgZ(0,"td",30)(1,"div",31)(2,"span",32),A.YNc(3,kg,1,3,"span",33),A.YNc(4,jg,1,3,"span",34),A._uU(5),A.qZA()()()),2&r){const t=y.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(4,Kg,s.screenSize===s.screenSizeEnum.XS?"25rem":"45rem")),A.xp6(2),A.Q6J("ngIf",t.active),A.xp6(1),A.Q6J("ngIf",!t.active),A.xp6(1),A.hij(" ",t.offer_id," ")}}function Wg(r,y){1&r&&(A.TgZ(0,"th",29),A._uU(1," Single Use "),A.qZA())}function Zg(r,y){if(1&r&&(A.TgZ(0,"td",30),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(t.single_use?"Yes":"No")}}function Xg(r,y){1&r&&(A.TgZ(0,"th",29),A._uU(1," Used "),A.qZA())}function qg(r,y){if(1&r&&(A.TgZ(0,"td",30),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",t.used?"Yes":"No"," ")}}function _g(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",37)(1,"div",38)(2,"mat-select",39),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",40),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function $g(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",40),A.NdJ("click",function(){A.CHM(t);const z=A.oxw().$implicit;return A.oxw().onDisableOffer(z)}),A._uU(1,"Disable Offer"),A.qZA()}}function AB(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",40),A.NdJ("click",function(){A.CHM(t);const z=A.oxw().$implicit;return A.oxw().onPrintOffer(z)}),A._uU(1,"Export QR code"),A.qZA()}}const tB=function(r){return{"px-3":r}};function eB(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",41)(1,"div",42)(2,"mat-select",43),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",40),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onOfferClick(dA)}),A._uU(5,"View Info"),A.qZA(),A.YNc(6,$g,2,0,"mat-option",44),A.YNc(7,AB,2,0,"mat-option",44),A.qZA()()()}if(2&r){const t=y.$implicit,s=A.oxw();A.Q6J("ngClass",A.VKq(3,tB,s.screenSize!==s.screenSizeEnum.XS)),A.xp6(6),A.Q6J("ngIf",t.active),A.xp6(1),A.Q6J("ngIf",t.active)}}function nB(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No offer available."),A.qZA())}function rB(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting offers..."),A.qZA())}function iB(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function aB(r,y){if(1&r&&(A.TgZ(0,"td",45),A.YNc(1,nB,2,0,"p",46),A.YNc(2,rB,2,0,"p",46),A.YNc(3,iB,2,1,"p",46),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const oB=function(r){return{"display-none":r}};function sB(r,y){if(1&r&&A._UZ(0,"tr",47),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,oB,(null==t.offers?null:t.offers.data)&&(null==t.offers||null==t.offers.data?null:t.offers.data.length)>0))}}function lB(r,y){1&r&&A._UZ(0,"tr",48)}function cB(r,y){1&r&&A._UZ(0,"tr",49)}const gB=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},BB=function(){return["no_offer"]};let uB=(()=>{class r{constructor(t,s,z,dA,st,Ae,un){this.logger=t,this.store=s,this.commonService=z,this.rtlEffects=dA,this.dataService=st,this.decimalPipe=Ae,this.datePipe=un,this.faHistory=h.qO$,this.selNode={},this.newlyAddedOfferMemo="",this.newlyAddedOfferValue=0,this.description="",this.offerValue=null,this.offerValueHint="",this.displayedColumns=[],this.offerPaymentReq="",this.offerJSONArr=[],this.information={},this.flgSticky=!1,this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["offer_id","single_use","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["offer_id","single_use","used","actions"]):(this.flgSticky=!0,this.displayedColumns=["offer_id","single_use","used","actions"])}ngOnInit(){this.store.select(g.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(g.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(g.Y_).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.offerJSONArr=t.offers||[],this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr)}openCreateOfferModal(){this.store.dispatch((0,KA.qR)({payload:{data:{pageSize:this.pageSize,component:Hg}}}))}onOfferClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{offer:{used:t.used,single_use:t.single_use,active:t.active,offer_id:t.offer_id,bolt12:t.bolt12,bolt12_unsigned:t.bolt12_unsigned},newlyAdded:!1,component:jl.k}}}))}onDisableOffer(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Disable Offer",titleMessage:"Disabling Offer: "+(t.offer_id||t.bolt12),noBtnText:"Cancel",yesBtnText:"Disable"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[3])).subscribe(s=>{s&&this.store.dispatch((0,mt.i9)({payload:{offer_id:t.offer_id}}))})}onPrintOffer(t){this.dataService.decodePayment(t.bolt12,!1).pipe((0,PA.q)(1)).subscribe(s=>{s.offer_id&&!s.amount_msat?(s.amount_msat="0msat",s.amount=0):s.amount=+(s.amount||s.amount_msat.slice(0,-4));const z={pageSize:"A5",pageOrientation:"portrait",pageMargins:[10,50,10,50],background:{svg:'\n \n \n \n \n \n ',width:249,height:333,absolutePosition:{x:84,y:160}},header:{text:s.vendor||s.issuer||"",alignment:"center",fontSize:25,color:"#272727",margin:[0,20,0,0]},content:[{svg:'',width:249,height:40,alignment:"center"},{text:s.description?s.description.substring(0,160):"",alignment:"center",fontSize:16,color:"#5C5C5C"},{qr:t.bolt12,eccLevel:"M",fit:"227",alignment:"center",absolutePosition:{x:7,y:205}},{text:(null==s?void 0:s.amount_msat)&&0!==(null==s?void 0:s.amount)?this.decimalPipe.transform(s.amount/1e3)+" SATS":"Open amount",fontSize:20,bold:!1,color:"white",alignment:"center",absolutePosition:{x:0,y:430}},{text:"SCAN TO PAY",fontSize:22,bold:!0,color:"white",alignment:"center",absolutePosition:{x:0,y:455}}],footer:{svg:'\n \n \n \n \n ',alignment:"center"}};zg.createPdf(z,null,null,Lg.I.vfs).download("Offer-"+(s&&s.description?s.description:t.bolt12))})}applyFilter(){this.offers.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){this.offers=new FA.by(t?[...t]:[]),this.offers.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.offers.sort=this.sort,this.offers.filterPredicate=(s,z)=>(("active"===z||"inactive"===z||"used"===z||"unused"===z||"single"===z||"multiple"===z)&&(z=" "+z),((s.active?" active":" inactive")+(s.used?" used":" unused")+(s.single_use?" single":" multiple")+JSON.stringify(s).toLowerCase()).includes(z)),this.offers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.offers.data&&this.offers.data.length>0&&this.commonService.downloadFile(this.offers.data,"Offers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(e.v),A.Y36(DA.V),A.Y36(zA.D),A.Y36(ht.JJ),A.Y36(ht.uU))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-offers-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Offers")}])],decls:34,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","offer_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","single_use"],["matColumnDef","used"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["class","dot green","matTooltip","Active","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Inactive","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Active","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Inactive","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"button",2),A.NdJ("click",function(){return s.openCreateOfferModal()}),A._uU(3,"Create Offer"),A.qZA()(),A.TgZ(4,"div",3)(5,"div",4)(6,"div",5),A._UZ(7,"fa-icon",6),A.TgZ(8,"span",7),A._uU(9,"Offers History"),A.qZA()(),A.TgZ(10,"mat-form-field",8)(11,"input",9),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.TgZ(12,"div",10),A.YNc(13,Jg,1,0,"mat-progress-bar",11),A.TgZ(14,"table",12,13),A.ynx(16,14),A.YNc(17,Og,2,0,"th",15),A.YNc(18,Vg,6,6,"td",16),A.BQk(),A.ynx(19,17),A.YNc(20,Wg,2,0,"th",15),A.YNc(21,Zg,2,1,"td",16),A.BQk(),A.ynx(22,18),A.YNc(23,Xg,2,0,"th",15),A.YNc(24,qg,2,1,"td",16),A.BQk(),A.ynx(25,19),A.YNc(26,_g,6,0,"th",20),A.YNc(27,eB,8,5,"td",21),A.BQk(),A.ynx(28,22),A.YNc(29,aB,4,3,"td",23),A.BQk(),A.YNc(30,sB,1,3,"tr",24),A.YNc(31,lB,1,0,"tr",25),A.YNc(32,cB,1,0,"tr",26),A.qZA()(),A._UZ(33,"mat-paginator",27),A.qZA()()),2&t&&(A.xp6(7),A.Q6J("icon",s.faHistory),A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.offers)("ngClass",A.VKq(12,gB,""!==s.errorMessage)),A.xp6(16),A.Q6J("matFooterRowDef",A.DdM(14,BB)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[wt.xw,wt.yH,wt.Wh,Q.lW,f.BN,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,lA.$V,ht.O5,Y.pW,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,ht.PC,m.Zl,aA.gM,CA.gD,CA.$L,wA.ey,FA.mD,FA.yh,FA.Ke,FA.Q2,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],styles:[".mat-column-offer_id[_ngcontent-%COMP%]{flex:0 0 65%;width:65%}.mat-column-offer_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();function fB(r,y){1&r&&A._UZ(0,"mat-progress-bar",30)}function hB(r,y){1&r&&(A.TgZ(0,"th",31),A._uU(1," Updated At "),A.qZA())}function EB(r,y){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,t.lastUpdatedAt,"dd/MMM/y HH:mm"))}}function wB(r,y){1&r&&(A.TgZ(0,"th",31),A._uU(1," Title "),A.qZA())}const Vl=function(r){return{"max-width":r}};function CB(r,y){if(1&r&&(A.TgZ(0,"td",32)(1,"div",33)(2,"span",34),A._uU(3),A.qZA()()()),2&r){const t=y.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Vl,s.screenSize===s.screenSizeEnum.XS?"20rem":"35rem")),A.xp6(2),A.Oqu(t.title)}}function QB(r,y){1&r&&(A.TgZ(0,"th",35),A._uU(1," Amount (Sats) "),A.qZA())}function dB(r,y){if(1&r&&(A.TgZ(0,"td",36)(1,"span",37),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(0===t.amountmSat?"Open":A.lcZ(3,1,t.amountmSat/1e3))}}function MB(r,y){1&r&&(A.TgZ(0,"th",31),A._uU(1," Description "),A.qZA())}function pB(r,y){if(1&r&&(A.TgZ(0,"td",32)(1,"div",33)(2,"span",34),A._uU(3),A.qZA()()()),2&r){const t=y.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,Vl,s.screenSize===s.screenSizeEnum.XS?"20rem":"35rem")),A.xp6(2),A.Oqu(t.description)}}function IB(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",38)(1,"div",39)(2,"mat-select",40),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",41),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}const mB=function(r){return{"px-3":r}};function vB(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",42)(1,"div",43)(2,"mat-select",44),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",41),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onOfferBookmarkClick(dA)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",41),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onRePayOffer(dA)}),A._uU(7,"Pay Again"),A.qZA(),A.TgZ(8,"mat-option",41),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onDeleteBookmark(dA)}),A._uU(9,"Delete Bookmark"),A.qZA()()()()}if(2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,mB,t.screenSize!==t.screenSizeEnum.XS))}}function DB(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No offer bookmarked."),A.qZA())}function yB(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting offer bookmarks..."),A.qZA())}function xB(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function FB(r,y){if(1&r&&(A.TgZ(0,"td",45),A.YNc(1,DB,2,0,"p",46),A.YNc(2,yB,2,0,"p",46),A.YNc(3,xB,2,1,"p",46),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.offersBookmarks&&t.offersBookmarks.data)||(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offersBookmarks&&t.offersBookmarks.data)||(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offersBookmarks&&t.offersBookmarks.data)||(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const YB=function(r){return{"display-none":r}};function TB(r,y){if(1&r&&A._UZ(0,"tr",47),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,YB,(null==t.offersBookmarks?null:t.offersBookmarks.data)&&(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)>0))}}function SB(r,y){1&r&&A._UZ(0,"tr",48)}function NB(r,y){1&r&&A._UZ(0,"tr",49)}const UB=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},PB=function(){return["no_offer"]};let RB=(()=>{class r{constructor(t,s,z,dA){this.logger=t,this.store=s,this.commonService=z,this.rtlEffects=dA,this.faHistory=h.qO$,this.displayedColumns=[],this.offersBookmarksJSONArr=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.selFilter="",this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["lastUpdatedAt","title","amountmSat","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["lastUpdatedAt","title","amountmSat","description","actions"]):(this.flgSticky=!0,this.displayedColumns=["lastUpdatedAt","title","amountmSat","description","actions"])}ngOnInit(){this.store.select(g.EQ).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.offersBookmarksJSONArr=t.offersBookmarks||[],this.offersBookmarksJSONArr&&this.offersBookmarksJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offersBookmarksJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.offersBookmarksJSONArr&&this.offersBookmarksJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offersBookmarksJSONArr)}onOfferBookmarkClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{offer:{bolt12:t.bolt12},newlyAdded:!1,component:jl.k}}}))}onDeleteBookmark(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Delete Bookmark",titleMessage:"Deleting Bookmark: "+(t.title||t.description),noBtnText:"Cancel",yesBtnText:"Delete"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[1])).subscribe(s=>{s&&this.store.dispatch((0,mt._9)({payload:{bolt12:t.bolt12}}))})}onRePayOffer(t){this.store.dispatch((0,KA.qR)({payload:{data:{paymentType:a.IX.OFFER,bolt12:t.bolt12,offerTitle:t.title,component:xn}}}))}applyFilter(){this.offersBookmarks.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){this.offersBookmarks=new FA.by(t?[...t]:[]),this.offersBookmarks.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.offersBookmarks.sort=this.sort,this.offersBookmarks.filterPredicate=(s,z)=>JSON.stringify(s).toLowerCase().includes(z),this.offersBookmarks.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.offersBookmarks.data&&this.offersBookmarks.data.length>0&&this.commonService.downloadFile(this.offersBookmarks.data,"OfferBookmarks")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(e.v),A.Y36(DA.V))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-offer-bookmarks-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Offer Bookmarks")}])],decls:35,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","lastUpdatedAt"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","amountmSat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-2",4,"matHeaderCellDef"],["mat-cell","","class","pr-2",4,"matCellDef"],["matColumnDef","description"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-2"],["mat-cell","",1,"pr-2"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"div",1),A.TgZ(2,"div",2)(3,"div",3)(4,"div",4),A._UZ(5,"fa-icon",5),A.TgZ(6,"span",6),A._uU(7,"Offer Bookmarks"),A.qZA()(),A.TgZ(8,"mat-form-field",7)(9,"input",8),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.TgZ(10,"div",9),A.YNc(11,fB,1,0,"mat-progress-bar",10),A.TgZ(12,"table",11,12),A.ynx(14,13),A.YNc(15,hB,2,0,"th",14),A.YNc(16,EB,3,4,"td",15),A.BQk(),A.ynx(17,16),A.YNc(18,wB,2,0,"th",14),A.YNc(19,CB,4,4,"td",15),A.BQk(),A.ynx(20,17),A.YNc(21,QB,2,0,"th",18),A.YNc(22,dB,4,3,"td",19),A.BQk(),A.ynx(23,20),A.YNc(24,MB,2,0,"th",14),A.YNc(25,pB,4,4,"td",15),A.BQk(),A.ynx(26,21),A.YNc(27,IB,6,0,"th",22),A.YNc(28,vB,10,3,"td",23),A.BQk(),A.ynx(29,24),A.YNc(30,FB,4,3,"td",25),A.BQk(),A.YNc(31,TB,1,3,"tr",26),A.YNc(32,SB,1,0,"tr",27),A.YNc(33,NB,1,0,"tr",28),A.qZA()(),A._UZ(34,"mat-paginator",29),A.qZA()()),2&t&&(A.xp6(5),A.Q6J("icon",s.faHistory),A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.offersBookmarks)("ngClass",A.VKq(12,UB,""!==s.errorMessage)),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(14,PB)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[wt.xw,wt.yH,wt.Wh,f.BN,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,lA.$V,ht.O5,Y.pW,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,ht.PC,m.Zl,CA.gD,CA.$L,wA.ey,FA.mD,FA.yh,FA.Ke,FA.Q2,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.uU,ht.JJ],styles:[".mat-column-title[_ngcontent-%COMP%], .mat-column-description[_ngcontent-%COMP%]{flex:0 0 30%;width:30%}.mat-column-title[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();function zB(r,y){if(1&r&&(A.TgZ(0,"div",5),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function LB(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"div",6),A._UZ(1,"div",7),A.TgZ(2,"mat-form-field",8)(3,"input",9),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(z){return A.CHM(t),A.oxw().selFilter=z}),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.selFilter)}}function bB(r,y){1&r&&A._UZ(0,"mat-progress-bar",31)}function GB(r,y){1&r&&(A.TgZ(0,"th",32),A._uU(1,"Received Time"),A.qZA())}function HB(r,y){if(1&r&&(A.TgZ(0,"td",33),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/y HH:mm"))}}function JB(r,y){1&r&&(A.TgZ(0,"th",32),A._uU(1,"In Channel"),A.qZA())}function OB(r,y){if(1&r&&(A.TgZ(0,"td",33),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.Oqu(null==t?null:t.in_channel_alias)}}function kB(r,y){1&r&&(A.TgZ(0,"th",34),A._uU(1,"Amount In (Sats)"),A.qZA())}function jB(r,y){if(1&r&&(A.TgZ(0,"td",33)(1,"span",35),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function KB(r,y){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Fail Reason"),A.qZA())}function VB(r,y){if(1&r&&(A.TgZ(0,"td",37),A._uU(1),A.qZA()),2&r){const t=y.$implicit,s=A.oxw(2);A.xp6(1),A.Oqu(s.CLNFailReason[null==t?null:t.failreason])}}function WB(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",38)(1,"div",39)(2,"mat-select",40),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",41),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function ZB(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",42)(1,"button",43),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onFailedLocalEventClick(dA)}),A._uU(2,"View Info"),A.qZA()()}}function XB(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No failed transaction available."),A.qZA())}function qB(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting failed transactions..."),A.qZA())}function _B(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function $B(r,y){if(1&r&&(A.TgZ(0,"td",44),A.YNc(1,XB,2,0,"p",45),A.YNc(2,qB,2,0,"p",45),A.YNc(3,_B,2,1,"p",45),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedLocalForwardingEvents&&t.failedLocalForwardingEvents.data)||(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedLocalForwardingEvents&&t.failedLocalForwardingEvents.data)||(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedLocalForwardingEvents&&t.failedLocalForwardingEvents.data)||(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Au=function(r){return{"display-none":r}};function tu(r,y){if(1&r&&A._UZ(0,"tr",46),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Au,(null==t.failedLocalForwardingEvents?null:t.failedLocalForwardingEvents.data)&&(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)>0))}}function eu(r,y){1&r&&A._UZ(0,"tr",47)}function nu(r,y){1&r&&A._UZ(0,"tr",48)}const ru=function(){return["no_event"]};function iu(r,y){if(1&r&&(A.TgZ(0,"div",10),A.YNc(1,bB,1,0,"mat-progress-bar",11),A.TgZ(2,"table",12,13),A.ynx(4,14),A.YNc(5,GB,2,0,"th",15),A.YNc(6,HB,3,4,"td",16),A.BQk(),A.ynx(7,17),A.YNc(8,JB,2,0,"th",15),A.YNc(9,OB,2,1,"td",16),A.BQk(),A.ynx(10,18),A.YNc(11,kB,2,0,"th",19),A.YNc(12,jB,4,4,"td",16),A.BQk(),A.ynx(13,20),A.YNc(14,KB,2,0,"th",21),A.YNc(15,VB,2,1,"td",22),A.BQk(),A.ynx(16,23),A.YNc(17,WB,6,0,"th",24),A.YNc(18,ZB,3,0,"td",25),A.BQk(),A.ynx(19,26),A.YNc(20,$B,4,3,"td",27),A.BQk(),A.YNc(21,tu,1,3,"tr",28),A.YNc(22,eu,1,0,"tr",29),A.YNc(23,nu,1,0,"tr",30),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.failedLocalForwardingEvents),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(6,ru)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function au(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"mat-paginator",49),A.NdJ("page",function(z){return A.CHM(t),A.oxw().onPageChange(z)}),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("length",t.totalLocalFailedTransactions)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let ou=(()=>{class r{constructor(t,s,z,dA,st){this.logger=t,this.commonService=s,this.store=z,this.datePipe=dA,this.router=st,this.CLNFailReason=a.p7,this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.selFilter="",this.indexOffset=0,this.totalLocalFailedTransactions=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS||this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_channel","in_msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","in_channel","in_msatoshi","failreason","actions"])}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.dispatch((0,mt.u0)({payload:{status:a.OO.LOCAL_FAILED}})),this.store.select(g.lK).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.totalLocalFailedTransactions=t.localFailedForwardingHistory.totalForwards||0,this.failedLocalEvents=t.localFailedForwardingHistory.listForwards||[],this.failedLocalEvents.length>0&&this.sort&&this.paginator&&this.loadLocalfailedLocalEventsTable(this.failedLocalEvents.slice(0,this.pageSize)),this.logger.info(t)})}ngAfterViewInit(){this.failedLocalEvents.length>0&&this.loadLocalfailedLocalEventsTable(this.failedLocalEvents.slice(0,this.pageSize))}onFailedLocalEventClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Local Failed Event Information",message:[[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:a.Gi.DATE_TIME},{key:"in_channel_alias",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:a.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"Amount In (mSats)",width:100,type:a.Gi.NUMBER}],[{key:"failreason",value:t.failreason?this.CLNFailReason[t.failreason]:"",title:"Reason for Failure",width:100,type:a.Gi.STRING}]]}}}))}loadLocalfailedLocalEventsTable(t){this.failedLocalForwardingEvents=new FA.by([...t]),this.failedLocalForwardingEvents.filterPredicate=(s,z)=>{var dA;const st=(s.received_time?null===(dA=this.datePipe.transform(new Date(1e3*s.received_time),"dd/MMM/YYYY HH:mm"))||void 0===dA?void 0:dA.toLowerCase():"")+(s.in_channel_alias?s.in_channel_alias.toLowerCase():"")+(s.failreason&&this.CLNFailReason[s.failreason]?this.CLNFailReason[s.failreason].toLowerCase():"")+(s.in_msatoshi?s.in_msatoshi/1e3:"");return(null==st?void 0:st.includes(z))||!1},this.failedLocalForwardingEvents.sort=this.sort,this.failedLocalForwardingEvents.sortingDataAccessor=(s,z)=>"failreason"===z?s.failreason?this.CLNFailReason[s.failreason]:"":s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.applyFilter(),this.logger.info(this.failedLocalForwardingEvents)}onDownloadCSV(){this.failedLocalForwardingEvents&&this.failedLocalForwardingEvents.data&&this.failedLocalForwardingEvents.data.length>0&&this.commonService.downloadFile(this.failedLocalForwardingEvents.data,"Local-failed-transactions")}applyFilter(){this.failedLocalForwardingEvents.filter=this.selFilter.trim().toLowerCase()}onPageChange(t){this.pageSize!==t.pageSize?(this.pageSize=t.pageSize,this.indexOffset=0):this.indexOffset=t.pageIndex*this.pageSize,this.loadLocalfailedLocalEventsTable(this.failedLocalEvents.slice(this.indexOffset,this.indexOffset+this.pageSize))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(e.v),A.Y36(u.yh),A.Y36(ht.uU),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-local-failed-history"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Local failed events")}])],decls:5,vars:4,consts:[["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,"length","pageSize","pageSizeOptions","showFirstLastButtons","page",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","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource"],["table",""],["matColumnDef","received_time"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","in_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","failreason"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,zB,2,1,"div",1),A.YNc(2,LB,4,1,"div",2),A.YNc(3,iu,24,7,"div",3),A.YNc(4,au,1,4,"mat-paginator",4),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[wt.xw,wt.Wh,ht.O5,wt.yH,Z.KE,H.Nt,OA.Fj,OA.JJ,OA.On,lA.$V,Y.pW,FA.BZ,et.YE,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,CA.gD,CA.$L,wA.ey,Q.lW,FA.mD,FA.yh,FA.Ke,FA.Q2,ht.mk,m.oO,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.uU,ht.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();const su=["form"];function lu(r,y){1&r&&A.GkF(0)}function cu(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Requested amount is required."),A.qZA())}function gu(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee rate is required."),A.qZA())}function Bu(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Local amount is required."),A.qZA())}function uu(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Local amount must be greater than or equal to 20000. This estimate covers force close fee for the provider."),A.qZA())}function fu(r,y){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.hij("Local amount must be less than or equal to ",t.totalBalance,".")}}function hu(r,y){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.channelConnectionError)}}function Eu(r,y){if(1&r&&(A.TgZ(0,"div",26),A._UZ(1,"fa-icon",27),A.YNc(2,hu,2,1,"span",15),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.channelConnectionError)}}function wu(r,y){1&r&&(A.TgZ(0,"th",47),A._uU(1,"Type"),A.qZA())}function Cu(r,y){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.type," ")}}function Qu(r,y){1&r&&(A.TgZ(0,"th",47),A._uU(1,"Address"),A.qZA())}function du(r,y){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.address," ")}}function Mu(r,y){1&r&&(A.TgZ(0,"th",47),A._uU(1,"Port"),A.qZA())}function pu(r,y){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.port," ")}}function Iu(r,y){1&r&&A._UZ(0,"tr",49)}function mu(r,y){1&r&&A._UZ(0,"tr",50)}function vu(r,y){if(1&r&&(A.TgZ(0,"mat-expansion-panel",29)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),A._uU(4,"Node: \xa0"),A.qZA(),A.TgZ(5,"strong",30),A._uU(6),A.qZA()()(),A.TgZ(7,"div",7)(8,"div",0)(9,"div",1)(10,"h4",31),A._uU(11,"Pubkey"),A.qZA(),A.TgZ(12,"span",32),A._uU(13),A.qZA()()(),A._UZ(14,"mat-divider",33),A.TgZ(15,"div",0)(16,"div",1)(17,"h4",31),A._uU(18,"Last Timestamp"),A.qZA(),A.TgZ(19,"span",34),A._uU(20),A.ALo(21,"date"),A.qZA()()(),A._UZ(22,"mat-divider",33),A.TgZ(23,"div",35)(24,"h4",36),A._uU(25,"Addresses"),A.qZA(),A.TgZ(26,"div",37)(27,"table",38,39),A.ynx(29,40),A.YNc(30,wu,2,0,"th",41),A.YNc(31,Cu,2,1,"td",42),A.BQk(),A.ynx(32,43),A.YNc(33,Qu,2,0,"th",41),A.YNc(34,du,2,1,"td",42),A.BQk(),A.ynx(35,44),A.YNc(36,Mu,2,0,"th",41),A.YNc(37,pu,2,1,"td",42),A.BQk(),A.YNc(38,Iu,1,0,"tr",45),A.YNc(39,mu,1,0,"tr",46),A.qZA()()()()()),2&r){const t=A.oxw(2);A.xp6(6),A.Oqu((null==t.node?null:t.node.alias)||(null==t.node?null:t.node.nodeid)),A.xp6(7),A.Oqu(t.node.nodeid),A.xp6(7),A.Oqu(A.xi3(21,6,1e3*t.node.last_timestamp,"dd/MMM/y HH:mm")),A.xp6(7),A.Q6J("dataSource",t.node.addresses),A.xp6(11),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function Du(r,y){if(1&r&&A.YNc(0,vu,40,9,"mat-expansion-panel",28),2&r){const t=A.oxw();A.Q6J("ngIf",t.node)}}let yu=(()=>{class r{constructor(t,s,z,dA){this.dialogRef=t,this.data=s,this.actions=z,this.store=dA,this.faExclamationTriangle=h.eHv,this.totalBalance=0,this.node={},this.requestedAmount=0,this.feeRate=0,this.localAmount=0,this.channelConnectionError="",this.displayedColumns=["type","address","port"],this.unSubs=[new c.x,new c.x]}ngOnInit(){var t,s,z,dA,st;this.alertTitle=this.data.alertTitle||"",this.totalBalance=(null===(t=this.data.message)||void 0===t?void 0:t.balance)||0,this.node=(null===(s=this.data.message)||void 0===s?void 0:s.node)||{},this.requestedAmount=(null===(z=this.data.message)||void 0===z?void 0:z.requestedAmount)||0,this.feeRate=(null===(dA=this.data.message)||void 0===dA?void 0:dA.feeRate)||0,this.localAmount=(null===(st=this.data.message)||void 0===st?void 0:st.localAmount)||0,this.actions.pipe((0,i.R)(this.unSubs[0]),(0,qA.h)(Ae=>Ae.type===a.AB.UPDATE_API_CALL_STATUS_CLN||Ae.type===a.AB.FETCH_CHANNELS_CLN)).subscribe(Ae=>{Ae.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&Ae.payload.status===a.Bn.ERROR&&"SaveNewChannel"===Ae.payload.action&&(this.channelConnectionError=Ae.payload.message),Ae.type===a.AB.FETCH_CHANNELS_CLN&&this.dialogRef.close()})}onClose(){this.dialogRef.close(!1)}resetData(){var t,s,z;this.form.resetForm(),this.form.controls.ramount.setValue(null===(t=this.data.message)||void 0===t?void 0:t.requestedAmount),this.form.controls.feerate.setValue(null===(s=this.data.message)||void 0===s?void 0:s.feeRate),this.form.controls.lamount.setValue(null===(z=this.data.message)||void 0===z?void 0:z.localAmount),this.calculateFee(),this.channelConnectionError=""}calculateFee(){var t,s,z;this.node.channelOpeningFee=+((null===(t=this.node.option_will_fund)||void 0===t?void 0:t.lease_fee_base_msat)||0)/1e3+this.requestedAmount*+((null===(s=this.node.option_will_fund)||void 0===s?void 0:s.lease_fee_basis)||0)/1e4+ +((null===(z=this.node.option_will_fund)||void 0===z?void 0:z.funding_weight)||0)/4*this.feeRate}onOpenChannel(){if(!this.node||!this.node.option_will_fund||!this.requestedAmount||!this.feeRate||!this.localAmount||this.localAmount<2e4)return!0;const t={peerId:this.node.nodeid||"",satoshis:this.localAmount.toString(),feeRate:this.feeRate+"perkb",requestAmount:this.requestedAmount.toString(),compactLease:this.node.option_will_fund.compact_lease};this.store.dispatch((0,mt.YX)({payload:t}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(dt.so),A.Y36(dt.WI),A.Y36(C.eX),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-open-liquidity-channel"]],viewQuery:function(t,s){if(1&t&&A.Gf(su,7),2&t){let z;A.iGM(z=A.CRH())&&(s.form=z.first)}},decls:48,vars:24,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","6","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["form","ngForm"],[4,"ngTemplateOutlet"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","30","fxLayoutAlign","start end"],["autoFocus","","matInput","","placeholder","Requested Amount","type","number","tabindex","1","required","","name","ramount",3,"ngModel","step","min","ngModelChange","keyup"],["ramount","ngModel"],["matSuffix",""],[4,"ngIf"],["matInput","","placeholder","Fee Rate","type","number","tabindex","2","required","","name","feerate",3,"ngModel","step","min","ngModelChange","keyup"],["feeRt","ngModel"],["matInput","","placeholder","Local Amount","type","number","tabindex","3","required","","name","lamount",3,"ngModel","step","min","max","ngModelChange"],["lamount","ngModel"],["fxFlex","100",1,"alert","alert-info","mt-4"],["fxFlex","100","class","alert alert-danger mt-2",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","4",1,"mr-1",3,"click"],["autoFocus","","mat-button","","color","primary","tabindex","5",3,"click"],["nodeDetailsExpansionBlock",""],["fxFlex","100",1,"alert","alert-danger","mt-2"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel mt-1 mb-2","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","mt-1","mb-2"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],[1,"overflow-wrap","foreground-secondary-text"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxFlex","100",1,"font-bold-500","mb-1"],[1,"table-container"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","type"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","port"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8),A.YNc(11,lu,1,0,"ng-container",9),A.TgZ(12,"div",10)(13,"mat-form-field",11)(14,"input",12,13),A.NdJ("ngModelChange",function(dA){return s.requestedAmount=dA})("keyup",function(){return s.calculateFee()}),A.qZA(),A.TgZ(16,"span",14),A._uU(17," Sats "),A.qZA(),A.YNc(18,cu,2,0,"mat-error",15),A.qZA(),A.TgZ(19,"mat-form-field",11)(20,"input",16,17),A.NdJ("ngModelChange",function(dA){return s.feeRate=dA})("keyup",function(){return s.calculateFee()}),A.qZA(),A.TgZ(22,"span",14),A._uU(23," Sats/vByte "),A.qZA(),A.YNc(24,gu,2,0,"mat-error",15),A.qZA(),A.TgZ(25,"mat-form-field",11)(26,"input",18,19),A.NdJ("ngModelChange",function(dA){return s.localAmount=dA}),A.qZA(),A.TgZ(28,"mat-hint"),A._uU(29),A.ALo(30,"number"),A.qZA(),A.TgZ(31,"span",14),A._uU(32," Sats "),A.qZA(),A.YNc(33,Bu,2,0,"mat-error",15),A.YNc(34,uu,2,0,"mat-error",15),A.YNc(35,fu,2,1,"mat-error",15),A.qZA()(),A.TgZ(36,"div",20)(37,"span"),A._uU(38),A.ALo(39,"number"),A.qZA()(),A.YNc(40,Eu,3,2,"div",21),A.TgZ(41,"div",22)(42,"button",23),A.NdJ("click",function(){return s.resetData()}),A._uU(43,"Clear"),A.qZA(),A.TgZ(44,"button",24),A.NdJ("click",function(){return s.onOpenChannel()}),A._uU(45,"Execute"),A.qZA()()()()()(),A.YNc(46,Du,1,1,"ng-template",null,25,A.W1O)),2&t){const z=A.MAs(15),dA=A.MAs(21),st=A.MAs(27),Ae=A.MAs(47);A.xp6(5),A.Oqu(s.alertTitle),A.xp6(6),A.Q6J("ngTemplateOutlet",Ae),A.xp6(3),A.Q6J("ngModel",s.requestedAmount)("step",1e4)("min",0),A.xp6(4),A.Q6J("ngIf",null==z.errors?null:z.errors.required),A.xp6(2),A.Q6J("ngModel",s.feeRate)("step",10)("min",0),A.xp6(4),A.Q6J("ngIf",null==dA.errors?null:dA.errors.required),A.xp6(2),A.Q6J("ngModel",s.localAmount)("step",1e4)("min",2e4)("max",s.totalBalance),A.xp6(3),A.hij("Remaining Bal: ",A.lcZ(30,20,s.totalBalance-(s.localAmount?s.localAmount:0)),""),A.xp6(4),A.Q6J("ngIf",null==st.errors?null:st.errors.required),A.xp6(1),A.Q6J("ngIf",null==st.errors?null:st.errors.min),A.xp6(1),A.Q6J("ngIf",null==st.errors?null:st.errors.max),A.xp6(3),A.hij("Total cost to lease ",A.lcZ(39,22,s.node.channelOpeningFee)," (Sats)"),A.xp6(2),A.Q6J("ngIf",""!==s.channelConnectionError)}},directives:[wt.xw,wt.yH,w.dk,wt.Wh,Q.lW,w.dn,OA._Y,OA.JL,OA.F,ht.tP,Z.KE,H.Nt,OA.wV,OA.qQ,OA.Fj,b.q,k.h,OA.Q7,OA.JJ,OA.On,Z.R9,ht.O5,Z.TO,OA.Fd,yi.F,Z.bx,f.BN,or.ib,or.yz,or.yK,AA.d,FA.BZ,et.YE,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,FA.as,FA.XQ,FA.nj,FA.Gk],pipes:[ht.JJ,ht.uU],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),r})();function xu(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Channel amount is required."),A.qZA())}function Fu(r,y){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Channel opening fee rate is required."),A.qZA())}function Yu(r,y){1&r&&A._UZ(0,"mat-progress-bar",40)}function Tu(r,y){1&r&&(A.TgZ(0,"th",41),A._uU(1," Alias "),A.qZA())}function Su(r,y){1&r&&A._UZ(0,"span",44)}const Nu=function(r){return{"max-width":r}};function Uu(r,y){if(1&r&&(A.TgZ(0,"td",42),A._uU(1),A.YNc(2,Su,1,0,"span",43),A.qZA()),2&r){const t=y.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(3,Nu,s.screenSize===s.screenSizeEnum.XS?"10rem":"40rem")),A.xp6(1),A.hij(" ",null==t?null:t.alias,""),A.xp6(1),A.Q6J("ngIf",t.tor_node)}}function Pu(r,y){1&r&&(A.TgZ(0,"th",45),A._uU(1," Capacity/Channels "),A.qZA())}function Ru(r,y){if(1&r&&(A.TgZ(0,"td",46),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.AsE(" ",A.xi3(2,2,(null==t?null:t.nodeCapacity)/1e8,"1.0-2")," BTC / ",A.xi3(3,5,null==t?null:t.channelCount,"1.0-0")," ")}}function zu(r,y){1&r&&(A.TgZ(0,"th",45),A._uU(1," Lease Fee "),A.qZA())}function Lu(r,y){if(1&r&&(A.TgZ(0,"td",46),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.AsE(" ",A.xi3(2,2,(null==t||null==t.option_will_fund?null:t.option_will_fund.lease_fee_base_msat)/1e3,"1.0-0")," Sats + ",A.xi3(3,5,(null==t||null==t.option_will_fund?null:t.option_will_fund.lease_fee_basis)/100,"1.2-2"),"% ")}}function bu(r,y){1&r&&(A.TgZ(0,"th",45),A._uU(1," Routing Fee "),A.qZA())}function Gu(r,y){if(1&r&&(A.TgZ(0,"td",46),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=y.$implicit;A.xp6(1),A.AsE(" ",A.xi3(2,2,(null==t||null==t.option_will_fund?null:t.option_will_fund.channel_fee_max_base_msat)/1e3,"1.0-0")," Sats + ",A.xi3(3,5,1e3*(null==t||null==t.option_will_fund?null:t.option_will_fund.channel_fee_max_proportional_thousandths),"1.0-0")," ppm ")}}function Hu(r,y){1&r&&(A.TgZ(0,"th",47),A._uU(1," Channel Opening Fee "),A.qZA())}function Ju(r,y){if(1&r&&(A.TgZ(0,"td",46)(1,"span",48),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=y.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,t.channelOpeningFee,"1.0-0")," Sats ")}}function Ou(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"th",49)(1,"div",50)(2,"mat-select",51),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",52),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function ku(r,y){if(1&r){const t=A.EpF();A.TgZ(0,"td",53)(1,"div",54)(2,"mat-select",51),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",52),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onViewLeaseInfo(dA)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",52),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onOpenChannel(dA)}),A._uU(7,"Open Channel"),A.qZA(),A.TgZ(8,"mat-option",52),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().viewLeaseOn(dA,"LN")}),A._uU(9,"View on Lnrouter"),A.qZA(),A.TgZ(10,"mat-option",52),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().viewLeaseOn(dA,"AM")}),A._uU(11,"View on Amboss"),A.qZA()()()()}}function ju(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"No node with liquidity."),A.qZA())}function Ku(r,y){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting nodes with liquidity..."),A.qZA())}function Vu(r,y){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function Wu(r,y){if(1&r&&(A.TgZ(0,"td",55),A.YNc(1,ju,2,0,"p",15),A.YNc(2,Ku,2,0,"p",15),A.YNc(3,Vu,2,1,"p",15),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.liquidityNodes&&t.liquidityNodes.data)||(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.liquidityNodes&&t.liquidityNodes.data)||(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.liquidityNodes&&t.liquidityNodes.data)||(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Zu=function(r){return{"display-none":r}};function Xu(r,y){if(1&r&&A._UZ(0,"tr",56),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,Zu,(null==t.liquidityNodes?null:t.liquidityNodes.data)&&(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)>0))}}function qu(r,y){1&r&&A._UZ(0,"tr",57)}function _u(r,y){1&r&&A._UZ(0,"tr",58)}const $u=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},Af=function(){return["no_lqNode"]},nf=qt.Bz.forChild([{path:"",component:n,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:Fo,canActivate:[ze.eQ]},{path:"onchain",component:fs,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"receive/utxos"},{path:"receive/:selTab",component:t0,canActivate:[ze.eQ]},{path:"send/:selTab",component:Wr,data:{sweepAll:!1},canActivate:[ze.eQ]},{path:"sweep/:selTab",component:Wr,data:{sweepAll:!0},canActivate:[ze.eQ]}]},{path:"connections",component:Ia,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:Xr,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:qr,canActivate:[ze.eQ]},{path:"pending",component:fl,canActivate:[ze.eQ]}]},{path:"peers",component:P,data:{sweepAll:!1},canActivate:[ze.eQ]}]},{path:"liquidityads",component:(()=>{class r{constructor(t,s,z,dA,st){this.logger=t,this.store=s,this.dataService=z,this.commonService=dA,this.rtlEffects=st,this.askTooltipMsg="",this.nodesTooltipMsg="",this.displayedColumns=[],this.faBullhorn=h.Acd,this.faExclamationTriangle=h.eHv,this.totalBalance=0,this.channelAmount=1e5,this.channelOpeningFeeRate=10,this.nodeCapacity=5e5,this.channelCount=5,this.liquidityNodesData=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus={status:a.Bn.INITIATED},this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.askTooltipMsg="Specify the liquidity requirements for your node: \n 1. Channel Amount - Amount in Sats you need for the channel opened to your node \n 2. Channel opening fee rate - Rate in Sats/vByte that you are willing to pay to open the channel to you",this.nodesTooltipMsg="These nodes are advertising their liquidity offering on the network.\nYou should pay attention to the following aspects to evaluate each node offer: \n- The total bitcoin deployed on the node, the more the better\n",this.nodesTooltipMsg=this.nodesTooltipMsg+"- The number of channels open on the node, the more the better\n- The channel open fee which the node will charge from you\n- The routing fee which the node will charge on the payments, the lesser the better\n- The reliability of the node, ideally uptime. Refer to the information being provided by the node explorers",this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","channelOpeningFee","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","leaseFee","routingFee","channelOpeningFee","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","leaseFee","routingFee","channelOpeningFee","actions"])}ngOnInit(){(0,Ba.a)([this.store.select(g.OL),this.dataService.listNetworkNodes("?liquidity_ads=yes")]).pipe((0,i.R)(this.unSubs[0])).subscribe({next:([t,s])=>{this.information=t.information,this.totalBalance=t.balance.totalBalance,this.logger.info(t),s&&!s.length&&(s=[]),this.logger.info("Received Liquidity Ads Enabled Nodes: "+JSON.stringify(s)),this.apiCallStatus.status=a.Bn.COMPLETED,this.liquidityNodesData=s.filter(z=>(z.tor_node=!!z.addresses&&z.addresses.filter(dA=>{var st;return null===(st=null==dA?void 0:dA.type)||void 0===st?void 0:st.includes("tor")}).length>0,z.nodeid!==this.information.id)),this.onCalculateOpeningFee(),this.loadLiqNodesTable(this.liquidityNodesData)},error:t=>{this.logger.error("Liquidity Ads Nodes Error: "+JSON.stringify(t)),this.apiCallStatus.status=a.Bn.ERROR,this.errorMessage=JSON.stringify(t)}})}onCalculateOpeningFee(){this.liquidityNodesData.forEach(t=>{t.option_will_fund&&(t.channelOpeningFee=+t.option_will_fund.lease_fee_base_msat/1e3+this.channelAmount*+t.option_will_fund.lease_fee_basis/1e4+ +t.option_will_fund.funding_weight/4*this.channelOpeningFeeRate)}),this.paginator&&this.paginator.firstPage()}onFilter(){}loadLiqNodesTable(t){this.liquidityNodes=new FA.by([...t]),this.liquidityNodes.sortingDataAccessor=(s,z)=>s[z]&&isNaN(s[z])?s[z].toLocaleLowerCase():s[z]?+s[z]:null,this.liquidityNodes.sort=this.sort,this.liquidityNodes.paginator=this.paginator,this.sort&&this.sort.sort({id:"channelOpeningFee",start:"asc",disableClear:!0}),this.liquidityNodes.filterPredicate=(s,z)=>s.channelCount>=this.channelCount&&s.nodeCapacity>=this.nodeCapacity,this.onFilter()}viewLeaseOn(t,s){"LN"===s?window.open("https://lnrouter.app/node/"+t.nodeid,"_blank"):"AM"===s&&window.open("https://amboss.space/node/"+t.nodeid,"_blank")}onOpenChannel(t){this.store.dispatch((0,KA.qR)({payload:{data:{alertTitle:"Open Channel",message:{node:t,balance:this.totalBalance,requestedAmount:this.channelAmount,feeRate:this.channelOpeningFeeRate,localAmount:2e4},component:yu}}}))}onViewLeaseInfo(t){const s=t.addresses.reduce((dA,st)=>(st.address.length>40&&(st.address=st.address.substring(0,39)+"..."),dA.concat(JSON.stringify(st).replace("{","").replace("}","").replace(/:/g,": ").replace(/,/g,"        ").replace(/"/g,""))),[]);this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Lease Information",noBtnText:"Close",yesBtnText:"Open Channel",message:[[{key:"alias",value:t.alias,title:"Node Alias",width:50,type:a.Gi.STRING},{key:"last_timestamp",value:t.last_timestamp,title:"Last Timestamp",width:50,type:a.Gi.DATE_TIME}],[{key:"nodeid",value:t.nodeid,title:"Node ID",width:100,type:a.Gi.STRING}],[{key:"base_fee",value:t.option_will_fund.lease_fee_base_msat/1e3,title:"Lease Base Fee (Sats)",width:50,type:a.Gi.NUMBER},{key:"fee_basis",value:t.option_will_fund.lease_fee_basis,title:"Lease Base Basis (bps)",width:50,type:a.Gi.NUMBER}],[{key:"channel_max_base",value:t.option_will_fund.channel_fee_max_base_msat/1e3,title:"Max Channel Routing Base Fee (Sats)",width:50,type:a.Gi.NUMBER},{key:"channel_max_rate",value:1e3*t.option_will_fund.channel_fee_max_proportional_thousandths,title:"Max Channel Routing Fee Rate (ppm)",width:50,type:a.Gi.NUMBER}],[{key:"funding_rate",value:t.option_will_fund.funding_weight,title:"Funding Weight",width:100,type:a.Gi.NUMBER}],[{key:"address",value:s,title:"Address",width:100,type:a.Gi.ARRAY}]]}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[1])).subscribe(dA=>{dA&&this.onOpenChannel(t)})}onDownloadCSV(){this.liquidityNodes.data&&this.liquidityNodes.data.length>0&&this.commonService.downloadFile(this.liquidityNodes.data,"LiquidityNodes")}onFilterReset(){this.nodeCapacity=0,this.channelCount=0}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(zA.D),A.Y36(e.v),A.Y36(DA.V))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-liquidity-ads-list"]],viewQuery:function(t,s){if(1&t&&(A.Gf(et.YE,5),A.Gf(at.NW,5)),2&t){let z;A.iGM(z=A.CRH())&&(s.sort=z.first),A.iGM(z=A.CRH())&&(s.paginator=z.first)}},features:[A._Bn([{provide:at.ye,useValue:(0,a.pt)("Liquidity Ads")}])],decls:54,vars:20,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"],[1,"padding-gap-large"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["formAsk","ngForm"],["fxFlex","100","fxLayout","row",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start start",1,"page-sub-title-container","mt-1"],["fxFlex","30"],["matTooltipPosition","above","matTooltipClass","pre-wrap",1,"info-icon","info-icon-primary",3,"matTooltip"],["fxFlex","34"],["autoFocus","","matInput","","placeholder","Channel Amount (Sats)","name","channelAmount","tabindex","1","type","number","step","10000","required","",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Channel Opening Fee Rate (Sats/vByte)","name","channelOpeningFeeRate","type","number","step","10","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container","mt-2",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","capacityChannels"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","leaseFee"],["matColumnDef","routingFee"],["matColumnDef","channelOpeningFee"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_lqNode"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["matBadge","Tor Node","matBadgeOverlap","false","class","tab-badge",4,"ngIf"],["matBadge","Tor Node","matBadgeOverlap","false",1,"tab-badge"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Liquidity Ads"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"div",5)(8,"form",6,7)(10,"div",8),A._UZ(11,"fa-icon",9),A.TgZ(12,"span"),A._uU(13,"Ads should be suplemented with additional research of the nodes, before buying liquidity."),A.qZA()(),A.TgZ(14,"div",10)(15,"div",11)(16,"span",2),A._uU(17," Liquidity Ask "),A.TgZ(18,"mat-icon",12),A._uU(19,"info_outline"),A.qZA()()(),A.TgZ(20,"mat-form-field",13)(21,"input",14),A.NdJ("ngModelChange",function(dA){return s.channelAmount=dA})("keyup",function(){return s.onCalculateOpeningFee()}),A.qZA(),A.YNc(22,xu,2,0,"mat-error",15),A.qZA(),A.TgZ(23,"mat-form-field",13)(24,"input",16),A.NdJ("ngModelChange",function(dA){return s.channelOpeningFeeRate=dA})("keyup",function(){return s.onCalculateOpeningFee()}),A.qZA(),A.YNc(25,Fu,2,0,"mat-error",15),A.qZA()()(),A.TgZ(26,"div",17),A.YNc(27,Yu,1,0,"mat-progress-bar",18),A.TgZ(28,"table",19,20),A.ynx(30,21),A.YNc(31,Tu,2,0,"th",22),A.YNc(32,Uu,3,5,"td",23),A.BQk(),A.ynx(33,24),A.YNc(34,Pu,2,0,"th",25),A.YNc(35,Ru,4,8,"td",26),A.BQk(),A.ynx(36,27),A.YNc(37,zu,2,0,"th",25),A.YNc(38,Lu,4,8,"td",26),A.BQk(),A.ynx(39,28),A.YNc(40,bu,2,0,"th",25),A.YNc(41,Gu,4,8,"td",26),A.BQk(),A.ynx(42,29),A.YNc(43,Hu,2,0,"th",30),A.YNc(44,Ju,4,4,"td",26),A.BQk(),A.ynx(45,31),A.YNc(46,Ou,6,0,"th",32),A.YNc(47,ku,12,0,"td",33),A.BQk(),A.ynx(48,34),A.YNc(49,Wu,4,3,"td",35),A.BQk(),A.YNc(50,Xu,1,3,"tr",36),A.YNc(51,qu,1,0,"tr",37),A.YNc(52,_u,1,0,"tr",38),A.qZA()(),A._UZ(53,"mat-paginator",39),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faBullhorn),A.xp6(10),A.Q6J("icon",s.faExclamationTriangle),A.xp6(7),A.Q6J("matTooltip",s.askTooltipMsg),A.xp6(3),A.Q6J("ngModel",s.channelAmount),A.xp6(1),A.Q6J("ngIf",!s.channelAmount),A.xp6(2),A.Q6J("ngModel",s.channelOpeningFeeRate),A.xp6(1),A.Q6J("ngIf",!s.channelOpeningFeeRate),A.xp6(2),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.liquidityNodes)("ngClass",A.VKq(17,$u,""!==s.errorMessage)),A.xp6(22),A.Q6J("matFooterRowDef",A.DdM(19,Af)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[wt.xw,wt.Wh,f.BN,w.a8,w.dn,wt.yH,OA._Y,OA.JL,OA.F,S.Hw,aA.gM,Z.KE,H.Nt,OA.wV,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,ht.O5,Z.TO,lA.$V,Y.pW,FA.BZ,et.YE,ht.mk,m.oO,FA.w1,FA.fO,FA.ge,et.nU,FA.Dz,FA.ev,ht.PC,m.Zl,ui.k,CA.gD,CA.$L,wA.ey,FA.mD,FA.yh,FA.Ke,FA.Q2,FA.as,FA.XQ,FA.nj,FA.Gk,at.NW],pipes:[ht.JJ],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})(),canActivate:[ze.eQ]},{path:"transactions",component:Cs,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:aa,canActivate:[ze.eQ]},{path:"invoices",component:UA,canActivate:[ze.eQ]},{path:"offers",component:uB,canActivate:[ze.eQ]},{path:"offrBookmarks",component:RB,canActivate:[ze.eQ]}]},{path:"messages",component:Ki,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"sign"},{path:"sign",component:he,canActivate:[ze.eQ]},{path:"verify",component:Hn,canActivate:[ze.eQ]}]},{path:"routing",component:ds,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:na,canActivate:[ze.eQ]},{path:"failedtransactions",component:Mc,canActivate:[ze.eQ]},{path:"localfail",component:ou,canActivate:[ze.eQ]},{path:"routingpeers",component:fg,canActivate:[ze.eQ]}]},{path:"reports",component:Eg,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"routingreport"},{path:"routingreport",component:mg,canActivate:[ze.eQ]},{path:"transactions",component:Ng,canActivate:[ze.eQ]}]},{path:"graph",component:Rg,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:bs,canActivate:[ze.eQ]},{path:"queryroutes",component:We,canActivate:[ze.eQ]}]},{path:"rates",component:A0,canActivate:[ze.eQ]},{path:"**",component:Ug.w},{path:"network",redirectTo:"rates"},{path:"wallet",redirectTo:"home"},{path:"backup",redirectTo:"home"}]}]);var rf=Nt(8750);let af=(()=>{class r{}return r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=A.oAB({type:r,bootstrap:[n]}),r.\u0275inj=A.cJS({providers:[ze.eQ],imports:[[ht.ez,rf.m,nf]]}),r})()},4641:function(oi,Fr,Nt){var ht=Nt(7757);"undefined"!=typeof self&&self,oi.exports=function(){var qt={9282:function(Y,I,n){"use strict";var c=n(4155);function i($){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(hA){return typeof hA}:function(hA){return hA&&"function"==typeof Symbol&&hA.constructor===Symbol&&hA!==Symbol.prototype?"symbol":typeof hA})($)}var v,D,h=n(2136).codes,a=h.ERR_AMBIGUOUS_ARGUMENT,g=h.ERR_INVALID_ARG_TYPE,E=h.ERR_INVALID_ARG_VALUE,u=h.ERR_INVALID_RETURN_VALUE,C=h.ERR_MISSING_ARGS,e=n(5961),B=n(9539).inspect,w=n(9539).types,Q=w.isPromise,p=w.isRegExp,S=Object.assign?Object.assign:n(8091).assign,m=Object.is?Object.is:n(609);function R(){var $=n(9158);v=$.isDeepEqual,D=$.isDeepStrictEqual}var AA=!1,lA=Y.exports=yA,pA={};function cA($){throw $.message instanceof Error?$.message:new e($)}function BA($,W,hA,vA){if(!hA){var nA=!1;if(0===W)nA=!0,vA="No value argument passed to `assert.ok()`";else if(vA instanceof Error)throw vA;var EA=new e({actual:hA,expected:!0,message:vA,operator:"==",stackStartFn:$});throw EA.generatedMessage=nA,EA}}function yA(){for(var $=arguments.length,W=new Array($),hA=0;hA<$;hA++)W[hA]=arguments[hA];BA.apply(void 0,[yA,W.length].concat(W))}lA.fail=function gA($,W,hA,vA,nA){var GA,EA=arguments.length;if(0===EA?GA="Failed":1===EA?(hA=$,$=void 0):(!1===AA&&(AA=!0,(c.emitWarning?c.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===EA&&(vA="!=")),hA instanceof Error)throw hA;var lt={actual:$,expected:W,operator:void 0===vA?"fail":vA,stackStartFn:nA||gA};void 0!==hA&&(lt.message=hA);var TA=new e(lt);throw GA&&(TA.message=GA,TA.generatedMessage=!0),TA},lA.AssertionError=e,lA.ok=yA,lA.equal=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");W!=hA&&cA({actual:W,expected:hA,message:vA,operator:"==",stackStartFn:$})},lA.notEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");W==hA&&cA({actual:W,expected:hA,message:vA,operator:"!=",stackStartFn:$})},lA.deepEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");void 0===v&&R(),v(W,hA)||cA({actual:W,expected:hA,message:vA,operator:"deepEqual",stackStartFn:$})},lA.notDeepEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");void 0===v&&R(),v(W,hA)&&cA({actual:W,expected:hA,message:vA,operator:"notDeepEqual",stackStartFn:$})},lA.deepStrictEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");void 0===v&&R(),D(W,hA)||cA({actual:W,expected:hA,message:vA,operator:"deepStrictEqual",stackStartFn:$})},lA.notDeepStrictEqual=function xA($,W,hA){if(arguments.length<2)throw new C("actual","expected");void 0===v&&R(),D($,W)&&cA({actual:$,expected:W,message:hA,operator:"notDeepStrictEqual",stackStartFn:xA})},lA.strictEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");m(W,hA)||cA({actual:W,expected:hA,message:vA,operator:"strictEqual",stackStartFn:$})},lA.notStrictEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");m(W,hA)&&cA({actual:W,expected:hA,message:vA,operator:"notStrictEqual",stackStartFn:$})};var _=function $(W,hA,vA){var nA=this;(function o($,W){if(!($ instanceof W))throw new TypeError("Cannot call a class as a function")})(this,$),hA.forEach(function(EA){EA in W&&(nA[EA]=void 0!==vA&&"string"==typeof vA[EA]&&p(W[EA])&&W[EA].test(vA[EA])?vA[EA]:W[EA])})};function MA($,W,hA,vA,nA,EA){if(!(hA in $)||!D($[hA],W[hA])){if(!vA){var GA=new _($,nA),nt=new _(W,nA,$),lt=new e({actual:GA,expected:nt,operator:"deepStrictEqual",stackStartFn:EA});throw lt.actual=$,lt.expected=W,lt.operator=EA.name,lt}cA({actual:$,expected:W,message:vA,operator:EA.name,stackStartFn:EA})}}function uA($,W,hA,vA){if("function"!=typeof W){if(p(W))return W.test($);if(2===arguments.length)throw new g("expected",["Function","RegExp"],W);if("object"!==i($)||null===$){var nA=new e({actual:$,expected:W,message:hA,operator:"deepStrictEqual",stackStartFn:vA});throw nA.operator=vA.name,nA}var EA=Object.keys(W);if(W instanceof Error)EA.push("name","message");else if(0===EA.length)throw new E("error",W,"may not be an empty object");return void 0===v&&R(),EA.forEach(function(GA){"string"==typeof $[GA]&&p(W[GA])&&W[GA].test($[GA])||MA($,W,GA,hA,EA,vA)}),!0}return void 0!==W.prototype&&$ instanceof W||!Error.isPrototypeOf(W)&&!0===W.call({},$)}function QA($){if("function"!=typeof $)throw new g("fn","Function",$);try{$()}catch(W){return W}return pA}function SA($){return Q($)||null!==$&&"object"===i($)&&"function"==typeof $.then&&"function"==typeof $.catch}function bA($){return Promise.resolve().then(function(){var W;if("function"==typeof $){if(!SA(W=$()))throw new u("instance of Promise","promiseFn",W)}else{if(!SA($))throw new g("promiseFn",["Function","Promise"],$);W=$}return Promise.resolve().then(function(){return W}).then(function(){return pA}).catch(function(hA){return hA})})}function ZA($,W,hA,vA){if("string"==typeof hA){if(4===arguments.length)throw new g("error",["Object","Error","Function","RegExp"],hA);if("object"===i(W)&&null!==W){if(W.message===hA)throw new a("error/message",'The error message "'.concat(W.message,'" is identical to the message.'))}else if(W===hA)throw new a("error/message",'The error "'.concat(W,'" is identical to the message.'));vA=hA,hA=void 0}else if(null!=hA&&"object"!==i(hA)&&"function"!=typeof hA)throw new g("error",["Object","Error","Function","RegExp"],hA);if(W===pA){var nA="";hA&&hA.name&&(nA+=" (".concat(hA.name,")")),nA+=vA?": ".concat(vA):".",cA({actual:void 0,expected:hA,operator:$.name,message:"Missing expected ".concat("rejects"===$.name?"rejection":"exception").concat(nA),stackStartFn:$})}if(hA&&!uA(W,hA,vA,$))throw W}function q($,W,hA,vA){if(W!==pA){if("string"==typeof hA&&(vA=hA,hA=void 0),!hA||uA(W,hA)){var nA=vA?": ".concat(vA):".";cA({actual:W,expected:hA,operator:$.name,message:"Got unwanted ".concat("doesNotReject"===$.name?"rejection":"exception").concat(nA,"\n")+'Actual message: "'.concat(W&&W.message,'"'),stackStartFn:$})}throw W}}function J(){for(var $=arguments.length,W=new Array($),hA=0;hA<$;hA++)W[hA]=arguments[hA];BA.apply(void 0,[J,W.length].concat(W))}lA.throws=function $(W){for(var hA=arguments.length,vA=new Array(hA>1?hA-1:0),nA=1;nA1?hA-1:0),nA=1;nA1?hA-1:0),nA=1;nA1?hA-1:0),nA=1;nAgA.length)&&(yA=gA.length),gA.substring(yA-BA.length,yA)===BA}var T="",F="",R="",L="",Z={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function AA(gA){var BA=Object.keys(gA),yA=Object.create(Object.getPrototypeOf(gA));return BA.forEach(function(xA){yA[xA]=gA[xA]}),Object.defineProperty(yA,"message",{value:gA.message}),yA}function lA(gA){return m(gA,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function pA(gA,BA,yA){var xA="",_="",MA=0,uA="",QA=!1,SA=lA(gA),bA=SA.split("\n"),ZA=lA(BA).split("\n"),q=0,J="";if("strictEqual"===yA&&"object"===p(gA)&&"object"===p(BA)&&null!==gA&&null!==BA&&(yA="strictEqualObject"),1===bA.length&&1===ZA.length&&bA[0]!==ZA[0]){var $=bA[0].length+ZA[0].length;if($<=10){if(!("object"===p(gA)&&null!==gA||"object"===p(BA)&&null!==BA||0===gA&&0===BA))return"".concat(Z[yA],"\n\n")+"".concat(bA[0]," !== ").concat(ZA[0],"\n")}else if("strictEqualObject"!==yA&&$<(c.stderr&&c.stderr.isTTY?c.stderr.columns:80)){for(;bA[0][q]===ZA[0][q];)q++;q>2&&(J="\n ".concat(function U(gA,BA){if(BA=Math.floor(BA),0==gA.length||0==BA)return"";var yA=gA.length*BA;for(BA=Math.floor(Math.log(BA)/Math.log(2));BA;)gA+=gA,BA--;return gA+gA.substring(0,yA-gA.length)}(" ",q),"^"),q=0)}}for(var hA=bA[bA.length-1],vA=ZA[ZA.length-1];hA===vA&&(q++<2?uA="\n ".concat(hA).concat(uA):xA=hA,bA.pop(),ZA.pop(),0!==bA.length&&0!==ZA.length);)hA=bA[bA.length-1],vA=ZA[ZA.length-1];var nA=Math.max(bA.length,ZA.length);if(0===nA){var EA=SA.split("\n");if(EA.length>30)for(EA[26]="".concat(T,"...").concat(L);EA.length>27;)EA.pop();return"".concat(Z.notIdentical,"\n\n").concat(EA.join("\n"),"\n")}q>3&&(uA="\n".concat(T,"...").concat(L).concat(uA),QA=!0),""!==xA&&(uA="\n ".concat(xA).concat(uA),xA="");var GA=0,nt=Z[yA]+"\n".concat(F,"+ actual").concat(L," ").concat(R,"- expected").concat(L),lt=" ".concat(T,"...").concat(L," Lines skipped");for(q=0;q1&&q>2&&(TA>4?(_+="\n".concat(T,"...").concat(L),QA=!0):TA>3&&(_+="\n ".concat(ZA[q-2]),GA++),_+="\n ".concat(ZA[q-1]),GA++),MA=q,xA+="\n".concat(R,"-").concat(L," ").concat(ZA[q]),GA++;else if(ZA.length1&&q>2&&(TA>4?(_+="\n".concat(T,"...").concat(L),QA=!0):TA>3&&(_+="\n ".concat(bA[q-2]),GA++),_+="\n ".concat(bA[q-1]),GA++),MA=q,_+="\n".concat(F,"+").concat(L," ").concat(bA[q]),GA++;else{var it=ZA[q],vt=bA[q],It=vt!==it&&(!D(vt,",")||vt.slice(0,-1)!==it);It&&D(it,",")&&it.slice(0,-1)===vt&&(It=!1,vt+=","),It?(TA>1&&q>2&&(TA>4?(_+="\n".concat(T,"...").concat(L),QA=!0):TA>3&&(_+="\n ".concat(bA[q-2]),GA++),_+="\n ".concat(bA[q-1]),GA++),MA=q,_+="\n".concat(F,"+").concat(L," ").concat(vt),xA+="\n".concat(R,"-").concat(L," ").concat(it),GA+=2):(_+=xA,xA="",(1===TA||0===q)&&(_+="\n ".concat(vt),GA++))}if(GA>20&&q30)for(q[26]="".concat(T,"...").concat(L);q.length>27;)q.pop();xA=g(this,1===q.length?Q(BA).call(this,"".concat(ZA," ").concat(q[0])):Q(BA).call(this,"".concat(ZA,"\n\n").concat(q.join("\n"),"\n")))}else{var J=lA(QA),$="",W=Z[MA];"notDeepEqual"===MA||"notEqual"===MA?(J="".concat(Z[MA],"\n\n").concat(J)).length>1024&&(J="".concat(J.slice(0,1021),"...")):($="".concat(lA(SA)),J.length>512&&(J="".concat(J.slice(0,509),"...")),$.length>512&&($="".concat($.slice(0,509),"...")),"deepEqual"===MA||"equal"===MA?J="".concat(W,"\n\n").concat(J,"\n\nshould equal\n\n"):$=" ".concat(MA," ").concat($)),xA=g(this,Q(BA).call(this,"".concat(J).concat($)))}return Error.stackTraceLimit=bA,xA.generatedMessage=!_,Object.defineProperty(E(xA),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),xA.code="ERR_ASSERTION",xA.actual=QA,xA.expected=SA,xA.operator=MA,Error.captureStackTrace&&Error.captureStackTrace(E(xA),uA),xA.name="AssertionError",g(xA)}return function u(gA,BA){if("function"!=typeof BA&&null!==BA)throw new TypeError("Super expression must either be null or a function");gA.prototype=Object.create(BA&&BA.prototype,{constructor:{value:gA,writable:!0,configurable:!0}}),BA&&w(gA,BA)}(BA,gA),function a(gA,BA,yA){return BA&&h(gA.prototype,BA),yA&&h(gA,yA),gA}(BA,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:m.custom,value:function(xA,_){return m(this,function i(gA){for(var BA=1;BA2?"one of ".concat(S," ").concat(p.slice(0,m-1).join(", "),", or ")+p[m-1]:2===m?"one of ".concat(S," ").concat(p[0]," or ").concat(p[1]):"of ".concat(S," ").concat(p[0])}return"of ".concat(S," ").concat(String(p))}e("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),e("ERR_INVALID_ARG_TYPE",function(p,S,m){var d,v;if(void 0===u&&(u=n(9282)),u("string"==typeof p,"'name' must be a string"),"string"==typeof S&&function B(p,S,m){return p.substr(!m||m<0?0:+m,S.length)===S}(S,"not ")?(d="must not be",S=S.replace(/^not /,"")):d="must be",function w(p,S,m){return(void 0===m||m>p.length)&&(m=p.length),p.substring(m-S.length,m)===S}(p," argument"))v="The ".concat(p," ").concat(d," ").concat(f(S,"type"));else{var D=function Q(p,S,m){return"number"!=typeof m&&(m=0),!(m+S.length>p.length)&&-1!==p.indexOf(S,m)}(p,".")?"property":"argument";v='The "'.concat(p,'" ').concat(D," ").concat(d," ").concat(f(S,"type"))}return v+". Received type ".concat(c(m))},TypeError),e("ERR_INVALID_ARG_VALUE",function(p,S){var m=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===C&&(C=n(9539));var d=C.inspect(S);return d.length>128&&(d="".concat(d.slice(0,128),"...")),"The argument '".concat(p,"' ").concat(m,". Received ").concat(d)},TypeError,RangeError),e("ERR_INVALID_RETURN_VALUE",function(p,S,m){var d;return d=m&&m.constructor&&m.constructor.name?"instance of ".concat(m.constructor.name):"type ".concat(c(m)),"Expected ".concat(p,' to be returned from the "').concat(S,'"')+" function but got ".concat(d,".")},TypeError),e("ERR_MISSING_ARGS",function(){for(var p=arguments.length,S=new Array(p),m=0;m0,"At least one arg needs to be specified");var d="The ",v=S.length;switch(S=S.map(function(D){return'"'.concat(D,'"')}),v){case 1:d+="".concat(S[0]," argument");break;case 2:d+="".concat(S[0]," and ").concat(S[1]," arguments");break;default:d+=S.slice(0,v-1).join(", "),d+=", and ".concat(S[v-1]," arguments")}return"".concat(d," must be specified")},TypeError),Y.exports.codes=E},9158:function(Y,I,n){"use strict";function c(JA,qA){return function l(JA){if(Array.isArray(JA))return JA}(JA)||function o(JA,qA){var at=[],et=!0,FA=!1,dt=void 0;try{for(var OA,mt=JA[Symbol.iterator]();!(et=(OA=mt.next()).done)&&(at.push(OA.value),!qA||at.length!==qA);et=!0);}catch(H){FA=!0,dt=H}finally{try{!et&&null!=mt.return&&mt.return()}finally{if(FA)throw dt}}return at}(JA,qA)||function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function h(JA){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(at){return typeof at}:function(at){return at&&"function"==typeof Symbol&&at.constructor===Symbol&&at!==Symbol.prototype?"symbol":typeof at})(JA)}var a=void 0!==/a/g.flags,g=function(qA){var at=[];return qA.forEach(function(et){return at.push(et)}),at},E=function(qA){var at=[];return qA.forEach(function(et,FA){return at.push([FA,et])}),at},u=Object.is?Object.is:n(609),C=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},e=Number.isNaN?Number.isNaN:n(360);function f(JA){return JA.call.bind(JA)}var B=f(Object.prototype.hasOwnProperty),w=f(Object.prototype.propertyIsEnumerable),Q=f(Object.prototype.toString),p=n(9539).types,S=p.isAnyArrayBuffer,m=p.isArrayBufferView,d=p.isDate,v=p.isMap,D=p.isRegExp,U=p.isSet,T=p.isNativeError,F=p.isBoxedPrimitive,R=p.isNumberObject,L=p.isStringObject,Z=p.isBooleanObject,aA=p.isBigIntObject,AA=p.isSymbolObject,lA=p.isFloat32Array,pA=p.isFloat64Array;function cA(JA){if(0===JA.length||JA.length>10)return!0;for(var qA=0;qA57)return!0}return 10===JA.length&&JA>=Math.pow(2,32)}function gA(JA){return Object.keys(JA).filter(cA).concat(C(JA).filter(Object.prototype.propertyIsEnumerable.bind(JA)))}function BA(JA,qA){if(JA===qA)return 0;for(var at=JA.length,et=qA.length,FA=0,dt=Math.min(at,et);FA=E.length?{done:!0}:{done:!1,value:E[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(E,u){(null==u||u>E.length)&&(u=E.length);for(var C=0,e=new Array(u);Cthis.buffer.length)return this.flush()},f.flush=function(){if(this.bufferOffset>0)return this.push(c.from(this.buffer.slice(0,this.bufferOffset))),this.bufferOffset=0},f.writeBuffer=function(w){return this.flush(),this.push(w),this.pos+=w.length},f.writeString=function(w,Q){switch(void 0===Q&&(Q="ascii"),Q){case"utf16le":case"ucs2":case"utf8":case"ascii":return this.writeBuffer(c.from(w,Q));case"utf16be":for(var p=c.from(w,"utf16le"),S=0,m=p.length-1;S>>16&255,this.buffer[this.bufferOffset++]=w>>>8&255,this.buffer[this.bufferOffset++]=255&w,this.pos+=3},f.writeUInt24LE=function(w){return this.ensure(3),this.buffer[this.bufferOffset++]=255&w,this.buffer[this.bufferOffset++]=w>>>8&255,this.buffer[this.bufferOffset++]=w>>>16&255,this.pos+=3},f.writeInt24BE=function(w){return this.writeUInt24BE(w>=0?w:w+16777215+1)},f.writeInt24LE=function(w){return this.writeUInt24LE(w>=0?w:w+16777215+1)},f.fill=function(w,Q){if(Q=this.length)){if(null==this.items[w]){var Q=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.ctx)*w,this.items[w]=this.type.decode(this.stream,this.ctx),this.stream.pos=Q}return this.items[w]}},f.toArray=function(){for(var w=[],Q=0,p=this.length;Q>1),(f=a.call(this,"Int"+u,C)||this)._point=1<u)throw new RangeError('The value "'+H+'" is invalid for option "size"');var k=new Uint8Array(H);return Object.setPrototypeOf(k,f.prototype),k}function f(H,k,b){if("number"==typeof H){if("string"==typeof k)throw new TypeError('The "string" argument must be of type string. Received type number');return p(H)}return B(H,k,b)}function B(H,k,b){if("string"==typeof H)return function S(H,k){if(("string"!=typeof k||""===k)&&(k="utf8"),!f.isEncoding(k))throw new TypeError("Unknown encoding: "+k);var b=0|F(H,k),CA=e(b),wA=CA.write(H,k);return wA!==b&&(CA=CA.slice(0,wA)),CA}(H,k);if(ArrayBuffer.isView(H))return function d(H){if(et(H,Uint8Array)){var k=new Uint8Array(H);return v(k.buffer,k.byteOffset,k.byteLength)}return m(H)}(H);if(null==H)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if(et(H,ArrayBuffer)||H&&et(H.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(et(H,SharedArrayBuffer)||H&&et(H.buffer,SharedArrayBuffer)))return v(H,k,b);if("number"==typeof H)throw new TypeError('The "value" argument must not be of type number. Received type number');var CA=H.valueOf&&H.valueOf();if(null!=CA&&CA!==H)return f.from(CA,k,b);var wA=function D(H){if(f.isBuffer(H)){var k=0|U(H.length),b=e(k);return 0===b.length||H.copy(b,0,0,k),b}return void 0!==H.length?"number"!=typeof H.length||FA(H.length)?e(0):m(H):"Buffer"===H.type&&Array.isArray(H.data)?m(H.data):void 0}(H);if(wA)return wA;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof H[Symbol.toPrimitive])return f.from(H[Symbol.toPrimitive]("string"),k,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H)}function w(H){if("number"!=typeof H)throw new TypeError('"size" argument must be of type number');if(H<0)throw new RangeError('The value "'+H+'" is invalid for option "size"')}function p(H){return w(H),e(H<0?0:0|U(H))}function m(H){for(var k=H.length<0?0:0|U(H.length),b=e(k),CA=0;CA=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|H}function F(H,k){if(f.isBuffer(H))return H.length;if(ArrayBuffer.isView(H)||et(H,ArrayBuffer))return H.byteLength;if("string"!=typeof H)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);var b=H.length,CA=arguments.length>2&&!0===arguments[2];if(!CA&&0===b)return 0;for(var wA=!1;;)switch(k){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return It(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*b;case"hex":return b>>>1;case"base64":return qA(H).length;default:if(wA)return CA?-1:It(H).length;k=(""+k).toLowerCase(),wA=!0}}function R(H,k,b){var CA=!1;if((void 0===k||k<0)&&(k=0),k>this.length||((void 0===b||b>this.length)&&(b=this.length),b<=0)||(b>>>=0)<=(k>>>=0))return"";for(H||(H="utf8");;)switch(H){case"hex":return QA(this,k,b);case"utf8":case"utf-8":return yA(this,k,b);case"ascii":return MA(this,k,b);case"latin1":case"binary":return uA(this,k,b);case"base64":return BA(this,k,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return SA(this,k,b);default:if(CA)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),CA=!0}}function L(H,k,b){var CA=H[k];H[k]=H[b],H[b]=CA}function Z(H,k,b,CA,wA){if(0===H.length)return-1;if("string"==typeof b?(CA=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),FA(b=+b)&&(b=wA?0:H.length-1),b<0&&(b=H.length+b),b>=H.length){if(wA)return-1;b=H.length-1}else if(b<0){if(!wA)return-1;b=0}if("string"==typeof k&&(k=f.from(k,CA)),f.isBuffer(k))return 0===k.length?-1:aA(H,k,b,CA,wA);if("number"==typeof k)return k&=255,"function"==typeof Uint8Array.prototype.indexOf?wA?Uint8Array.prototype.indexOf.call(H,k,b):Uint8Array.prototype.lastIndexOf.call(H,k,b):aA(H,[k],b,CA,wA);throw new TypeError("val must be string, number or Buffer")}function aA(H,k,b,CA,wA){var j,RA=1,rA=H.length,Bt=k.length;if(void 0!==CA&&("ucs2"===(CA=String(CA).toLowerCase())||"ucs-2"===CA||"utf16le"===CA||"utf-16le"===CA)){if(H.length<2||k.length<2)return-1;RA=2,rA/=2,Bt/=2,b/=2}function Yt(jA,ct){return 1===RA?jA[ct]:jA.readUInt16BE(ct*RA)}if(wA){var XA=-1;for(j=b;jrA&&(b=rA-Bt),j=b;j>=0;j--){for(var KA=!0,DA=0;DAwA&&(CA=wA):CA=wA;var rA,RA=k.length;for(CA>RA/2&&(CA=RA/2),rA=0;rA>8,RA.push(b%256),RA.push(CA);return RA}(k,H.length-b),H,b,CA)}function BA(H,k,b){return a.fromByteArray(0===k&&b===H.length?H:H.slice(k,b))}function yA(H,k,b){b=Math.min(H.length,b);for(var CA=[],wA=k;wA239?4:RA>223?3:RA>191?2:1;if(wA+Bt<=b){var Yt=void 0,j=void 0,XA=void 0,KA=void 0;switch(Bt){case 1:RA<128&&(rA=RA);break;case 2:128==(192&(Yt=H[wA+1]))&&(KA=(31&RA)<<6|63&Yt)>127&&(rA=KA);break;case 3:j=H[wA+2],128==(192&(Yt=H[wA+1]))&&128==(192&j)&&(KA=(15&RA)<<12|(63&Yt)<<6|63&j)>2047&&(KA<55296||KA>57343)&&(rA=KA);break;case 4:j=H[wA+2],XA=H[wA+3],128==(192&(Yt=H[wA+1]))&&128==(192&j)&&128==(192&XA)&&(KA=(15&RA)<<18|(63&Yt)<<12|(63&j)<<6|63&XA)>65535&&KA<1114112&&(rA=KA)}}null===rA?(rA=65533,Bt=1):rA>65535&&(CA.push((rA-=65536)>>>10&1023|55296),rA=56320|1023&rA),CA.push(rA),wA+=Bt}return function _(H){var k=H.length;if(k<=4096)return String.fromCharCode.apply(String,H);for(var b="",CA=0;CAwA.length?(f.isBuffer(rA)||(rA=f.from(rA)),rA.copy(wA,RA)):Uint8Array.prototype.set.call(wA,rA,RA);else{if(!f.isBuffer(rA))throw new TypeError('"list" argument must be an Array of Buffers');rA.copy(wA,RA)}RA+=rA.length}return wA},f.byteLength=F,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var k=this.length;if(k%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var b=0;bb&&(k+=" ... "),""},E&&(f.prototype[E]=f.prototype.inspect),f.prototype.compare=function(k,b,CA,wA,RA){if(et(k,Uint8Array)&&(k=f.from(k,k.offset,k.byteLength)),!f.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(void 0===b&&(b=0),void 0===CA&&(CA=k?k.length:0),void 0===wA&&(wA=0),void 0===RA&&(RA=this.length),b<0||CA>k.length||wA<0||RA>this.length)throw new RangeError("out of range index");if(wA>=RA&&b>=CA)return 0;if(wA>=RA)return-1;if(b>=CA)return 1;if(this===k)return 0;for(var rA=(RA>>>=0)-(wA>>>=0),Bt=(CA>>>=0)-(b>>>=0),Yt=Math.min(rA,Bt),j=this.slice(wA,RA),XA=k.slice(b,CA),KA=0;KA>>=0,isFinite(CA)?(CA>>>=0,void 0===wA&&(wA="utf8")):(wA=CA,CA=void 0)}var RA=this.length-b;if((void 0===CA||CA>RA)&&(CA=RA),k.length>0&&(CA<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");wA||(wA="utf8");for(var rA=!1;;)switch(wA){case"hex":return AA(this,k,b,CA);case"utf8":case"utf-8":return lA(this,k,b,CA);case"ascii":case"latin1":case"binary":return pA(this,k,b,CA);case"base64":return cA(this,k,b,CA);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return gA(this,k,b,CA);default:if(rA)throw new TypeError("Unknown encoding: "+wA);wA=(""+wA).toLowerCase(),rA=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function MA(H,k,b){var CA="";b=Math.min(H.length,b);for(var wA=k;wACA)&&(b=CA);for(var wA="",RA=k;RAb)throw new RangeError("Trying to access beyond buffer length")}function ZA(H,k,b,CA,wA,RA){if(!f.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>wA||kH.length)throw new RangeError("Index out of range")}function q(H,k,b,CA,wA){nt(k,CA,wA,H,b,7);var RA=Number(k&BigInt(4294967295));H[b++]=RA,H[b++]=RA>>=8,H[b++]=RA>>=8,H[b++]=RA>>=8;var rA=Number(k>>BigInt(32)&BigInt(4294967295));return H[b++]=rA,H[b++]=rA>>=8,H[b++]=rA>>=8,H[b++]=rA>>=8,b}function J(H,k,b,CA,wA){nt(k,CA,wA,H,b,7);var RA=Number(k&BigInt(4294967295));H[b+7]=RA,H[b+6]=RA>>=8,H[b+5]=RA>>=8,H[b+4]=RA>>=8;var rA=Number(k>>BigInt(32)&BigInt(4294967295));return H[b+3]=rA,H[b+2]=rA>>=8,H[b+1]=rA>>=8,H[b]=rA>>=8,b+8}function $(H,k,b,CA,wA,RA){if(b+CA>H.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function W(H,k,b,CA,wA){return k=+k,b>>>=0,wA||$(H,0,b,4),g.write(H,k,b,CA,23,4),b+4}function hA(H,k,b,CA,wA){return k=+k,b>>>=0,wA||$(H,0,b,8),g.write(H,k,b,CA,52,8),b+8}f.prototype.slice=function(k,b){var CA=this.length;(k=~~k)<0?(k+=CA)<0&&(k=0):k>CA&&(k=CA),(b=void 0===b?CA:~~b)<0?(b+=CA)<0&&(b=0):b>CA&&(b=CA),b>>=0,b>>>=0,CA||bA(k,b,this.length);for(var wA=this[k],RA=1,rA=0;++rA>>=0,b>>>=0,CA||bA(k,b,this.length);for(var wA=this[k+--b],RA=1;b>0&&(RA*=256);)wA+=this[k+--b]*RA;return wA},f.prototype.readUint8=f.prototype.readUInt8=function(k,b){return k>>>=0,b||bA(k,1,this.length),this[k]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(k,b){return k>>>=0,b||bA(k,2,this.length),this[k]|this[k+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(k,b){return k>>>=0,b||bA(k,2,this.length),this[k]<<8|this[k+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(k,b){return k>>>=0,b||bA(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(k,b){return k>>>=0,b||bA(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},f.prototype.readBigUInt64LE=mt(function(k){lt(k>>>=0,"offset");var b=this[k],CA=this[k+7];(void 0===b||void 0===CA)&&TA(k,this.length-8);var wA=b+this[++k]*Math.pow(2,8)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,24),RA=this[++k]+this[++k]*Math.pow(2,8)+this[++k]*Math.pow(2,16)+CA*Math.pow(2,24);return BigInt(wA)+(BigInt(RA)<>>=0,"offset");var b=this[k],CA=this[k+7];(void 0===b||void 0===CA)&&TA(k,this.length-8);var wA=b*Math.pow(2,24)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,8)+this[++k],RA=this[++k]*Math.pow(2,24)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,8)+CA;return(BigInt(wA)<>>=0,b>>>=0,CA||bA(k,b,this.length);for(var wA=this[k],RA=1,rA=0;++rA=(RA*=128)&&(wA-=Math.pow(2,8*b)),wA},f.prototype.readIntBE=function(k,b,CA){k>>>=0,b>>>=0,CA||bA(k,b,this.length);for(var wA=b,RA=1,rA=this[k+--wA];wA>0&&(RA*=256);)rA+=this[k+--wA]*RA;return rA>=(RA*=128)&&(rA-=Math.pow(2,8*b)),rA},f.prototype.readInt8=function(k,b){return k>>>=0,b||bA(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},f.prototype.readInt16LE=function(k,b){k>>>=0,b||bA(k,2,this.length);var CA=this[k]|this[k+1]<<8;return 32768&CA?4294901760|CA:CA},f.prototype.readInt16BE=function(k,b){k>>>=0,b||bA(k,2,this.length);var CA=this[k+1]|this[k]<<8;return 32768&CA?4294901760|CA:CA},f.prototype.readInt32LE=function(k,b){return k>>>=0,b||bA(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},f.prototype.readInt32BE=function(k,b){return k>>>=0,b||bA(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},f.prototype.readBigInt64LE=mt(function(k){lt(k>>>=0,"offset");var b=this[k],CA=this[k+7];(void 0===b||void 0===CA)&&TA(k,this.length-8);var wA=this[k+4]+this[k+5]*Math.pow(2,8)+this[k+6]*Math.pow(2,16)+(CA<<24);return(BigInt(wA)<>>=0,"offset");var b=this[k],CA=this[k+7];(void 0===b||void 0===CA)&&TA(k,this.length-8);var wA=(b<<24)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,8)+this[++k];return(BigInt(wA)<>>=0,b||bA(k,4,this.length),g.read(this,k,!0,23,4)},f.prototype.readFloatBE=function(k,b){return k>>>=0,b||bA(k,4,this.length),g.read(this,k,!1,23,4)},f.prototype.readDoubleLE=function(k,b){return k>>>=0,b||bA(k,8,this.length),g.read(this,k,!0,52,8)},f.prototype.readDoubleBE=function(k,b){return k>>>=0,b||bA(k,8,this.length),g.read(this,k,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(k,b,CA,wA){k=+k,b>>>=0,CA>>>=0,wA||ZA(this,k,b,CA,Math.pow(2,8*CA)-1,0);var rA=1,Bt=0;for(this[b]=255&k;++Bt>>=0,CA>>>=0,wA||ZA(this,k,b,CA,Math.pow(2,8*CA)-1,0);var rA=CA-1,Bt=1;for(this[b+rA]=255&k;--rA>=0&&(Bt*=256);)this[b+rA]=k/Bt&255;return b+CA},f.prototype.writeUint8=f.prototype.writeUInt8=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,1,255,0),this[b]=255&k,b+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,2,65535,0),this[b]=255&k,this[b+1]=k>>>8,b+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,2,65535,0),this[b]=k>>>8,this[b+1]=255&k,b+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,4,4294967295,0),this[b+3]=k>>>24,this[b+2]=k>>>16,this[b+1]=k>>>8,this[b]=255&k,b+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,4,4294967295,0),this[b]=k>>>24,this[b+1]=k>>>16,this[b+2]=k>>>8,this[b+3]=255&k,b+4},f.prototype.writeBigUInt64LE=mt(function(k,b){return void 0===b&&(b=0),q(this,k,b,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=mt(function(k,b){return void 0===b&&(b=0),J(this,k,b,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(k,b,CA,wA){if(k=+k,b>>>=0,!wA){var RA=Math.pow(2,8*CA-1);ZA(this,k,b,CA,RA-1,-RA)}var rA=0,Bt=1,Yt=0;for(this[b]=255&k;++rA>0)-Yt&255;return b+CA},f.prototype.writeIntBE=function(k,b,CA,wA){if(k=+k,b>>>=0,!wA){var RA=Math.pow(2,8*CA-1);ZA(this,k,b,CA,RA-1,-RA)}var rA=CA-1,Bt=1,Yt=0;for(this[b+rA]=255&k;--rA>=0&&(Bt*=256);)k<0&&0===Yt&&0!==this[b+rA+1]&&(Yt=1),this[b+rA]=(k/Bt>>0)-Yt&255;return b+CA},f.prototype.writeInt8=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,1,127,-128),k<0&&(k=255+k+1),this[b]=255&k,b+1},f.prototype.writeInt16LE=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,2,32767,-32768),this[b]=255&k,this[b+1]=k>>>8,b+2},f.prototype.writeInt16BE=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,2,32767,-32768),this[b]=k>>>8,this[b+1]=255&k,b+2},f.prototype.writeInt32LE=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,4,2147483647,-2147483648),this[b]=255&k,this[b+1]=k>>>8,this[b+2]=k>>>16,this[b+3]=k>>>24,b+4},f.prototype.writeInt32BE=function(k,b,CA){return k=+k,b>>>=0,CA||ZA(this,k,b,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[b]=k>>>24,this[b+1]=k>>>16,this[b+2]=k>>>8,this[b+3]=255&k,b+4},f.prototype.writeBigInt64LE=mt(function(k,b){return void 0===b&&(b=0),q(this,k,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=mt(function(k,b){return void 0===b&&(b=0),J(this,k,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(k,b,CA){return W(this,k,b,!0,CA)},f.prototype.writeFloatBE=function(k,b,CA){return W(this,k,b,!1,CA)},f.prototype.writeDoubleLE=function(k,b,CA){return hA(this,k,b,!0,CA)},f.prototype.writeDoubleBE=function(k,b,CA){return hA(this,k,b,!1,CA)},f.prototype.copy=function(k,b,CA,wA){if(!f.isBuffer(k))throw new TypeError("argument should be a Buffer");if(CA||(CA=0),!wA&&0!==wA&&(wA=this.length),b>=k.length&&(b=k.length),b||(b=0),wA>0&&wA=this.length)throw new RangeError("Index out of range");if(wA<0)throw new RangeError("sourceEnd out of bounds");wA>this.length&&(wA=this.length),k.length-b>>=0,CA=void 0===CA?this.length:CA>>>0,k||(k=0),"number"==typeof k)for(rA=b;rA=CA+4;b-=3)k="_"+H.slice(b-3,b)+k;return""+H.slice(0,b)+k}function nt(H,k,b,CA,wA,RA){if(H>b||H3?0===k||k===BigInt(0)?">= 0"+rA+" and < 2"+rA+" ** "+8*(RA+1)+rA:">= -(2"+rA+" ** "+(8*(RA+1)-1)+rA+") and < 2 ** "+(8*(RA+1)-1)+rA:">= "+k+rA+" and <= "+b+rA,new vA.ERR_OUT_OF_RANGE("value",Bt,H)}!function GA(H,k,b){lt(k,"offset"),(void 0===H[k]||void 0===H[k+b])&&TA(k,H.length-(b+1))}(CA,wA,RA)}function lt(H,k){if("number"!=typeof H)throw new vA.ERR_INVALID_ARG_TYPE(k,"number",H)}function TA(H,k,b){throw Math.floor(H)!==H?(lt(H,b),new vA.ERR_OUT_OF_RANGE(b||"offset","an integer",H)):k<0?new vA.ERR_BUFFER_OUT_OF_BOUNDS:new vA.ERR_OUT_OF_RANGE(b||"offset",">= "+(b?1:0)+" and <= "+k,H)}nA("ERR_BUFFER_OUT_OF_BOUNDS",function(H){return H?H+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),nA("ERR_INVALID_ARG_TYPE",function(H,k){return'The "'+H+'" argument must be of type number. Received type '+typeof k},TypeError),nA("ERR_OUT_OF_RANGE",function(H,k,b){var CA='The value of "'+H+'" is out of range.',wA=b;return Number.isInteger(b)&&Math.abs(b)>Math.pow(2,32)?wA=EA(String(b)):"bigint"==typeof b&&(wA=String(b),(b>Math.pow(BigInt(2),BigInt(32))||b<-Math.pow(BigInt(2),BigInt(32)))&&(wA=EA(wA)),wA+="n"),CA+" It must be "+k+". Received "+wA},RangeError);var it=/[^+/0-9A-Za-z-_]/g;function It(H,k){k=k||1/0;for(var b,CA=H.length,wA=null,RA=[],rA=0;rA55295&&b<57344){if(!wA){if(b>56319){(k-=3)>-1&&RA.push(239,191,189);continue}if(rA+1===CA){(k-=3)>-1&&RA.push(239,191,189);continue}wA=b;continue}if(b<56320){(k-=3)>-1&&RA.push(239,191,189),wA=b;continue}b=65536+(wA-55296<<10|b-56320)}else wA&&(k-=3)>-1&&RA.push(239,191,189);if(wA=null,b<128){if((k-=1)<0)break;RA.push(b)}else if(b<2048){if((k-=2)<0)break;RA.push(b>>6|192,63&b|128)}else if(b<65536){if((k-=3)<0)break;RA.push(b>>12|224,b>>6&63|128,63&b|128)}else{if(!(b<1114112))throw new Error("Invalid code point");if((k-=4)<0)break;RA.push(b>>18|240,b>>12&63|128,b>>6&63|128,63&b|128)}}return RA}function qA(H){return a.toByteArray(function vt(H){if((H=(H=H.split("=")[0]).trim().replace(it,"")).length<2)return"";for(;H.length%4!=0;)H+="=";return H}(H))}function at(H,k,b,CA){var wA;for(wA=0;wA=k.length||wA>=H.length);++wA)k[wA+b]=H[wA];return wA}function et(H,k){return H instanceof k||null!=H&&null!=H.constructor&&null!=H.constructor.name&&H.constructor.name===k.name}function FA(H){return H!=H}var dt=function(){for(var H="0123456789abcdef",k=new Array(256),b=0;b<16;++b)for(var CA=16*b,wA=0;wA<16;++wA)k[CA+wA]=H[b]+H[wA];return k}();function mt(H){return"undefined"==typeof BigInt?OA:H}function OA(){throw new Error("BigInt not supported")}},477:function(Y,I,n){"use strict";n(7803),n(1539),Y.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},2094:function(Y,I,n){"use strict";var lA,pA,cA,c=n(477),i=n(9781),o=n(7854),l=n(614),h=n(111),a=n(2597),g=n(648),E=n(6330),u=n(8880),C=n(1320),e=n(3070).f,f=n(7976),B=n(9518),w=n(7674),Q=n(5112),p=n(9711),S=o.Int8Array,m=S&&S.prototype,d=o.Uint8ClampedArray,v=d&&d.prototype,D=S&&B(S),U=m&&B(m),T=Object.prototype,F=o.TypeError,R=Q("toStringTag"),L=p("TYPED_ARRAY_TAG"),Z=p("TYPED_ARRAY_CONSTRUCTOR"),aA=c&&!!w&&"Opera"!==g(o.opera),AA=!1,gA={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},BA={BigInt64Array:8,BigUint64Array:8},xA=function(bA){if(!h(bA))return!1;var ZA=g(bA);return a(gA,ZA)||a(BA,ZA)};for(lA in gA)(cA=(pA=o[lA])&&pA.prototype)?u(cA,Z,pA):aA=!1;for(lA in BA)(cA=(pA=o[lA])&&pA.prototype)&&u(cA,Z,pA);if((!aA||!l(D)||D===Function.prototype)&&(D=function(){throw F("Incorrect invocation")},aA))for(lA in gA)o[lA]&&w(o[lA],D);if((!aA||!U||U===T)&&(U=D.prototype,aA))for(lA in gA)o[lA]&&w(o[lA].prototype,U);if(aA&&B(v)!==U&&w(v,U),i&&!a(U,R))for(lA in AA=!0,e(U,R,{get:function(){return h(this)?this[L]:void 0}}),gA)o[lA]&&u(o[lA],L,lA);Y.exports={NATIVE_ARRAY_BUFFER_VIEWS:aA,TYPED_ARRAY_CONSTRUCTOR:Z,TYPED_ARRAY_TAG:AA&&L,aTypedArray:function(bA){if(xA(bA))return bA;throw F("Target is not a typed array")},aTypedArrayConstructor:function(bA){if(l(bA)&&(!w||f(D,bA)))return bA;throw F(E(bA)+" is not a typed array constructor")},exportTypedArrayMethod:function(bA,ZA,q){if(i){if(q)for(var J in gA){var $=o[J];if($&&a($.prototype,bA))try{delete $.prototype[bA]}catch(W){}}(!U[bA]||q)&&C(U,bA,q?ZA:aA&&m[bA]||ZA)}},exportTypedArrayStaticMethod:function(bA,ZA,q){var J,$;if(i){if(w){if(q)for(J in gA)if(($=o[J])&&a($,bA))try{delete $[bA]}catch(W){}if(D[bA]&&!q)return;try{return C(D,bA,q?ZA:aA&&D[bA]||ZA)}catch(W){}}for(J in gA)($=o[J])&&(!$[bA]||q)&&C($,bA,ZA)}},isView:function(bA){if(!h(bA))return!1;var ZA=g(bA);return"DataView"===ZA||a(gA,ZA)||a(BA,ZA)},isTypedArray:xA,TypedArray:D,TypedArrayPrototype:U}},2091:function(Y,I,n){"use strict";n(8309);var c=n(7854),i=n(1702),o=n(9781),l=n(477),h=n(6530),a=n(8880),g=n(2248),E=n(7293),u=n(5787),C=n(9303),e=n(7466),f=n(7067),B=n(1179),w=n(9518),Q=n(7674),p=n(8006).f,S=n(3070).f,m=n(1285),d=n(206),v=n(8003),D=n(9909),U=h.PROPER,T=h.CONFIGURABLE,F=D.get,R=D.set,L="ArrayBuffer",Z="DataView",aA="prototype",lA="Wrong index",pA=c[L],cA=pA,gA=cA&&cA[aA],BA=c[Z],yA=BA&&BA[aA],xA=Object.prototype,_=c.Array,MA=c.RangeError,uA=i(m),QA=i([].reverse),SA=B.pack,bA=B.unpack,ZA=function(Mt){return[255&Mt]},q=function(Mt){return[255&Mt,Mt>>8&255]},J=function(Mt){return[255&Mt,Mt>>8&255,Mt>>16&255,Mt>>24&255]},$=function(Mt){return Mt[3]<<24|Mt[2]<<16|Mt[1]<<8|Mt[0]},W=function(Mt){return SA(Mt,23,4)},hA=function(Mt){return SA(Mt,52,8)},vA=function(Mt,JA){S(Mt[aA],JA,{get:function(){return F(this)[JA]}})},nA=function(Mt,JA,qA,at){var et=f(qA),FA=F(Mt);if(et+JA>FA.byteLength)throw MA(lA);var dt=F(FA.buffer).bytes,mt=et+FA.byteOffset,OA=d(dt,mt,mt+JA);return at?OA:QA(OA)},EA=function(Mt,JA,qA,at,et,FA){var dt=f(qA),mt=F(Mt);if(dt+JA>mt.byteLength)throw MA(lA);for(var OA=F(mt.buffer).bytes,H=dt+mt.byteOffset,k=at(+et),b=0;blt;)(TA=nt[lt++])in cA||a(cA,TA,pA[TA]);gA.constructor=cA}Q&&w(yA)!==xA&&Q(yA,xA);var it=new BA(new cA(2)),vt=i(yA.setInt8);it.setInt8(0,2147483648),it.setInt8(1,2147483649),(it.getInt8(0)||!it.getInt8(1))&&g(yA,{setInt8:function(Mt,JA){vt(this,Mt,JA<<24>>24)},setUint8:function(Mt,JA){vt(this,Mt,JA<<24>>24)}},{unsafe:!0})}else gA=(cA=function(Mt){u(this,gA);var JA=f(Mt);R(this,{bytes:uA(_(JA),0),byteLength:JA}),o||(this.byteLength=JA)})[aA],yA=(BA=function(Mt,JA,qA){u(this,yA),u(Mt,gA);var at=F(Mt).byteLength,et=C(JA);if(et<0||et>at)throw MA("Wrong offset");if(et+(qA=void 0===qA?at-et:e(qA))>at)throw MA("Wrong length");R(this,{buffer:Mt,byteLength:qA,byteOffset:et}),o||(this.buffer=Mt,this.byteLength=qA,this.byteOffset=et)})[aA],o&&(vA(cA,"byteLength"),vA(BA,"buffer"),vA(BA,"byteLength"),vA(BA,"byteOffset")),g(yA,{getInt8:function(Mt){return nA(this,1,Mt)[0]<<24>>24},getUint8:function(Mt){return nA(this,1,Mt)[0]},getInt16:function(Mt){var JA=nA(this,2,Mt,arguments.length>1?arguments[1]:void 0);return(JA[1]<<8|JA[0])<<16>>16},getUint16:function(Mt){var JA=nA(this,2,Mt,arguments.length>1?arguments[1]:void 0);return JA[1]<<8|JA[0]},getInt32:function(Mt){return $(nA(this,4,Mt,arguments.length>1?arguments[1]:void 0))},getUint32:function(Mt){return $(nA(this,4,Mt,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(Mt){return bA(nA(this,4,Mt,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(Mt){return bA(nA(this,8,Mt,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(Mt,JA){EA(this,1,Mt,ZA,JA)},setUint8:function(Mt,JA){EA(this,1,Mt,ZA,JA)},setInt16:function(Mt,JA){EA(this,2,Mt,q,JA,arguments.length>2?arguments[2]:void 0)},setUint16:function(Mt,JA){EA(this,2,Mt,q,JA,arguments.length>2?arguments[2]:void 0)},setInt32:function(Mt,JA){EA(this,4,Mt,J,JA,arguments.length>2?arguments[2]:void 0)},setUint32:function(Mt,JA){EA(this,4,Mt,J,JA,arguments.length>2?arguments[2]:void 0)},setFloat32:function(Mt,JA){EA(this,4,Mt,W,JA,arguments.length>2?arguments[2]:void 0)},setFloat64:function(Mt,JA){EA(this,8,Mt,hA,JA,arguments.length>2?arguments[2]:void 0)}});v(cA,L),v(BA,Z),Y.exports={ArrayBuffer:cA,DataView:BA}},7803:function(Y,I,n){"use strict";var c=n(2109),i=n(7854),o=n(2091),l=n(6340),h="ArrayBuffer",a=o[h];c({global:!0,forced:i[h]!==a},{ArrayBuffer:a}),l(h)},194:function(Y,I,n){"use strict";Y.exports=function(c){return function(){var i=c,l=i.lib.BlockCipher,h=i.algo,a=[],g=[],E=[],u=[],C=[],e=[],f=[],B=[],w=[],Q=[];!function(){for(var m=[],d=0;d<256;d++)m[d]=d<128?d<<1:d<<1^283;var v=0,D=0;for(d=0;d<256;d++){var U=D^D<<1^D<<2^D<<3^D<<4;a[v]=U=U>>>8^255&U^99,g[U]=v;var L,T=m[v],F=m[T],R=m[F];E[v]=(L=257*m[U]^16843008*U)<<24|L>>>8,u[v]=L<<16|L>>>16,C[v]=L<<8|L>>>24,e[v]=L,f[U]=(L=16843009*R^65537*F^257*T^16843008*v)<<24|L>>>8,B[U]=L<<16|L>>>16,w[U]=L<<8|L>>>24,Q[U]=L,v?(v=T^m[m[m[R^T]]],D^=m[m[D]]):v=D=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],S=h.AES=l.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var v=this._keyPriorReset=this._key,D=v.words,U=v.sigBytes/4,F=4*((this._nRounds=U+6)+1),R=this._keySchedule=[],L=0;L6&&L%U==4&&(d=a[d>>>24]<<24|a[d>>>16&255]<<16|a[d>>>8&255]<<8|a[255&d]):(d=a[(d=d<<8|d>>>24)>>>24]<<24|a[d>>>16&255]<<16|a[d>>>8&255]<<8|a[255&d],d^=p[L/U|0]<<24),R[L]=R[L-U]^d);for(var Z=this._invKeySchedule=[],aA=0;aA>>24]]^B[a[d>>>16&255]]^w[a[d>>>8&255]]^Q[a[255&d]]}}},encryptBlock:function(d,v){this._doCryptBlock(d,v,this._keySchedule,E,u,C,e,a)},decryptBlock:function(d,v){var D=d[v+1];d[v+1]=d[v+3],d[v+3]=D,this._doCryptBlock(d,v,this._invKeySchedule,f,B,w,Q,g),D=d[v+1],d[v+1]=d[v+3],d[v+3]=D},_doCryptBlock:function(d,v,D,U,T,F,R,L){for(var Z=this._nRounds,aA=d[v]^D[0],AA=d[v+1]^D[1],lA=d[v+2]^D[2],pA=d[v+3]^D[3],cA=4,gA=1;gA>>24]^T[AA>>>16&255]^F[lA>>>8&255]^R[255&pA]^D[cA++],yA=U[AA>>>24]^T[lA>>>16&255]^F[pA>>>8&255]^R[255&aA]^D[cA++],xA=U[lA>>>24]^T[pA>>>16&255]^F[aA>>>8&255]^R[255&AA]^D[cA++],_=U[pA>>>24]^T[aA>>>16&255]^F[AA>>>8&255]^R[255&lA]^D[cA++];aA=BA,AA=yA,lA=xA,pA=_}BA=(L[aA>>>24]<<24|L[AA>>>16&255]<<16|L[lA>>>8&255]<<8|L[255&pA])^D[cA++],yA=(L[AA>>>24]<<24|L[lA>>>16&255]<<16|L[pA>>>8&255]<<8|L[255&aA])^D[cA++],xA=(L[lA>>>24]<<24|L[pA>>>16&255]<<16|L[aA>>>8&255]<<8|L[255&AA])^D[cA++],_=(L[pA>>>24]<<24|L[aA>>>16&255]<<16|L[AA>>>8&255]<<8|L[255&lA])^D[cA++],d[v]=BA,d[v+1]=yA,d[v+2]=xA,d[v+3]=_},keySize:8});i.AES=l._createHelper(S)}(),c.AES}(n(757),n(7508),n(3440),n(3839),n(1582))},1582:function(Y,I,n){"use strict";n(7042),n(2222),n(1539),n(9714),n(561),Y.exports=function(c){var o,l,h,a,g,C,f,B,Q,p,S,d,D,T,F,L,Z;c.lib.Cipher||(a=(l=(o=c).lib).WordArray,C=o.enc.Base64,f=o.algo.EvpKDF,B=l.Cipher=(g=l.BufferedBlockAlgorithm).extend({cfg:(h=l.Base).extend(),createEncryptor:function(AA,lA){return this.create(this._ENC_XFORM_MODE,AA,lA)},createDecryptor:function(AA,lA){return this.create(this._DEC_XFORM_MODE,AA,lA)},init:function(AA,lA,pA){this.cfg=this.cfg.extend(pA),this._xformMode=AA,this._key=lA,this.reset()},reset:function(){g.reset.call(this),this._doReset()},process:function(AA){return this._append(AA),this._process()},finalize:function(AA){return AA&&this._append(AA),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function aA(AA){return"string"==typeof AA?Z:F}return function(AA){return{encrypt:function(pA,cA,gA){return aA(cA).encrypt(AA,pA,cA,gA)},decrypt:function(pA,cA,gA){return aA(cA).decrypt(AA,pA,cA,gA)}}}}()}),l.StreamCipher=B.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),Q=o.mode={},p=l.BlockCipherMode=h.extend({createEncryptor:function(AA,lA){return this.Encryptor.create(AA,lA)},createDecryptor:function(AA,lA){return this.Decryptor.create(AA,lA)},init:function(AA,lA){this._cipher=AA,this._iv=lA}}),S=Q.CBC=function(){var aA=p.extend();function AA(lA,pA,cA){var gA,BA=this._iv;BA?(gA=BA,this._iv=undefined):gA=this._prevBlock;for(var yA=0;yA>>2]}},l.BlockCipher=B.extend({cfg:B.cfg.extend({mode:S,padding:d}),reset:function(){var AA;B.reset.call(this);var lA=this.cfg,pA=lA.iv,cA=lA.mode;this._xformMode==this._ENC_XFORM_MODE?AA=cA.createEncryptor:(AA=cA.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==AA?this._mode.init(this,pA&&pA.words):(this._mode=AA.call(cA,this,pA&&pA.words),this._mode.__creator=AA)},_doProcessBlock:function(AA,lA){this._mode.processBlock(AA,lA)},_doFinalize:function(){var AA,lA=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(lA.pad(this._data,this.blockSize),AA=this._process(!0)):(AA=this._process(!0),lA.unpad(AA)),AA},blockSize:4}),D=l.CipherParams=h.extend({init:function(AA){this.mixIn(AA)},toString:function(AA){return(AA||this.formatter).stringify(this)}}),T=(o.format={}).OpenSSL={stringify:function(AA){var pA=AA.ciphertext,cA=AA.salt;return(cA?a.create([1398893684,1701076831]).concat(cA).concat(pA):pA).toString(C)},parse:function(AA){var lA,pA=C.parse(AA),cA=pA.words;return 1398893684==cA[0]&&1701076831==cA[1]&&(lA=a.create(cA.slice(2,4)),cA.splice(0,4),pA.sigBytes-=16),D.create({ciphertext:pA,salt:lA})}},F=l.SerializableCipher=h.extend({cfg:h.extend({format:T}),encrypt:function(AA,lA,pA,cA){cA=this.cfg.extend(cA);var gA=AA.createEncryptor(pA,cA),BA=gA.finalize(lA),yA=gA.cfg;return D.create({ciphertext:BA,key:pA,iv:yA.iv,algorithm:AA,mode:yA.mode,padding:yA.padding,blockSize:AA.blockSize,formatter:cA.format})},decrypt:function(AA,lA,pA,cA){return cA=this.cfg.extend(cA),lA=this._parse(lA,cA.format),AA.createDecryptor(pA,cA).finalize(lA.ciphertext)},_parse:function(AA,lA){return"string"==typeof AA?lA.parse(AA,this):AA}}),L=(o.kdf={}).OpenSSL={execute:function(AA,lA,pA,cA){cA||(cA=a.random(8));var gA=f.create({keySize:lA+pA}).compute(AA,cA),BA=a.create(gA.words.slice(lA),4*pA);return gA.sigBytes=4*lA,D.create({key:gA,iv:BA,salt:cA})}},Z=l.PasswordBasedCipher=F.extend({cfg:F.cfg.extend({kdf:L}),encrypt:function(AA,lA,pA,cA){var gA=(cA=this.cfg.extend(cA)).kdf.execute(pA,AA.keySize,AA.ivSize);cA.iv=gA.iv;var BA=F.encrypt.call(this,AA,lA,gA.key,cA);return BA.mixIn(gA),BA},decrypt:function(AA,lA,pA,cA){cA=this.cfg.extend(cA),lA=this._parse(lA,cA.format);var gA=cA.kdf.execute(pA,AA.keySize,AA.ivSize,lA.salt);return cA.iv=gA.iv,F.decrypt.call(this,AA,lA,gA.key,cA)}}))}(n(757),n(3839))},757:function(Y,I,n){"use strict";var i;n(5743),n(6992),n(1539),n(9135),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(9714),n(7042),n(9600),n(2222),n(561),i=function(){var c=c||function(i,o){var l;if("undefined"!=typeof window&&window.crypto&&(l=window.crypto),"undefined"!=typeof self&&self.crypto&&(l=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(l=globalThis.crypto),!l&&"undefined"!=typeof window&&window.msCrypto&&(l=window.msCrypto),!l&&void 0!==n.g&&n.g.crypto&&(l=n.g.crypto),!l)try{l=n(2480)}catch(m){}var h=function(){if(l){if("function"==typeof l.getRandomValues)try{return l.getRandomValues(new Uint32Array(1))[0]}catch(d){}if("function"==typeof l.randomBytes)try{return l.randomBytes(4).readInt32LE()}catch(d){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function m(){}return function(d){var v;return m.prototype=d,v=new m,m.prototype=null,v}}(),g={},E=g.lib={},u=E.Base={extend:function(d){var v=a(this);return d&&v.mixIn(d),(!v.hasOwnProperty("init")||this.init===v.init)&&(v.init=function(){v.$super.init.apply(this,arguments)}),v.init.prototype=v,v.$super=this,v},create:function(){var d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var v in d)d.hasOwnProperty(v)&&(this[v]=d[v]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}},C=E.WordArray=u.extend({init:function(d,v){d=this.words=d||[],this.sigBytes=null!=v?v:4*d.length},toString:function(d){return(d||f).stringify(this)},concat:function(d){var v=this.words,D=d.words,U=this.sigBytes,T=d.sigBytes;if(this.clamp(),U%4)for(var F=0;F>>2]|=(D[F>>>2]>>>24-F%4*8&255)<<24-(U+F)%4*8;else for(var L=0;L>>2]=D[L>>>2];return this.sigBytes+=T,this},clamp:function(){var d=this.words,v=this.sigBytes;d[v>>>2]&=4294967295<<32-v%4*8,d.length=i.ceil(v/4)},clone:function(){var d=u.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var v=[],D=0;D>>2]>>>24-T%4*8&255;U.push((F>>>4).toString(16)),U.push((15&F).toString(16))}return U.join("")},parse:function(d){for(var v=d.length,D=[],U=0;U>>3]|=parseInt(d.substr(U,2),16)<<24-U%8*4;return new C.init(D,v/2)}},B=e.Latin1={stringify:function(d){for(var v=d.words,D=d.sigBytes,U=[],T=0;T>>2]>>>24-T%4*8&255));return U.join("")},parse:function(d){for(var v=d.length,D=[],U=0;U>>2]|=(255&d.charCodeAt(U))<<24-U%4*8;return new C.init(D,v)}},w=e.Utf8={stringify:function(d){try{return decodeURIComponent(escape(B.stringify(d)))}catch(v){throw new Error("Malformed UTF-8 data")}},parse:function(d){return B.parse(unescape(encodeURIComponent(d)))}},Q=E.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new C.init,this._nDataBytes=0},_append:function(d){"string"==typeof d&&(d=w.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var v,D=this._data,U=D.words,T=D.sigBytes,F=this.blockSize,L=T/(4*F),Z=(L=d?i.ceil(L):i.max((0|L)-this._minBufferSize,0))*F,aA=i.min(4*Z,T);if(Z){for(var AA=0;AA>>2]>>>24-w%4*8&255)<<16|(C[w+1>>>2]>>>24-(w+1)%4*8&255)<<8|C[w+2>>>2]>>>24-(w+2)%4*8&255,d=0;d<4&&w+.75*d>>6*(3-d)&63));var v=f.charAt(64);if(v)for(;B.length%4;)B.push(v);return B.join("")},parse:function(u){var C=u.length,e=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var B=0;B>>6-B%4*2;e[f>>>2]|=(w|Q)<<24-f%4*8,f++}return l.create(e,f)}(u,C,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},c.enc.Base64;var l}(n(757))},7590:function(Y,I,n){"use strict";n(9600),Y.exports=function(c){return l=c.lib.WordArray,c.enc.Base64url={stringify:function(u,C){void 0===C&&(C=!0);var e=u.words,f=u.sigBytes,B=C?this._safe_map:this._map;u.clamp();for(var w=[],Q=0;Q>>2]>>>24-Q%4*8&255)<<16|(e[Q+1>>>2]>>>24-(Q+1)%4*8&255)<<8|e[Q+2>>>2]>>>24-(Q+2)%4*8&255,v=0;v<4&&Q+.75*v>>6*(3-v)&63));var D=B.charAt(64);if(D)for(;w.length%4;)w.push(D);return w.join("")},parse:function(u,C){void 0===C&&(C=!0);var e=u.length,f=C?this._safe_map:this._map,B=this._reverseMap;if(!B){B=this._reverseMap=[];for(var w=0;w>>6-B%4*2;e[f>>>2]|=(w|Q)<<24-f%4*8,f++}return l.create(e,f)}(u,e,B)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},c.enc.Base64url;var l}(n(757))},4978:function(Y,I,n){"use strict";n(9600),Y.exports=function(c){return function(){var l=c.lib.WordArray,h=c.enc;function g(E){return E<<8&4278255360|E>>>8&16711935}h.Utf16=h.Utf16BE={stringify:function(u){for(var C=u.words,e=u.sigBytes,f=[],B=0;B>>2]>>>16-B%4*8&65535));return f.join("")},parse:function(u){for(var C=u.length,e=[],f=0;f>>1]|=u.charCodeAt(f)<<16-f%2*16;return l.create(e,2*C)}},h.Utf16LE={stringify:function(u){for(var C=u.words,e=u.sigBytes,f=[],B=0;B>>2]>>>16-B%4*8&65535);f.push(String.fromCharCode(w))}return f.join("")},parse:function(u){for(var C=u.length,e=[],f=0;f>>1]|=g(u.charCodeAt(f)<<16-f%2*16);return l.create(e,2*C)}}}(),c.enc.Utf16}(n(757))},3839:function(Y,I,n){"use strict";n(2222),Y.exports=function(c){return h=(o=(i=c).lib).WordArray,E=(a=i.algo).EvpKDF=(l=o.Base).extend({cfg:l.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(C){this.cfg=this.cfg.extend(C)},compute:function(C,e){for(var f,B=this.cfg,w=B.hasher.create(),Q=h.create(),p=Q.words,S=B.keySize,m=B.iterations;p.lengthB&&(e=C.finalize(e)),e.clamp();for(var w=this._oKey=e.clone(),Q=this._iKey=e.clone(),p=w.words,S=Q.words,m=0;m>>2]|=g[C]<<24-C%4*8;h.call(this,u,E)}else h.apply(this,arguments)};a.prototype=l}}(),c.lib.WordArray},Y.exports=i(n(757))},3440:function(Y,I,n){"use strict";Y.exports=function(c){return function(i){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,g=o.algo,E=[];!function(){for(var w=0;w<64;w++)E[w]=4294967296*i.abs(i.sin(w+1))|0}();var u=g.MD5=a.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(Q,p){for(var S=0;S<16;S++){var m=p+S,d=Q[m];Q[m]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}var v=this._hash.words,D=Q[p+0],U=Q[p+1],T=Q[p+2],F=Q[p+3],R=Q[p+4],L=Q[p+5],Z=Q[p+6],aA=Q[p+7],AA=Q[p+8],lA=Q[p+9],pA=Q[p+10],cA=Q[p+11],gA=Q[p+12],BA=Q[p+13],yA=Q[p+14],xA=Q[p+15],_=v[0],MA=v[1],uA=v[2],QA=v[3];_=C(_,MA,uA,QA,D,7,E[0]),QA=C(QA,_,MA,uA,U,12,E[1]),uA=C(uA,QA,_,MA,T,17,E[2]),MA=C(MA,uA,QA,_,F,22,E[3]),_=C(_,MA,uA,QA,R,7,E[4]),QA=C(QA,_,MA,uA,L,12,E[5]),uA=C(uA,QA,_,MA,Z,17,E[6]),MA=C(MA,uA,QA,_,aA,22,E[7]),_=C(_,MA,uA,QA,AA,7,E[8]),QA=C(QA,_,MA,uA,lA,12,E[9]),uA=C(uA,QA,_,MA,pA,17,E[10]),MA=C(MA,uA,QA,_,cA,22,E[11]),_=C(_,MA,uA,QA,gA,7,E[12]),QA=C(QA,_,MA,uA,BA,12,E[13]),uA=C(uA,QA,_,MA,yA,17,E[14]),_=e(_,MA=C(MA,uA,QA,_,xA,22,E[15]),uA,QA,U,5,E[16]),QA=e(QA,_,MA,uA,Z,9,E[17]),uA=e(uA,QA,_,MA,cA,14,E[18]),MA=e(MA,uA,QA,_,D,20,E[19]),_=e(_,MA,uA,QA,L,5,E[20]),QA=e(QA,_,MA,uA,pA,9,E[21]),uA=e(uA,QA,_,MA,xA,14,E[22]),MA=e(MA,uA,QA,_,R,20,E[23]),_=e(_,MA,uA,QA,lA,5,E[24]),QA=e(QA,_,MA,uA,yA,9,E[25]),uA=e(uA,QA,_,MA,F,14,E[26]),MA=e(MA,uA,QA,_,AA,20,E[27]),_=e(_,MA,uA,QA,BA,5,E[28]),QA=e(QA,_,MA,uA,T,9,E[29]),uA=e(uA,QA,_,MA,aA,14,E[30]),_=f(_,MA=e(MA,uA,QA,_,gA,20,E[31]),uA,QA,L,4,E[32]),QA=f(QA,_,MA,uA,AA,11,E[33]),uA=f(uA,QA,_,MA,cA,16,E[34]),MA=f(MA,uA,QA,_,yA,23,E[35]),_=f(_,MA,uA,QA,U,4,E[36]),QA=f(QA,_,MA,uA,R,11,E[37]),uA=f(uA,QA,_,MA,aA,16,E[38]),MA=f(MA,uA,QA,_,pA,23,E[39]),_=f(_,MA,uA,QA,BA,4,E[40]),QA=f(QA,_,MA,uA,D,11,E[41]),uA=f(uA,QA,_,MA,F,16,E[42]),MA=f(MA,uA,QA,_,Z,23,E[43]),_=f(_,MA,uA,QA,lA,4,E[44]),QA=f(QA,_,MA,uA,gA,11,E[45]),uA=f(uA,QA,_,MA,xA,16,E[46]),_=B(_,MA=f(MA,uA,QA,_,T,23,E[47]),uA,QA,D,6,E[48]),QA=B(QA,_,MA,uA,aA,10,E[49]),uA=B(uA,QA,_,MA,yA,15,E[50]),MA=B(MA,uA,QA,_,L,21,E[51]),_=B(_,MA,uA,QA,gA,6,E[52]),QA=B(QA,_,MA,uA,F,10,E[53]),uA=B(uA,QA,_,MA,pA,15,E[54]),MA=B(MA,uA,QA,_,U,21,E[55]),_=B(_,MA,uA,QA,AA,6,E[56]),QA=B(QA,_,MA,uA,xA,10,E[57]),uA=B(uA,QA,_,MA,Z,15,E[58]),MA=B(MA,uA,QA,_,BA,21,E[59]),_=B(_,MA,uA,QA,R,6,E[60]),QA=B(QA,_,MA,uA,cA,10,E[61]),uA=B(uA,QA,_,MA,T,15,E[62]),MA=B(MA,uA,QA,_,lA,21,E[63]),v[0]=v[0]+_|0,v[1]=v[1]+MA|0,v[2]=v[2]+uA|0,v[3]=v[3]+QA|0},_doFinalize:function(){var Q=this._data,p=Q.words,S=8*this._nDataBytes,m=8*Q.sigBytes;p[m>>>5]|=128<<24-m%32;var d=i.floor(S/4294967296),v=S;p[15+(m+64>>>9<<4)]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),p[14+(m+64>>>9<<4)]=16711935&(v<<8|v>>>24)|4278255360&(v<<24|v>>>8),Q.sigBytes=4*(p.length+1),this._process();for(var D=this._hash,U=D.words,T=0;T<4;T++){var F=U[T];U[T]=16711935&(F<<8|F>>>24)|4278255360&(F<<24|F>>>8)}return D},clone:function(){var Q=a.clone.call(this);return Q._hash=this._hash.clone(),Q}});function C(w,Q,p,S,m,d,v){var D=w+(Q&p|~Q&S)+m+v;return(D<>>32-d)+Q}function e(w,Q,p,S,m,d,v){var D=w+(Q&S|p&~S)+m+v;return(D<>>32-d)+Q}function f(w,Q,p,S,m,d,v){var D=w+(Q^p^S)+m+v;return(D<>>32-d)+Q}function B(w,Q,p,S,m,d,v){var D=w+(p^(Q|~S))+m+v;return(D<>>32-d)+Q}o.MD5=a._createHelper(u),o.HmacMD5=a._createHmacHelper(u)}(Math),c.MD5}(n(757))},702:function(Y,I,n){"use strict";n(7042),Y.exports=function(c){return c.mode.CFB=function(){var i=c.lib.BlockCipherMode.extend();function o(l,h,a,g){var E,u=this._iv;u?(E=u.slice(0),this._iv=void 0):E=this._prevBlock,g.encryptBlock(E,0);for(var C=0;C>24&255)){var g=a>>16&255,E=a>>8&255,u=255&a;255===g?(g=0,255===E?(E=0,255===u?u=0:++u):++E):++g,a=0,a+=g<<16,a+=E<<8,a+=u}else a+=16777216;return a}var h=i.Encryptor=i.extend({processBlock:function(g,E){var u=this._cipher,C=u.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0),function l(a){return 0===(a[0]=o(a[0]))&&(a[1]=o(a[1])),a}(f);var B=f.slice(0);u.encryptBlock(B,0);for(var w=0;w>>2]|=g<<24-E%4*8,o.sigBytes+=g},unpad:function(o){o.sigBytes-=255&o.words[o.sigBytes-1>>>2]}},c.pad.Ansix923}(n(757),n(1582))},4431:function(Y,I,n){"use strict";n(2222),Y.exports=function(c){return c.pad.Iso10126={pad:function(o,l){var h=4*l,a=h-o.sigBytes%h;o.concat(c.lib.WordArray.random(a-1)).concat(c.lib.WordArray.create([a<<24],1))},unpad:function(o){o.sigBytes-=255&o.words[o.sigBytes-1>>>2]}},c.pad.Iso10126}(n(757),n(1582))},8800:function(Y,I,n){"use strict";n(2222),Y.exports=function(c){return c.pad.Iso97971={pad:function(o,l){o.concat(c.lib.WordArray.create([2147483648],1)),c.pad.ZeroPadding.pad(o,l)},unpad:function(o){c.pad.ZeroPadding.unpad(o),o.sigBytes--}},c.pad.Iso97971}(n(757),n(1582))},649:function(Y,I,n){"use strict";Y.exports=function(c){return c.pad.NoPadding={pad:function(){},unpad:function(){}},c.pad.NoPadding}(n(757),n(1582))},3992:function(Y,I,n){"use strict";Y.exports=function(c){return c.pad.ZeroPadding={pad:function(o,l){var h=4*l;o.clamp(),o.sigBytes+=h-(o.sigBytes%h||h)},unpad:function(o){var l=o.words,h=o.sigBytes-1;for(h=o.sigBytes-1;h>=0;h--)if(l[h>>>2]>>>24-h%4*8&255){o.sigBytes=h+1;break}}},c.pad.ZeroPadding}(n(757),n(1582))},3486:function(Y,I,n){"use strict";n(2222),Y.exports=function(c){return h=(o=(i=c).lib).WordArray,E=(a=i.algo).HMAC,u=a.PBKDF2=(l=o.Base).extend({cfg:l.extend({keySize:4,hasher:a.SHA1,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,f){for(var B=this.cfg,w=E.create(B.hasher,e),Q=h.create(),p=h.create([1]),S=Q.words,m=p.words,d=B.keySize,v=B.iterations;S.length>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],Q=this._C=[f[2]<<16|f[2]>>>16,4294901760&f[0]|65535&f[1],f[3]<<16|f[3]>>>16,4294901760&f[1]|65535&f[2],f[0]<<16|f[0]>>>16,4294901760&f[2]|65535&f[3],f[1]<<16|f[1]>>>16,4294901760&f[3]|65535&f[0]];this._b=0;for(var p=0;p<4;p++)C.call(this);for(p=0;p<8;p++)Q[p]^=w[p+4&7];if(B){var S=B.words,m=S[0],d=S[1],v=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),D=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),U=v>>>16|4294901760&D,T=D<<16|65535&v;for(Q[0]^=v,Q[1]^=U,Q[2]^=D,Q[3]^=T,Q[4]^=v,Q[5]^=U,Q[6]^=D,Q[7]^=T,p=0;p<4;p++)C.call(this)}},_doProcessBlock:function(f,B){var w=this._X;C.call(this),a[0]=w[0]^w[5]>>>16^w[3]<<16,a[1]=w[2]^w[7]>>>16^w[5]<<16,a[2]=w[4]^w[1]>>>16^w[7]<<16,a[3]=w[6]^w[3]>>>16^w[1]<<16;for(var Q=0;Q<4;Q++)a[Q]=16711935&(a[Q]<<8|a[Q]>>>24)|4278255360&(a[Q]<<24|a[Q]>>>8),f[B+Q]^=a[Q]},blockSize:4,ivSize:2});function C(){for(var e=this._X,f=this._C,B=0;B<8;B++)g[B]=f[B];for(f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0>>0?1:0)|0,this._b=f[7]>>>0>>0?1:0,B=0;B<8;B++){var w=e[B]+f[B],Q=65535&w,p=w>>>16;E[B]=((Q*Q>>>17)+Q*p>>>15)+p*p^((4294901760&w)*w|0)+((65535&w)*w|0)}e[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,e[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,e[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,e[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,e[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,e[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,e[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,e[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}i.RabbitLegacy=l._createHelper(u)}(),c.RabbitLegacy}(n(757),n(7508),n(3440),n(3839),n(1582))},5323:function(Y,I,n){"use strict";Y.exports=function(c){return function(){var i=c,l=i.lib.StreamCipher,a=[],g=[],E=[],u=i.algo.Rabbit=l.extend({_doReset:function(){for(var f=this._key.words,B=this.cfg.iv,w=0;w<4;w++)f[w]=16711935&(f[w]<<8|f[w]>>>24)|4278255360&(f[w]<<24|f[w]>>>8);var Q=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],p=this._C=[f[2]<<16|f[2]>>>16,4294901760&f[0]|65535&f[1],f[3]<<16|f[3]>>>16,4294901760&f[1]|65535&f[2],f[0]<<16|f[0]>>>16,4294901760&f[2]|65535&f[3],f[1]<<16|f[1]>>>16,4294901760&f[3]|65535&f[0]];for(this._b=0,w=0;w<4;w++)C.call(this);for(w=0;w<8;w++)p[w]^=Q[w+4&7];if(B){var S=B.words,m=S[0],d=S[1],v=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),D=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),U=v>>>16|4294901760&D,T=D<<16|65535&v;for(p[0]^=v,p[1]^=U,p[2]^=D,p[3]^=T,p[4]^=v,p[5]^=U,p[6]^=D,p[7]^=T,w=0;w<4;w++)C.call(this)}},_doProcessBlock:function(f,B){var w=this._X;C.call(this),a[0]=w[0]^w[5]>>>16^w[3]<<16,a[1]=w[2]^w[7]>>>16^w[5]<<16,a[2]=w[4]^w[1]>>>16^w[7]<<16,a[3]=w[6]^w[3]>>>16^w[1]<<16;for(var Q=0;Q<4;Q++)a[Q]=16711935&(a[Q]<<8|a[Q]>>>24)|4278255360&(a[Q]<<24|a[Q]>>>8),f[B+Q]^=a[Q]},blockSize:4,ivSize:2});function C(){for(var e=this._X,f=this._C,B=0;B<8;B++)g[B]=f[B];for(f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0>>0?1:0)|0,this._b=f[7]>>>0>>0?1:0,B=0;B<8;B++){var w=e[B]+f[B],Q=65535&w,p=w>>>16;E[B]=((Q*Q>>>17)+Q*p>>>15)+p*p^((4294901760&w)*w|0)+((65535&w)*w|0)}e[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,e[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,e[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,e[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,e[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,e[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,e[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,e[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}i.Rabbit=l._createHelper(u)}(),c.Rabbit}(n(757),n(7508),n(3440),n(3839),n(1582))},4640:function(Y,I,n){"use strict";n(1539),n(8674),Y.exports=function(c){return function(){var i=c,l=i.lib.StreamCipher,h=i.algo,a=h.RC4=l.extend({_doReset:function(){for(var C=this._key,e=C.words,f=C.sigBytes,B=this._S=[],w=0;w<256;w++)B[w]=w;w=0;for(var Q=0;w<256;w++){var p=w%f,m=B[w];B[w]=B[Q=(Q+B[w]+(e[p>>>2]>>>24-p%4*8&255))%256],B[Q]=m}this._i=this._j=0},_doProcessBlock:function(C,e){C[e]^=g.call(this)},keySize:8,ivSize:0});function g(){for(var u=this._S,C=this._i,e=this._j,f=0,B=0;B<4;B++){var w=u[C=(C+1)%256];u[C]=u[e=(e+u[C])%256],u[e]=w,f|=u[(u[C]+u[e])%256]<<24-8*B}return this._i=C,this._j=e,f}i.RC4=l._createHelper(a);var E=h.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var C=this.cfg.drop;C>0;C--)g.call(this)}});i.RC4Drop=l._createHelper(E)}(),c.RC4}(n(757),n(7508),n(3440),n(3839),n(1582))},8714:function(Y,I,n){"use strict";Y.exports=function(c){return function(i){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,g=o.algo,E=h.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=h.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),C=h.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),e=h.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=h.create([0,1518500249,1859775393,2400959708,2840853838]),B=h.create([1352829926,1548603684,1836072691,2053994217,0]),w=g.RIPEMD160=a.extend({_doReset:function(){this._hash=h.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(U,T){for(var F=0;F<16;F++){var R=T+F,L=U[R];U[R]=16711935&(L<<8|L>>>24)|4278255360&(L<<24|L>>>8)}var BA,yA,xA,_,MA,uA,QA,SA,bA,ZA,q,Z=this._hash.words,aA=f.words,AA=B.words,lA=E.words,pA=u.words,cA=C.words,gA=e.words;for(uA=BA=Z[0],QA=yA=Z[1],SA=xA=Z[2],bA=_=Z[3],ZA=MA=Z[4],F=0;F<80;F+=1)q=BA+U[T+lA[F]]|0,q+=F<16?Q(yA,xA,_)+aA[0]:F<32?p(yA,xA,_)+aA[1]:F<48?S(yA,xA,_)+aA[2]:F<64?m(yA,xA,_)+aA[3]:d(yA,xA,_)+aA[4],q=(q=v(q|=0,cA[F]))+MA|0,BA=MA,MA=_,_=v(xA,10),xA=yA,yA=q,q=uA+U[T+pA[F]]|0,q+=F<16?d(QA,SA,bA)+AA[0]:F<32?m(QA,SA,bA)+AA[1]:F<48?S(QA,SA,bA)+AA[2]:F<64?p(QA,SA,bA)+AA[3]:Q(QA,SA,bA)+AA[4],q=(q=v(q|=0,gA[F]))+ZA|0,uA=ZA,ZA=bA,bA=v(SA,10),SA=QA,QA=q;q=Z[1]+xA+bA|0,Z[1]=Z[2]+_+ZA|0,Z[2]=Z[3]+MA+uA|0,Z[3]=Z[4]+BA+QA|0,Z[4]=Z[0]+yA+SA|0,Z[0]=q},_doFinalize:function(){var U=this._data,T=U.words,F=8*this._nDataBytes,R=8*U.sigBytes;T[R>>>5]|=128<<24-R%32,T[14+(R+64>>>9<<4)]=16711935&(F<<8|F>>>24)|4278255360&(F<<24|F>>>8),U.sigBytes=4*(T.length+1),this._process();for(var L=this._hash,Z=L.words,aA=0;aA<5;aA++){var AA=Z[aA];Z[aA]=16711935&(AA<<8|AA>>>24)|4278255360&(AA<<24|AA>>>8)}return L},clone:function(){var U=a.clone.call(this);return U._hash=this._hash.clone(),U}});function Q(D,U,T){return D^U^T}function p(D,U,T){return D&U|~D&T}function S(D,U,T){return(D|~U)^T}function m(D,U,T){return D&T|U&~T}function d(D,U,T){return D^(U|~T)}function v(D,U){return D<>>32-U}o.RIPEMD160=a._createHelper(w),o.HmacRIPEMD160=a._createHmacHelper(w)}(Math),c.RIPEMD160}(n(757))},9865:function(Y,I,n){"use strict";Y.exports=function(c){return l=(o=(i=c).lib).WordArray,g=[],E=i.algo.SHA1=(h=o.Hasher).extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(C,e){for(var f=this._hash.words,B=f[0],w=f[1],Q=f[2],p=f[3],S=f[4],m=0;m<80;m++){if(m<16)g[m]=0|C[e+m];else{var d=g[m-3]^g[m-8]^g[m-14]^g[m-16];g[m]=d<<1|d>>>31}var v=(B<<5|B>>>27)+S+g[m];v+=m<20?1518500249+(w&Q|~w&p):m<40?1859775393+(w^Q^p):m<60?(w&Q|w&p|Q&p)-1894007588:(w^Q^p)-899497514,S=p,p=Q,Q=w<<30|w>>>2,w=B,B=v}f[0]=f[0]+B|0,f[1]=f[1]+w|0,f[2]=f[2]+Q|0,f[3]=f[3]+p|0,f[4]=f[4]+S|0},_doFinalize:function(){var C=this._data,e=C.words,f=8*this._nDataBytes,B=8*C.sigBytes;return e[B>>>5]|=128<<24-B%32,e[14+(B+64>>>9<<4)]=Math.floor(f/4294967296),e[15+(B+64>>>9<<4)]=f,C.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var C=h.clone.call(this);return C._hash=this._hash.clone(),C}}),i.SHA1=h._createHelper(E),i.HmacSHA1=h._createHmacHelper(E),c.SHA1;var i,o,l,h,g,E}(n(757))},6876:function(Y,I,n){"use strict";Y.exports=function(c){return l=(i=c).lib.WordArray,g=(h=i.algo).SHA224=(a=h.SHA256).extend({_doReset:function(){this._hash=new l.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=a._doFinalize.call(this);return u.sigBytes-=4,u}}),i.SHA224=a._createHelper(g),i.HmacSHA224=a._createHmacHelper(g),c.SHA224;var i,l,h,a,g}(n(757),n(8921))},8921:function(Y,I,n){"use strict";n(7042),Y.exports=function(c){return function(i){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,g=o.algo,E=[],u=[];!function(){function f(p){for(var S=i.sqrt(p),m=2;m<=S;m++)if(!(p%m))return!1;return!0}function B(p){return 4294967296*(p-(0|p))|0}for(var w=2,Q=0;Q<64;)f(w)&&(Q<8&&(E[Q]=B(i.pow(w,.5))),u[Q]=B(i.pow(w,.3333333333333333)),Q++),w++}();var C=[],e=g.SHA256=a.extend({_doReset:function(){this._hash=new h.init(E.slice(0))},_doProcessBlock:function(B,w){for(var Q=this._hash.words,p=Q[0],S=Q[1],m=Q[2],d=Q[3],v=Q[4],D=Q[5],U=Q[6],T=Q[7],F=0;F<64;F++){if(F<16)C[F]=0|B[w+F];else{var R=C[F-15],Z=C[F-2];C[F]=((R<<25|R>>>7)^(R<<14|R>>>18)^R>>>3)+C[F-7]+((Z<<15|Z>>>17)^(Z<<13|Z>>>19)^Z>>>10)+C[F-16]}var lA=p&S^p&m^S&m,gA=T+((v<<26|v>>>6)^(v<<21|v>>>11)^(v<<7|v>>>25))+(v&D^~v&U)+u[F]+C[F];T=U,U=D,D=v,v=d+gA|0,d=m,m=S,S=p,p=gA+(((p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22))+lA)|0}Q[0]=Q[0]+p|0,Q[1]=Q[1]+S|0,Q[2]=Q[2]+m|0,Q[3]=Q[3]+d|0,Q[4]=Q[4]+v|0,Q[5]=Q[5]+D|0,Q[6]=Q[6]+U|0,Q[7]=Q[7]+T|0},_doFinalize:function(){var B=this._data,w=B.words,Q=8*this._nDataBytes,p=8*B.sigBytes;return w[p>>>5]|=128<<24-p%32,w[14+(p+64>>>9<<4)]=i.floor(Q/4294967296),w[15+(p+64>>>9<<4)]=Q,B.sigBytes=4*w.length,this._process(),this._hash},clone:function(){var B=a.clone.call(this);return B._hash=this._hash.clone(),B}});o.SHA256=a._createHelper(e),o.HmacSHA256=a._createHmacHelper(e)}(Math),c.SHA256}(n(757))},8342:function(Y,I,n){"use strict";n(7042),Y.exports=function(c){return function(i){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,E=o.x64.Word,u=o.algo,C=[],e=[],f=[];!function(){for(var Q=1,p=0,S=0;S<24;S++){C[Q+5*p]=(S+1)*(S+2)/2%64;var d=(2*Q+3*p)%5;Q=p%5,p=d}for(Q=0;Q<5;Q++)for(p=0;p<5;p++)e[Q+5*p]=p+(2*Q+3*p)%5*5;for(var v=1,D=0;D<24;D++){for(var U=0,T=0,F=0;F<7;F++){if(1&v){var R=(1<>>24)|4278255360&(D<<24|D>>>8),(T=m[v]).high^=U=16711935&(U<<8|U>>>24)|4278255360&(U<<24|U>>>8),T.low^=D}for(var F=0;F<24;F++){for(var R=0;R<5;R++){for(var L=0,Z=0,aA=0;aA<5;aA++)L^=(T=m[R+5*aA]).high,Z^=T.low;var AA=B[R];AA.high=L,AA.low=Z}for(R=0;R<5;R++){var lA=B[(R+4)%5],pA=B[(R+1)%5],cA=pA.high,gA=pA.low;for(L=lA.high^(cA<<1|gA>>>31),Z=lA.low^(gA<<1|cA>>>31),aA=0;aA<5;aA++)(T=m[R+5*aA]).high^=L,T.low^=Z}for(var BA=1;BA<25;BA++){var yA=(T=m[BA]).high,xA=T.low,_=C[BA];_<32?(L=yA<<_|xA>>>32-_,Z=xA<<_|yA>>>32-_):(L=xA<<_-32|yA>>>64-_,Z=yA<<_-32|xA>>>64-_);var MA=B[e[BA]];MA.high=L,MA.low=Z}var uA=B[0],QA=m[0];for(uA.high=QA.high,uA.low=QA.low,R=0;R<5;R++)for(aA=0;aA<5;aA++){var SA=B[BA=R+5*aA],bA=B[(R+1)%5+5*aA],ZA=B[(R+2)%5+5*aA];(T=m[BA]).high=SA.high^~bA.high&ZA.high,T.low=SA.low^~bA.low&ZA.low}var T,q=f[F];(T=m[0]).high^=q.high,T.low^=q.low}},_doFinalize:function(){var p=this._data,S=p.words,d=8*p.sigBytes,v=32*this.blockSize;S[d>>>5]|=1<<24-d%32,S[(i.ceil((d+1)/v)*v>>>5)-1]|=128,p.sigBytes=4*S.length,this._process();for(var D=this._state,U=this.cfg.outputLength/8,T=U/8,F=[],R=0;R>>24)|4278255360&(Z<<24|Z>>>8),F.push(aA=16711935&(aA<<8|aA>>>24)|4278255360&(aA<<24|aA>>>8)),F.push(Z)}return new h.init(F,U)},clone:function(){for(var p=a.clone.call(this),S=p._state=this._state.slice(0),m=0;m<25;m++)S[m]=S[m].clone();return p}});o.SHA3=a._createHelper(w),o.HmacSHA3=a._createHmacHelper(w)}(Math),c.SHA3}(n(757),n(2601))},8122:function(Y,I,n){"use strict";Y.exports=function(c){return l=(o=(i=c).x64).Word,h=o.WordArray,E=(a=i.algo).SHA384=(g=a.SHA512).extend({_doReset:function(){this._hash=new h.init([new l.init(3418070365,3238371032),new l.init(1654270250,914150663),new l.init(2438529370,812702999),new l.init(355462360,4144912697),new l.init(1731405415,4290775857),new l.init(2394180231,1750603025),new l.init(3675008525,1694076839),new l.init(1203062813,3204075428)])},_doFinalize:function(){var C=g._doFinalize.call(this);return C.sigBytes-=16,C}}),i.SHA384=g._createHelper(E),i.HmacSHA384=g._createHmacHelper(E),c.SHA384;var i,o,l,h,a,g,E}(n(757),n(2601),n(7991))},7991:function(Y,I,n){"use strict";var i;i=function(c){return function(){var i=c,l=i.lib.Hasher,h=i.x64,a=h.Word,g=h.WordArray,E=i.algo;function u(){return a.create.apply(a,arguments)}var C=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],e=[];!function(){for(var B=0;B<80;B++)e[B]=u()}();var f=E.SHA512=l.extend({_doReset:function(){this._hash=new g.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(w,Q){for(var p=this._hash.words,S=p[0],m=p[1],d=p[2],v=p[3],D=p[4],U=p[5],T=p[6],F=p[7],R=S.high,L=S.low,Z=m.high,aA=m.low,AA=d.high,lA=d.low,pA=v.high,cA=v.low,gA=D.high,BA=D.low,yA=U.high,xA=U.low,_=T.high,MA=T.low,uA=F.high,QA=F.low,SA=R,bA=L,ZA=Z,q=aA,J=AA,$=lA,W=pA,hA=cA,vA=gA,nA=BA,EA=yA,GA=xA,nt=_,lt=MA,TA=uA,it=QA,vt=0;vt<80;vt++){var It,Mt,JA=e[vt];if(vt<16)Mt=JA.high=0|w[Q+2*vt],It=JA.low=0|w[Q+2*vt+1];else{var qA=e[vt-15],at=qA.high,et=qA.low,dt=(et>>>1|at<<31)^(et>>>8|at<<24)^(et>>>7|at<<25),mt=e[vt-2],OA=mt.high,H=mt.low,b=(H>>>19|OA<<13)^(H<<3|OA>>>29)^(H>>>6|OA<<26),CA=e[vt-7],rA=e[vt-16],Yt=rA.low;JA.high=Mt=(Mt=(Mt=((at>>>1|et<<31)^(at>>>8|et<<24)^at>>>7)+CA.high+((It=dt+CA.low)>>>0
>>0?1:0))+((OA>>>19|H<<13)^(OA<<3|H>>>29)^OA>>>6)+((It+=b)>>>0>>0?1:0))+rA.high+((It+=Yt)>>>0>>0?1:0),JA.low=It}var ie,j=vA&EA^~vA&nt,XA=nA&GA^~nA<,KA=SA&ZA^SA&J^ZA&J,ct=(bA>>>28|SA<<4)^(bA<<30|SA>>>2)^(bA<<25|SA>>>7),Rt=C[vt],Le=Rt.low,te=TA+((vA>>>14|nA<<18)^(vA>>>18|nA<<14)^(vA<<23|nA>>>9))+((ie=it+((nA>>>14|vA<<18)^(nA>>>18|vA<<14)^(nA<<23|vA>>>9)))>>>0>>0?1:0),ye=ct+(bA&q^bA&$^q&$);TA=nt,it=lt,nt=EA,lt=GA,EA=vA,GA=nA,vA=W+(te=(te=(te=te+j+((ie+=XA)>>>0>>0?1:0))+Rt.high+((ie+=Le)>>>0>>0?1:0))+Mt+((ie+=It)>>>0>>0?1:0))+((nA=hA+ie|0)>>>0>>0?1:0)|0,W=J,hA=$,J=ZA,$=q,ZA=SA,q=bA,SA=te+(((SA>>>28|bA<<4)^(SA<<30|bA>>>2)^(SA<<25|bA>>>7))+KA+(ye>>>0>>0?1:0))+((bA=ie+ye|0)>>>0>>0?1:0)|0}L=S.low=L+bA,S.high=R+SA+(L>>>0>>0?1:0),aA=m.low=aA+q,m.high=Z+ZA+(aA>>>0>>0?1:0),lA=d.low=lA+$,d.high=AA+J+(lA>>>0<$>>>0?1:0),cA=v.low=cA+hA,v.high=pA+W+(cA>>>0>>0?1:0),BA=D.low=BA+nA,D.high=gA+vA+(BA>>>0>>0?1:0),xA=U.low=xA+GA,U.high=yA+EA+(xA>>>0>>0?1:0),MA=T.low=MA+lt,T.high=_+nt+(MA>>>0>>0?1:0),QA=F.low=QA+it,F.high=uA+TA+(QA>>>0>>0?1:0)},_doFinalize:function(){var w=this._data,Q=w.words,p=8*this._nDataBytes,S=8*w.sigBytes;return Q[S>>>5]|=128<<24-S%32,Q[30+(S+128>>>10<<5)]=Math.floor(p/4294967296),Q[31+(S+128>>>10<<5)]=p,w.sigBytes=4*Q.length,this._process(),this._hash.toX32()},clone:function(){var w=l.clone.call(this);return w._hash=this._hash.clone(),w},blockSize:32});i.SHA512=l._createHelper(f),i.HmacSHA512=l._createHmacHelper(f)}(),c.SHA512},Y.exports=i(n(757),n(2601))},8437:function(Y,I,n){"use strict";n(7042),Y.exports=function(c){return function(){var i=c,o=i.lib,l=o.WordArray,h=o.BlockCipher,a=i.algo,g=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],E=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],C=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],e=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=a.DES=h.extend({_doReset:function(){for(var m=this._key.words,d=[],v=0;v<56;v++){var D=g[v]-1;d[v]=m[D>>>5]>>>31-D%32&1}for(var U=this._subKeys=[],T=0;T<16;T++){var F=U[T]=[],R=u[T];for(v=0;v<24;v++)F[v/6|0]|=d[(E[v]-1+R)%28]<<31-v%6,F[4+(v/6|0)]|=d[28+(E[v+24]-1+R)%28]<<31-v%6;for(F[0]=F[0]<<1|F[0]>>>31,v=1;v<7;v++)F[v]=F[v]>>>4*(v-1)+3;F[7]=F[7]<<5|F[7]>>>27}var L=this._invSubKeys=[];for(v=0;v<16;v++)L[v]=U[15-v]},encryptBlock:function(S,m){this._doCryptBlock(S,m,this._subKeys)},decryptBlock:function(S,m){this._doCryptBlock(S,m,this._invSubKeys)},_doCryptBlock:function(S,m,d){this._lBlock=S[m],this._rBlock=S[m+1],B.call(this,4,252645135),B.call(this,16,65535),w.call(this,2,858993459),w.call(this,8,16711935),B.call(this,1,1431655765);for(var v=0;v<16;v++){for(var D=d[v],U=this._lBlock,T=this._rBlock,F=0,R=0;R<8;R++)F|=C[R][((T^D[R])&e[R])>>>0];this._lBlock=T,this._rBlock=U^F}var L=this._lBlock;this._lBlock=this._rBlock,this._rBlock=L,B.call(this,1,1431655765),w.call(this,8,16711935),w.call(this,2,858993459),B.call(this,16,65535),B.call(this,4,252645135),S[m]=this._lBlock,S[m+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function B(p,S){var m=(this._lBlock>>>p^this._rBlock)&S;this._rBlock^=m,this._lBlock^=m<>>p^this._lBlock)&S;this._lBlock^=m,this._rBlock^=m<192.");var d=m.slice(0,2),v=m.length<4?m.slice(0,2):m.slice(2,4),D=m.length<6?m.slice(0,2):m.slice(4,6);this._des1=f.createEncryptor(l.create(d)),this._des2=f.createEncryptor(l.create(v)),this._des3=f.createEncryptor(l.create(D))},encryptBlock:function(S,m){this._des1.encryptBlock(S,m),this._des2.decryptBlock(S,m),this._des3.encryptBlock(S,m)},decryptBlock:function(S,m){this._des3.decryptBlock(S,m),this._des2.encryptBlock(S,m),this._des1.decryptBlock(S,m)},keySize:6,ivSize:2,blockSize:2});i.TripleDES=h._createHelper(Q)}(),c.TripleDES}(n(757),n(7508),n(3440),n(3839),n(1582))},2601:function(Y,I,n){"use strict";n(7042),Y.exports=function(c){return h=(l=c.lib).Base,a=l.WordArray,(g=c.x64={}).Word=h.extend({init:function(e,f){this.high=e,this.low=f}}),g.WordArray=h.extend({init:function(e,f){e=this.words=e||[],this.sigBytes=null!=f?f:8*e.length},toX32:function(){for(var e=this.words,f=e.length,B=[],w=0;w=g.length?{done:!0}:{done:!1,value:g[C++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(g,E){(null==E||E>g.length)&&(E=g.length);for(var u=0,C=new Array(E);u=Q)){D.next=13;break}return D.next=13,[Q,p,f.tags[S]];case 13:w=f.stateTable[1][d],Q=null;case 15:0!==w&&null==Q&&(Q=m),f.accepting[w]&&(p=m),0===w&&(w=1);case 18:m++,D.next=5;break;case 21:if(!(null!=Q&&null!=p&&p>=Q)){D.next=24;break}return D.next=24,[Q,p,f.tags[w]];case 24:case"end":return D.stop()}},B)}),e},E.apply=function(C,e){for(var B,f=c(this.match(C));!(B=f()).done;)for(var d,w=B.value,Q=w[0],p=w[1],m=c(w[2]);!(d=m()).done;){var v=d.value;"function"==typeof e[v]&&e[v](Q,p,C.slice(Q,p+1))}},g}()},8478:function(Y,I,n){"use strict";var c=n(8823).Buffer;n(7042),n(6699);var i=n(3857),o=n(2635);Y.exports=function(){function l(a){var g;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){var E=this.readUInt32(),u="";for(g=0;g<4;g++)u+=String.fromCharCode(this.data[this.pos++]);switch(u){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(E);break;case"IDAT":for(g=0;g0)for(g=0;gthis.data.length)throw new Error("Incomplete or corrupt PNG file")}}l.decode=function(g,E){return i.readFile(g,function(u,C){return new l(C).decode(function(f){return E(f)})})},l.load=function(g){return new l(i.readFileSync(g))};var h=l.prototype;return h.read=function(g){for(var E=new Array(g),u=0;u=2147483648)throw new RangeError('The value "'+g+'" is invalid for option "size"');var C=o(g);return E&&0!==E.length?"string"==typeof u?C.fill(E,u):C.fill(E):C.fill(0),C}),!l.kStringMaxLength)try{l.kStringMaxLength=c.binding("buffer").kStringMaxLength}catch(g){}l.constants||(l.constants={MAX_LENGTH:l.kMaxLength},l.kStringMaxLength&&(l.constants.MAX_STRING_LENGTH=l.kStringMaxLength)),Y.exports=l},3361:function(Y,I,n){"use strict";function c(B,w){var Q=Object.keys(B);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(B);w&&(p=p.filter(function(S){return Object.getOwnPropertyDescriptor(B,S).enumerable})),Q.push.apply(Q,p)}return Q}function o(B,w,Q){return w in B?Object.defineProperty(B,w,{value:Q,enumerable:!0,configurable:!0,writable:!0}):B[w]=Q,B}function h(B,w){for(var Q=0;Q0?this.tail.next=p:this.head=p,this.tail=p,++this.length}},{key:"unshift",value:function(Q){var p={data:Q,next:this.head};0===this.length&&(this.tail=p),this.head=p,++this.length}},{key:"shift",value:function(){if(0!==this.length){var Q=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,Q}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Q){if(0===this.length)return"";for(var p=this.head,S=""+p.data;p=p.next;)S+=Q+p.data;return S}},{key:"concat",value:function(Q){if(0===this.length)return E.alloc(0);for(var p=E.allocUnsafe(Q>>>0),S=this.head,m=0;S;)f(S.data,p,m),m+=S.data.length,S=S.next;return p}},{key:"consume",value:function(Q,p){var S;return Qd.length?d.length:Q;if(m+=v===d.length?d:d.slice(0,Q),0==(Q-=v)){v===d.length?(++S,this.head=p.next?p.next:this.tail=null):(this.head=p,p.data=d.slice(v));break}++S}return this.length-=S,m}},{key:"_getBuffer",value:function(Q){var p=E.allocUnsafe(Q),S=this.head,m=1;for(S.data.copy(p),Q-=S.data.length;S=S.next;){var d=S.data,v=Q>d.length?d.length:Q;if(d.copy(p,p.length-Q,0,v),0==(Q-=v)){v===d.length?(++m,this.head=S.next?S.next:this.tail=null):(this.head=S,S.data=d.slice(v));break}++m}return this.length-=m,p}},{key:e,value:function(Q,p){return C(this,function i(B){for(var w=1;wmA.length)&&(O=mA.length);for(var N=0,X=new Array(O);N=mA.length?{done:!0}:{done:!1,value:mA[X++]}},e:function(ft){throw ft},f:K}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var At,fA=!0,IA=!1;return{s:function(){N=mA[Symbol.iterator]()},n:function(){var ft=N.next();return fA=ft.done,ft},e:function(ft){IA=!0,At=ft},f:function(){try{!fA&&null!=N.return&&N.return()}finally{if(IA)throw At}}}}var xA=function(){function mA(){f(this,mA)}return w(mA,[{key:"toString",value:function(){throw new Error("Must be implemented by subclasses")}}]),mA}(),_=function(){function mA(){var O=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,mA),this._items={},this.limits="boolean"!=typeof O.limits||O.limits}return w(mA,[{key:"add",value:function(N,X){return this._items[N]=X}},{key:"get",value:function(N){return this._items[N]}},{key:"toString",value:function(){var N=this,X=Object.keys(this._items).sort(function(Ct,Dt){return N._compareKeys(Ct,Dt)}),K=["<<"];if(this.limits&&X.length>1){var IA=X[X.length-1];K.push(" /Limits ".concat(bA.convert([this._dataForKey(X[0]),this._dataForKey(IA)])))}K.push(" /".concat(this._keysName()," ["));var rt,At=yA(X);try{for(At.s();!(rt=At.n()).done;){var ft=rt.value;K.push(" ".concat(bA.convert(this._dataForKey(ft))," ").concat(bA.convert(this._items[ft])))}}catch(Ct){At.e(Ct)}finally{At.f()}return K.push("]"),K.push(">>"),K.join("\n")}},{key:"_compareKeys",value:function(){throw new Error("Must be implemented by subclasses")}},{key:"_keysName",value:function(){throw new Error("Must be implemented by subclasses")}},{key:"_dataForKey",value:function(){throw new Error("Must be implemented by subclasses")}}]),mA}(),MA=function(O,N){return(Array(N+1).join("0")+O).slice(-N)},uA=/[\n\r\t\b\f()\\]/g,QA={"\n":"\\n","\r":"\\r","\t":"\\t","\b":"\\b","\f":"\\f","\\":"\\\\","(":"\\(",")":"\\)"},SA=function(O){var N=O.length;if(1&N)throw new Error("Buffer length must be even");for(var X=0,K=N-1;X1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof N)return"/".concat(N);if(N instanceof String){for(var K=N,fA=!1,IA=0,At=K.length;IA127){fA=!0;break}var rt;return rt=fA?SA(i.from("\ufeff".concat(K),"utf16le")):i.from(K.valueOf(),"ascii"),K=(K=X?X(rt).toString("binary"):rt.toString("binary")).replace(uA,function(Ot){return QA[Ot]}),"(".concat(K,")")}if(i.isBuffer(N))return"<".concat(N.toString("hex"),">");if(N instanceof xA||N instanceof _)return N.toString();if(N instanceof Date){var ft="D:".concat(MA(N.getUTCFullYear(),4))+MA(N.getUTCMonth()+1,2)+MA(N.getUTCDate(),2)+MA(N.getUTCHours(),2)+MA(N.getUTCMinutes(),2)+MA(N.getUTCSeconds(),2)+"Z";return X&&(ft=(ft=X(i.from(ft,"ascii")).toString("binary")).replace(uA,function(Ot){return QA[Ot]})),"(".concat(ft,")")}if(Array.isArray(N)){var Ct=N.map(function(Ot){return mA.convert(Ot,X)}).join(" ");return"[".concat(Ct,"]")}if("[object Object]"==={}.toString.call(N)){var Dt=["<<"];for(var Ft in N){var Tt=N[Ft];Dt.push("/".concat(Ft," ").concat(mA.convert(Tt,X)))}return Dt.push(">>"),Dt.join("\n")}return"number"==typeof N?mA.number(N):"".concat(N)}},{key:"number",value:function(N){if(N>-1e21&&N<1e21)return Math.round(1e6*N)/1e6;throw new Error("unsupported number: ".concat(N))}}]),mA}(),ZA=function(mA){m(N,mA);var O=F(N);function N(X,K){var fA,IA=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f(this,N),(fA=O.call(this)).document=X,fA.id=K,fA.data=IA,fA.gen=0,fA.compress=fA.document.compress&&!fA.data.Filter,fA.uncompressedLength=0,fA.buffer=[],fA}return w(N,[{key:"write",value:function(K){if(i.isBuffer(K)||(K=i.from(K+"\n","binary")),this.uncompressedLength+=K.length,null==this.data.Length&&(this.data.Length=0),this.buffer.push(K),this.data.Length+=K.length,this.compress)return this.data.Filter="FlateDecode"}},{key:"end",value:function(K){return K&&this.write(K),this.finalize()}},{key:"finalize",value:function(){this.offset=this.document._offset;var K=this.document._security?this.document._security.getEncryptFn(this.id,this.gen):null;this.buffer.length&&(this.buffer=i.concat(this.buffer),this.compress&&(this.buffer=l.default.deflateSync(this.buffer)),K&&(this.buffer=K(this.buffer)),this.data.Length=this.buffer.length),this.document._write("".concat(this.id," ").concat(this.gen," obj")),this.document._write(bA.convert(this.data,K)),this.buffer.length&&(this.document._write("stream"),this.document._write(this.buffer),this.buffer=[],this.document._write("\nendstream")),this.document._write("endobj"),this.document._refEnd(this)}},{key:"toString",value:function(){return"".concat(this.id," ").concat(this.gen," R")}}]),N}(xA),q={top:72,left:72,bottom:72,right:72},J={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},$=function(){function mA(O){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,mA),this.document=O,this.size=N.size||"letter",this.layout=N.layout||"portrait",this.margins="number"==typeof N.margin?{top:N.margin,left:N.margin,bottom:N.margin,right:N.margin}:N.margins||q;var X=Array.isArray(this.size)?this.size:J[this.size.toUpperCase()];this.width=X["portrait"===this.layout?0:1],this.height=X["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources}),this.markings=[]}return w(mA,[{key:"maxY",value:function(){return this.height-this.margins.bottom}},{key:"write",value:function(N){return this.content.write(N)}},{key:"end",value:function(){return this.dictionary.end(),this.resources.end(),this.content.end()}},{key:"fonts",get:function(){var N=this.resources.data;return null!=N.Font?N.Font:N.Font={}}},{key:"xobjects",get:function(){var N=this.resources.data;return null!=N.XObject?N.XObject:N.XObject={}}},{key:"ext_gstates",get:function(){var N=this.resources.data;return null!=N.ExtGState?N.ExtGState:N.ExtGState={}}},{key:"patterns",get:function(){var N=this.resources.data;return null!=N.Pattern?N.Pattern:N.Pattern={}}},{key:"colorSpaces",get:function(){var N=this.resources.data;return N.ColorSpace||(N.ColorSpace={})}},{key:"annotations",get:function(){var N=this.dictionary.data;return null!=N.Annots?N.Annots:N.Annots=[]}},{key:"structParentTreeKey",get:function(){var N=this.dictionary.data;return null!=N.StructParents?N.StructParents:N.StructParents=this.document.createStructParentTreeNextKey()}}]),mA}(),W=function(mA){m(N,mA);var O=F(N);function N(){return f(this,N),O.apply(this,arguments)}return w(N,[{key:"_compareKeys",value:function(K,fA){return K.localeCompare(fA)}},{key:"_keysName",value:function(){return"Names"}},{key:"_dataForKey",value:function(K){return new String(K)}}]),N}(_);function hA(mA,O){if(mA=O[fA]&&mA<=O[fA+1])return!0;mA>O[fA+1]?N=K+1:X=K-1}return!1}var vA=[545,545,564,591,686,687,751,767,848,863,880,883,886,889,891,893,895,899,907,907,909,909,930,930,975,975,1015,1023,1159,1159,1231,1231,1270,1271,1274,1279,1296,1328,1367,1368,1376,1376,1416,1416,1419,1424,1442,1442,1466,1466,1477,1487,1515,1519,1525,1547,1549,1562,1564,1566,1568,1568,1595,1599,1622,1631,1774,1775,1791,1791,1806,1806,1837,1839,1867,1919,1970,2304,2308,2308,2362,2363,2382,2383,2389,2391,2417,2432,2436,2436,2445,2446,2449,2450,2473,2473,2481,2481,2483,2485,2490,2491,2493,2493,2501,2502,2505,2506,2510,2518,2520,2523,2526,2526,2532,2533,2555,2561,2563,2564,2571,2574,2577,2578,2601,2601,2609,2609,2612,2612,2615,2615,2618,2619,2621,2621,2627,2630,2633,2634,2638,2648,2653,2653,2655,2661,2677,2688,2692,2692,2700,2700,2702,2702,2706,2706,2729,2729,2737,2737,2740,2740,2746,2747,2758,2758,2762,2762,2766,2767,2769,2783,2785,2789,2800,2816,2820,2820,2829,2830,2833,2834,2857,2857,2865,2865,2868,2869,2874,2875,2884,2886,2889,2890,2894,2901,2904,2907,2910,2910,2914,2917,2929,2945,2948,2948,2955,2957,2961,2961,2966,2968,2971,2971,2973,2973,2976,2978,2981,2983,2987,2989,2998,2998,3002,3005,3011,3013,3017,3017,3022,3030,3032,3046,3059,3072,3076,3076,3085,3085,3089,3089,3113,3113,3124,3124,3130,3133,3141,3141,3145,3145,3150,3156,3159,3167,3170,3173,3184,3201,3204,3204,3213,3213,3217,3217,3241,3241,3252,3252,3258,3261,3269,3269,3273,3273,3278,3284,3287,3293,3295,3295,3298,3301,3312,3329,3332,3332,3341,3341,3345,3345,3369,3369,3386,3389,3396,3397,3401,3401,3406,3414,3416,3423,3426,3429,3440,3457,3460,3460,3479,3481,3506,3506,3516,3516,3518,3519,3527,3529,3531,3534,3541,3541,3543,3543,3552,3569,3573,3584,3643,3646,3676,3712,3715,3715,3717,3718,3721,3721,3723,3724,3726,3731,3736,3736,3744,3744,3748,3748,3750,3750,3752,3753,3756,3756,3770,3770,3774,3775,3781,3781,3783,3783,3790,3791,3802,3803,3806,3839,3912,3912,3947,3952,3980,3983,3992,3992,4029,4029,4045,4046,4048,4095,4130,4130,4136,4136,4139,4139,4147,4149,4154,4159,4186,4255,4294,4303,4345,4346,4348,4351,4442,4446,4515,4519,4602,4607,4615,4615,4679,4679,4681,4681,4686,4687,4695,4695,4697,4697,4702,4703,4743,4743,4745,4745,4750,4751,4783,4783,4785,4785,4790,4791,4799,4799,4801,4801,4806,4807,4815,4815,4823,4823,4847,4847,4879,4879,4881,4881,4886,4887,4895,4895,4935,4935,4955,4960,4989,5023,5109,5120,5751,5759,5789,5791,5873,5887,5901,5901,5909,5919,5943,5951,5972,5983,5997,5997,6001,6001,6004,6015,6109,6111,6122,6143,6159,6159,6170,6175,6264,6271,6314,7679,7836,7839,7930,7935,7958,7959,7966,7967,8006,8007,8014,8015,8024,8024,8026,8026,8028,8028,8030,8030,8062,8063,8117,8117,8133,8133,8148,8149,8156,8156,8176,8177,8181,8181,8191,8191,8275,8278,8280,8286,8292,8297,8306,8307,8335,8351,8370,8399,8427,8447,8507,8508,8524,8530,8580,8591,9167,9215,9255,9279,9291,9311,9471,9471,9748,9749,9752,9752,9854,9855,9866,9984,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10079,10080,10133,10135,10160,10160,10175,10191,10220,10223,11008,11903,11930,11930,12020,12031,12246,12271,12284,12287,12352,12352,12439,12440,12544,12548,12589,12592,12687,12687,12728,12783,12829,12831,12868,12880,12924,12926,13004,13007,13055,13055,13175,13178,13278,13279,13311,13311,19894,19967,40870,40959,42125,42127,42183,44031,55204,55295,64046,64047,64107,64255,64263,64274,64280,64284,64311,64311,64317,64317,64319,64319,64322,64322,64325,64325,64434,64466,64832,64847,64912,64913,64968,64975,65021,65023,65040,65055,65060,65071,65095,65096,65107,65107,65127,65127,65132,65135,65141,65141,65277,65278,65280,65280,65471,65473,65480,65481,65488,65489,65496,65497,65501,65503,65511,65511,65519,65528,65536,66303,66335,66335,66340,66351,66379,66559,66598,66599,66638,118783,119030,119039,119079,119081,119262,119807,119893,119893,119965,119965,119968,119969,119971,119972,119975,119976,119981,119981,119994,119994,119996,119996,120001,120001,120004,120004,120070,120070,120075,120076,120085,120085,120093,120093,120122,120122,120127,120127,120133,120133,120135,120137,120145,120145,120484,120487,120778,120781,120832,131069,173783,194559,195102,196605,196608,262141,262144,327677,327680,393213,393216,458749,458752,524285,524288,589821,589824,655357,655360,720893,720896,786429,786432,851965,851968,917501,917504,917504,917506,917535,917632,983037],nA=function(O){return hA(O,vA)},EA=[173,173,847,847,6150,6150,6155,6155,6156,6156,6157,6157,8203,8203,8204,8204,8205,8205,8288,8288,65024,65024,65025,65025,65026,65026,65027,65027,65028,65028,65029,65029,65030,65030,65031,65031,65032,65032,65033,65033,65034,65034,65035,65035,65036,65036,65037,65037,65038,65038,65039,65039,65279,65279],nt=[160,160,5760,5760,8192,8192,8193,8193,8194,8194,8195,8195,8196,8196,8197,8197,8198,8198,8199,8199,8200,8200,8201,8201,8202,8202,8203,8203,8239,8239,8287,8287,12288,12288],TA=[128,159,1757,1757,1807,1807,6158,6158,8204,8204,8205,8205,8232,8232,8233,8233,8288,8288,8289,8289,8290,8290,8291,8291,8298,8303,65279,65279,65529,65532,119155,119162],it=[64976,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1114110,1114111],vt=[0,31,127,127,832,832,833,833,8206,8206,8207,8207,8234,8234,8235,8235,8236,8236,8237,8237,8238,8238,8298,8298,8299,8299,8300,8300,8301,8301,8302,8302,8303,8303,12272,12283,55296,57343,57344,63743,65529,65529,65530,65530,65531,65531,65532,65532,65533,65533,917505,917505,917536,917631,983040,1048573,1048576,1114109],It=function(O){return hA(O,nt)||hA(O,vt)||hA(O,TA)||hA(O,it)},Mt=[1470,1470,1472,1472,1475,1475,1488,1514,1520,1524,1563,1563,1567,1567,1569,1594,1600,1610,1645,1647,1649,1749,1757,1757,1765,1766,1786,1790,1792,1805,1808,1808,1810,1836,1920,1957,1969,1969,8207,8207,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65020,65136,65140,65142,65276],JA=function(O){return hA(O,Mt)},qA=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,544,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,1013,1024,1154,1162,1230,1232,1269,1272,1273,1280,1295,1329,1366,1369,1375,1377,1415,1417,1417,2307,2307,2309,2361,2365,2368,2377,2380,2384,2384,2392,2401,2404,2416,2434,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2494,2496,2503,2504,2507,2508,2519,2519,2524,2525,2527,2529,2534,2545,2548,2554,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2622,2624,2649,2652,2654,2654,2662,2671,2674,2676,2691,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2752,2761,2761,2763,2764,2768,2768,2784,2784,2790,2799,2818,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2878,2880,2880,2887,2888,2891,2892,2903,2903,2908,2909,2911,2913,2918,2928,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3007,3009,3010,3014,3016,3018,3020,3031,3031,3047,3058,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3137,3140,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3262,3264,3268,3271,3272,3274,3275,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3392,3398,3400,3402,3404,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3535,3537,3544,3551,3570,3572,3585,3632,3634,3635,3648,3654,3663,3675,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3792,3801,3804,3805,3840,3863,3866,3892,3894,3894,3896,3896,3902,3911,3913,3946,3967,3967,3973,3973,3976,3979,4030,4037,4039,4044,4047,4047,4096,4129,4131,4135,4137,4138,4140,4140,4145,4145,4152,4152,4160,4183,4256,4293,4304,4344,4347,4347,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4961,4988,5024,5108,5121,5750,5761,5786,5792,5872,5888,5900,5902,5905,5920,5937,5941,5942,5952,5969,5984,5996,5998,6e3,6016,6070,6078,6085,6087,6088,6100,6106,6108,6108,6112,6121,6160,6169,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8206,8206,8305,8305,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8509,8511,8517,8521,8544,8579,9014,9082,9109,9109,9372,9449,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12588,12593,12686,12688,12727,12784,12828,12832,12867,12896,12923,12927,12976,12992,13003,13008,13054,13056,13174,13179,13277,13280,13310,13312,19893,19968,40869,40960,42124,44032,55203,55296,64045,64048,64106,64256,64262,64275,64279,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,66304,66334,66336,66339,66352,66378,66560,66597,66600,66637,118784,119029,119040,119078,119082,119142,119146,119154,119171,119172,119180,119209,119214,119261,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,12e4,120002,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120483,120488,120777,131072,173782,194560,195101,983040,1048573,1048576,1114109],at=function(O){return hA(O,qA)},et=function(O){return hA(O,nt)},FA=function(O){return hA(O,EA)},dt=function(O){return O.codePointAt(0)},mt=function(O){return O[0]},OA=function(O){return O[O.length-1]};function H(mA){for(var O=[],N=mA.length,X=0;X=55296&&K<=56319&&N>X+1){var fA=mA.charCodeAt(X+1);if(fA>=56320&&fA<=57343){O.push(1024*(K-55296)+fA-56320+65536),X+=1;continue}}O.push(K)}return O}function k(mA){var O=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof mA)throw new TypeError("Expected string.");if(0===mA.length)return"";var N=H(mA).map(function(Dt){return et(Dt)?32:Dt}).filter(function(Dt){return!FA(Dt)}),X=String.fromCodePoint.apply(null,N).normalize("NFKC"),K=H(X);if(K.some(It))throw new Error("Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3");if(!0!==O.allowUnassigned&&K.some(nA))throw new Error("Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5");var At=K.some(JA),rt=K.some(at);if(At&&rt)throw new Error("String must not contain RandALCat and LCat at the same time, see https://tools.ietf.org/html/rfc3454#section-6");var ft=JA(dt(mt(X))),Ct=JA(dt(OA(X)));if(At&&(!ft||!Ct))throw new Error("Bidirectional RandALCat character must be the first and the last character of the string, see https://tools.ietf.org/html/rfc3454#section-6");return X}var b=function(){function mA(O){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(f(this,mA),!N.ownerPassword&&!N.userPassword)throw new Error("None of owner password and user password is defined.");this.document=O,this._setupEncryption(N)}return w(mA,null,[{key:"generateFileID",value:function(){var N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},X="".concat(N.CreationDate.getTime(),"\n");for(var K in N)!N.hasOwnProperty(K)||(X+="".concat(K,": ").concat(N[K].valueOf(),"\n"));return Vt(h.default.MD5(X))}},{key:"generateRandomWordArray",value:function(N){return h.default.lib.WordArray.random(N)}},{key:"create",value:function(N){var X=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return X.ownerPassword||X.userPassword?new mA(N,X):null}}]),w(mA,[{key:"_setupEncryption",value:function(N){switch(N.pdfVersion){case"1.4":case"1.5":this.version=2;break;case"1.6":case"1.7":this.version=4;break;case"1.7ext3":this.version=5;break;default:this.version=1}var X={Filter:"Standard"};switch(this.version){case 1:case 2:case 4:this._setupEncryptionV1V2V4(this.version,X,N);break;case 5:this._setupEncryptionV5(X,N)}this.dictionary=this.document.ref(X)}},{key:"_setupEncryptionV1V2V4",value:function(N,X,K){var fA,IA;switch(N){case 1:fA=2,this.keyBits=40,IA=function CA(){var mA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},O=-64;return mA.printing&&(O|=4),mA.modifying&&(O|=8),mA.copying&&(O|=16),mA.annotating&&(O|=32),O}(K.permissions);break;case 2:fA=3,this.keyBits=128,IA=wA(K.permissions);break;case 4:fA=4,this.keyBits=128,IA=wA(K.permissions)}var Ct,At=Lt(K.userPassword),rt=K.ownerPassword?Lt(K.ownerPassword):At,ft=function Bt(mA,O,N,X){for(var K=X,fA=mA>=3?51:1,IA=0;IA=3?20:1;for(var ft=0;ft=3?51:1,rt=0;rt=2&&(X.Length=this.keyBits),4===N&&(X.CF={StdCF:{AuthEvent:"DocOpen",CFM:"AESV2",Length:this.keyBits/8}},X.StmF="StdCF",X.StrF="StdCF"),X.R=fA,X.O=Vt(ft),X.U=Vt(Ct),X.P=IA}},{key:"_setupEncryptionV5",value:function(N,X){this.keyBits=256;var K=wA(X.permissions),fA=xt(X.userPassword),IA=X.ownerPassword?xt(X.ownerPassword):fA;this.encryptionKey=function jA(mA){return mA(32)}(mA.generateRandomWordArray);var At=function j(mA,O){var N=O(8),X=O(8);return h.default.SHA256(mA.clone().concat(N)).concat(N).concat(X)}(fA,mA.generateRandomWordArray),ft=function XA(mA,O,N){var X=h.default.SHA256(mA.clone().concat(O)),K={mode:h.default.mode.CBC,padding:h.default.pad.NoPadding,iv:h.default.lib.WordArray.create(null,16)};return h.default.AES.encrypt(N,X,K).ciphertext}(fA,h.default.lib.WordArray.create(At.words.slice(10,12),8),this.encryptionKey),Ct=function KA(mA,O,N){var X=N(8),K=N(8);return h.default.SHA256(mA.clone().concat(X).concat(O)).concat(X).concat(K)}(IA,At,mA.generateRandomWordArray),Ft=function DA(mA,O,N,X){var K=h.default.SHA256(mA.clone().concat(O).concat(N)),fA={mode:h.default.mode.CBC,padding:h.default.pad.NoPadding,iv:h.default.lib.WordArray.create(null,16)};return h.default.AES.encrypt(X,K,fA).ciphertext}(IA,h.default.lib.WordArray.create(Ct.words.slice(10,12),8),At,this.encryptionKey),Tt=function ct(mA,O,N){var X=h.default.lib.WordArray.create([Rt(mA),4294967295,1415668834],12).concat(N(4));return h.default.AES.encrypt(X,O,{mode:h.default.mode.ECB,padding:h.default.pad.NoPadding}).ciphertext}(K,this.encryptionKey,mA.generateRandomWordArray);N.V=5,N.Length=this.keyBits,N.CF={StdCF:{AuthEvent:"DocOpen",CFM:"AESV3",Length:this.keyBits/8}},N.StmF="StdCF",N.StrF="StdCF",N.R=5,N.O=Vt(Ct),N.OE=Vt(Ft),N.U=Vt(At),N.UE=Vt(ft),N.P=K,N.Perms=Vt(Tt)}},{key:"getEncryptFn",value:function(N,X){var K,IA;if(this.version<5&&(K=this.encryptionKey.clone().concat(h.default.lib.WordArray.create([(255&N)<<24|(65280&N)<<8|N>>8&65280|255&X,(65280&X)<<16],5))),1===this.version||2===this.version){var fA=h.default.MD5(K);return fA.sigBytes=Math.min(16,this.keyBits/8+5),function(ft){return Vt(h.default.RC4.encrypt(h.default.lib.WordArray.create(ft),fA).ciphertext)}}IA=4===this.version?h.default.MD5(K.concat(h.default.lib.WordArray.create([1933667412],4))):this.encryptionKey;var At=mA.generateRandomWordArray(16),rt={mode:h.default.mode.CBC,padding:h.default.pad.Pkcs7,iv:At};return function(ft){return Vt(At.clone().concat(h.default.AES.encrypt(h.default.lib.WordArray.create(ft),IA,rt).ciphertext))}}},{key:"end",value:function(){this.dictionary.end()}}]),mA}();function wA(){var mA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},O=-3904;return"lowResolution"===mA.printing&&(O|=4),"highResolution"===mA.printing&&(O|=2052),mA.modifying&&(O|=8),mA.copying&&(O|=16),mA.annotating&&(O|=32),mA.fillingForms&&(O|=256),mA.contentAccessibility&&(O|=512),mA.documentAssembly&&(O|=1024),O}function Lt(){for(var mA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",O=i.alloc(32),N=mA.length,X=0;X255)throw new Error("Password contains one or more invalid characters.");O[X]=K,X++}for(;X<32;)O[X]=Le[X-N],X++;return h.default.lib.WordArray.create(O)}function xt(){var mA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";mA=unescape(encodeURIComponent(k(mA)));for(var O=Math.min(127,mA.length),N=i.alloc(O),X=0;X>8&65280|mA>>24&255}function Vt(mA){for(var O=[],N=0;N>8*(3-N%4)&255);return i.from(O)}var Jt,bt,Xt,oe,In,dn,Le=[40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122],ie=bA.number,te=function(){function mA(O){f(this,mA),this.doc=O,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0]}return w(mA,[{key:"stop",value:function(N,X,K){if(null==K&&(K=1),X=this.doc._normalizeColor(X),0===this.stops.length)if(3===X.length)this._colorSpace="DeviceRGB";else if(4===X.length)this._colorSpace="DeviceCMYK";else{if(1!==X.length)throw new Error("Unknown color space");this._colorSpace="DeviceGray"}else if("DeviceRGB"===this._colorSpace&&3!==X.length||"DeviceCMYK"===this._colorSpace&&4!==X.length||"DeviceGray"===this._colorSpace&&1!==X.length)throw new Error("All gradient stops must use the same color space");return K=Math.max(0,Math.min(1,K)),this.stops.push([N,X,K]),this}},{key:"setTransform",value:function(N,X,K,fA,IA,At){return this.transform=[N,X,K,fA,IA,At],this}},{key:"embed",value:function(N){var X,K=this.stops.length;if(0!==K){this.embedded=!0,this.matrix=N;var fA=this.stops[K-1];fA[0]<1&&this.stops.push([1,fA[1],fA[2]]);for(var IA=[],At=[],rt=[],ft=0;ft>16,N>>8&255,255&N]}else Gn[O]&&(O=Gn[O]);return Array.isArray(O)?(3===O.length?O=O.map(function(X){return X/255}):4===O.length&&(O=O.map(function(X){return X/100})),O):null},_setColor:function(O,N){return O instanceof en?(O.apply(N),!0):Array.isArray(O)&&O[0]instanceof Xe?(O[0].apply(N,O[1]),!0):this._setColorCore(O,N)},_setColorCore:function(O,N){if(!(O=this._normalizeColor(O)))return!1;var X=N?"SCN":"scn",K=this._getColorSpace(O);return this._setColorSpace(K,N),O=O.join(" "),this.addContent("".concat(O," ").concat(X)),!0},_setColorSpace:function(O,N){var X=N?"CS":"cs";return this.addContent("/".concat(O," ").concat(X))},_getColorSpace:function(O){return 4===O.length?"DeviceCMYK":"DeviceRGB"},fillColor:function(O,N){return this._setColor(O,!1)&&this.fillOpacity(N),this._fillColor=[O,N],this},strokeColor:function(O,N){return this._setColor(O,!0)&&this.strokeOpacity(N),this},opacity:function(O){return this._doOpacity(O,O),this},fillOpacity:function(O){return this._doOpacity(O,null),this},strokeOpacity:function(O){return this._doOpacity(null,O),this},_doOpacity:function(O,N){var X,K;if(null!=O||null!=N){null!=O&&(O=Math.max(0,Math.min(1,O))),null!=N&&(N=Math.max(0,Math.min(1,N)));var fA="".concat(O,"_").concat(N);if(this._opacityRegistry[fA]){var IA=R(this._opacityRegistry[fA],2);X=IA[0],K=IA[1]}else{X={Type:"ExtGState"},null!=O&&(X.ca=O),null!=N&&(X.CA=N),(X=this.ref(X)).end();var At=++this._opacityCount;K="Gs".concat(At),this._opacityRegistry[fA]=[X,K]}return this.page.ext_gstates[K]=X,this.addContent("/".concat(K," gs"))}},linearGradient:function(O,N,X,K){return new Te(this,O,N,X,K)},radialGradient:function(O,N,X,K,fA,IA){return new nn(this,O,N,X,K,fA,IA)},pattern:function(O,N,X,K){return new Xe(this,O,N,X,K)}},Gn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};Jt=bt=Xt=oe=In=dn=0;var Fn={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},Yn={M:function(O,N){return Xt=oe=null,In=Jt=N[0],dn=bt=N[1],O.moveTo(Jt,bt)},m:function(O,N){return Xt=oe=null,In=Jt+=N[0],dn=bt+=N[1],O.moveTo(Jt,bt)},C:function(O,N){return Jt=N[4],bt=N[5],Xt=N[2],oe=N[3],O.bezierCurveTo.apply(O,L(N))},c:function(O,N){return O.bezierCurveTo(N[0]+Jt,N[1]+bt,N[2]+Jt,N[3]+bt,N[4]+Jt,N[5]+bt),Xt=Jt+N[2],oe=bt+N[3],Jt+=N[4],bt+=N[5]},S:function(O,N){return null===Xt&&(Xt=Jt,oe=bt),O.bezierCurveTo(Jt-(Xt-Jt),bt-(oe-bt),N[0],N[1],N[2],N[3]),Xt=N[0],oe=N[1],Jt=N[2],bt=N[3]},s:function(O,N){return null===Xt&&(Xt=Jt,oe=bt),O.bezierCurveTo(Jt-(Xt-Jt),bt-(oe-bt),Jt+N[0],bt+N[1],Jt+N[2],bt+N[3]),Xt=Jt+N[0],oe=bt+N[1],Jt+=N[2],bt+=N[3]},Q:function(O,N){return Xt=N[0],oe=N[1],O.quadraticCurveTo(N[0],N[1],Jt=N[2],bt=N[3])},q:function(O,N){return O.quadraticCurveTo(N[0]+Jt,N[1]+bt,N[2]+Jt,N[3]+bt),Xt=Jt+N[0],oe=bt+N[1],Jt+=N[2],bt+=N[3]},T:function(O,N){return null===Xt?(Xt=Jt,oe=bt):(Xt=Jt-(Xt-Jt),oe=bt-(oe-bt)),O.quadraticCurveTo(Xt,oe,N[0],N[1]),Xt=Jt-(Xt-Jt),oe=bt-(oe-bt),Jt=N[0],bt=N[1]},t:function(O,N){return null===Xt?(Xt=Jt,oe=bt):(Xt=Jt-(Xt-Jt),oe=bt-(oe-bt)),O.quadraticCurveTo(Xt,oe,Jt+N[0],bt+N[1]),Jt+=N[0],bt+=N[1]},A:function(O,N){return WA(O,Jt,bt,N),Jt=N[5],bt=N[6]},a:function(O,N){return N[5]+=Jt,N[6]+=bt,WA(O,Jt,bt,N),Jt=N[5],bt=N[6]},L:function(O,N){return Xt=oe=null,O.lineTo(Jt=N[0],bt=N[1])},l:function(O,N){return Xt=oe=null,O.lineTo(Jt+=N[0],bt+=N[1])},H:function(O,N){return Xt=oe=null,O.lineTo(Jt=N[0],bt)},h:function(O,N){return Xt=oe=null,O.lineTo(Jt+=N[0],bt)},V:function(O,N){return Xt=oe=null,O.lineTo(Jt,bt=N[0])},v:function(O,N){return Xt=oe=null,O.lineTo(Jt,bt+=N[0])},Z:function(O){return O.closePath(),Jt=In,bt=dn},z:function(O){return O.closePath(),Jt=In,bt=dn}},WA=function(O,N,X,K){var Kt,fA=R(K,7),Ot=yA(YA(fA[5],fA[6],fA[0],fA[1],fA[3],fA[4],fA[2],N,X));try{for(Ot.s();!(Kt=Ot.n()).done;){var Ee=tt.apply(void 0,L(Kt.value));O.bezierCurveTo.apply(O,L(Ee))}}catch(pe){Ot.e(pe)}finally{Ot.f()}},YA=function(O,N,X,K,fA,IA,At,rt,ft){var Ct=At*(Math.PI/180),Dt=Math.sin(Ct),Ft=Math.cos(Ct);X=Math.abs(X),K=Math.abs(K);var Tt=(Xt=Ft*(rt-O)*.5+Dt*(ft-N)*.5)*Xt/(X*X)+(oe=Ft*(ft-N)*.5-Dt*(rt-O)*.5)*oe/(K*K);Tt>1&&(X*=Tt=Math.sqrt(Tt),K*=Tt);var Ot=Ft/X,Kt=Dt/X,fe=-Dt/K,Ee=Ft/K,pe=Ot*rt+Kt*ft,rn=fe*rt+Ee*ft,Me=Ot*O+Kt*N,je=fe*O+Ee*N,Ke=1/((Me-pe)*(Me-pe)+(je-rn)*(je-rn))-.25;Ke<0&&(Ke=0);var Cn=Math.sqrt(Ke);IA===fA&&(Cn=-Cn);var Vn=.5*(pe+Me)-Cn*(je-rn),qn=.5*(rn+je)+Cn*(Me-pe),Nn=Math.atan2(rn-qn,pe-Vn),Jn=Math.atan2(je-qn,Me-Vn)-Nn;Jn<0&&1===IA?Jn+=2*Math.PI:Jn>0&&0===IA&&(Jn-=2*Math.PI);for(var ir=Math.ceil(Math.abs(Jn/(.5*Math.PI+.001))),dr=[],_n=0;_n0&&(K[K.length]=+fA),X[X.length]={cmd:N,args:K},K=[],fA="",IA=!1),N=Ct;else if([" ",","].includes(Ct)||"-"===Ct&&fA.length>0&&"e"!==fA[fA.length-1]||"."===Ct&&IA){if(0===fA.length)continue;K.length===At?(X[X.length]={cmd:N,args:K},K=[+fA],"M"===N&&(N="L"),"m"===N&&(N="l")):K[K.length]=+fA,IA="."===Ct,fA=["-","."].includes(Ct)?Ct:""}else fA+=Ct,"."===Ct&&(IA=!0)}}catch(Dt){rt.e(Dt)}finally{rt.f()}return fA.length>0&&(K.length===At?(X[X.length]={cmd:N,args:K},K=[+fA],"M"===N&&(N="L"),"m"===N&&(N="l")):K[K.length]=+fA),X[X.length]={cmd:N,args:K},X}(X);!function(O,N){Jt=bt=Xt=oe=In=dn=0;for(var X=0;X1&&void 0!==arguments[1]?arguments[1]:{},X=O;if(Array.isArray(O)||(O=[O,N.space||O]),!O.every(function(fA){return Number.isFinite(fA)&&fA>0}))throw new Error("dash(".concat(JSON.stringify(X),", ").concat(JSON.stringify(N),") invalid, lengths must be numeric and greater than zero"));return O=O.map(PA).join(" "),this.addContent("[".concat(O,"] ").concat(PA(N.phase||0)," d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(O,N){return this.addContent("".concat(PA(O)," ").concat(PA(N)," m"))},lineTo:function(O,N){return this.addContent("".concat(PA(O)," ").concat(PA(N)," l"))},bezierCurveTo:function(O,N,X,K,fA,IA){return this.addContent("".concat(PA(O)," ").concat(PA(N)," ").concat(PA(X)," ").concat(PA(K)," ").concat(PA(fA)," ").concat(PA(IA)," c"))},quadraticCurveTo:function(O,N,X,K){return this.addContent("".concat(PA(O)," ").concat(PA(N)," ").concat(PA(X)," ").concat(PA(K)," v"))},rect:function(O,N,X,K){return this.addContent("".concat(PA(O)," ").concat(PA(N)," ").concat(PA(X)," ").concat(PA(K)," re"))},roundedRect:function(O,N,X,K,fA){null==fA&&(fA=0);var IA=(fA=Math.min(fA,.5*X,.5*K))*(1-zA);return this.moveTo(O+fA,N),this.lineTo(O+X-fA,N),this.bezierCurveTo(O+X-IA,N,O+X,N+IA,O+X,N+fA),this.lineTo(O+X,N+K-fA),this.bezierCurveTo(O+X,N+K-IA,O+X-IA,N+K,O+X-fA,N+K),this.lineTo(O+fA,N+K),this.bezierCurveTo(O+IA,N+K,O,N+K-IA,O,N+K-fA),this.lineTo(O,N+fA),this.bezierCurveTo(O,N+IA,O+IA,N,O+fA,N),this.closePath()},ellipse:function(O,N,X,K){null==K&&(K=X);var fA=X*zA,IA=K*zA,At=(O-=X)+2*X,rt=(N-=K)+2*K,ft=O+X,Ct=N+K;return this.moveTo(O,Ct),this.bezierCurveTo(O,Ct-IA,ft-fA,N,ft,N),this.bezierCurveTo(ft+fA,N,At,Ct-IA,At,Ct),this.bezierCurveTo(At,Ct+IA,ft+fA,rt,ft,rt),this.bezierCurveTo(ft-fA,rt,O,Ct+IA,O,Ct),this.closePath()},circle:function(O,N,X){return this.ellipse(O,N,X)},arc:function(O,N,X,K,fA,IA){null==IA&&(IA=!1);var At=2*Math.PI,rt=.5*Math.PI,ft=fA-K;Math.abs(ft)>At?ft=At:0!==ft&&IA!==ft<0&&(ft=(IA?-1:1)*At+ft);var Dt=Math.ceil(Math.abs(ft)/rt),Ft=ft/Dt,Tt=Ft/rt*zA*X,Ot=K,Kt=-Math.sin(Ot)*Tt,fe=Math.cos(Ot)*Tt,Ee=O+Math.cos(Ot)*X,pe=N+Math.sin(Ot)*X;this.moveTo(Ee,pe);for(var rn=0;rn1&&void 0!==arguments[1]?arguments[1]:{},K=O*Math.PI/180,fA=Math.cos(K),IA=Math.sin(K),At=X=0;if(null!=N.origin){var rt=R(N.origin,2),Ct=(At=rt[0])*IA+(X=rt[1])*fA;At-=At*fA-X*IA,X-=Ct}return this.transform(fA,IA,-IA,fA,At,X)},scale:function(O,N){var K,X=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};null==N&&(N=O),"object"==typeof N&&(X=N,N=O);var fA=K=0;if(null!=X.origin){var IA=R(X.origin,2);fA=IA[0],K=IA[1],fA-=O*fA,K-=N*K}return this.transform(O,0,0,N,fA,K)}},$A={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},LA=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n \nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n \nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n \ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n \nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n \nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n \nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n \nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),ot=function(){function mA(O){f(this,mA),this.contents=O,this.attributes={},this.glyphWidths={},this.boundingBoxes={},this.kernPairs={},this.parse(),this.charWidths=new Array(256);for(var N=0;N<=255;N++)this.charWidths[N]=this.glyphWidths[LA[N]];this.bbox=this.attributes.FontBBox.split(/\s+/).map(function(X){return+X}),this.ascender=+(this.attributes.Ascender||0),this.descender=+(this.attributes.Descender||0),this.xHeight=+(this.attributes.XHeight||0),this.capHeight=+(this.attributes.CapHeight||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.descender)}return w(mA,null,[{key:"open",value:function(N){return new mA(e.readFileSync(N,"utf8"))}}]),w(mA,[{key:"parse",value:function(){var K,N="",X=yA(this.contents.split("\n"));try{for(X.s();!(K=X.n()).done;){var IA,At,fA=K.value;if(IA=fA.match(/^Start(\w+)/))N=IA[1];else if(IA=fA.match(/^End(\w+)/))N="";else switch(N){case"FontMetrics":var rt=(IA=fA.match(/(^\w+)\s+(.*)/))[1],ft=IA[2];(At=this.attributes[rt])?(Array.isArray(At)||(At=this.attributes[rt]=[At]),At.push(ft)):this.attributes[rt]=ft;break;case"CharMetrics":if(!/^CH?\s/.test(fA))continue;var Ct=fA.match(/\bN\s+(\.?\w+)\s*;/)[1];this.glyphWidths[Ct]=+fA.match(/\bWX\s+(\d+)\s*;/)[1];break;case"KernPairs":(IA=fA.match(/^KPX\s+(\.?\w+)\s+(\.?\w+)\s+(-?\d+)/))&&(this.kernPairs[IA[1]+"\0"+IA[2]]=parseInt(IA[3]))}}}catch(Dt){X.e(Dt)}finally{X.f()}}},{key:"encodeText",value:function(N){for(var X=[],K=0,fA=N.length;K>8,rt=0;this.font.post.isFixedPitch&&(rt|=1),1<=At&&At<=7&&(rt|=2),rt|=4,10===At&&(rt|=8),this.font.head.macStyle.italic&&(rt|=64);var Ct=[1,2,3,4,5,6].map(function(Kt){return String.fromCharCode((K.id.charCodeAt(Kt)||73)+17)}).join("")+"+"+this.font.postscriptName,Dt=this.font.bbox,Ft=this.document.ref({Type:"FontDescriptor",FontName:Ct,Flags:rt,FontBBox:[Dt.minX*this.scale,Dt.minY*this.scale,Dt.maxX*this.scale,Dt.maxY*this.scale],ItalicAngle:this.font.italicAngle,Ascent:this.ascender,Descent:this.descender,CapHeight:(this.font.capHeight||this.font.ascent)*this.scale,XHeight:(this.font.xHeight||0)*this.scale,StemV:0});fA?Ft.data.FontFile3=IA:Ft.data.FontFile2=IA,Ft.end();var Tt={Type:"Font",Subtype:"CIDFontType0",BaseFont:Ct,CIDSystemInfo:{Registry:new String("Adobe"),Ordering:new String("Identity"),Supplement:0},FontDescriptor:Ft,W:[0,this.widths]};fA||(Tt.Subtype="CIDFontType2",Tt.CIDToGIDMap="Identity");var Ot=this.document.ref(Tt);return Ot.end(),this.dictionary.data={Type:"Font",Subtype:"Type0",BaseFont:Ct,Encoding:"Identity-H",DescendantFonts:[Ot],ToUnicode:this.toUnicodeCmap()},this.dictionary.end()}},{key:"toUnicodeCmap",value:function(){var At,K=this.document.ref(),fA=[],IA=yA(this.unicode);try{for(IA.s();!(At=IA.n()).done;){var Dt,ft=[],Ct=yA(At.value);try{for(Ct.s();!(Dt=Ct.n()).done;){var Ft=Dt.value;Ft>65535&&(ft.push(Ut((Ft-=65536)>>>10&1023|55296)),Ft=56320|1023&Ft),ft.push(Ut(Ft))}}catch(Tt){Ct.e(Tt)}finally{Ct.f()}fA.push("<".concat(ft.join(" "),">"))}}catch(Tt){IA.e(Tt)}finally{IA.f()}return K.end("/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange\n1 beginbfrange\n<0000> <".concat(Ut(fA.length-1),"> [").concat(fA.join(" "),"]\nendbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend")),K}}]),N}(VA),Wt=function(){function mA(){f(this,mA)}return w(mA,null,[{key:"open",value:function(N,X,K,fA){var IA;if("string"==typeof X){if(St.isStandardFont(X))return new St(N,X,fA);X=e.readFileSync(X)}if(i.isBuffer(X)?IA=a.default.create(X,K):X instanceof Uint8Array?IA=a.default.create(i.from(X),K):X instanceof ArrayBuffer&&(IA=a.default.create(i.from(new Uint8Array(X)),K)),null==IA)throw new Error("Not a supported font format or standard PDF font.");return new kt(N,IA,fA)}}]),mA}(),ne={initFonts:function(){var O=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Helvetica";this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={},O&&this.font(O)},font:function(O,N,X){var K,fA;if("number"==typeof N&&(X=N,N=null),"string"==typeof O&&this._registeredFonts[O]){K=O;var IA=this._registeredFonts[O];O=IA.src,N=IA.family}else"string"!=typeof(K=N||O)&&(K=null);if(null!=X&&this.fontSize(X),fA=this._fontFamilies[K])return this._font=fA,this;var At="F".concat(++this._fontCount);return this._font=Wt.open(this,O,N,At),(fA=this._fontFamilies[this._font.name])?(this._font=fA,this):(K&&(this._fontFamilies[K]=this._font),this._font.name&&(this._fontFamilies[this._font.name]=this._font),this)},fontSize:function(O){return this._fontSize=O,this},currentLineHeight:function(O){return null==O&&(O=!1),this._font.lineHeight(this._fontSize,O)},registerFont:function(O,N,X){return this._registeredFonts[O]={src:N,family:X},this}},Et=function(mA){m(N,mA);var O=F(N);function N(X,K){var fA;return f(this,N),(fA=O.call(this)).document=X,fA.indent=K.indent||0,fA.characterSpacing=K.characterSpacing||0,fA.wordSpacing=0===K.wordSpacing,fA.columns=K.columns||1,fA.columnGap=null!=K.columnGap?K.columnGap:18,fA.lineWidth=(K.width-fA.columnGap*(fA.columns-1))/fA.columns,fA.spaceLeft=fA.lineWidth,fA.startX=fA.document.x,fA.startY=fA.document.y,fA.column=1,fA.ellipsis=K.ellipsis,fA.continuedX=0,fA.features=K.features,null!=K.height?(fA.height=K.height,fA.maxY=fA.startY+K.height):fA.maxY=fA.document.page.maxY(),fA.on("firstLine",function(IA){var At=fA.continuedX||fA.indent;return fA.document.x+=At,fA.lineWidth-=At,fA.once("line",function(){if(fA.document.x-=At,fA.lineWidth+=At,IA.continued&&!fA.continuedX&&(fA.continuedX=fA.indent),!IA.continued)return fA.continuedX=0})}),fA.on("lastLine",function(IA){var At=IA.align;return"justify"===At&&(IA.align="left"),fA.lastLine=!0,fA.once("line",function(){return fA.document.y+=IA.paragraphGap||0,IA.align=At,fA.lastLine=!1})}),fA}return w(N,[{key:"wordWidth",value:function(K){return this.document.widthOfString(K,this)+this.characterSpacing+this.wordSpacing}},{key:"eachWord",value:function(K,fA){for(var IA,At=new E.default(K),rt=null,ft=Object.create(null);IA=At.nextBreak();){var Ct,Dt=K.slice((null!=rt?rt.position:void 0)||0,IA.position),Ft=null!=ft[Dt]?ft[Dt]:ft[Dt]=this.wordWidth(Dt);if(Ft>this.lineWidth+this.continuedX)for(var Tt=rt,Ot={};Dt.length;){var Kt,fe;Ft>this.spaceLeft?(Kt=Math.ceil(this.spaceLeft/(Ft/Dt.length)),fe=(Ft=this.wordWidth(Dt.slice(0,Kt)))<=this.spaceLeft&&Ktthis.spaceLeft&&Kt>0;Ee||fe;)Ee?Ee=(Ft=this.wordWidth(Dt.slice(0,--Kt)))>this.spaceLeft&&Kt>0:(Ee=(Ft=this.wordWidth(Dt.slice(0,++Kt)))>this.spaceLeft&&Kt>0,fe=Ft<=this.spaceLeft&&Ktthis.maxY||At>this.maxY)&&this.nextSection();var rt="",ft=0,Ct=0,Dt=0,Ft=this.document.y,Tt=function(){return fA.textWidth=ft+IA.wordSpacing*(Ct-1),fA.wordCount=Ct,fA.lineWidth=IA.lineWidth,Ft=IA.document.y,IA.emit("line",rt,fA,IA),Dt++};return this.emit("sectionStart",fA,this),this.eachWord(K,function(Ot,Kt,fe,Ee){if((null==Ee||Ee.required)&&(IA.emit("firstLine",fA,IA),IA.spaceLeft=IA.lineWidth),Kt<=IA.spaceLeft&&(rt+=Ot,ft+=Kt,Ct++),fe.required||Kt>IA.spaceLeft){var pe=IA.document.currentLineHeight(!0);if(null!=IA.height&&IA.ellipsis&&IA.document.y+2*pe>IA.maxY&&IA.column>=IA.columns){for(!0===IA.ellipsis&&(IA.ellipsis="\u2026"),rt=rt.replace(/\s+$/,""),ft=IA.wordWidth(rt+IA.ellipsis);rt&&ft>IA.lineWidth;)rt=rt.slice(0,-1).replace(/\s+$/,""),ft=IA.wordWidth(rt+IA.ellipsis);ft<=IA.lineWidth&&(rt+=IA.ellipsis),ft=IA.wordWidth(rt)}return fe.required&&(Kt>IA.spaceLeft&&(Tt(),rt=Ot,ft=Kt,Ct=1),IA.emit("lastLine",fA,IA)),Tt(),IA.document.y+pe>IA.maxY&&!IA.nextSection()?(Ct=0,rt="",!1):fe.required?(IA.spaceLeft=IA.lineWidth,rt="",ft=0,Ct=0):(IA.spaceLeft=IA.lineWidth-Kt,rt=Ot,ft=Kt,Ct=1)}return IA.spaceLeft-=Kt}),Ct>0&&(this.emit("lastLine",fA,this),Tt()),this.emit("sectionEnd",fA,this),!0===fA.continued?(Dt>1&&(this.continuedX=0),this.continuedX+=fA.textWidth||0,this.document.y=Ft):this.document.x=this.startX}},{key:"nextSection",value:function(K){if(this.emit("sectionEnd",K,this),++this.column>this.columns){if(null!=this.height)return!1;var fA;this.document.continueOnNewPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(fA=this.document).fillColor.apply(fA,L(this.document._fillColor)),this.emit("pageBreak",K,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",K,this);return this.emit("sectionStart",K,this),!0}}]),N}(g.EventEmitter),Pt=bA.number,jt={initText:function(){return this._line=this._line.bind(this),this.x=0,this.y=0,this._lineGap=0},lineGap:function(O){return this._lineGap=O,this},moveDown:function(O){return null==O&&(O=1),this.y+=this.currentLineHeight(!0)*O+this._lineGap,this},moveUp:function(O){return null==O&&(O=1),this.y-=this.currentLineHeight(!0)*O+this._lineGap,this},_text:function(O,N,X,K,fA){var IA=this;K=this._initOptions(N,X,K),O=null==O?"":"".concat(O),K.wordSpacing&&(O=O.replace(/\s{2,}/g," "));var At=function(){K.structParent&&K.structParent.add(IA.struct(K.structType||"P",[IA.markStructureContent(K.structType||"P")]))};if(K.width){var rt=this._wrapper;rt||((rt=new Et(this,K)).on("line",fA),rt.on("firstLine",At)),this._wrapper=K.continued?rt:null,this._textOptions=K.continued?K:null,rt.wrap(O,K)}else{var Ct,ft=yA(O.split("\n"));try{for(ft.s();!(Ct=ft.n()).done;){var Dt=Ct.value;At(),fA(Dt,K)}}catch(Ft){ft.e(Ft)}finally{ft.f()}}return this},text:function(O,N,X,K){return this._text(O,N,X,K,this._line)},widthOfString:function(O){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._font.widthOfString(O,this._fontSize,N.features)+(N.characterSpacing||0)*(O.length-1)},heightOfString:function(O,N){var X=this,K=this.x,fA=this.y;(N=this._initOptions(N)).height=1/0;var IA=N.lineGap||this._lineGap||0;this._text(O,this.x,this.y,N,function(){return X.y+=X.currentLineHeight(!0)+IA});var At=this.y-fA;return this.x=K,this.y=fA,At},list:function(O,N,X,K,fA){var IA=this,At=(K=this._initOptions(N,X,K)).listType||"bullet",rt=Math.round(this._font.ascender/1e3*this._fontSize),ft=rt/2,Ct=K.bulletRadius||rt/3,Dt=K.textIndent||("bullet"===At?5*Ct:2*rt),Ft=K.bulletIndent||("bullet"===At?8*Ct:2*rt),Tt=1,Ot=[],Kt=[],fe=[];!function Me(je){for(var wn=1,Ke=0;Ke0&&void 0!==arguments[0]?arguments[0]:{},N=arguments.length>1?arguments[1]:void 0,X=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof O&&(X=O,O=null);var K=Object.assign({},X);if(this._textOptions)for(var fA in this._textOptions)"continued"!==fA&&void 0===K[fA]&&(K[fA]=this._textOptions[fA]);return null!=O&&(this.x=O),null!=N&&(this.y=N),!1!==K.lineBreak&&(null==K.width&&(K.width=this.page.width-this.x-this.page.margins.right),K.width=Math.max(K.width,0)),K.columns||(K.columns=0),null==K.columnGap&&(K.columnGap=18),K},_line:function(O){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},X=arguments.length>2?arguments[2]:void 0;this._fragment(O,this.x,this.y,N);var K=N.lineGap||this._lineGap||0;return X?this.y+=this.currentLineHeight(!0)+K:this.x+=this.widthOfString(O)},_fragment:function(O,N,X,K){var IA,At,rt,ft,Ct,Dt,fA=this;if(0!==(O="".concat(O).replace(/\n/g,"")).length){var Tt=K.wordSpacing||0,Ot=K.characterSpacing||0;if(K.width)switch(K.align||"left"){case"right":Ct=this.widthOfString(O.replace(/\s+$/,""),K),N+=K.lineWidth-Ct;break;case"center":N+=K.lineWidth/2-K.textWidth/2;break;case"justify":Dt=O.trim().split(/\s+/),Ct=this.widthOfString(O.replace(/\s+/g,""),K);var Kt=this.widthOfString(" ")+Ot;Tt=Math.max(0,(K.lineWidth-Ct)/Math.max(1,Dt.length-1)-Kt)}if("number"==typeof K.baseline)IA=-K.baseline;else{switch(K.baseline){case"svg-middle":IA=.5*this._font.xHeight;break;case"middle":case"svg-central":IA=.5*(this._font.descender+this._font.ascender);break;case"bottom":case"ideographic":IA=this._font.descender;break;case"alphabetic":IA=0;break;case"mathematical":IA=.5*this._font.ascender;break;case"hanging":IA=.8*this._font.ascender;break;default:IA=this._font.ascender}IA=IA/1e3*this._fontSize}var je,fe=K.textWidth+Tt*(K.wordCount-1)+Ot*(O.length-1);if(null!=K.link&&this.link(N,X,fe,this.currentLineHeight(),K.link),null!=K.goTo&&this.goTo(N,X,fe,this.currentLineHeight(),K.goTo),null!=K.destination&&this.addNamedDestination(K.destination,"XYZ",N,X,null),K.underline){this.save(),K.stroke||this.strokeColor.apply(this,L(this._fillColor||[]));var Ee=this._fontSize<10?.5:Math.floor(this._fontSize/10);this.lineWidth(Ee);var pe=X+this.currentLineHeight()-Ee;this.moveTo(N,pe),this.lineTo(N+fe,pe),this.stroke(),this.restore()}if(K.strike){this.save(),K.stroke||this.strokeColor.apply(this,L(this._fillColor||[]));var rn=this._fontSize<10?.5:Math.floor(this._fontSize/10);this.lineWidth(rn);var Me=X+this.currentLineHeight()/2;this.moveTo(N,Me),this.lineTo(N+fe,Me),this.stroke(),this.restore()}this.save(),K.oblique&&(je="number"==typeof K.oblique?-Math.tan(K.oblique*Math.PI/180):-.25,this.transform(1,0,0,1,N,X),this.transform(1,0,je,1,-je*IA,0),this.transform(1,0,0,1,-N,-X)),this.transform(1,0,0,-1,0,this.page.height),X=this.page.height-X-IA,null==this.page.fonts[this._font.id]&&(this.page.fonts[this._font.id]=this._font.ref()),this.addContent("BT"),this.addContent("1 0 0 1 ".concat(Pt(N)," ").concat(Pt(X)," Tm")),this.addContent("/".concat(this._font.id," ").concat(Pt(this._fontSize)," Tf"));var wn=K.fill&&K.stroke?2:K.stroke?1:0;if(wn&&this.addContent("".concat(wn," Tr")),Ot&&this.addContent("".concat(Pt(Ot)," Tc")),Tt){Dt=O.trim().split(/\s+/),Tt+=this.widthOfString(" ")+Ot,Tt*=1e3/this._fontSize,At=[],ft=[];var Cn,Ke=yA(Dt);try{for(Ke.s();!(Cn=Ke.n()).done;){var Nn=R(this._font.encode(Cn.value,K.features),2),Jn=Nn[1];At=At.concat(Nn[0]),ft=ft.concat(Jn);var ir={},dr=ft[ft.length-1];for(var _n in dr)ir[_n]=dr[_n];ir.xAdvance+=Tt,ft[ft.length-1]=ir}}catch(Or){Ke.e(Or)}finally{Ke.f()}}else{var Wn=R(this._font.encode(O,K.features),2);At=Wn[0],ft=Wn[1]}var br=this._fontSize/1e3,Mr=[],Gr=0,Hr=!1,si=function(Zn){if(Gr ").concat(Pt(-bi)))}return Gr=Zn},Jr=function(Zn){if(si(Zn),Mr.length>0)return fA.addContent("[".concat(Mr.join(" "),"] TJ")),Mr.length=0};for(rt=0;rt3&&void 0!==arguments[3]?arguments[3]:{};"object"==typeof N&&(K=N,N=null),N=null!=(Ct=null!=N?N:K.x)?Ct:this.x,X=null!=(Dt=null!=X?X:K.y)?Dt:this.y,"string"==typeof O&&(rt=this._imageRegistry[O]),rt||(rt=O.width&&O.height?O:this.openImage(O)),rt.obj||rt.embed(this),null==this.page.xobjects[rt.label]&&(this.page.xobjects[rt.label]=rt.obj);var Ft=K.width||rt.width,Tt=K.height||rt.height;if(K.width&&!K.height){var Ot=Ft/rt.width;Ft=rt.width*Ot,Tt=rt.height*Ot}else if(K.height&&!K.width){var Kt=Tt/rt.height;Ft=rt.width*Kt,Tt=rt.height*Kt}else if(K.scale)Ft=rt.width*K.scale,Tt=rt.height*K.scale;else if(K.fit){var fe=R(K.fit,2);(ft=rt.width/rt.height)>(At=fe[0])/(fA=fe[1])?(Ft=At,Tt=At/ft):(Tt=fA,Ft=fA*ft)}else if(K.cover){var Ee=R(K.cover,2);(ft=rt.width/rt.height)>(At=Ee[0])/(fA=Ee[1])?(Tt=fA,Ft=fA*ft):(Ft=At,Tt=At/ft)}return(K.fit||K.cover)&&("center"===K.align?N=N+At/2-Ft/2:"right"===K.align&&(N=N+At-Ft),"center"===K.valign?X=X+fA/2-Tt/2:"bottom"===K.valign&&(X=X+fA-Tt)),null!=K.link&&this.link(N,X,Ft,Tt,K.link),null!=K.goTo&&this.goTo(N,X,Ft,Tt,K.goTo),null!=K.destination&&this.addNamedDestination(K.destination,"XYZ",N,X,null),this.y===X&&(this.y+=Tt),this.save(),this.transform(Ft,0,0,-Tt,N,X+Tt),this.addContent("/".concat(rt.label," Do")),this.restore(),this},openImage:function(O){var N;return"string"==typeof O&&(N=this._imageRegistry[O]),N||(N=ge.open(O,"I".concat(++this._imageCount)),"string"==typeof O&&(this._imageRegistry[O]=N)),N}},Ge={annotate:function(O,N,X,K,fA){for(var IA in fA.Type="Annot",fA.Rect=this._convertRect(O,N,X,K),fA.Border=[0,0,0],"Link"===fA.Subtype&&void 0===fA.F&&(fA.F=4),"Link"!==fA.Subtype&&null==fA.C&&(fA.C=this._normalizeColor(fA.color||[0,0,0])),delete fA.color,"string"==typeof fA.Dest&&(fA.Dest=new String(fA.Dest)),fA){var At=fA[IA];fA[IA[0].toUpperCase()+IA.slice(1)]=At}var rt=this.ref(fA);return this.page.annotations.push(rt),rt.end(),this},note:function(O,N,X,K,fA){var IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return IA.Subtype="Text",IA.Contents=new String(fA),IA.Name="Comment",null==IA.color&&(IA.color=[243,223,92]),this.annotate(O,N,X,K,IA)},goTo:function(O,N,X,K,fA){var IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return IA.Subtype="Link",IA.A=this.ref({S:"GoTo",D:new String(fA)}),IA.A.end(),this.annotate(O,N,X,K,IA)},link:function(O,N,X,K,fA){var IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(IA.Subtype="Link","number"==typeof fA){var At=this._root.data.Pages.data;if(!(fA>=0&&fA4&&void 0!==arguments[4]?arguments[4]:{},At=R(this._convertRect(O,N,X,K),4),rt=At[0],ft=At[1],Ct=At[2],Dt=At[3];return fA.QuadPoints=[rt,Dt,Ct,Dt,rt,ft,Ct,ft],fA.Contents=new String,this.annotate(O,N,X,K,fA)},highlight:function(O,N,X,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Highlight",null==fA.color&&(fA.color=[241,238,148]),this._markup(O,N,X,K,fA)},underline:function(O,N,X,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Underline",this._markup(O,N,X,K,fA)},strike:function(O,N,X,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="StrikeOut",this._markup(O,N,X,K,fA)},lineAnnotation:function(O,N,X,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Line",fA.Contents=new String,fA.L=[O,this.page.height-N,X,this.page.height-K],this.annotate(O,N,X,K,fA)},rectAnnotation:function(O,N,X,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Square",fA.Contents=new String,this.annotate(O,N,X,K,fA)},ellipseAnnotation:function(O,N,X,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Circle",fA.Contents=new String,this.annotate(O,N,X,K,fA)},textAnnotation:function(O,N,X,K,fA){var IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return IA.Subtype="FreeText",IA.Contents=new String(fA),IA.DA=new String,this.annotate(O,N,X,K,IA)},fileAnnotation:function(O,N,X,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},At=this.file(fA.src,Object.assign({hidden:!0},fA));return IA.Subtype="FileAttachment",IA.FS=At,IA.Contents?IA.Contents=new String(IA.Contents):At.data.Desc&&(IA.Contents=At.data.Desc),this.annotate(O,N,X,K,IA)},_convertRect:function(O,N,X,K){var fA=N;N+=K;var IA=O+X,At=R(this._ctm,6),rt=At[0],ft=At[1],Ct=At[2],Dt=At[3],Ft=At[4],Tt=At[5];return[O=rt*O+Ct*N+Ft,N=ft*O+Dt*N+Tt,IA=rt*IA+Ct*fA+Ft,fA=ft*IA+Dt*fA+Tt]}},Se=function(){function mA(O,N,X,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{expanded:!1};f(this,mA),this.document=O,this.options=fA,this.outlineData={},null!==K&&(this.outlineData.Dest=[K.dictionary,"Fit"]),null!==N&&(this.outlineData.Parent=N),null!==X&&(this.outlineData.Title=new String(X)),this.dictionary=this.document.ref(this.outlineData),this.children=[]}return w(mA,[{key:"addItem",value:function(N){var K=new mA(this.document,this.dictionary,N,this.document.page,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:!1});return this.children.push(K),K}},{key:"endOutline",value:function(){if(this.children.length>0){this.options.expanded&&(this.outlineData.Count=this.children.length);var X=this.children[this.children.length-1];this.outlineData.First=this.children[0].dictionary,this.outlineData.Last=X.dictionary;for(var K=0,fA=this.children.length;K0&&(IA.outlineData.Prev=this.children[K-1].dictionary),K0)return this._root.data.Outlines=this.outline.dictionary,this._root.data.PageMode="UseOutlines"}},Ne=function(){function mA(O,N){f(this,mA),this.refs=[{pageRef:O,mcid:N}]}return w(mA,[{key:"push",value:function(N){var X=this;N.refs.forEach(function(K){return X.refs.push(K)})}}]),mA}(),$e=function(){function mA(O,N){var X=this,K=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},fA=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;f(this,mA),this.document=O,this._attached=!1,this._ended=!1,this._flushed=!1,this.dictionary=O.ref({S:N});var IA=this.dictionary.data;(Array.isArray(K)||this._isValidChild(K))&&(fA=K,K={}),void 0!==K.title&&(IA.T=new String(K.title)),void 0!==K.lang&&(IA.Lang=new String(K.lang)),void 0!==K.alt&&(IA.Alt=new String(K.alt)),void 0!==K.expanded&&(IA.E=new String(K.expanded)),void 0!==K.actual&&(IA.ActualText=new String(K.actual)),this._children=[],fA&&(Array.isArray(fA)||(fA=[fA]),fA.forEach(function(At){return X.add(At)}),this.end())}return w(mA,[{key:"add",value:function(N){if(this._ended)throw new Error("Cannot add child to already-ended structure element");if(!this._isValidChild(N))throw new Error("Invalid structure element child");return N instanceof mA&&(N.setParent(this.dictionary),this._attached&&N.setAttached()),N instanceof Ne&&this._addContentToParentTree(N),"function"==typeof N&&this._attached&&(N=this._contentForClosure(N)),this._children.push(N),this}},{key:"_addContentToParentTree",value:function(N){var X=this;N.refs.forEach(function(K){var fA=K.pageRef,IA=K.mcid;X.document.getStructParentTree().get(fA.data.StructParents)[IA]=X.dictionary})}},{key:"setParent",value:function(N){if(this.dictionary.data.P)throw new Error("Structure element added to more than one parent");this.dictionary.data.P=N,this._flush()}},{key:"setAttached",value:function(){var N=this;this._attached||(this._children.forEach(function(X,K){X instanceof mA&&X.setAttached(),"function"==typeof X&&(N._children[K]=N._contentForClosure(X))}),this._attached=!0,this._flush())}},{key:"end",value:function(){this._ended||(this._children.filter(function(N){return N instanceof mA}).forEach(function(N){return N.end()}),this._ended=!0,this._flush())}},{key:"_isValidChild",value:function(N){return N instanceof mA||N instanceof Ne||"function"==typeof N}},{key:"_contentForClosure",value:function(N){var X=this.document.markStructureContent(this.dictionary.data.S);return N(),this.document.endMarkedContent(),this._addContentToParentTree(X),X}},{key:"_isFlushable",value:function(){return!(!this.dictionary.data.P||!this._ended)&&this._children.every(function(N){return"function"!=typeof N&&(!(N instanceof mA)||N._isFlushable())})}},{key:"_flush",value:function(){var N=this;this._flushed||!this._isFlushable()||(this.dictionary.data.K=[],this._children.forEach(function(X){return N._flushChild(X)}),this.dictionary.end(),this._children=[],this.dictionary.data.K=null,this._flushed=!0)}},{key:"_flushChild",value:function(N){var X=this;N instanceof mA&&this.dictionary.data.K.push(N.dictionary),N instanceof Ne&&N.refs.forEach(function(K){var fA=K.pageRef,IA=K.mcid;X.dictionary.data.Pg||(X.dictionary.data.Pg=fA),X.dictionary.data.K.push(X.dictionary.data.Pg===fA?IA:{Type:"MCR",Pg:fA,MCID:IA})})}}]),mA}(),yn=function(mA){m(N,mA);var O=F(N);function N(){return f(this,N),O.apply(this,arguments)}return w(N,[{key:"_compareKeys",value:function(K,fA){return parseInt(K)-parseInt(fA)}},{key:"_keysName",value:function(){return"Nums"}},{key:"_dataForKey",value:function(K){return parseInt(K)}}]),N}(_),an={initMarkings:function(O){this.structChildren=[],O.tagged&&(this.getMarkInfoDictionary().data.Marked=!0,this.getStructTreeRoot())},markContent:function(O){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("Artifact"===O||N&&N.mcid){var X=0;for(this.page.markings.forEach(function(fA){(X||fA.structContent||"Artifact"===fA.tag)&&X++});X--;)this.endMarkedContent()}if(!N)return this.page.markings.push({tag:O}),this.addContent("/".concat(O," BMC")),this;this.page.markings.push({tag:O,options:N});var K={};return void 0!==N.mcid&&(K.MCID=N.mcid),"Artifact"===O&&("string"==typeof N.type&&(K.Type=N.type),Array.isArray(N.bbox)&&(K.BBox=[N.bbox[0],this.page.height-N.bbox[3],N.bbox[2],this.page.height-N.bbox[1]]),Array.isArray(N.attached)&&N.attached.every(function(fA){return"string"==typeof fA})&&(K.Attached=N.attached)),"Span"===O&&(N.lang&&(K.Lang=new String(N.lang)),N.alt&&(K.Alt=new String(N.alt)),N.expanded&&(K.E=new String(N.expanded)),N.actual&&(K.ActualText=new String(N.actual))),this.addContent("/".concat(O," ").concat(bA.convert(K)," BDC")),this},markStructureContent:function(O){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},X=this.getStructParentTree().get(this.page.structParentTreeKey),K=X.length;X.push(null),this.markContent(O,S(S({},N),{},{mcid:K}));var fA=new Ne(this.page.dictionary,K);return this.page.markings.slice(-1)[0].structContent=fA,fA},endMarkedContent:function(){return this.page.markings.pop(),this.addContent("EMC"),this},struct:function(O){return new $e(this,O,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)},addStructure:function(O){var N=this.getStructTreeRoot();return O.setParent(N),O.setAttached(),this.structChildren.push(O),N.data.K||(N.data.K=[]),N.data.K.push(O.dictionary),this},initPageMarkings:function(O){var N=this;O.forEach(function(X){if(X.structContent){var K=X.structContent,fA=N.markStructureContent(X.tag,X.options);K.push(fA),N.page.markings.slice(-1)[0].structContent=K}else N.markContent(X.tag,X.options)})},endPageMarkings:function(O){var N=O.markings;return N.forEach(function(){return O.write("EMC")}),O.markings=[],N},getMarkInfoDictionary:function(){return this._root.data.MarkInfo||(this._root.data.MarkInfo=this.ref({})),this._root.data.MarkInfo},getStructTreeRoot:function(){return this._root.data.StructTreeRoot||(this._root.data.StructTreeRoot=this.ref({Type:"StructTreeRoot",ParentTree:new yn,ParentTreeNextKey:0})),this._root.data.StructTreeRoot},getStructParentTree:function(){return this.getStructTreeRoot().data.ParentTree},createStructParentTreeNextKey:function(){this.getMarkInfoDictionary();var O=this.getStructTreeRoot(),N=O.data.ParentTreeNextKey++;return O.data.ParentTree.add(N,[]),N},endMarkings:function(){var O=this._root.data.StructTreeRoot;O&&(O.end(),this.structChildren.forEach(function(N){return N.end()})),this._root.data.MarkInfo&&this._root.data.MarkInfo.end()}},Mn={readOnly:1,required:2,noExport:4,multiline:4096,password:8192,toggleToOffButton:16384,radioButton:32768,pushButton:65536,combo:131072,edit:262144,sort:524288,multiSelect:2097152,noSpell:4194304},xn={left:0,center:1,right:2},qe={value:"V",defaultValue:"DV"},fn={zip:"0",zipPlus4:"1",zip4:"1",phone:"2",ssn:"3"},cn_number={nDec:0,sepComma:!1,negStyle:"MinusBlack",currency:"",currencyPrepend:!0},cn_percent={nDec:0,sepComma:!1},Xn={initForm:function(){if(!this._font)throw new Error("Must set a font before calling initForm method");this._acroform={fonts:{},defaultFont:this._font.name},this._acroform.fonts[this._font.id]=this._font.ref();var O={Fields:[],NeedAppearances:!0,DA:new String("/".concat(this._font.id," 0 Tf 0 g")),DR:{Font:{}}};O.DR.Font[this._font.id]=this._font.ref();var N=this.ref(O);return this._root.data.AcroForm=N,this},endAcroForm:function(){var O=this;if(this._root.data.AcroForm){if(!Object.keys(this._acroform.fonts).length&&!this._acroform.defaultFont)throw new Error("No fonts specified for PDF form");var N=this._root.data.AcroForm.data.DR.Font;Object.keys(this._acroform.fonts).forEach(function(X){N[X]=O._acroform.fonts[X]}),this._root.data.AcroForm.data.Fields.forEach(function(X){O._endChild(X)}),this._root.data.AcroForm.end()}return this},_endChild:function(O){var N=this;return Array.isArray(O.data.Kids)&&(O.data.Kids.forEach(function(X){N._endChild(X)}),O.end()),this},formField:function(O){var X=this._fieldDict(O,null,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),K=this.ref(X);return this._addToParent(K),K},formAnnotation:function(O,N,X,K,fA,IA){var rt=this._fieldDict(O,N,arguments.length>6&&void 0!==arguments[6]?arguments[6]:{});return rt.Subtype="Widget",void 0===rt.F&&(rt.F=4),this.annotate(X,K,fA,IA,rt),this._addToParent(this.page.annotations[this.page.annotations.length-1])},formText:function(O,N,X,K,fA){return this.formAnnotation(O,"text",N,X,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formPushButton:function(O,N,X,K,fA){return this.formAnnotation(O,"pushButton",N,X,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formCombo:function(O,N,X,K,fA){return this.formAnnotation(O,"combo",N,X,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formList:function(O,N,X,K,fA){return this.formAnnotation(O,"list",N,X,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formRadioButton:function(O,N,X,K,fA){return this.formAnnotation(O,"radioButton",N,X,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formCheckbox:function(O,N,X,K,fA){return this.formAnnotation(O,"checkbox",N,X,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},_addToParent:function(O){var N=O.data.Parent;return N?(N.data.Kids||(N.data.Kids=[]),N.data.Kids.push(O)):this._root.data.AcroForm.data.Fields.push(O),this},_fieldDict:function(O,N){var X=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this._acroform)throw new Error("Call document.initForms() method before adding form elements to document");var K=Object.assign({},X);return null!==N&&(K=this._resolveType(N,X)),K=this._resolveFlags(K),K=this._resolveJustify(K),K=this._resolveFont(K),K=this._resolveStrings(K),K=this._resolveColors(K),(K=this._resolveFormat(K)).T=new String(O),K.parent&&(K.Parent=K.parent,delete K.parent),K},_resolveType:function(O,N){if("text"===O)N.FT="Tx";else if("pushButton"===O)N.FT="Btn",N.pushButton=!0;else if("radioButton"===O)N.FT="Btn",N.radioButton=!0;else if("checkbox"===O)N.FT="Btn";else if("combo"===O)N.FT="Ch",N.combo=!0;else{if("list"!==O)throw new Error("Invalid form annotation type '".concat(O,"'"));N.FT="Ch"}return N},_resolveFormat:function(O){var N=O.format;if(N&&N.type){var X,K,fA="";if(void 0!==fn[N.type])X="AFSpecial_Keystroke",K="AFSpecial_Format",fA=fn[N.type];else{var IA=N.type.charAt(0).toUpperCase()+N.type.slice(1);if(X="AF".concat(IA,"_Keystroke"),K="AF".concat(IA,"_Format"),"date"===N.type)X+="Ex",fA=String(N.param);else if("time"===N.type)fA=String(N.param);else if("number"===N.type){var At=Object.assign({},cn_number,N);fA=String([String(At.nDec),At.sepComma?"0":"1",'"'+At.negStyle+'"',"null",'"'+At.currency+'"',String(At.currencyPrepend)].join(","))}else if("percent"===N.type){var rt=Object.assign({},cn_percent,N);fA=String([String(rt.nDec),rt.sepComma?"0":"1"].join(","))}}O.AA=O.AA?O.AA:{},O.AA.K={S:"JavaScript",JS:new String("".concat(X,"(").concat(fA,");"))},O.AA.F={S:"JavaScript",JS:new String("".concat(K,"(").concat(fA,");"))}}return delete O.format,O},_resolveColors:function(O){var N=this._normalizeColor(O.backgroundColor);return N&&(O.MK||(O.MK={}),O.MK.BG=N),(N=this._normalizeColor(O.borderColor))&&(O.MK||(O.MK={}),O.MK.BC=N),delete O.backgroundColor,delete O.borderColor,O},_resolveFlags:function(O){var N=0;return Object.keys(O).forEach(function(X){Mn[X]&&(N|=Mn[X],delete O[X])}),0!==N&&(O.Ff=O.Ff?O.Ff:0,O.Ff|=N),O},_resolveJustify:function(O){var N=0;return void 0!==O.align&&("number"==typeof xn[O.align]&&(N=xn[O.align]),delete O.align),0!==N&&(O.Q=N),O},_resolveFont:function(O){if(null===this._acroform.fonts[this._font.id]&&(this._acroform.fonts[this._font.id]=this._font.ref()),this._acroform.defaultFont!==this._font.name){O.DR={Font:{}};var N=O.fontSize||0;O.DR.Font[this._font.id]=this._font.ref(),O.DA=new String("/".concat(this._font.id," ").concat(N," Tf 0 g"))}return O},_resolveStrings:function(O){var N=[];function X(K){if(Array.isArray(K))for(var fA=0;fA1&&void 0!==arguments[1]?arguments[1]:{};N.name=N.name||O;var K,X={Type:"EmbeddedFile",Params:{}};if(!O)throw new Error("No src specified");if(i.isBuffer(O))K=O;else if(O instanceof ArrayBuffer)K=i.from(new Uint8Array(O));else{var fA;if(fA=/^data:(.*);base64,(.*)$/.exec(O))fA[1]&&(X.Subtype=fA[1].replace("/","#2F")),K=i.from(fA[2],"base64");else{if(!(K=e.readFileSync(O)))throw new Error("Could not read contents of file at filepath ".concat(O));var IA=e.statSync(O),rt=IA.ctime;X.Params.CreationDate=IA.birthtime,X.Params.ModDate=rt}}N.creationDate instanceof Date&&(X.Params.CreationDate=N.creationDate),N.modifiedDate instanceof Date&&(X.Params.ModDate=N.modifiedDate),N.type&&(X.Subtype=N.type.replace("/","#2F"));var Ct,ft=h.default.MD5(h.default.lib.WordArray.create(new Uint8Array(K)));X.Params.CheckSum=new String(ft),X.Params.Size=K.byteLength,this._fileRegistry||(this._fileRegistry={});var Dt=this._fileRegistry[N.name];Dt&&Tr(X,Dt)?Ct=Dt.ref:((Ct=this.ref(X)).end(K),this._fileRegistry[N.name]=S(S({},X),{},{ref:Ct}));var Ft={Type:"Filespec",F:new String(N.name),EF:{F:Ct},UF:new String(N.name)};N.description&&(Ft.Desc=new String(N.description));var Tt=this.ref(Ft);return Tt.end(),N.hidden||this.addNamedEmbeddedFile(N.name,Tt),Tt}};function Tr(mA,O){return mA.Subtype===O.Subtype&&mA.Params.CheckSum.toString()===O.Params.CheckSum.toString()&&mA.Params.Size===O.Params.Size&&mA.Params.CreationDate===O.Params.CreationDate&&mA.Params.ModDate===O.Params.ModDate}var rr=function(mA){m(N,mA);var O=F(N);function N(){var X,K=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(f(this,N),(X=O.call(this,K)).options=K,K.pdfVersion){case"1.4":X.version=1.4;break;case"1.5":X.version=1.5;break;case"1.6":X.version=1.6;break;case"1.7":case"1.7ext3":X.version=1.7;break;default:X.version=1.3}X.compress=null==X.options.compress||X.options.compress,X._pageBuffer=[],X._pageBufferStart=0,X._offsets=[],X._waiting=0,X._ended=!1,X._offset=0;var fA=X.ref({Type:"Pages",Count:0,Kids:[]}),IA=X.ref({Dests:new W});if(X._root=X.ref({Type:"Catalog",Pages:fA,Names:IA}),X.options.lang&&(X._root.data.Lang=new String(X.options.lang)),X.page=null,X.initColor(),X.initVector(),X.initFonts(K.font),X.initText(),X.initImages(),X.initOutline(),X.initMarkings(K),X.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},X.options.info)for(var At in X.options.info)X.info[At]=X.options.info[At];return X.options.displayTitle&&(X._root.data.ViewerPreferences=X.ref({DisplayDocTitle:!0})),X._id=b.generateFileID(X.info),X._security=b.create(U(X),K),X._write("%PDF-".concat(X.version)),X._write("%\xff\xff\xff\xff"),!1!==X.options.autoFirstPage&&X.addPage(),X}return w(N,[{key:"addPage",value:function(K){null==K&&(K=this.options),this.options.bufferPages||this.flushPages(),this.page=new $(this,K),this._pageBuffer.push(this.page);var fA=this._root.data.Pages.data;return fA.Kids.push(this.page.dictionary),fA.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this.emit("pageAdded"),this}},{key:"continueOnNewPage",value:function(K){var fA=this.endPageMarkings(this.page);return this.addPage(K),this.initPageMarkings(fA),this}},{key:"bufferedPageRange",value:function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}}},{key:"switchToPage",value:function(K){var fA;if(!(fA=this._pageBuffer[K-this._pageBufferStart]))throw new Error("switchToPage(".concat(K,") out of bounds, current buffer covers pages ").concat(this._pageBufferStart," to ").concat(this._pageBufferStart+this._pageBuffer.length-1));return this.page=fA}},{key:"flushPages",value:function(){var K=this._pageBuffer;this._pageBuffer=[],this._pageBufferStart+=K.length;var IA,fA=yA(K);try{for(fA.s();!(IA=fA.n()).done;){var At=IA.value;this.endPageMarkings(At),At.end()}}catch(rt){fA.e(rt)}finally{fA.f()}}},{key:"addNamedDestination",value:function(K){for(var fA=arguments.length,IA=new Array(fA>1?fA-1:0),At=1;At>R&AA]},getCombiningClass:function(vA){var nA=d.get(vA);return m.combiningClasses[nA>>L&lA]},getScript:function(vA){var nA=d.get(vA);return m.scripts[nA>>Z&pA]},getEastAsianWidth:function(vA){var nA=d.get(vA);return m.eaw[nA>>10&cA]},getNumericValue:function(vA){var nA=d.get(vA),EA=1023&nA;if(0===EA)return null;if(EA<=50)return EA-1;if(EA<480)return((EA>>4)-12)/(1+(15&EA));if(EA<768){nA=(EA>>5)-14;for(var lt=2+(31&EA);lt>0;)nA*=10,lt--;return nA}nA=(EA>>2)-191;for(var TA=1+(3&EA);TA>0;)nA*=60,TA--;return nA},isAlphabetic:uA,isDigit:QA,isPunctuation:SA,isLowerCase:bA,isUpperCase:ZA,isTitleCase:q,isWhiteSpace:J,isBaseForm:$,isMark:W});I.default=Q},4781:function(Y,I,n){"use strict";n(7042),n(6992),n(1539),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(9135);var c=n(311),o=n(1753).swap32LE;Y.exports=function(){function D(T){var F="function"==typeof T.readUInt32BE&&"function"==typeof T.slice;if(F||T instanceof Uint8Array){var R;if(F)this.highStart=T.readUInt32LE(0),this.errorValue=T.readUInt32LE(4),R=T.readUInt32LE(8),T=T.slice(12);else{var L=new DataView(T.buffer);this.highStart=L.getUint32(0,!0),this.errorValue=L.getUint32(4,!0),R=L.getUint32(8,!0),T=T.subarray(12)}T=c(T,new Uint8Array(R)),T=c(T,new Uint8Array(R)),o(T),this.data=new Uint32Array(T.buffer)}else{var Z=T;this.data=Z.data,this.highStart=Z.highStart,this.errorValue=Z.errorValue}}return D.prototype.get=function(F){return F<0||F>1114111?this.errorValue:F<55296||F>56319&&F<=65535?this.data[(this.data[F>>5]<<2)+(31&F)]:F<=65535?this.data[(this.data[2048+(F-55296>>5)]<<2)+(31&F)]:F>11)]+(F>>5&63)]<<2)+(31&F)]:this.data[this.data.length-4]},D}()},1753:function(Y,I,n){"use strict";n(6992),n(1539),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(9135);var c=18===new Uint8Array(new Uint32Array([305419896]).buffer)[0],i=function(a,g,E){var u=a[g];a[g]=a[E],a[E]=u};Y.exports={swap32LE:function(a){c&&function(a){for(var g=a.length,E=0;E/)){for(;ot=$A();)VA.childNodes.push(ot),ot.parentNode=VA,VA.textContent+=3===ot.nodeType||4===ot.nodeType?ot.nodeValue:ot.textContent;return(LA=tt.match(/^<\/([\w:.-]+)\s*>/,!0))?(LA[1]===VA.nodeName||(re('parseXml: tag not matching, opening "'+VA.nodeName+'" & closing "'+LA[1]+'"'),zA=!0),VA):(re('parseXml: tag not matching, opening "'+VA.nodeName+'" & not closing'),zA=!0,VA)}if(tt.match(/^\/>/))return VA;re('parseXml: tag could not be parsed "'+VA.nodeName+'"'),zA=!0}else{if(LA=tt.match(/^/))return new YA(null,8,LA,zA);if(LA=tt.match(/^<\?[\s\S]*?\?>/))return new YA(null,7,LA,zA);if(LA=tt.match(/^/))return new YA(null,10,LA,zA);if(LA=tt.match(/^/,!0))return new YA("#cdata-section",4,LA[1],zA);if(LA=tt.match(/^([^<]+)/,!0))return new YA("#text",3,AA(LA[1]),zA)}};PA=HA();)1!==PA.nodeType||UA?(1===PA.nodeType||3===PA.nodeType&&""!==PA.nodeValue.trim())&&re("parseXml: data after document end has been discarded"):UA=PA;return tt.matchAll()&&re("parseXml: parsing error"),UA}function AA(WA){return WA.replace(/&(?:#([0-9]+)|#[xX]([0-9A-Fa-f]+)|([0-9A-Za-z]+));/g,function(YA,tt,UA,PA){return tt?String.fromCharCode(parseInt(tt,10)):UA?String.fromCharCode(parseInt(UA,16)):PA&&C[PA]?String.fromCharCode(C[PA]):YA})}function lA(WA){var YA,tt;return WA=(WA||"").trim(),(YA=E[WA])?tt=[YA.slice(),1]:(YA=WA.match(/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)$/i))?(YA[1]=parseInt(YA[1]),YA[2]=parseInt(YA[2]),YA[3]=parseInt(YA[3]),YA[4]=parseFloat(YA[4]),YA[1]<256&&YA[2]<256&&YA[3]<256&&YA[4]<=1&&(tt=[YA.slice(1,4),YA[4]])):(YA=WA.match(/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$/i))?(YA[1]=parseInt(YA[1]),YA[2]=parseInt(YA[2]),YA[3]=parseInt(YA[3]),YA[1]<256&&YA[2]<256&&YA[3]<256&&(tt=[YA.slice(1,4),1])):(YA=WA.match(/^rgb\(\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/i))?(YA[1]=2.55*parseFloat(YA[1]),YA[2]=2.55*parseFloat(YA[2]),YA[3]=2.55*parseFloat(YA[3]),YA[1]<256&&YA[2]<256&&YA[3]<256&&(tt=[YA.slice(1,4),1])):(YA=WA.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i))?tt=[[parseInt(YA[1],16),parseInt(YA[2],16),parseInt(YA[3],16)],1]:(YA=WA.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i))&&(tt=[[17*parseInt(YA[1],16),17*parseInt(YA[2],16),17*parseInt(YA[3],16)],1]),nn?nn(tt,WA):tt}function pA(WA,YA,tt){var UA=WA[0].slice(),PA=WA[1]*YA;if(tt){for(var zA=0;zA=0;YA--)WA=cA(Gn[YA].savedMatrix,WA);return WA}function yA(){return(new qA).M(0,0).L(o.page.width,0).L(o.page.width,o.page.height).L(0,o.page.height).transform(xA(BA())).getBoundingBox()}function xA(WA){var YA=WA[0]*WA[3]-WA[1]*WA[2];return[WA[3]/YA,-WA[1]/YA,-WA[2]/YA,WA[0]/YA,(WA[2]*WA[5]-WA[3]*WA[4])/YA,(WA[1]*WA[4]-WA[0]*WA[5])/YA]}function _(WA){var YA=bA(WA[0]),tt=bA(WA[1]),UA=bA(WA[2]),PA=bA(WA[3]),zA=bA(WA[4]),HA=bA(WA[5]);if(SA(YA*PA-tt*UA,0))return[YA,tt,UA,PA,zA,HA]}function MA(WA){var YA=WA[2]||0,tt=WA[1]||0,UA=WA[0]||0;if(QA(YA,0)&&QA(tt,0))return[];if(QA(YA,0))return[-UA/tt];var PA=tt*tt-4*YA*UA;return SA(PA,0)&&PA>0?[(-tt+Math.sqrt(PA))/(2*YA),(-tt-Math.sqrt(PA))/(2*YA)]:QA(PA,0)?[-tt/(2*YA)]:[]}function uA(WA,YA){return(YA[0]||0)+(YA[1]||0)*WA+(YA[2]||0)*WA*WA+(YA[3]||0)*WA*WA*WA}function QA(WA,YA){return Math.abs(WA-YA)<1e-10}function SA(WA,YA){return Math.abs(WA-YA)>=1e-10}function bA(WA){return WA>-1e21&&WA<1e21?Math.round(1e6*WA)/1e6:0}function q(WA){for(var UA,YA=new It((WA||"").trim()),tt=[1,0,0,1,0,0];UA=YA.match(/^([A-Za-z]+)\s*[(]([^(]+)[)]/,!0);){for(var PA=UA[1],zA=[],HA=new It(UA[2].trim()),$A=void 0;$A=HA.matchNumber();)zA.push(Number($A)),HA.matchSeparator();if("matrix"===PA&&6===zA.length)tt=cA(tt,[zA[0],zA[1],zA[2],zA[3],zA[4],zA[5]]);else if("translate"===PA&&2===zA.length)tt=cA(tt,[1,0,0,1,zA[0],zA[1]]);else if("translate"===PA&&1===zA.length)tt=cA(tt,[1,0,0,1,zA[0],0]);else if("scale"===PA&&2===zA.length)tt=cA(tt,[zA[0],0,0,zA[1],0,0]);else if("scale"===PA&&1===zA.length)tt=cA(tt,[zA[0],0,0,zA[0],0,0]);else if("rotate"===PA&&3===zA.length){var LA=zA[0]*Math.PI/180;tt=cA(tt,[1,0,0,1,zA[1],zA[2]],[Math.cos(LA),Math.sin(LA),-Math.sin(LA),Math.cos(LA),0,0],[1,0,0,1,-zA[1],-zA[2]])}else if("rotate"===PA&&1===zA.length){var ot=zA[0]*Math.PI/180;tt=cA(tt,[Math.cos(ot),Math.sin(ot),-Math.sin(ot),Math.cos(ot),0,0])}else if("skewX"===PA&&1===zA.length){var VA=zA[0]*Math.PI/180;tt=cA(tt,[1,0,Math.tan(VA),1,0,0])}else{if("skewY"!==PA||1!==zA.length)return;var Qt=zA[0]*Math.PI/180;tt=cA(tt,[1,Math.tan(Qt),0,1,0,0])}YA.matchSeparator()}if(!YA.matchAll())return tt}function J(WA,YA,tt,UA,PA,zA){var HA=(WA||"").trim().match(/^(none)$|^x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?$/)||[],$A=HA[1]||HA[4]||"meet",VA=YA/UA,Qt=tt/PA,St={Min:0,Mid:.5,Max:1}[HA[2]||"Mid"]-(zA||0),Ut={Min:0,Mid:.5,Max:1}[HA[3]||"Mid"]-(zA||0);return"slice"===$A?Qt=VA=Math.max(VA,Qt):"meet"===$A&&(Qt=VA=Math.min(VA,Qt)),[VA,0,0,Qt,St*(YA-UA*VA),Ut*(tt-PA*Qt)]}function $(WA){var YA=Object.create(null);WA=(WA||"").trim().split(/;/);for(var tt=0;ttue&&(Ht=ue,ue=ce,ce=Ht),Zt>ge&&(Ht=ge,ge=Zt,Zt=Ht);for(var ve=MA(St),Ge=0;Ge=0&&ve[Ge]<=1){var Se=uA(ve[Ge],VA);Seue&&(ue=Se)}for(var xe=MA(Ut),Ne=0;Ne=0&&xe[Ne]<=1){var $e=uA(xe[Ne],Qt);$ege&&(ge=$e)}return[ce,Zt,ue,ge]},this.getPointAtLength=function(Ht){if(QA(Ht,0))return this.startPoint;if(QA(Ht,this.totalLength))return this.endPoint;if(!(Ht<0||Ht>this.totalLength))for(var ce=1;ce<=ot;ce++){var Zt=kt[ce-1],ue=kt[ce];if(Zt<=Ht&&Ht<=ue){var ge=(ce-(ue-Ht)/(ue-Zt))/ot,ve=uA(ge,VA),Ge=uA(ge,Qt),Se=uA(ge,St),xe=uA(ge,Ut);return[ve,Ge,Math.atan2(xe,Se)]}}}},JA=function(YA,tt,UA,PA){this.totalLength=Math.sqrt((UA-YA)*(UA-YA)+(PA-tt)*(PA-tt)),this.startPoint=[YA,tt,Math.atan2(PA-tt,UA-YA)],this.endPoint=[UA,PA,Math.atan2(PA-tt,UA-YA)],this.getBoundingBox=function(){return[Math.min(this.startPoint[0],this.endPoint[0]),Math.min(this.startPoint[1],this.endPoint[1]),Math.max(this.startPoint[0],this.endPoint[0]),Math.max(this.startPoint[1],this.endPoint[1])]},this.getPointAtLength=function(zA){if(zA>=0&&zA<=this.totalLength){var HA=zA/this.totalLength||0;return[this.startPoint[0]+HA*(this.endPoint[0]-this.startPoint[0]),this.startPoint[1]+HA*(this.endPoint[1]-this.startPoint[1]),this.startPoint[2]]}}},qA=function WA(){this.pathCommands=[],this.pathSegments=[],this.startPoint=null,this.endPoint=null,this.totalLength=0;var zA,HA,$A,YA=0,tt=0,UA=0,PA=0;this.move=function(LA,ot){return YA=UA=LA,tt=PA=ot,null},this.line=function(LA,ot){var VA=new JA(UA,PA,LA,ot);return UA=LA,PA=ot,VA},this.curve=function(LA,ot,VA,Qt,St,Ut){var kt=new Mt(UA,PA,LA,ot,VA,Qt,St,Ut);return UA=St,PA=Ut,kt},this.close=function(){var LA=new JA(UA,PA,YA,tt);return UA=YA,PA=tt,LA},this.addCommand=function(LA){this.pathCommands.push(LA);var ot=this[LA[0]].apply(this,LA.slice(3));ot&&(ot.hasStart=LA[1],ot.hasEnd=LA[2],this.startPoint=this.startPoint||ot.startPoint,this.endPoint=ot.endPoint,this.pathSegments.push(ot),this.totalLength+=ot.totalLength)},this.M=function(LA,ot){return this.addCommand(["move",!0,!0,LA,ot]),zA="M",this},this.m=function(LA,ot){return this.M(UA+LA,PA+ot)},this.Z=this.z=function(){return this.addCommand(["close",!0,!0]),zA="Z",this},this.L=function(LA,ot){return this.addCommand(["line",!0,!0,LA,ot]),zA="L",this},this.l=function(LA,ot){return this.L(UA+LA,PA+ot)},this.H=function(LA){return this.L(LA,PA)},this.h=function(LA){return this.L(UA+LA,PA)},this.V=function(LA){return this.L(UA,LA)},this.v=function(LA){return this.L(UA,PA+LA)},this.C=function(LA,ot,VA,Qt,St,Ut){return this.addCommand(["curve",!0,!0,LA,ot,VA,Qt,St,Ut]),zA="C",HA=VA,$A=Qt,this},this.c=function(LA,ot,VA,Qt,St,Ut){return this.C(UA+LA,PA+ot,UA+VA,PA+Qt,UA+St,PA+Ut)},this.S=function(LA,ot,VA,Qt){return this.C(UA+("C"===zA?UA-HA:0),PA+("C"===zA?PA-$A:0),LA,ot,VA,Qt)},this.s=function(LA,ot,VA,Qt){return this.C(UA+("C"===zA?UA-HA:0),PA+("C"===zA?PA-$A:0),UA+LA,PA+ot,UA+VA,PA+Qt)},this.Q=function(LA,ot,VA,Qt){return this.addCommand(["curve",!0,!0,UA+.6666666666666666*(LA-UA),PA+2/3*(ot-PA),VA+2/3*(LA-VA),Qt+2/3*(ot-Qt),VA,Qt]),zA="Q",HA=LA,$A=ot,this},this.q=function(LA,ot,VA,Qt){return this.Q(UA+LA,PA+ot,UA+VA,PA+Qt)},this.T=function(LA,ot){return this.Q(UA+("Q"===zA?UA-HA:0),PA+("Q"===zA?PA-$A:0),LA,ot)},this.t=function(LA,ot){return this.Q(UA+("Q"===zA?UA-HA:0),PA+("Q"===zA?PA-$A:0),UA+LA,PA+ot)},this.A=function(LA,ot,VA,Qt,St,Ut,kt){if(QA(LA,0)||QA(ot,0))this.addCommand(["line",!0,!0,Ut,kt]);else{VA*=Math.PI/180,LA=Math.abs(LA),ot=Math.abs(ot),Qt=1*!!Qt,St=1*!!St;var Wt=Math.cos(VA)*(UA-Ut)/2+Math.sin(VA)*(PA-kt)/2,ne=Math.cos(VA)*(PA-kt)/2-Math.sin(VA)*(UA-Ut)/2,Et=Wt*Wt/(LA*LA)+ne*ne/(ot*ot);Et>1&&(LA*=Math.sqrt(Et),ot*=Math.sqrt(Et));var Pt=Math.sqrt(Math.max(0,LA*LA*ot*ot-LA*LA*ne*ne-ot*ot*Wt*Wt)/(LA*LA*ne*ne+ot*ot*Wt*Wt)),jt=(Qt===St?-1:1)*Pt*LA*ne/ot,Ht=(Qt===St?1:-1)*Pt*ot*Wt/LA,ce=Math.cos(VA)*jt-Math.sin(VA)*Ht+(UA+Ut)/2,Zt=Math.sin(VA)*jt+Math.cos(VA)*Ht+(PA+kt)/2,ue=Math.atan2((ne-Ht)/ot,(Wt-jt)/LA),ge=Math.atan2((-ne-Ht)/ot,(-Wt-jt)/LA);0===St&&ge-ue>0?ge-=2*Math.PI:1===St&&ge-ue<0&&(ge+=2*Math.PI);for(var ve=Math.ceil(Math.abs(ge-ue)/(Math.PI/bn)),Ge=0;GeLA[2]&&(LA[2]=Qt[2]),Qt[1]LA[3]&&(LA[3]=Qt[3]);return LA[0]===1/0&&(LA[0]=0),LA[1]===1/0&&(LA[1]=0),LA[2]===-1/0&&(LA[2]=0),LA[3]===-1/0&&(LA[3]=0),LA},this.getPointAtLength=function(LA){if(LA>=0&&LA<=this.totalLength){for(var ot,VA=0;VAPA.selector.specificity||(YA[zA]=PA.css[zA],tt[zA]=PA.selector.specificity)}return YA}(YA),this.allowedChildren=[],this.attr=function(zA){if("function"==typeof YA.getAttribute)return YA.getAttribute(zA)},this.resolveUrl=function(zA){var HA=(zA||"").match(/^\s*(?:url\("(.*)#(.*)"\)|url\('(.*)#(.*)'\)|url\((.*)#(.*)\)|(.*)#(.*))\s*$/)||[],$A=HA[1]||HA[3]||HA[5]||HA[7],LA=HA[2]||HA[4]||HA[6]||HA[8];if(LA){if(!$A){var ot=l.getElementById(LA);if(ot)return-1===this.stack.indexOf(ot)?ot:void re('SVGtoPDF: loop of circular references for id "'+LA+'"')}if(Xe){var VA=Jt[$A];if(!VA){(function ZA(WA){return"object"==typeof WA&&null!==WA&&"number"==typeof WA.length})(VA=Xe($A))||(VA=[VA]);for(var Qt=0;Qt=0&&$A[3]>=0?$A:HA},this.getPercent=function(zA,HA){var $A=this.attr(zA),LA=new It(($A||"").trim()),Qt=LA.matchNumber();return!Qt||(LA.match("%")&&(Qt*=.01),LA.matchAll())?HA:Math.max(0,Math.min(1,Qt))},this.chooseValue=function(zA){for(var HA=0;HA=0&&(LA=VA);break;case"stroke-miterlimit":null!=(VA=parseFloat($A))&&VA>=1&&(LA=VA);break;case"word-spacing":case"letter-spacing":LA=this.computeLength($A,this.getViewport());break;case"stroke-dashoffset":if(null!=(LA=this.computeLength($A,this.getViewport()))&&LA<0)for(var ne=this.get("stroke-dasharray"),Et=0;Et0?HA:this.ref?this.ref.getChildren():[]},this.getPaint=function(HA,$A,LA,ot){var VA="userSpaceOnUse"!==this.attr("patternUnits"),Qt="objectBoundingBox"===this.attr("patternContentUnits"),St=this.getLength("x",VA?1:this.getParentVWidth(),0),Ut=this.getLength("y",VA?1:this.getParentVHeight(),0),kt=this.getLength("width",VA?1:this.getParentVWidth(),0),Wt=this.getLength("height",VA?1:this.getParentVHeight(),0);Qt&&!VA?(St=(St-HA[0])/(HA[2]-HA[0])||0,Ut=(Ut-HA[1])/(HA[3]-HA[1])||0,kt=kt/(HA[2]-HA[0])||0,Wt=Wt/(HA[3]-HA[1])||0):!Qt&&VA&&(St=HA[0]+St*(HA[2]-HA[0]),Ut=HA[1]+Ut*(HA[3]-HA[1]),kt*=HA[2]-HA[0],Wt*=HA[3]-HA[1]);var ne=this.getViewbox("viewBox",[0,0,kt,Wt]),Pt=cA(J((this.attr("preserveAspectRatio")||"").trim(),kt,Wt,ne[2],ne[3],0),[1,0,0,1,-ne[0],-ne[1]]),jt=q(this.attr("patternTransform"));if(Qt&&(jt=cA([HA[2]-HA[0],0,0,HA[3]-HA[1],HA[0],HA[1]],jt)),(jt=_(jt=cA(jt,[1,0,0,1,St,Ut])))&&(Pt=_(Pt))&&(kt=bA(kt))&&(Wt=bA(Wt))){var Ht=w([0,0,kt,Wt]);return o.transform.apply(o,Pt),this.drawChildren(LA,ot),Q(Ht),[m(Ht,kt,Wt,jt),$A]}return UA?[UA[0],UA[1]*$A]:void 0},this.getVWidth=function(){var HA="userSpaceOnUse"!==this.attr("patternUnits"),$A=this.getLength("width",HA?1:this.getParentVWidth(),0);return this.getViewbox("viewBox",[0,0,$A,0])[2]},this.getVHeight=function(){var HA="userSpaceOnUse"!==this.attr("patternUnits"),$A=this.getLength("height",HA?1:this.getParentVHeight(),0);return this.getViewbox("viewBox",[0,0,0,$A])[3]}},RA=function WA(YA,tt,UA){at.call(this,YA,tt),this.allowedChildren=["stop"],this.ref=function(){var HA=this.getUrl("href")||this.getUrl("xlink:href");if(HA&&HA.nodeName===YA.nodeName)return new WA(HA,tt,UA)}.call(this);var PA=this.attr;this.attr=function(HA){var $A=PA.call(this,HA);return null!=$A||"href"===HA||"xlink:href"===HA?$A:this.ref?this.ref.attr(HA):null};var zA=this.getChildren;this.getChildren=function(){var HA=zA.call(this);return HA.length>0?HA:this.ref?this.ref.getChildren():[]},this.getPaint=function(HA,$A,LA,ot){var VA=this.getChildren();if(0!==VA.length){if(1===VA.length){var Qt=VA[0],St=Qt.get("stop-color");return"none"===St?void 0:pA(St,Qt.get("stop-opacity")*$A,ot)}var ne,Et,Pt,jt,Ht,ce,Ut="userSpaceOnUse"!==this.attr("gradientUnits"),kt=q(this.attr("gradientTransform")),Wt=this.attr("spreadMethod"),Zt=0,ue=0,ge=1;if(Ut&&(kt=cA([HA[2]-HA[0],0,0,HA[3]-HA[1],HA[0],HA[1]],kt)),kt=_(kt)){if("linearGradient"===this.name)Et=this.getLength("x1",Ut?1:this.getVWidth(),0),Pt=this.getLength("x2",Ut?1:this.getVWidth(),Ut?1:this.getVWidth()),jt=this.getLength("y1",Ut?1:this.getVHeight(),0),Ht=this.getLength("y2",Ut?1:this.getVHeight(),0);else{Pt=this.getLength("cx",Ut?1:this.getVWidth(),Ut?.5:.5*this.getVWidth()),Ht=this.getLength("cy",Ut?1:this.getVHeight(),Ut?.5:.5*this.getVHeight()),ce=this.getLength("r",Ut?1:this.getViewport(),Ut?.5:.5*this.getViewport()),Et=this.getLength("fx",Ut?1:this.getVWidth(),Pt),jt=this.getLength("fy",Ut?1:this.getVHeight(),Ht),ce<0&&re("SvgElemGradient: negative r value");var ve=Math.sqrt(Math.pow(Pt-Et,2)+Math.pow(Ht-jt,2)),Ge=1;ve>ce&&(Et=Pt+(Et-Pt)*(Ge=ce/ve),jt=Ht+(jt-Ht)*Ge),ce=Math.max(ce,ve*Ge*1.000001)}if("reflect"===Wt||"repeat"===Wt){var Se=xA(kt),xe=gA([HA[0],HA[1]],Se),Ne=gA([HA[2],HA[1]],Se),$e=gA([HA[2],HA[3]],Se),yn=gA([HA[0],HA[3]],Se);"linearGradient"===this.name?(Zt=Math.max((xe[0]-Pt)*(Pt-Et)+(xe[1]-Ht)*(Ht-jt),(Ne[0]-Pt)*(Pt-Et)+(Ne[1]-Ht)*(Ht-jt),($e[0]-Pt)*(Pt-Et)+($e[1]-Ht)*(Ht-jt),(yn[0]-Pt)*(Pt-Et)+(yn[1]-Ht)*(Ht-jt))/(Math.pow(Pt-Et,2)+Math.pow(Ht-jt,2)),ue=Math.max((xe[0]-Et)*(Et-Pt)+(xe[1]-jt)*(jt-Ht),(Ne[0]-Et)*(Et-Pt)+(Ne[1]-jt)*(jt-Ht),($e[0]-Et)*(Et-Pt)+($e[1]-jt)*(jt-Ht),(yn[0]-Et)*(Et-Pt)+(yn[1]-jt)*(jt-Ht))/(Math.pow(Pt-Et,2)+Math.pow(Ht-jt,2))):Zt=Math.sqrt(Math.max(Math.pow(xe[0]-Pt,2)+Math.pow(xe[1]-Ht,2),Math.pow(Ne[0]-Pt,2)+Math.pow(Ne[1]-Ht,2),Math.pow($e[0]-Pt,2)+Math.pow($e[1]-Ht,2),Math.pow(yn[0]-Pt,2)+Math.pow(yn[1]-Ht,2)))/ce-1,Zt=Math.ceil(Zt+.5),ge=(ue=Math.ceil(ue+.5))+1+Zt}ne="linearGradient"===this.name?o.linearGradient(Et-ue*(Pt-Et),jt-ue*(Ht-jt),Pt+Zt*(Pt-Et),Ht+Zt*(Ht-jt)):o.radialGradient(Et,jt,0,Pt,Ht,ce+Zt*ce);for(var an=0;an0&&ne.stop((an+0)/ge,cn[0],cn[1]),ne.stop((an+Mn)/(Zt+ue+1),cn[0],cn[1]),qe===VA.length-1&&Mn<1&&ne.stop((an+1)/ge,cn[0],cn[1])}return ne.setTransform.apply(ne,kt),[ne,1]}return UA?[UA[0],UA[1]*$A]:void 0}}},rA=function(YA,tt){et.call(this,YA,tt),this.dashScale=1,this.getBoundingShape=function(){return this.shape},this.getTransformation=function(){return this.get("transform")},this.drawInDocument=function(UA,PA){if("hidden"!==this.get("visibility")&&this.shape){if(o.save(),this.transform(),this.clip(),UA)this.shape.insertInDocument(),R(u.white),o.fill(this.get("clip-rule"));else{var HA;this.mask()&&(HA=w(yA()));var $A=this.shape.getSubPaths(),LA=this.getFill(UA,PA),ot=this.getStroke(UA,PA),VA=this.get("stroke-width"),Qt=this.get("stroke-linecap");if(LA||ot){if(LA&&R(LA),ot){for(var St=0;St<$A.length;St++)if(QA($A[St].totalLength,0)&&("square"===Qt||"round"===Qt)&&VA>0&&$A[St].startPoint&&$A[St].startPoint.length>1){var Ut=$A[St].startPoint[0],kt=$A[St].startPoint[1];R(ot),"square"===Qt?o.rect(Ut-.5*VA,kt-.5*VA,VA,VA):"round"===Qt&&o.circle(Ut,kt,.5*VA),o.fill()}var Wt=this.get("stroke-dasharray"),ne=this.get("stroke-dashoffset");if(SA(this.dashScale,1)){for(var Et=0;Et0&&$A[Pt].insertInDocument();LA&&ot?o.fillAndStroke(this.get("fill-rule")):LA?o.fill(this.get("fill-rule")):ot&&o.stroke()}var jt=this.get("marker-start"),Ht=this.get("marker-mid"),ce=this.get("marker-end");if("none"!==jt||"none"!==Ht||"none"!==ce){var Zt=this.shape.getMarkers();if("none"!==jt&&new ct(jt,null).drawMarker(!1,PA,Zt[0],VA),"none"!==Ht)for(var ge=1;ge0&&HA>0?$A&&LA?($A=Math.min($A,.5*zA),LA=Math.min(LA,.5*HA),this.shape=(new qA).M(UA+$A,PA).L(UA+zA-$A,PA).A($A,LA,0,0,1,UA+zA,PA+LA).L(UA+zA,PA+HA-LA).A($A,LA,0,0,1,UA+zA-$A,PA+HA).L(UA+$A,PA+HA).A($A,LA,0,0,1,UA,PA+HA-LA).L(UA,PA+LA).A($A,LA,0,0,1,UA+$A,PA).Z()):this.shape=(new qA).M(UA,PA).L(UA+zA,PA).L(UA+zA,PA+HA).L(UA,PA+HA).Z():this.shape=new qA},Yt=function(YA,tt){rA.call(this,YA,tt);var UA=this.getLength("cx",this.getVWidth(),0),PA=this.getLength("cy",this.getVHeight(),0),zA=this.getLength("r",this.getViewport(),0);this.shape=zA>0?(new qA).M(UA+zA,PA).A(zA,zA,0,0,1,UA-zA,PA).A(zA,zA,0,0,1,UA+zA,PA).Z():new qA},j=function(YA,tt){rA.call(this,YA,tt);var UA=this.getLength("cx",this.getVWidth(),0),PA=this.getLength("cy",this.getVHeight(),0),zA=this.getLength("rx",this.getVWidth(),0),HA=this.getLength("ry",this.getVHeight(),0);this.shape=zA>0&&HA>0?(new qA).M(UA+zA,PA).A(zA,HA,0,0,1,UA-zA,PA).A(zA,HA,0,0,1,UA+zA,PA).Z():new qA},XA=function(YA,tt){rA.call(this,YA,tt);var UA=this.getLength("x1",this.getVWidth(),0),PA=this.getLength("y1",this.getVHeight(),0),zA=this.getLength("x2",this.getVWidth(),0),HA=this.getLength("y2",this.getVHeight(),0);this.shape=(new qA).M(UA,PA).L(zA,HA)},KA=function(YA,tt){rA.call(this,YA,tt);var UA=this.getNumberList("points");this.shape=new qA;for(var PA=0;PA0?UA:void 0,this.dashScale=void 0!==this.pathLength?this.shape.totalLength/this.pathLength:1},ct=function(YA,tt){FA.call(this,YA,tt);var UA=this.getLength("markerWidth",this.getParentVWidth(),3),PA=this.getLength("markerHeight",this.getParentVHeight(),3),zA=this.getViewbox("viewBox",[0,0,UA,PA]);this.getVWidth=function(){return zA[2]},this.getVHeight=function(){return zA[3]},this.drawMarker=function(HA,$A,LA,ot){o.save();var VA=this.attr("orient"),Qt=this.attr("markerUnits"),St="auto"===VA?LA[2]:(parseFloat(VA)||0)*Math.PI/180,Ut="userSpaceOnUse"===Qt?1:ot;o.transform(Math.cos(St)*Ut,Math.sin(St)*Ut,-Math.sin(St)*Ut,Math.cos(St)*Ut,LA[0],LA[1]);var Et,kt=this.getLength("refX",this.getVWidth(),0),Wt=this.getLength("refY",this.getVHeight(),0),ne=J(this.attr("preserveAspectRatio"),UA,PA,zA[2],zA[3],.5);"hidden"===this.get("overflow")&&o.rect(ne[0]*(zA[0]+zA[2]/2-kt)-UA/2,ne[3]*(zA[1]+zA[3]/2-Wt)-PA/2,UA,PA).clip(),o.transform.apply(o,ne),o.translate(-kt,-Wt),this.get("opacity")<1&&!HA&&(Et=w(yA())),this.drawChildren(HA,$A),Et&&(Q(Et),o.fillOpacity(this.get("opacity")),p(Et)),o.restore()}},Lt=function(YA,tt){FA.call(this,YA,tt),this.useMask=function(UA){var PA=w(yA());o.save(),"objectBoundingBox"===this.attr("clipPathUnits")&&o.transform(UA[2]-UA[0],0,0,UA[3]-UA[1],UA[0],UA[1]),this.clip(),this.drawChildren(!0,!1),o.restore(),Q(PA),S(PA,!0)}},xt=function(YA,tt){FA.call(this,YA,tt),this.useMask=function(UA){var zA,HA,$A,LA,PA=w(yA());o.save(),"userSpaceOnUse"===this.attr("maskUnits")?(zA=this.getLength("x",this.getVWidth(),-.1*(UA[2]-UA[0])+UA[0]),HA=this.getLength("y",this.getVHeight(),-.1*(UA[3]-UA[1])+UA[1]),$A=this.getLength("width",this.getVWidth(),1.2*(UA[2]-UA[0])),LA=this.getLength("height",this.getVHeight(),1.2*(UA[3]-UA[1]))):(zA=this.getLength("x",this.getVWidth(),-.1)*(UA[2]-UA[0])+UA[0],HA=this.getLength("y",this.getVHeight(),-.1)*(UA[3]-UA[1])+UA[1],$A=this.getLength("width",this.getVWidth(),1.2)*(UA[2]-UA[0]),LA=this.getLength("height",this.getVHeight(),1.2)*(UA[3]-UA[1])),o.rect(zA,HA,$A,LA).clip(),"objectBoundingBox"===this.attr("maskContentUnits")&&o.transform(UA[2]-UA[0],0,0,UA[3]-UA[1],UA[0],UA[1]),this.clip(),this.drawChildren(!1,!0),o.restore(),Q(PA),S(PA,!0)}},Rt=function(YA,tt){et.call(this,YA,tt),this.allowedChildren=["tspan","#text","#cdata-section","a"],this.isText=!0,this.getBoundingShape=function(){for(var UA=new qA,PA=0;PA Tj")}o.addContent("ET")}}}"line-through"===this.get("text-decoration")&&this.decorate(.05*this._font.size,.5*(GA(this._font.font,this._font.size)+nt(this._font.font,this._font.size)),UA,PA)},this.decorate=function(UA,PA,zA,HA){var $A=this.getFill(zA,HA),LA=this.getStroke(zA,HA);$A&&R($A),LA&&(L(LA),o.lineWidth(this.get("stroke-width")).miterLimit(this.get("stroke-miterlimit")).lineJoin(this.get("stroke-linejoin")).lineCap(this.get("stroke-linecap")).dash(this.get("stroke-dasharray"),{phase:this.get("stroke-dashoffset")}));for(var ot=0,VA=this._pos;ot0?HA:this.pathObject.totalLength,this.pathScale=this.pathObject.totalLength/this.pathLength}else if((zA=this.getUrl("href")||this.getUrl("xlink:href"))&&"path"===zA.nodeName){var $A=new jA(zA,this);this.pathObject=$A.shape.clone().transform($A.get("transform")),this.pathLength=this.chooseValue($A.pathLength,this.pathObject.totalLength),this.pathScale=this.pathObject.totalLength/this.pathLength}},te=function(YA,tt){Rt.call(this,YA,tt),this.allowedChildren=["textPath","tspan","#text","#cdata-section","a"],function(UA){var LA,ot,PA="",zA=YA.textContent,HA=[],$A=[],VA=0,Qt=0;function St(){if($A.length)for(var Et=$A[$A.length-1],Ht={startltr:0,middleltr:.5,endltr:1,startrtl:1,middlertl:.5,endrtl:0}[LA+ot]*(Et.x+Et.width-$A[0].x)||0,ce=0;ce<$A.length;ce++)$A[ce].x-=Ht;$A=[]}function Wt(Et){var Pt=Et.pathObject,jt=Et.pathLength,Ht=Et.pathScale;if(Pt)for(var ce=Et.getLength("startOffset",jt,0),Zt=0;Ztjt||ue<0)Et._pos[Zt].hidden=!0;else{var ge=Pt.getPointAtLength(ue*Ht);SA(Ht,1)&&(Et._pos[Zt].scale*=Ht,Et._pos[Zt].width*=Ht),Et._pos[Zt].x=ge[0]-.5*Et._pos[Zt].width*Math.cos(ge[2])-Et._pos[Zt].y*Math.sin(ge[2]),Et._pos[Zt].y=ge[1]-.5*Et._pos[Zt].width*Math.sin(ge[2])+Et._pos[Zt].y*Math.cos(ge[2]),Et._pos[Zt].rotate=ge[2]+Et._pos[Zt].rotate,Et._pos[Zt].continuous=!1}}else for(var ve=0;ve0&&ge<1/0)for(var ve=0;ve=2)for(var Ge=(Pt-(ue-Zt))/(Et.length-1),Se=0;Se0?p-4:p;for(D=0;D>16&255,m[d++]=w>>8&255,m[d++]=255&w;return 2===S&&(w=c[B.charCodeAt(D)]<<2|c[B.charCodeAt(D+1)]>>4,m[d++]=255&w),1===S&&(w=c[B.charCodeAt(D)]<<10|c[B.charCodeAt(D+1)]<<4|c[B.charCodeAt(D+2)]>>2,m[d++]=w>>8&255,m[d++]=255&w),m},I.fromByteArray=function f(B){for(var w,Q=B.length,p=Q%3,S=[],m=16383,d=0,v=Q-p;dv?v:d+m));return 1===p?S.push(n[(w=B[Q-1])>>2]+n[w<<4&63]+"=="):2===p&&S.push(n[(w=(B[Q-2]<<8)+B[Q-1])>>10]+n[w>>4&63]+n[w<<2&63]+"="),S.join("")};for(var n=[],c=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,h=o.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var Q=B.indexOf("=");return-1===Q&&(Q=w),[Q,Q===w?0:4-Q%4]}function C(B){return n[B>>18&63]+n[B>>12&63]+n[B>>6&63]+n[63&B]}function e(B,w,Q){for(var S=[],m=w;m0},o.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var l=this.buf_ptr_,h=this.input_.read(this.buf_,l,I);if(h<0)throw new Error("Unexpected end of input");if(h=8;)this.val_>>>=8,this.val_|=this.buf_[8191&this.pos_]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},o.prototype.readBits=function(l){32-this.bit_pos_>>this.bit_pos_&i[l];return this.bit_pos_+=l,h},Y.exports=o},7080:function(Y,I){I.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),I.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},6450:function(Y,I,n){var i=n(6154).g,o=n(6154).j,l=n(4181),h=n(5139),a=n(966).h,g=n(966).g,E=n(7080),u=n(8435),C=n(2973),v=1080,U=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),F=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),R=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),L=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function Z($){var W;return 0===$.readBits(1)?16:(W=$.readBits(3))>0?17+W:(W=$.readBits(3))>0?8+W:17}function aA($){if($.readBits(1)){var W=$.readBits(3);return 0===W?1:$.readBits(W)+(1<1&&0===EA)throw new Error("Invalid size byte");W.meta_block_length|=EA<<8*nA}}else for(nA=0;nA4&&0===GA)throw new Error("Invalid size nibble");W.meta_block_length|=GA<<4*nA}return++W.meta_block_length,!W.input_end&&!W.is_metadata&&(W.is_uncompressed=$.readBits(1)),W}function pA($,W,hA){var nA;return hA.fillBitWindow(),(nA=$[W+=hA.val_>>>hA.bit_pos_&255].bits-8)>0&&(hA.bit_pos_+=8,W+=$[W].value,W+=hA.val_>>>hA.bit_pos_&(1<>=1,++TA;for(nt=0;nt0;++nt){var FA,at=U[nt],et=0;vA.fillBitWindow(),vA.bit_pos_+=qA[et+=vA.val_>>>vA.bit_pos_&15].bits,It[at]=FA=qA[et].value,0!==FA&&(Mt-=32>>FA,++JA)}if(1!==JA&&0!==Mt)throw new Error("[ReadHuffmanCode] invalid num_codes or space");!function cA($,W,hA,vA){for(var nA=0,EA=8,GA=0,nt=0,lt=32768,TA=[],it=0;it<32;it++)TA.push(new a(0,0));for(g(TA,0,5,$,18);nA0;){var It,vt=0;if(vA.readMoreInput(),vA.fillBitWindow(),vA.bit_pos_+=TA[vt+=vA.val_>>>vA.bit_pos_&31].bits,(It=255&TA[vt].value)<16)GA=0,hA[nA++]=It,0!==It&&(EA=It,lt-=32768>>It);else{var JA,qA,Mt=It-14,at=0;if(16===It&&(at=EA),nt!==at&&(GA=0,nt=at),JA=GA,GA>0&&(GA-=2,GA<<=Mt),nA+(qA=(GA+=vA.readBits(Mt)+3)-JA)>W)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var et=0;et>>5]),this.htrees=new Uint32Array(W)}function uA($,W){var EA,GA,hA={num_htrees:null,context_map:null},nA=0;W.readMoreInput();var nt=hA.num_htrees=aA(W)+1,lt=hA.context_map=new Uint8Array($);if(nt<=1)return hA;for(W.readBits(1)&&(nA=W.readBits(4)+1),EA=[],GA=0;GA=$)throw new Error("[DecodeContextMap] i >= context_map_size");lt[GA]=0,++GA}else lt[GA]=TA-nA,++GA}return W.readBits(1)&&function _($,W){var vA,hA=new Uint8Array(256);for(vA=0;vA<256;++vA)hA[vA]=vA;for(vA=0;vA=$&&(it-=$),vA[hA]=it,nA[nt+(1&EA[lt])]=it,++EA[lt]}function SA($,W,hA,vA,nA,EA){var TA,GA=nA+1,nt=hA&nA,lt=EA.pos_&l.IBUF_MASK;if(W<8||EA.bit_pos_+(W<<3)0;)EA.readMoreInput(),vA[nt++]=EA.readBits(8),nt===GA&&($.write(vA,GA),nt=0);else{if(EA.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;EA.bit_pos_<32;)vA[nt]=EA.val_>>>EA.bit_pos_,EA.bit_pos_+=8,++nt,--W;if(lt+(TA=EA.bit_end_pos_-EA.bit_pos_>>3)>l.IBUF_MASK){for(var it=l.IBUF_MASK+1-lt,vt=0;vt=GA)for($.write(vA,GA),nt-=GA,vt=0;vt=GA;){if(EA.input_.read(vA,nt,TA=GA-nt)W.buffer.length){var re=new Uint8Array(vA+H);re.set(W.buffer),W.buffer=re}if(nA=Dn.input_end,k=Dn.is_uncompressed,Dn.is_metadata)for(bA(dt);H>0;--H)dt.readMoreInput(),dt.readBits(8);else if(0!==H){if(k){dt.bit_pos_=dt.bit_pos_+7&-8,SA(W,H,vA,it,TA,dt),vA+=H;continue}for(hA=0;hA<3;++hA)wA[hA]=aA(dt)+1,wA[hA]>=2&&(gA(wA[hA]+2,et,hA*v,dt),gA(26,FA,hA*v,dt),b[hA]=BA(FA,hA*v,dt),rA[hA]=1);for(dt.readMoreInput(),j=(1<<(Bt=dt.readBits(2)))-1,XA=(Yt=16+(dt.readBits(4)<0;){var nn,Xe,bn,Gn,Jt,bt,Xt,oe,dn,Fn,Kn,gr;for(dt.readMoreInput(),0===b[1]&&(QA(wA[1],et,1,CA,RA,rA,dt),b[1]=BA(FA,v,dt),vn=at[1].htrees[CA[1]]),--b[1],(Xe=(nn=pA(at[1].codes,vn,dt))>>6)>=2?(Xe-=2,Xt=-1):Xt=0,Gn=u.kCopyRangeLut[Xe]+(7&nn),Jt=u.kInsertLengthPrefixCode[bn=u.kInsertRangeLut[Xe]+(nn>>3&7)].offset+dt.readBits(u.kInsertLengthPrefixCode[bn].nbits),bt=u.kCopyLengthPrefixCode[Gn].offset+dt.readBits(u.kCopyLengthPrefixCode[Gn].nbits),JA=it[vA-1&TA],qA=it[vA-2&TA],dn=0;dn4?3:bt-2))]],dt))>=Yt&&(gr=(Xt-=Yt)&j,Xt=Yt+((Yn=(2+(1&(Xt>>=Bt))<<(Kn=1+(Xt>>1)))-4)+dt.readBits(Kn)<(nt=vA=h.minDictionaryWordLength&&bt<=h.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+vA+" distance: "+oe+" len: "+bt+" bytes left: "+H);var Yn=h.offsetsByLength[bt],WA=oe-nt-1,YA=h.sizeBitsByLength[bt],PA=WA>>YA;if(Yn+=(WA&(1<=vt){W.write(it,lt);for(var HA=0;HA0&&(It[3&Mt]=oe,++Mt),bt>H)throw new Error("Invalid backward reference. pos: "+vA+" distance: "+oe+" len: "+bt+" bytes left: "+H);for(dn=0;dn>=1;return(h&g-1)+g}function o(h,a,g,E,u){do{h[a+(E-=g)]=new n(u.bits,u.value)}while(E>0)}function l(h,a,g){for(var E=1<0;--U[f])o(h,a+w,Q,d,new n(255&f,65535&D[B++])),w=i(w,f);for(S=v-1,p=-1,f=g+1,Q=2;f<=c;++f,Q<<=1)for(;U[f]>0;--U[f])(w&S)!==p&&(a+=d,v+=d=1<<(m=l(U,f,g)),h[C+(p=w&S)]=new n(m+g&255,a-C-p&65535)),o(h,a+(w>>g),Q,d,new n(f-g&255,65535&D[B++])),w=i(w,f);return v}},8435:function(Y,I){function n(c,i){this.offset=c,this.nbits=i}I.kBlockLengthPrefixCode=[new n(1,2),new n(5,2),new n(9,2),new n(13,2),new n(17,3),new n(25,3),new n(33,3),new n(41,3),new n(49,4),new n(65,4),new n(81,4),new n(97,4),new n(113,5),new n(145,5),new n(177,5),new n(209,5),new n(241,6),new n(305,6),new n(369,7),new n(497,8),new n(753,9),new n(1265,10),new n(2289,11),new n(4337,12),new n(8433,13),new n(16625,24)],I.kInsertLengthPrefixCode=[new n(0,0),new n(1,0),new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,1),new n(8,1),new n(10,2),new n(14,2),new n(18,3),new n(26,3),new n(34,4),new n(50,4),new n(66,5),new n(98,5),new n(130,6),new n(194,7),new n(322,8),new n(578,9),new n(1090,10),new n(2114,12),new n(6210,14),new n(22594,24)],I.kCopyLengthPrefixCode=[new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,0),new n(7,0),new n(8,0),new n(9,0),new n(10,1),new n(12,1),new n(14,2),new n(18,2),new n(22,3),new n(30,3),new n(38,4),new n(54,4),new n(70,5),new n(102,5),new n(134,6),new n(198,7),new n(326,8),new n(582,9),new n(1094,10),new n(2118,24)],I.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],I.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},6154:function(Y,I){function n(i){this.buffer=i,this.pos=0}function c(i){this.buffer=i,this.pos=0}n.prototype.read=function(i,o,l){this.pos+l>this.buffer.length&&(l=this.buffer.length-this.pos);for(var h=0;hthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(i.subarray(0,o),this.pos),this.pos+=o,o},I.j=c},2973:function(Y,I,n){var c=n(5139),f=10,B=11;function T(L,Z,aA){this.prefix=new Uint8Array(L.length),this.transform=Z,this.suffix=new Uint8Array(aA.length);for(var AA=0;AA'),new T("",0,"\n"),new T("",3,""),new T("",0,"]"),new T("",0," for "),new T("",14,""),new T("",2,""),new T("",0," a "),new T("",0," that "),new T(" ",f,""),new T("",0,". "),new T(".",0,""),new T(" ",0,", "),new T("",15,""),new T("",0," with "),new T("",0,"'"),new T("",0," from "),new T("",0," by "),new T("",16,""),new T("",17,""),new T(" the ",0,""),new T("",4,""),new T("",0,". The "),new T("",B,""),new T("",0," on "),new T("",0," as "),new T("",0," is "),new T("",7,""),new T("",1,"ing "),new T("",0,"\n\t"),new T("",0,":"),new T(" ",0,". "),new T("",0,"ed "),new T("",20,""),new T("",18,""),new T("",6,""),new T("",0,"("),new T("",f,", "),new T("",8,""),new T("",0," at "),new T("",0,"ly "),new T(" the ",0," of "),new T("",5,""),new T("",9,""),new T(" ",f,", "),new T("",f,'"'),new T(".",0,"("),new T("",B," "),new T("",f,'">'),new T("",0,'="'),new T(" ",0,"."),new T(".com/",0,""),new T(" the ",0," of the "),new T("",f,"'"),new T("",0,". This "),new T("",0,","),new T(".",0," "),new T("",f,"("),new T("",f,"."),new T("",0," not "),new T(" ",0,'="'),new T("",0,"er "),new T(" ",B," "),new T("",0,"al "),new T(" ",B,""),new T("",0,"='"),new T("",B,'"'),new T("",f,". "),new T(" ",0,"("),new T("",0,"ful "),new T(" ",f,". "),new T("",0,"ive "),new T("",0,"less "),new T("",B,"'"),new T("",0,"est "),new T(" ",f,"."),new T("",B,'">'),new T(" ",0,"='"),new T("",f,","),new T("",0,"ize "),new T("",B,"."),new T("\xc2\xa0",0,""),new T(" ",0,","),new T("",f,'="'),new T("",B,'="'),new T("",0,"ous "),new T("",B,", "),new T("",f,"='"),new T(" ",f,","),new T(" ",B,'="'),new T(" ",B,", "),new T("",B,","),new T("",B,"("),new T("",B,". "),new T(" ",B,"."),new T("",B,"='"),new T(" ",B,". "),new T(" ",f,'="'),new T(" ",B,"='"),new T(" ",f,"='")];function R(L,Z){return L[Z]<192?(L[Z]>=97&&L[Z]<=122&&(L[Z]^=32),1):L[Z]<224?(L[Z+1]^=32,2):(L[Z+2]^=5,3)}I.kTransforms=F,I.kNumTransforms=F.length,I.transformDictionaryWord=function(L,Z,aA,AA,lA){var _,pA=F[lA].prefix,cA=F[lA].suffix,gA=F[lA].transform,BA=gA<12?0:gA-11,yA=0,xA=Z;BA>AA&&(BA=AA);for(var MA=0;MA0;){var uA=R(L,_);_+=uA,AA-=uA}for(var QA=0;QAI.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=f,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}e.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=I.UNZIP),this.mode===I.DEFLATE||this.mode===I.GZIP||this.mode===I.DEFLATERAW?h.deflateEnd(this.strm):(this.mode===I.INFLATE||this.mode===I.GUNZIP||this.mode===I.INFLATERAW||this.mode===I.UNZIP)&&a.inflateEnd(this.strm),this.mode=I.NONE,this.dictionary=null)},e.prototype.write=function(f,B,w,Q,p,S,m){return this._write(!0,f,B,w,Q,p,S,m)},e.prototype.writeSync=function(f,B,w,Q,p,S,m){return this._write(!1,f,B,w,Q,p,S,m)},e.prototype._write=function(f,B,w,Q,p,S,m,d){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==I.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===B,"must provide flush value"),this.write_in_progress=!0,B!==I.Z_NO_FLUSH&&B!==I.Z_PARTIAL_FLUSH&&B!==I.Z_SYNC_FLUSH&&B!==I.Z_FULL_FLUSH&&B!==I.Z_FINISH&&B!==I.Z_BLOCK)throw new Error("Invalid flush value");if(null==w&&(w=c.alloc(0),p=0,Q=0),this.strm.avail_in=p,this.strm.input=w,this.strm.next_in=Q,this.strm.avail_out=d,this.strm.output=S,this.strm.next_out=m,this.flush=B,!f)return this._process(),this._checkError()?this._afterSync():void 0;var v=this;return i.nextTick(function(){v._process(),v._after()}),this},e.prototype._afterSync=function(){var f=this.strm.avail_out,B=this.strm.avail_in;return this.write_in_progress=!1,[B,f]},e.prototype._process=function(){var f=null;switch(this.mode){case I.DEFLATE:case I.GZIP:case I.DEFLATERAW:this.err=h.deflate(this.strm,this.flush);break;case I.UNZIP:switch(this.strm.avail_in>0&&(f=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===f)break;if(31!==this.strm.input[f]){this.mode=I.INFLATE;break}if(this.gzip_id_bytes_read=1,f++,1===this.strm.avail_in)break;case 1:if(null===f)break;139===this.strm.input[f]?(this.gzip_id_bytes_read=2,this.mode=I.GUNZIP):this.mode=I.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case I.INFLATE:case I.GUNZIP:case I.INFLATERAW:for(this.err=a.inflate(this.strm,this.flush),this.err===I.Z_NEED_DICT&&this.dictionary&&(this.err=a.inflateSetDictionary(this.strm,this.dictionary),this.err===I.Z_OK?this.err=a.inflate(this.strm,this.flush):this.err===I.Z_DATA_ERROR&&(this.err=I.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===I.GUNZIP&&this.err===I.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=a.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},e.prototype._checkError=function(){switch(this.err){case I.Z_OK:case I.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===I.Z_FINISH)return this._error("unexpected end of file"),!1;break;case I.Z_STREAM_END:break;case I.Z_NEED_DICT:return this._error(null==this.dictionary?"Missing dictionary":"Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},e.prototype._after=function(){if(this._checkError()){var f=this.strm.avail_out,B=this.strm.avail_in;this.write_in_progress=!1,this.callback(B,f),this.pending_close&&this.close()}},e.prototype._error=function(f){this.strm.msg&&(f=this.strm.msg),this.onerror(f,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},e.prototype.init=function(f,B,w,Q,p){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(f>=8&&f<=15,"invalid windowBits"),o(B>=-1&&B<=9,"invalid compression level"),o(w>=1&&w<=9,"invalid memlevel"),o(Q===I.Z_FILTERED||Q===I.Z_HUFFMAN_ONLY||Q===I.Z_RLE||Q===I.Z_FIXED||Q===I.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(B,f,w,Q,p),this._setDictionary()},e.prototype.params=function(){throw new Error("deflateParams Not supported")},e.prototype.reset=function(){this._reset(),this._setDictionary()},e.prototype._init=function(f,B,w,Q,p){switch(this.level=f,this.windowBits=B,this.memLevel=w,this.strategy=Q,this.flush=I.Z_NO_FLUSH,this.err=I.Z_OK,(this.mode===I.GZIP||this.mode===I.GUNZIP)&&(this.windowBits+=16),this.mode===I.UNZIP&&(this.windowBits+=32),(this.mode===I.DEFLATERAW||this.mode===I.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new l,this.mode){case I.DEFLATE:case I.GZIP:case I.DEFLATERAW:this.err=h.deflateInit2(this.strm,this.level,I.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case I.INFLATE:case I.GUNZIP:case I.INFLATERAW:case I.UNZIP:this.err=a.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==I.Z_OK&&this._error("Init error"),this.dictionary=p,this.write_in_progress=!1,this.init_done=!0},e.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=I.Z_OK,this.mode){case I.DEFLATE:case I.DEFLATERAW:this.err=h.deflateSetDictionary(this.strm,this.dictionary)}this.err!==I.Z_OK&&this._error("Failed to set dictionary")}},e.prototype._reset=function(){switch(this.err=I.Z_OK,this.mode){case I.DEFLATE:case I.DEFLATERAW:case I.GZIP:this.err=h.deflateReset(this.strm);break;case I.INFLATE:case I.INFLATERAW:case I.GUNZIP:this.err=a.inflateReset(this.strm)}this.err!==I.Z_OK&&this._error("Failed to reset stream")},I.Zlib=e},2635:function(Y,I,n){"use strict";var c=n(4155),i=n(8823).Buffer,o=n(2830).Transform,l=n(4505),h=n(9539),a=n(9282).ok,g=n(8823).kMaxLength,E="Cannot create final Buffer. It would be larger than 0x"+g.toString(16)+" bytes";l.Z_MIN_WINDOWBITS=8,l.Z_MAX_WINDOWBITS=15,l.Z_DEFAULT_WINDOWBITS=15,l.Z_MIN_CHUNK=64,l.Z_MAX_CHUNK=1/0,l.Z_DEFAULT_CHUNK=16384,l.Z_MIN_MEMLEVEL=1,l.Z_MAX_MEMLEVEL=9,l.Z_DEFAULT_MEMLEVEL=8,l.Z_MIN_LEVEL=-1,l.Z_MAX_LEVEL=9,l.Z_DEFAULT_LEVEL=l.Z_DEFAULT_COMPRESSION;for(var u=Object.keys(l),C=0;C=g?MA=new RangeError(E):_=i.concat(cA,gA),cA=[],AA.close(),pA(MA,_)}AA.on("error",function yA(_){AA.removeListener("end",xA),AA.removeListener("readable",BA),pA(_)}),AA.on("end",xA),AA.end(lA),BA()}function S(AA,lA){if("string"==typeof lA&&(lA=i.from(lA)),!i.isBuffer(lA))throw new TypeError("Not a string or buffer");return AA._processChunk(lA,AA._finishFlushFlag)}function m(AA){if(!(this instanceof m))return new m(AA);L.call(this,AA,l.DEFLATE)}function d(AA){if(!(this instanceof d))return new d(AA);L.call(this,AA,l.INFLATE)}function v(AA){if(!(this instanceof v))return new v(AA);L.call(this,AA,l.GZIP)}function D(AA){if(!(this instanceof D))return new D(AA);L.call(this,AA,l.GUNZIP)}function U(AA){if(!(this instanceof U))return new U(AA);L.call(this,AA,l.DEFLATERAW)}function T(AA){if(!(this instanceof T))return new T(AA);L.call(this,AA,l.INFLATERAW)}function F(AA){if(!(this instanceof F))return new F(AA);L.call(this,AA,l.UNZIP)}function R(AA){return AA===l.Z_NO_FLUSH||AA===l.Z_PARTIAL_FLUSH||AA===l.Z_SYNC_FLUSH||AA===l.Z_FULL_FLUSH||AA===l.Z_FINISH||AA===l.Z_BLOCK}function L(AA,lA){var pA=this;if(this._opts=AA=AA||{},this._chunkSize=AA.chunkSize||I.Z_DEFAULT_CHUNK,o.call(this,AA),AA.flush&&!R(AA.flush))throw new Error("Invalid flush flag: "+AA.flush);if(AA.finishFlush&&!R(AA.finishFlush))throw new Error("Invalid flush flag: "+AA.finishFlush);if(this._flushFlag=AA.flush||l.Z_NO_FLUSH,this._finishFlushFlag=void 0!==AA.finishFlush?AA.finishFlush:l.Z_FINISH,AA.chunkSize&&(AA.chunkSizeI.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+AA.chunkSize);if(AA.windowBits&&(AA.windowBitsI.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+AA.windowBits);if(AA.level&&(AA.levelI.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+AA.level);if(AA.memLevel&&(AA.memLevelI.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+AA.memLevel);if(AA.strategy&&AA.strategy!=I.Z_FILTERED&&AA.strategy!=I.Z_HUFFMAN_ONLY&&AA.strategy!=I.Z_RLE&&AA.strategy!=I.Z_FIXED&&AA.strategy!=I.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+AA.strategy);if(AA.dictionary&&!i.isBuffer(AA.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new l.Zlib(lA);var cA=this;this._hadError=!1,this._handle.onerror=function(yA,xA){Z(cA),cA._hadError=!0;var _=new Error(yA);_.errno=xA,_.code=I.codes[xA],cA.emit("error",_)};var gA=I.Z_DEFAULT_COMPRESSION;"number"==typeof AA.level&&(gA=AA.level);var BA=I.Z_DEFAULT_STRATEGY;"number"==typeof AA.strategy&&(BA=AA.strategy),this._handle.init(AA.windowBits||I.Z_DEFAULT_WINDOWBITS,gA,AA.memLevel||I.Z_DEFAULT_MEMLEVEL,BA,AA.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=gA,this._strategy=BA,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!pA._handle},configurable:!0,enumerable:!0})}function Z(AA,lA){lA&&c.nextTick(lA),AA._handle&&(AA._handle.close(),AA._handle=null)}function aA(AA){AA.emit("close")}Object.defineProperty(I,"codes",{enumerable:!0,value:Object.freeze(f),writable:!1}),I.Deflate=m,I.Inflate=d,I.Gzip=v,I.Gunzip=D,I.DeflateRaw=U,I.InflateRaw=T,I.Unzip=F,I.createDeflate=function(AA){return new m(AA)},I.createInflate=function(AA){return new d(AA)},I.createDeflateRaw=function(AA){return new U(AA)},I.createInflateRaw=function(AA){return new T(AA)},I.createGzip=function(AA){return new v(AA)},I.createGunzip=function(AA){return new D(AA)},I.createUnzip=function(AA){return new F(AA)},I.deflate=function(AA,lA,pA){return"function"==typeof lA&&(pA=lA,lA={}),p(new m(lA),AA,pA)},I.deflateSync=function(AA,lA){return S(new m(lA),AA)},I.gzip=function(AA,lA,pA){return"function"==typeof lA&&(pA=lA,lA={}),p(new v(lA),AA,pA)},I.gzipSync=function(AA,lA){return S(new v(lA),AA)},I.deflateRaw=function(AA,lA,pA){return"function"==typeof lA&&(pA=lA,lA={}),p(new U(lA),AA,pA)},I.deflateRawSync=function(AA,lA){return S(new U(lA),AA)},I.unzip=function(AA,lA,pA){return"function"==typeof lA&&(pA=lA,lA={}),p(new F(lA),AA,pA)},I.unzipSync=function(AA,lA){return S(new F(lA),AA)},I.inflate=function(AA,lA,pA){return"function"==typeof lA&&(pA=lA,lA={}),p(new d(lA),AA,pA)},I.inflateSync=function(AA,lA){return S(new d(lA),AA)},I.gunzip=function(AA,lA,pA){return"function"==typeof lA&&(pA=lA,lA={}),p(new D(lA),AA,pA)},I.gunzipSync=function(AA,lA){return S(new D(lA),AA)},I.inflateRaw=function(AA,lA,pA){return"function"==typeof lA&&(pA=lA,lA={}),p(new T(lA),AA,pA)},I.inflateRawSync=function(AA,lA){return S(new T(lA),AA)},h.inherits(L,o),L.prototype.params=function(AA,lA,pA){if(AAI.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+AA);if(lA!=I.Z_FILTERED&&lA!=I.Z_HUFFMAN_ONLY&&lA!=I.Z_RLE&&lA!=I.Z_FIXED&&lA!=I.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+lA);if(this._level!==AA||this._strategy!==lA){var cA=this;this.flush(l.Z_SYNC_FLUSH,function(){a(cA._handle,"zlib binding closed"),cA._handle.params(AA,lA),cA._hadError||(cA._level=AA,cA._strategy=lA,pA&&pA())})}else c.nextTick(pA)},L.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},L.prototype._flush=function(AA){this._transform(i.alloc(0),"",AA)},L.prototype.flush=function(AA,lA){var pA=this,cA=this._writableState;("function"==typeof AA||void 0===AA&&!lA)&&(lA=AA,AA=l.Z_FULL_FLUSH),cA.ended?lA&&c.nextTick(lA):cA.ending?lA&&this.once("end",lA):cA.needDrain?lA&&this.once("drain",function(){return pA.flush(AA,lA)}):(this._flushFlag=AA,this.write(i.alloc(0),"",lA))},L.prototype.close=function(AA){Z(this,AA),c.nextTick(aA,this)},L.prototype._transform=function(AA,lA,pA){var cA,gA=this._writableState,yA=(gA.ending||gA.ended)&&(!AA||gA.length===AA.length);return null===AA||i.isBuffer(AA)?this._handle?(yA?cA=this._finishFlushFlag:(cA=this._flushFlag,AA.length>=gA.length&&(this._flushFlag=this._opts.flush||l.Z_NO_FLUSH)),void this._processChunk(AA,cA,pA)):pA(new Error("zlib binding closed")):pA(new Error("invalid input"))},L.prototype._processChunk=function(AA,lA,pA){var cA=AA&&AA.length,gA=this._chunkSize-this._offset,BA=0,yA=this,xA="function"==typeof pA;if(!xA){var uA,_=[],MA=0;this.on("error",function(q){uA=q}),a(this._handle,"zlib binding closed");do{var QA=this._handle.writeSync(lA,AA,BA,cA,this._buffer,this._offset,gA)}while(!this._hadError&&ZA(QA[0],QA[1]));if(this._hadError)throw uA;if(MA>=g)throw Z(this),new RangeError(E);var SA=i.concat(_,MA);return Z(this),SA}a(this._handle,"zlib binding closed");var bA=this._handle.write(lA,AA,BA,cA,this._buffer,this._offset,gA);function ZA(q,J){if(this&&(this.buffer=null,this.callback=null),!yA._hadError){var $=gA-J;if(a($>=0,"have should not go down"),$>0){var W=yA._buffer.slice(yA._offset,yA._offset+$);yA._offset+=$,xA?yA.push(W):(_.push(W),MA+=W.length)}if((0===J||yA._offset>=yA._chunkSize)&&(gA=yA._chunkSize,yA._offset=0,yA._buffer=i.allocUnsafe(yA._chunkSize)),0===J){if(BA+=cA-q,cA=q,!xA)return!0;var hA=yA._handle.write(lA,AA,BA,cA,yA._buffer,yA._offset,yA._chunkSize);return hA.callback=ZA,void(hA.buffer=AA)}if(!xA)return!1;pA()}}bA.buffer=AA,bA.callback=ZA},h.inherits(m,L),h.inherits(d,L),h.inherits(v,L),h.inherits(D,L),h.inherits(U,L),h.inherits(T,L),h.inherits(F,L)},1924:function(Y,I,n){"use strict";var c=n(210),i=n(5559),o=i(c("String.prototype.indexOf"));Y.exports=function(h,a){var g=c(h,!!a);return"function"==typeof g&&o(h,".prototype.")>-1?i(g):g}},5559:function(Y,I,n){"use strict";var c=n(8612),i=n(210),o=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),h=i("%Reflect.apply%",!0)||c.call(l,o),a=i("%Object.getOwnPropertyDescriptor%",!0),g=i("%Object.defineProperty%",!0),E=i("%Math.max%");if(g)try{g({},"a",{value:1})}catch(C){g=null}Y.exports=function(e){var f=h(c,l,arguments);return a&&g&&a(f,"length").configurable&&g(f,"length",{value:1+E(0,e.length-(arguments.length-1))}),f};var u=function(){return h(c,o,arguments)};g?g(Y.exports,"apply",{value:u}):Y.exports.apply=u},6313:function(Y,I,n){var c=n(8823).Buffer,i=function(){"use strict";function o(u,C,e,f){"object"==typeof C&&(e=C.depth,f=C.prototype,C=C.circular);var w=[],Q=[],p=void 0!==c;return void 0===C&&(C=!0),void 0===e&&(e=1/0),function S(m,d){if(null===m)return null;if(0==d)return m;var v,D;if("object"!=typeof m)return m;if(o.__isArray(m))v=[];else if(o.__isRegExp(m))v=new RegExp(m.source,E(m)),m.lastIndex&&(v.lastIndex=m.lastIndex);else if(o.__isDate(m))v=new Date(m.getTime());else{if(p&&c.isBuffer(m))return v=c.allocUnsafe?c.allocUnsafe(m.length):new c(m.length),m.copy(v),v;void 0===f?(D=Object.getPrototypeOf(m),v=Object.create(D)):(v=Object.create(f),D=f)}if(C){var U=w.indexOf(m);if(-1!=U)return Q[U];w.push(m),Q.push(v)}for(var T in m){var F;D&&(F=Object.getOwnPropertyDescriptor(D,T)),(!F||null!=F.set)&&(v[T]=S(m[T],d-1))}return v}(u,e)}function l(u){return Object.prototype.toString.call(u)}function E(u){var C="";return u.global&&(C+="g"),u.ignoreCase&&(C+="i"),u.multiline&&(C+="m"),C}return o.clonePrototype=function(C){if(null===C)return null;var e=function(){};return e.prototype=C,new e},o.__objToStr=l,o.__isDate=function h(u){return"object"==typeof u&&"[object Date]"===l(u)},o.__isArray=function a(u){return"object"==typeof u&&"[object Array]"===l(u)},o.__isRegExp=function g(u){return"object"==typeof u&&"[object RegExp]"===l(u)},o.__getRegExpFlags=E,o}();Y.exports&&(Y.exports=i)},4667:function(Y,I,n){n(2479);var c=n(857);Y.exports=c.Object.values},7633:function(Y,I,n){n(9170),n(6992),n(1539),n(8674),n(7922),n(4668),n(7727),n(8783);var c=n(857);Y.exports=c.Promise},3867:function(Y,I,n){var c=n(1150);n(8628),n(7314),n(7479),n(6290),Y.exports=c},9662:function(Y,I,n){var c=n(7854),i=n(614),o=n(6330),l=c.TypeError;Y.exports=function(h){if(i(h))return h;throw l(o(h)+" is not a function")}},9483:function(Y,I,n){var c=n(7854),i=n(4411),o=n(6330),l=c.TypeError;Y.exports=function(h){if(i(h))return h;throw l(o(h)+" is not a constructor")}},6077:function(Y,I,n){var c=n(7854),i=n(614),o=c.String,l=c.TypeError;Y.exports=function(h){if("object"==typeof h||i(h))return h;throw l("Can't set "+o(h)+" as a prototype")}},1223:function(Y,I,n){var c=n(5112),i=n(30),o=n(3070),l=c("unscopables"),h=Array.prototype;null==h[l]&&o.f(h,l,{configurable:!0,value:i(null)}),Y.exports=function(a){h[l][a]=!0}},1530:function(Y,I,n){"use strict";var c=n(8710).charAt;Y.exports=function(i,o,l){return o+(l?c(i,o).length:1)}},5787:function(Y,I,n){var c=n(7854),i=n(7976),o=c.TypeError;Y.exports=function(l,h){if(i(h,l))return l;throw o("Incorrect invocation")}},9670:function(Y,I,n){var c=n(7854),i=n(111),o=c.String,l=c.TypeError;Y.exports=function(h){if(i(h))return h;throw l(o(h)+" is not an object")}},1048:function(Y,I,n){"use strict";var c=n(7908),i=n(1400),o=n(6244),l=Math.min;Y.exports=[].copyWithin||function(a,g){var E=c(this),u=o(E),C=i(a,u),e=i(g,u),f=arguments.length>2?arguments[2]:void 0,B=l((void 0===f?u:i(f,u))-e,u-C),w=1;for(e0;)e in E?E[C]=E[e]:delete E[C],C+=w,e+=w;return E}},1285:function(Y,I,n){"use strict";var c=n(7908),i=n(1400),o=n(6244);Y.exports=function(h){for(var a=c(this),g=o(a),E=arguments.length,u=i(E>1?arguments[1]:void 0,g),C=E>2?arguments[2]:void 0,e=void 0===C?g:i(C,g);e>u;)a[u++]=h;return a}},8533:function(Y,I,n){"use strict";var c=n(2092).forEach,o=n(9341)("forEach");Y.exports=o?[].forEach:function(h){return c(this,h,arguments.length>1?arguments[1]:void 0)}},7745:function(Y){Y.exports=function(I,n){for(var c=0,i=n.length,o=new I(i);i>c;)o[c]=n[c++];return o}},8457:function(Y,I,n){"use strict";var c=n(7854),i=n(9974),o=n(6916),l=n(7908),h=n(3411),a=n(7659),g=n(4411),E=n(6244),u=n(6135),C=n(8554),e=n(1246),f=c.Array;Y.exports=function(w){var Q=l(w),p=g(this),S=arguments.length,m=S>1?arguments[1]:void 0,d=void 0!==m;d&&(m=i(m,S>2?arguments[2]:void 0));var U,T,F,R,L,Z,v=e(Q),D=0;if(!v||this==f&&a(v))for(U=E(Q),T=p?new this(U):f(U);U>D;D++)Z=d?m(Q[D],D):Q[D],u(T,D,Z);else for(L=(R=C(Q,v)).next,T=p?new this:[];!(F=o(L,R)).done;D++)Z=d?h(R,m,[F.value,D],!0):F.value,u(T,D,Z);return T.length=D,T}},1318:function(Y,I,n){var c=n(5656),i=n(1400),o=n(6244),l=function(h){return function(a,g,E){var f,u=c(a),C=o(u),e=i(E,C);if(h&&g!=g){for(;C>e;)if((f=u[e++])!=f)return!0}else for(;C>e;e++)if((h||e in u)&&u[e]===g)return h||e||0;return!h&&-1}};Y.exports={includes:l(!0),indexOf:l(!1)}},2092:function(Y,I,n){var c=n(9974),i=n(1702),o=n(8361),l=n(7908),h=n(6244),a=n(5417),g=i([].push),E=function(u){var C=1==u,e=2==u,f=3==u,B=4==u,w=6==u,Q=7==u,p=5==u||w;return function(S,m,d,v){for(var aA,AA,D=l(S),U=o(D),T=c(m,d),F=h(U),R=0,L=v||a,Z=C?L(S,F):e||Q?L(S,0):void 0;F>R;R++)if((p||R in U)&&(AA=T(aA=U[R],R,D),u))if(C)Z[R]=AA;else if(AA)switch(u){case 3:return!0;case 5:return aA;case 6:return R;case 2:g(Z,aA)}else switch(u){case 4:return!1;case 7:g(Z,aA)}return w?-1:f||B?B:Z}};Y.exports={forEach:E(0),map:E(1),filter:E(2),some:E(3),every:E(4),find:E(5),findIndex:E(6),filterReject:E(7)}},6583:function(Y,I,n){"use strict";var c=n(2104),i=n(5656),o=n(9303),l=n(6244),h=n(9341),a=Math.min,g=[].lastIndexOf,E=!!g&&1/[1].lastIndexOf(1,-0)<0,u=h("lastIndexOf");Y.exports=E||!u?function(f){if(E)return c(g,this,arguments)||0;var B=i(this),w=l(B),Q=w-1;for(arguments.length>1&&(Q=a(Q,o(arguments[1]))),Q<0&&(Q=w+Q);Q>=0;Q--)if(Q in B&&B[Q]===f)return Q||0;return-1}:g},1194:function(Y,I,n){var c=n(7293),i=n(5112),o=n(7392),l=i("species");Y.exports=function(h){return o>=51||!c(function(){var a=[];return(a.constructor={})[l]=function(){return{foo:1}},1!==a[h](Boolean).foo})}},9341:function(Y,I,n){"use strict";var c=n(7293);Y.exports=function(i,o){var l=[][i];return!!l&&c(function(){l.call(null,o||function(){throw 1},1)})}},3671:function(Y,I,n){var c=n(7854),i=n(9662),o=n(7908),l=n(8361),h=n(6244),a=c.TypeError,g=function(E){return function(u,C,e,f){i(C);var B=o(u),w=l(B),Q=h(B),p=E?Q-1:0,S=E?-1:1;if(e<2)for(;;){if(p in w){f=w[p],p+=S;break}if(p+=S,E?p<0:Q<=p)throw a("Reduce of empty array with no initial value")}for(;E?p>=0:Q>p;p+=S)p in w&&(f=C(f,w[p],p,B));return f}};Y.exports={left:g(!1),right:g(!0)}},206:function(Y,I,n){var c=n(1702);Y.exports=c([].slice)},4362:function(Y,I,n){var c=n(206),i=Math.floor,o=function(a,g){var E=a.length,u=i(E/2);return E<8?l(a,g):h(a,o(c(a,0,u),g),o(c(a,u),g),g)},l=function(a,g){for(var C,e,E=a.length,u=1;u0;)a[e]=a[--e];e!==u++&&(a[e]=C)}return a},h=function(a,g,E,u){for(var C=g.length,e=E.length,f=0,B=0;f1?arguments[1]:void 0);Z=Z?Z.next:R.first;)for(L(Z.value,Z.key,this);Z&&Z.removed;)Z=Z.previous},has:function(F){return!!U(this,F)}}),o(d,p?{get:function(F){var R=U(this,F);return R&&R.value},set:function(F,R){return D(this,0===F?0:F,R)}}:{add:function(F){return D(this,F=0===F?0:F,F)}}),u&&c(d,"size",{get:function(){return v(this).size}}),m},setStrong:function(w,Q,p){var S=Q+" Iterator",m=B(Q),d=B(S);g(w,Q,function(v,D){f(this,{type:S,target:v,state:m(v),kind:D,last:void 0})},function(){for(var v=d(this),D=v.kind,U=v.last;U&&U.removed;)U=U.previous;return v.target&&(v.last=U=U?U.next:v.state.first)?"keys"==D?{value:U.key,done:!1}:"values"==D?{value:U.value,done:!1}:{value:[U.key,U.value],done:!1}:(v.target=void 0,{value:void 0,done:!0})},p?"entries":"values",!p,!0),E(Q)}}},7710:function(Y,I,n){"use strict";var c=n(2109),i=n(7854),o=n(1702),l=n(4705),h=n(1320),a=n(2423),g=n(408),E=n(5787),u=n(614),C=n(111),e=n(7293),f=n(7072),B=n(8003),w=n(9587);Y.exports=function(Q,p,S){var m=-1!==Q.indexOf("Map"),d=-1!==Q.indexOf("Weak"),v=m?"set":"add",D=i[Q],U=D&&D.prototype,T=D,F={},R=function(cA){var gA=o(U[cA]);h(U,cA,"add"==cA?function(yA){return gA(this,0===yA?0:yA),this}:"delete"==cA?function(BA){return!(d&&!C(BA))&&gA(this,0===BA?0:BA)}:"get"==cA?function(yA){return d&&!C(yA)?void 0:gA(this,0===yA?0:yA)}:"has"==cA?function(yA){return!(d&&!C(yA))&&gA(this,0===yA?0:yA)}:function(yA,xA){return gA(this,0===yA?0:yA,xA),this})};if(l(Q,!u(D)||!(d||U.forEach&&!e(function(){(new D).entries().next()}))))T=S.getConstructor(p,Q,m,v),a.enable();else if(l(Q,!0)){var Z=new T,aA=Z[v](d?{}:-0,1)!=Z,AA=e(function(){Z.has(1)}),lA=f(function(cA){new D(cA)}),pA=!d&&e(function(){for(var cA=new D,gA=5;gA--;)cA[v](gA,gA);return!cA.has(-0)});lA||((T=p(function(cA,gA){E(cA,U);var BA=w(new D,cA,T);return null!=gA&&g(gA,BA[v],{that:BA,AS_ENTRIES:m}),BA})).prototype=U,U.constructor=T),(AA||pA)&&(R("delete"),R("has"),m&&R("get")),(pA||aA)&&R(v),d&&U.clear&&delete U.clear}return F[Q]=T,c({global:!0,forced:T!=D},F),B(T,Q),d||S.setStrong(T,Q,m),T}},9920:function(Y,I,n){var c=n(2597),i=n(3887),o=n(1236),l=n(3070);Y.exports=function(h,a){for(var g=i(a),E=l.f,u=o.f,C=0;C"+C+""}},4994:function(Y,I,n){"use strict";var c=n(3383).IteratorPrototype,i=n(30),o=n(9114),l=n(8003),h=n(7497),a=function(){return this};Y.exports=function(g,E,u){var C=E+" Iterator";return g.prototype=i(c,{next:o(1,u)}),l(g,C,!1,!0),h[C]=a,g}},8880:function(Y,I,n){var c=n(9781),i=n(3070),o=n(9114);Y.exports=c?function(l,h,a){return i.f(l,h,o(1,a))}:function(l,h,a){return l[h]=a,l}},9114:function(Y){Y.exports=function(I,n){return{enumerable:!(1&I),configurable:!(2&I),writable:!(4&I),value:n}}},6135:function(Y,I,n){"use strict";var c=n(4948),i=n(3070),o=n(9114);Y.exports=function(l,h,a){var g=c(h);g in l?i.f(l,g,o(0,a)):l[g]=a}},8709:function(Y,I,n){"use strict";var c=n(7854),i=n(9670),o=n(2140),l=c.TypeError;Y.exports=function(h){if(i(this),"string"===h||"default"===h)h="string";else if("number"!==h)throw l("Incorrect hint");return o(this,h)}},654:function(Y,I,n){"use strict";var c=n(2109),i=n(6916),o=n(1913),l=n(6530),h=n(614),a=n(4994),g=n(9518),E=n(7674),u=n(8003),C=n(8880),e=n(1320),f=n(5112),B=n(7497),w=n(3383),Q=l.PROPER,p=l.CONFIGURABLE,S=w.IteratorPrototype,m=w.BUGGY_SAFARI_ITERATORS,d=f("iterator"),v="keys",D="values",U="entries",T=function(){return this};Y.exports=function(F,R,L,Z,aA,AA,lA){a(L,R,Z);var MA,uA,QA,pA=function(SA){if(SA===aA&&xA)return xA;if(!m&&SA in BA)return BA[SA];switch(SA){case v:case D:case U:return function(){return new L(this,SA)}}return function(){return new L(this)}},cA=R+" Iterator",gA=!1,BA=F.prototype,yA=BA[d]||BA["@@iterator"]||aA&&BA[aA],xA=!m&&yA||pA(aA),_="Array"==R&&BA.entries||yA;if(_&&(MA=g(_.call(new F)))!==Object.prototype&&MA.next&&(!o&&g(MA)!==S&&(E?E(MA,S):h(MA[d])||e(MA,d,T)),u(MA,cA,!0,!0),o&&(B[cA]=T)),Q&&aA==D&&yA&&yA.name!==D&&(!o&&p?C(BA,"name",D):(gA=!0,xA=function(){return i(yA,this)})),aA)if(uA={values:pA(D),keys:AA?xA:pA(v),entries:pA(U)},lA)for(QA in uA)(m||gA||!(QA in BA))&&e(BA,QA,uA[QA]);else c({target:R,proto:!0,forced:m||gA},uA);return(!o||lA)&&BA[d]!==xA&&e(BA,d,xA,{name:aA}),B[R]=xA,uA}},7235:function(Y,I,n){var c=n(857),i=n(2597),o=n(6061),l=n(3070).f;Y.exports=function(h){var a=c.Symbol||(c.Symbol={});i(a,h)||l(a,h,{value:o.f(h)})}},9781:function(Y,I,n){var c=n(7293);Y.exports=!c(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},317:function(Y,I,n){var c=n(7854),i=n(111),o=c.document,l=i(o)&&i(o.createElement);Y.exports=function(h){return l?o.createElement(h):{}}},8324:function(Y){Y.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:function(Y,I,n){var i=n(317)("span").classList,o=i&&i.constructor&&i.constructor.prototype;Y.exports=o===Object.prototype?void 0:o},8886:function(Y,I,n){var i=n(8113).match(/firefox\/(\d+)/i);Y.exports=!!i&&+i[1]},7871:function(Y){Y.exports="object"==typeof window},256:function(Y,I,n){var c=n(8113);Y.exports=/MSIE|Trident/.test(c)},1528:function(Y,I,n){var c=n(8113),i=n(7854);Y.exports=/ipad|iphone|ipod/i.test(c)&&void 0!==i.Pebble},6833:function(Y,I,n){var c=n(8113);Y.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(c)},5268:function(Y,I,n){var c=n(4326),i=n(7854);Y.exports="process"==c(i.process)},1036:function(Y,I,n){var c=n(8113);Y.exports=/web0s(?!.*chrome)/i.test(c)},8113:function(Y,I,n){var c=n(5005);Y.exports=c("navigator","userAgent")||""},7392:function(Y,I,n){var g,E,c=n(7854),i=n(8113),o=c.process,l=c.Deno,h=o&&o.versions||l&&l.version,a=h&&h.v8;a&&(E=(g=a.split("."))[0]>0&&g[0]<4?1:+(g[0]+g[1])),!E&&i&&(!(g=i.match(/Edge\/(\d+)/))||g[1]>=74)&&(g=i.match(/Chrome\/(\d+)/))&&(E=+g[1]),Y.exports=E},8008:function(Y,I,n){var i=n(8113).match(/AppleWebKit\/(\d+)\./);Y.exports=!!i&&+i[1]},748:function(Y){Y.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2914:function(Y,I,n){var c=n(7293),i=n(9114);Y.exports=!c(function(){var o=Error("a");return!("stack"in o)||(Object.defineProperty(o,"stack",i(1,7)),7!==o.stack)})},2109:function(Y,I,n){var c=n(7854),i=n(1236).f,o=n(8880),l=n(1320),h=n(3505),a=n(9920),g=n(4705);Y.exports=function(E,u){var w,Q,p,S,m,C=E.target,e=E.global,f=E.stat;if(w=e?c:f?c[C]||h(C,{}):(c[C]||{}).prototype)for(Q in u){if(S=u[Q],p=E.noTargetGet?(m=i(w,Q))&&m.value:w[Q],!g(e?Q:C+(f?".":"#")+Q,E.forced)&&void 0!==p){if(typeof S==typeof p)continue;a(S,p)}(E.sham||p&&p.sham)&&o(S,"sham",!0),l(w,Q,S,E)}}},7293:function(Y){Y.exports=function(I){try{return!!I()}catch(n){return!0}}},7007:function(Y,I,n){"use strict";n(4916);var c=n(1702),i=n(1320),o=n(2261),l=n(7293),h=n(5112),a=n(8880),g=h("species"),E=RegExp.prototype;Y.exports=function(u,C,e,f){var B=h(u),w=!l(function(){var m={};return m[B]=function(){return 7},7!=""[u](m)}),Q=w&&!l(function(){var m=!1,d=/a/;return"split"===u&&((d={}).constructor={},d.constructor[g]=function(){return d},d.flags="",d[B]=/./[B]),d.exec=function(){return m=!0,null},d[B](""),!m});if(!w||!Q||e){var p=c(/./[B]),S=C(B,""[u],function(m,d,v,D,U){var T=c(m),F=d.exec;return F===o||F===E.exec?w&&!U?{done:!0,value:p(d,v,D)}:{done:!0,value:T(v,d,D)}:{done:!1}});i(String.prototype,u,S[0]),i(E,B,S[1])}f&&a(E[B],"sham",!0)}},6677:function(Y,I,n){var c=n(7293);Y.exports=!c(function(){return Object.isExtensible(Object.preventExtensions({}))})},2104:function(Y){var I=Function.prototype,n=I.apply,i=I.call;Y.exports="object"==typeof Reflect&&Reflect.apply||(I.bind?i.bind(n):function(){return i.apply(n,arguments)})},9974:function(Y,I,n){var c=n(1702),i=n(9662),o=c(c.bind);Y.exports=function(l,h){return i(l),void 0===h?l:o?o(l,h):function(){return l.apply(h,arguments)}}},7065:function(Y,I,n){"use strict";var c=n(7854),i=n(1702),o=n(9662),l=n(111),h=n(2597),a=n(206),g=c.Function,E=i([].concat),u=i([].join),C={},e=function(f,B,w){if(!h(C,B)){for(var Q=[],p=0;p]*>)/g,E=/\$([$&'`]|\d{1,2})/g;Y.exports=function(u,C,e,f,B,w){var Q=e+u.length,p=f.length,S=E;return void 0!==B&&(B=i(B),S=g),h(w,S,function(m,d){var v;switch(l(d,0)){case"$":return"$";case"&":return u;case"`":return a(C,0,e);case"'":return a(C,Q);case"<":v=B[a(d,1,-1)];break;default:var D=+d;if(0===D)return m;if(D>p){var U=o(D/10);return 0===U?m:U<=p?void 0===f[U-1]?l(d,1):f[U-1]+l(d,1):m}v=f[D-1]}return void 0===v?"":v})}},7854:function(Y,I,n){var c=function(i){return i&&i.Math==Math&&i};Y.exports=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:function(Y,I,n){var c=n(1702),i=n(7908),o=c({}.hasOwnProperty);Y.exports=Object.hasOwn||function(h,a){return o(i(h),a)}},3501:function(Y){Y.exports={}},842:function(Y,I,n){var c=n(7854);Y.exports=function(i,o){var l=c.console;l&&l.error&&(1==arguments.length?l.error(i):l.error(i,o))}},490:function(Y,I,n){var c=n(5005);Y.exports=c("document","documentElement")},4664:function(Y,I,n){var c=n(9781),i=n(7293),o=n(317);Y.exports=!c&&!i(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},1179:function(Y,I,n){var i=n(7854).Array,o=Math.abs,l=Math.pow,h=Math.floor,a=Math.log,g=Math.LN2;Y.exports={pack:function(C,e,f){var v,D,U,B=i(f),w=8*f-e-1,Q=(1<>1,S=23===e?l(2,-24)-l(2,-77):0,m=C<0||0===C&&1/C<0?1:0,d=0;for((C=o(C))!=C||C===1/0?(D=C!=C?1:0,v=Q):(v=h(a(C)/g),C*(U=l(2,-v))<1&&(v--,U*=2),(C+=v+p>=1?S/U:S*l(2,1-p))*U>=2&&(v++,U/=2),v+p>=Q?(D=0,v=Q):v+p>=1?(D=(C*U-1)*l(2,e),v+=p):(D=C*l(2,p-1)*l(2,e),v=0));e>=8;B[d++]=255&D,D/=256,e-=8);for(v=v<0;B[d++]=255&v,v/=256,w-=8);return B[--d]|=128*m,B},unpack:function(C,e){var v,f=C.length,B=8*f-e-1,w=(1<>1,p=B-7,S=f-1,m=C[S--],d=127&m;for(m>>=7;p>0;d=256*d+C[S],S--,p-=8);for(v=d&(1<<-p)-1,d>>=-p,p+=e;p>0;v=256*v+C[S],S--,p-=8);if(0===d)d=1-Q;else{if(d===w)return v?NaN:m?-1/0:1/0;v+=l(2,e),d-=Q}return(m?-1:1)*v*l(2,d-e)}}},8361:function(Y,I,n){var c=n(7854),i=n(1702),o=n(7293),l=n(4326),h=c.Object,a=i("".split);Y.exports=o(function(){return!h("z").propertyIsEnumerable(0)})?function(g){return"String"==l(g)?a(g,""):h(g)}:h},9587:function(Y,I,n){var c=n(614),i=n(111),o=n(7674);Y.exports=function(l,h,a){var g,E;return o&&c(g=h.constructor)&&g!==a&&i(E=g.prototype)&&E!==a.prototype&&o(l,E),l}},2788:function(Y,I,n){var c=n(1702),i=n(614),o=n(5465),l=c(Function.toString);i(o.inspectSource)||(o.inspectSource=function(h){return l(h)}),Y.exports=o.inspectSource},8340:function(Y,I,n){var c=n(111),i=n(8880);Y.exports=function(o,l){c(l)&&"cause"in l&&i(o,"cause",l.cause)}},2423:function(Y,I,n){var c=n(2109),i=n(1702),o=n(3501),l=n(111),h=n(2597),a=n(3070).f,g=n(8006),E=n(1156),u=n(9711),C=n(6677),e=!1,f=u("meta"),B=0,w=Object.isExtensible||function(){return!0},Q=function(D){a(D,f,{value:{objectID:"O"+B++,weakData:{}}})},v=Y.exports={enable:function(){v.enable=function(){},e=!0;var D=g.f,U=i([].splice),T={};T[f]=1,D(T).length&&(g.f=function(F){for(var R=D(F),L=0,Z=R.length;LR;R++)if((Z=pA(Q[R]))&&E(w,Z))return Z;return new B(!1)}T=u(Q,F)}for(aA=T.next;!(AA=o(aA,T)).done;){try{Z=pA(AA.value)}catch(cA){e(T,"throw",cA)}if("object"==typeof Z&&Z&&E(w,Z))return Z}return new B(!1)}},9212:function(Y,I,n){var c=n(6916),i=n(9670),o=n(8173);Y.exports=function(l,h,a){var g,E;i(l);try{if(!(g=o(l,"return"))){if("throw"===h)throw a;return a}g=c(g,l)}catch(u){E=!0,g=u}if("throw"===h)throw a;if(E)throw g;return i(g),a}},3383:function(Y,I,n){"use strict";var C,e,f,c=n(7293),i=n(614),o=n(30),l=n(9518),h=n(1320),a=n(5112),g=n(1913),E=a("iterator"),u=!1;[].keys&&("next"in(f=[].keys())?(e=l(l(f)))!==Object.prototype&&(C=e):u=!0),null==C||c(function(){var w={};return C[E].call(w)!==w})?C={}:g&&(C=o(C)),i(C[E])||h(C,E,function(){return this}),Y.exports={IteratorPrototype:C,BUGGY_SAFARI_ITERATORS:u}},7497:function(Y){Y.exports={}},6244:function(Y,I,n){var c=n(7466);Y.exports=function(i){return c(i.length)}},5948:function(Y,I,n){var Q,p,S,m,d,v,D,U,c=n(7854),i=n(9974),o=n(1236).f,l=n(261).set,h=n(6833),a=n(1528),g=n(1036),E=n(5268),u=c.MutationObserver||c.WebKitMutationObserver,C=c.document,e=c.process,f=c.Promise,B=o(c,"queueMicrotask"),w=B&&B.value;w||(Q=function(){var T,F;for(E&&(T=e.domain)&&T.exit();p;){F=p.fn,p=p.next;try{F()}catch(R){throw p?m():S=void 0,R}}S=void 0,T&&T.enter()},h||E||g||!u||!C?!a&&f&&f.resolve?((D=f.resolve(void 0)).constructor=f,U=i(D.then,D),m=function(){U(Q)}):E?m=function(){e.nextTick(Q)}:(l=i(l,c),m=function(){l(Q)}):(d=!0,v=C.createTextNode(""),new u(Q).observe(v,{characterData:!0}),m=function(){v.data=d=!d})),Y.exports=w||function(T){var F={fn:T,next:void 0};S&&(S.next=F),p||(p=F,m()),S=F}},3366:function(Y,I,n){var c=n(7854);Y.exports=c.Promise},133:function(Y,I,n){var c=n(7392),i=n(7293);Y.exports=!!Object.getOwnPropertySymbols&&!i(function(){var o=Symbol();return!String(o)||!(Object(o)instanceof Symbol)||!Symbol.sham&&c&&c<41})},8536:function(Y,I,n){var c=n(7854),i=n(614),o=n(2788),l=c.WeakMap;Y.exports=i(l)&&/native code/.test(o(l))},8523:function(Y,I,n){"use strict";var c=n(9662),i=function(o){var l,h;this.promise=new o(function(a,g){if(void 0!==l||void 0!==h)throw TypeError("Bad Promise constructor");l=a,h=g}),this.resolve=c(l),this.reject=c(h)};Y.exports.f=function(o){return new i(o)}},6277:function(Y,I,n){var c=n(1340);Y.exports=function(i,o){return void 0===i?arguments.length<2?"":o:c(i)}},3929:function(Y,I,n){var c=n(7854),i=n(7850),o=c.TypeError;Y.exports=function(l){if(i(l))throw o("The method doesn't accept regular expressions");return l}},7023:function(Y,I,n){var i=n(7854).isFinite;Y.exports=Number.isFinite||function(l){return"number"==typeof l&&i(l)}},1574:function(Y,I,n){"use strict";var c=n(9781),i=n(1702),o=n(6916),l=n(7293),h=n(1956),a=n(5181),g=n(5296),E=n(7908),u=n(8361),C=Object.assign,e=Object.defineProperty,f=i([].concat);Y.exports=!C||l(function(){if(c&&1!==C({b:1},C(e({},"a",{enumerable:!0,get:function(){e(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var B={},w={},Q=Symbol(),p="abcdefghijklmnopqrst";return B[Q]=7,p.split("").forEach(function(S){w[S]=S}),7!=C({},B)[Q]||h(C({},w)).join("")!=p})?function(w,Q){for(var p=E(w),S=arguments.length,m=1,d=a.f,v=g.f;S>m;)for(var R,D=u(arguments[m++]),U=d?f(h(D),d(D)):h(D),T=U.length,F=0;T>F;)R=U[F++],(!c||o(v,D,R))&&(p[R]=D[R]);return p}:C},30:function(Y,I,n){var S,c=n(9670),i=n(6048),o=n(748),l=n(3501),h=n(490),a=n(317),g=n(6200),C="prototype",e="script",f=g("IE_PROTO"),B=function(){},w=function(d){return"<"+e+">"+d+""},Q=function(d){d.write(w("")),d.close();var v=d.parentWindow.Object;return d=null,v},m=function(){try{S=new ActiveXObject("htmlfile")}catch(v){}m="undefined"!=typeof document?document.domain&&S?Q(S):function(){var D,d=a("iframe");return d.style.display="none",h.appendChild(d),d.src=String("javascript:"),(D=d.contentWindow.document).open(),D.write(w("document.F=Object")),D.close(),D.F}():Q(S);for(var d=o.length;d--;)delete m[C][o[d]];return m()};l[f]=!0,Y.exports=Object.create||function(v,D){var U;return null!==v?(B[C]=c(v),U=new B,B[C]=null,U[f]=v):U=m(),void 0===D?U:i(U,D)}},6048:function(Y,I,n){var c=n(9781),i=n(3070),o=n(9670),l=n(5656),h=n(1956);Y.exports=c?Object.defineProperties:function(g,E){o(g);for(var B,u=l(E),C=h(E),e=C.length,f=0;e>f;)i.f(g,B=C[f++],u[B]);return g}},3070:function(Y,I,n){var c=n(7854),i=n(9781),o=n(4664),l=n(9670),h=n(4948),a=c.TypeError,g=Object.defineProperty;I.f=i?g:function(u,C,e){if(l(u),C=h(C),l(e),o)try{return g(u,C,e)}catch(f){}if("get"in e||"set"in e)throw a("Accessors not supported");return"value"in e&&(u[C]=e.value),u}},1236:function(Y,I,n){var c=n(9781),i=n(6916),o=n(5296),l=n(9114),h=n(5656),a=n(4948),g=n(2597),E=n(4664),u=Object.getOwnPropertyDescriptor;I.f=c?u:function(e,f){if(e=h(e),f=a(f),E)try{return u(e,f)}catch(B){}if(g(e,f))return l(!i(o.f,e,f),e[f])}},1156:function(Y,I,n){var c=n(4326),i=n(5656),o=n(8006).f,l=n(206),h="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Y.exports.f=function(E){return h&&"Window"==c(E)?function(g){try{return o(g)}catch(E){return l(h)}}(E):o(i(E))}},8006:function(Y,I,n){var c=n(6324),o=n(748).concat("length","prototype");I.f=Object.getOwnPropertyNames||function(h){return c(h,o)}},5181:function(Y,I){I.f=Object.getOwnPropertySymbols},9518:function(Y,I,n){var c=n(7854),i=n(2597),o=n(614),l=n(7908),h=n(6200),a=n(8544),g=h("IE_PROTO"),E=c.Object,u=E.prototype;Y.exports=a?E.getPrototypeOf:function(C){var e=l(C);if(i(e,g))return e[g];var f=e.constructor;return o(f)&&e instanceof f?f.prototype:e instanceof E?u:null}},7976:function(Y,I,n){var c=n(1702);Y.exports=c({}.isPrototypeOf)},6324:function(Y,I,n){var c=n(1702),i=n(2597),o=n(5656),l=n(1318).indexOf,h=n(3501),a=c([].push);Y.exports=function(g,E){var f,u=o(g),C=0,e=[];for(f in u)!i(h,f)&&i(u,f)&&a(e,f);for(;E.length>C;)i(u,f=E[C++])&&(~l(e,f)||a(e,f));return e}},1956:function(Y,I,n){var c=n(6324),i=n(748);Y.exports=Object.keys||function(l){return c(l,i)}},5296:function(Y,I){"use strict";var n={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,i=c&&!n.call({1:2},1);I.f=i?function(l){var h=c(this,l);return!!h&&h.enumerable}:n},7674:function(Y,I,n){var c=n(1702),i=n(9670),o=n(6077);Y.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var a,l=!1,h={};try{(a=c(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(h,[]),l=h instanceof Array}catch(g){}return function(E,u){return i(E),o(u),l?a(E,u):E.__proto__=u,E}}():void 0)},4699:function(Y,I,n){var c=n(9781),i=n(1702),o=n(1956),l=n(5656),a=i(n(5296).f),g=i([].push),E=function(u){return function(C){for(var p,e=l(C),f=o(e),B=f.length,w=0,Q=[];B>w;)p=f[w++],(!c||a(e,p))&&g(Q,u?[p,e[p]]:e[p]);return Q}};Y.exports={entries:E(!0),values:E(!1)}},288:function(Y,I,n){"use strict";var c=n(1694),i=n(648);Y.exports=c?{}.toString:function(){return"[object "+i(this)+"]"}},2140:function(Y,I,n){var c=n(7854),i=n(6916),o=n(614),l=n(111),h=c.TypeError;Y.exports=function(a,g){var E,u;if("string"===g&&o(E=a.toString)&&!l(u=i(E,a))||o(E=a.valueOf)&&!l(u=i(E,a))||"string"!==g&&o(E=a.toString)&&!l(u=i(E,a)))return u;throw h("Can't convert object to primitive value")}},3887:function(Y,I,n){var c=n(5005),i=n(1702),o=n(8006),l=n(5181),h=n(9670),a=i([].concat);Y.exports=c("Reflect","ownKeys")||function(E){var u=o.f(h(E)),C=l.f;return C?a(u,C(E)):u}},857:function(Y,I,n){var c=n(7854);Y.exports=c},2534:function(Y){Y.exports=function(I){try{return{error:!1,value:I()}}catch(n){return{error:!0,value:n}}}},9478:function(Y,I,n){var c=n(9670),i=n(111),o=n(8523);Y.exports=function(l,h){if(c(l),i(h)&&h.constructor===l)return h;var a=o.f(l);return(0,a.resolve)(h),a.promise}},2248:function(Y,I,n){var c=n(1320);Y.exports=function(i,o,l){for(var h in o)c(i,h,o[h],l);return i}},1320:function(Y,I,n){var c=n(7854),i=n(614),o=n(2597),l=n(8880),h=n(3505),a=n(2788),g=n(9909),E=n(6530).CONFIGURABLE,u=g.get,C=g.enforce,e=String(String).split("String");(Y.exports=function(f,B,w,Q){var v,p=!!Q&&!!Q.unsafe,S=!!Q&&!!Q.enumerable,m=!!Q&&!!Q.noTargetGet,d=Q&&void 0!==Q.name?Q.name:B;i(w)&&("Symbol("===String(d).slice(0,7)&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(w,"name")||E&&w.name!==d)&&l(w,"name",d),(v=C(w)).source||(v.source=e.join("string"==typeof d?d:""))),f!==c?(p?!m&&f[B]&&(S=!0):delete f[B],S?f[B]=w:l(f,B,w)):S?f[B]=w:h(B,w)})(Function.prototype,"toString",function(){return i(this)&&u(this).source||a(this)})},7651:function(Y,I,n){var c=n(7854),i=n(6916),o=n(9670),l=n(614),h=n(4326),a=n(2261),g=c.TypeError;Y.exports=function(E,u){var C=E.exec;if(l(C)){var e=i(C,E,u);return null!==e&&o(e),e}if("RegExp"===h(E))return i(a,E,u);throw g("RegExp#exec called on incompatible receiver")}},2261:function(Y,I,n){"use strict";var U,T,c=n(6916),i=n(1702),o=n(1340),l=n(7066),h=n(2999),a=n(2309),g=n(30),E=n(9909).get,u=n(9441),C=n(7168),e=a("native-string-replace",String.prototype.replace),f=RegExp.prototype.exec,B=f,w=i("".charAt),Q=i("".indexOf),p=i("".replace),S=i("".slice),m=(T=/b*/g,c(f,U=/a/,"a"),c(f,T,"a"),0!==U.lastIndex||0!==T.lastIndex),d=h.UNSUPPORTED_Y||h.BROKEN_CARET,v=void 0!==/()??/.exec("")[1];(m||v||d||u||C)&&(B=function(T){var aA,AA,lA,pA,cA,gA,BA,F=this,R=E(F),L=o(T),Z=R.raw;if(Z)return Z.lastIndex=F.lastIndex,aA=c(B,Z,L),F.lastIndex=Z.lastIndex,aA;var yA=R.groups,xA=d&&F.sticky,_=c(l,F),MA=F.source,uA=0,QA=L;if(xA&&(_=p(_,"y",""),-1===Q(_,"g")&&(_+="g"),QA=S(L,F.lastIndex),F.lastIndex>0&&(!F.multiline||F.multiline&&"\n"!==w(L,F.lastIndex-1))&&(MA="(?: "+MA+")",QA=" "+QA,uA++),AA=new RegExp("^(?:"+MA+")",_)),v&&(AA=new RegExp("^"+MA+"$(?!\\s)",_)),m&&(lA=F.lastIndex),pA=c(f,xA?AA:F,QA),xA?pA?(pA.input=S(pA.input,uA),pA[0]=S(pA[0],uA),pA.index=F.lastIndex,F.lastIndex+=pA[0].length):F.lastIndex=0:m&&pA&&(F.lastIndex=F.global?pA.index+pA[0].length:lA),v&&pA&&pA.length>1&&c(e,pA[0],AA,function(){for(cA=1;cAb)","g");return"b"!==l.exec("b").groups.a||"bc"!=="b".replace(l,"$c")})},4488:function(Y,I,n){var i=n(7854).TypeError;Y.exports=function(o){if(null==o)throw i("Can't call method on "+o);return o}},3505:function(Y,I,n){var c=n(7854),i=Object.defineProperty;Y.exports=function(o,l){try{i(c,o,{value:l,configurable:!0,writable:!0})}catch(h){c[o]=l}return l}},6340:function(Y,I,n){"use strict";var c=n(5005),i=n(3070),o=n(5112),l=n(9781),h=o("species");Y.exports=function(a){var g=c(a);l&&g&&!g[h]&&(0,i.f)(g,h,{configurable:!0,get:function(){return this}})}},8003:function(Y,I,n){var c=n(3070).f,i=n(2597),l=n(5112)("toStringTag");Y.exports=function(h,a,g){h&&!i(h=g?h:h.prototype,l)&&c(h,l,{configurable:!0,value:a})}},6200:function(Y,I,n){var c=n(2309),i=n(9711),o=c("keys");Y.exports=function(l){return o[l]||(o[l]=i(l))}},5465:function(Y,I,n){var c=n(7854),i=n(3505),o="__core-js_shared__",l=c[o]||i(o,{});Y.exports=l},2309:function(Y,I,n){var c=n(1913),i=n(5465);(Y.exports=function(o,l){return i[o]||(i[o]=void 0!==l?l:{})})("versions",[]).push({version:"3.19.0",mode:c?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(Y,I,n){var c=n(9670),i=n(9483),l=n(5112)("species");Y.exports=function(h,a){var E,g=c(h).constructor;return void 0===g||null==(E=c(g)[l])?a:i(E)}},3429:function(Y,I,n){var c=n(7293);Y.exports=function(i){return c(function(){var o=""[i]('"');return o!==o.toLowerCase()||o.split('"').length>3})}},8710:function(Y,I,n){var c=n(1702),i=n(9303),o=n(1340),l=n(4488),h=c("".charAt),a=c("".charCodeAt),g=c("".slice),E=function(u){return function(C,e){var Q,p,f=o(l(C)),B=i(e),w=f.length;return B<0||B>=w?u?"":void 0:(Q=a(f,B))<55296||Q>56319||B+1===w||(p=a(f,B+1))<56320||p>57343?u?h(f,B):Q:u?g(f,B,B+2):p-56320+(Q-55296<<10)+65536}};Y.exports={codeAt:E(!1),charAt:E(!0)}},8415:function(Y,I,n){"use strict";var c=n(7854),i=n(9303),o=n(1340),l=n(4488),h=c.RangeError;Y.exports=function(g){var E=o(l(this)),u="",C=i(g);if(C<0||C==1/0)throw h("Wrong number of repetitions");for(;C>0;(C>>>=1)&&(E+=E))1&C&&(u+=E);return u}},6091:function(Y,I,n){var c=n(6530).PROPER,i=n(7293),o=n(1361);Y.exports=function(h){return i(function(){return!!o[h]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[h]()||c&&o[h].name!==h})}},3111:function(Y,I,n){var c=n(1702),i=n(4488),o=n(1340),l=n(1361),h=c("".replace),a="["+l+"]",g=RegExp("^"+a+a+"*"),E=RegExp(a+a+"*$"),u=function(C){return function(e){var f=o(i(e));return 1&C&&(f=h(f,g,"")),2&C&&(f=h(f,E,"")),f}};Y.exports={start:u(1),end:u(2),trim:u(3)}},261:function(Y,I,n){var U,T,F,R,c=n(7854),i=n(2104),o=n(9974),l=n(614),h=n(2597),a=n(7293),g=n(490),E=n(206),u=n(317),C=n(6833),e=n(5268),f=c.setImmediate,B=c.clearImmediate,w=c.process,Q=c.Dispatch,p=c.Function,S=c.MessageChannel,m=c.String,d=0,v={},D="onreadystatechange";try{U=c.location}catch(lA){}var L=function(lA){if(h(v,lA)){var pA=v[lA];delete v[lA],pA()}},Z=function(lA){return function(){L(lA)}},aA=function(lA){L(lA.data)},AA=function(lA){c.postMessage(m(lA),U.protocol+"//"+U.host)};(!f||!B)&&(f=function(pA){var cA=E(arguments,1);return v[++d]=function(){i(l(pA)?pA:p(pA),void 0,cA)},T(d),d},B=function(pA){delete v[pA]},e?T=function(lA){w.nextTick(Z(lA))}:Q&&Q.now?T=function(lA){Q.now(Z(lA))}:S&&!C?(R=(F=new S).port2,F.port1.onmessage=aA,T=o(R.postMessage,R)):c.addEventListener&&l(c.postMessage)&&!c.importScripts&&U&&"file:"!==U.protocol&&!a(AA)?(T=AA,c.addEventListener("message",aA,!1)):T=D in u("script")?function(lA){g.appendChild(u("script"))[D]=function(){g.removeChild(this),L(lA)}}:function(lA){setTimeout(Z(lA),0)}),Y.exports={set:f,clear:B}},863:function(Y,I,n){var c=n(1702);Y.exports=c(1..valueOf)},1400:function(Y,I,n){var c=n(9303),i=Math.max,o=Math.min;Y.exports=function(l,h){var a=c(l);return a<0?i(a+h,0):o(a,h)}},7067:function(Y,I,n){var c=n(7854),i=n(9303),o=n(7466),l=c.RangeError;Y.exports=function(h){if(void 0===h)return 0;var a=i(h),g=o(a);if(a!==g)throw l("Wrong length or index");return g}},5656:function(Y,I,n){var c=n(8361),i=n(4488);Y.exports=function(o){return c(i(o))}},9303:function(Y){var I=Math.ceil,n=Math.floor;Y.exports=function(c){var i=+c;return i!=i||0===i?0:(i>0?n:I)(i)}},7466:function(Y,I,n){var c=n(9303),i=Math.min;Y.exports=function(o){return o>0?i(c(o),9007199254740991):0}},7908:function(Y,I,n){var c=n(7854),i=n(4488),o=c.Object;Y.exports=function(l){return o(i(l))}},4590:function(Y,I,n){var c=n(7854),i=n(3002),o=c.RangeError;Y.exports=function(l,h){var a=i(l);if(a%h)throw o("Wrong offset");return a}},3002:function(Y,I,n){var c=n(7854),i=n(9303),o=c.RangeError;Y.exports=function(l){var h=i(l);if(h<0)throw o("The argument can't be less than 0");return h}},7593:function(Y,I,n){var c=n(7854),i=n(6916),o=n(111),l=n(2190),h=n(8173),a=n(2140),g=n(5112),E=c.TypeError,u=g("toPrimitive");Y.exports=function(C,e){if(!o(C)||l(C))return C;var B,f=h(C,u);if(f){if(void 0===e&&(e="default"),B=i(f,C,e),!o(B)||l(B))return B;throw E("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(C,e)}},4948:function(Y,I,n){var c=n(7593),i=n(2190);Y.exports=function(o){var l=c(o,"string");return i(l)?l:l+""}},1694:function(Y,I,n){var o={};o[n(5112)("toStringTag")]="z",Y.exports="[object z]"===String(o)},1340:function(Y,I,n){var c=n(7854),i=n(648),o=c.String;Y.exports=function(l){if("Symbol"===i(l))throw TypeError("Cannot convert a Symbol value to a string");return o(l)}},6330:function(Y,I,n){var i=n(7854).String;Y.exports=function(o){try{return i(o)}catch(l){return"Object"}}},9843:function(Y,I,n){"use strict";var c=n(2109),i=n(7854),o=n(6916),l=n(9781),h=n(3832),a=n(2094),g=n(2091),E=n(5787),u=n(9114),C=n(8880),e=n(5988),f=n(7466),B=n(7067),w=n(4590),Q=n(4948),p=n(2597),S=n(648),m=n(111),d=n(2190),v=n(30),D=n(7976),U=n(7674),T=n(8006).f,F=n(7321),R=n(2092).forEach,L=n(6340),Z=n(3070),aA=n(1236),AA=n(9909),lA=n(9587),pA=AA.get,cA=AA.set,gA=Z.f,BA=aA.f,yA=Math.round,xA=i.RangeError,_=g.ArrayBuffer,MA=_.prototype,uA=g.DataView,QA=a.NATIVE_ARRAY_BUFFER_VIEWS,SA=a.TYPED_ARRAY_CONSTRUCTOR,bA=a.TYPED_ARRAY_TAG,ZA=a.TypedArray,q=a.TypedArrayPrototype,J=a.aTypedArrayConstructor,$=a.isTypedArray,W="BYTES_PER_ELEMENT",hA="Wrong length",vA=function(TA,it){J(TA);for(var vt=0,It=it.length,Mt=new TA(It);It>vt;)Mt[vt]=it[vt++];return Mt},nA=function(TA,it){gA(TA,it,{get:function(){return pA(this)[it]}})},EA=function(TA){var it;return D(MA,TA)||"ArrayBuffer"==(it=S(TA))||"SharedArrayBuffer"==it},GA=function(TA,it){return $(TA)&&!d(it)&&it in TA&&e(+it)&&it>=0},nt=function(it,vt){return vt=Q(vt),GA(it,vt)?u(2,it[vt]):BA(it,vt)},lt=function(it,vt,It){return vt=Q(vt),!(GA(it,vt)&&m(It)&&p(It,"value"))||p(It,"get")||p(It,"set")||It.configurable||p(It,"writable")&&!It.writable||p(It,"enumerable")&&!It.enumerable?gA(it,vt,It):(it[vt]=It.value,it)};l?(QA||(aA.f=nt,Z.f=lt,nA(q,"buffer"),nA(q,"byteOffset"),nA(q,"byteLength"),nA(q,"length")),c({target:"Object",stat:!0,forced:!QA},{getOwnPropertyDescriptor:nt,defineProperty:lt}),Y.exports=function(TA,it,vt){var It=TA.match(/\d+$/)[0]/8,Mt=TA+(vt?"Clamped":"")+"Array",JA="get"+TA,qA="set"+TA,at=i[Mt],et=at,FA=et&&et.prototype,dt={},H=function(k,b){gA(k,b,{get:function(){return function(k,b){var CA=pA(k);return CA.view[JA](b*It+CA.byteOffset,!0)}(this,b)},set:function(CA){return function(k,b,CA){var wA=pA(k);vt&&(CA=(CA=yA(CA))<0?0:CA>255?255:255&CA),wA.view[qA](b*It+wA.byteOffset,CA,!0)}(this,b,CA)},enumerable:!0})};QA?h&&(et=it(function(k,b,CA,wA){return E(k,FA),lA(m(b)?EA(b)?void 0!==wA?new at(b,w(CA,It),wA):void 0!==CA?new at(b,w(CA,It)):new at(b):$(b)?vA(et,b):o(F,et,b):new at(B(b)),k,et)}),U&&U(et,ZA),R(T(at),function(k){k in et||C(et,k,at[k])}),et.prototype=FA):(et=it(function(k,b,CA,wA){E(k,FA);var Bt,Yt,j,RA=0,rA=0;if(m(b)){if(!EA(b))return $(b)?vA(et,b):o(F,et,b);Bt=b,rA=w(CA,It);var XA=b.byteLength;if(void 0===wA){if(XA%It||(Yt=XA-rA)<0)throw xA(hA)}else if((Yt=f(wA)*It)+rA>XA)throw xA(hA);j=Yt/It}else j=B(b),Bt=new _(Yt=j*It);for(cA(k,{buffer:Bt,byteOffset:rA,byteLength:Yt,length:j,view:new uA(Bt)});RA1?arguments[1]:void 0,p=void 0!==Q,S=g(B);if(S&&!E(S))for(T=(U=a(B,S)).next,B=[];!(D=i(T,U)).done;)B.push(D.value);for(p&&w>2&&(Q=c(Q,arguments[2])),d=h(B),v=new(u(f))(d),m=0;d>m;m++)v[m]=p?Q(B[m],m):B[m];return v}},6304:function(Y,I,n){var c=n(2094),i=n(6707),o=c.TYPED_ARRAY_CONSTRUCTOR,l=c.aTypedArrayConstructor;Y.exports=function(h){return l(i(h,h[o]))}},9711:function(Y,I,n){var c=n(1702),i=0,o=Math.random(),l=c(1..toString);Y.exports=function(h){return"Symbol("+(void 0===h?"":h)+")_"+l(++i+o,36)}},3307:function(Y,I,n){var c=n(133);Y.exports=c&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:function(Y,I,n){var c=n(5112);I.f=c},5112:function(Y,I,n){var c=n(7854),i=n(2309),o=n(2597),l=n(9711),h=n(133),a=n(3307),g=i("wks"),E=c.Symbol,u=E&&E.for,C=a?E:E&&E.withoutSetter||l;Y.exports=function(e){if(!o(g,e)||!h&&"string"!=typeof g[e]){var f="Symbol."+e;g[e]=h&&o(E,e)?E[e]:a&&u?u(f):C(f)}return g[e]}},1361:function(Y){Y.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},9170:function(Y,I,n){"use strict";var c=n(2109),i=n(7854),o=n(7976),l=n(9518),h=n(7674),a=n(9920),g=n(30),E=n(8880),u=n(9114),C=n(7741),e=n(8340),f=n(408),B=n(6277),w=n(2914),Q=i.Error,p=[].push,S=function(v,D){var U=o(m,this)?this:g(m),T=arguments.length>2?arguments[2]:void 0;h&&(U=h(new Q(void 0),l(U))),E(U,"message",B(D,"")),w&&E(U,"stack",C(U.stack,1)),e(U,T);var F=[];return f(v,p,{that:F}),E(U,"errors",F),U};h?h(S,Q):a(S,Q);var m=S.prototype=g(Q.prototype,{constructor:u(1,S),message:u(1,""),name:u(1,"AggregateError")});c({global:!0},{AggregateError:S})},2222:function(Y,I,n){"use strict";var c=n(2109),i=n(7854),o=n(7293),l=n(3157),h=n(111),a=n(7908),g=n(6244),E=n(6135),u=n(5417),C=n(1194),e=n(5112),f=n(7392),B=e("isConcatSpreadable"),w=9007199254740991,Q="Maximum allowed index exceeded",p=i.TypeError,S=f>=51||!o(function(){var D=[];return D[B]=!1,D.concat()[0]!==D}),m=C("concat"),d=function(D){if(!h(D))return!1;var U=D[B];return void 0!==U?!!U:l(D)};c({target:"Array",proto:!0,forced:!S||!m},{concat:function(U){var L,Z,aA,AA,lA,T=a(this),F=u(T,0),R=0;for(L=-1,aA=arguments.length;Lw)throw p(Q);for(Z=0;Z=w)throw p(Q);E(F,R++,lA)}return F.length=R,F}})},545:function(Y,I,n){var c=n(2109),i=n(1048),o=n(1223);c({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},3290:function(Y,I,n){var c=n(2109),i=n(1285),o=n(1223);c({target:"Array",proto:!0},{fill:i}),o("fill")},7327:function(Y,I,n){"use strict";var c=n(2109),i=n(2092).filter;c({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(a){return i(this,a,arguments.length>1?arguments[1]:void 0)}})},1038:function(Y,I,n){var c=n(2109),i=n(8457);c({target:"Array",stat:!0,forced:!n(7072)(function(h){Array.from(h)})},{from:i})},6699:function(Y,I,n){"use strict";var c=n(2109),i=n(1318).includes,o=n(1223);c({target:"Array",proto:!0},{includes:function(h){return i(this,h,arguments.length>1?arguments[1]:void 0)}}),o("includes")},6992:function(Y,I,n){"use strict";var c=n(5656),i=n(1223),o=n(7497),l=n(9909),h=n(654),a="Array Iterator",g=l.set,E=l.getterFor(a);Y.exports=h(Array,"Array",function(u,C){g(this,{type:a,target:c(u),index:0,kind:C})},function(){var u=E(this),C=u.target,e=u.kind,f=u.index++;return!C||f>=C.length?(u.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:f,done:!1}:"values"==e?{value:C[f],done:!1}:{value:[f,C[f]],done:!1}},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},9600:function(Y,I,n){"use strict";var c=n(2109),i=n(1702),o=n(8361),l=n(5656),h=n(9341),a=i([].join),g=o!=Object,E=h("join",",");c({target:"Array",proto:!0,forced:g||!E},{join:function(C){return a(l(this),void 0===C?",":C)}})},1249:function(Y,I,n){"use strict";var c=n(2109),i=n(2092).map;c({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(a){return i(this,a,arguments.length>1?arguments[1]:void 0)}})},7042:function(Y,I,n){"use strict";var c=n(2109),i=n(7854),o=n(3157),l=n(4411),h=n(111),a=n(1400),g=n(6244),E=n(5656),u=n(6135),C=n(5112),e=n(1194),f=n(206),B=e("slice"),w=C("species"),Q=i.Array,p=Math.max;c({target:"Array",proto:!0,forced:!B},{slice:function(m,d){var F,R,L,v=E(this),D=g(v),U=a(m,D),T=a(void 0===d?D:d,D);if(o(v)&&((l(F=v.constructor)&&(F===Q||o(F.prototype))||h(F)&&null===(F=F[w]))&&(F=void 0),F===Q||void 0===F))return f(v,U,T);for(R=new(void 0===F?Q:F)(p(T-U,0)),L=0;U3)){if(e)return!0;if(B)return B<603;var F,R,L,Z,T="";for(F=65;F<76;F++){switch(R=String.fromCharCode(F),F){case 66:case 69:case 70:case 72:L=3;break;case 68:case 71:L=4;break;default:L=2}for(Z=0;Z<47;Z++)w.push({k:R+Z,v:L})}for(w.sort(function(aA,AA){return AA.v-aA.v}),Z=0;Za(R)?1:-1}}(F)),aA=L.length,AA=0;AAw)throw e(Q);for(R=g(d,F),L=0;Lv-F+T;L--)delete d[L-1]}else if(T>F)for(L=v-F;L>D;L--)aA=L+T-1,(Z=L+F-1)in d?d[aA]=d[Z]:delete d[aA];for(L=0;L2)if(lA=p(lA),43===(pA=U(lA,0))||45===pA){if(88===(cA=U(lA,2))||120===cA)return NaN}else if(48===pA){switch(U(lA,1)){case 66:case 98:gA=2,BA=49;break;case 79:case 111:gA=8,BA=55;break;default:return+lA}for(xA=(yA=D(lA,2)).length,_=0;_BA)return NaN;return parseInt(yA,gA)}return+lA};if(l(S,!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var aA,R=function(lA){var pA=arguments.length<1?0:m(T(lA)),cA=this;return E(d,cA)&&e(function(){Q(cA)})?g(Object(pA),cA,R):pA},L=c?f(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Z=0;L.length>Z;Z++)a(m,aA=L[Z])&&!a(R,aA)&&w(R,aA,B(m,aA));R.prototype=d,d.constructor=R,h(i,S,R)}},3299:function(Y,I,n){n(2109)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},5192:function(Y,I,n){n(2109)({target:"Number",stat:!0},{isFinite:n(7023)})},3161:function(Y,I,n){n(2109)({target:"Number",stat:!0},{isInteger:n(5988)})},6977:function(Y,I,n){"use strict";var c=n(2109),i=n(7854),o=n(1702),l=n(9303),h=n(863),a=n(8415),g=n(7293),E=i.RangeError,u=i.String,C=Math.floor,e=o(a),f=o("".slice),B=o(1..toFixed),w=function(v,D,U){return 0===D?U:D%2==1?w(v,D-1,U*v):w(v*v,D/2,U)},p=function(v,D,U){for(var T=-1,F=U;++T<6;)v[T]=(F+=D*v[T])%1e7,F=C(F/1e7)},S=function(v,D){for(var U=6,T=0;--U>=0;)v[U]=C((T+=v[U])/D),T=T%D*1e7},m=function(v){for(var D=6,U="";--D>=0;)if(""!==U||0===D||0!==v[D]){var T=u(v[D]);U=""===U?T:U+e("0",7-T.length)+T}return U};c({target:"Number",proto:!0,forced:g(function(){return"0.000"!==B(8e-5,3)||"1"!==B(.9,0)||"1.25"!==B(1.255,2)||"1000000000000000128"!==B(0xde0b6b3a7640080,0)})||!g(function(){B({})})},{toFixed:function(D){var Z,aA,AA,lA,U=h(this),T=l(D),F=[0,0,0,0,0,0],R="",L="0";if(T<0||T>20)throw E("Incorrect fraction digits");if(U!=U)return"NaN";if(U<=-1e21||U>=1e21)return u(U);if(U<0&&(R="-",U=-U),U>1e-21)if(aA=(Z=function(v){for(var D=0,U=v;U>=4096;)D+=12,U/=4096;for(;U>=2;)D+=1,U/=2;return D}(U*w(2,69,1))-69)<0?U*w(2,-Z,1):U/w(2,Z,1),aA*=4503599627370496,(Z=52-Z)>0){for(p(F,0,aA),AA=T;AA>=7;)p(F,1e7,0),AA-=7;for(p(F,w(10,AA,1),0),AA=Z-1;AA>=23;)S(F,8388608),AA-=23;S(F,1<0?R+((lA=L.length)<=T?"0."+e("0",T-lA)+L:f(L,0,lA-T)+"."+f(L,lA-T)):R+L}})},9601:function(Y,I,n){var c=n(2109),i=n(1574);c({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},3371:function(Y,I,n){var c=n(2109),i=n(6677),o=n(7293),l=n(111),h=n(2423).onFreeze,a=Object.freeze;c({target:"Object",stat:!0,forced:o(function(){a(1)}),sham:!i},{freeze:function(u){return a&&l(u)?a(h(u)):u}})},5003:function(Y,I,n){var c=n(2109),i=n(7293),o=n(5656),l=n(1236).f,h=n(9781),a=i(function(){l(1)});c({target:"Object",stat:!0,forced:!h||a,sham:!h},{getOwnPropertyDescriptor:function(u,C){return l(o(u),C)}})},9337:function(Y,I,n){var c=n(2109),i=n(9781),o=n(3887),l=n(5656),h=n(1236),a=n(6135);c({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(E){for(var w,Q,u=l(E),C=h.f,e=o(u),f={},B=0;e.length>B;)void 0!==(Q=C(u,w=e[B++]))&&a(f,w,Q);return f}})},489:function(Y,I,n){var c=n(2109),i=n(7293),o=n(7908),l=n(9518),h=n(8544);c({target:"Object",stat:!0,forced:i(function(){l(1)}),sham:!h},{getPrototypeOf:function(E){return l(o(E))}})},7941:function(Y,I,n){var c=n(2109),i=n(7908),o=n(1956);c({target:"Object",stat:!0,forced:n(7293)(function(){o(1)})},{keys:function(g){return o(i(g))}})},1539:function(Y,I,n){var c=n(1694),i=n(1320),o=n(288);c||i(Object.prototype,"toString",o,{unsafe:!0})},2479:function(Y,I,n){var c=n(2109),i=n(4699).values;c({target:"Object",stat:!0},{values:function(l){return i(l)}})},7922:function(Y,I,n){"use strict";var c=n(2109),i=n(6916),o=n(9662),l=n(8523),h=n(2534),a=n(408);c({target:"Promise",stat:!0},{allSettled:function(E){var u=this,C=l.f(u),e=C.resolve,f=C.reject,B=h(function(){var w=o(u.resolve),Q=[],p=0,S=1;a(E,function(m){var d=p++,v=!1;S++,i(w,u,m).then(function(D){v||(v=!0,Q[d]={status:"fulfilled",value:D},--S||e(Q))},function(D){v||(v=!0,Q[d]={status:"rejected",reason:D},--S||e(Q))})}),--S||e(Q)});return B.error&&f(B.value),C.promise}})},4668:function(Y,I,n){"use strict";var c=n(2109),i=n(9662),o=n(5005),l=n(6916),h=n(8523),a=n(2534),g=n(408),E="No one promise resolved";c({target:"Promise",stat:!0},{any:function(C){var e=this,f=o("AggregateError"),B=h.f(e),w=B.resolve,Q=B.reject,p=a(function(){var S=i(e.resolve),m=[],d=0,v=1,D=!1;g(C,function(U){var T=d++,F=!1;v++,l(S,e,U).then(function(R){F||D||(D=!0,w(R))},function(R){F||D||(F=!0,m[T]=R,--v||Q(new f(m,E)))})}),--v||Q(new f(m,E))});return p.error&&Q(p.value),B.promise}})},7727:function(Y,I,n){"use strict";var c=n(2109),i=n(1913),o=n(3366),l=n(7293),h=n(5005),a=n(614),g=n(6707),E=n(9478),u=n(1320);if(c({target:"Promise",proto:!0,real:!0,forced:!!o&&l(function(){o.prototype.finally.call({then:function(){}},function(){})})},{finally:function(f){var B=g(this,h("Promise")),w=a(f);return this.then(w?function(Q){return E(B,f()).then(function(){return Q})}:f,w?function(Q){return E(B,f()).then(function(){throw Q})}:f)}}),!i&&a(o)){var e=h("Promise").prototype.finally;o.prototype.finally!==e&&u(o.prototype,"finally",e,{unsafe:!0})}},8674:function(Y,I,n){"use strict";var TA,it,vt,It,c=n(2109),i=n(1913),o=n(7854),l=n(5005),h=n(6916),a=n(3366),g=n(1320),E=n(2248),u=n(7674),C=n(8003),e=n(6340),f=n(9662),B=n(614),w=n(111),Q=n(5787),p=n(2788),S=n(408),m=n(7072),d=n(6707),v=n(261).set,D=n(5948),U=n(9478),T=n(842),F=n(8523),R=n(2534),L=n(9909),Z=n(4705),aA=n(5112),AA=n(7871),lA=n(5268),pA=n(7392),cA=aA("species"),gA="Promise",BA=L.get,yA=L.set,xA=L.getterFor(gA),_=a&&a.prototype,MA=a,uA=_,QA=o.TypeError,SA=o.document,bA=o.process,ZA=F.f,q=ZA,J=!!(SA&&SA.createEvent&&o.dispatchEvent),$=B(o.PromiseRejectionEvent),W="unhandledrejection",lt=!1,Mt=Z(gA,function(){var b=p(MA),CA=b!==String(MA);if(!CA&&66===pA||i&&!uA.finally)return!0;if(pA>=51&&/native code/.test(b))return!1;var wA=new MA(function(Bt){Bt(1)}),RA=function(Bt){Bt(function(){},function(){})};return(wA.constructor={})[cA]=RA,!(lt=wA.then(function(){})instanceof RA)||!CA&&AA&&!$}),JA=Mt||!m(function(b){MA.all(b).catch(function(){})}),qA=function(b){var CA;return!(!w(b)||!B(CA=b.then))&&CA},at=function(b,CA){if(!b.notified){b.notified=!0;var wA=b.reactions;D(function(){for(var RA=b.value,rA=1==b.state,Bt=0;wA.length>Bt;){var jA,ct,Lt,Yt=wA[Bt++],j=rA?Yt.ok:Yt.fail,XA=Yt.resolve,KA=Yt.reject,DA=Yt.domain;try{j?(rA||(2===b.rejection&&mt(b),b.rejection=1),!0===j?jA=RA:(DA&&DA.enter(),jA=j(RA),DA&&(DA.exit(),Lt=!0)),jA===Yt.promise?KA(QA("Promise-chain cycle")):(ct=qA(jA))?h(ct,jA,XA,KA):XA(jA)):KA(RA)}catch(xt){DA&&!Lt&&DA.exit(),KA(xt)}}b.reactions=[],b.notified=!1,CA&&!b.rejection&&FA(b)})}},et=function(b,CA,wA){var RA,rA;J?((RA=SA.createEvent("Event")).promise=CA,RA.reason=wA,RA.initEvent(b,!1,!0),o.dispatchEvent(RA)):RA={promise:CA,reason:wA},!$&&(rA=o["on"+b])?rA(RA):b===W&&T("Unhandled promise rejection",wA)},FA=function(b){h(v,o,function(){var rA,CA=b.facade,wA=b.value;if(dt(b)&&(rA=R(function(){lA?bA.emit("unhandledRejection",wA,CA):et(W,CA,wA)}),b.rejection=lA||dt(b)?2:1,rA.error))throw rA.value})},dt=function(b){return 1!==b.rejection&&!b.parent},mt=function(b){h(v,o,function(){var CA=b.facade;lA?bA.emit("rejectionHandled",CA):et("rejectionhandled",CA,b.value)})},OA=function(b,CA,wA){return function(RA){b(CA,RA,wA)}},H=function(b,CA,wA){b.done||(b.done=!0,wA&&(b=wA),b.value=CA,b.state=2,at(b,!0))},k=function(b,CA,wA){if(!b.done){b.done=!0,wA&&(b=wA);try{if(b.facade===CA)throw QA("Promise can't be resolved itself");var RA=qA(CA);RA?D(function(){var rA={done:!1};try{h(RA,CA,OA(k,rA,b),OA(H,rA,b))}catch(Bt){H(rA,Bt,b)}}):(b.value=CA,b.state=1,at(b,!1))}catch(rA){H({done:!1},rA,b)}}};if(Mt&&(MA=function(CA){Q(this,uA),f(CA),h(TA,this);var wA=BA(this);try{CA(OA(k,wA),OA(H,wA))}catch(RA){H(wA,RA)}},(TA=function(CA){yA(this,{type:gA,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=E(uA=MA.prototype,{then:function(CA,wA){var RA=xA(this),rA=RA.reactions,Bt=ZA(d(this,MA));return Bt.ok=!B(CA)||CA,Bt.fail=B(wA)&&wA,Bt.domain=lA?bA.domain:void 0,RA.parent=!0,rA[rA.length]=Bt,0!=RA.state&&at(RA,!1),Bt.promise},catch:function(b){return this.then(void 0,b)}}),it=function(){var b=new TA,CA=BA(b);this.promise=b,this.resolve=OA(k,CA),this.reject=OA(H,CA)},F.f=ZA=function(b){return b===MA||b===vt?new it(b):q(b)},!i&&B(a)&&_!==Object.prototype)){It=_.then,lt||(g(_,"then",function(CA,wA){var RA=this;return new MA(function(rA,Bt){h(It,RA,rA,Bt)}).then(CA,wA)},{unsafe:!0}),g(_,"catch",uA.catch,{unsafe:!0}));try{delete _.constructor}catch(b){}u&&u(_,uA)}c({global:!0,wrap:!0,forced:Mt},{Promise:MA}),C(MA,gA,!1,!0),e(gA),vt=l(gA),c({target:gA,stat:!0,forced:Mt},{reject:function(CA){var wA=ZA(this);return h(wA.reject,void 0,CA),wA.promise}}),c({target:gA,stat:!0,forced:i||Mt},{resolve:function(CA){return U(i&&this===vt?MA:this,CA)}}),c({target:gA,stat:!0,forced:JA},{all:function(CA){var wA=this,RA=ZA(wA),rA=RA.resolve,Bt=RA.reject,Yt=R(function(){var j=f(wA.resolve),XA=[],KA=0,DA=1;S(CA,function(jA){var ct=KA++,Lt=!1;DA++,h(j,wA,jA).then(function(xt){Lt||(Lt=!0,XA[ct]=xt,--DA||rA(XA))},Bt)}),--DA||rA(XA)});return Yt.error&&Bt(Yt.value),RA.promise},race:function(CA){var wA=this,RA=ZA(wA),rA=RA.reject,Bt=R(function(){var Yt=f(wA.resolve);S(CA,function(j){h(Yt,wA,j).then(RA.resolve,rA)})});return Bt.error&&rA(Bt.value),RA.promise}})},2419:function(Y,I,n){var c=n(2109),i=n(5005),o=n(2104),l=n(7065),h=n(9483),a=n(9670),g=n(111),E=n(30),u=n(7293),C=i("Reflect","construct"),e=Object.prototype,f=[].push,B=u(function(){function p(){}return!(C(function(){},[],p)instanceof p)}),w=!u(function(){C(function(){})}),Q=B||w;c({target:"Reflect",stat:!0,forced:Q,sham:Q},{construct:function(S,m){h(S),a(m);var d=arguments.length<3?S:h(arguments[2]);if(w&&!B)return C(S,m,d);if(S==d){switch(m.length){case 0:return new S;case 1:return new S(m[0]);case 2:return new S(m[0],m[1]);case 3:return new S(m[0],m[1],m[2]);case 4:return new S(m[0],m[1],m[2],m[3])}var v=[null];return o(f,v,m),new(o(l,S,v))}var D=d.prototype,U=E(g(D)?D:e),T=o(S,U,m);return g(T)?T:U}})},4916:function(Y,I,n){"use strict";var c=n(2109),i=n(2261);c({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2087:function(Y,I,n){var c=n(9781),i=n(3070),o=n(7066),l=n(7293),h=RegExp.prototype;c&&l(function(){return"sy"!==Object.getOwnPropertyDescriptor(h,"flags").get.call({dotAll:!0,sticky:!0})})&&i.f(h,"flags",{configurable:!0,get:o})},9714:function(Y,I,n){"use strict";var c=n(1702),i=n(6530).PROPER,o=n(1320),l=n(9670),h=n(7976),a=n(1340),g=n(7293),E=n(7066),u="toString",C=RegExp.prototype,e=C[u],f=c(E);(g(function(){return"/a/b"!=e.call({source:"a",flags:"b"})})||i&&e.name!=u)&&o(RegExp.prototype,u,function(){var p=l(this),S=a(p.source),m=p.flags;return"/"+S+"/"+a(void 0===m&&h(C,p)&&!("flags"in C)?f(p):m)},{unsafe:!0})},189:function(Y,I,n){"use strict";n(7710)("Set",function(o){return function(){return o(this,arguments.length?arguments[0]:void 0)}},n(5631))},9841:function(Y,I,n){"use strict";var c=n(2109),i=n(8710).codeAt;c({target:"String",proto:!0},{codePointAt:function(l){return i(this,l)}})},4953:function(Y,I,n){var c=n(2109),i=n(7854),o=n(1702),l=n(1400),h=i.RangeError,a=String.fromCharCode,g=String.fromCodePoint,E=o([].join);c({target:"String",stat:!0,forced:!!g&&1!=g.length},{fromCodePoint:function(e){for(var Q,f=[],B=arguments.length,w=0;B>w;){if(Q=+arguments[w++],l(Q,1114111)!==Q)throw h(Q+" is not a valid code point");f[w]=Q<65536?a(Q):a(55296+((Q-=65536)>>10),Q%1024+56320)}return E(f,"")}})},2023:function(Y,I,n){"use strict";var c=n(2109),i=n(1702),o=n(3929),l=n(4488),h=n(1340),a=n(4964),g=i("".indexOf);c({target:"String",proto:!0,forced:!a("includes")},{includes:function(u){return!!~g(h(l(this)),h(o(u)),arguments.length>1?arguments[1]:void 0)}})},8734:function(Y,I,n){"use strict";var c=n(2109),i=n(4230);c({target:"String",proto:!0,forced:n(3429)("italics")},{italics:function(){return i(this,"i","","")}})},8783:function(Y,I,n){"use strict";var c=n(8710).charAt,i=n(1340),o=n(9909),l=n(654),h="String Iterator",a=o.set,g=o.getterFor(h);l(String,"String",function(E){a(this,{type:h,string:i(E),index:0})},function(){var f,u=g(this),C=u.string,e=u.index;return e>=C.length?{value:void 0,done:!0}:(f=c(C,e),u.index+=f.length,{value:f,done:!1})})},9254:function(Y,I,n){"use strict";var c=n(2109),i=n(4230);c({target:"String",proto:!0,forced:n(3429)("link")},{link:function(h){return i(this,"a","href",h)}})},6373:function(Y,I,n){"use strict";var c=n(2109),i=n(7854),o=n(6916),l=n(1702),h=n(4994),a=n(4488),g=n(7466),E=n(1340),u=n(9670),C=n(4326),e=n(7976),f=n(7850),B=n(7066),w=n(8173),Q=n(1320),p=n(7293),S=n(5112),m=n(6707),d=n(1530),v=n(7651),D=n(9909),U=n(1913),T=S("matchAll"),F="RegExp String",R=F+" Iterator",L=D.set,Z=D.getterFor(R),aA=RegExp.prototype,AA=i.TypeError,lA=l(B),pA=l("".indexOf),cA=l("".matchAll),gA=!!cA&&!p(function(){cA("a",/./)}),BA=h(function(_,MA,uA,QA){L(this,{type:R,regexp:_,string:MA,global:uA,unicode:QA,done:!1})},F,function(){var _=Z(this);if(_.done)return{value:void 0,done:!0};var MA=_.regexp,uA=_.string,QA=v(MA,uA);return null===QA?{value:void 0,done:_.done=!0}:_.global?(""===E(QA[0])&&(MA.lastIndex=d(uA,g(MA.lastIndex),_.unicode)),{value:QA,done:!1}):(_.done=!0,{value:QA,done:!1})}),yA=function(xA){var uA,QA,SA,bA,ZA,q,_=u(this),MA=E(xA);return uA=m(_,RegExp),void 0===(QA=_.flags)&&e(aA,_)&&!("flags"in aA)&&(QA=lA(_)),SA=void 0===QA?"":E(QA),bA=new uA(uA===RegExp?_.source:_,SA),ZA=!!~pA(SA,"g"),q=!!~pA(SA,"u"),bA.lastIndex=g(_.lastIndex),new BA(bA,MA,ZA,q)};c({target:"String",proto:!0,forced:gA},{matchAll:function(_){var uA,QA,SA,bA,MA=a(this);if(null!=_){if(f(_)&&(uA=E(a("flags"in aA?_.flags:lA(_))),!~pA(uA,"g")))throw AA("`.matchAll` does not allow non-global regexes");if(gA)return cA(MA,_);if(void 0===(SA=w(_,T))&&U&&"RegExp"==C(_)&&(SA=yA),SA)return o(SA,_,MA)}else if(gA)return cA(MA,_);return QA=E(MA),bA=new RegExp(_,"g"),U?o(yA,bA,QA):bA[T](QA)}}),U||T in aA||Q(aA,T,yA)},4723:function(Y,I,n){"use strict";var c=n(6916),i=n(7007),o=n(9670),l=n(7466),h=n(1340),a=n(4488),g=n(8173),E=n(1530),u=n(7651);i("match",function(C,e,f){return[function(w){var Q=a(this),p=null==w?void 0:g(w,C);return p?c(p,w,Q):new RegExp(w)[C](h(Q))},function(B){var w=o(this),Q=h(B),p=f(e,w,Q);if(p.done)return p.value;if(!w.global)return u(w,Q);var S=w.unicode;w.lastIndex=0;for(var v,m=[],d=0;null!==(v=u(w,Q));){var D=h(v[0]);m[d]=D,""===D&&(w.lastIndex=E(Q,l(w.lastIndex),S)),d++}return 0===d?null:m}]})},2481:function(Y,I,n){n(2109)({target:"String",proto:!0},{repeat:n(8415)})},5306:function(Y,I,n){"use strict";var c=n(2104),i=n(6916),o=n(1702),l=n(7007),h=n(7293),a=n(9670),g=n(614),E=n(9303),u=n(7466),C=n(1340),e=n(4488),f=n(1530),B=n(8173),w=n(647),Q=n(7651),S=n(5112)("replace"),m=Math.max,d=Math.min,v=o([].concat),D=o([].push),U=o("".indexOf),T=o("".slice),F=function(aA){return void 0===aA?aA:String(aA)},R="$0"==="a".replace(/./,"$0"),L=!!/./[S]&&""===/./[S]("a","$0");l("replace",function(aA,AA,lA){var pA=L?"$":"$0";return[function(gA,BA){var yA=e(this),xA=null==gA?void 0:B(gA,S);return xA?i(xA,gA,yA,BA):i(AA,C(yA),gA,BA)},function(cA,gA){var BA=a(this),yA=C(cA);if("string"==typeof gA&&-1===U(gA,pA)&&-1===U(gA,"$<")){var xA=lA(AA,BA,yA,gA);if(xA.done)return xA.value}var _=g(gA);_||(gA=C(gA));var MA=BA.global;if(MA){var uA=BA.unicode;BA.lastIndex=0}for(var QA=[];;){var SA=Q(BA,yA);if(null===SA||(D(QA,SA),!MA))break;""===C(SA[0])&&(BA.lastIndex=f(yA,u(BA.lastIndex),uA))}for(var ZA="",q=0,J=0;J=q&&(ZA+=T(yA,q,W)+GA,q=W+$.length)}return ZA+T(yA,q)}]},!!h(function(){var aA=/./;return aA.exec=function(){var AA=[];return AA.groups={a:"7"},AA},"7"!=="".replace(aA,"$")})||!R||L)},3123:function(Y,I,n){"use strict";var c=n(2104),i=n(6916),o=n(1702),l=n(7007),h=n(7850),a=n(9670),g=n(4488),E=n(6707),u=n(1530),C=n(7466),e=n(1340),f=n(8173),B=n(206),w=n(7651),Q=n(2261),p=n(2999),S=n(7293),m=p.UNSUPPORTED_Y,d=4294967295,v=Math.min,D=[].push,U=o(/./.exec),T=o(D),F=o("".slice),R=!S(function(){var L=/(?:)/,Z=L.exec;L.exec=function(){return Z.apply(this,arguments)};var aA="ab".split(L);return 2!==aA.length||"a"!==aA[0]||"b"!==aA[1]});l("split",function(L,Z,aA){var AA;return AA="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(lA,pA){var cA=e(g(this)),gA=void 0===pA?d:pA>>>0;if(0===gA)return[];if(void 0===lA)return[cA];if(!h(lA))return i(Z,cA,lA,gA);for(var MA,uA,QA,BA=[],xA=0,_=new RegExp(lA.source,(lA.ignoreCase?"i":"")+(lA.multiline?"m":"")+(lA.unicode?"u":"")+(lA.sticky?"y":"")+"g");(MA=i(Q,_,cA))&&!((uA=_.lastIndex)>xA&&(T(BA,F(cA,xA,MA.index)),MA.length>1&&MA.index=gA));)_.lastIndex===MA.index&&_.lastIndex++;return xA===cA.length?(QA||!U(_,""))&&T(BA,""):T(BA,F(cA,xA)),BA.length>gA?B(BA,0,gA):BA}:"0".split(void 0,0).length?function(lA,pA){return void 0===lA&&0===pA?[]:i(Z,this,lA,pA)}:Z,[function(pA,cA){var gA=g(this),BA=null==pA?void 0:f(pA,L);return BA?i(BA,pA,gA,cA):i(AA,e(gA),pA,cA)},function(lA,pA){var cA=a(this),gA=e(lA),BA=aA(AA,cA,gA,pA,AA!==Z);if(BA.done)return BA.value;var yA=E(cA,RegExp),xA=cA.unicode,MA=new yA(m?"^(?:"+cA.source+")":cA,(cA.ignoreCase?"i":"")+(cA.multiline?"m":"")+(cA.unicode?"u":"")+(m?"g":"y")),uA=void 0===pA?d:pA>>>0;if(0===uA)return[];if(0===gA.length)return null===w(MA,gA)?[gA]:[];for(var QA=0,SA=0,bA=[];SA2?arguments[2]:void 0)})},8927:function(Y,I,n){"use strict";var c=n(2094),i=n(2092).every,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("every",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},3105:function(Y,I,n){"use strict";var c=n(2094),i=n(6916),o=n(1285),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("fill",function(g){var E=arguments.length;return i(o,l(this),g,E>1?arguments[1]:void 0,E>2?arguments[2]:void 0)})},5035:function(Y,I,n){"use strict";var c=n(2094),i=n(2092).filter,o=n(3074),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("filter",function(g){var E=i(l(this),g,arguments.length>1?arguments[1]:void 0);return o(this,E)})},7174:function(Y,I,n){"use strict";var c=n(2094),i=n(2092).findIndex,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("findIndex",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},4345:function(Y,I,n){"use strict";var c=n(2094),i=n(2092).find,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("find",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},4197:function(Y,I,n){n(9843)("Float32",function(i){return function(l,h,a){return i(this,l,h,a)}})},6495:function(Y,I,n){n(9843)("Float64",function(i){return function(l,h,a){return i(this,l,h,a)}})},2846:function(Y,I,n){"use strict";var c=n(2094),i=n(2092).forEach,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("forEach",function(a){i(o(this),a,arguments.length>1?arguments[1]:void 0)})},8145:function(Y,I,n){"use strict";var c=n(3832);(0,n(2094).exportTypedArrayStaticMethod)("from",n(7321),c)},4731:function(Y,I,n){"use strict";var c=n(2094),i=n(1318).includes,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("includes",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},7209:function(Y,I,n){"use strict";var c=n(2094),i=n(1318).indexOf,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("indexOf",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},5109:function(Y,I,n){n(9843)("Int16",function(i){return function(l,h,a){return i(this,l,h,a)}})},5125:function(Y,I,n){n(9843)("Int32",function(i){return function(l,h,a){return i(this,l,h,a)}})},7145:function(Y,I,n){n(9843)("Int8",function(i){return function(l,h,a){return i(this,l,h,a)}})},6319:function(Y,I,n){"use strict";var c=n(7854),i=n(1702),o=n(6530).PROPER,l=n(2094),h=n(6992),g=n(5112)("iterator"),E=c.Uint8Array,u=i(h.values),C=i(h.keys),e=i(h.entries),f=l.aTypedArray,B=l.exportTypedArrayMethod,w=E&&E.prototype[g],Q=!!w&&"values"===w.name,p=function(){return u(f(this))};B("entries",function(){return e(f(this))}),B("keys",function(){return C(f(this))}),B("values",p,o&&!Q),B(g,p,o&&!Q)},8867:function(Y,I,n){"use strict";var c=n(2094),i=n(1702),o=c.aTypedArray,l=c.exportTypedArrayMethod,h=i([].join);l("join",function(g){return h(o(this),g)})},7789:function(Y,I,n){"use strict";var c=n(2094),i=n(2104),o=n(6583),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("lastIndexOf",function(g){var E=arguments.length;return i(o,l(this),E>1?[g,arguments[1]]:[g])})},3739:function(Y,I,n){"use strict";var c=n(2094),i=n(2092).map,o=n(6304),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("map",function(g){return i(l(this),g,arguments.length>1?arguments[1]:void 0,function(E,u){return new(o(E))(u)})})},4483:function(Y,I,n){"use strict";var c=n(2094),i=n(3671).right,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("reduceRight",function(a){var g=arguments.length;return i(o(this),a,g,g>1?arguments[1]:void 0)})},9368:function(Y,I,n){"use strict";var c=n(2094),i=n(3671).left,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("reduce",function(a){var g=arguments.length;return i(o(this),a,g,g>1?arguments[1]:void 0)})},2056:function(Y,I,n){"use strict";var c=n(2094),i=c.aTypedArray,l=Math.floor;(0,c.exportTypedArrayMethod)("reverse",function(){for(var C,a=this,g=i(a).length,E=l(g/2),u=0;u1?arguments[1]:void 0,1),w=this.length,Q=h(f),p=o(Q),S=0;if(p+B>w)throw g("Wrong length");for(;SB;)Q[B]=e[B++];return Q},o(function(){new Int8Array(1).slice()}))},7462:function(Y,I,n){"use strict";var c=n(2094),i=n(2092).some,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("some",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},3824:function(Y,I,n){"use strict";var c=n(7854),i=n(1702),o=n(7293),l=n(9662),h=n(4362),a=n(2094),g=n(8886),E=n(256),u=n(7392),C=n(8008),e=c.Array,f=a.aTypedArray,B=a.exportTypedArrayMethod,w=c.Uint16Array,Q=w&&i(w.prototype.sort),p=!(!Q||o(function(){Q(new w(2),null)})&&o(function(){Q(new w(2),{})})),S=!!Q&&!o(function(){if(u)return u<74;if(g)return g<67;if(E)return!0;if(C)return C<602;var D,U,d=new w(516),v=e(516);for(D=0;D<516;D++)U=D%4,d[D]=515-D,v[D]=D-2*U+3;for(Q(d,function(T,F){return(T/4|0)-(F/4|0)}),D=0;D<516;D++)if(d[D]!==v[D])return!0});B("sort",function(v){return void 0!==v&&l(v),S?Q(this,v):h(f(this),(d=v,function(v,D){return void 0!==d?+d(v,D)||0:D!=D?-1:v!=v?1:0===v&&0===D?1/v>0&&1/D<0?1:-1:v>D}));var d},!S||p)},5021:function(Y,I,n){"use strict";var c=n(2094),i=n(7466),o=n(1400),l=n(6304),h=c.aTypedArray;(0,c.exportTypedArrayMethod)("subarray",function(E,u){var C=h(this),e=C.length,f=o(E,e);return new(l(C))(C.buffer,C.byteOffset+f*C.BYTES_PER_ELEMENT,i((void 0===u?e:o(u,e))-f))})},2974:function(Y,I,n){"use strict";var c=n(7854),i=n(2104),o=n(2094),l=n(7293),h=n(206),a=c.Int8Array,g=o.aTypedArray,E=o.exportTypedArrayMethod,u=[].toLocaleString,C=!!a&&l(function(){u.call(new a(1))});E("toLocaleString",function(){return i(u,C?h(g(this)):g(this),h(arguments))},l(function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()})||!l(function(){a.prototype.toLocaleString.call([1,2])}))},5016:function(Y,I,n){"use strict";var c=n(2094).exportTypedArrayMethod,i=n(7293),o=n(7854),l=n(1702),h=o.Uint8Array,a=h&&h.prototype||{},g=[].toString,E=l([].join);i(function(){g.call({})})&&(g=function(){return E(this)}),c("toString",g,a.toString!=g)},8255:function(Y,I,n){n(9843)("Uint16",function(i){return function(l,h,a){return i(this,l,h,a)}})},9135:function(Y,I,n){n(9843)("Uint32",function(i){return function(l,h,a){return i(this,l,h,a)}})},2472:function(Y,I,n){n(9843)("Uint8",function(i){return function(l,h,a){return i(this,l,h,a)}})},9743:function(Y,I,n){n(9843)("Uint8",function(i){return function(l,h,a){return i(this,l,h,a)}},!0)},8628:function(Y,I,n){n(9170)},5743:function(Y,I,n){n(5837)},7314:function(Y,I,n){n(7922)},6290:function(Y,I,n){n(4668)},7479:function(Y,I,n){"use strict";var c=n(2109),i=n(8523),o=n(2534);c({target:"Promise",stat:!0},{try:function(l){var h=i.f(this),a=o(l);return(a.error?h.reject:h.resolve)(a.value),h.promise}})},3728:function(Y,I,n){n(6373)},4747:function(Y,I,n){var c=n(7854),i=n(8324),o=n(8509),l=n(8533),h=n(8880),a=function(E){if(E&&E.forEach!==l)try{h(E,"forEach",l)}catch(u){E.forEach=l}};for(var g in i)i[g]&&a(c[g]&&c[g].prototype);a(o)},3948:function(Y,I,n){var c=n(7854),i=n(8324),o=n(8509),l=n(6992),h=n(8880),a=n(5112),g=a("iterator"),E=a("toStringTag"),u=l.values,C=function(f,B){if(f){if(f[g]!==u)try{h(f,g,u)}catch(Q){f[g]=u}if(f[E]||h(f,E,B),i[B])for(var w in l)if(f[w]!==l[w])try{h(f,w,l[w])}catch(Q){f[w]=l[w]}}};for(var e in i)C(c[e]&&c[e].prototype,e);C(o,"DOMTokenList")},3753:function(Y,I,n){"use strict";var c=n(2109),i=n(6916);c({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},1150:function(Y,I,n){var c=n(7633);n(3948),Y.exports=c},251:function(Y,I,n){var c=n(2215),i=n(2584),o=n(609),l=n(8420),h=n(2847),a=n(8923),g=Date.prototype.getTime;function E(f,B,w){var Q=w||{};return!!(Q.strict?o(f,B):f===B)||(!f||!B||"object"!=typeof f&&"object"!=typeof B?Q.strict?o(f,B):f==B:function e(f,B,w){var Q,p;if(typeof f!=typeof B||u(f)||u(B)||f.prototype!==B.prototype||i(f)!==i(B))return!1;var S=l(f),m=l(B);if(S!==m)return!1;if(S||m)return f.source===B.source&&h(f)===h(B);if(a(f)&&a(B))return g.call(f)===g.call(B);var d=C(f),v=C(B);if(d!==v)return!1;if(d||v){if(f.length!==B.length)return!1;for(Q=0;Q=0;Q--)if(D[Q]!=U[Q])return!1;for(Q=D.length-1;Q>=0;Q--)if(!E(f[p=D[Q]],B[p],w))return!1;return!0}(f,B,Q))}function u(f){return null==f}function C(f){return!(!f||"object"!=typeof f||"number"!=typeof f.length||"function"!=typeof f.copy||"function"!=typeof f.slice||f.length>0&&"number"!=typeof f[0])}Y.exports=E},4289:function(Y,I,n){"use strict";var c=n(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,l=Array.prototype.concat,h=Object.defineProperty,E=h&&function(){var e={};try{for(var f in h(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(B){return!1}}(),u=function(e,f,B,w){f in e&&(!function(e){return"function"==typeof e&&"[object Function]"===o.call(e)}(w)||!w())||(E?h(e,f,{configurable:!0,enumerable:!1,value:B,writable:!0}):e[f]=B)},C=function(e,f){var B=arguments.length>2?arguments[2]:{},w=c(f);i&&(w=l.call(w,Object.getOwnPropertySymbols(f)));for(var Q=0;Q0&&R.length>T&&!R.warned){R.warned=!0;var L=new Error("Possible EventEmitter memory leak detected. "+R.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");L.name="MaxListenersExceededWarning",L.emitter=d,L.type=v,L.count=R.length,function i(d){console&&console.warn&&console.warn(d)}(L)}return d}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function C(d,v,D){var U={fired:!1,wrapFn:void 0,target:d,type:v,listener:D},T=u.bind(U);return T.listener=D,U.wrapFn=T,T}function e(d,v,D){var U=d._events;if(void 0===U)return[];var T=U[v];return void 0===T?[]:"function"==typeof T?D?[T.listener||T]:[T]:D?function Q(d){for(var v=new Array(d.length),D=0;D0&&(R=D[0]),R instanceof Error)throw R;var L=new Error("Unhandled error."+(R?" ("+R.message+")":""));throw L.context=R,L}var Z=F[v];if(void 0===Z)return!1;if("function"==typeof Z)n(Z,this,D);else{var aA=Z.length,AA=B(Z,aA);for(U=0;U=0;R--)if(U[R]===D||U[R].listener===D){L=U[R].listener,F=R;break}if(F<0)return this;0===F?U.shift():function w(d,v){for(;v+1=0;T--)this.removeListener(v,D[T]);return this},l.prototype.listeners=function(v){return e(this,v,!0)},l.prototype.rawListeners=function(v){return e(this,v,!1)},l.listenerCount=function(d,v){return"function"==typeof d.listenerCount?d.listenerCount(v):f.call(d,v)},l.prototype.listenerCount=f,l.prototype.eventNames=function(){return this._eventsCount>0?c(this._events):[]}},2536:function(Y,I,n){var c=n(4275),i=n(7672);void 0===i.pdfMake&&(i.pdfMake=c),Y.exports=c},7672:function(Y,I,n){"use strict";Y.exports=function(){if("object"==typeof globalThis)return globalThis;var c;try{c=this||new Function("return this")()}catch(i){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return c}()},9804:function(Y){var I=Object.prototype.hasOwnProperty,n=Object.prototype.toString;Y.exports=function(i,o,l){if("[object Function]"!==n.call(o))throw new TypeError("iterator must be a function");var h=i.length;if(h===+h)for(var a=0;a1&&"boolean"!=typeof aA)throw new l('"allowMissing" argument must be a boolean');var AA=F(Z),lA=AA.length>0?AA[0]:"",pA=R("%"+lA+"%",aA),cA=pA.name,gA=pA.value,BA=!1,yA=pA.alias;yA&&(lA=yA[0],d(AA,m([0,1],yA)));for(var xA=1,_=!0;xA=AA.length){var SA=a(gA,MA);gA=(_=!!SA)&&"get"in SA&&!("originalValue"in SA.get)?SA.get:gA[MA]}else _=S(gA,MA),gA=gA[MA];_&&!BA&&(B[cA]=gA)}}return gA}},1405:function(Y,I,n){"use strict";var c="undefined"!=typeof Symbol&&Symbol,i=n(5419);Y.exports=function(){return"function"==typeof c&&"function"==typeof Symbol&&"symbol"==typeof c("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:function(Y){"use strict";Y.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var n={},c=Symbol("test"),i=Object(c);if("string"==typeof c||"[object Symbol]"!==Object.prototype.toString.call(c)||"[object Symbol]"!==Object.prototype.toString.call(i))return!1;for(c in n[c]=42,n)return!1;if("function"==typeof Object.keys&&0!==Object.keys(n).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(n).length)return!1;var l=Object.getOwnPropertySymbols(n);if(1!==l.length||l[0]!==c||!Object.prototype.propertyIsEnumerable.call(n,c))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var h=Object.getOwnPropertyDescriptor(n,c);if(42!==h.value||!0!==h.enumerable)return!1}return!0}},6410:function(Y,I,n){"use strict";var c=n(5419);Y.exports=function(){return c()&&!!Symbol.toStringTag}},7642:function(Y,I,n){"use strict";var c=n(8612);Y.exports=c.call(Function.call,Object.prototype.hasOwnProperty)},688:function(Y,I,n){"use strict";var c=n(7103).Buffer;I._dbcs=u;for(var i=-1,l=-10,h=-1e3,a=new Array(256),E=0;E<256;E++)a[E]=i;function u(B,w){if(this.encodingName=B.encodingName,!B)throw new Error("DBCS codec is called without the data.");if(!B.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var Q=B.table();this.decodeTables=[],this.decodeTables[0]=a.slice(0),this.decodeTableSeq=[];for(var p=0;ph)throw new Error("gb18030 decode tables conflict at byte 2");for(var U=this.decodeTables[h-v[D]],T=129;T<=254;T++){if(U[T]===i)U[T]=h-m;else{if(U[T]===h-m)continue;if(U[T]>h)throw new Error("gb18030 decode tables conflict at byte 3")}for(var F=this.decodeTables[h-U[T]],R=48;R<=57;R++)F[R]===i&&(F[R]=-2)}}}this.defaultCharUnicode=w.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var L={};if(B.encodeSkipVals)for(p=0;pw)return-1;for(var Q=0,p=B.length;Q>1);B[S]<=w?Q=S:p=S}return Q}u.prototype.encoder=C,u.prototype.decoder=e,u.prototype._getDecodeTrieNode=function(B){for(var w=[];B>0;B>>>=8)w.push(255&B);0==w.length&&w.push(0);for(var Q=this.decodeTables[0],p=w.length-1;p>0;p--){var S=Q[w[p]];if(S==i)Q[w[p]]=h-this.decodeTables.length,this.decodeTables.push(Q=a.slice(0));else{if(!(S<=h))throw new Error("Overwrite byte in "+this.encodingName+", addr: "+B.toString(16));Q=this.decodeTables[h-S]}}return Q},u.prototype._addDecodeChunk=function(B){var w=parseInt(B[0],16),Q=this._getDecodeTrieNode(w);w&=255;for(var p=1;p255)throw new Error("Incorrect chunk in "+this.encodingName+" at addr "+B[0]+": too long"+w)},u.prototype._getEncodeBucket=function(B){var w=B>>8;return void 0===this.encodeTable[w]&&(this.encodeTable[w]=a.slice(0)),this.encodeTable[w]},u.prototype._setEncodeChar=function(B,w){var Q=this._getEncodeBucket(B),p=255&B;Q[p]<=l?this.encodeTableSeq[l-Q[p]][-1]=w:Q[p]==i&&(Q[p]=w)},u.prototype._setEncodeSequence=function(B,w){var m,Q=B[0],p=this._getEncodeBucket(Q),S=255&Q;p[S]<=l?m=this.encodeTableSeq[l-p[S]]:(m={},p[S]!==i&&(m[-1]=p[S]),p[S]=l-this.encodeTableSeq.length,this.encodeTableSeq.push(m));for(var d=1;d=0)this._setEncodeChar(v,D),S=!0;else if(v<=h){var U=h-v;m[U]||(this._fillEncodeTable(U,D<<8>>>0,Q)?S=!0:m[U]=!0)}else v<=l&&(this._setEncodeSequence(this.decodeTableSeq[l-v],D),S=!0)}return S},C.prototype.write=function(B){for(var w=c.alloc(B.length*(this.gb18030?4:3)),Q=this.leadSurrogate,p=this.seqObj,S=-1,m=0,d=0;;){if(-1===S){if(m==B.length)break;var v=B.charCodeAt(m++)}else v=S,S=-1;if(55296<=v&&v<57344)if(v<56320){if(-1===Q){Q=v;continue}Q=v,v=i}else-1!==Q?(v=65536+1024*(Q-55296)+(v-56320),Q=-1):v=i;else-1!==Q&&(S=v,v=i,Q=-1);var D=i;if(void 0!==p&&v!=i){var U=p[v];if("object"==typeof U){p=U;continue}"number"==typeof U?D=U:null==U&&void 0!==(U=p[-1])&&(D=U,S=v),p=void 0}else if(v>=0){var T=this.encodeTable[v>>8];if(void 0!==T&&(D=T[255&v]),D<=l){p=this.encodeTableSeq[l-D];continue}if(D==i&&this.gb18030){var F=f(this.gb18030.uChars,v);if(-1!=F){D=this.gb18030.gbChars[F]+(v-this.gb18030.uChars[F]),w[d++]=129+Math.floor(D/12600),D%=12600,w[d++]=48+Math.floor(D/1260),D%=1260,w[d++]=129+Math.floor(D/10),w[d++]=48+(D%=10);continue}}}D===i&&(D=this.defaultCharSingleByte),D<256?w[d++]=D:D<65536?(w[d++]=D>>8,w[d++]=255&D):D<16777216?(w[d++]=D>>16,w[d++]=D>>8&255,w[d++]=255&D):(w[d++]=D>>>24,w[d++]=D>>>16&255,w[d++]=D>>>8&255,w[d++]=255&D)}return this.seqObj=p,this.leadSurrogate=Q,w.slice(0,d)},C.prototype.end=function(){if(-1!==this.leadSurrogate||void 0!==this.seqObj){var B=c.alloc(10),w=0;if(this.seqObj){var Q=this.seqObj[-1];void 0!==Q&&(Q<256?B[w++]=Q:(B[w++]=Q>>8,B[w++]=255&Q)),this.seqObj=void 0}return-1!==this.leadSurrogate&&(B[w++]=this.defaultCharSingleByte,this.leadSurrogate=-1),B.slice(0,w)}},C.prototype.findIdx=f,e.prototype.write=function(B){for(var w=c.alloc(2*B.length),Q=this.nodeIdx,p=this.prevBytes,S=this.prevBytes.length,m=-this.prevBytes.length,v=0,D=0;v=0?B[v]:p[v+S];if(!((d=this.decodeTables[Q][U])>=0))if(d===i)d=this.defaultCharUnicode.charCodeAt(0),v=m;else if(-2===d){if(v>=3)var T=12600*(B[v-3]-129)+1260*(B[v-2]-48)+10*(B[v-1]-129)+(U-48);else T=12600*(p[v-3+S]-129)+1260*((v-2>=0?B[v-2]:p[v-2+S])-48)+10*((v-1>=0?B[v-1]:p[v-1+S])-129)+(U-48);var F=f(this.gb18030.gbChars,T);d=this.gb18030.uChars[F]+T-this.gb18030.gbChars[F]}else{if(d<=h){Q=h-d;continue}if(!(d<=l))throw new Error("iconv-lite internal error: invalid decoding table value "+d+" at "+Q+"/"+U);for(var R=this.decodeTableSeq[l-d],L=0;L>8;d=R[R.length-1]}if(d>=65536){var Z=55296|(d-=65536)>>10;w[D++]=255&Z,w[D++]=Z>>8,d=56320|1023&d}w[D++]=255&d,w[D++]=d>>8,Q=0,m=v+1}return this.nodeIdx=Q,this.prevBytes=m>=0?Array.prototype.slice.call(B,m):p.slice(m+S).concat(Array.prototype.slice.call(B)),w.slice(0,D).toString("ucs2")},e.prototype.end=function(){for(var B="";this.prevBytes.length>0;){B+=this.defaultCharUnicode;var w=this.prevBytes.slice(1);this.prevBytes=[],this.nodeIdx=0,w.length>0&&(B+=this.write(w))}return this.prevBytes=[],this.nodeIdx=0,B}},5990:function(Y,I,n){"use strict";Y.exports={shiftjis:{type:"_dbcs",table:function(){return n(7014)},encodeAdd:{"\xa5":92,"\u203e":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis",932:"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return n(5633)},encodeAdd:{"\xa5":92,"\u203e":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936",936:"cp936",cp936:{type:"_dbcs",table:function(){return n(3336)}},gbk:{type:"_dbcs",table:function(){return n(3336).concat(n(4346))}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return n(3336).concat(n(4346))},gb18030:function(){return n(6258)},encodeSkipVals:[128],encodeAdd:{"\u20ac":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949",949:"cp949",cp949:{type:"_dbcs",table:function(){return n(7348)}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950",950:"cp950",cp950:{type:"_dbcs",table:function(){return n(4284)}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return n(4284).concat(n(3480))},encodeSkipVals:[36457,36463,36478,36523,36532,36557,36560,36695,36713,36718,36811,36862,36973,36986,37060,37084,37105,37311,37551,37552,37553,37554,37585,37959,38090,38361,38652,39285,39798,39800,39803,39878,39902,39916,39926,40002,40019,40034,40040,40043,40055,40124,40125,40144,40279,40282,40388,40431,40443,40617,40687,40701,40800,40907,41079,41180,41183,36812,37576,38468,38637,41636,41637,41639,41638,41676,41678]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}},6934:function(Y,I,n){"use strict";for(var c=[n(1025),n(7688),n(1279),n(758),n(9068),n(3769),n(7018),n(688),n(5990)],i=0;i>>6),C[e++]=128+(63&B)):(C[e++]=224+(B>>>12),C[e++]=128+(B>>>6&63),C[e++]=128+(63&B))}return C.slice(0,e)},g.prototype.end=function(){},E.prototype.write=function(u){for(var C=this.acc,e=this.contBytes,f=this.accBytes,B="",w=0;w0&&(B+=this.defaultCharUnicode,e=0),Q<128?B+=String.fromCharCode(Q):Q<224?(C=31&Q,e=1,f=1):Q<240?(C=15&Q,e=2,f=1):B+=this.defaultCharUnicode):e>0?(C=C<<6|63&Q,f++,0==--e&&(B+=2===f&&C<128&&C>0||3===f&&C<2048?this.defaultCharUnicode:String.fromCharCode(C))):B+=this.defaultCharUnicode}return this.acc=C,this.contBytes=e,this.accBytes=f,B},E.prototype.end=function(){var u=0;return this.contBytes>0&&(u+=this.defaultCharUnicode),u}},9068:function(Y,I,n){"use strict";var c=n(7103).Buffer;function i(h,a){if(!h)throw new Error("SBCS codec is called without the data.");if(!h.chars||128!==h.chars.length&&256!==h.chars.length)throw new Error("Encoding '"+h.type+"' has incorrect 'chars' (must be of len 128 or 256)");if(128===h.chars.length){for(var g="",E=0;E<128;E++)g+=String.fromCharCode(E);h.chars=g+h.chars}this.decodeBuf=c.from(h.chars,"ucs2");var u=c.alloc(65536,a.defaultCharSingleByte.charCodeAt(0));for(E=0;E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\xb0\xb7\u2219\u221a\u2592\u2500\u2502\u253c\u2524\u252c\u251c\u2534\u2510\u250c\u2514\u2518\u03b2\u221e\u03c6\xb1\xbd\xbc\u2248\xab\xbb\ufef7\ufef8\ufffd\ufffd\ufefb\ufefc\ufffd\xa0\xad\ufe82\xa3\xa4\ufe84\ufffd\ufffd\ufe8e\ufe8f\ufe95\ufe99\u060c\ufe9d\ufea1\ufea5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\ufed1\u061b\ufeb1\ufeb5\ufeb9\u061f\xa2\ufe80\ufe81\ufe83\ufe85\ufeca\ufe8b\ufe8d\ufe91\ufe93\ufe97\ufe9b\ufe9f\ufea3\ufea7\ufea9\ufeab\ufead\ufeaf\ufeb3\ufeb7\ufebb\ufebf\ufec1\ufec5\ufecb\ufecf\xa6\xac\xf7\xd7\ufec9\u0640\ufed3\ufed7\ufedb\ufedf\ufee3\ufee7\ufeeb\ufeed\ufeef\ufef3\ufebd\ufecc\ufece\ufecd\ufee1\ufe7d\u0651\ufee5\ufee9\ufeec\ufef0\ufef2\ufed0\ufed5\ufef5\ufef6\ufedd\ufed9\ufef1\u25a0\ufffd"},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xf8\xa3\xd8\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xa4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0401\u0451\u0404\u0454\u0407\u0457\u040e\u045e\xb0\u2219\xb7\u221a\u2116\xa4\u25a0\xa0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0386\ufffd\xb7\xac\xa6\u2018\u2019\u0388\u2015\u0389\u038a\u03aa\u038c\ufffd\ufffd\u038e\u03ab\xa9\u038f\xb2\xb3\u03ac\xa3\u03ad\u03ae\u03af\u03ca\u0390\u03cc\u03cd\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xbd\u0398\u0399\xab\xbb\u2591\u2592\u2593\u2502\u2524\u039a\u039b\u039c\u039d\u2563\u2551\u2557\u255d\u039e\u039f\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u03a0\u03a1\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03b1\u03b2\u03b3\u2518\u250c\u2588\u2584\u03b4\u03b5\u2580\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c3\u03c2\u03c4\u0384\xad\xb1\u03c5\u03c6\u03c7\xa7\u03c8\u0385\xb0\xa8\u03c9\u03cb\u03b0\u03ce\u25a0\xa0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\u203e\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\u0160\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\u017d\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\u0161\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\u017e\xff"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\ufe88\xd7\xf7\uf8f6\uf8f5\uf8f4\uf8f7\ufe71\x88\u25a0\u2502\u2500\u2510\u250c\u2514\u2518\ufe79\ufe7b\ufe7d\ufe7f\ufe77\ufe8a\ufef0\ufef3\ufef2\ufece\ufecf\ufed0\ufef6\ufef8\ufefa\ufefc\xa0\uf8fa\uf8f9\uf8f8\xa4\uf8fb\ufe8b\ufe91\ufe97\ufe9b\ufe9f\ufea3\u060c\xad\ufea7\ufeb3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\ufeb7\u061b\ufebb\ufebf\ufeca\u061f\ufecb\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\ufec7\u0639\u063a\ufecc\ufe82\ufe84\ufe8e\ufed3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064a\u064b\u064c\u064d\u064e\u064f\u0650\u0651\u0652\ufed7\ufedb\ufedf\uf8fc\ufef5\ufef7\ufef9\ufefb\ufee3\ufee7\ufeec\ufee9\ufffd"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040a\u040b\u040c\xad\u040e\u040f\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045a\u045b\u045c\xa7\u045e\u045f"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xb7\u221a\u2116\xa4\u25a0\xa0"},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\u0153\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\u0178\xb5\xb6\xb7\u0152\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\u0102\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\u0300\xcd\xce\xcf\u0110\xd1\u0309\xd3\xd4\u01a0\xd6\xd7\xd8\xd9\xda\xdb\xdc\u01af\u0303\xdf\xe0\xe1\xe2\u0103\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\u0301\xed\xee\xef\u0111\xf1\u0323\xf3\xf4\u01a1\xf6\xf7\xf8\xf9\xfa\xfb\xfc\u01b0\u20ab\xff"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0e81\u0e82\u0e84\u0e87\u0e88\u0eaa\u0e8a\u0e8d\u0e94\u0e95\u0e96\u0e97\u0e99\u0e9a\u0e9b\u0e9c\u0e9d\u0e9e\u0e9f\u0ea1\u0ea2\u0ea3\u0ea5\u0ea7\u0eab\u0ead\u0eae\ufffd\ufffd\ufffd\u0eaf\u0eb0\u0eb2\u0eb3\u0eb4\u0eb5\u0eb6\u0eb7\u0eb8\u0eb9\u0ebc\u0eb1\u0ebb\u0ebd\ufffd\ufffd\ufffd\u0ec0\u0ec1\u0ec2\u0ec3\u0ec4\u0ec8\u0ec9\u0eca\u0ecb\u0ecc\u0ecd\u0ec6\ufffd\u0edc\u0edd\u20ad\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0ed0\u0ed1\u0ed2\u0ed3\u0ed4\u0ed5\u0ed6\u0ed7\u0ed8\u0ed9\ufffd\ufffd\xa2\xac\xa6\ufffd"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0e48\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\u0e49\u0e4a\u0e4b\u20ac\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\xa2\xac\xa6\xa0"},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"\u20ac\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\u2018\u2019\u201c\u201d\u2022\u2013\u2014\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufffd\ufffd\ufffd\ufffd\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\ufffd\ufffd\ufffd\ufffd"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\u20ac\xa5\xa6\xa7\u0153\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\u0178\xb5\xb6\xb7\u0152\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\u0102\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\u0300\xcd\xce\xcf\u0110\xd1\u0309\xd3\xd4\u01a0\xd6\xd7\xd8\xd9\xda\xdb\xdc\u01af\u0303\xdf\xe0\xe1\xe2\u0103\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\u0301\xed\xee\xef\u0111\xf1\u0323\xf3\xf4\u01a1\xf6\xf7\xf8\xf9\xfa\xfb\xfc\u01b0\u20ab\xff"},ibm1163:"cp1163",csibm1163:"cp1163",maccroatian:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017d\xd8\u221e\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220f\u0161\u222b\xaa\xba\u2126\u017e\xf8\xbf\xa1\xac\u221a\u0192\u2248\u0106\xab\u010c\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\ufffd\xa9\u2044\xa4\u2039\u203a\xc6\xbb\u2013\xb7\u201a\u201e\u2030\xc2\u0107\xc1\u010d\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u03c0\xcb\u02da\xb8\xca\xe6\u02c7"},maccyrillic:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\xa2\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\xa4"},macgreek:{type:"_sbcs",chars:"\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\xad\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039b\u039e\u03a0\xdf\xae\xa9\u03a3\u03aa\xa7\u2260\xb0\u0387\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039a\u039c\u03a6\u03ab\u03a8\u03a9\u03ac\u039d\xac\u039f\u03a1\u2248\u03a4\xab\xbb\u2026\xa0\u03a5\u03a7\u0386\u0388\u0153\u2013\u2015\u201c\u201d\u2018\u2019\xf7\u0389\u038a\u038c\u038e\u03ad\u03ae\u03af\u03cc\u038f\u03cd\u03b1\u03b2\u03c8\u03b4\u03b5\u03c6\u03b3\u03b7\u03b9\u03be\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03ce\u03c1\u03c3\u03c4\u03b8\u03c9\u03c2\u03c7\u03c5\u03b6\u03ca\u03cb\u0390\u03b0\ufffd"},maciceland:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\xd0\xf0\xde\xfe\xfd\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macroman:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macromania:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u015e\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\u0103\u015f\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\u2039\u203a\u0162\u0163\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macthai:{type:"_sbcs",chars:"\xab\xbb\u2026\uf88c\uf88f\uf892\uf895\uf898\uf88b\uf88e\uf891\uf894\uf897\u201c\u201d\uf899\ufffd\u2022\uf884\uf889\uf885\uf886\uf887\uf888\uf88a\uf88d\uf890\uf893\uf896\u2018\u2019\ufffd\xa0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufeff\u200b\u2013\u2014\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u2122\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\xae\xa9\ufffd\ufffd\ufffd\ufffd"},macturkish:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u011e\u011f\u0130\u0131\u015e\u015f\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\ufffd\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macukraine:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\u0490\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\xa4"},koi8r:{type:"_sbcs",chars:"\u2500\u2502\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2580\u2584\u2588\u258c\u2590\u2591\u2592\u2593\u2320\u25a0\u2219\u221a\u2248\u2264\u2265\xa0\u2321\xb0\xb2\xb7\xf7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255a\u255b\u255c\u255d\u255e\u255f\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256a\u256b\u256c\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},koi8u:{type:"_sbcs",chars:"\u2500\u2502\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2580\u2584\u2588\u258c\u2590\u2591\u2592\u2593\u2320\u25a0\u2219\u221a\u2248\u2264\u2265\xa0\u2321\xb0\xb2\xb7\xf7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255a\u255b\u0491\u255d\u255e\u255f\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256a\u0490\u256c\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},koi8ru:{type:"_sbcs",chars:"\u2500\u2502\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2580\u2584\u2588\u258c\u2590\u2591\u2592\u2593\u2320\u25a0\u2219\u221a\u2248\u2264\u2265\xa0\u2321\xb0\xb2\xb7\xf7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255a\u255b\u0491\u045e\u255e\u255f\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256a\u0490\u040e\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},koi8t:{type:"_sbcs",chars:"\u049b\u0493\u201a\u0492\u201e\u2026\u2020\u2021\ufffd\u2030\u04b3\u2039\u04b2\u04b7\u04b6\ufffd\u049a\u2018\u2019\u201c\u201d\u2022\u2013\u2014\ufffd\u2122\ufffd\u203a\ufffd\ufffd\ufffd\ufffd\ufffd\u04ef\u04ee\u0451\xa4\u04e3\xa6\xa7\ufffd\ufffd\ufffd\xab\xac\xad\xae\ufffd\xb0\xb1\xb2\u0401\ufffd\u04e2\xb6\xb7\ufffd\u2116\ufffd\xbb\ufffd\ufffd\ufffd\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},armscii8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\ufffd\u0587\u0589)(\xbb\xab\u2014.\u055d,-\u058a\u2026\u055c\u055b\u055e\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053a\u056a\u053b\u056b\u053c\u056c\u053d\u056d\u053e\u056e\u053f\u056f\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054a\u057a\u054b\u057b\u054c\u057c\u054d\u057d\u054e\u057e\u054f\u057f\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055a\ufffd"},rk1048:{type:"_sbcs",chars:"\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u049a\u04ba\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\ufffd\u2122\u0459\u203a\u045a\u049b\u04bb\u045f\xa0\u04b0\u04b1\u04d8\xa4\u04e8\xa6\xa7\u0401\xa9\u0492\xab\xac\xad\xae\u04ae\xb0\xb1\u0406\u0456\u04e9\xb5\xb6\xb7\u0451\u2116\u0493\xbb\u04d9\u04a2\u04a3\u04af\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"},tcvn:{type:"_sbcs",chars:"\0\xda\u1ee4\x03\u1eea\u1eec\u1eee\x07\b\t\n\v\f\r\x0e\x0f\x10\u1ee8\u1ef0\u1ef2\u1ef6\u1ef8\xdd\u1ef4\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\xc0\u1ea2\xc3\xc1\u1ea0\u1eb6\u1eac\xc8\u1eba\u1ebc\xc9\u1eb8\u1ec6\xcc\u1ec8\u0128\xcd\u1eca\xd2\u1ece\xd5\xd3\u1ecc\u1ed8\u1edc\u1ede\u1ee0\u1eda\u1ee2\xd9\u1ee6\u0168\xa0\u0102\xc2\xca\xd4\u01a0\u01af\u0110\u0103\xe2\xea\xf4\u01a1\u01b0\u0111\u1eb0\u0300\u0309\u0303\u0301\u0323\xe0\u1ea3\xe3\xe1\u1ea1\u1eb2\u1eb1\u1eb3\u1eb5\u1eaf\u1eb4\u1eae\u1ea6\u1ea8\u1eaa\u1ea4\u1ec0\u1eb7\u1ea7\u1ea9\u1eab\u1ea5\u1ead\xe8\u1ec2\u1ebb\u1ebd\xe9\u1eb9\u1ec1\u1ec3\u1ec5\u1ebf\u1ec7\xec\u1ec9\u1ec4\u1ebe\u1ed2\u0129\xed\u1ecb\xf2\u1ed4\u1ecf\xf5\xf3\u1ecd\u1ed3\u1ed5\u1ed7\u1ed1\u1ed9\u1edd\u1edf\u1ee1\u1edb\u1ee3\xf9\u1ed6\u1ee7\u0169\xfa\u1ee5\u1eeb\u1eed\u1eef\u1ee9\u1ef1\u1ef3\u1ef7\u1ef9\xfd\u1ef5\u1ed0"},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\x8d\x8e\x8f\x90\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\x9d\x9e\u0178\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\u10d0\u10d1\u10d2\u10d3\u10d4\u10d5\u10d6\u10d7\u10d8\u10d9\u10da\u10db\u10dc\u10dd\u10de\u10df\u10e0\u10e1\u10e2\u10e3\u10e4\u10e5\u10e6\u10e7\u10e8\u10e9\u10ea\u10eb\u10ec\u10ed\u10ee\u10ef\u10f0\u10f1\u10f2\u10f3\u10f4\u10f5\u10f6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\x8d\x8e\x8f\x90\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\x9d\x9e\u0178\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\u10d0\u10d1\u10d2\u10d3\u10d4\u10d5\u10d6\u10f1\u10d7\u10d8\u10d9\u10da\u10db\u10dc\u10f2\u10dd\u10de\u10df\u10e0\u10e1\u10e2\u10f3\u10e3\u10e4\u10e5\u10e6\u10e7\u10e8\u10e9\u10ea\u10eb\u10ec\u10ed\u10ee\u10f4\u10ef\u10f0\u10f5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04ee\u0493\u201e\u2026\u04b6\u04ae\u04b2\u04af\u04a0\u04e2\u04a2\u049a\u04ba\u04b8\u0497\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u04b3\u04b7\u04a1\u04e3\u04a3\u049b\u04bb\u04b9\xa0\u040e\u045e\u0408\u04e8\u0498\u04b0\xa7\u0401\xa9\u04d8\xab\xac\u04ef\xae\u049c\xb0\u04b1\u0406\u0456\u0499\u04e9\xb6\xb7\u0451\u2116\u04d9\xbb\u0458\u04aa\u04ab\u049d\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"},viscii:{type:"_sbcs",chars:"\0\x01\u1eb2\x03\x04\u1eb4\u1eaa\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\u1ef6\x15\x16\x17\x18\u1ef8\x1a\x1b\x1c\x1d\u1ef4\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\u1ea0\u1eae\u1eb0\u1eb6\u1ea4\u1ea6\u1ea8\u1eac\u1ebc\u1eb8\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1ee2\u1eda\u1edc\u1ede\u1eca\u1ece\u1ecc\u1ec8\u1ee6\u0168\u1ee4\u1ef2\xd5\u1eaf\u1eb1\u1eb7\u1ea5\u1ea7\u1ea9\u1ead\u1ebd\u1eb9\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ed1\u1ed3\u1ed5\u1ed7\u1ee0\u01a0\u1ed9\u1edd\u1edf\u1ecb\u1ef0\u1ee8\u1eea\u1eec\u01a1\u1edb\u01af\xc0\xc1\xc2\xc3\u1ea2\u0102\u1eb3\u1eb5\xc8\xc9\xca\u1eba\xcc\xcd\u0128\u1ef3\u0110\u1ee9\xd2\xd3\xd4\u1ea1\u1ef7\u1eeb\u1eed\xd9\xda\u1ef9\u1ef5\xdd\u1ee1\u01b0\xe0\xe1\xe2\xe3\u1ea3\u0103\u1eef\u1eab\xe8\xe9\xea\u1ebb\xec\xed\u0129\u1ec9\u0111\u1ef1\xf2\xf3\xf4\xf5\u1ecf\u1ecd\u1ee5\xf9\xfa\u0169\u1ee7\xfd\u1ee3\u1eee"},iso646cn:{type:"_sbcs",chars:"\0\x01\x02\x03\x04\x05\x06\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#\xa5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\u203e\x7f\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"},iso646jp:{type:"_sbcs",chars:"\0\x01\x02\x03\x04\x05\x06\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xa5]^_`abcdefghijklmnopqrstuvwxyz{|}\u203e\x7f\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xc0\xc2\xc8\xca\xcb\xce\xcf\xb4\u02cb\u02c6\xa8\u02dc\xd9\xdb\u20a4\xaf\xdd\xfd\xb0\xc7\xe7\xd1\xf1\xa1\xbf\xa4\xa3\xa5\xa7\u0192\xa2\xe2\xea\xf4\xfb\xe1\xe9\xf3\xfa\xe0\xe8\xf2\xf9\xe4\xeb\xf6\xfc\xc5\xee\xd8\xc6\xe5\xed\xf8\xe6\xc4\xec\xd6\xdc\xc9\xef\xdf\xd4\xc1\xc3\xe3\xd0\xf0\xcd\xcc\xd3\xd2\xd5\xf5\u0160\u0161\xda\u0178\xff\xde\xfe\xb7\xb5\xb6\xbe\u2014\xbc\xbd\xaa\xba\xab\u25a0\xbb\xb1\ufffd"},macintosh:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},ascii:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"},tis620:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufffd\ufffd\ufffd\ufffd\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\ufffd\ufffd\ufffd\ufffd"}}},3769:function(Y){"use strict";Y.exports={10029:"maccenteuro",maccenteuro:{type:"_sbcs",chars:"\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010c\xe4\u010d\u0106\u0107\xe9\u0179\u017a\u010e\xed\u010f\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011a\u011b\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012e\u012f\u012a\u2264\u2265\u012b\u0136\u2202\u2211\u0142\u013b\u013c\u013d\u013e\u0139\u013a\u0145\u0146\u0143\xac\u221a\u0144\u0147\u2206\xab\xbb\u2026\xa0\u0148\u0150\xd5\u0151\u014c\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\u014d\u0154\u0155\u0158\u2039\u203a\u0159\u0156\u0157\u0160\u201a\u201e\u0161\u015a\u015b\xc1\u0164\u0165\xcd\u017d\u017e\u016a\xd3\xd4\u016b\u016e\xda\u016f\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017b\u0141\u017c\u0122\u02c7"},808:"cp808",ibm808:"cp808",cp808:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0401\u0451\u0404\u0454\u0407\u0457\u040e\u045e\xb0\u2219\xb7\u221a\u2116\u20ac\u25a0\xa0"},mik:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u2514\u2534\u252c\u251c\u2500\u253c\u2563\u2551\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xa7\u2557\u255d\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0"},cp720:{type:"_sbcs",chars:"\x80\x81\xe9\xe2\x84\xe0\x86\xe7\xea\xeb\xe8\xef\xee\x8d\x8e\x8f\x90\u0651\u0652\xf4\xa4\u0640\xfb\xf9\u0621\u0622\u0623\u0624\xa3\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0636\u0637\u0638\u0639\u063a\u0641\xb5\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064a\u2261\u064b\u064c\u064d\u064e\u064f\u0650\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0"},ascii8bit:"ascii",usascii:"ascii",ansix34:"ascii",ansix341968:"ascii",ansix341986:"ascii",csascii:"ascii",cp367:"ascii",ibm367:"ascii",isoir6:"ascii",iso646us:"ascii",iso646irv:"ascii",us:"ascii",latin1:"iso88591",latin2:"iso88592",latin3:"iso88593",latin4:"iso88594",latin5:"iso88599",latin6:"iso885910",latin7:"iso885913",latin8:"iso885914",latin9:"iso885915",latin10:"iso885916",csisolatin1:"iso88591",csisolatin2:"iso88592",csisolatin3:"iso88593",csisolatin4:"iso88594",csisolatincyrillic:"iso88595",csisolatinarabic:"iso88596",csisolatingreek:"iso88597",csisolatinhebrew:"iso88598",csisolatin5:"iso88599",csisolatin6:"iso885910",l1:"iso88591",l2:"iso88592",l3:"iso88593",l4:"iso88594",l5:"iso88599",l6:"iso885910",l7:"iso885913",l8:"iso885914",l9:"iso885915",l10:"iso885916",isoir14:"iso646jp",isoir57:"iso646cn",isoir100:"iso88591",isoir101:"iso88592",isoir109:"iso88593",isoir110:"iso88594",isoir144:"iso88595",isoir127:"iso88596",isoir126:"iso88597",isoir138:"iso88598",isoir148:"iso88599",isoir157:"iso885910",isoir166:"tis620",isoir179:"iso885913",isoir199:"iso885914",isoir203:"iso885915",isoir226:"iso885916",cp819:"iso88591",ibm819:"iso88591",cyrillic:"iso88595",arabic:"iso88596",arabic8:"iso88596",ecma114:"iso88596",asmo708:"iso88596",greek:"iso88597",greek8:"iso88597",ecma118:"iso88597",elot928:"iso88597",hebrew:"iso88598",hebrew8:"iso88598",turkish:"iso88599",turkish8:"iso88599",thai:"iso885911",thai8:"iso885911",celtic:"iso885914",celtic8:"iso885914",isoceltic:"iso885914",tis6200:"tis620",tis62025291:"tis620",tis62025330:"tis620",1e4:"macroman",10006:"macgreek",10007:"maccyrillic",10079:"maciceland",10081:"macturkish",cspc8codepage437:"cp437",cspc775baltic:"cp775",cspc850multilingual:"cp850",cspcp852:"cp852",cspc862latinhebrew:"cp862",cpgr:"cp869",msee:"cp1250",mscyrl:"cp1251",msansi:"cp1252",msgreek:"cp1253",msturk:"cp1254",mshebr:"cp1255",msarab:"cp1256",winbaltrim:"cp1257",cp20866:"koi8r",20866:"koi8r",ibm878:"koi8r",cskoi8r:"koi8r",cp21866:"koi8u",21866:"koi8u",ibm1168:"koi8u",strk10482002:"rk1048",tcvn5712:"tcvn",tcvn57121:"tcvn",gb198880:"iso646cn",cn:"iso646cn",csiso14jisc6220ro:"iso646jp",jisc62201969ro:"iso646jp",jp:"iso646jp",cshproman8:"hproman8",r8:"hproman8",roman8:"hproman8",xroman8:"hproman8",ibm1051:"hproman8",mac:"macintosh",csmacintosh:"macintosh"}},1279:function(Y,I,n){"use strict";var c=n(7103).Buffer;function i(){}function o(){}function l(){this.overflowByte=-1}function h(u,C){this.iconv=C}function a(u,C){void 0===(u=u||{}).addBOM&&(u.addBOM=!0),this.encoder=C.iconv.getEncoder("utf-16le",u)}function g(u,C){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=u||{},this.iconv=C.iconv}function E(u,C){var e=[],f=0,B=0,w=0;A:for(var Q=0;Q=100)break A}return w>B?"utf-16be":w1114111)&&(f=B),f>=65536){var w=55296|(f-=65536)>>10;C[e++]=255&w,C[e++]=w>>8,f=56320|1023&f}return C[e++]=255&f,C[e++]=f>>8,e}function a(C,e){this.iconv=e}function g(C,e){void 0===(C=C||{}).addBOM&&(C.addBOM=!0),this.encoder=e.iconv.getEncoder(C.defaultEncoding||"utf-32le",C)}function E(C,e){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=C||{},this.iconv=e.iconv}function u(C,e){var f=[],B=0,w=0,Q=0,p=0,S=0;A:for(var m=0;m16)&&Q++,(0!==f[3]||f[2]>16)&&w++,0===f[0]&&0===f[1]&&(0!==f[2]||0!==f[3])&&S++,(0!==f[0]||0!==f[1])&&0===f[2]&&0===f[3]&&p++,f.length=0,++B>=100)break A}return S-Q>p-w?"utf-32be":S-Q0){for(;e0&&(p=this.iconv.decode(c.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",p},I.utf7imap=f,f.prototype.encoder=B,f.prototype.decoder=w,f.prototype.bomAware=!0,B.prototype.write=function(p){for(var S=this.inBase64,m=this.base64Accum,d=this.base64AccumIdx,v=c.alloc(5*p.length+10),D=0,U=0;U0&&(D+=v.write(m.slice(0,d).toString("base64").replace(/\//g,",").replace(/=+$/,""),D),d=0),v[D++]=C,S=!1),S||(v[D++]=T,T===e&&(v[D++]=C))):(S||(v[D++]=e,S=!0),S&&(m[d++]=T>>8,m[d++]=255&T,d==m.length&&(D+=v.write(m.toString("base64").replace(/\//g,","),D),d=0)))}return this.inBase64=S,this.base64AccumIdx=d,v.slice(0,D)},B.prototype.end=function(){var p=c.alloc(10),S=0;return this.inBase64&&(this.base64AccumIdx>0&&(S+=p.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),S),this.base64AccumIdx=0),p[S++]=C,this.inBase64=!1),p.slice(0,S)};var Q=g.slice();Q[",".charCodeAt(0)]=!0,w.prototype.write=function(p){for(var S="",m=0,d=this.inBase64,v=this.base64Accum,D=0;D0&&(p=this.iconv.decode(c.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",p}},5395:function(Y,I){"use strict";function c(o,l){this.encoder=o,this.addBOM=!0}function i(o,l){this.decoder=o,this.pass=!1,this.options=l||{}}I.PrependBOM=c,c.prototype.write=function(o){return this.addBOM&&(o="\ufeff"+o,this.addBOM=!1),this.encoder.write(o)},c.prototype.end=function(){return this.encoder.end()},I.StripBOM=i,i.prototype.write=function(o){var l=this.decoder.write(o);return this.pass||!l||("\ufeff"===l[0]&&(l=l.slice(1),"function"==typeof this.options.stripBOM&&this.options.stripBOM()),this.pass=!0),l},i.prototype.end=function(){return this.decoder.end()}},4914:function(Y,I,n){"use strict";var l,c=n(7103).Buffer,i=n(5395),o=Y.exports;o.encodings=null,o.defaultCharUnicode="\ufffd",o.defaultCharSingleByte="?",o.encode=function(a,g,E){a=""+(a||"");var u=o.getEncoder(g,E),C=u.write(a),e=u.end();return e&&e.length>0?c.concat([C,e]):C},o.decode=function(a,g,E){"string"==typeof a&&(o.skipDecodeWarning||(console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),o.skipDecodeWarning=!0),a=c.from(""+(a||""),"binary"));var u=o.getDecoder(g,E),C=u.write(a),e=u.end();return e?C+e:C},o.encodingExists=function(a){try{return o.getCodec(a),!0}catch(g){return!1}},o.toEncoding=o.encode,o.fromEncoding=o.decode,o._codecDataCache={},o.getCodec=function(a){o.encodings||(o.encodings=n(6934));for(var g=o._canonicalizeEncoding(a),E={};;){var u=o._codecDataCache[g];if(u)return u;var C=o.encodings[g];switch(typeof C){case"string":g=C;break;case"object":for(var e in C)E[e]=C[e];E.encodingName||(E.encodingName=g),g=C.type;break;case"function":return E.encodingName||(E.encodingName=g),u=new C(E,o),o._codecDataCache[E.encodingName]=u,u;default:throw new Error("Encoding not recognized: '"+a+"' (searched as: '"+g+"')")}}},o._canonicalizeEncoding=function(h){return(""+h).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")},o.getEncoder=function(a,g){var E=o.getCodec(a),u=new E.encoder(g,E);return E.bomAware&&g&&g.addBOM&&(u=new i.PrependBOM(u,g)),u},o.getDecoder=function(a,g){var E=o.getCodec(a),u=new E.decoder(g,E);return E.bomAware&&!(g&&!1===g.stripBOM)&&(u=new i.StripBOM(u,g)),u},o.enableStreamingAPI=function(a){if(!o.supportsStreams){var g=n(8044)(a);o.IconvLiteEncoderStream=g.IconvLiteEncoderStream,o.IconvLiteDecoderStream=g.IconvLiteDecoderStream,o.encodeStream=function(u,C){return new o.IconvLiteEncoderStream(o.getEncoder(u,C),C)},o.decodeStream=function(u,C){return new o.IconvLiteDecoderStream(o.getDecoder(u,C),C)},o.supportsStreams=!0}};try{l=n(5832)}catch(h){}l&&l.Transform?o.enableStreamingAPI(l):o.encodeStream=o.decodeStream=function(){throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}},8044:function(Y,I,n){"use strict";var c=n(7103).Buffer;Y.exports=function(i){var o=i.Transform;function l(a,g){this.conv=a,(g=g||{}).decodeStrings=!1,o.call(this,g)}function h(a,g){this.conv=a,(g=g||{}).encoding=this.encoding="utf8",o.call(this,g)}return(l.prototype=Object.create(o.prototype,{constructor:{value:l}}))._transform=function(a,g,E){if("string"!=typeof a)return E(new Error("Iconv encoding stream needs strings as its input."));try{var u=this.conv.write(a);u&&u.length&&this.push(u),E()}catch(C){E(C)}},l.prototype._flush=function(a){try{var g=this.conv.end();g&&g.length&&this.push(g),a()}catch(E){a(E)}},l.prototype.collect=function(a){var g=[];return this.on("error",a),this.on("data",function(E){g.push(E)}),this.on("end",function(){a(null,c.concat(g))}),this},(h.prototype=Object.create(o.prototype,{constructor:{value:h}}))._transform=function(a,g,E){if(!(c.isBuffer(a)||a instanceof Uint8Array))return E(new Error("Iconv decoding stream needs buffers as its input."));try{var u=this.conv.write(a);u&&u.length&&this.push(u,this.encoding),E()}catch(C){E(C)}},h.prototype._flush=function(a){try{var g=this.conv.end();g&&g.length&&this.push(g,this.encoding),a()}catch(E){a(E)}},h.prototype.collect=function(a){var g="";return this.on("error",a),this.on("data",function(E){g+=E}),this.on("end",function(){a(null,g)}),this},{IconvLiteEncoderStream:l,IconvLiteDecoderStream:h}}},645:function(Y,I){I.read=function(n,c,i,o,l){var h,a,g=8*l-o-1,E=(1<>1,C=-7,e=i?l-1:0,f=i?-1:1,B=n[c+e];for(e+=f,h=B&(1<<-C)-1,B>>=-C,C+=g;C>0;h=256*h+n[c+e],e+=f,C-=8);for(a=h&(1<<-C)-1,h>>=-C,C+=o;C>0;a=256*a+n[c+e],e+=f,C-=8);if(0===h)h=1-u;else{if(h===E)return a?NaN:1/0*(B?-1:1);a+=Math.pow(2,o),h-=u}return(B?-1:1)*a*Math.pow(2,h-o)},I.write=function(n,c,i,o,l,h){var a,g,E,u=8*h-l-1,C=(1<>1,f=23===l?Math.pow(2,-24)-Math.pow(2,-77):0,B=o?0:h-1,w=o?1:-1,Q=c<0||0===c&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(g=isNaN(c)?1:0,a=C):(a=Math.floor(Math.log(c)/Math.LN2),c*(E=Math.pow(2,-a))<1&&(a--,E*=2),(c+=a+e>=1?f/E:f*Math.pow(2,1-e))*E>=2&&(a++,E/=2),a+e>=C?(g=0,a=C):a+e>=1?(g=(c*E-1)*Math.pow(2,l),a+=e):(g=c*Math.pow(2,e-1)*Math.pow(2,l),a=0));l>=8;n[i+B]=255&g,B+=w,g/=256,l-=8);for(a=a<0;n[i+B]=255&a,B+=w,a/=256,u-=8);n[i+B-w]|=128*Q}},5717:function(Y){Y.exports="function"==typeof Object.create?function(n,c){c&&(n.super_=c,n.prototype=Object.create(c.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:function(n,c){if(c){n.super_=c;var i=function(){};i.prototype=c.prototype,n.prototype=new i,n.prototype.constructor=n}}},2584:function(Y,I,n){"use strict";var c=n(6410)(),o=n(1924)("Object.prototype.toString"),l=function(E){return!(c&&E&&"object"==typeof E&&Symbol.toStringTag in E)&&"[object Arguments]"===o(E)},h=function(E){return!!l(E)||null!==E&&"object"==typeof E&&"number"==typeof E.length&&E.length>=0&&"[object Array]"!==o(E)&&"[object Function]"===o(E.callee)},a=function(){return l(arguments)}();l.isLegacyArguments=h,Y.exports=a?l:h},8923:function(Y,I,n){"use strict";var c=Date.prototype.getDay,o=Object.prototype.toString,h=n(6410)();Y.exports=function(g){return"object"==typeof g&&null!==g&&(h?function(g){try{return c.call(g),!0}catch(E){return!1}}(g):"[object Date]"===o.call(g))}},8662:function(Y,I,n){"use strict";var g,c=Object.prototype.toString,i=Function.prototype.toString,o=/^\s*(?:function)?\*/,l=n(6410)(),h=Object.getPrototypeOf;Y.exports=function(u){if("function"!=typeof u)return!1;if(o.test(i.call(u)))return!0;if(!l)return"[object GeneratorFunction]"===c.call(u);if(!h)return!1;if(void 0===g){var e=function(){if(!l)return!1;try{return Function("return function*() {}")()}catch(E){}}();g=!!e&&h(e)}return h(u)===g}},8611:function(Y){"use strict";Y.exports=function(n){return n!=n}},360:function(Y,I,n){"use strict";var c=n(5559),i=n(4289),o=n(8611),l=n(9415),h=n(6743),a=c(l(),Number);i(a,{getPolyfill:l,implementation:o,shim:h}),Y.exports=a},9415:function(Y,I,n){"use strict";var c=n(8611);Y.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}},6743:function(Y,I,n){"use strict";var c=n(4289),i=n(9415);Y.exports=function(){var l=i();return c(Number,{isNaN:l},{isNaN:function(){return Number.isNaN!==l}}),l}},8420:function(Y,I,n){"use strict";var o,l,h,a,c=n(1924),i=n(6410)();if(i){o=c("Object.prototype.hasOwnProperty"),l=c("RegExp.prototype.exec"),h={};var g=function(){throw h};a={toString:g,valueOf:g},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=g)}var E=c("Object.prototype.toString"),u=Object.getOwnPropertyDescriptor;Y.exports=i?function(f){if(!f||"object"!=typeof f)return!1;var B=u(f,"lastIndex");if(!B||!o(B,"value"))return!1;try{l(f,a)}catch(Q){return Q===h}}:function(f){return!(!f||"object"!=typeof f&&"function"!=typeof f)&&"[object RegExp]"===E(f)}},5692:function(Y,I,n){"use strict";var c=n(9804),i=n(3083),o=n(1924),l=o("Object.prototype.toString"),h=n(6410)(),a="undefined"==typeof globalThis?n.g:globalThis,g=i(),E=o("Array.prototype.indexOf",!0)||function(Q,p){for(var S=0;S-1}return!!e&&function(Q){var p=!1;return c(C,function(S,m){if(!p)try{p=S.call(Q)===m}catch(d){}}),p}(Q)}},4244:function(Y){"use strict";var I=function(n){return n!=n};Y.exports=function(c,i){return 0===c&&0===i?1/c==1/i:!!(c===i||I(c)&&I(i))}},609:function(Y,I,n){"use strict";var c=n(4289),i=n(5559),o=n(4244),l=n(5624),h=n(2281),a=i(l(),Object);c(a,{getPolyfill:l,implementation:o,shim:h}),Y.exports=a},5624:function(Y,I,n){"use strict";var c=n(4244);Y.exports=function(){return"function"==typeof Object.is?Object.is:c}},2281:function(Y,I,n){"use strict";var c=n(5624),i=n(4289);Y.exports=function(){var l=c();return i(Object,{is:l},{is:function(){return Object.is!==l}}),l}},8987:function(Y,I,n){"use strict";var c;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,l=n(1414),h=Object.prototype.propertyIsEnumerable,a=!h.call({toString:null},"toString"),g=h.call(function(){},"prototype"),E=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(B){var w=B.constructor;return w&&w.prototype===B},C={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},e=function(){if("undefined"==typeof window)return!1;for(var B in window)try{if(!C["$"+B]&&i.call(window,B)&&null!==window[B]&&"object"==typeof window[B])try{u(window[B])}catch(w){return!0}}catch(w){return!0}return!1}();c=function(w){var Q=null!==w&&"object"==typeof w,p="[object Function]"===o.call(w),S=l(w),m=Q&&"[object String]"===o.call(w),d=[];if(!Q&&!p&&!S)throw new TypeError("Object.keys called on a non-object");var v=g&&p;if(m&&w.length>0&&!i.call(w,0))for(var D=0;D0)for(var U=0;U=0&&"[object Function]"===I.call(c.callee)),o}},4236:function(Y,I){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function c(l,h){return Object.prototype.hasOwnProperty.call(l,h)}I.assign=function(l){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var a=h.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var g in a)c(a,g)&&(l[g]=a[g])}}return l},I.shrinkBuf=function(l,h){return l.length===h?l:l.subarray?l.subarray(0,h):(l.length=h,l)};var i={arraySet:function(l,h,a,g,E){if(h.subarray&&l.subarray)l.set(h.subarray(a,a+g),E);else for(var u=0;u>>16&65535|0,a=0;0!==i;){i-=a=i>2e3?2e3:i;do{h=h+(l=l+c[o++]|0)|0}while(--a);l%=65521,h%=65521}return l|h<<16|0}},1619:function(Y){"use strict";Y.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:function(Y){"use strict";var n=function I(){for(var i,o=[],l=0;l<256;l++){i=l;for(var h=0;h<8;h++)i=1&i?3988292384^i>>>1:i>>>1;o[l]=i}return o}();Y.exports=function c(i,o,l,h){var a=n,g=h+l;i^=-1;for(var E=h;E>>8^a[255&(i^o[E])];return-1^i}},405:function(Y,I,n){"use strict";var mt,c=n(4236),i=n(342),o=n(6069),l=n(2869),h=n(8898),B=-2,yA=258,xA=262,q=666;function nA(j,XA){return j.msg=h[XA],XA}function EA(j){return(j<<1)-(j>4?9:0)}function GA(j){for(var XA=j.length;--XA>=0;)j[XA]=0}function nt(j){var XA=j.state,KA=XA.pending;KA>j.avail_out&&(KA=j.avail_out),0!==KA&&(c.arraySet(j.output,XA.pending_buf,XA.pending_out,KA,j.next_out),j.next_out+=KA,XA.pending_out+=KA,j.total_out+=KA,j.avail_out-=KA,XA.pending-=KA,0===XA.pending&&(XA.pending_out=0))}function lt(j,XA){i._tr_flush_block(j,j.block_start>=0?j.block_start:-1,j.strstart-j.block_start,XA),j.block_start=j.strstart,nt(j.strm)}function TA(j,XA){j.pending_buf[j.pending++]=XA}function it(j,XA){j.pending_buf[j.pending++]=XA>>>8&255,j.pending_buf[j.pending++]=255&XA}function vt(j,XA,KA,DA){var jA=j.avail_in;return jA>DA&&(jA=DA),0===jA?0:(j.avail_in-=jA,c.arraySet(XA,j.input,j.next_in,jA,KA),1===j.state.wrap?j.adler=o(j.adler,XA,jA,KA):2===j.state.wrap&&(j.adler=l(j.adler,XA,jA,KA)),j.next_in+=jA,j.total_in+=jA,jA)}function It(j,XA){var jA,ct,KA=j.max_chain_length,DA=j.strstart,Lt=j.prev_length,xt=j.nice_match,Rt=j.strstart>j.w_size-xA?j.strstart-(j.w_size-xA):0,Vt=j.window,Le=j.w_mask,ie=j.prev,te=j.strstart+yA,ye=Vt[DA+Lt-1],be=Vt[DA+Lt];j.prev_length>=j.good_match&&(KA>>=2),xt>j.lookahead&&(xt=j.lookahead);do{if(Vt[(jA=XA)+Lt]===be&&Vt[jA+Lt-1]===ye&&Vt[jA]===Vt[DA]&&Vt[++jA]===Vt[DA+1]){DA+=2,jA++;do{}while(Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&DALt){if(j.match_start=XA,Lt=ct,ct>=xt)break;ye=Vt[DA+Lt-1],be=Vt[DA+Lt]}}}while((XA=ie[XA&Le])>Rt&&0!=--KA);return Lt<=j.lookahead?Lt:j.lookahead}function Mt(j){var KA,DA,jA,ct,Lt,XA=j.w_size;do{if(ct=j.window_size-j.lookahead-j.strstart,j.strstart>=XA+(XA-xA)){c.arraySet(j.window,j.window,XA,XA,0),j.match_start-=XA,j.strstart-=XA,j.block_start-=XA,KA=DA=j.hash_size;do{jA=j.head[--KA],j.head[KA]=jA>=XA?jA-XA:0}while(--DA);KA=DA=XA;do{jA=j.prev[--KA],j.prev[KA]=jA>=XA?jA-XA:0}while(--DA);ct+=XA}if(0===j.strm.avail_in)break;if(DA=vt(j.strm,j.window,j.strstart+j.lookahead,ct),j.lookahead+=DA,j.lookahead+j.insert>=3)for(j.ins_h=j.window[Lt=j.strstart-j.insert],j.ins_h=(j.ins_h<=3&&(j.ins_h=(j.ins_h<=3)if(DA=i._tr_tally(j,j.strstart-j.match_start,j.match_length-3),j.lookahead-=j.match_length,j.match_length<=j.max_lazy_match&&j.lookahead>=3){j.match_length--;do{j.strstart++,j.ins_h=(j.ins_h<=3&&(j.ins_h=(j.ins_h<4096)&&(j.match_length=2)),j.prev_length>=3&&j.match_length<=j.prev_length){jA=j.strstart+j.lookahead-3,DA=i._tr_tally(j,j.strstart-1-j.prev_match,j.prev_length-3),j.lookahead-=j.prev_length-1,j.prev_length-=2;do{++j.strstart<=jA&&(j.ins_h=(j.ins_h<15&&(Lt=2,DA-=16),jA<1||jA>9||8!==KA||DA<8||DA>15||XA<0||XA>9||ct<0||ct>4)return nA(j,B);8===DA&&(DA=9);var xt=new H;return j.state=xt,xt.strm=j,xt.wrap=Lt,xt.gzhead=null,xt.w_bits=DA,xt.w_size=1<j.pending_buf_size-5&&(KA=j.pending_buf_size-5);;){if(j.lookahead<=1){if(Mt(j),0===j.lookahead&&0===XA)return 1;if(0===j.lookahead)break}j.strstart+=j.lookahead,j.lookahead=0;var DA=j.block_start+KA;if((0===j.strstart||j.strstart>=DA)&&(j.lookahead=j.strstart-DA,j.strstart=DA,lt(j,!1),0===j.strm.avail_out)||j.strstart-j.block_start>=j.w_size-xA&&(lt(j,!1),0===j.strm.avail_out))return 1}return j.insert=0,4===XA?(lt(j,!0),0===j.strm.avail_out?3:4):(j.strstart>j.block_start&<(j,!1),1)}),new dt(4,4,8,4,qA),new dt(4,5,16,8,qA),new dt(4,6,32,32,qA),new dt(4,4,16,16,at),new dt(8,16,32,32,at),new dt(8,16,128,128,at),new dt(8,32,128,256,at),new dt(32,128,258,1024,at),new dt(32,258,258,4096,at)],I.deflateInit=function RA(j,XA){return wA(j,XA,8,15,8,0)},I.deflateInit2=wA,I.deflateReset=b,I.deflateResetKeep=k,I.deflateSetHeader=function CA(j,XA){return j&&j.state&&2===j.state.wrap?(j.state.gzhead=XA,0):B},I.deflate=function rA(j,XA){var KA,DA,jA,ct;if(!j||!j.state||XA>5||XA<0)return j?nA(j,B):B;if(DA=j.state,!j.output||!j.input&&0!==j.avail_in||DA.status===q&&4!==XA)return nA(j,0===j.avail_out?-5:B);if(DA.strm=j,KA=DA.last_flush,DA.last_flush=XA,42===DA.status)if(2===DA.wrap)j.adler=0,TA(DA,31),TA(DA,139),TA(DA,8),DA.gzhead?(TA(DA,(DA.gzhead.text?1:0)+(DA.gzhead.hcrc?2:0)+(DA.gzhead.extra?4:0)+(DA.gzhead.name?8:0)+(DA.gzhead.comment?16:0)),TA(DA,255&DA.gzhead.time),TA(DA,DA.gzhead.time>>8&255),TA(DA,DA.gzhead.time>>16&255),TA(DA,DA.gzhead.time>>24&255),TA(DA,9===DA.level?2:DA.strategy>=2||DA.level<2?4:0),TA(DA,255&DA.gzhead.os),DA.gzhead.extra&&DA.gzhead.extra.length&&(TA(DA,255&DA.gzhead.extra.length),TA(DA,DA.gzhead.extra.length>>8&255)),DA.gzhead.hcrc&&(j.adler=l(j.adler,DA.pending_buf,DA.pending,0)),DA.gzindex=0,DA.status=69):(TA(DA,0),TA(DA,0),TA(DA,0),TA(DA,0),TA(DA,0),TA(DA,9===DA.level?2:DA.strategy>=2||DA.level<2?4:0),TA(DA,3),DA.status=113);else{var Lt=8+(DA.w_bits-8<<4)<<8;Lt|=(DA.strategy>=2||DA.level<2?0:DA.level<6?1:6===DA.level?2:3)<<6,0!==DA.strstart&&(Lt|=32),Lt+=31-Lt%31,DA.status=113,it(DA,Lt),0!==DA.strstart&&(it(DA,j.adler>>>16),it(DA,65535&j.adler)),j.adler=1}if(69===DA.status)if(DA.gzhead.extra){for(jA=DA.pending;DA.gzindex<(65535&DA.gzhead.extra.length)&&(DA.pending!==DA.pending_buf_size||(DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),nt(j),jA=DA.pending,DA.pending!==DA.pending_buf_size));)TA(DA,255&DA.gzhead.extra[DA.gzindex]),DA.gzindex++;DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),DA.gzindex===DA.gzhead.extra.length&&(DA.gzindex=0,DA.status=73)}else DA.status=73;if(73===DA.status)if(DA.gzhead.name){jA=DA.pending;do{if(DA.pending===DA.pending_buf_size&&(DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),nt(j),jA=DA.pending,DA.pending===DA.pending_buf_size)){ct=1;break}ct=DA.gzindexjA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),0===ct&&(DA.gzindex=0,DA.status=91)}else DA.status=91;if(91===DA.status)if(DA.gzhead.comment){jA=DA.pending;do{if(DA.pending===DA.pending_buf_size&&(DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),nt(j),jA=DA.pending,DA.pending===DA.pending_buf_size)){ct=1;break}ct=DA.gzindexjA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),0===ct&&(DA.status=103)}else DA.status=103;if(103===DA.status&&(DA.gzhead.hcrc?(DA.pending+2>DA.pending_buf_size&&nt(j),DA.pending+2<=DA.pending_buf_size&&(TA(DA,255&j.adler),TA(DA,j.adler>>8&255),j.adler=0,DA.status=113)):DA.status=113),0!==DA.pending){if(nt(j),0===j.avail_out)return DA.last_flush=-1,0}else if(0===j.avail_in&&EA(XA)<=EA(KA)&&4!==XA)return nA(j,-5);if(DA.status===q&&0!==j.avail_in)return nA(j,-5);if(0!==j.avail_in||0!==DA.lookahead||0!==XA&&DA.status!==q){var Rt=2===DA.strategy?function FA(j,XA){for(var KA;;){if(0===j.lookahead&&(Mt(j),0===j.lookahead)){if(0===XA)return 1;break}if(j.match_length=0,KA=i._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++,KA&&(lt(j,!1),0===j.strm.avail_out))return 1}return j.insert=0,4===XA?(lt(j,!0),0===j.strm.avail_out?3:4):j.last_lit&&(lt(j,!1),0===j.strm.avail_out)?1:2}(DA,XA):3===DA.strategy?function et(j,XA){for(var KA,DA,jA,ct,Lt=j.window;;){if(j.lookahead<=yA){if(Mt(j),j.lookahead<=yA&&0===XA)return 1;if(0===j.lookahead)break}if(j.match_length=0,j.lookahead>=3&&j.strstart>0&&(DA=Lt[jA=j.strstart-1])===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]){ct=j.strstart+yA;do{}while(DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&jAj.lookahead&&(j.match_length=j.lookahead)}if(j.match_length>=3?(KA=i._tr_tally(j,1,j.match_length-3),j.lookahead-=j.match_length,j.strstart+=j.match_length,j.match_length=0):(KA=i._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++),KA&&(lt(j,!1),0===j.strm.avail_out))return 1}return j.insert=0,4===XA?(lt(j,!0),0===j.strm.avail_out?3:4):j.last_lit&&(lt(j,!1),0===j.strm.avail_out)?1:2}(DA,XA):mt[DA.level].func(DA,XA);if((3===Rt||4===Rt)&&(DA.status=q),1===Rt||3===Rt)return 0===j.avail_out&&(DA.last_flush=-1),0;if(2===Rt&&(1===XA?i._tr_align(DA):5!==XA&&(i._tr_stored_block(DA,0,0,!1),3===XA&&(GA(DA.head),0===DA.lookahead&&(DA.strstart=0,DA.block_start=0,DA.insert=0))),nt(j),0===j.avail_out))return DA.last_flush=-1,0}return 4!==XA?0:DA.wrap<=0?1:(2===DA.wrap?(TA(DA,255&j.adler),TA(DA,j.adler>>8&255),TA(DA,j.adler>>16&255),TA(DA,j.adler>>24&255),TA(DA,255&j.total_in),TA(DA,j.total_in>>8&255),TA(DA,j.total_in>>16&255),TA(DA,j.total_in>>24&255)):(it(DA,j.adler>>>16),it(DA,65535&j.adler)),nt(j),DA.wrap>0&&(DA.wrap=-DA.wrap),0!==DA.pending?0:1)},I.deflateEnd=function Bt(j){var XA;return j&&j.state?42!==(XA=j.state.status)&&69!==XA&&73!==XA&&91!==XA&&103!==XA&&113!==XA&&XA!==q?nA(j,B):(j.state=null,113===XA?nA(j,-3):0):B},I.deflateSetDictionary=function Yt(j,XA){var DA,jA,ct,Lt,xt,Rt,Vt,Le,KA=XA.length;if(!j||!j.state||2===(Lt=(DA=j.state).wrap)||1===Lt&&42!==DA.status||DA.lookahead)return B;for(1===Lt&&(j.adler=o(j.adler,XA,KA,0)),DA.wrap=0,KA>=DA.w_size&&(0===Lt&&(GA(DA.head),DA.strstart=0,DA.block_start=0,DA.insert=0),Le=new c.Buf8(DA.w_size),c.arraySet(Le,XA,KA-DA.w_size,DA.w_size,0),XA=Le,KA=DA.w_size),xt=j.avail_in,Rt=j.next_in,Vt=j.input,j.avail_in=KA,j.next_in=0,j.input=XA,Mt(DA);DA.lookahead>=3;){jA=DA.strstart,ct=DA.lookahead-2;do{DA.ins_h=(DA.ins_h<>>=U=D>>>24,p-=U,0==(U=D>>>16&255))aA[g++]=65535&D;else{if(!(16&U)){if(0==(64&U)){D=S[(65535&D)+(Q&(1<>>=U,p-=U),p<15&&(Q+=Z[h++]<>>=U=D>>>24,p-=U,!(16&(U=D>>>16&255))){if(0==(64&U)){D=m[(65535&D)+(Q&(1<C){i.msg="invalid distance too far back",l.mode=30;break A}if(Q>>>=U,p-=U,F>(U=g-E)){if((U=F-U)>f&&l.sane){i.msg="invalid distance too far back",l.mode=30;break A}if(R=0,L=w,0===B){if(R+=e-U,U2;)aA[g++]=L[R++],aA[g++]=L[R++],aA[g++]=L[R++],T-=3;T&&(aA[g++]=L[R++],T>1&&(aA[g++]=L[R++]))}else{R=g-F;do{aA[g++]=aA[R++],aA[g++]=aA[R++],aA[g++]=aA[R++],T-=3}while(T>2);T&&(aA[g++]=aA[R++],T>1&&(aA[g++]=aA[R++]))}break}}break}}while(h>3)<<3))-1,i.next_in=h-=T,i.next_out=g,i.avail_in=h>>24&255)+(wA>>>8&65280)+((65280&wA)<<8)+((255&wA)<<24)}function vt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new c.Buf16(320),this.work=new c.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function It(wA){var RA;return wA&&wA.state?(wA.total_in=wA.total_out=(RA=wA.state).total=0,wA.msg="",RA.wrap&&(wA.adler=1&RA.wrap),RA.mode=1,RA.last=0,RA.havedict=0,RA.dmax=32768,RA.head=null,RA.hold=0,RA.bits=0,RA.lencode=RA.lendyn=new c.Buf32(852),RA.distcode=RA.distdyn=new c.Buf32(592),RA.sane=1,RA.back=-1,0):Q}function Mt(wA){var RA;return wA&&wA.state?((RA=wA.state).wsize=0,RA.whave=0,RA.wnext=0,It(wA)):Q}function JA(wA,RA){var rA,Bt;return!wA||!wA.state||(Bt=wA.state,RA<0?(rA=0,RA=-RA):(rA=1+(RA>>4),RA<48&&(RA&=15)),RA&&(RA<8||RA>15))?Q:(null!==Bt.window&&Bt.wbits!==RA&&(Bt.window=null),Bt.wrap=rA,Bt.wbits=RA,Mt(wA))}function qA(wA,RA){var rA,Bt;return wA?(Bt=new vt,wA.state=Bt,Bt.window=null,0!==(rA=JA(wA,RA))&&(wA.state=null),rA):Q}var FA,dt,et=!0;function mt(wA){if(et){var RA;for(FA=new c.Buf32(512),dt=new c.Buf32(32),RA=0;RA<144;)wA.lens[RA++]=8;for(;RA<256;)wA.lens[RA++]=9;for(;RA<280;)wA.lens[RA++]=7;for(;RA<288;)wA.lens[RA++]=8;for(h(1,wA.lens,0,288,FA,0,wA.work,{bits:9}),RA=0;RA<32;)wA.lens[RA++]=5;h(2,wA.lens,0,32,dt,0,wA.work,{bits:5}),et=!1}wA.lencode=FA,wA.lenbits=9,wA.distcode=dt,wA.distbits=5}function OA(wA,RA,rA,Bt){var Yt,j=wA.state;return null===j.window&&(j.wsize=1<=j.wsize?(c.arraySet(j.window,RA,rA-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):((Yt=j.wsize-j.wnext)>Bt&&(Yt=Bt),c.arraySet(j.window,RA,rA-Bt,Yt,j.wnext),(Bt-=Yt)?(c.arraySet(j.window,RA,rA-Bt,Bt,0),j.wnext=Bt,j.whave=j.wsize):(j.wnext+=Yt,j.wnext===j.wsize&&(j.wnext=0),j.whave>>8&255,rA.check=o(rA.check,Te,2,0),jA=0,ct=0,rA.mode=2;break}if(rA.flags=0,rA.head&&(rA.head.done=!1),!(1&rA.wrap)||(((255&jA)<<8)+(jA>>8))%31){wA.msg="incorrect header check",rA.mode=30;break}if(8!=(15&jA)){wA.msg="unknown compression method",rA.mode=30;break}if(ct-=4,re=8+(15&(jA>>>=4)),0===rA.wbits)rA.wbits=re;else if(re>rA.wbits){wA.msg="invalid window size",rA.mode=30;break}rA.dmax=1<>8&1),512&rA.flags&&(Te[0]=255&jA,Te[1]=jA>>>8&255,rA.check=o(rA.check,Te,2,0)),jA=0,ct=0,rA.mode=3;case 3:for(;ct<32;){if(0===KA)break A;KA--,jA+=Bt[j++]<>>8&255,Te[2]=jA>>>16&255,Te[3]=jA>>>24&255,rA.check=o(rA.check,Te,4,0)),jA=0,ct=0,rA.mode=4;case 4:for(;ct<16;){if(0===KA)break A;KA--,jA+=Bt[j++]<>8),512&rA.flags&&(Te[0]=255&jA,Te[1]=jA>>>8&255,rA.check=o(rA.check,Te,2,0)),jA=0,ct=0,rA.mode=5;case 5:if(1024&rA.flags){for(;ct<16;){if(0===KA)break A;KA--,jA+=Bt[j++]<>>8&255,rA.check=o(rA.check,Te,2,0)),jA=0,ct=0}else rA.head&&(rA.head.extra=null);rA.mode=6;case 6:if(1024&rA.flags&&((Rt=rA.length)>KA&&(Rt=KA),Rt&&(rA.head&&(re=rA.head.extra_len-rA.length,rA.head.extra||(rA.head.extra=new Array(rA.head.extra_len)),c.arraySet(rA.head.extra,Bt,j,Rt,re)),512&rA.flags&&(rA.check=o(rA.check,Bt,Rt,j)),KA-=Rt,j+=Rt,rA.length-=Rt),rA.length))break A;rA.length=0,rA.mode=7;case 7:if(2048&rA.flags){if(0===KA)break A;Rt=0;do{re=Bt[j+Rt++],rA.head&&re&&rA.length<65536&&(rA.head.name+=String.fromCharCode(re))}while(re&&Rt>9&1,rA.head.done=!0),wA.adler=rA.check=0,rA.mode=12;break;case 10:for(;ct<32;){if(0===KA)break A;KA--,jA+=Bt[j++]<>>=7&ct,ct-=7&ct,rA.mode=27;break}for(;ct<3;){if(0===KA)break A;KA--,jA+=Bt[j++]<>>=1)){case 0:rA.mode=14;break;case 1:if(mt(rA),rA.mode=20,6===RA){jA>>>=2,ct-=2;break A}break;case 2:rA.mode=17;break;case 3:wA.msg="invalid block type",rA.mode=30}jA>>>=2,ct-=2;break;case 14:for(jA>>>=7&ct,ct-=7&ct;ct<32;){if(0===KA)break A;KA--,jA+=Bt[j++]<>>16^65535)){wA.msg="invalid stored block lengths",rA.mode=30;break}if(rA.length=65535&jA,jA=0,ct=0,rA.mode=15,6===RA)break A;case 15:rA.mode=16;case 16:if(Rt=rA.length){if(Rt>KA&&(Rt=KA),Rt>DA&&(Rt=DA),0===Rt)break A;c.arraySet(Yt,Bt,j,Rt,XA),KA-=Rt,j+=Rt,DA-=Rt,XA+=Rt,rA.length-=Rt;break}rA.mode=12;break;case 17:for(;ct<14;){if(0===KA)break A;KA--,jA+=Bt[j++]<>>=5)),ct-=5,rA.ncode=4+(15&(jA>>>=5)),jA>>>=4,ct-=4,rA.nlen>286||rA.ndist>30){wA.msg="too many length or distance symbols",rA.mode=30;break}rA.have=0,rA.mode=18;case 18:for(;rA.have>>=3,ct-=3}for(;rA.have<19;)rA.lens[bn[rA.have++]]=0;if(rA.lencode=rA.lendyn,rA.lenbits=7,en=h(0,rA.lens,0,19,rA.lencode,0,rA.work,nn={bits:rA.lenbits}),rA.lenbits=nn.bits,en){wA.msg="invalid code lengths set",rA.mode=30;break}rA.have=0,rA.mode=19;case 19:for(;rA.have>>16&255,be=65535&ie,!((te=ie>>>24)<=ct);){if(0===KA)break A;KA--,jA+=Bt[j++]<>>=te,ct-=te,rA.lens[rA.have++]=be;else{if(16===be){for(Xe=te+2;ct>>=te,ct-=te,0===rA.have){wA.msg="invalid bit length repeat",rA.mode=30;break}re=rA.lens[rA.have-1],Rt=3+(3&jA),jA>>>=2,ct-=2}else if(17===be){for(Xe=te+3;ct>>=te)),jA>>>=3,ct-=3}else{for(Xe=te+7;ct>>=te)),jA>>>=7,ct-=7}if(rA.have+Rt>rA.nlen+rA.ndist){wA.msg="invalid bit length repeat",rA.mode=30;break}for(;Rt--;)rA.lens[rA.have++]=re}}if(30===rA.mode)break;if(0===rA.lens[256]){wA.msg="invalid code -- missing end-of-block",rA.mode=30;break}if(rA.lenbits=9,en=h(1,rA.lens,0,rA.nlen,rA.lencode,0,rA.work,nn={bits:rA.lenbits}),rA.lenbits=nn.bits,en){wA.msg="invalid literal/lengths set",rA.mode=30;break}if(rA.distbits=6,rA.distcode=rA.distdyn,en=h(2,rA.lens,rA.nlen,rA.ndist,rA.distcode,0,rA.work,nn={bits:rA.distbits}),rA.distbits=nn.bits,en){wA.msg="invalid distances set",rA.mode=30;break}if(rA.mode=20,6===RA)break A;case 20:rA.mode=21;case 21:if(KA>=6&&DA>=258){wA.next_out=XA,wA.avail_out=DA,wA.next_in=j,wA.avail_in=KA,rA.hold=jA,rA.bits=ct,l(wA,xt),XA=wA.next_out,Yt=wA.output,DA=wA.avail_out,j=wA.next_in,Bt=wA.input,KA=wA.avail_in,jA=rA.hold,ct=rA.bits,12===rA.mode&&(rA.back=-1);break}for(rA.back=0;ye=(ie=rA.lencode[jA&(1<>>16&255,be=65535&ie,!((te=ie>>>24)<=ct);){if(0===KA)break A;KA--,jA+=Bt[j++]<>Re)])>>>16&255,be=65535&ie,!(Re+(te=ie>>>24)<=ct);){if(0===KA)break A;KA--,jA+=Bt[j++]<>>=Re,ct-=Re,rA.back+=Re}if(jA>>>=te,ct-=te,rA.back+=te,rA.length=be,0===ye){rA.mode=26;break}if(32&ye){rA.back=-1,rA.mode=12;break}if(64&ye){wA.msg="invalid literal/length code",rA.mode=30;break}rA.extra=15&ye,rA.mode=22;case 22:if(rA.extra){for(Xe=rA.extra;ct>>=rA.extra,ct-=rA.extra,rA.back+=rA.extra}rA.was=rA.length,rA.mode=23;case 23:for(;ye=(ie=rA.distcode[jA&(1<>>16&255,be=65535&ie,!((te=ie>>>24)<=ct);){if(0===KA)break A;KA--,jA+=Bt[j++]<>Re)])>>>16&255,be=65535&ie,!(Re+(te=ie>>>24)<=ct);){if(0===KA)break A;KA--,jA+=Bt[j++]<>>=Re,ct-=Re,rA.back+=Re}if(jA>>>=te,ct-=te,rA.back+=te,64&ye){wA.msg="invalid distance code",rA.mode=30;break}rA.offset=be,rA.extra=15&ye,rA.mode=24;case 24:if(rA.extra){for(Xe=rA.extra;ct>>=rA.extra,ct-=rA.extra,rA.back+=rA.extra}if(rA.offset>rA.dmax){wA.msg="invalid distance too far back",rA.mode=30;break}rA.mode=25;case 25:if(0===DA)break A;if(rA.offset>(Rt=xt-DA)){if((Rt=rA.offset-Rt)>rA.whave&&rA.sane){wA.msg="invalid distance too far back",rA.mode=30;break}Vt=Rt>rA.wnext?rA.wsize-(Rt-=rA.wnext):rA.wnext-Rt,Rt>rA.length&&(Rt=rA.length),Le=rA.window}else Le=Yt,Vt=XA-rA.offset,Rt=rA.length;Rt>DA&&(Rt=DA),DA-=Rt,rA.length-=Rt;do{Yt[XA++]=Le[Vt++]}while(--Rt);0===rA.length&&(rA.mode=21);break;case 26:if(0===DA)break A;Yt[XA++]=rA.length,DA--,rA.mode=21;break;case 27:if(rA.wrap){for(;ct<32;){if(0===KA)break A;KA--,jA|=Bt[j++]<=1&&0===QA[R];R--);if(L>R&&(L=R),0===R)return S[m++]=20971520,S[m++]=20971520,v.bits=1,0;for(F=1;F0&&(0===B||1!==R))return-1;for(SA[1]=0,U=1;U852||2===B&&lA>592)return 1;for(;;){q=U-aA,d[T]uA?(J=bA[ZA+d[T]],$=_[MA+d[T]]):(J=96,$=0),cA=1<>aA)+(gA-=cA)]=q<<24|J<<16|$|0}while(0!==gA);for(cA=1<>=1;if(0!==cA?(pA&=cA-1,pA+=cA):pA=0,T++,0==--QA[U]){if(U===R)break;U=w[Q+d[T]]}if(U>L&&(pA&yA)!==BA){for(0===aA&&(aA=L),xA+=F,AA=1<<(Z=U-aA);Z+aA852||2===B&&lA>592)return 1;S[BA=pA&yA]=L<<24|Z<<16|xA-m|0}}return 0!==pA&&(S[xA+pA]=4194304|U-aA<<24),v.bits=L,0}},8898:function(Y){"use strict";Y.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:function(Y,I,n){"use strict";var c=n(4236);function a(H){for(var k=H.length;--k>=0;)H[k]=0}var B=256,w=286,Q=30,m=15,R=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],L=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],Z=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],aA=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],lA=new Array(576);a(lA);var pA=new Array(60);a(pA);var cA=new Array(512);a(cA);var gA=new Array(256);a(gA);var BA=new Array(29);a(BA);var _,MA,uA,yA=new Array(Q);function xA(H,k,b,CA,wA){this.static_tree=H,this.extra_bits=k,this.extra_base=b,this.elems=CA,this.max_length=wA,this.has_stree=H&&H.length}function QA(H,k){this.dyn_tree=H,this.max_code=0,this.stat_desc=k}function SA(H){return H<256?cA[H]:cA[256+(H>>>7)]}function bA(H,k){H.pending_buf[H.pending++]=255&k,H.pending_buf[H.pending++]=k>>>8&255}function ZA(H,k,b){H.bi_valid>16-b?(H.bi_buf|=k<>16-H.bi_valid,H.bi_valid+=b-16):(H.bi_buf|=k<>>=1,b<<=1}while(--k>0);return b>>>1}function hA(H,k,b){var RA,rA,CA=new Array(16),wA=0;for(RA=1;RA<=m;RA++)CA[RA]=wA=wA+b[RA-1]<<1;for(rA=0;rA<=k;rA++){var Bt=H[2*rA+1];0!==Bt&&(H[2*rA]=J(CA[Bt]++,Bt))}}function nA(H){var k;for(k=0;k8?bA(H,H.bi_buf):H.bi_valid>0&&(H.pending_buf[H.pending++]=H.bi_buf),H.bi_buf=0,H.bi_valid=0}function nt(H,k,b,CA){var wA=2*k,RA=2*b;return H[wA]>1;rA>=1;rA--)lt(H,b,rA);j=RA;do{rA=H.heap[1],H.heap[1]=H.heap[H.heap_len--],lt(H,b,1),Bt=H.heap[1],H.heap[--H.heap_max]=rA,H.heap[--H.heap_max]=Bt,b[2*j]=b[2*rA]+b[2*Bt],H.depth[j]=(H.depth[rA]>=H.depth[Bt]?H.depth[rA]:H.depth[Bt])+1,b[2*rA+1]=b[2*Bt+1]=j,H.heap[1]=j++,lt(H,b,1)}while(H.heap_len>=2);H.heap[--H.heap_max]=H.heap[1],function W(H,k){var j,XA,KA,DA,jA,ct,b=k.dyn_tree,CA=k.max_code,wA=k.stat_desc.static_tree,RA=k.stat_desc.has_stree,rA=k.stat_desc.extra_bits,Bt=k.stat_desc.extra_base,Yt=k.stat_desc.max_length,Lt=0;for(DA=0;DA<=m;DA++)H.bl_count[DA]=0;for(b[2*H.heap[H.heap_max]+1]=0,j=H.heap_max+1;j<573;j++)(DA=b[2*b[2*(XA=H.heap[j])+1]+1]+1)>Yt&&(DA=Yt,Lt++),b[2*XA+1]=DA,!(XA>CA)&&(H.bl_count[DA]++,jA=0,XA>=Bt&&(jA=rA[XA-Bt]),H.opt_len+=(ct=b[2*XA])*(DA+jA),RA&&(H.static_len+=ct*(wA[2*XA+1]+jA)));if(0!==Lt){do{for(DA=Yt-1;0===H.bl_count[DA];)DA--;H.bl_count[DA]--,H.bl_count[DA+1]+=2,H.bl_count[Yt]--,Lt-=2}while(Lt>0);for(DA=Yt;0!==DA;DA--)for(XA=H.bl_count[DA];0!==XA;)!((KA=H.heap[--j])>CA)&&(b[2*KA+1]!==DA&&(H.opt_len+=(DA-b[2*KA+1])*b[2*KA],b[2*KA+1]=DA),XA--)}}(H,k),hA(b,Yt,H.bl_count)}function vt(H,k,b){var CA,RA,wA=-1,rA=k[1],Bt=0,Yt=7,j=4;for(0===rA&&(Yt=138,j=3),k[2*(b+1)+1]=65535,CA=0;CA<=b;CA++)RA=rA,rA=k[2*(CA+1)+1],!(++Bt>=7;CA0?(2===H.strm.data_type&&(H.strm.data_type=function qA(H){var b,k=4093624447;for(b=0;b<=31;b++,k>>>=1)if(1&k&&0!==H.dyn_ltree[2*b])return 0;if(0!==H.dyn_ltree[18]||0!==H.dyn_ltree[20]||0!==H.dyn_ltree[26])return 1;for(b=32;b=3&&0===H.bl_tree[2*aA[k]+1];k--);return H.opt_len+=3*(k+1)+5+5+4,k}(H),(RA=H.static_len+3+7>>>3)<=(wA=H.opt_len+3+7>>>3)&&(wA=RA)):wA=RA=b+5,b+4<=wA&&-1!==k?FA(H,k,b,CA):4===H.strategy||RA===wA?(ZA(H,2+(CA?1:0),3),TA(H,lA,pA)):(ZA(H,4+(CA?1:0),3),function JA(H,k,b,CA){var wA;for(ZA(H,k-257,5),ZA(H,b-1,5),ZA(H,CA-4,4),wA=0;wA>>8&255,H.pending_buf[H.d_buf+2*H.last_lit+1]=255&k,H.pending_buf[H.l_buf+H.last_lit]=255&b,H.last_lit++,0===k?H.dyn_ltree[2*b]++:(H.matches++,k--,H.dyn_ltree[2*(gA[b]+B+1)]++,H.dyn_dtree[2*SA(k)]++),H.last_lit===H.lit_bufsize-1},I._tr_align=function dt(H){ZA(H,2,3),q(H,256,lA),function $(H){16===H.bi_valid?(bA(H,H.bi_buf),H.bi_buf=0,H.bi_valid=0):H.bi_valid>=8&&(H.pending_buf[H.pending++]=255&H.bi_buf,H.bi_buf>>=8,H.bi_valid-=8)}(H)}},2292:function(Y){"use strict";Y.exports=function I(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4155:function(Y){var n,c,I=Y.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function l(w){if(n===setTimeout)return setTimeout(w,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(w,0);try{return n(w,0)}catch(Q){try{return n.call(null,w,0)}catch(p){return n.call(this,w,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(w){n=i}try{c="function"==typeof clearTimeout?clearTimeout:o}catch(w){c=o}}();var E,a=[],g=!1,u=-1;function C(){!g||!E||(g=!1,E.length?a=E.concat(a):u=-1,a.length&&e())}function e(){if(!g){var w=l(C);g=!0;for(var Q=a.length;Q;){for(E=a,a=[];++u1)for(var p=1;p=0;--yA){var xA=this.tryEntries[yA],_=xA.completion;if("root"===xA.tryLoc)return BA("end");if(xA.tryLoc<=this.prev){var MA=i.call(xA,"catchLoc"),uA=i.call(xA,"finallyLoc");if(MA&&uA){if(this.prev=0;--BA){var yA=this.tryEntries[BA];if(yA.tryLoc<=this.prev&&i.call(yA,"finallyLoc")&&this.prev=0;--gA){var BA=this.tryEntries[gA];if(BA.finallyLoc===cA)return this.complete(BA.completion,BA.afterLoc),aA(BA),Q}},catch:function(cA){for(var gA=this.tryEntries.length-1;gA>=0;--gA){var BA=this.tryEntries[gA];if(BA.tryLoc===cA){var yA=BA.completion;if("throw"===yA.type){var xA=yA.arg;aA(BA)}return xA}}throw new Error("illegal catch attempt")},delegateYield:function(cA,gA,BA){return this.delegate={iterator:lA(cA),resultName:gA,nextLoc:BA},"next"===this.method&&(this.arg=o),Q}},n}(Y.exports);try{regeneratorRuntime=I}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=I:Function("r","regeneratorRuntime = r")(I)}},3697:function(Y){"use strict";var I=Object,n=TypeError;Y.exports=function(){if(null!=this&&this!==I(this))throw new n("RegExp.prototype.flags getter called on non-object");var i="";return this.hasIndices&&(i+="d"),this.global&&(i+="g"),this.ignoreCase&&(i+="i"),this.multiline&&(i+="m"),this.dotAll&&(i+="s"),this.unicode&&(i+="u"),this.sticky&&(i+="y"),i}},2847:function(Y,I,n){"use strict";var c=n(4289),i=n(5559),o=n(3697),l=n(1721),h=n(2753),a=i(l());c(a,{getPolyfill:l,implementation:o,shim:h}),Y.exports=a},1721:function(Y,I,n){"use strict";var c=n(3697),i=n(4289).supportsDescriptors,o=Object.getOwnPropertyDescriptor;Y.exports=function(){if(i&&"gim"===/a/gim.flags){var h=o(RegExp.prototype,"flags");if(h&&"function"==typeof h.get&&"boolean"==typeof/a/.dotAll)return h.get}return c}},2753:function(Y,I,n){"use strict";var c=n(4289).supportsDescriptors,i=n(1721),o=Object.getOwnPropertyDescriptor,l=Object.defineProperty,h=TypeError,a=Object.getPrototypeOf,g=/a/;Y.exports=function(){if(!c||!a)throw new h("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=i(),C=a(g),e=o(C,"flags");return(!e||e.get!==u)&&l(C,"flags",{configurable:!0,enumerable:!1,get:u}),u}},6099:function(Y,I,n){var c=n(8823).Buffer;!function(i){i.parser=function(q,J){return new l(q,J)},i.SAXParser=l,i.SAXStream=e,i.createStream=function C(q,J){return new e(q,J)},i.MAX_BUFFER_LENGTH=65536;var E,o=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function l(q,J){if(!(this instanceof l))return new l(q,J);var $=this;(function a(q){for(var J=0,$=o.length;J<$;J++)q[o[J]]=""})($),$.q=$.c="",$.bufferCheckPosition=i.MAX_BUFFER_LENGTH,$.opt=J||{},$.opt.lowercase=$.opt.lowercase||$.opt.lowercasetags,$.looseCase=$.opt.lowercase?"toLowerCase":"toUpperCase",$.tags=[],$.closed=$.closedRoot=$.sawRoot=!1,$.tag=$.error=null,$.strict=!!q,$.noscript=!(!q&&!$.opt.noscript),$.state=L.BEGIN,$.strictEntities=$.opt.strictEntities,$.ENTITIES=Object.create($.strictEntities?i.XML_ENTITIES:i.ENTITIES),$.attribList=[],$.opt.xmlns&&($.ns=Object.create(p)),$.trackPosition=!1!==$.opt.position,$.trackPosition&&($.position=$.line=$.column=0),aA($,"onready")}i.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(q){function J(){}return J.prototype=q,new J}),Object.keys||(Object.keys=function(q){var J=[];for(var $ in q)q.hasOwnProperty($)&&J.push($);return J}),l.prototype={end:function(){gA(this)},write:function ZA(q){var J=this;if(this.error)throw this.error;if(J.closed)return cA(J,"Cannot write after close. Assign an onready handler.");if(null===q)return gA(J);"object"==typeof q&&(q=q.toString());for(var $=0,W="";W=bA(q,$++),J.c=W,W;)switch(J.trackPosition&&(J.position++,"\n"===W?(J.line++,J.column=0):J.column++),J.state){case L.BEGIN:if(J.state=L.BEGIN_WHITESPACE,"\ufeff"===W)continue;SA(J,W);continue;case L.BEGIN_WHITESPACE:SA(J,W);continue;case L.TEXT:if(J.sawRoot&&!J.closedRoot){for(var hA=$-1;W&&"<"!==W&&"&"!==W;)(W=bA(q,$++))&&J.trackPosition&&(J.position++,"\n"===W?(J.line++,J.column=0):J.column++);J.textNode+=q.substring(hA,$-1)}"<"!==W||J.sawRoot&&J.closedRoot&&!J.strict?(!D(W)&&(!J.sawRoot||J.closedRoot)&&BA(J,"Text data outside of root node."),"&"===W?J.state=L.TEXT_ENTITY:J.textNode+=W):(J.state=L.OPEN_WAKA,J.startTagPosition=J.position);continue;case L.SCRIPT:"<"===W?J.state=L.SCRIPT_ENDING:J.script+=W;continue;case L.SCRIPT_ENDING:"/"===W?J.state=L.CLOSE_TAG:(J.script+="<"+W,J.state=L.SCRIPT);continue;case L.OPEN_WAKA:"!"===W?(J.state=L.SGML_DECL,J.sgmlDecl=""):D(W)||(F(S,W)?(J.state=L.OPEN_TAG,J.tagName=W):"/"===W?(J.state=L.CLOSE_TAG,J.tagName=""):"?"===W?(J.state=L.PROC_INST,J.procInstName=J.procInstBody=""):(BA(J,"Unencoded <"),J.startTagPosition+1"===W?(AA(J,"onsgmldeclaration",J.sgmlDecl),J.sgmlDecl="",J.state=L.TEXT):(U(W)&&(J.state=L.SGML_DECL_QUOTED),J.sgmlDecl+=W);continue;case L.SGML_DECL_QUOTED:W===J.q&&(J.state=L.SGML_DECL,J.q=""),J.sgmlDecl+=W;continue;case L.DOCTYPE:">"===W?(J.state=L.TEXT,AA(J,"ondoctype",J.doctype),J.doctype=!0):(J.doctype+=W,"["===W?J.state=L.DOCTYPE_DTD:U(W)&&(J.state=L.DOCTYPE_QUOTED,J.q=W));continue;case L.DOCTYPE_QUOTED:J.doctype+=W,W===J.q&&(J.q="",J.state=L.DOCTYPE);continue;case L.DOCTYPE_DTD:J.doctype+=W,"]"===W?J.state=L.DOCTYPE:U(W)&&(J.state=L.DOCTYPE_DTD_QUOTED,J.q=W);continue;case L.DOCTYPE_DTD_QUOTED:J.doctype+=W,W===J.q&&(J.state=L.DOCTYPE_DTD,J.q="");continue;case L.COMMENT:"-"===W?J.state=L.COMMENT_ENDING:J.comment+=W;continue;case L.COMMENT_ENDING:"-"===W?(J.state=L.COMMENT_ENDED,J.comment=pA(J.opt,J.comment),J.comment&&AA(J,"oncomment",J.comment),J.comment=""):(J.comment+="-"+W,J.state=L.COMMENT);continue;case L.COMMENT_ENDED:">"!==W?(BA(J,"Malformed comment"),J.comment+="--"+W,J.state=L.COMMENT):J.state=L.TEXT;continue;case L.CDATA:"]"===W?J.state=L.CDATA_ENDING:J.cdata+=W;continue;case L.CDATA_ENDING:"]"===W?J.state=L.CDATA_ENDING_2:(J.cdata+="]"+W,J.state=L.CDATA);continue;case L.CDATA_ENDING_2:">"===W?(J.cdata&&AA(J,"oncdata",J.cdata),AA(J,"onclosecdata"),J.cdata="",J.state=L.TEXT):"]"===W?J.cdata+="]":(J.cdata+="]]"+W,J.state=L.CDATA);continue;case L.PROC_INST:"?"===W?J.state=L.PROC_INST_ENDING:D(W)?J.state=L.PROC_INST_BODY:J.procInstName+=W;continue;case L.PROC_INST_BODY:if(!J.procInstBody&&D(W))continue;"?"===W?J.state=L.PROC_INST_ENDING:J.procInstBody+=W;continue;case L.PROC_INST_ENDING:">"===W?(AA(J,"onprocessinginstruction",{name:J.procInstName,body:J.procInstBody}),J.procInstName=J.procInstBody="",J.state=L.TEXT):(J.procInstBody+="?"+W,J.state=L.PROC_INST_BODY);continue;case L.OPEN_TAG:F(m,W)?J.tagName+=W:(yA(J),">"===W?MA(J):"/"===W?J.state=L.OPEN_TAG_SLASH:(D(W)||BA(J,"Invalid character in tag name"),J.state=L.ATTRIB));continue;case L.OPEN_TAG_SLASH:">"===W?(MA(J,!0),uA(J)):(BA(J,"Forward-slash in opening tag not followed by >"),J.state=L.ATTRIB);continue;case L.ATTRIB:if(D(W))continue;">"===W?MA(J):"/"===W?J.state=L.OPEN_TAG_SLASH:F(S,W)?(J.attribName=W,J.attribValue="",J.state=L.ATTRIB_NAME):BA(J,"Invalid attribute name");continue;case L.ATTRIB_NAME:"="===W?J.state=L.ATTRIB_VALUE:">"===W?(BA(J,"Attribute without value"),J.attribValue=J.attribName,_(J),MA(J)):D(W)?J.state=L.ATTRIB_NAME_SAW_WHITE:F(m,W)?J.attribName+=W:BA(J,"Invalid attribute name");continue;case L.ATTRIB_NAME_SAW_WHITE:if("="===W)J.state=L.ATTRIB_VALUE;else{if(D(W))continue;BA(J,"Attribute without value"),J.tag.attributes[J.attribName]="",J.attribValue="",AA(J,"onattribute",{name:J.attribName,value:""}),J.attribName="",">"===W?MA(J):F(S,W)?(J.attribName=W,J.state=L.ATTRIB_NAME):(BA(J,"Invalid attribute name"),J.state=L.ATTRIB)}continue;case L.ATTRIB_VALUE:if(D(W))continue;U(W)?(J.q=W,J.state=L.ATTRIB_VALUE_QUOTED):(BA(J,"Unquoted attribute value"),J.state=L.ATTRIB_VALUE_UNQUOTED,J.attribValue=W);continue;case L.ATTRIB_VALUE_QUOTED:if(W!==J.q){"&"===W?J.state=L.ATTRIB_VALUE_ENTITY_Q:J.attribValue+=W;continue}_(J),J.q="",J.state=L.ATTRIB_VALUE_CLOSED;continue;case L.ATTRIB_VALUE_CLOSED:D(W)?J.state=L.ATTRIB:">"===W?MA(J):"/"===W?J.state=L.OPEN_TAG_SLASH:F(S,W)?(BA(J,"No whitespace between attributes"),J.attribName=W,J.attribValue="",J.state=L.ATTRIB_NAME):BA(J,"Invalid attribute name");continue;case L.ATTRIB_VALUE_UNQUOTED:if(!T(W)){"&"===W?J.state=L.ATTRIB_VALUE_ENTITY_U:J.attribValue+=W;continue}_(J),">"===W?MA(J):J.state=L.ATTRIB;continue;case L.CLOSE_TAG:if(J.tagName)">"===W?uA(J):F(m,W)?J.tagName+=W:J.script?(J.script+=""===W?uA(J):BA(J,"Invalid characters in closing tag");continue;case L.TEXT_ENTITY:case L.ATTRIB_VALUE_ENTITY_Q:case L.ATTRIB_VALUE_ENTITY_U:var nA,EA;switch(J.state){case L.TEXT_ENTITY:nA=L.TEXT,EA="textNode";break;case L.ATTRIB_VALUE_ENTITY_Q:nA=L.ATTRIB_VALUE_QUOTED,EA="attribValue";break;case L.ATTRIB_VALUE_ENTITY_U:nA=L.ATTRIB_VALUE_UNQUOTED,EA="attribValue"}";"===W?(J[EA]+=QA(J),J.entity="",J.state=nA):F(J.entity.length?v:d,W)?J.entity+=W:(BA(J,"Invalid character in entity name"),J[EA]+="&"+J.entity+W,J.entity="",J.state=nA);continue;default:throw new Error(J,"Unknown state: "+J.state)}return J.position>=J.bufferCheckPosition&&function h(q){for(var J=Math.max(i.MAX_BUFFER_LENGTH,10),$=0,W=0,hA=o.length;WJ)switch(o[W]){case"textNode":lA(q);break;case"cdata":AA(q,"oncdata",q.cdata),q.cdata="";break;case"script":AA(q,"onscript",q.script),q.script="";break;default:cA(q,"Max buffer length exceeded: "+o[W])}$=Math.max($,vA)}q.bufferCheckPosition=i.MAX_BUFFER_LENGTH-$+q.position}(J),J},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){!function g(q){lA(q),""!==q.cdata&&(AA(q,"oncdata",q.cdata),q.cdata=""),""!==q.script&&(AA(q,"onscript",q.script),q.script="")}(this)}};try{E=n(2830).Stream}catch(q){E=function(){}}var u=i.EVENTS.filter(function(q){return"error"!==q&&"end"!==q});function e(q,J){if(!(this instanceof e))return new e(q,J);E.apply(this),this._parser=new l(q,J),this.writable=!0,this.readable=!0;var $=this;this._parser.onend=function(){$.emit("end")},this._parser.onerror=function(W){$.emit("error",W),$._parser.error=null},this._decoder=null,u.forEach(function(W){Object.defineProperty($,"on"+W,{get:function(){return $._parser["on"+W]},set:function(hA){if(!hA)return $.removeAllListeners(W),$._parser["on"+W]=hA,hA;$.on(W,hA)},enumerable:!0,configurable:!1})})}(e.prototype=Object.create(E.prototype,{constructor:{value:e}})).write=function(q){if("function"==typeof c&&"function"==typeof c.isBuffer&&c.isBuffer(q)){if(!this._decoder){var J=n(2553).s;this._decoder=new J("utf8")}q=this._decoder.write(q)}return this._parser.write(q.toString()),this.emit("data",q),!0},e.prototype.end=function(q){return q&&q.length&&this.write(q),this._parser.end(),!0},e.prototype.on=function(q,J){var $=this;return!$._parser["on"+q]&&-1!==u.indexOf(q)&&($._parser["on"+q]=function(){var W=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);W.splice(0,0,q),$.emit.apply($,W)}),E.prototype.on.call($,q,J)};var w="http://www.w3.org/XML/1998/namespace",Q="http://www.w3.org/2000/xmlns/",p={xml:w,xmlns:Q},S=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,m=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,v=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function D(q){return" "===q||"\n"===q||"\r"===q||"\t"===q}function U(q){return'"'===q||"'"===q}function T(q){return">"===q||D(q)}function F(q,J){return q.test(J)}function R(q,J){return!F(q,J)}var q,J,$,L=0;for(var Z in i.STATE={BEGIN:L++,BEGIN_WHITESPACE:L++,TEXT:L++,TEXT_ENTITY:L++,OPEN_WAKA:L++,SGML_DECL:L++,SGML_DECL_QUOTED:L++,DOCTYPE:L++,DOCTYPE_QUOTED:L++,DOCTYPE_DTD:L++,DOCTYPE_DTD_QUOTED:L++,COMMENT_STARTING:L++,COMMENT:L++,COMMENT_ENDING:L++,COMMENT_ENDED:L++,CDATA:L++,CDATA_ENDING:L++,CDATA_ENDING_2:L++,PROC_INST:L++,PROC_INST_BODY:L++,PROC_INST_ENDING:L++,OPEN_TAG:L++,OPEN_TAG_SLASH:L++,ATTRIB:L++,ATTRIB_NAME:L++,ATTRIB_NAME_SAW_WHITE:L++,ATTRIB_VALUE:L++,ATTRIB_VALUE_QUOTED:L++,ATTRIB_VALUE_CLOSED:L++,ATTRIB_VALUE_UNQUOTED:L++,ATTRIB_VALUE_ENTITY_Q:L++,ATTRIB_VALUE_ENTITY_U:L++,CLOSE_TAG:L++,CLOSE_TAG_SAW_WHITE:L++,SCRIPT:L++,SCRIPT_ENDING:L++},i.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},i.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(i.ENTITIES).forEach(function(q){var J=i.ENTITIES[q],$="number"==typeof J?String.fromCharCode(J):J;i.ENTITIES[q]=$}),i.STATE)i.STATE[i.STATE[Z]]=Z;function aA(q,J,$){q[J]&&q[J]($)}function AA(q,J,$){q.textNode&&lA(q),aA(q,J,$)}function lA(q){q.textNode=pA(q.opt,q.textNode),q.textNode&&aA(q,"ontext",q.textNode),q.textNode=""}function pA(q,J){return q.trim&&(J=J.trim()),q.normalize&&(J=J.replace(/\s+/g," ")),J}function cA(q,J){return lA(q),q.trackPosition&&(J+="\nLine: "+q.line+"\nColumn: "+q.column+"\nChar: "+q.c),J=new Error(J),q.error=J,aA(q,"onerror",J),q}function gA(q){return q.sawRoot&&!q.closedRoot&&BA(q,"Unclosed root tag"),q.state!==L.BEGIN&&q.state!==L.BEGIN_WHITESPACE&&q.state!==L.TEXT&&cA(q,"Unexpected end"),lA(q),q.c="",q.closed=!0,aA(q,"onend"),l.call(q,q.strict,q.opt),q}function BA(q,J){if("object"!=typeof q||!(q instanceof l))throw new Error("bad call to strictFail");q.strict&&cA(q,J)}function yA(q){q.strict||(q.tagName=q.tagName[q.looseCase]());var J=q.tags[q.tags.length-1]||q,$=q.tag={name:q.tagName,attributes:{}};q.opt.xmlns&&($.ns=J.ns),q.attribList.length=0,AA(q,"onopentagstart",$)}function xA(q,J){var W=q.indexOf(":")<0?["",q]:q.split(":"),hA=W[0],vA=W[1];return J&&"xmlns"===q&&(hA="xmlns",vA=""),{prefix:hA,local:vA}}function _(q){if(q.strict||(q.attribName=q.attribName[q.looseCase]()),-1!==q.attribList.indexOf(q.attribName)||q.tag.attributes.hasOwnProperty(q.attribName))q.attribName=q.attribValue="";else{if(q.opt.xmlns){var J=xA(q.attribName,!0),W=J.local;if("xmlns"===J.prefix)if("xml"===W&&q.attribValue!==w)BA(q,"xml: prefix must be bound to "+w+"\nActual: "+q.attribValue);else if("xmlns"===W&&q.attribValue!==Q)BA(q,"xmlns: prefix must be bound to "+Q+"\nActual: "+q.attribValue);else{var hA=q.tag,vA=q.tags[q.tags.length-1]||q;hA.ns===vA.ns&&(hA.ns=Object.create(vA.ns)),hA.ns[W]=q.attribValue}q.attribList.push([q.attribName,q.attribValue])}else q.tag.attributes[q.attribName]=q.attribValue,AA(q,"onattribute",{name:q.attribName,value:q.attribValue});q.attribName=q.attribValue=""}}function MA(q,J){if(q.opt.xmlns){var $=q.tag,W=xA(q.tagName);$.prefix=W.prefix,$.local=W.local,$.uri=$.ns[W.prefix]||"",$.prefix&&!$.uri&&(BA(q,"Unbound namespace prefix: "+JSON.stringify(q.tagName)),$.uri=W.prefix),$.ns&&(q.tags[q.tags.length-1]||q).ns!==$.ns&&Object.keys($.ns).forEach(function(Mt){AA(q,"onopennamespace",{prefix:Mt,uri:$.ns[Mt]})});for(var vA=0,nA=q.attribList.length;vA",q.tagName="",void(q.state=L.SCRIPT);AA(q,"onscript",q.script),q.script=""}var J=q.tags.length,$=q.tagName;q.strict||($=$[q.looseCase]());for(var W=$;J--&&q.tags[J].name!==W;)BA(q,"Unexpected close tag");if(J<0)return BA(q,"Unmatched closing tag: "+q.tagName),q.textNode+="",void(q.state=L.TEXT);q.tagName=$;for(var vA=q.tags.length;vA-- >J;){var nA=q.tag=q.tags.pop();q.tagName=q.tag.name,AA(q,"onclosetag",q.tagName);var EA={};for(var GA in nA.ns)EA[GA]=nA.ns[GA];q.opt.xmlns&&nA.ns!==(q.tags[q.tags.length-1]||q).ns&&Object.keys(nA.ns).forEach(function(lt){AA(q,"onclosenamespace",{prefix:lt,uri:nA.ns[lt]})})}0===J&&(q.closedRoot=!0),q.tagName=q.attribValue=q.attribName="",q.attribList.length=0,q.state=L.TEXT}function QA(q){var W,J=q.entity,$=J.toLowerCase(),hA="";return q.ENTITIES[J]?q.ENTITIES[J]:q.ENTITIES[$]?q.ENTITIES[$]:("#"===(J=$).charAt(0)&&("x"===J.charAt(1)?(J=J.slice(2),hA=(W=parseInt(J,16)).toString(16)):(J=J.slice(1),hA=(W=parseInt(J,10)).toString(10))),J=J.replace(/^0+/,""),isNaN(W)||hA.toLowerCase()!==J?(BA(q,"Invalid character entity"),"&"+q.entity+";"):String.fromCodePoint(W))}function SA(q,J){"<"===J?(q.state=L.OPEN_WAKA,q.startTagPosition=q.position):D(J)||(BA(q,"Non-whitespace before first tag."),q.textNode=J,q.state=L.TEXT)}function bA(q,J){var $="";return J1114111||J(lt)!==lt)throw RangeError("Invalid code point: "+lt);lt<=65535?hA.push(lt):hA.push(55296+((lt-=65536)>>10),lt%1024+56320),(EA+1===GA||hA.length>W)&&(nt+=q.apply(null,hA),hA.length=0)}return nt},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:$,configurable:!0,writable:!0}):String.fromCodePoint=$)}(I)},2830:function(Y,I,n){Y.exports=o;var c=n(7187).EventEmitter;function o(){c.call(this)}n(5717)(o,c),o.Readable=n(6577),o.Writable=n(323),o.Duplex=n(8656),o.Transform=n(4473),o.PassThrough=n(2366),o.finished=n(1086),o.pipeline=n(6472),o.Stream=o,o.prototype.pipe=function(l,h){var a=this;function g(w){l.writable&&!1===l.write(w)&&a.pause&&a.pause()}function E(){a.readable&&a.resume&&a.resume()}a.on("data",g),l.on("drain",E),!l._isStdio&&(!h||!1!==h.end)&&(a.on("end",C),a.on("close",e));var u=!1;function C(){u||(u=!0,l.end())}function e(){u||(u=!0,"function"==typeof l.destroy&&l.destroy())}function f(w){if(B(),0===c.listenerCount(this,"error"))throw w}function B(){a.removeListener("data",g),l.removeListener("drain",E),a.removeListener("end",C),a.removeListener("close",e),a.removeListener("error",f),l.removeListener("error",f),a.removeListener("end",B),a.removeListener("close",B),l.removeListener("close",B)}return a.on("error",f),l.on("error",f),a.on("end",B),a.on("close",B),l.on("close",B),l.emit("pipe",a),l}},8106:function(Y){"use strict";var n={};function c(a,g,E){E||(E=Error);var C=function(e){function f(B,w,Q){return e.call(this,function u(e,f,B){return"string"==typeof g?g:g(e,f,B)}(B,w,Q))||this}return function I(a,g){a.prototype=Object.create(g.prototype),a.prototype.constructor=a,a.__proto__=g}(f,e),f}(E);C.prototype.name=E.name,C.prototype.code=a,n[a]=C}function i(a,g){if(Array.isArray(a)){var E=a.length;return a=a.map(function(u){return String(u)}),E>2?"one of ".concat(g," ").concat(a.slice(0,E-1).join(", "),", or ")+a[E-1]:2===E?"one of ".concat(g," ").concat(a[0]," or ").concat(a[1]):"of ".concat(g," ").concat(a[0])}return"of ".concat(g," ").concat(String(a))}c("ERR_INVALID_OPT_VALUE",function(a,g){return'The value "'+g+'" is invalid for option "'+a+'"'},TypeError),c("ERR_INVALID_ARG_TYPE",function(a,g,E){var u,C;if("string"==typeof g&&function o(a,g,E){return a.substr(!E||E<0?0:+E,g.length)===g}(g,"not ")?(u="must not be",g=g.replace(/^not /,"")):u="must be",function l(a,g,E){return(void 0===E||E>a.length)&&(E=a.length),a.substring(E-g.length,E)===g}(a," argument"))C="The ".concat(a," ").concat(u," ").concat(i(g,"type"));else{var e=function h(a,g,E){return"number"!=typeof E&&(E=0),!(E+g.length>a.length)&&-1!==a.indexOf(g,E)}(a,".")?"property":"argument";C='The "'.concat(a,'" ').concat(e," ").concat(u," ").concat(i(g,"type"))}return C+". Received type ".concat(typeof E)},TypeError),c("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),c("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),c("ERR_STREAM_PREMATURE_CLOSE","Premature close"),c("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),c("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),c("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),c("ERR_STREAM_WRITE_AFTER_END","write after end"),c("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),c("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Y.exports.q=n},8656:function(Y,I,n){"use strict";var c=n(4155),i=Object.keys||function(e){var f=[];for(var B in e)f.push(B);return f};Y.exports=E;var o=n(6577),l=n(323);n(5717)(E,o);for(var h=i(l.prototype),a=0;a0)if("string"!=typeof EA&&!TA.objectMode&&Object.getPrototypeOf(EA)!==a.prototype&&(EA=function E(nA){return a.from(nA)}(EA)),nt)TA.endEmitted?F(nA,new v):lA(nA,TA,EA,!0);else if(TA.ended)F(nA,new m);else{if(TA.destroyed)return!1;TA.reading=!1,TA.decoder&&!GA?(EA=TA.decoder.write(EA),TA.objectMode||0!==EA.length?lA(nA,TA,EA,!1):MA(nA,TA)):lA(nA,TA,EA,!1)}else nt||(TA.reading=!1,MA(nA,TA));return!TA.ended&&(TA.lengthEA.highWaterMark&&(EA.highWaterMark=function gA(nA){return nA>=cA?nA=cA:(nA--,nA|=nA>>>1,nA|=nA>>>2,nA|=nA>>>4,nA|=nA>>>8,nA|=nA>>>16,nA++),nA}(nA)),nA<=EA.length?nA:EA.ended?EA.length:(EA.needReadable=!0,0))}function xA(nA){var EA=nA._readableState;e("emitReadable",EA.needReadable,EA.emittedReadable),EA.needReadable=!1,EA.emittedReadable||(e("emitReadable",EA.flowing),EA.emittedReadable=!0,c.nextTick(_,nA))}function _(nA){var EA=nA._readableState;e("emitReadable_",EA.destroyed,EA.length,EA.ended),!EA.destroyed&&(EA.length||EA.ended)&&(nA.emit("readable"),EA.emittedReadable=!1),EA.needReadable=!EA.flowing&&!EA.ended&&EA.length<=EA.highWaterMark,J(nA)}function MA(nA,EA){EA.readingMore||(EA.readingMore=!0,c.nextTick(uA,nA,EA))}function uA(nA,EA){for(;!EA.reading&&!EA.ended&&(EA.length0,EA.resumeScheduled&&!EA.paused?EA.flowing=!0:nA.listenerCount("data")>0&&nA.resume()}function bA(nA){e("readable nexttick read 0"),nA.read(0)}function q(nA,EA){e("resume",EA.reading),EA.reading||nA.read(0),EA.resumeScheduled=!1,nA.emit("resume"),J(nA),EA.flowing&&!EA.reading&&nA.read(0)}function J(nA){var EA=nA._readableState;for(e("flow",EA.flowing);EA.flowing&&null!==nA.read(););}function $(nA,EA){return 0===EA.length?null:(EA.objectMode?GA=EA.buffer.shift():!nA||nA>=EA.length?(GA=EA.decoder?EA.buffer.join(""):1===EA.buffer.length?EA.buffer.first():EA.buffer.concat(EA.length),EA.buffer.clear()):GA=EA.buffer.consume(nA,EA.decoder),GA);var GA}function W(nA){var EA=nA._readableState;e("endReadable",EA.endEmitted),EA.endEmitted||(EA.ended=!0,c.nextTick(hA,EA,nA))}function hA(nA,EA){if(e("endReadableNT",nA.endEmitted,nA.length),!nA.endEmitted&&0===nA.length&&(nA.endEmitted=!0,EA.readable=!1,EA.emit("end"),nA.autoDestroy)){var GA=EA._writableState;(!GA||GA.autoDestroy&&GA.finished)&&EA.destroy()}}function vA(nA,EA){for(var GA=0,nt=nA.length;GA=EA.highWaterMark:EA.length>0)||EA.ended))return e("read: emitReadable",EA.length,EA.ended),0===EA.length&&EA.ended?W(this):xA(this),null;if(0===(nA=BA(nA,EA))&&EA.ended)return 0===EA.length&&W(this),null;var lt,nt=EA.needReadable;return e("need readable",nt),(0===EA.length||EA.length-nA0?$(nA,EA):null)?(EA.needReadable=EA.length<=EA.highWaterMark,nA=0):(EA.length-=nA,EA.awaitDrain=0),0===EA.length&&(EA.ended||(EA.needReadable=!0),GA!==nA&&EA.ended&&W(this)),null!==lt&&this.emit("data",lt),lt},aA.prototype._read=function(nA){F(this,new d("_read()"))},aA.prototype.pipe=function(nA,EA){var GA=this,nt=this._readableState;switch(nt.pipesCount){case 0:nt.pipes=nA;break;case 1:nt.pipes=[nt.pipes,nA];break;default:nt.pipes.push(nA)}nt.pipesCount+=1,e("pipe count=%d opts=%j",nt.pipesCount,EA);var TA=EA&&!1===EA.end||nA===c.stdout||nA===c.stderr?dt:vt;function it(mt,OA){e("onunpipe"),mt===GA&&OA&&!1===OA.hasUnpiped&&(OA.hasUnpiped=!0,function JA(){e("cleanup"),nA.removeListener("close",et),nA.removeListener("finish",FA),nA.removeListener("drain",It),nA.removeListener("error",at),nA.removeListener("unpipe",it),GA.removeListener("end",vt),GA.removeListener("end",dt),GA.removeListener("data",qA),Mt=!0,nt.awaitDrain&&(!nA._writableState||nA._writableState.needDrain)&&It()}())}function vt(){e("onend"),nA.end()}nt.endEmitted?c.nextTick(TA):GA.once("end",TA),nA.on("unpipe",it);var It=function QA(nA){return function(){var GA=nA._readableState;e("pipeOnDrain",GA.awaitDrain),GA.awaitDrain&&GA.awaitDrain--,0===GA.awaitDrain&&l(nA,"data")&&(GA.flowing=!0,J(nA))}}(GA);nA.on("drain",It);var Mt=!1;function qA(mt){e("ondata");var OA=nA.write(mt);e("dest.write",OA),!1===OA&&((1===nt.pipesCount&&nt.pipes===nA||nt.pipesCount>1&&-1!==vA(nt.pipes,nA))&&!Mt&&(e("false write response, pause",nt.awaitDrain),nt.awaitDrain++),GA.pause())}function at(mt){e("onerror",mt),dt(),nA.removeListener("error",at),0===l(nA,"error")&&F(nA,mt)}function et(){nA.removeListener("finish",FA),dt()}function FA(){e("onfinish"),nA.removeListener("close",et),dt()}function dt(){e("unpipe"),GA.unpipe(nA)}return GA.on("data",qA),function L(nA,EA,GA){if("function"==typeof nA.prependListener)return nA.prependListener(EA,GA);nA._events&&nA._events[EA]?Array.isArray(nA._events[EA])?nA._events[EA].unshift(GA):nA._events[EA]=[GA,nA._events[EA]]:nA.on(EA,GA)}(nA,"error",at),nA.once("close",et),nA.once("finish",FA),nA.emit("pipe",GA),nt.flowing||(e("pipe resume"),GA.resume()),nA},aA.prototype.unpipe=function(nA){var EA=this._readableState,GA={hasUnpiped:!1};if(0===EA.pipesCount)return this;if(1===EA.pipesCount)return nA&&nA!==EA.pipes||(nA||(nA=EA.pipes),EA.pipes=null,EA.pipesCount=0,EA.flowing=!1,nA&&nA.emit("unpipe",this,GA)),this;if(!nA){var nt=EA.pipes,lt=EA.pipesCount;EA.pipes=null,EA.pipesCount=0,EA.flowing=!1;for(var TA=0;TA0,!1!==nt.flowing&&this.resume()):"readable"===nA&&!nt.endEmitted&&!nt.readableListening&&(nt.readableListening=nt.needReadable=!0,nt.flowing=!1,nt.emittedReadable=!1,e("on readable",nt.length,nt.reading),nt.length?xA(this):nt.reading||c.nextTick(bA,this)),GA},aA.prototype.removeListener=function(nA,EA){var GA=h.prototype.removeListener.call(this,nA,EA);return"readable"===nA&&c.nextTick(SA,this),GA},aA.prototype.removeAllListeners=function(nA){var EA=h.prototype.removeAllListeners.apply(this,arguments);return("readable"===nA||void 0===nA)&&c.nextTick(SA,this),EA},aA.prototype.resume=function(){var nA=this._readableState;return nA.flowing||(e("resume"),nA.flowing=!nA.readableListening,function ZA(nA,EA){EA.resumeScheduled||(EA.resumeScheduled=!0,c.nextTick(q,nA,EA))}(this,nA)),nA.paused=!1,this},aA.prototype.pause=function(){return e("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(e("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},aA.prototype.wrap=function(nA){var EA=this,GA=this._readableState,nt=!1;for(var lt in nA.on("end",function(){if(e("wrapped end"),GA.decoder&&!GA.ended){var it=GA.decoder.end();it&&it.length&&EA.push(it)}EA.push(null)}),nA.on("data",function(it){e("wrapped data"),GA.decoder&&(it=GA.decoder.write(it)),GA.objectMode&&null==it||!(GA.objectMode||it&&it.length)||EA.push(it)||(nt=!0,nA.pause())}),nA)void 0===this[lt]&&"function"==typeof nA[lt]&&(this[lt]=function(vt){return function(){return nA[vt].apply(nA,arguments)}}(lt));for(var TA=0;TA-1))throw new U($);return this._writableState.defaultEncoding=$,this},Object.defineProperty(Z.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(Z.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Z.prototype._write=function(J,$,W){W(new p("_write()"))},Z.prototype._writev=null,Z.prototype.end=function(J,$,W){var hA=this._writableState;return"function"==typeof J?(W=J,J=null,$=null):"function"==typeof $&&(W=$,$=null),null!=J&&this.write(J,$),hA.corked&&(hA.corked=1,this.uncork()),hA.ending||function ZA(J,$,W){$.ending=!0,bA(J,$),W&&($.finished?c.nextTick(W):J.once("finish",W)),$.ended=!0,J.writable=!1}(this,hA,W),this},Object.defineProperty(Z.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(Z.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function($){!this._writableState||(this._writableState.destroyed=$)}}),Z.prototype.destroy=e.destroy,Z.prototype._undestroy=e.undestroy,Z.prototype._destroy=function(J,$){$(J)}},828:function(Y,I,n){"use strict";var i,c=n(4155);function o(d,v,D){return v in d?Object.defineProperty(d,v,{value:D,enumerable:!0,configurable:!0,writable:!0}):d[v]=D,d}var l=n(1086),h=Symbol("lastResolve"),a=Symbol("lastReject"),g=Symbol("error"),E=Symbol("ended"),u=Symbol("lastPromise"),C=Symbol("handlePromise"),e=Symbol("stream");function f(d,v){return{value:d,done:v}}function B(d){var v=d[h];if(null!==v){var D=d[e].read();null!==D&&(d[u]=null,d[h]=null,d[a]=null,v(f(D,!1)))}}function w(d){c.nextTick(B,d)}var p=Object.getPrototypeOf(function(){}),S=Object.setPrototypeOf((o(i={get stream(){return this[e]},next:function(){var v=this,D=this[g];if(null!==D)return Promise.reject(D);if(this[E])return Promise.resolve(f(void 0,!0));if(this[e].destroyed)return new Promise(function(R,L){c.nextTick(function(){v[g]?L(v[g]):R(f(void 0,!0))})});var T,U=this[u];if(U)T=new Promise(function Q(d,v){return function(D,U){d.then(function(){v[E]?D(f(void 0,!0)):v[C](D,U)},U)}}(U,this));else{var F=this[e].read();if(null!==F)return Promise.resolve(f(F,!1));T=new Promise(this[C])}return this[u]=T,T}},Symbol.asyncIterator,function(){return this}),o(i,"return",function(){var v=this;return new Promise(function(D,U){v[e].destroy(null,function(T){T?U(T):D(f(void 0,!0))})})}),i),p);Y.exports=function(v){var D,U=Object.create(S,(o(D={},e,{value:v,writable:!0}),o(D,h,{value:null,writable:!0}),o(D,a,{value:null,writable:!0}),o(D,g,{value:null,writable:!0}),o(D,E,{value:v._readableState.endEmitted,writable:!0}),o(D,C,{value:function(F,R){var L=U[e].read();L?(U[u]=null,U[h]=null,U[a]=null,F(f(L,!1))):(U[h]=F,U[a]=R)},writable:!0}),D));return U[u]=null,l(v,function(T){if(T&&"ERR_STREAM_PREMATURE_CLOSE"!==T.code){var F=U[a];return null!==F&&(U[u]=null,U[h]=null,U[a]=null,F(T)),void(U[g]=T)}var R=U[h];null!==R&&(U[u]=null,U[h]=null,U[a]=null,R(f(void 0,!0))),U[E]=!0}),v.on("readable",w.bind(null,U)),U}},1029:function(Y,I,n){"use strict";var c=n(4155);function o(E,u){a(E,u),l(E)}function l(E){E._writableState&&!E._writableState.emitClose||E._readableState&&!E._readableState.emitClose||E.emit("close")}function a(E,u){E.emit("error",u)}Y.exports={destroy:function i(E,u){var C=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(u?u(E):E&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,c.nextTick(a,this,E)):c.nextTick(a,this,E)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(E||null,function(B){!u&&B?C._writableState?C._writableState.errorEmitted?c.nextTick(l,C):(C._writableState.errorEmitted=!0,c.nextTick(o,C,B)):c.nextTick(o,C,B):u?(c.nextTick(l,C),u(B)):c.nextTick(l,C)}),this)},undestroy:function h(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function g(E,u){var C=E._readableState,e=E._writableState;C&&C.autoDestroy||e&&e.autoDestroy?E.destroy(u):E.emit("error",u)}}},1086:function(Y,I,n){"use strict";var c=n(8106).q.ERR_STREAM_PREMATURE_CLOSE;function o(){}Y.exports=function h(a,g,E){if("function"==typeof g)return h(a,null,g);g||(g={}),E=function i(a){var g=!1;return function(){if(!g){g=!0;for(var E=arguments.length,u=new Array(E),C=0;C0,function(T){S||(S=T),T&&m.forEach(u),!D&&(m.forEach(u),p(S))})});return w.reduce(C)}},94:function(Y,I,n){"use strict";var c=n(8106).q.ERR_INVALID_OPT_VALUE;Y.exports={getHighWaterMark:function o(l,h,a,g){var E=function i(l,h,a){return null!=l.highWaterMark?l.highWaterMark:h?l[a]:null}(h,g,a);if(null!=E){if(!isFinite(E)||Math.floor(E)!==E||E<0)throw new c(g?a:"highWaterMark",E);return Math.floor(E)}return l.objectMode?16:16384}}},3194:function(Y,I,n){Y.exports=n(7187).EventEmitter},1818:function(Y,I,n){var c,o;void 0!==(o="function"==typeof(c=function(){"use strict";function h(e,f,B){var w=new XMLHttpRequest;w.open("GET",e),w.responseType="blob",w.onload=function(){C(w.response,f,B)},w.onerror=function(){console.error("could not download file")},w.send()}function a(e){var f=new XMLHttpRequest;f.open("HEAD",e,!1);try{f.send()}catch(B){}return 200<=f.status&&299>=f.status}function g(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(B){var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(f)}}var E="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,u=E.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),C=E.saveAs||("object"!=typeof window||window!==E?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype&&!u?function(e,f,B){var w=E.URL||E.webkitURL,Q=document.createElement("a");Q.download=f=f||e.name||"download",Q.rel="noopener","string"==typeof e?(Q.href=e,Q.origin===location.origin?g(Q):a(Q.href)?h(e,f,B):g(Q,Q.target="_blank")):(Q.href=w.createObjectURL(e),setTimeout(function(){w.revokeObjectURL(Q.href)},4e4),setTimeout(function(){g(Q)},0))}:"msSaveOrOpenBlob"in navigator?function(e,f,B){if(f=f||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function l(e,f){return void 0===f?f={autoBom:!1}:"object"!=typeof f&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,B),f);else if(a(e))h(e,f,B);else{var w=document.createElement("a");w.href=e,w.target="_blank",setTimeout(function(){g(w)})}}:function(e,f,B,w){if((w=w||open("","_blank"))&&(w.document.title=w.document.body.innerText="downloading..."),"string"==typeof e)return h(e,f,B);var Q="application/octet-stream"===e.type,p=/constructor/i.test(E.HTMLElement)||E.safari,S=/CriOS\/[\d]+/.test(navigator.userAgent);if((S||Q&&p||u)&&"undefined"!=typeof FileReader){var m=new FileReader;m.onloadend=function(){var D=m.result;D=S?D:D.replace(/^data:[^;]*;/,"data:attachment/file;"),w?w.location.href=D:location=D,w=null},m.readAsDataURL(e)}else{var d=E.URL||E.webkitURL,v=d.createObjectURL(e);w?w.location=v:location.href=v,w=null,setTimeout(function(){d.revokeObjectURL(v)},4e4)}});E.saveAs=C.saveAs=C,Y.exports=C})?c.apply(I,[]):c)&&(Y.exports=o)},2553:function(Y,I,n){"use strict";var c=n(1750).Buffer,i=c.isEncoding||function(m){switch((m=""+m)&&m.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function h(m){var d;switch(this.encoding=function l(m){var d=function o(m){if(!m)return"utf8";for(var d;;)switch(m){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return m;default:if(d)return;m=(""+m).toLowerCase(),d=!0}}(m);if("string"!=typeof d&&(c.isEncoding===i||!i(m)))throw new Error("Unknown encoding: "+m);return d||m}(m),this.encoding){case"utf16le":this.text=f,this.end=B,d=4;break;case"utf8":this.fillLast=u,d=4;break;case"base64":this.text=w,this.end=Q,d=3;break;default:return this.write=p,void(this.end=S)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(d)}function a(m){return m<=127?0:m>>5==6?2:m>>4==14?3:m>>3==30?4:m>>6==2?-1:-2}function u(m){var d=this.lastTotal-this.lastNeed,v=function E(m,d,v){if(128!=(192&d[0]))return m.lastNeed=0,"\ufffd";if(m.lastNeed>1&&d.length>1){if(128!=(192&d[1]))return m.lastNeed=1,"\ufffd";if(m.lastNeed>2&&d.length>2&&128!=(192&d[2]))return m.lastNeed=2,"\ufffd"}}(this,m);return void 0!==v?v:this.lastNeed<=m.length?(m.copy(this.lastChar,d,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(m.copy(this.lastChar,d,0,m.length),void(this.lastNeed-=m.length))}function f(m,d){if((m.length-d)%2==0){var v=m.toString("utf16le",d);if(v){var D=v.charCodeAt(v.length-1);if(D>=55296&&D<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],v.slice(0,-1)}return v}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",d,m.length-1)}function B(m){var d=m&&m.length?this.write(m):"";return this.lastNeed?d+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):d}function w(m,d){var v=(m.length-d)%3;return 0===v?m.toString("base64",d):(this.lastNeed=3-v,this.lastTotal=3,1===v?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",d,m.length-v))}function Q(m){var d=m&&m.length?this.write(m):"";return this.lastNeed?d+this.lastChar.toString("base64",0,3-this.lastNeed):d}function p(m){return m.toString(this.encoding)}function S(m){return m&&m.length?this.write(m):""}I.s=h,h.prototype.write=function(m){if(0===m.length)return"";var d,v;if(this.lastNeed){if(void 0===(d=this.fillLast(m)))return"";v=this.lastNeed,this.lastNeed=0}else v=0;return v=0?(U>0&&(m.lastNeed=U-1),U):--D=0?(U>0&&(m.lastNeed=U-2),U):--D=0?(U>0&&(2===U?U=0:m.lastNeed=U-3),U):0}(this,m,d);if(!this.lastNeed)return m.toString("utf8",d);this.lastTotal=v;var D=m.length-(v-this.lastNeed);return m.copy(this.lastChar,0,D),m.toString("utf8",d,D)},h.prototype.fillLast=function(m){if(this.lastNeed<=m.length)return m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,this.lastTotal-this.lastNeed,0,m.length),this.lastNeed-=m.length}},311:function(Y){function c(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function i(T,F){this.source=T,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=F,this.destLen=0,this.ltree=new c,this.dtree=new c}var o=new c,l=new c,h=new Uint8Array(30),a=new Uint16Array(30),g=new Uint8Array(30),E=new Uint16Array(30),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),C=new c,e=new Uint8Array(320);function f(T,F,R,L){var Z,aA;for(Z=0;Z>>=1,F}function S(T,F,R){if(!F)return R;for(;T.bitcount<24;)T.tag|=T.source[T.sourceIndex++]<>>16-F;return T.tag>>>=F,T.bitcount-=F,L+R}function m(T,F){for(;T.bitcount<24;)T.tag|=T.source[T.sourceIndex++]<>>=1,++Z,R+=F.table[Z],L-=F.table[Z]}while(L>=0);return T.tag=aA,T.bitcount-=Z,F.trans[R+L]}function d(T,F,R){var L,Z,aA,AA,lA,pA;for(L=S(T,5,257),Z=S(T,5,1),aA=S(T,4,4),AA=0;AA<19;++AA)e[AA]=0;for(AA=0;AA8;)T.sourceIndex--,T.bitcount-=8;if((F=256*(F=T.source[T.sourceIndex+1])+T.source[T.sourceIndex])!==(65535&~(256*T.source[T.sourceIndex+3]+T.source[T.sourceIndex+2])))return-3;for(T.sourceIndex+=4,L=F;L;--L)T.dest[T.destLen++]=T.source[T.sourceIndex++];return T.bitcount=0,0}(function B(T,F){var R;for(R=0;R<7;++R)T.table[R]=0;for(T.table[7]=24,T.table[8]=152,T.table[9]=112,R=0;R<24;++R)T.trans[R]=256+R;for(R=0;R<144;++R)T.trans[24+R]=R;for(R=0;R<8;++R)T.trans[168+R]=280+R;for(R=0;R<112;++R)T.trans[176+R]=144+R;for(R=0;R<5;++R)F.table[R]=0;for(F.table[5]=32,R=0;R<32;++R)F.trans[R]=R})(o,l),f(h,a,4,3),f(g,E,2,1),h[28]=0,a[28]=258,Y.exports=function U(T,F){var L,aA,R=new i(T,F);do{switch(L=p(R),S(R,2,0)){case 0:aA=D(R);break;case 1:aA=v(R,o,l);break;case 2:d(R,R.ltree,R.dtree),aA=v(R,R.ltree,R.dtree);break;default:aA=-3}if(0!==aA)throw new Error("Data error")}while(!L);return R.destLen=eA.length?{done:!0}:{done:!1,value:eA[M++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(eA,G){(null==G||G>eA.length)&&(G=eA.length);for(var V=0,M=new Array(G);V0?iA[0]:"value";if(tA.has(kA))return tA.get(kA);var gt=x.apply(this,iA);return tA.set(kA,gt),gt}return Object.defineProperty(this,G,{value:oA}),oA}}}}D.registerFormat=function(eA){U.push(eA)},D.openSync=function(eA,G){var V=v.readFileSync(eA);return D.create(V,G)},D.open=function(eA,G,V){"function"==typeof G&&(V=G,G=null),v.readFile(eA,function(M,x){if(M)return V(M);try{var P=D.create(x,G)}catch(tA){return V(tA)}return V(null,P)})},D.create=function(eA,G){for(var V=0;V>1},searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16,endCode:new e.LazyArray(e.uint16,"segCount"),reservedPad:new e.Reserved(e.uint16),startCode:new e.LazyArray(e.uint16,"segCount"),idDelta:new e.LazyArray(e.int16,"segCount"),idRangeOffset:new e.LazyArray(e.uint16,"segCount"),glyphIndexArray:new e.LazyArray(e.uint16,function(eA){return(eA.length-eA._currentOffset)/2})},6:{length:e.uint16,language:e.uint16,firstCode:e.uint16,entryCount:e.uint16,glyphIndices:new e.LazyArray(e.uint16,"entryCount")},8:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint16,is32:new e.LazyArray(e.uint8,8192),nGroups:e.uint32,groups:new e.LazyArray(Z,"nGroups")},10:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint32,firstCode:e.uint32,entryCount:e.uint32,glyphIndices:new e.LazyArray(e.uint16,"numChars")},12:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint32,nGroups:e.uint32,groups:new e.LazyArray(Z,"nGroups")},13:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint32,nGroups:e.uint32,groups:new e.LazyArray(Z,"nGroups")},14:{length:e.uint32,numRecords:e.uint32,varSelectors:new e.LazyArray(cA,"numRecords")}}),BA=new e.Struct({platformID:e.uint16,encodingID:e.uint16,table:new e.Pointer(e.uint32,gA,{type:"parent",lazy:!0})}),yA=new e.Struct({version:e.uint16,numSubtables:e.uint16,tables:new e.Array(BA,"numSubtables")}),xA=new e.Struct({version:e.int32,revision:e.int32,checkSumAdjustment:e.uint32,magicNumber:e.uint32,flags:e.uint16,unitsPerEm:e.uint16,created:new e.Array(e.int32,2),modified:new e.Array(e.int32,2),xMin:e.int16,yMin:e.int16,xMax:e.int16,yMax:e.int16,macStyle:new e.Bitfield(e.uint16,["bold","italic","underline","outline","shadow","condensed","extended"]),lowestRecPPEM:e.uint16,fontDirectionHint:e.int16,indexToLocFormat:e.int16,glyphDataFormat:e.int16}),_=new e.Struct({version:e.int32,ascent:e.int16,descent:e.int16,lineGap:e.int16,advanceWidthMax:e.uint16,minLeftSideBearing:e.int16,minRightSideBearing:e.int16,xMaxExtent:e.int16,caretSlopeRise:e.int16,caretSlopeRun:e.int16,caretOffset:e.int16,reserved:new e.Reserved(e.int16,4),metricDataFormat:e.int16,numberOfMetrics:e.uint16}),MA=new e.Struct({advance:e.uint16,bearing:e.int16}),uA=new e.Struct({metrics:new e.LazyArray(MA,function(eA){return eA.parent.hhea.numberOfMetrics}),bearings:new e.LazyArray(e.int16,function(eA){return eA.parent.maxp.numGlyphs-eA.parent.hhea.numberOfMetrics})}),QA=new e.Struct({version:e.int32,numGlyphs:e.uint16,maxPoints:e.uint16,maxContours:e.uint16,maxComponentPoints:e.uint16,maxComponentContours:e.uint16,maxZones:e.uint16,maxTwilightPoints:e.uint16,maxStorage:e.uint16,maxFunctionDefs:e.uint16,maxInstructionDefs:e.uint16,maxStackElements:e.uint16,maxSizeOfInstructions:e.uint16,maxComponentElements:e.uint16,maxComponentDepth:e.uint16});function SA(eA,G,V){return void 0===V&&(V=0),1===eA&&ZA[V]?ZA[V]:bA[eA][G]}var bA=[["utf16be","utf16be","utf16be","utf16be","utf16be","utf16be"],["macroman","shift-jis","big5","euc-kr","iso-8859-6","iso-8859-8","macgreek","maccyrillic","symbol","Devanagari","Gurmukhi","Gujarati","Oriya","Bengali","Tamil","Telugu","Kannada","Malayalam","Sinhalese","Burmese","Khmer","macthai","Laotian","Georgian","Armenian","gb-2312-80","Tibetan","Mongolian","Geez","maccenteuro","Vietnamese","Sindhi"],["ascii"],["symbol","utf16be","shift-jis","gb18030","big5","wansung","johab",null,null,null,"utf16be"]],ZA={15:"maciceland",17:"macturkish",18:"maccroatian",24:"maccenteuro",25:"maccenteuro",26:"maccenteuro",27:"maccenteuro",28:"maccenteuro",30:"maciceland",37:"macromania",38:"maccenteuro",39:"maccenteuro",40:"maccenteuro",143:"macinuit",146:"macgaelic"},q=[[],{0:"en",30:"fo",60:"ks",90:"rw",1:"fr",31:"fa",61:"ku",91:"rn",2:"de",32:"ru",62:"sd",92:"ny",3:"it",33:"zh",63:"bo",93:"mg",4:"nl",34:"nl-BE",64:"ne",94:"eo",5:"sv",35:"ga",65:"sa",128:"cy",6:"es",36:"sq",66:"mr",129:"eu",7:"da",37:"ro",67:"bn",130:"ca",8:"pt",38:"cz",68:"as",131:"la",9:"no",39:"sk",69:"gu",132:"qu",10:"he",40:"si",70:"pa",133:"gn",11:"ja",41:"yi",71:"or",134:"ay",12:"ar",42:"sr",72:"ml",135:"tt",13:"fi",43:"mk",73:"kn",136:"ug",14:"el",44:"bg",74:"ta",137:"dz",15:"is",45:"uk",75:"te",138:"jv",16:"mt",46:"be",76:"si",139:"su",17:"tr",47:"uz",77:"my",140:"gl",18:"hr",48:"kk",78:"km",141:"af",19:"zh-Hant",49:"az-Cyrl",79:"lo",142:"br",20:"ur",50:"az-Arab",80:"vi",143:"iu",21:"hi",51:"hy",81:"id",144:"gd",22:"th",52:"ka",82:"tl",145:"gv",23:"ko",53:"mo",83:"ms",146:"ga",24:"lt",54:"ky",84:"ms-Arab",147:"to",25:"pl",55:"tg",85:"am",148:"el-polyton",26:"hu",56:"tk",86:"ti",149:"kl",27:"es",57:"mn-CN",87:"om",150:"az",28:"lv",58:"mn",88:"so",151:"nn",29:"se",59:"ps",89:"sw"},[],{1078:"af",16393:"en-IN",1159:"rw",1074:"tn",1052:"sq",6153:"en-IE",1089:"sw",1115:"si",1156:"gsw",8201:"en-JM",1111:"kok",1051:"sk",1118:"am",17417:"en-MY",1042:"ko",1060:"sl",5121:"ar-DZ",5129:"en-NZ",1088:"ky",11274:"es-AR",15361:"ar-BH",13321:"en-PH",1108:"lo",16394:"es-BO",3073:"ar",18441:"en-SG",1062:"lv",13322:"es-CL",2049:"ar-IQ",7177:"en-ZA",1063:"lt",9226:"es-CO",11265:"ar-JO",11273:"en-TT",2094:"dsb",5130:"es-CR",13313:"ar-KW",2057:"en-GB",1134:"lb",7178:"es-DO",12289:"ar-LB",1033:"en",1071:"mk",12298:"es-EC",4097:"ar-LY",12297:"en-ZW",2110:"ms-BN",17418:"es-SV",6145:"ary",1061:"et",1086:"ms",4106:"es-GT",8193:"ar-OM",1080:"fo",1100:"ml",18442:"es-HN",16385:"ar-QA",1124:"fil",1082:"mt",2058:"es-MX",1025:"ar-SA",1035:"fi",1153:"mi",19466:"es-NI",10241:"ar-SY",2060:"fr-BE",1146:"arn",6154:"es-PA",7169:"aeb",3084:"fr-CA",1102:"mr",15370:"es-PY",14337:"ar-AE",1036:"fr",1148:"moh",10250:"es-PE",9217:"ar-YE",5132:"fr-LU",1104:"mn",20490:"es-PR",1067:"hy",6156:"fr-MC",2128:"mn-CN",3082:"es",1101:"as",4108:"fr-CH",1121:"ne",1034:"es",2092:"az-Cyrl",1122:"fy",1044:"nb",21514:"es-US",1068:"az",1110:"gl",2068:"nn",14346:"es-UY",1133:"ba",1079:"ka",1154:"oc",8202:"es-VE",1069:"eu",3079:"de-AT",1096:"or",2077:"sv-FI",1059:"be",1031:"de",1123:"ps",1053:"sv",2117:"bn",5127:"de-LI",1045:"pl",1114:"syr",1093:"bn-IN",4103:"de-LU",1046:"pt",1064:"tg",8218:"bs-Cyrl",2055:"de-CH",2070:"pt-PT",2143:"tzm",5146:"bs",1032:"el",1094:"pa",1097:"ta",1150:"br",1135:"kl",1131:"qu-BO",1092:"tt",1026:"bg",1095:"gu",2155:"qu-EC",1098:"te",1027:"ca",1128:"ha",3179:"qu",1054:"th",3076:"zh-HK",1037:"he",1048:"ro",1105:"bo",5124:"zh-MO",1081:"hi",1047:"rm",1055:"tr",2052:"zh",1038:"hu",1049:"ru",1090:"tk",4100:"zh-SG",1039:"is",9275:"smn",1152:"ug",1028:"zh-TW",1136:"ig",4155:"smj-NO",1058:"uk",1155:"co",1057:"id",5179:"smj",1070:"hsb",1050:"hr",1117:"iu",3131:"se-FI",1056:"ur",4122:"hr-BA",2141:"iu-Latn",1083:"se",2115:"uz-Cyrl",1029:"cs",2108:"ga",2107:"se-SE",1091:"uz",1030:"da",1076:"xh",8251:"sms",1066:"vi",1164:"prs",1077:"zu",6203:"sma-NO",1106:"cy",1125:"dv",1040:"it",7227:"sms",1160:"wo",2067:"nl-BE",2064:"it-CH",1103:"sa",1157:"sah",1043:"nl",1041:"ja",7194:"sr-Cyrl-BA",1144:"ii",3081:"en-AU",1099:"kn",3098:"sr",1130:"yo",10249:"en-BZ",1087:"kk",6170:"sr-Latn-BA",4105:"en-CA",1107:"km",2074:"sr-Latn",9225:"en-029",1158:"quc",1132:"nso"}],J=new e.Struct({platformID:e.uint16,encodingID:e.uint16,languageID:e.uint16,nameID:e.uint16,length:e.uint16,string:new e.Pointer(e.uint16,new e.String("length",function(eA){return SA(eA.platformID,eA.encodingID,eA.languageID)}),{type:"parent",relativeTo:function(G){return G.parent.stringOffset},allowNull:!1})}),$=new e.Struct({length:e.uint16,tag:new e.Pointer(e.uint16,new e.String("length","utf16be"),{type:"parent",relativeTo:function(G){return G.stringOffset}})}),W=new e.VersionedStruct(e.uint16,{0:{count:e.uint16,stringOffset:e.uint16,records:new e.Array(J,"count")},1:{count:e.uint16,stringOffset:e.uint16,records:new e.Array(J,"count"),langTagCount:e.uint16,langTags:new e.Array($,"langTagCount")}}),hA=["copyright","fontFamily","fontSubfamily","uniqueSubfamily","fullName","version","postscriptName","trademark","manufacturer","designer","description","vendorURL","designerURL","license","licenseURL",null,"preferredFamily","preferredSubfamily","compatibleFull","sampleText","postscriptCIDFontName","wwsFamilyName","wwsSubfamilyName"];W.process=function(eA){for(var M,G={},V=g(this.records);!(M=V()).done;){var x=M.value,P=q[x.platformID][x.languageID];null==P&&null!=this.langTags&&x.languageID>=32768&&(P=this.langTags[x.languageID-32768].tag),null==P&&(P=x.platformID+"-"+x.languageID);var tA=x.nameID>=256?"fontFeatures":hA[x.nameID]||x.nameID;null==G[tA]&&(G[tA]={});var oA=G[tA];x.nameID>=256&&(oA=oA[x.nameID]||(oA[x.nameID]={})),("string"==typeof x.string||"string"!=typeof oA[P])&&(oA[P]=x.string)}this.records=G},W.preEncode=function(){if(!Array.isArray(this.records)){this.version=0;var eA=[];for(var G in this.records){var V=this.records[G];"fontFeatures"!==G&&(eA.push({platformID:3,encodingID:1,languageID:1033,nameID:hA.indexOf(G),length:c.byteLength(V.en,"utf16le"),string:V.en}),"postscriptName"===G&&eA.push({platformID:1,encodingID:0,languageID:0,nameID:hA.indexOf(G),length:V.en.length,string:V.en}))}this.records=eA,this.count=eA.length,this.stringOffset=W.size(this,null,!1)}};var vA=new e.VersionedStruct(e.uint16,{header:{xAvgCharWidth:e.int16,usWeightClass:e.uint16,usWidthClass:e.uint16,fsType:new e.Bitfield(e.uint16,[null,"noEmbedding","viewOnly","editable",null,null,null,null,"noSubsetting","bitmapOnly"]),ySubscriptXSize:e.int16,ySubscriptYSize:e.int16,ySubscriptXOffset:e.int16,ySubscriptYOffset:e.int16,ySuperscriptXSize:e.int16,ySuperscriptYSize:e.int16,ySuperscriptXOffset:e.int16,ySuperscriptYOffset:e.int16,yStrikeoutSize:e.int16,yStrikeoutPosition:e.int16,sFamilyClass:e.int16,panose:new e.Array(e.uint8,10),ulCharRange:new e.Array(e.uint32,4),vendorID:new e.String(4),fsSelection:new e.Bitfield(e.uint16,["italic","underscore","negative","outlined","strikeout","bold","regular","useTypoMetrics","wws","oblique"]),usFirstCharIndex:e.uint16,usLastCharIndex:e.uint16},0:{},1:{typoAscender:e.int16,typoDescender:e.int16,typoLineGap:e.int16,winAscent:e.uint16,winDescent:e.uint16,codePageRange:new e.Array(e.uint32,2)},2:{typoAscender:e.int16,typoDescender:e.int16,typoLineGap:e.int16,winAscent:e.uint16,winDescent:e.uint16,codePageRange:new e.Array(e.uint32,2),xHeight:e.int16,capHeight:e.int16,defaultChar:e.uint16,breakChar:e.uint16,maxContent:e.uint16},5:{typoAscender:e.int16,typoDescender:e.int16,typoLineGap:e.int16,winAscent:e.uint16,winDescent:e.uint16,codePageRange:new e.Array(e.uint32,2),xHeight:e.int16,capHeight:e.int16,defaultChar:e.uint16,breakChar:e.uint16,maxContent:e.uint16,usLowerOpticalPointSize:e.uint16,usUpperOpticalPointSize:e.uint16}}),nA=vA.versions;nA[3]=nA[4]=nA[2];var EA=new e.VersionedStruct(e.fixed32,{header:{italicAngle:e.fixed32,underlinePosition:e.int16,underlineThickness:e.int16,isFixedPitch:e.uint32,minMemType42:e.uint32,maxMemType42:e.uint32,minMemType1:e.uint32,maxMemType1:e.uint32},1:{},2:{numberOfGlyphs:e.uint16,glyphNameIndex:new e.Array(e.uint16,"numberOfGlyphs"),names:new e.Array(new e.String(e.uint8))},2.5:{numberOfGlyphs:e.uint16,offsets:new e.Array(e.uint8,"numberOfGlyphs")},3:{},4:{map:new e.Array(e.uint32,function(eA){return eA.parent.maxp.numGlyphs})}}),GA=new e.Struct({controlValues:new e.Array(e.int16)}),nt=new e.Struct({instructions:new e.Array(e.uint8)}),lt=new e.VersionedStruct("head.indexToLocFormat",{0:{offsets:new e.Array(e.uint16)},1:{offsets:new e.Array(e.uint32)}});lt.process=function(){if(0===this.version)for(var eA=0;eA>>=1};var TA=new e.Struct({controlValueProgram:new e.Array(e.uint8)}),it=new e.Array(new e.Buffer),vt=function(){function eA(V){this.type=V}var G=eA.prototype;return G.getCFFVersion=function(M){for(;M&&!M.hdrSize;)M=M.parent;return M?M.version:-1},G.decode=function(M,x){var tA=this.getCFFVersion(x)>=2?M.readUInt32BE():M.readUInt16BE();if(0===tA)return[];var sA,oA=M.readUInt8();if(1===oA)sA=e.uint8;else if(2===oA)sA=e.uint16;else if(3===oA)sA=e.uint24;else{if(4!==oA)throw new Error("Bad offset size in CFFIndex: ".concat(oA," ").concat(M.pos));sA=e.uint32}for(var iA=[],NA=M.pos+(tA+1)*oA-1,kA=sA.decode(M),gt=0;gt>4;if(15===tA)break;x+=Mt[tA];var oA=15&P;if(15===oA)break;x+=Mt[oA]}return parseFloat(x)}return null},eA.size=function(V){return V.forceLarge&&(V=32768),(0|V)!==V?1+Math.ceil(((""+V).length+1)/2):-107<=V&&V<=107?1:108<=V&&V<=1131||-1131<=V&&V<=-108?2:-32768<=V&&V<=32767?3:5},eA.encode=function(V,M){var x=Number(M);if(M.forceLarge)return V.writeUInt8(29),V.writeInt32BE(x);if((0|x)===x)return-107<=x&&x<=107?V.writeUInt8(x+139):108<=x&&x<=1131?(V.writeUInt8(247+((x-=108)>>8)),V.writeUInt8(255&x)):-1131<=x&&x<=-108?(V.writeUInt8(251+((x=-x-108)>>8)),V.writeUInt8(255&x)):-32768<=x&&x<=32767?(V.writeUInt8(28),V.writeInt16BE(x)):(V.writeUInt8(29),V.writeInt32BE(x));V.writeUInt8(30);for(var P=""+x,tA=0;tAP;)x.pop()},eA}(),null],[19,"Subrs",new et(new vt,{type:"local"}),null]]),OA=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],H=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],b=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],RA=new e.Struct({reserved:new e.Reserved(e.uint16),reqFeatureIndex:e.uint16,featureCount:e.uint16,featureIndexes:new e.Array(e.uint16,"featureCount")}),rA=new e.Struct({tag:new e.String(4),langSys:new e.Pointer(e.uint16,RA,{type:"parent"})}),Bt=new e.Struct({defaultLangSys:new e.Pointer(e.uint16,RA),count:e.uint16,langSysRecords:new e.Array(rA,"count")}),Yt=new e.Struct({tag:new e.String(4),script:new e.Pointer(e.uint16,Bt,{type:"parent"})}),j=new e.Array(Yt,e.uint16),XA=new e.Struct({featureParams:e.uint16,lookupCount:e.uint16,lookupListIndexes:new e.Array(e.uint16,"lookupCount")}),KA=new e.Struct({tag:new e.String(4),feature:new e.Pointer(e.uint16,XA,{type:"parent"})}),DA=new e.Array(KA,e.uint16),jA=new e.Struct({markAttachmentType:e.uint8,flags:new e.Bitfield(e.uint8,["rightToLeft","ignoreBaseGlyphs","ignoreLigatures","ignoreMarks","useMarkFilteringSet"])});function ct(eA){var G=new e.Struct({lookupType:e.uint16,flags:jA,subTableCount:e.uint16,subTables:new e.Array(new e.Pointer(e.uint16,eA),"subTableCount"),markFilteringSet:new e.Optional(e.uint16,function(V){return V.flags.flags.useMarkFilteringSet})});return new e.LazyArray(new e.Pointer(e.uint16,G),e.uint16)}var Lt=new e.Struct({start:e.uint16,end:e.uint16,startCoverageIndex:e.uint16}),xt=new e.VersionedStruct(e.uint16,{1:{glyphCount:e.uint16,glyphs:new e.Array(e.uint16,"glyphCount")},2:{rangeCount:e.uint16,rangeRecords:new e.Array(Lt,"rangeCount")}}),Rt=new e.Struct({start:e.uint16,end:e.uint16,class:e.uint16}),Vt=new e.VersionedStruct(e.uint16,{1:{startGlyph:e.uint16,glyphCount:e.uint16,classValueArray:new e.Array(e.uint16,"glyphCount")},2:{classRangeCount:e.uint16,classRangeRecord:new e.Array(Rt,"classRangeCount")}}),Le=new e.Struct({a:e.uint16,b:e.uint16,deltaFormat:e.uint16}),ie=new e.Struct({sequenceIndex:e.uint16,lookupListIndex:e.uint16}),te=new e.Struct({glyphCount:e.uint16,lookupCount:e.uint16,input:new e.Array(e.uint16,function(eA){return eA.glyphCount-1}),lookupRecords:new e.Array(ie,"lookupCount")}),ye=new e.Array(new e.Pointer(e.uint16,te),e.uint16),be=new e.Struct({glyphCount:e.uint16,lookupCount:e.uint16,classes:new e.Array(e.uint16,function(eA){return eA.glyphCount-1}),lookupRecords:new e.Array(ie,"lookupCount")}),Re=new e.Array(new e.Pointer(e.uint16,be),e.uint16),vn=new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),ruleSetCount:e.uint16,ruleSets:new e.Array(new e.Pointer(e.uint16,ye),"ruleSetCount")},2:{coverage:new e.Pointer(e.uint16,xt),classDef:new e.Pointer(e.uint16,Vt),classSetCnt:e.uint16,classSet:new e.Array(new e.Pointer(e.uint16,Re),"classSetCnt")},3:{glyphCount:e.uint16,lookupCount:e.uint16,coverages:new e.Array(new e.Pointer(e.uint16,xt),"glyphCount"),lookupRecords:new e.Array(ie,"lookupCount")}}),Dn=new e.Struct({backtrackGlyphCount:e.uint16,backtrack:new e.Array(e.uint16,"backtrackGlyphCount"),inputGlyphCount:e.uint16,input:new e.Array(e.uint16,function(eA){return eA.inputGlyphCount-1}),lookaheadGlyphCount:e.uint16,lookahead:new e.Array(e.uint16,"lookaheadGlyphCount"),lookupCount:e.uint16,lookupRecords:new e.Array(ie,"lookupCount")}),re=new e.Array(new e.Pointer(e.uint16,Dn),e.uint16),en=new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),chainCount:e.uint16,chainRuleSets:new e.Array(new e.Pointer(e.uint16,re),"chainCount")},2:{coverage:new e.Pointer(e.uint16,xt),backtrackClassDef:new e.Pointer(e.uint16,Vt),inputClassDef:new e.Pointer(e.uint16,Vt),lookaheadClassDef:new e.Pointer(e.uint16,Vt),chainCount:e.uint16,chainClassSet:new e.Array(new e.Pointer(e.uint16,re),"chainCount")},3:{backtrackGlyphCount:e.uint16,backtrackCoverage:new e.Array(new e.Pointer(e.uint16,xt),"backtrackGlyphCount"),inputGlyphCount:e.uint16,inputCoverage:new e.Array(new e.Pointer(e.uint16,xt),"inputGlyphCount"),lookaheadGlyphCount:e.uint16,lookaheadCoverage:new e.Array(new e.Pointer(e.uint16,xt),"lookaheadGlyphCount"),lookupCount:e.uint16,lookupRecords:new e.Array(ie,"lookupCount")}}),Te=new e.Fixed(16,"BE",14),nn=new e.Struct({startCoord:Te,peakCoord:Te,endCoord:Te}),Xe=new e.Struct({axisCount:e.uint16,regionCount:e.uint16,variationRegions:new e.Array(new e.Array(nn,"axisCount"),"regionCount")}),bn=new e.Struct({shortDeltas:new e.Array(e.int16,function(eA){return eA.parent.shortDeltaCount}),regionDeltas:new e.Array(e.int8,function(eA){return eA.parent.regionIndexCount-eA.parent.shortDeltaCount}),deltas:function(G){return G.shortDeltas.concat(G.regionDeltas)}}),Gn=new e.Struct({itemCount:e.uint16,shortDeltaCount:e.uint16,regionIndexCount:e.uint16,regionIndexes:new e.Array(e.uint16,"regionIndexCount"),deltaSets:new e.Array(bn,"itemCount")}),Jt=new e.Struct({format:e.uint16,variationRegionList:new e.Pointer(e.uint32,Xe),variationDataCount:e.uint16,itemVariationData:new e.Array(new e.Pointer(e.uint32,Gn),"variationDataCount")}),bt=new e.VersionedStruct(e.uint16,{1:(i={axisIndex:e.uint16},i.axisIndex=e.uint16,i.filterRangeMinValue=Te,i.filterRangeMaxValue=Te,i)}),Xt=new e.Struct({conditionCount:e.uint16,conditionTable:new e.Array(new e.Pointer(e.uint32,bt),"conditionCount")}),oe=new e.Struct({featureIndex:e.uint16,alternateFeatureTable:new e.Pointer(e.uint32,XA,{type:"parent"})}),In=new e.Struct({version:e.fixed32,substitutionCount:e.uint16,substitutions:new e.Array(oe,"substitutionCount")}),dn=new e.Struct({conditionSet:new e.Pointer(e.uint32,Xt,{type:"parent"}),featureTableSubstitution:new e.Pointer(e.uint32,In,{type:"parent"})}),Fn=new e.Struct({majorVersion:e.uint16,minorVersion:e.uint16,featureVariationRecordCount:e.uint32,featureVariationRecords:new e.Array(dn,"featureVariationRecordCount")}),Kn=function(){function eA(V,M){this.predefinedOps=V,this.type=M}var G=eA.prototype;return G.decode=function(M,x,P){return this.predefinedOps[P[0]]?this.predefinedOps[P[0]]:this.type.decode(M,x,P)},G.size=function(M,x){return this.type.size(M,x)},G.encode=function(M,x,P){var tA=this.predefinedOps.indexOf(x);return-1!==tA?tA:this.type.encode(M,x,P)},eA}(),gr=function(eA){function G(){return eA.call(this,"UInt8")||this}return h(G,eA),G.prototype.decode=function(x){return 127&e.uint8.decode(x)},G}(e.Number),Yn=new e.Struct({first:e.uint16,nLeft:e.uint8}),WA=new e.Struct({first:e.uint16,nLeft:e.uint16}),tt=new Kn([H,["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"]],new et(new e.VersionedStruct(new gr,{0:{nCodes:e.uint8,codes:new e.Array(e.uint8,"nCodes")},1:{nRanges:e.uint8,ranges:new e.Array(Yn,"nRanges")}}),{lazy:!0})),UA=function(eA){function G(){return eA.apply(this,arguments)||this}return h(G,eA),G.prototype.decode=function(x,P){for(var tA=f.resolveLength(this.length,x,P),oA=0,sA=[];oA=2?null:M=2||this.isCIDFont)return null;var x=this.topDict.charset;if(Array.isArray(x))return x[M];if(0===M)return".notdef";switch(M-=1,x.version){case 0:return this.string(x.glyphs[M]);case 1:case 2:for(var P=0;P>1;if(M=x[oA+1].first))return x[oA].fd;P=oA+1}}default:throw new Error("Unknown FDSelect version: ".concat(this.topDict.FDSelect.version))}},G.privateDictForGlyph=function(M){if(this.topDict.FDSelect){var x=this.fdForGlyph(M);return this.topDict.FDArray[x]?this.topDict.FDArray[x].Private:null}return this.version<2?this.topDict.Private:this.topDict.FDArray[0].Private},l(eA,[{key:"postscriptName",get:function(){return this.version<2?this.nameIndex[0]:null}},{key:"fullName",get:function(){return this.string(this.topDict.FullName)}},{key:"familyName",get:function(){return this.string(this.topDict.FamilyName)}}]),eA}(),Et=new e.Struct({glyphIndex:e.uint16,vertOriginY:e.int16}),Pt=new e.Struct({majorVersion:e.uint16,minorVersion:e.uint16,defaultVertOriginY:e.int16,numVertOriginYMetrics:e.uint16,metrics:new e.Array(Et,"numVertOriginYMetrics")}),jt=new e.Struct({height:e.uint8,width:e.uint8,horiBearingX:e.int8,horiBearingY:e.int8,horiAdvance:e.uint8,vertBearingX:e.int8,vertBearingY:e.int8,vertAdvance:e.uint8}),Ht=new e.Struct({height:e.uint8,width:e.uint8,bearingX:e.int8,bearingY:e.int8,advance:e.uint8}),ce=new e.Struct({glyph:e.uint16,xOffset:e.int8,yOffset:e.int8}),Zt=function(){},ue=function(){},ve=(new e.VersionedStruct("version",{1:{metrics:Ht,data:Zt},2:{metrics:Ht,data:ue},5:{data:ue},6:{metrics:jt,data:Zt},7:{metrics:jt,data:ue},8:{metrics:Ht,pad:new e.Reserved(e.uint8),numComponents:e.uint16,components:new e.Array(ce,"numComponents")},9:{metrics:jt,pad:new e.Reserved(e.uint8),numComponents:e.uint16,components:new e.Array(ce,"numComponents")},17:{metrics:Ht,dataLen:e.uint32,data:new e.Buffer("dataLen")},18:{metrics:jt,dataLen:e.uint32,data:new e.Buffer("dataLen")},19:{dataLen:e.uint32,data:new e.Buffer("dataLen")}}),new e.Struct({ascender:e.int8,descender:e.int8,widthMax:e.uint8,caretSlopeNumerator:e.int8,caretSlopeDenominator:e.int8,caretOffset:e.int8,minOriginSB:e.int8,minAdvanceSB:e.int8,maxBeforeBL:e.int8,minAfterBL:e.int8,pad:new e.Reserved(e.int8,2)})),Ge=new e.Struct({glyphCode:e.uint16,offset:e.uint16}),Se=new e.VersionedStruct(e.uint16,{header:{imageFormat:e.uint16,imageDataOffset:e.uint32},1:{offsetArray:new e.Array(e.uint32,function(eA){return eA.parent.lastGlyphIndex-eA.parent.firstGlyphIndex+1})},2:{imageSize:e.uint32,bigMetrics:jt},3:{offsetArray:new e.Array(e.uint16,function(eA){return eA.parent.lastGlyphIndex-eA.parent.firstGlyphIndex+1})},4:{numGlyphs:e.uint32,glyphArray:new e.Array(Ge,function(eA){return eA.numGlyphs+1})},5:{imageSize:e.uint32,bigMetrics:jt,numGlyphs:e.uint32,glyphCodeArray:new e.Array(e.uint16,"numGlyphs")}}),xe=new e.Struct({firstGlyphIndex:e.uint16,lastGlyphIndex:e.uint16,subtable:new e.Pointer(e.uint32,Se)}),Ne=new e.Struct({indexSubTableArray:new e.Pointer(e.uint32,new e.Array(xe,1),{type:"parent"}),indexTablesSize:e.uint32,numberOfIndexSubTables:e.uint32,colorRef:e.uint32,hori:ve,vert:ve,startGlyphIndex:e.uint16,endGlyphIndex:e.uint16,ppemX:e.uint8,ppemY:e.uint8,bitDepth:e.uint8,flags:new e.Bitfield(e.uint8,["horizontal","vertical"])}),$e=new e.Struct({version:e.uint32,numSizes:e.uint32,sizes:new e.Array(Ne,"numSizes")}),yn=new e.Struct({ppem:e.uint16,resolution:e.uint16,imageOffsets:new e.Array(new e.Pointer(e.uint32,"void"),function(eA){return eA.parent.parent.maxp.numGlyphs+1})}),an=new e.Struct({version:e.uint16,flags:new e.Bitfield(e.uint16,["renderOutlines"]),numImgTables:e.uint32,imageTables:new e.Array(new e.Pointer(e.uint32,yn),"numImgTables")}),Mn=new e.Struct({gid:e.uint16,paletteIndex:e.uint16}),xn=new e.Struct({gid:e.uint16,firstLayerIndex:e.uint16,numLayers:e.uint16}),qe=new e.Struct({version:e.uint16,numBaseGlyphRecords:e.uint16,baseGlyphRecord:new e.Pointer(e.uint32,new e.Array(xn,"numBaseGlyphRecords")),layerRecords:new e.Pointer(e.uint32,new e.Array(Mn,"numLayerRecords"),{lazy:!0}),numLayerRecords:e.uint16}),fn=new e.Struct({blue:e.uint8,green:e.uint8,red:e.uint8,alpha:e.uint8}),cn=new e.VersionedStruct(e.uint16,{header:{numPaletteEntries:e.uint16,numPalettes:e.uint16,numColorRecords:e.uint16,colorRecords:new e.Pointer(e.uint32,new e.Array(fn,"numColorRecords")),colorRecordIndices:new e.Array(e.uint16,"numPalettes")},0:{},1:{offsetPaletteTypeArray:new e.Pointer(e.uint32,new e.Array(e.uint32,"numPalettes")),offsetPaletteLabelArray:new e.Pointer(e.uint32,new e.Array(e.uint16,"numPalettes")),offsetPaletteEntryLabelArray:new e.Pointer(e.uint32,new e.Array(e.uint16,"numPaletteEntries"))}}),Xn=new e.VersionedStruct(e.uint16,{1:{coordinate:e.int16},2:{coordinate:e.int16,referenceGlyph:e.uint16,baseCoordPoint:e.uint16},3:{coordinate:e.int16,deviceTable:new e.Pointer(e.uint16,Le)}}),Yr=new e.Struct({defaultIndex:e.uint16,baseCoordCount:e.uint16,baseCoords:new e.Array(new e.Pointer(e.uint16,Xn),"baseCoordCount")}),Tr=new e.Struct({tag:new e.String(4),minCoord:new e.Pointer(e.uint16,Xn,{type:"parent"}),maxCoord:new e.Pointer(e.uint16,Xn,{type:"parent"})}),rr=new e.Struct({minCoord:new e.Pointer(e.uint16,Xn),maxCoord:new e.Pointer(e.uint16,Xn),featMinMaxCount:e.uint16,featMinMaxRecords:new e.Array(Tr,"featMinMaxCount")}),Tn=new e.Struct({tag:new e.String(4),minMax:new e.Pointer(e.uint16,rr,{type:"parent"})}),Sn=new e.Struct({baseValues:new e.Pointer(e.uint16,Yr),defaultMinMax:new e.Pointer(e.uint16,rr),baseLangSysCount:e.uint16,baseLangSysRecords:new e.Array(Tn,"baseLangSysCount")}),mA=new e.Struct({tag:new e.String(4),script:new e.Pointer(e.uint16,Sn,{type:"parent"})}),O=new e.Array(mA,e.uint16),N=new e.Array(new e.String(4),e.uint16),X=new e.Struct({baseTagList:new e.Pointer(e.uint16,N),baseScriptList:new e.Pointer(e.uint16,O)}),K=new e.VersionedStruct(e.uint32,{header:{horizAxis:new e.Pointer(e.uint16,X),vertAxis:new e.Pointer(e.uint16,X)},65536:{},65537:{itemVariationStore:new e.Pointer(e.uint32,Jt)}}),fA=new e.Array(e.uint16,e.uint16),IA=new e.Struct({coverage:new e.Pointer(e.uint16,xt),glyphCount:e.uint16,attachPoints:new e.Array(new e.Pointer(e.uint16,fA),"glyphCount")}),At=new e.VersionedStruct(e.uint16,{1:{coordinate:e.int16},2:{caretValuePoint:e.uint16},3:{coordinate:e.int16,deviceTable:new e.Pointer(e.uint16,Le)}}),rt=new e.Array(new e.Pointer(e.uint16,At),e.uint16),ft=new e.Struct({coverage:new e.Pointer(e.uint16,xt),ligGlyphCount:e.uint16,ligGlyphs:new e.Array(new e.Pointer(e.uint16,rt),"ligGlyphCount")}),Ct=new e.Struct({markSetTableFormat:e.uint16,markSetCount:e.uint16,coverage:new e.Array(new e.Pointer(e.uint32,xt),"markSetCount")}),Dt=new e.VersionedStruct(e.uint32,{header:{glyphClassDef:new e.Pointer(e.uint16,Vt),attachList:new e.Pointer(e.uint16,IA),ligCaretList:new e.Pointer(e.uint16,ft),markAttachClassDef:new e.Pointer(e.uint16,Vt)},65536:{},65538:{markGlyphSetsDef:new e.Pointer(e.uint16,Ct)},65539:{markGlyphSetsDef:new e.Pointer(e.uint16,Ct),itemVariationStore:new e.Pointer(e.uint32,Jt)}}),Ft=new e.Bitfield(e.uint16,["xPlacement","yPlacement","xAdvance","yAdvance","xPlaDevice","yPlaDevice","xAdvDevice","yAdvDevice"]),Tt={xPlacement:e.int16,yPlacement:e.int16,xAdvance:e.int16,yAdvance:e.int16,xPlaDevice:new e.Pointer(e.uint16,Le,{type:"global",relativeTo:function(G){return G.rel}}),yPlaDevice:new e.Pointer(e.uint16,Le,{type:"global",relativeTo:function(G){return G.rel}}),xAdvDevice:new e.Pointer(e.uint16,Le,{type:"global",relativeTo:function(G){return G.rel}}),yAdvDevice:new e.Pointer(e.uint16,Le,{type:"global",relativeTo:function(G){return G.rel}})},Ot=function(){function eA(V){void 0===V&&(V="valueFormat"),this.key=V}var G=eA.prototype;return G.buildStruct=function(M){for(var x=M;!x[this.key]&&x.parent;)x=x.parent;if(x[this.key]){var P={rel:function(){return x._startOffset}},tA=x[this.key];for(var oA in tA)tA[oA]&&(P[oA]=Tt[oA]);return new e.Struct(P)}},G.size=function(M,x){return this.buildStruct(x).size(M,x)},G.decode=function(M,x){var P=this.buildStruct(x).decode(M,x);return delete P.rel,P},eA}(),Kt=new e.Struct({secondGlyph:e.uint16,value1:new Ot("valueFormat1"),value2:new Ot("valueFormat2")}),fe=new e.Array(Kt,e.uint16),Ee=new e.Struct({value1:new Ot("valueFormat1"),value2:new Ot("valueFormat2")}),pe=new e.VersionedStruct(e.uint16,{1:{xCoordinate:e.int16,yCoordinate:e.int16},2:{xCoordinate:e.int16,yCoordinate:e.int16,anchorPoint:e.uint16},3:{xCoordinate:e.int16,yCoordinate:e.int16,xDeviceTable:new e.Pointer(e.uint16,Le),yDeviceTable:new e.Pointer(e.uint16,Le)}}),rn=new e.Struct({entryAnchor:new e.Pointer(e.uint16,pe,{type:"parent"}),exitAnchor:new e.Pointer(e.uint16,pe,{type:"parent"})}),Me=new e.Struct({class:e.uint16,markAnchor:new e.Pointer(e.uint16,pe,{type:"parent"})}),je=new e.Array(Me,e.uint16),wn=new e.Array(new e.Pointer(e.uint16,pe),function(eA){return eA.parent.classCount}),Ke=new e.Array(wn,e.uint16),Cn=new e.Array(new e.Pointer(e.uint16,pe),function(eA){return eA.parent.parent.classCount}),Vn=new e.Array(Cn,e.uint16),qn=new e.Array(new e.Pointer(e.uint16,Vn),e.uint16),Nn=new e.VersionedStruct("lookupType",{1:new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),valueFormat:Ft,value:new Ot},2:{coverage:new e.Pointer(e.uint16,xt),valueFormat:Ft,valueCount:e.uint16,values:new e.LazyArray(new Ot,"valueCount")}}),2:new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),valueFormat1:Ft,valueFormat2:Ft,pairSetCount:e.uint16,pairSets:new e.LazyArray(new e.Pointer(e.uint16,fe),"pairSetCount")},2:{coverage:new e.Pointer(e.uint16,xt),valueFormat1:Ft,valueFormat2:Ft,classDef1:new e.Pointer(e.uint16,Vt),classDef2:new e.Pointer(e.uint16,Vt),class1Count:e.uint16,class2Count:e.uint16,classRecords:new e.LazyArray(new e.LazyArray(Ee,"class2Count"),"class1Count")}}),3:{format:e.uint16,coverage:new e.Pointer(e.uint16,xt),entryExitCount:e.uint16,entryExitRecords:new e.Array(rn,"entryExitCount")},4:{format:e.uint16,markCoverage:new e.Pointer(e.uint16,xt),baseCoverage:new e.Pointer(e.uint16,xt),classCount:e.uint16,markArray:new e.Pointer(e.uint16,je),baseArray:new e.Pointer(e.uint16,Ke)},5:{format:e.uint16,markCoverage:new e.Pointer(e.uint16,xt),ligatureCoverage:new e.Pointer(e.uint16,xt),classCount:e.uint16,markArray:new e.Pointer(e.uint16,je),ligatureArray:new e.Pointer(e.uint16,qn)},6:{format:e.uint16,mark1Coverage:new e.Pointer(e.uint16,xt),mark2Coverage:new e.Pointer(e.uint16,xt),classCount:e.uint16,mark1Array:new e.Pointer(e.uint16,je),mark2Array:new e.Pointer(e.uint16,Ke)},7:vn,8:en,9:{posFormat:e.uint16,lookupType:e.uint16,extension:new e.Pointer(e.uint32,Nn)}});Nn.versions[9].extension.type=Nn;var zr=new e.VersionedStruct(e.uint32,{header:{scriptList:new e.Pointer(e.uint16,j),featureList:new e.Pointer(e.uint16,DA),lookupList:new e.Pointer(e.uint16,new ct(Nn))},65536:{},65537:{featureVariations:new e.Pointer(e.uint32,Fn)}}),Jn=new e.Array(e.uint16,e.uint16),ir=Jn,dr=new e.Struct({glyph:e.uint16,compCount:e.uint16,components:new e.Array(e.uint16,function(eA){return eA.compCount-1})}),_n=new e.Array(new e.Pointer(e.uint16,dr),e.uint16),Br=new e.VersionedStruct("lookupType",{1:new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,xt),deltaGlyphID:e.int16},2:{coverage:new e.Pointer(e.uint16,xt),glyphCount:e.uint16,substitute:new e.LazyArray(e.uint16,"glyphCount")}}),2:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,xt),count:e.uint16,sequences:new e.LazyArray(new e.Pointer(e.uint16,Jn),"count")},3:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,xt),count:e.uint16,alternateSet:new e.LazyArray(new e.Pointer(e.uint16,ir),"count")},4:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,xt),count:e.uint16,ligatureSets:new e.LazyArray(new e.Pointer(e.uint16,_n),"count")},5:vn,6:en,7:{substFormat:e.uint16,lookupType:e.uint16,extension:new e.Pointer(e.uint32,Br)},8:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,xt),backtrackCoverage:new e.Array(new e.Pointer(e.uint16,xt),"backtrackGlyphCount"),lookaheadGlyphCount:e.uint16,lookaheadCoverage:new e.Array(new e.Pointer(e.uint16,xt),"lookaheadGlyphCount"),glyphCount:e.uint16,substitutes:new e.Array(e.uint16,"glyphCount")}});Br.versions[7].extension.type=Br;var Lr=new e.VersionedStruct(e.uint32,{header:{scriptList:new e.Pointer(e.uint16,j),featureList:new e.Pointer(e.uint16,DA),lookupList:new e.Pointer(e.uint16,new ct(Br))},65536:{},65537:{featureVariations:new e.Pointer(e.uint32,Fn)}}),Wn=new e.Array(e.uint16,e.uint16),br=new e.Struct({shrinkageEnableGSUB:new e.Pointer(e.uint16,Wn),shrinkageDisableGSUB:new e.Pointer(e.uint16,Wn),shrinkageEnableGPOS:new e.Pointer(e.uint16,Wn),shrinkageDisableGPOS:new e.Pointer(e.uint16,Wn),shrinkageJstfMax:new e.Pointer(e.uint16,new ct(Nn)),extensionEnableGSUB:new e.Pointer(e.uint16,Wn),extensionDisableGSUB:new e.Pointer(e.uint16,Wn),extensionEnableGPOS:new e.Pointer(e.uint16,Wn),extensionDisableGPOS:new e.Pointer(e.uint16,Wn),extensionJstfMax:new e.Pointer(e.uint16,new ct(Nn))}),Mr=new e.Array(new e.Pointer(e.uint16,br),e.uint16),Gr=new e.Struct({tag:new e.String(4),jstfLangSys:new e.Pointer(e.uint16,Mr)}),Hr=new e.Struct({extenderGlyphs:new e.Pointer(e.uint16,new e.Array(e.uint16,e.uint16)),defaultLangSys:new e.Pointer(e.uint16,Mr),langSysCount:e.uint16,langSysRecords:new e.Array(Gr,"langSysCount")}),si=new e.Struct({tag:new e.String(4),script:new e.Pointer(e.uint16,Hr,{type:"parent"})}),Jr=new e.Struct({version:e.uint32,scriptCount:e.uint16,scriptList:new e.Array(si,"scriptCount")}),Or=new e.Struct({entry:new(function(){function eA(V){this._size=V}var G=eA.prototype;return G.decode=function(M,x){switch(this.size(0,x)){case 1:return M.readUInt8();case 2:return M.readUInt16BE();case 3:return M.readUInt24BE();case 4:return M.readUInt32BE()}},G.size=function(M,x){return f.resolveLength(this._size,null,x)},eA}())(function(eA){return 1+((48&eA.parent.entryFormat)>>4)}),outerIndex:function(G){return G.entry>>1+(15&G.parent.entryFormat)},innerIndex:function(G){return G.entry&(1<<1+(15&G.parent.entryFormat))-1}}),Zn=new e.Struct({entryFormat:e.uint16,mapCount:e.uint16,mapData:new e.Array(Or,"mapCount")}),Li=new e.Struct({majorVersion:e.uint16,minorVersion:e.uint16,itemVariationStore:new e.Pointer(e.uint32,Jt),advanceWidthMapping:new e.Pointer(e.uint32,Zn),LSBMapping:new e.Pointer(e.uint32,Zn),RSBMapping:new e.Pointer(e.uint32,Zn)}),bi=new e.Struct({format:e.uint32,length:e.uint32,offset:e.uint32}),oo=new e.Struct({reserved:new e.Reserved(e.uint16,2),cbSignature:e.uint32,signature:new e.Buffer("cbSignature")}),aa=new e.Struct({ulVersion:e.uint32,usNumSigs:e.uint16,usFlag:e.uint16,signatures:new e.Array(bi,"usNumSigs"),signatureBlocks:new e.Array(oo,"usNumSigs")}),so=new e.Struct({rangeMaxPPEM:e.uint16,rangeGaspBehavior:new e.Bitfield(e.uint16,["grayscale","gridfit","symmetricSmoothing","symmetricGridfit"])}),lo=new e.Struct({version:e.uint16,numRanges:e.uint16,gaspRanges:new e.Array(so,"numRanges")}),co=new e.Struct({pixelSize:e.uint8,maximumWidth:e.uint8,widths:new e.Array(e.uint8,function(eA){return eA.parent.parent.maxp.numGlyphs})}),go=new e.Struct({version:e.uint16,numRecords:e.int16,sizeDeviceRecord:e.int32,records:new e.Array(co,"numRecords")}),Bo=new e.Struct({left:e.uint16,right:e.uint16,value:e.int16}),oa=new e.Struct({firstGlyph:e.uint16,nGlyphs:e.uint16,offsets:new e.Array(e.uint16,"nGlyphs"),max:function(G){return G.offsets.length&&Math.max.apply(Math,G.offsets)}}),uo=new e.Struct({off:function(G){return G._startOffset-G.parent.parent._startOffset},len:function(G){return G.parent.rowWidth/2*((G.parent.leftTable.max-G.off)/G.parent.rowWidth+1)},values:new e.LazyArray(e.int16,"len")}),sa=new e.VersionedStruct("format",{0:{nPairs:e.uint16,searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16,pairs:new e.Array(Bo,"nPairs")},2:{rowWidth:e.uint16,leftTable:new e.Pointer(e.uint16,oa,{type:"parent"}),rightTable:new e.Pointer(e.uint16,oa,{type:"parent"}),array:new e.Pointer(e.uint16,uo,{type:"parent"})},3:{glyphCount:e.uint16,kernValueCount:e.uint8,leftClassCount:e.uint8,rightClassCount:e.uint8,flags:e.uint8,kernValue:new e.Array(e.int16,"kernValueCount"),leftClass:new e.Array(e.uint8,"glyphCount"),rightClass:new e.Array(e.uint8,"glyphCount"),kernIndex:new e.Array(e.uint8,function(eA){return eA.leftClassCount*eA.rightClassCount})}}),la=new e.VersionedStruct("version",{0:{subVersion:e.uint16,length:e.uint16,format:e.uint8,coverage:new e.Bitfield(e.uint8,["horizontal","minimum","crossStream","override"]),subtable:sa,padding:new e.Reserved(e.uint8,function(eA){return eA.length-eA._currentOffset})},1:{length:e.uint32,coverage:new e.Bitfield(e.uint8,[null,null,null,null,null,"variation","crossStream","vertical"]),format:e.uint8,tupleIndex:e.uint16,subtable:sa,padding:new e.Reserved(e.uint8,function(eA){return eA.length-eA._currentOffset})}}),fo=new e.VersionedStruct(e.uint16,{0:{nTables:e.uint16,tables:new e.Array(la,"nTables")},1:{reserved:new e.Reserved(e.uint16),nTables:e.uint32,tables:new e.Array(la,"nTables")}}),ca=new e.Struct({version:e.uint16,numGlyphs:e.uint16,yPels:new e.Array(e.uint8,"numGlyphs")}),ho=new e.Struct({version:e.uint16,fontNumber:e.uint32,pitch:e.uint16,xHeight:e.uint16,style:e.uint16,typeFamily:e.uint16,capHeight:e.uint16,symbolSet:e.uint16,typeface:new e.String(16),characterComplement:new e.String(8),fileName:new e.String(6),strokeWeight:new e.String(1),widthType:new e.String(1),serifStyle:e.uint8,reserved:new e.Reserved(e.uint8)}),Eo=new e.Struct({bCharSet:e.uint8,xRatio:e.uint8,yStartRatio:e.uint8,yEndRatio:e.uint8}),wo=new e.Struct({yPelHeight:e.uint16,yMax:e.int16,yMin:e.int16}),Co=new e.Struct({recs:e.uint16,startsz:e.uint8,endsz:e.uint8,entries:new e.Array(wo,"recs")}),Qo=new e.Struct({version:e.uint16,numRecs:e.uint16,numRatios:e.uint16,ratioRanges:new e.Array(Eo,"numRatios"),offsets:new e.Array(e.uint16,"numRatios"),groups:new e.Array(Co,"numRecs")}),Mo=new e.Struct({version:e.uint16,ascent:e.int16,descent:e.int16,lineGap:e.int16,advanceHeightMax:e.int16,minTopSideBearing:e.int16,minBottomSideBearing:e.int16,yMaxExtent:e.int16,caretSlopeRise:e.int16,caretSlopeRun:e.int16,caretOffset:e.int16,reserved:new e.Reserved(e.int16,4),metricDataFormat:e.int16,numberOfMetrics:e.uint16}),po=new e.Struct({advance:e.uint16,bearing:e.int16}),Io=new e.Struct({metrics:new e.LazyArray(po,function(eA){return eA.parent.vhea.numberOfMetrics}),bearings:new e.LazyArray(e.int16,function(eA){return eA.parent.maxp.numGlyphs-eA.parent.vhea.numberOfMetrics})}),ga=new e.Fixed(16,"BE",14),mo=new e.Struct({fromCoord:ga,toCoord:ga}),vo=new e.Struct({pairCount:e.uint16,correspondence:new e.Array(mo,"pairCount")}),Do=new e.Struct({version:e.fixed32,axisCount:e.uint32,segment:new e.Array(vo,"axisCount")}),yo=function(){function eA(V,M,x){this.type=V,this.stream=M,this.parent=x,this.base=this.stream.pos,this._items=[]}var G=eA.prototype;return G.getItem=function(M){if(null==this._items[M]){var x=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.parent)*M,this._items[M]=this.type.decode(this.stream,this.parent),this.stream.pos=x}return this._items[M]},G.inspect=function(){return"[UnboundedArray ".concat(this.type.constructor.name,"]")},eA}(),$n=function(eA){function G(M){return eA.call(this,M,0)||this}return h(G,eA),G.prototype.decode=function(x,P){return new yo(this.type,x,P)},G}(e.Array),ur=function(G){void 0===G&&(G=e.uint16),G=new(function(){function oA(iA){this.type=iA}var sA=oA.prototype;return sA.decode=function(NA,kA){return this.type.decode(NA,kA=kA.parent.parent)},sA.size=function(NA,kA){return this.type.size(NA,kA=kA.parent.parent)},sA.encode=function(NA,kA,gt){return this.type.encode(NA,kA,gt=gt.parent.parent)},oA}())(G);var M=new e.Struct({unitSize:e.uint16,nUnits:e.uint16,searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16}),x=new e.Struct({lastGlyph:e.uint16,firstGlyph:e.uint16,value:G}),P=new e.Struct({lastGlyph:e.uint16,firstGlyph:e.uint16,values:new e.Pointer(e.uint16,new e.Array(G,function(oA){return oA.lastGlyph-oA.firstGlyph+1}),{type:"parent"})}),tA=new e.Struct({glyph:e.uint16,value:G});return new e.VersionedStruct(e.uint16,{0:{values:new $n(G)},2:{binarySearchHeader:M,segments:new e.Array(x,function(oA){return oA.binarySearchHeader.nUnits})},4:{binarySearchHeader:M,segments:new e.Array(P,function(oA){return oA.binarySearchHeader.nUnits})},6:{binarySearchHeader:M,segments:new e.Array(tA,function(oA){return oA.binarySearchHeader.nUnits})},8:{firstGlyph:e.uint16,count:e.uint16,values:new e.Array(G,"count")}})};function li(eA,G){void 0===eA&&(eA={}),void 0===G&&(G=e.uint16);var V=Object.assign({newState:e.uint16,flags:e.uint16},eA),M=new e.Struct(V),x=new $n(new e.Array(e.uint16,function(tA){return tA.nClasses}));return new e.Struct({nClasses:e.uint32,classTable:new e.Pointer(e.uint32,new ur(G)),stateArray:new e.Pointer(e.uint32,x),entryTable:new e.Pointer(e.uint32,new $n(M))})}var Fo=new e.VersionedStruct("format",{0:{deltas:new e.Array(e.int16,32)},1:{deltas:new e.Array(e.int16,32),mappingData:new ur(e.uint16)},2:{standardGlyph:e.uint16,controlPoints:new e.Array(e.uint16,32)},3:{standardGlyph:e.uint16,controlPoints:new e.Array(e.uint16,32),mappingData:new ur(e.uint16)}}),Ba=new e.Struct({version:e.fixed32,format:e.uint16,defaultBaseline:e.uint16,subtable:Fo}),Yo=new e.Struct({setting:e.uint16,nameIndex:e.int16,name:function(G){return G.parent.parent.parent.name.records.fontFeatures[G.nameIndex]}}),ua=new e.Struct({feature:e.uint16,nSettings:e.uint16,settingTable:new e.Pointer(e.uint32,new e.Array(Yo,"nSettings"),{type:"parent"}),featureFlags:new e.Bitfield(e.uint8,[null,null,null,null,null,null,"hasDefault","exclusive"]),defaultSetting:e.uint8,nameIndex:e.int16,name:function(G){return G.parent.parent.name.records.fontFeatures[G.nameIndex]}}),Sr=new e.Struct({version:e.fixed32,featureNameCount:e.uint16,reserved1:new e.Reserved(e.uint16),reserved2:new e.Reserved(e.uint32),featureNames:new e.Array(ua,"featureNameCount")}),or=new e.Struct({axisTag:new e.String(4),minValue:e.fixed32,defaultValue:e.fixed32,maxValue:e.fixed32,flags:e.uint16,nameID:e.uint16,name:function(G){return G.parent.parent.name.records.fontFeatures[G.nameID]}}),pr=new e.Struct({nameID:e.uint16,name:function(G){return G.parent.parent.name.records.fontFeatures[G.nameID]},flags:e.uint16,coord:new e.Array(e.fixed32,function(eA){return eA.parent.axisCount}),postscriptNameID:new e.Optional(e.uint16,function(eA){return eA.parent.instanceSize-eA._currentOffset>0})}),To=new e.Struct({version:e.fixed32,offsetToData:e.uint16,countSizePairs:e.uint16,axisCount:e.uint16,axisSize:e.uint16,instanceCount:e.uint16,instanceSize:e.uint16,axis:new e.Array(or,"axisCount"),instance:new e.Array(pr,"instanceCount")}),So=new e.Fixed(16,"BE",14),No=function(){function eA(){}return eA.decode=function(V,M){return M.flags?V.readUInt32BE():2*V.readUInt16BE()},eA}(),Uo=new e.Struct({version:e.uint16,reserved:new e.Reserved(e.uint16),axisCount:e.uint16,globalCoordCount:e.uint16,globalCoords:new e.Pointer(e.uint32,new e.Array(new e.Array(So,"axisCount"),"globalCoordCount")),glyphCount:e.uint16,flags:e.uint16,offsetToData:e.uint32,offsets:new e.Array(new e.Pointer(No,"void",{relativeTo:function(G){return G.offsetToData},allowNull:!1}),function(eA){return eA.glyphCount+1})}),Po=new e.Struct({length:e.uint16,coverage:e.uint16,subFeatureFlags:e.uint32,stateTable:new function xo(eA,G){void 0===eA&&(eA={}),void 0===G&&(G=e.uint16);var V=new e.Struct({version:function(){return 8},firstGlyph:e.uint16,values:new e.Array(e.uint8,e.uint16)}),M=Object.assign({newStateOffset:e.uint16,newState:function(sA){return(sA.newStateOffset-(sA.parent.stateArray.base-sA.parent._startOffset))/sA.parent.nClasses},flags:e.uint16},eA),x=new e.Struct(M),P=new $n(new e.Array(e.uint8,function(oA){return oA.nClasses}));return new e.Struct({nClasses:e.uint16,classTable:new e.Pointer(e.uint16,V),stateArray:new e.Pointer(e.uint16,P),entryTable:new e.Pointer(e.uint16,new $n(x))})}}),Ro=new e.Struct({justClass:e.uint32,beforeGrowLimit:e.fixed32,beforeShrinkLimit:e.fixed32,afterGrowLimit:e.fixed32,afterShrinkLimit:e.fixed32,growFlags:e.uint16,shrinkFlags:e.uint16}),zo=new e.Array(Ro,e.uint32),Lo=new e.VersionedStruct("actionType",{0:{lowerLimit:e.fixed32,upperLimit:e.fixed32,order:e.uint16,glyphs:new e.Array(e.uint16,e.uint16)},1:{addGlyph:e.uint16},2:{substThreshold:e.fixed32,addGlyph:e.uint16,substGlyph:e.uint16},3:{},4:{variationAxis:e.uint32,minimumLimit:e.fixed32,noStretchValue:e.fixed32,maximumLimit:e.fixed32},5:{flags:e.uint16,glyph:e.uint16}}),bo=new e.Struct({actionClass:e.uint16,actionType:e.uint16,actionLength:e.uint32,actionData:Lo,padding:new e.Reserved(e.uint8,function(eA){return eA.actionLength-eA._currentOffset})}),Go=new e.Array(bo,e.uint32),Ho=new e.Struct({lookupTable:new ur(new e.Pointer(e.uint16,Go))}),fa=new e.Struct({classTable:new e.Pointer(e.uint16,Po,{type:"parent"}),wdcOffset:e.uint16,postCompensationTable:new e.Pointer(e.uint16,Ho,{type:"parent"}),widthDeltaClusters:new ur(new e.Pointer(e.uint16,zo,{type:"parent",relativeTo:function(G){return G.wdcOffset}}))}),Jo=new e.Struct({version:e.uint32,format:e.uint16,horizontal:new e.Pointer(e.uint16,fa),vertical:new e.Pointer(e.uint16,fa)}),Oo={action:e.uint16},ko={markIndex:e.uint16,currentIndex:e.uint16},ha={currentInsertIndex:e.uint16,markedInsertIndex:e.uint16},jo=new e.Struct({items:new $n(new e.Pointer(e.uint32,new ur))}),Ko=new e.VersionedStruct("type",{0:{stateTable:new li},1:{stateTable:new li(ko),substitutionTable:new e.Pointer(e.uint32,jo)},2:{stateTable:new li(Oo),ligatureActions:new e.Pointer(e.uint32,new $n(e.uint32)),components:new e.Pointer(e.uint32,new $n(e.uint16)),ligatureList:new e.Pointer(e.uint32,new $n(e.uint16))},4:{lookupTable:new ur},5:{stateTable:new li(ha),insertionActions:new e.Pointer(e.uint32,new $n(e.uint16))}}),Vo=new e.Struct({length:e.uint32,coverage:e.uint24,type:e.uint8,subFeatureFlags:e.uint32,table:Ko,padding:new e.Reserved(e.uint8,function(eA){return eA.length-eA._currentOffset})}),Wo=new e.Struct({featureType:e.uint16,featureSetting:e.uint16,enableFlags:e.uint32,disableFlags:e.uint32}),Zo=new e.Struct({defaultFlags:e.uint32,chainLength:e.uint32,nFeatureEntries:e.uint32,nSubtables:e.uint32,features:new e.Array(Wo,"nFeatureEntries"),subtables:new e.Array(Vo,"nSubtables")}),Xo=new e.Struct({version:e.uint16,unused:new e.Reserved(e.uint16),nChains:e.uint32,chains:new e.Array(Zo,"nChains")}),qo=new e.Struct({left:e.int16,top:e.int16,right:e.int16,bottom:e.int16}),_o=new e.Struct({version:e.fixed32,format:e.uint16,lookupTable:new ur(qo)}),se={};se.cmap=yA,se.head=xA,se.hhea=_,se.hmtx=uA,se.maxp=QA,se.name=W,se["OS/2"]=vA,se.post=EA,se.fpgm=nt,se.loca=lt,se.prep=TA,se["cvt "]=GA,se.glyf=it,se["CFF "]=ne,se.CFF2=ne,se.VORG=Pt,se.EBLC=$e,se.CBLC=se.EBLC,se.sbix=an,se.COLR=qe,se.CPAL=cn,se.BASE=K,se.GDEF=Dt,se.GPOS=zr,se.GSUB=Lr,se.JSTF=Jr,se.HVAR=Li,se.DSIG=aa,se.gasp=lo,se.hdmx=go,se.kern=fo,se.LTSH=ca,se.PCLT=ho,se.VDMX=Qo,se.vhea=Mo,se.vmtx=Io,se.avar=Do,se.bsln=Ba,se.feat=Sr,se.fvar=To,se.gvar=Uo,se.just=Jo,se.morx=Xo,se.opbd=_o;var fr,$o=new e.Struct({tag:new e.String(4),checkSum:e.uint32,offset:new e.Pointer(e.uint32,"void",{type:"global"}),length:e.uint32}),ci=new e.Struct({tag:new e.String(4),numTables:e.uint16,searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16,tables:new e.Array($o,"numTables")});function gi(eA,G){for(var V=0,M=eA.length-1;V<=M;){var x=V+M>>1,P=G(eA[x]);if(P<0)M=x-1;else{if(!(P>0))return x;V=x+1}}return-1}function Nr(eA,G){for(var V=[];eA>1;if(MsA.endCode.get(kA))){var gt=sA.idRangeOffset.get(kA),_A=void 0;if(0===gt)_A=M+sA.idDelta.get(kA);else{var ut=gt/2+(M-sA.startCode.get(kA))-(sA.segCount-kA);0!==(_A=sA.glyphIndexArray.get(ut)||0)&&(_A+=sA.idDelta.get(kA))}return 65535&_A}iA=kA+1}}return 0;case 8:throw new Error("TODO: cmap format 8");case 6:case 10:return sA.glyphIndices.get(M-sA.firstCode)||0;case 12:case 13:for(var pt=0,yt=sA.nGroups-1;pt<=yt;){var Gt=pt+yt>>1,$t=sA.groups.get(Gt);if(M<$t.startCharCode)yt=Gt-1;else{if(!(M>$t.endCharCode))return 12===sA.version?$t.glyphID+(M-$t.startCharCode):$t.glyphID;pt=Gt+1}}return 0;case 14:throw new Error("TODO: cmap format 14");default:throw new Error("Unknown cmap format ".concat(sA.version))}},G.getVariationSelector=function(M,x){if(!this.uvs)return 0;var P=this.uvs.varSelectors.toArray(),tA=gi(P,function(sA){return x-sA.varSelector}),oA=P[tA];return-1!==tA&&oA.defaultUVS&&(tA=gi(oA.defaultUVS,function(sA){return MsA.startUnicodeValue+sA.additionalCount?1:0})),-1!==tA&&oA.nonDefaultUVS&&-1!==(tA=gi(oA.nonDefaultUVS,function(sA){return M-sA.unicodeValue}))?oA.nonDefaultUVS[tA].glyphID:0},G.getCharacterSet=function(){var M=this.cmap;switch(M.version){case 0:return Nr(0,M.codeMap.length);case 4:for(var x=[],P=M.endCode.toArray(),tA=0;tA=_t.glyphID&&M<=_t.glyphID+(_t.endCharCode-_t.startCharCode)&&yt.push(_t.startCharCode+(M-_t.glyphID))}return yt;case 13:for(var we,ae=[],Be=g(x.groups.toArray());!(we=Be()).done;){var Ce=we.value;M===Ce.glyphID&&ae.push.apply(ae,Nr(Ce.startCharCode,Ce.endCharCode+1))}return ae;default:throw new Error("Unknown cmap format ".concat(x.version))}},eA}()).prototype,"getCharacterSet",[R],Object.getOwnPropertyDescriptor(fr.prototype,"getCharacterSet"),fr.prototype),F(fr.prototype,"codePointsForGlyph",[R],Object.getOwnPropertyDescriptor(fr.prototype,"codePointsForGlyph"),fr.prototype),fr),ui=function(){function eA(V){this.kern=V.kern}var G=eA.prototype;return G.process=function(M,x){for(var P=0;P=0&&(iA=NA.pairs[kA].value);break;case 2:var _A=0;x>=NA.rightTable.firstGlyph&&x=NA.leftTable.firstGlyph&&M=NA.glyphCount||x>=NA.glyphCount)return 0;iA=NA.kernValue[NA.kernIndex[NA.leftClass[M]*NA.rightClassCount+NA.rightClass[x]]];break;default:throw new Error("Unsupported kerning sub-table format ".concat(sA.format))}sA.coverage.override?P=iA:P+=iA}}return P},eA}(),As=function(){function eA(V){this.font=V}var G=eA.prototype;return G.positionGlyphs=function(M,x){for(var P=0,tA=0,oA=0;oA1&&(sA.minX+=(oA.codePoints.length-1)*sA.width/oA.codePoints.length);for(var iA=-x[P].xAdvance,NA=0,kA=this.font.unitsPerEm/16,gt=P+1;gt<=tA;gt++){var _A=M[gt],ut=_A.cbox,pt=x[gt],yt=this.getCombiningClass(_A.codePoints[0]);if("Not_Reordered"!==yt){switch(pt.xOffset=pt.yOffset=0,yt){case"Double_Above":case"Double_Below":pt.xOffset+=sA.minX-ut.width/2-ut.minX;break;case"Attached_Below_Left":case"Below_Left":case"Above_Left":pt.xOffset+=sA.minX-ut.minX;break;case"Attached_Above_Right":case"Below_Right":case"Above_Right":pt.xOffset+=sA.maxX-ut.width-ut.minX;break;default:pt.xOffset+=sA.minX+(sA.width-ut.width)/2-ut.minX}switch(yt){case"Double_Below":case"Below_Left":case"Below":case"Below_Right":case"Attached_Below_Left":case"Attached_Below":("Attached_Below_Left"===yt||"Attached_Below"===yt)&&(sA.minY+=kA),pt.yOffset=-sA.minY-ut.maxY,sA.minY+=ut.height;break;case"Double_Above":case"Above_Left":case"Above":case"Above_Right":case"Attached_Above":case"Attached_Above_Right":("Attached_Above"===yt||"Attached_Above_Right"===yt)&&(sA.maxY+=kA),pt.yOffset=sA.maxY-ut.minY,sA.maxY+=ut.height}pt.xAdvance=pt.yAdvance=0,pt.xOffset+=iA,pt.yOffset+=NA}else iA-=pt.xAdvance,NA-=pt.yAdvance}},G.getCombiningClass=function(M){var x=w.getCombiningClass(M);if(3584==(-256&M))if("Not_Reordered"===x)switch(M){case 3633:case 3636:case 3637:case 3638:case 3639:case 3655:case 3660:case 3645:case 3662:return"Above_Right";case 3761:case 3764:case 3765:case 3766:case 3767:case 3771:case 3788:case 3789:return"Above";case 3772:return"Below"}else if(3642===M)return"Below_Right";switch(x){case"CCC10":case"CCC11":case"CCC12":case"CCC13":case"CCC14":case"CCC15":case"CCC16":case"CCC17":case"CCC18":case"CCC20":case"CCC22":case"CCC29":case"CCC32":case"CCC118":case"CCC129":case"CCC132":return"Below";case"CCC23":return"Attached_Above";case"CCC24":case"CCC107":return"Above_Right";case"CCC25":case"CCC19":return"Above_Left";case"CCC26":case"CCC27":case"CCC28":case"CCC30":case"CCC31":case"CCC33":case"CCC34":case"CCC35":case"CCC36":case"CCC122":case"CCC130":return"Above";case"CCC21":break;case"CCC103":return"Below_Right"}return x},eA}(),Ur=function(){function eA(V,M,x,P){void 0===V&&(V=1/0),void 0===M&&(M=1/0),void 0===x&&(x=-1/0),void 0===P&&(P=-1/0),this.minX=V,this.minY=M,this.maxX=x,this.maxY=P}var G=eA.prototype;return G.addPoint=function(M,x){Math.abs(M)!==1/0&&(Mthis.maxX&&(this.maxX=M)),Math.abs(x)!==1/0&&(xthis.maxY&&(this.maxY=x))},G.copy=function(){return new eA(this.minX,this.minY,this.maxX,this.maxY)},l(eA,[{key:"width",get:function(){return this.maxX-this.minX}},{key:"height",get:function(){return this.maxY-this.minY}}]),eA}(),Pr={Caucasian_Albanian:"aghb",Arabic:"arab",Imperial_Aramaic:"armi",Armenian:"armn",Avestan:"avst",Balinese:"bali",Bamum:"bamu",Bassa_Vah:"bass",Batak:"batk",Bengali:["bng2","beng"],Bopomofo:"bopo",Brahmi:"brah",Braille:"brai",Buginese:"bugi",Buhid:"buhd",Chakma:"cakm",Canadian_Aboriginal:"cans",Carian:"cari",Cham:"cham",Cherokee:"cher",Coptic:"copt",Cypriot:"cprt",Cyrillic:"cyrl",Devanagari:["dev2","deva"],Deseret:"dsrt",Duployan:"dupl",Egyptian_Hieroglyphs:"egyp",Elbasan:"elba",Ethiopic:"ethi",Georgian:"geor",Glagolitic:"glag",Gothic:"goth",Grantha:"gran",Greek:"grek",Gujarati:["gjr2","gujr"],Gurmukhi:["gur2","guru"],Hangul:"hang",Han:"hani",Hanunoo:"hano",Hebrew:"hebr",Hiragana:"hira",Pahawh_Hmong:"hmng",Katakana_Or_Hiragana:"hrkt",Old_Italic:"ital",Javanese:"java",Kayah_Li:"kali",Katakana:"kana",Kharoshthi:"khar",Khmer:"khmr",Khojki:"khoj",Kannada:["knd2","knda"],Kaithi:"kthi",Tai_Tham:"lana",Lao:"lao ",Latin:"latn",Lepcha:"lepc",Limbu:"limb",Linear_A:"lina",Linear_B:"linb",Lisu:"lisu",Lycian:"lyci",Lydian:"lydi",Mahajani:"mahj",Mandaic:"mand",Manichaean:"mani",Mende_Kikakui:"mend",Meroitic_Cursive:"merc",Meroitic_Hieroglyphs:"mero",Malayalam:["mlm2","mlym"],Modi:"modi",Mongolian:"mong",Mro:"mroo",Meetei_Mayek:"mtei",Myanmar:["mym2","mymr"],Old_North_Arabian:"narb",Nabataean:"nbat",Nko:"nko ",Ogham:"ogam",Ol_Chiki:"olck",Old_Turkic:"orkh",Oriya:["ory2","orya"],Osmanya:"osma",Palmyrene:"palm",Pau_Cin_Hau:"pauc",Old_Permic:"perm",Phags_Pa:"phag",Inscriptional_Pahlavi:"phli",Psalter_Pahlavi:"phlp",Phoenician:"phnx",Miao:"plrd",Inscriptional_Parthian:"prti",Rejang:"rjng",Runic:"runr",Samaritan:"samr",Old_South_Arabian:"sarb",Saurashtra:"saur",Shavian:"shaw",Sharada:"shrd",Siddham:"sidd",Khudawadi:"sind",Sinhala:"sinh",Sora_Sompeng:"sora",Sundanese:"sund",Syloti_Nagri:"sylo",Syriac:"syrc",Tagbanwa:"tagb",Takri:"takr",Tai_Le:"tale",New_Tai_Lue:"talu",Tamil:["tml2","taml"],Tai_Viet:"tavt",Telugu:["tel2","telu"],Tifinagh:"tfng",Tagalog:"tglg",Thaana:"thaa",Thai:"thai",Tibetan:"tibt",Tirhuta:"tirh",Ugaritic:"ugar",Vai:"vai ",Warang_Citi:"wara",Old_Persian:"xpeo",Cuneiform:"xsux",Yi:"yi ",Inherited:"zinh",Common:"zyyy",Unknown:"zzzz"},Hi={};for(var Ji in Pr){var Oi=Pr[Ji];if(Array.isArray(Oi))for(var Ea,ts=g(Oi);!(Ea=ts()).done;)Hi[Ea.value]=Ji;else Hi[Oi]=Ji}var as={arab:!0,hebr:!0,syrc:!0,thaa:!0,cprt:!0,khar:!0,phnx:!0,"nko ":!0,lydi:!0,avst:!0,armi:!0,phli:!0,prti:!0,sarb:!0,orkh:!0,samr:!0,mand:!0,merc:!0,mero:!0,mani:!0,mend:!0,nbat:!0,narb:!0,palm:!0,phlp:!0};function wa(eA){return as[eA]?"rtl":"ltr"}for(var os=function(){function eA(G,V,M,x,P){if(this.glyphs=G,this.positions=null,this.script=M,this.language=x||null,this.direction=P||wa(M),this.features={},Array.isArray(V))for(var oA,tA=g(V);!(oA=tA()).done;)this.features[oA.value]=!0;else"object"==typeof V&&(this.features=V)}return l(eA,[{key:"advanceWidth",get:function(){for(var x,V=0,M=g(this.positions);!(x=M()).done;)V+=x.value.xAdvance;return V}},{key:"advanceHeight",get:function(){for(var x,V=0,M=g(this.positions);!(x=M()).done;)V+=x.value.yAdvance;return V}},{key:"bbox",get:function(){for(var V=new Ur,M=0,x=0,P=0;P>1]).firstGlyph)return null;if(MoA.lastGlyph))return 2===this.table.version?oA.value:oA.values[M-oA.firstGlyph];x=tA+1}}return null;case 6:for(var sA=0,iA=this.table.binarySearchHeader.nUnits-1;sA<=iA;){var tA,oA;if(65535===(oA=this.table.segments[tA=sA+iA>>1]).glyph)return null;if(MoA.glyph))return oA.value;sA=tA+1}}return null;case 8:return this.table.values[M-this.table.firstGlyph];default:throw new Error("Unknown lookup table format: ".concat(this.table.version))}},G.glyphsForValue=function(M){var x=[];switch(this.table.version){case 2:case 4:for(var tA,P=g(this.table.segments);!(tA=P()).done;){var oA=tA.value;if(2===this.table.version&&oA.value===M)x.push.apply(x,Nr(oA.firstGlyph,oA.lastGlyph+1));else for(var sA=0;sA=-1;){var iA=null,NA=1,kA=!0;oA===M.length||-1===oA?NA=0:65535===(iA=M[oA]).id?NA=2:null==(NA=this.lookupTable.lookup(iA.id))&&(NA=1);var gt=this.stateTable.stateArray.getItem(tA),ut=this.stateTable.entryTable.getItem(gt[NA]);0!==NA&&2!==NA&&(P(iA,ut,oA),kA=!(16384&ut.flags)),tA=ut.newState,kA&&(oA+=sA)}return M},G.traverse=function(M,x,P){if(void 0===x&&(x=0),void 0===P&&(P=new Set),!P.has(x)){P.add(x);for(var tA=this.stateTable,oA=tA.nClasses,iA=tA.entryTable,NA=tA.stateArray.getItem(x),kA=4;kA=0;)65535===M[yt].id&&M.splice(yt,1),yt--;return M},G.processSubtable=function(M,x){if(this.subtable=M,this.glyphs=x,4!==this.subtable.type){this.ligatureStack=[],this.markedGlyph=null,this.firstGlyph=null,this.lastGlyph=null,this.markedIndex=null;var P=this.getStateMachine(M),tA=this.getProcessor();return P.process(this.glyphs,!!(4194304&this.subtable.coverage),tA)}this.processNoncontextualSubstitutions(this.subtable,this.glyphs)},G.getStateMachine=function(M){return new us(M.table.stateTable)},G.getProcessor=function(){switch(this.subtable.type){case 0:return this.processIndicRearragement;case 1:return this.processContextualSubstitution;case 2:return this.processLigature;case 4:return this.processNoncontextualSubstitutions;case 5:return this.processGlyphInsertion;default:throw new Error("Invalid morx subtable type: ".concat(this.subtable.type))}},G.processIndicRearragement=function(M,x,P){32768&x.flags&&(this.firstGlyph=P),8192&x.flags&&(this.lastGlyph=P),function Ds(eA,G,V,M){switch(G){case 0:return eA;case 1:return Un(eA,[V,1],[M,0]);case 2:return Un(eA,[V,0],[M,1]);case 3:return Un(eA,[V,1],[M,1]);case 4:return Un(eA,[V,2],[M,0]);case 5:return Un(eA,[V,2],[M,0],!0,!1);case 6:return Un(eA,[V,0],[M,2]);case 7:return Un(eA,[V,0],[M,2],!1,!0);case 8:return Un(eA,[V,1],[M,2]);case 9:return Un(eA,[V,1],[M,2],!1,!0);case 10:return Un(eA,[V,2],[M,1]);case 11:return Un(eA,[V,2],[M,1],!0,!1);case 12:return Un(eA,[V,2],[M,2]);case 13:return Un(eA,[V,2],[M,2],!0,!1);case 14:return Un(eA,[V,2],[M,2],!1,!0);case 15:return Un(eA,[V,2],[M,2],!0,!0);default:throw new Error("Unknown verb: ".concat(G))}}(this.glyphs,15&x.flags,this.firstGlyph,this.lastGlyph)},G.processContextualSubstitution=function(M,x,P){var tA=this.subtable.table.substitutionTable.items;if(65535!==x.markIndex){var oA=tA.getItem(x.markIndex);(iA=new wi(oA).lookup((M=this.glyphs[this.markedGlyph]).id))&&(this.glyphs[this.markedGlyph]=this.font.getGlyph(iA,M.codePoints))}if(65535!==x.currentIndex){var iA,NA=tA.getItem(x.currentIndex);(iA=new wi(NA).lookup((M=this.glyphs[P]).id))&&(this.glyphs[P]=this.font.getGlyph(iA,M.codePoints))}32768&x.flags&&(this.markedGlyph=P)},G.processLigature=function(M,x,P){if(32768&x.flags&&this.ligatureStack.push(P),8192&x.flags){for(var tA,oA=this.subtable.table.ligatureActions,sA=this.subtable.table.components,iA=this.subtable.table.ligatureList,NA=x.action,kA=!1,gt=0,_A=[],ut=[];!kA;){var pt,yt=this.ligatureStack.pop();(pt=_A).unshift.apply(pt,this.glyphs[yt].codePoints);var Gt=oA.getItem(NA++);kA=!!(2147483648&Gt);var $t=!!(1073741824&Gt),_t=(1073741823&Gt)<<2>>2;if(gt+=sA.getItem(_t+=this.glyphs[yt].id),kA||$t){var Be=iA.getItem(gt);this.glyphs[yt]=this.font.getGlyph(Be,_A),ut.push(yt),gt=0,_A=[]}else this.glyphs[yt]=this.font.getGlyph(65535)}(tA=this.ligatureStack).push.apply(tA,ut)}},G.processNoncontextualSubstitutions=function(M,x,P){var tA=new wi(M.table.lookupTable);for(P=0;P>>5,!!(1024&x.flags)),65535!==x.currentInsertIndex&&this._insertGlyphs(P,x.currentInsertIndex,(992&x.flags)>>>5,!!(2048&x.flags))},G.getSupportedFeatures=function(){for(var P,M=[],x=g(this.morx.chains);!(P=x()).done;)for(var sA,oA=g(P.value.features);!(sA=oA()).done;){var iA=sA.value;M.push([iA.featureType,iA.featureSetting])}return M},G.generateInputs=function(M){return this.inputCache||this.generateInputCache(),this.inputCache[M]||[]},G.generateInputCache=function(){this.inputCache={};for(var x,M=g(this.morx.chains);!(x=M()).done;)for(var sA,P=x.value,tA=P.defaultFlags,oA=g(P.subtables);!(sA=oA()).done;){var iA=sA.value;iA.subFeatureFlags&tA&&this.generateInputsForSubtable(iA)}},G.generateInputsForSubtable=function(M){var x=this;if(2===M.type){if(4194304&M.coverage)throw new Error("Reverse subtable, not supported.");this.subtable=M,this.ligatureStack=[];var tA=this.getStateMachine(M),oA=this.getProcessor(),sA=[],iA=[];this.glyphs=[],tA.traverse({enter:function(kA,gt){var _A=x.glyphs;iA.push({glyphs:_A.slice(),ligatureStack:x.ligatureStack.slice()});var ut=x.font.getGlyph(kA);sA.push(ut),_A.push(sA[sA.length-1]),oA(_A[_A.length-1],gt,_A.length-1);for(var pt=0,yt=0,Gt=0;Gt<_A.length&&pt<=1;Gt++)65535!==_A[Gt].id&&(pt++,yt=_A[Gt].id);if(1===pt){var $t=sA.map(function(ae){return ae.id}),_t=x.inputCache[yt];_t?_t.push($t):x.inputCache[yt]=[$t]}},exit:function(){var kA=iA.pop();x.glyphs=kA.glyphs,x.ligatureStack=kA.ligatureStack,sA.pop()}})}},eA}()).prototype,"getStateMachine",[R],Object.getOwnPropertyDescriptor(jr.prototype,"getStateMachine"),jr.prototype),jr);function Un(eA,G,V,M,x){void 0===M&&(M=!1),void 0===x&&(x=!1);var P=eA.splice(V[0]-(V[1]-1),V[1]);x&&P.reverse();var tA=eA.splice.apply(eA,[G[0],G[1]].concat(P));return M&&tA.reverse(),eA.splice.apply(eA,[V[0]-(G[1]-1),0].concat(tA)),eA}var ys=function(){function eA(V){this.font=V,this.morxProcessor=new vs(V),this.fallbackPosition=!1}var G=eA.prototype;return G.substitute=function(M){"rtl"===M.direction&&M.glyphs.reverse(),this.morxProcessor.process(M.glyphs,function ls(eA){var G={};for(var V in eA){var M;(M=fi[V])&&(null==G[M[0]]&&(G[M[0]]={}),G[M[0]][M[1]]=eA[V])}return G}(M.features))},G.getAvailableFeatures=function(M,x){return function cs(eA){var G={};if(Array.isArray(eA))for(var V=0;V0&&M.applyFeatures(sA,x,P)}},eA}(),Fs=["rvrn"],Ys=["ccmp","locl","rlig","mark","mkmk"],Ts=["frac","numr","dnom"],Ss=["calt","clig","liga","rclt","curs","kern"],Ns={ltr:["ltra","ltrm"],rtl:["rtla","rtlm"]},hr=function(){function eA(){}return eA.plan=function(V,M,x){this.planPreprocessing(V),this.planFeatures(V),this.planPostprocessing(V,x),V.assignGlobalFeatures(M),this.assignFeatures(V,M)},eA.planPreprocessing=function(V){V.add({global:[].concat(Fs,Ns[V.direction]),local:Ts})},eA.planFeatures=function(V){},eA.planPostprocessing=function(V,M){V.add([].concat(Ys,Ss)),V.setFeatureOverrides(M)},eA.assignFeatures=function(V,M){for(var x=0;x0&&w.isDigit(M[tA-1].codePoints[0]);)M[tA-1].features.numr=!0,M[tA-1].features.frac=!0,tA--;for(;oAthis.index||this.index>=this.glyphs.length?null:this.glyphs[this.index]},G.next=function(){return this.move(1)},G.prev=function(){return this.move(-1)},G.peek=function(M){void 0===M&&(M=1);var x=this.index,P=this.increment(M);return this.index=x,P},G.peekIndex=function(M){void 0===M&&(M=1);var x=this.index;this.increment(M);var P=this.index;return this.index=x,P},G.increment=function(M){void 0===M&&(M=1);var x=M<0?-1:1;for(M=Math.abs(M);M--;)this.move(x);return this.glyphs[this.index]},l(eA,[{key:"cur",get:function(){return this.glyphs[this.index]||null}}]),eA}(),bs=["DFLT","dflt","latn"],Cr=function(){function eA(V,M){this.font=V,this.table=M,this.script=null,this.scriptTag=null,this.language=null,this.languageTag=null,this.features={},this.lookups={},this.variationsIndex=V._variationProcessor?this.findVariationsIndex(V._variationProcessor.normalizedCoords):-1,this.selectScript(),this.glyphs=[],this.positions=[],this.ligatureID=1,this.currentFeature=null}var G=eA.prototype;return G.findScript=function(M){if(null==this.table.scriptList)return null;Array.isArray(M)||(M=[M]);for(var P,x=g(M);!(P=x()).done;)for(var sA,tA=P.value,oA=g(this.table.scriptList);!(sA=oA()).done;){var iA=sA.value;if(iA.tag===tA)return iA}return null},G.selectScript=function(M,x,P){var oA,tA=!1;if(!this.script||M!==this.scriptTag){if((oA=this.findScript(M))||(oA=this.findScript(bs)),!oA)return this.scriptTag;this.scriptTag=oA.tag,this.script=oA.script,this.language=null,this.languageTag=null,tA=!0}if((!P||P!==this.direction)&&(this.direction=P||wa(M)),x&&x.length<4&&(x+=" ".repeat(4-x.length)),!x||x!==this.languageTag){this.language=null;for(var iA,sA=g(this.script.langSysRecords);!(iA=sA()).done;){var NA=iA.value;if(NA.tag===x){this.language=NA.langSys,this.languageTag=NA.tag;break}}this.language||(this.language=this.script.defaultLangSys,this.languageTag=null),tA=!0}if(tA&&(this.features={},this.language))for(var gt,kA=g(this.language.featureIndexes);!(gt=kA()).done;){var _A=gt.value,ut=this.table.featureList[_A],pt=this.substituteFeatureForVariations(_A);this.features[ut.tag]=pt||ut.feature}return this.scriptTag},G.lookupsForFeatures=function(M,x){void 0===M&&(M=[]);for(var oA,P=[],tA=g(M);!(oA=tA()).done;){var sA=oA.value,iA=this.features[sA];if(iA)for(var kA,NA=g(iA.lookupListIndexes);!(kA=NA()).done;){var gt=kA.value;x&&-1!==x.indexOf(gt)||P.push({feature:sA,index:gt,lookup:this.table.lookupList.get(gt)})}}return P.sort(function(_A,ut){return _A.index-ut.index}),P},G.substituteFeatureForVariations=function(M){if(-1===this.variationsIndex)return null;for(var oA,tA=g(this.table.featureVariations.featureVariationRecords[this.variationsIndex].featureTableSubstitution.substitutions);!(oA=tA()).done;){var sA=oA.value;if(sA.featureIndex===M)return sA.alternateFeatureTable}return null},G.findVariationsIndex=function(M){var x=this.table.featureVariations;if(!x)return-1;for(var P=x.featureVariationRecords,tA=0;tA=0})},G.getClassID=function(M,x){switch(x.version){case 1:var P=M-x.startGlyph;if(P>=0&&P0&&this.codePoints.every(w.isMark),this.isBase=!this.isMark,this.isLigature=this.codePoints.length>1,this.markAttachmentType=0}}]),eA}(),Da=function(eA){function G(){return eA.apply(this,arguments)||this}return h(G,eA),G.planFeatures=function(M){M.add(["ljmo","vjmo","tjmo"],!1)},G.assignFeatures=function(M,x){for(var P=0,tA=0;tAvr){var gt=Zr(V,tA,M.features);gt.features.tjmo=!0,kA.push(gt)}return eA.splice.apply(eA,[G,1].concat(kA)),G+kA.length-1}function n0(eA,G,V){var sA,iA,NA,kA,M=eA[G],P=Wr(eA[G].codePoints[0]),tA=eA[G-1].codePoints[0],oA=Wr(tA);if(4===oA&&3===P)sA=tA,kA=M;else{2===P?(iA=eA[G-1],NA=M):(iA=eA[G-2],NA=eA[G-1],kA=M);var gt=iA.codePoints[0],_A=NA.codePoints[0];(function(G){return 4352<=G&&G<=4370})(gt)&&function(G){return 4449<=G&&G<=4469}(_A)&&(sA=Rr+28*(21*(gt-4352)+(_A-4449)))}var ut=kA&&kA.codePoints[0]||vr;if(null!=sA&&(ut===vr||function(G){return 1<=G&&G<=4546}(ut))){var pt=sA+(ut-vr);if(V.hasGlyphForCodePoint(pt)){var yt=2===oA?3:2;return eA.splice(G-yt+1,yt,Zr(V,pt,M.features)),G-yt+1}}return iA&&(iA.features.ljmo=!0),NA&&(NA.features.vjmo=!0),kA&&(kA.features.tjmo=!0),4===oA?(Ta(eA,G-1,V),G+1):G}function i0(eA,G,V){var M=eA[G];if(0!==V.glyphForCodePoint(eA[G].codePoints[0]).advanceWidth){var tA=function r0(eA){switch(Wr(eA)){case 4:case 5:return 1;case 2:return 2;case 3:return 3}}(eA[G-1].codePoints[0]);return eA.splice(G,1),eA.splice(G-tA,0,M)}}function a0(eA,G,V){var M=eA[G],x=eA[G].codePoints[0];if(V.hasGlyphForCodePoint(9676)){var P=Zr(V,9676,M.features),tA=0===V.glyphForCodePoint(x).advanceWidth?G:G+1;eA.splice(tA,0,P),G++}return G}var xi={categories:["O","IND","S","GB","B","FM","CGJ","VMAbv","VMPst","VAbv","VPst","CMBlw","VPre","VBlw","H","VMBlw","CMAbv","MBlw","CS","R","SUB","MPst","MPre","FAbv","FPst","FBlw","null","SMAbv","SMBlw","VMPre","ZWNJ","ZWJ","WJ","M","VS","N","HN","MAbv"],decompositions:{2507:[2503,2494],2508:[2503,2519],2888:[2887,2902],2891:[2887,2878],2892:[2887,2903],3018:[3014,3006],3019:[3015,3006],3020:[3014,3031],3144:[3142,3158],3264:[3263,3285],3271:[3270,3285],3272:[3270,3286],3274:[3270,3266],3275:[3270,3266,3285],3402:[3398,3390],3403:[3399,3390],3404:[3398,3415],3546:[3545,3530],3548:[3545,3535],3549:[3545,3535,3530],3550:[3545,3551],3635:[3661,3634],3763:[3789,3762],3955:[3953,3954],3957:[3953,3956],3958:[4018,3968],3959:[4018,3953,3968],3960:[4019,3968],3961:[4019,3953,3968],3969:[3953,3968],6971:[6970,6965],6973:[6972,6965],6976:[6974,6965],6977:[6975,6965],6979:[6978,6965],69934:[69937,69927],69935:[69938,69927],70475:[70471,70462],70476:[70471,70487],70843:[70841,70842],70844:[70841,70832],70846:[70841,70845],71098:[71096,71087],71099:[71097,71087]},stateTable:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],accepting:[!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],tags:[[],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["symbol_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["virama_terminated_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["number_joiner_terminated_cluster"],["standard_cluster"],["standard_cluster"],["numeral_cluster"]]},Ie_X=1,Ie_N=8,Ie_H=16,Ie_ZWNJ=32,Ie_ZWJ=64,Ie_M=128,Ie_RS=8192,Ie_Repha=32768,Ie_Ra=65536,Ie_CM=1<<17,ee={Start:1,Ra_To_Become_Reph:2,Pre_M:4,Pre_C:8,Base_C:16,After_Main:32,Above_C:64,Before_Sub:128,Below_C:256,After_Sub:512,Before_Post:1024,Post_C:2048,After_Post:4096,Final_C:8192,SMVD:16384,End:32768},E0=2|Ie_Ra|Ie_CM|4|2048|4096,Sa=Ie_ZWJ|Ie_ZWNJ,Xr=Ie_H|16384,Na={Default:{hasOldSpec:!1,virama:0,basePos:"Last",rephPos:ee.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Devanagari:{hasOldSpec:!0,virama:2381,basePos:"Last",rephPos:ee.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Bengali:{hasOldSpec:!0,virama:2509,basePos:"Last",rephPos:ee.After_Sub,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Gurmukhi:{hasOldSpec:!0,virama:2637,basePos:"Last",rephPos:ee.Before_Sub,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Gujarati:{hasOldSpec:!0,virama:2765,basePos:"Last",rephPos:ee.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Oriya:{hasOldSpec:!0,virama:2893,basePos:"Last",rephPos:ee.After_Main,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Tamil:{hasOldSpec:!0,virama:3021,basePos:"Last",rephPos:ee.After_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Telugu:{hasOldSpec:!0,virama:3149,basePos:"Last",rephPos:ee.After_Post,rephMode:"Explicit",blwfMode:"Post_Only"},Kannada:{hasOldSpec:!0,virama:3277,basePos:"Last",rephPos:ee.After_Post,rephMode:"Implicit",blwfMode:"Post_Only"},Malayalam:{hasOldSpec:!0,virama:3405,basePos:"Last",rephPos:ee.After_Main,rephMode:"Log_Repha",blwfMode:"Pre_And_Post"},Khmer:{hasOldSpec:!1,virama:6098,basePos:"First",rephPos:ee.Ra_To_Become_Reph,rephMode:"Vis_Repha",blwfMode:"Pre_And_Post"}},w0={6078:[6081,6078],6079:[6081,6079],6080:[6081,6080],6084:[6081,6084],6085:[6081,6085]},C0=xi.decompositions,Ua=new Q(c("AAARAAAAAABg2AAAAWYPmfDtnXuMXFUdx+/uzs7M7szudAtECGJRIMRQbUAithQWkGAKiVhNpFVRRAmIQVCDkDYICGotIA9BTCz8IeUviv7BQ2PBtBIRLBBQIWAUsKg1BKxRAqIgfs/cc+aeOXPej3tnZX7JJ/dxzj3nd36/8753Z5fUsuxgsAwcAU4Gp4BPgM+Cd4P3RjieDs4GXwLrHJ5bDy4DG8A14LvgZrAZbAF3gns0z18ALgY/B78C94NHwBPgabAE/AX8DbwM5sF/QX0yD5vFcU/wVnAgWAoOAyvAceBE8CGwBpwGzgJfAF8BXwXfAFeC68EmsBlsAXeCreA+8CB4DDwF/gh2gd3gFfAGmKxn2QzYC+wHDgRLweFgJTgWrKrnuq/GcQ04jV6fheN54EJwEbgcXAG+Q8O/j+Mt4DZwB9haz8t9Hz3a8iCN/xiOvwRP0evH6fE68AzOH+Ke2eWYhw3PcGnuxvkr4A3QaGRZB7wFLAEHg2XgiEZ/fHKcp/ceBh/A+cngFPCpRm6vM3E8l8a5gN67GMdvgqsbeX2ap9yI601gM7gN3AG20mfuo8cdOP6GpvdUg9oKxz839GV90RDO2/glxN1B790NXsN1rZll7WYRdw+c70uvTwIHNAfTO0RyL5TDmnnbc3lmRQI9UnM0dD5eovfz4FpJ/BNpXNYWV+N6Lfg0hY97JK1vn+Pur9DoQur2F7m436bHDUK8C5t5/8vruo4+97WmXG+GLmzEiBF+PDwEOowYMWLEiBEjRoxYeBw5BDqIPEfXut9yWN+vVNxfrnnmWqR/PdgENoMt4E5wD9gOHgCPgifBs2BXM99b2o3jP8F/wMRUlrXAHNgHvH0q3895J46HguXgWHAGLctmLv9VuL96qnp7jxgxYsSbCbJvuRZ97/tqxT59VVRtixEjRsThBG7OSt5zzoPT0M+cBc4T5noXOs79TqLHeZrHUeCSqeJ96gacXy2kecNU8V6Hh7yXuQlhtw7B/PO1RTkr52Aj8JNFZjYg3gOKuC/g/v6Ls2wNuAY8urg//PcIb+6RZXuDNeCS6SzbBrJWlh0DLiFHco8ed9IjzzvaWfa9sZzTcf6D9mCcnbg3PlNcH4fzS8F2MDaLdQG4dLZIJxbbaZqv4ri8k58f3+mPs66T6/TTzqDeI0aMGDGiHP5dcR8ce/xxYcWi6vOfr725uRzcjnngXVOD61Hync+9uL+Nmyfej/NHpvL56A5Jeuz7uyfo+pqcPz2Vf1NH0ttJ03pekt8SmuY/EPYy9zzbN319ym/9TL6ZIt9MHCXRdxJtoAkWTRdz472n87D9cTwYLJvuz++I6WIePo/zE8AHp4v8WLyP0nufnM6/+zoDx8+DL08P6r9+urheRtO+jD6/cdrsx3mqu8w+xH4PScKIXa5D2jeCm8Et4DbwI/BjcC/4BXgI/Bb8DuwEu8Bu8Ap4A9RaRZptnO8J9gUHgEPAoWA5OLY1qMO90GEV7q+mYWtxPBWcIYnL4p+DsPNbxfVFOP86uAr8DNc34HgTDb8Vx9sVaRFI/LtagzYjnCqpb908EX87eBA8Bh4Hf2jle/9/wvGFVv787rrZZy8h7qtgDOuFOmiBuXYRvg/O9wMHgXeB97SLspk4sq0OI/q9v13+ek+sh3zYSRp9jrYorw9ll1/GRzR+KotYZSHf8laVP2lvpA/8OGdPMk59hqtXZ+L8nHbxvWwqO65ryu+fT3VZz+l4dET7L0R072ljsMyzTpaJqQxsbL8M9WajY789DO85XMp/Dcp3Qztdn+9qf/a97ZWK8PXc3G+TpC/nv8Mncy7ZvICF302P5O+aNiOtLdTXd+D4Q7DVwfcvWvx9zTEJ/o5iG3R8YAjGNFseha5PGuZKz7b7xxXbOrXMcu5eJSo//rXdH/73Enz6L1q/X+fyIu8wZGtNBmkjkzNZNgP2AvuBg2bysKUzduXn/66JtNeN4PCZvO0/x7Ujdn4VnYOvRJzjZ/I+9sQZeftX2Tc1RPcPz/Tf4/si0g+t5Mq+kfZjZL34Mc5ul3PPnE7TOxvHK2qDaZ+L++db2HyYqMo/qVnb/P8uH8/rmnFxR0k6DCu/rjj/RxT7KGUSWgbd+LMQuEgYB1zsk2qtvJD8v5AhdfdttbEunSxbcJD9Zf7chqp1Hlbe7FK1/aPVTfp7FgtC1yGGiSncFK/DhZvi+epZta0WWjlsfDZMyPRdSPrryqSSKnXx1bkq/Ye9TlRpk7Lrjq1UrfdC9X+MtKqwP6+3a/4pJFUZF0pZZpv91MYjMBaRRXbxpho5zQmUY3F+Pt4o7rvQrBXPdm00TaE24uMadaM2meLSI7iu071t3er3b6ZLi8JEde3qw+6zGv+ycF5kaRBh/m1T/7Yl/mMyTuMwadP4xL9ifjJpNwbvDZRJ8G8vnqV/Wf12aa/kyOdl69+BspTsXzGueE6E+JfZnvmXIfNPW+FfXkjb1YmqPNpnLP3b61fHCj/X5tzGANf2y3yqvC7Jv7btV4TVbdammI9l/g0dS5lNxLrk2j9r8xjjxhBQnygg0lgg/bOrfyct+udJi/Yrk0lFnxC7f+5kRbsNmcexfrubt0X/rGvLqrGSnYv3ZPHEe8r7lvMvUfi2LOu/2dg8LrRtQt2yfcv8r5IU70VkIs6nbebUXf0M/o7Znl39Sdoz+X1oEb5N8ffF67qhPfPP6eoUbxf+GRf/6sRnvaSdmw+Bf1VxmbD+2sa//DU7t/Gv2PfKpKdrBP92Ojk+IvqX16ks/2qxbL8EZnc2HqsgYuqPuzZV+I3RbujbDm+T0PmWCVO/5jqftp1zy+wSA6s0JWtp2z5e1oZV+yMsjB3ZXolsv0Ulrv01v3/iKrF94Qtbt9siCnmeb6fjjf59KnLk1xaEbvtvFnFirGvEOqmycQrbm/IMsXd3P28uh4nM3swXRER717OiX8kc7K2qqyn2p3maFGU/aruP5VCv+PraoTYU8yUmmbDwcYo6pusnM486xdoga4dkPCb1pK7Sfc6ebvkd4qeAtQcd/N63bB3lU3dlUnUf38VyvqCqK7JxlNSd7lydrDlm+/uqHiRvl30Nrp/n9zpkZRjoJ3V1diyP05rIYXHYs+w+D5+WMS8b5gZtKcuX0KT5d/WwtB97VnyvY6rjMukI56HI0rFJPwt8PjT/1OXzSbcMeEmdh294qvKK4rNu7j4n3LNZg8TKXwafv025U+XvKjHsT8Q7/7LGaJt9lAh7Asz3uv0XEX6t0duDoWN/93wmh92XpUHmCKb9GALbG+rZP3AfNbQPKKv/jpF/bP0JXfuW1QYk7dhljcyvk5mw+933Hpo1g26PQ2ZP6zVmTJt47P25jncD9vPwGS+q9QS/V6RaY8j8K8LmvUr9HfYCpH5OWL9lZY+Sv6pesHCJHbtrf9k6etZvf0G1L0ja4cAe1UT/s3zdCe3/Q5/n372wMc97/E1Qh0Tbmfwh3m/V9On72tNnrCF1sJkVe1EyXMdBa7+lHMsk44zMF6St9e2djNnbm8ybpHkq+gbbemMaH0UZmD8obKGrk7r+nt+3bE7o83YZp/vqOKdv6PzJNN6mTJsI/51XR7i2ZrGA5B6zFwnjzxmqPjaGfW3tZNrz1eljq29mOOqeCfF/irRt87PNw0uXSVAvrmOMNT569MptsYaV0sic/wbY13e8hPrb9K2ySUJ0j6G/Lu0U4qpTrR23jMp6m5hU+YTaWCeh9aIsm/rqUHV4bFv42kgnZdfH1PUj1D7DVH9d8khRN1zFRl/+/TW//qxL1uH83+mk3H+SvRtS2TDU90nX2TpM6/1xzZpZtoYdK763dqlz0f6uNeFehcs+H/nbGP77MpX06n/ofpzP+tVmTUvRtVuX/cjS67OE5kRBrxyJ+w/dPo7r+9cO1160e3gqu0S2uW7PjN/L6ns/UfMf10Lai87frJ+3KndAfc8yTf1M3T4s6qm4/yh7/2GSkG8UMw//DvRLgbYZSEOxr0LCWvRdjfh9XGzfqN4NivfZd7rsmFp08zmbssrKJEuTfVMZopdpbuwSrhNv3/N2s+0PDG3KNB6RMrFvJHv6B85HXObAoWsd3zm3i+6uZYytv+5+pohbpo6+tpZJFfmGlrcMf4c8b1Pe2OUIsaXJrinCTfaxtZOt+NYnU3hIfQlN20Z/1+dt7JaqLsbIzycNWZmrlNg2Dc2/LJ1T+T6WrrYSml4Ku7ik7yIx2opJD51vU9UfVRmrqL8u/olZj0PyCLV5irxcdKoi/6rKb8qTrHsnhW9jyZH/nSpeWDzxd9769uQ016lgUuf2pAfKPhu2FpfZL2Yb9snLNl/fNIepXaUsj4vNXCXUZ75px8ojNP8UPvAta2g6fb+F1ckZuneshv1vGXXDeyRRrN/bBPS1Jul+l+7zW86R7Wv63WXyDpt/RxraRjvC+TC3O61/Sqj/prag8x372yQivn+XwudrI2X2E2KdtJEov52e0L+uv4FO3p/rvssgsL8F4d/z9PzlWS94m8fqS3361Fi+6qaVYHwi9Yz4iH2fobIj+45cpz/TUaarr/4+z+vaWtVtyAX2d1LG8W9C3f+F1mnf36/k4w3YPrLv+XBVXCJs3cr+n4MKJuLv/fN9GhNdXVP5pJMN9vFi3rpv3/r8Ywg3SYp66zNOsO8QGcxPpnmRS/1mvmJjju3v7absI2xspQrvs1dNbjOj/wP7h1RlZyKGy8occ408UL8En4v6xfC/K3z52XzJd62T8vuZGGsxo/6O46ntmNqqFb/jps2/hHV4rPKH0svT4pstU7t2tZ9u/ZdqbJL1MwP6O86Fyt4jYaIrGz9mjEt8lFL4PtVE6votG2P6fpdf/GZRse7s3bf4BtSl/DIbKMctx++Z+8o6K6z9FPOwKsRmXiaNl7C+6NYRpjlbqG1j72f49qsuY4brd/amb4ZVc8TQ+sSH985LrEe8iPWJnfPrJRbWbb+dwn4x6o+r/aS2S7w3qWt//LnYz2ntE0vH1uDcyKatx1rH+EiMPEN1SZG/iz6+9o01Rob6O7Q+xLZ1jHobK61U+pWVvo2EpuWqzzD6Poa+pvhli0wn8Zq/72Mzm2d90o5VN1x9ZKuzbTgvqWwUIin8FSpl1CXXvFRxU0iozVPYJDRtF3uFphn6XAyJUUdD7SjTJ8v6n9fVbVObkKWp001lc9VRlqdOf5v0ZM+bymdbfp1NfG0bq27Y5JMyfxeJkU6o/inKH8O2Zfgidb6h/g3VJ7QcVbWL0Pxt6rlrPqa4KfQ25a2zl4/E8GdM/4fK/wA=","base64")),Q0=new p({stateTable:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],accepting:[!1,!0,!0,!0,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!1,!1,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!1,!0,!0,!1,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0],tags:[[],["broken_cluster"],["consonant_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],[],["broken_cluster"],["symbol_cluster"],[],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["symbol_cluster"],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],[],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],[],[],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],["consonant_syllable"],["vowel_syllable"],["standalone_cluster"]]}),hn=function(eA){function G(){return eA.apply(this,arguments)||this}return h(G,eA),G.planFeatures=function(M){M.addStage(d0),M.addStage(["locl","ccmp"]),M.addStage(p0),M.addStage("nukt"),M.addStage("akhn"),M.addStage("rphf",!1),M.addStage("rkrf"),M.addStage("pref",!1),M.addStage("blwf",!1),M.addStage("abvf",!1),M.addStage("half",!1),M.addStage("pstf",!1),M.addStage("vatu"),M.addStage("cjct"),M.addStage("cfar",!1),M.addStage(I0),M.addStage({local:["init"],global:["pres","abvs","blws","psts","haln","dist","abvm","blwm","calt","clig"]}),M.unicodeScript=function ns(eA){return Hi[eA]}(M.script),M.indicConfig=Na[M.unicodeScript]||Na.Default,M.isOldSpec=M.indicConfig.hasOldSpec&&"2"!==M.script[M.script.length-1]},G.assignFeatures=function(M,x){for(var P=function(sA){var iA=x[sA].codePoints[0],NA=w0[iA]||C0[iA];if(NA){var kA=NA.map(function(gt){var _A=M.font.glyphForCodePoint(gt);return new sr(M.font,_A.id,[gt],x[sA].features)});x.splice.apply(x,[sA,1].concat(kA))}},tA=x.length-1;tA>=0;tA--)P(tA)},G}(hr);function Wi(eA){return Ua.get(eA.codePoints[0])>>8}function Zi(eA){return 1<<(255&Ua.get(eA.codePoints[0]))}T(hn,"zeroMarkWidths","NONE");var Fi=function(G,V,M,x){this.category=G,this.position=V,this.syllableType=M,this.syllable=x};function d0(eA,G){for(var P,V=0,M=0,x=g(Q0.match(G.map(Wi)));!(P=x()).done;){var tA=P.value,oA=tA[0],sA=tA[1],iA=tA[2];if(oA>M){++V;for(var NA=M;NAGt);break;case"First":for(var Ce=(yt=iA)+1;CeWe&&!(Dr(G[Oe])||ln&&G[Oe].shaperInfo.category===Ie_H);Oe--);if(G[Oe].shaperInfo.category!==Ie_H&&Oe>We){var he=G[We];G.splice.apply(G,[We,0].concat(G.splice(We+1,Oe-We))),G[Oe]=he}break}for(var _e=ee.Start,Ue=iA;UeiA;An--)if(G[An-1].shaperInfo.position!==ee.Pre_M){Fe.position=G[An-1].shaperInfo.position;break}}else Fe.position!==ee.SMVD&&(_e=Fe.position)}for(var zn=yt,gn=yt+1;gniA&&!Dr(G[Ln]))}}}}function I0(eA,G,V){for(var M=V.indicConfig,x=eA._layoutEngine.engine.GSUBProcessor.features,P=0,tA=Yi(G,0);P=ee.Base_C){if(oA&&sA+1ee.Base_C&&sA--;break}if(sA===tA&&PP&&!(G[kA].shaperInfo.category&(Ie_M|Xr));)kA--;er(G[kA])&&G[kA].shaperInfo.position!==ee.Pre_M?kA+1P;gt--)if(G[gt-1].shaperInfo.position===ee.Pre_M){var _A=gt-1;_AP&&G[pt].shaperInfo.position===ee.SMVD;)pt--;if(er(G[pt]))for(var $t=sA+1;$tP&&!(G[Be-1].shaperInfo.category&(Ie_M|Xr));)Be--;if(Be>P&&G[Be-1].shaperInfo.category===Ie_M)for(var we=ae,Ce=sA+1;CeP&&er(G[Be-1])&&Be=eA.length)return G;for(var V=eA[G].shaperInfo.syllable;++G=0;tA--)P(tA)},G}(hr);function Ra(eA){return v0.get(eA.codePoints[0])}T(de,"zeroMarkWidths","BEFORE_GPOS");var y0=function(G,V,M){this.category=G,this.syllableType=V,this.syllable=M};function x0(eA,G){for(var x,V=0,M=g(D0.match(G.map(Ra)));!(x=M()).done;){var P=x.value,tA=P[0],oA=P[1],sA=P[2];++V;for(var iA=tA;iA<=oA;iA++)G[iA].shaperInfo=new y0(m0[Ra(G[iA])],sA[0],V);for(var NA="R"===G[tA].shaperInfo.category?1:Math.min(3,oA-tA),kA=tA;kA1)for(P=M+1;P=eA.length)return G;for(var V=eA[G].shaperInfo.syllable;++G=0;Hn--)this.glyphs.splice(Be[Hn],1);return this.glyphs[this.glyphIterator.index]=le,!0}}return!1;case 5:return this.applyContext(P);case 6:return this.applyChainingContext(P);case 7:return this.applyLookup(P.lookupType,P.extension);default:throw new Error("GSUB lookupType ".concat(x," is not supported"))}},G}(Cr),P0=function(eA){function G(){return eA.apply(this,arguments)||this}h(G,eA);var V=G.prototype;return V.applyPositionValue=function(x,P){var tA=this.positions[this.glyphIterator.peekIndex(x)];null!=P.xAdvance&&(tA.xAdvance+=P.xAdvance),null!=P.yAdvance&&(tA.yAdvance+=P.yAdvance),null!=P.xPlacement&&(tA.xOffset+=P.xPlacement),null!=P.yPlacement&&(tA.yOffset+=P.yPlacement);var oA=this.font._variationProcessor,sA=this.font.GDEF&&this.font.GDEF.itemVariationStore;oA&&sA&&(P.xPlaDevice&&(tA.xOffset+=oA.getDelta(sA,P.xPlaDevice.a,P.xPlaDevice.b)),P.yPlaDevice&&(tA.yOffset+=oA.getDelta(sA,P.yPlaDevice.a,P.yPlaDevice.b)),P.xAdvDevice&&(tA.xAdvance+=oA.getDelta(sA,P.xAdvDevice.a,P.xAdvDevice.b)),P.yAdvDevice&&(tA.yAdvance+=oA.getDelta(sA,P.yAdvDevice.a,P.yAdvDevice.b)))},V.applyLookup=function(x,P){switch(x){case 1:var tA=this.coverageIndex(P.coverage);if(-1===tA)return!1;switch(P.version){case 1:this.applyPositionValue(0,P.value);break;case 2:this.applyPositionValue(0,P.values.get(tA))}return!0;case 2:var oA=this.glyphIterator.peek();if(!oA)return!1;var sA=this.coverageIndex(P.coverage);if(-1===sA)return!1;switch(P.version){case 1:for(var kA,NA=g(P.pairSets.get(sA));!(kA=NA()).done;){var gt=kA.value;if(gt.secondGlyph===oA.id)return this.applyPositionValue(0,gt.value1),this.applyPositionValue(1,gt.value2),!0}return!1;case 2:var _A=this.getClassID(this.glyphIterator.cur.id,P.classDef1),ut=this.getClassID(oA.id,P.classDef2);if(-1===_A||-1===ut)return!1;var pt=P.classRecords.get(_A).get(ut);return this.applyPositionValue(0,pt.value1),this.applyPositionValue(1,pt.value2),!0}case 3:var yt=this.glyphIterator.peekIndex(),Gt=this.glyphs[yt];if(!Gt)return!1;var $t=P.entryExitRecords[this.coverageIndex(P.coverage)];if(!$t||!$t.exitAnchor)return!1;var _t=P.entryExitRecords[this.coverageIndex(P.coverage,Gt.id)];if(!_t||!_t.entryAnchor)return!1;var ae=this.getAnchor(_t.entryAnchor),Be=this.getAnchor($t.exitAnchor),we=this.positions[this.glyphIterator.index],Ce=this.positions[yt];switch(this.direction){case"ltr":we.xAdvance=Be.x+we.xOffset;var He=ae.x+Ce.xOffset;Ce.xAdvance-=He,Ce.xOffset-=He;break;case"rtl":we.xAdvance-=He=Be.x+we.xOffset,we.xOffset-=He,Ce.xAdvance=ae.x+Ce.xOffset}return this.glyphIterator.flags.rightToLeft?(this.glyphIterator.cur.cursiveAttachment=yt,we.yOffset=ae.y-Be.y):(Gt.cursiveAttachment=this.glyphIterator.index,we.yOffset=Be.y-ae.y),!0;case 4:var sn=this.coverageIndex(P.markCoverage);if(-1===sn)return!1;for(var Je=this.glyphIterator.index;--Je>=0&&(this.glyphs[Je].isMark||this.glyphs[Je].ligatureComponent>0););if(Je<0)return!1;var le=this.coverageIndex(P.baseCoverage,this.glyphs[Je].id);if(-1===le)return!1;var ln=P.markArray[sn];return this.applyAnchor(ln,P.baseArray[le][ln.class],Je),!0;case 5:var Oe=this.coverageIndex(P.markCoverage);if(-1===Oe)return!1;for(var he=this.glyphIterator.index;--he>=0&&this.glyphs[he].isMark;);if(he<0)return!1;var _e=this.coverageIndex(P.ligatureCoverage,this.glyphs[he].id);if(-1===_e)return!1;var Ue=P.ligatureArray[_e],Fe=this.glyphIterator.cur,An=this.glyphs[he],zn=An.ligatureID&&An.ligatureID===Fe.ligatureID&&Fe.ligatureComponent>0?Math.min(Fe.ligatureComponent,An.codePoints.length)-1:An.codePoints.length-1,gn=P.markArray[Oe];return this.applyAnchor(gn,Ue[zn][gn.class],he),!0;case 6:var Hn=this.coverageIndex(P.mark1Coverage);if(-1===Hn)return!1;var On=this.glyphIterator.peekIndex(-1),mn=this.glyphs[On];if(!mn||!mn.isMark)return!1;var Qn=this.glyphIterator.cur,kn=!1;if(Qn.ligatureID===mn.ligatureID?Qn.ligatureID?Qn.ligatureComponent===mn.ligatureComponent&&(kn=!0):kn=!0:(Qn.ligatureID&&!Qn.ligatureComponent||mn.ligatureID&&!mn.ligatureComponent)&&(kn=!0),!kn)return!1;var jn=this.coverageIndex(P.mark2Coverage,mn.id);if(-1===jn)return!1;var me=P.mark1Array[Hn];return this.applyAnchor(me,P.mark2Array[jn][me.class],On),!0;case 7:return this.applyContext(P);case 8:return this.applyChainingContext(P);case 9:return this.applyLookup(P.lookupType,P.extension);default:throw new Error("Unsupported GPOS table: ".concat(x))}},V.applyAnchor=function(x,P,tA){var oA=this.getAnchor(P),sA=this.getAnchor(x.markAnchor),NA=this.positions[this.glyphIterator.index];NA.xOffset=oA.x-sA.x,NA.yOffset=oA.y-sA.y,this.glyphIterator.cur.markAttachment=tA},V.getAnchor=function(x){var P=x.xCoordinate,tA=x.yCoordinate,oA=this.font._variationProcessor,sA=this.font.GDEF&&this.font.GDEF.itemVariationStore;return oA&&sA&&(x.xDeviceTable&&(P+=oA.getDelta(sA,x.xDeviceTable.a,x.xDeviceTable.b)),x.yDeviceTable&&(tA+=oA.getDelta(sA,x.yDeviceTable.a,x.yDeviceTable.b))),{x:P,y:tA}},V.applyFeatures=function(x,P,tA){eA.prototype.applyFeatures.call(this,x,P,tA);for(var oA=0;oA>16;if(0===x)switch(M>>8){case 0:return 173===M;case 3:return 847===M;case 6:return 1564===M;case 23:return 6068<=M&&M<=6069;case 24:return 6155<=M&&M<=6158;case 32:return 8203<=M&&M<=8207||8234<=M&&M<=8238||8288<=M&&M<=8303;case 254:return 65024<=M&&M<=65039||65279===M;case 255:return 65520<=M&&M<=65528;default:return!1}else switch(x){case 1:return 113824<=M&&M<=113827||119155<=M&&M<=119162;case 14:return 917504<=M&&M<=921599;default:return!1}},G.getAvailableFeatures=function(M,x){var P=[];return this.engine&&P.push.apply(P,this.engine.getAvailableFeatures(M,x)),this.font.kern&&-1===P.indexOf("kern")&&P.push("kern"),P},G.stringsForGlyph=function(M){for(var oA,x=new Set,tA=g(this.font._cmapProcessor.codePointsForGlyph(M));!(oA=tA()).done;)x.add(String.fromCodePoint(oA.value));if(this.engine&&this.engine.stringsForGlyph)for(var NA,iA=g(this.engine.stringsForGlyph(M));!(NA=iA()).done;)x.add(NA.value);return Array.from(x)},eA}(),L0={moveTo:"M",lineTo:"L",quadraticCurveTo:"Q",bezierCurveTo:"C",closePath:"Z"},Si=function(){function eA(){this.commands=[],this._bbox=null,this._cbox=null}var G=eA.prototype;return G.toFunction=function(){var M=this;return function(x){M.commands.forEach(function(P){return x[P.command].apply(x,P.args)})}},G.toSVG=function(){return this.commands.map(function(x){var P=x.args.map(function(tA){return Math.round(100*tA)/100});return"".concat(L0[x.command]).concat(P.join(" "))}).join("")},G.mapPoints=function(M){for(var tA,x=new eA,P=g(this.commands);!(tA=P()).done;){for(var oA=tA.value,sA=[],iA=0;iA0&&this.codePoints.every(w.isMark),this.isLigature=this.codePoints.length>1}var G=eA.prototype;return G._getPath=function(){return new Si},G._getCBox=function(){return this.path.cbox},G._getBBox=function(){return this.path.bbox},G._getTableMetrics=function(M){if(this.id0)sA=Math.abs(NA.typoAscender-NA.typoDescender),iA=NA.typoAscender-M.maxY;else{var kA=this._font.hhea;sA=Math.abs(kA.ascent-kA.descent),iA=kA.ascent-M.maxY}return this._font._variationProcessor&&this._font.HVAR&&(P+=this._font._variationProcessor.getAdvanceAdjustment(this.id,this._font.HVAR)),this._metrics={advanceWidth:P,advanceHeight:sA,leftBearing:tA,topBearing:iA}},G.getScaledPath=function(M){return this.path.scale(1/this._font.unitsPerEm*M)},G._getName=function(){var M=this._font.post;if(!M)return null;switch(M.version){case 1:return qr[this.id];case 2:var x=M.glyphNameIndex[this.id];return x0?this._decodeSimple(sA,tA):sA.numberOfContours<0&&this._decodeComposite(sA,tA,oA),sA},V._decodeSimple=function(x,P){x.points=[];var tA=new e.Array(e.uint16,x.numberOfContours).decode(P);x.instructions=new e.Array(e.uint8,e.uint16).decode(P);for(var oA=[],sA=tA[tA.length-1]+1;oA.length=0,0,0);x.points.push(_A)}var ut=0;for(gt=0;gt>1,iA.length=0}function ln(Oe,he){Gt&&sA.closePath(),sA.moveTo(Oe,he),Gt=!0}return function Oe(){for(;P.pos1&&Je(),ut+=iA.shift(),ln(_A,ut);break;case 5:for(;iA.length>=2;)_A+=iA.shift(),ut+=iA.shift(),sA.lineTo(_A,ut);break;case 6:case 7:for(var _e=6===he;iA.length>=1;)_e?_A+=iA.shift():ut+=iA.shift(),sA.lineTo(_A,ut),_e=!_e;break;case 8:for(;iA.length>0;){var me=_A+iA.shift(),Pe=ut+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift();_A=Ye+iA.shift(),ut=Ze+iA.shift(),sA.bezierCurveTo(me,Pe,Ye,Ze,_A,ut)}break;case 10:var Ue=iA.pop()+we,Fe=Be[Ue];if(Fe){yt[Ue]=!0;var An=P.pos,zn=oA;P.pos=Fe.offset,oA=Fe.offset+Fe.length,Oe(),P.pos=An,oA=zn}break;case 11:if(x.version>=2)break;return;case 14:if(x.version>=2)break;iA.length>0&&Je(),Gt&&(sA.closePath(),Gt=!1);break;case 15:if(x.version<2)throw new Error("vsindex operator not supported in CFF v1");He=iA.pop();break;case 16:if(x.version<2)throw new Error("blend operator not supported in CFF v1");if(!sn)throw new Error("blend operator in non-variation font");for(var gn=sn.getBlendVector(Ce,He),pn=iA.pop(),Hn=pn*gn.length,On=iA.length-Hn,mn=On-pn,Qn=0;Qn>3;break;case 21:iA.length>2&&Je(),_A+=iA.shift(),ut+=iA.shift(),ln(_A,ut);break;case 22:iA.length>1&&Je(),ln(_A+=iA.shift(),ut);break;case 24:for(;iA.length>=8;)me=_A+iA.shift(),Pe=ut+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye+iA.shift(),ut=Ze+iA.shift(),sA.bezierCurveTo(me,Pe,Ye,Ze,_A,ut);_A+=iA.shift(),ut+=iA.shift(),sA.lineTo(_A,ut);break;case 25:for(;iA.length>=8;)_A+=iA.shift(),ut+=iA.shift(),sA.lineTo(_A,ut);me=_A+iA.shift(),Pe=ut+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye+iA.shift(),ut=Ze+iA.shift(),sA.bezierCurveTo(me,Pe,Ye,Ze,_A,ut);break;case 26:for(iA.length%2&&(_A+=iA.shift());iA.length>=4;)me=_A,Pe=ut+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye,ut=Ze+iA.shift(),sA.bezierCurveTo(me,Pe,Ye,Ze,_A,ut);break;case 27:for(iA.length%2&&(ut+=iA.shift());iA.length>=4;)me=_A+iA.shift(),Pe=ut,Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye+iA.shift(),sA.bezierCurveTo(me,Pe,Ye,Ze,_A,ut=Ze);break;case 28:iA.push(P.readInt16BE());break;case 29:Ue=iA.pop()+_t,(Fe=$t[Ue])&&(pt[Ue]=!0,An=P.pos,zn=oA,P.pos=Fe.offset,oA=Fe.offset+Fe.length,Oe(),P.pos=An,oA=zn);break;case 30:case 31:for(_e=31===he;iA.length>=4;)_e?(me=_A+iA.shift(),Pe=ut,Ye=me+iA.shift(),Ze=Pe+iA.shift(),ut=Ze+iA.shift(),_A=Ye+(1===iA.length?iA.shift():0)):(me=_A,Pe=ut+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye+iA.shift(),ut=Ze+(1===iA.length?iA.shift():0)),sA.bezierCurveTo(me,Pe,Ye,Ze,_A,ut),_e=!_e;break;case 12:switch(he=P.readUInt8()){case 3:var ke=iA.pop(),Bn=iA.pop();iA.push(ke&&Bn?1:0);break;case 4:ke=iA.pop(),Bn=iA.pop(),iA.push(ke||Bn?1:0);break;case 5:ke=iA.pop(),iA.push(ke?0:1);break;case 9:ke=iA.pop(),iA.push(Math.abs(ke));break;case 10:ke=iA.pop(),Bn=iA.pop(),iA.push(ke+Bn);break;case 11:ke=iA.pop(),Bn=iA.pop(),iA.push(ke-Bn);break;case 12:ke=iA.pop(),Bn=iA.pop(),iA.push(ke/Bn);break;case 14:ke=iA.pop(),iA.push(-ke);break;case 15:ke=iA.pop(),Bn=iA.pop(),iA.push(ke===Bn?1:0);break;case 18:iA.pop();break;case 20:var $i=iA.pop(),Ln=iA.pop();NA[Ln]=$i;break;case 21:Ln=iA.pop(),iA.push(NA[Ln]||0);break;case 22:var Aa=iA.pop(),ta=iA.pop(),Ll=iA.pop(),bl=iA.pop();iA.push(Ll<=bl?Aa:ta);break;case 23:iA.push(Math.random());break;case 24:ke=iA.pop(),Bn=iA.pop(),iA.push(ke*Bn);break;case 26:ke=iA.pop(),iA.push(Math.sqrt(ke));break;case 27:ke=iA.pop(),iA.push(ke,ke);break;case 28:ke=iA.pop(),Bn=iA.pop(),iA.push(Bn,ke);break;case 29:(Ln=iA.pop())<0?Ln=0:Ln>iA.length-1&&(Ln=iA.length-1),iA.push(iA[Ln]);break;case 30:var Pi=iA.pop(),_r=iA.pop();if(_r>=0)for(;_r>0;){for(var ea=iA[Pi-1],Ri=Pi-2;Ri>=0;Ri--)iA[Ri+1]=iA[Ri];iA[0]=ea,_r--}else for(;_r<0;){ea=iA[0];for(var zi=0;zi<=Pi;zi++)iA[zi]=iA[zi+1];iA[Pi-1]=ea,_r++}break;case 34:me=_A+iA.shift(),Pe=ut,Ye=me+iA.shift(),Ze=Pe+iA.shift();var $r=Ye+iA.shift(),Ai=Ze,ti=$r+iA.shift(),ei=Ai,ni=ti+iA.shift(),ri=ei,ii=ni+iA.shift(),ai=ri;_A=ii,ut=ai,sA.bezierCurveTo(me,Pe,Ye,Ze,$r,Ai),sA.bezierCurveTo(ti,ei,ni,ri,ii,ai);break;case 35:for(var Qr=[],no=0;no<=5;no++)_A+=iA.shift(),ut+=iA.shift(),Qr.push(_A,ut);sA.bezierCurveTo.apply(sA,Qr.slice(0,6)),sA.bezierCurveTo.apply(sA,Qr.slice(6)),iA.shift();break;case 36:me=_A+iA.shift(),Pe=ut+iA.shift(),Ye=me+iA.shift(),ei=Ai=Ze=Pe+iA.shift(),ni=(ti=($r=Ye+iA.shift())+iA.shift())+iA.shift(),ri=ei+iA.shift(),ii=ni+iA.shift(),_A=ii,ut=ai=ri,sA.bezierCurveTo(me,Pe,Ye,Ze,$r,Ai),sA.bezierCurveTo(ti,ei,ni,ri,ii,ai);break;case 37:var na=_A,ro=ut;Qr=[];for(var io=0;io<=4;io++)_A+=iA.shift(),ut+=iA.shift(),Qr.push(_A,ut);Math.abs(_A-na)>Math.abs(ut-ro)?(_A+=iA.shift(),ut=ro):(_A=na,ut+=iA.shift()),Qr.push(_A,ut),sA.bezierCurveTo.apply(sA,Qr.slice(0,6)),sA.bezierCurveTo.apply(sA,Qr.slice(6));break;default:throw new Error("Unknown op: 12 ".concat(he))}break;default:throw new Error("Unknown op: ".concat(he))}else if(he<247)iA.push(he-139);else if(he<251){var ra=P.readUInt8();iA.push(256*(he-247)+ra+108)}else he<255?(ra=P.readUInt8(),iA.push(256*-(he-251)-ra-108)):iA.push(P.readInt32BE()/65536)}}(),Gt&&sA.closePath(),sA},G}(Ni),Al=new e.Struct({originX:e.uint16,originY:e.uint16,type:new e.String(4),data:new e.Buffer(function(eA){return eA.parent.buflen-eA._currentOffset})}),tl=function(eA){function G(){return eA.apply(this,arguments)||this}h(G,eA);var V=G.prototype;return V.getImageForSize=function(x){for(var P=0;P=x)break}var oA=tA.imageOffsets,sA=oA[this.id],iA=oA[this.id+1];return sA===iA?null:(this._font.stream.pos=sA,Al.decode(this._font.stream,{buflen:iA-sA}))},V.render=function(x,P){var tA=this.getImageForSize(P);null!=tA&&x.image(tA.data,{height:P,x:tA.originX,y:P/this._font.unitsPerEm*(this.bbox.minY-tA.originY)}),this._font.sbix.flags.renderOutlines&&eA.prototype.render.call(this,x,P)},G}(Ui),Oa=function(G,V){this.glyph=G,this.color=V},el=function(eA){function G(){return eA.apply(this,arguments)||this}h(G,eA);var V=G.prototype;return V._getBBox=function(){for(var x=new Ur,P=0;P>1;if(this.id<(iA=P.baseGlyphRecord[sA]).gid)oA=sA-1;else{if(!(this.id>iA.gid)){var NA=iA;break}tA=sA+1}}if(null==NA){var kA=this._font._getBaseGlyph(this.id);return[new Oa(kA,gt={red:0,green:0,blue:0,alpha:255})]}for(var _A=[],ut=NA.firstLayerIndex;ut=1&&x[P]=P.glyphCount)){var tA=P.offsets[M];if(tA!==P.offsets[M+1]){var oA=this.font.stream;if(oA.pos=tA,!(oA.pos>=oA.length)){var sA=oA.readUInt16BE(),iA=tA+oA.readUInt16BE();if(32768&sA){var NA=oA.pos;oA.pos=iA;var kA=this.decodePoints();iA=oA.pos,oA.pos=NA}var gt=x.map(function(gn){return gn.copy()});sA&=4095;for(var _A=0;_A=P.globalCoordCount)throw new Error("Invalid gvar table");yt=P.globalCoords[4095&pt]}if(16384&pt){for(var $t=[],_t=0;_tMath.max(0,x[NA]))return 0;iA=(iA*oA[NA]+Number.EPSILON)/(x[NA]+Number.EPSILON)}else{if(oA[NA]tA[NA])return 0;iA=oA[NA]sA)){var NA=tA,kA=tA;for(tA++;tA<=sA;)P[tA]&&(this.deltaInterpolate(kA+1,tA-1,kA,tA,x,M),kA=tA),tA++;kA===NA?this.deltaShift(oA,sA,kA,x,M):(this.deltaInterpolate(kA+1,sA,kA,NA,x,M),NA>0&&this.deltaInterpolate(oA,NA-1,kA,NA,x,M)),tA=sA+1}}},G.deltaInterpolate=function(M,x,P,tA,oA,sA){if(!(M>x))for(var iA=["x","y"],NA=0;NAoA[tA][kA]){var gt=P;P=tA,tA=gt}var _A=oA[P][kA],ut=oA[tA][kA],pt=sA[P][kA],yt=sA[tA][kA];if(_A!==ut||pt===yt)for(var Gt=_A===ut?0:(yt-pt)/(ut-_A),$t=M;$t<=x;$t++){var _t=oA[$t][kA];_t<=_A?_t+=pt-_A:_t>=ut?_t+=yt-ut:_t=pt+(_t-_A)*Gt,sA[$t][kA]=_t}}},G.deltaShift=function(M,x,P,tA,oA){var sA=oA[P].x-tA[P].x,iA=oA[P].y-tA[P].y;if(0!==sA||0!==iA)for(var NA=M;NA<=x;NA++)NA!==P&&(oA[NA].x+=sA,oA[NA].y+=iA)},G.getAdvanceAdjustment=function(M,x){var P,tA;if(x.advanceWidthMapping){var oA=M;oA>=x.advanceWidthMapping.mapCount&&(oA=x.advanceWidthMapping.mapCount-1);var iA=x.advanceWidthMapping.mapData[oA];P=iA.outerIndex,tA=iA.innerIndex}else P=0,tA=M;return this.getDelta(x.itemVariationStore,P,tA)},G.getDelta=function(M,x,P){if(x>=M.itemVariationData.length)return 0;var tA=M.itemVariationData[x];if(P>=tA.deltaSets.length)return 0;for(var oA=tA.deltaSets[P],sA=this.getBlendVector(M,x),iA=0,NA=0;NA_A.peakCoord||_A.peakCoord>_A.endCoord||_A.startCoord<0&&_A.endCoord>0&&0!==_A.peakCoord||0===_A.peakCoord?1:tA[gt]<_A.startCoord||tA[gt]>_A.endCoord?0:tA[gt]===_A.peakCoord?1:tA[gt]<_A.peakCoord?(tA[gt]-_A.startCoord+Number.EPSILON)/(_A.peakCoord-_A.startCoord+Number.EPSILON):(_A.endCoord-tA[gt]+Number.EPSILON)/(_A.endCoord-_A.peakCoord+Number.EPSILON)}oA[sA]=iA}return this.blendVectors.set(P,oA),oA},eA}(),gl=Promise.resolve(),Wa=function(){function eA(V){this.font=V,this.glyphs=[],this.mapping={},this.includeGlyph(0)}var G=eA.prototype;return G.includeGlyph=function(M){return"object"==typeof M&&(M=M.id),null==this.mapping[M]&&(this.glyphs.push(M),this.mapping[M]=this.glyphs.length-1),this.mapping[M]},G.encodeStream=function(){var M=this,x=new e.EncodeStream;return gl.then(function(){return M.encode(x),x.end()}),x},eA}(),Za=function(){function eA(){}return eA.size=function(V){return V>=0&&V<=255?1:2},eA.encode=function(V,M){M>=0&&M<=255?V.writeUInt8(M):V.writeInt16BE(M)},eA}(),Xa=new e.Struct({numberOfContours:e.int16,xMin:e.int16,yMin:e.int16,xMax:e.int16,yMax:e.int16,endPtsOfContours:new e.Array(e.uint16,"numberOfContours"),instructions:new e.Array(e.uint8,e.uint16),flags:new e.Array(e.uint8,0),xPoints:new e.Array(Za,0),yPoints:new e.Array(Za,0)}),Cl=function(){function eA(){}var G=eA.prototype;return G.encodeSimple=function(M,x){void 0===x&&(x=[]);for(var P=[],tA=[],oA=[],sA=[],iA=0,NA=0,kA=0,gt=0,_A=0,ut=0;ut0&&(sA.push(iA),iA=0),sA.push(_t),gt=_t),NA=Gt,kA=$t,_A++}"closePath"===pt.command&&P.push(_A-1)}M.commands.length>1&&"closePath"!==M.commands[M.commands.length-1].command&&P.push(_A-1);var Ce=M.bbox,He={numberOfContours:P.length,xMin:Ce.minX,yMin:Ce.minY,xMax:Ce.maxX,yMax:Ce.maxY,endPtsOfContours:P,instructions:x,flags:sA,xPoints:tA,yPoints:oA},sn=Xa.size(He),Je=4-sn%4,le=new e.EncodeStream(sn+Je);return Xa.encode(le,He),0!==Je&&le.fill(0,Je),le.buffer},G._encodePoint=function(M,x,P,tA,oA,sA){var iA=M-x;return M===x?tA|=sA:(-255<=iA&&iA<=255&&(tA|=oA,iA<0?iA=-iA:tA|=sA),P.push(iA)),tA},eA}(),Ql=function(eA){function G(M){var x;return(x=eA.call(this,M)||this).glyphEncoder=new Cl,x}h(G,eA);var V=G.prototype;return V._addGlyph=function(x){var P=this.font.getGlyph(x),tA=P._decode(),oA=this.font.loca.offsets[x],sA=this.font.loca.offsets[x+1],iA=this.font._getTableStream("glyf");iA.pos+=oA;var NA=iA.readBuffer(sA-oA);if(tA&&tA.numberOfContours<0){NA=c.from(NA);for(var gt,kA=g(tA.components);!(gt=kA()).done;){var _A=gt.value;x=this.includeGlyph(_A.glyphID),NA.writeUInt16BE(x,_A.pos)}}else tA&&this.font._variationProcessor&&(NA=this.glyphEncoder.encodeSimple(P.path,tA.instructions));return this.glyf.push(NA),this.loca.offsets.push(this.offset),this.hmtx.metrics.push({advance:P.advanceWidth,bearing:P._getMetrics().leftBearing}),this.offset+=NA.length,this.glyf.length-1},V.encode=function(x){this.glyf=[],this.offset=0,this.loca={offsets:[],version:this.font.loca.version},this.hmtx={metrics:[],bearings:[]};for(var P=0;P255?2:1,ranges:[{first:1,nLeft:this.charstrings.length-2}]},tA=Object.assign({},this.cff.topDict);tA.Private=null,tA.charset=P,tA.Encoding=null,tA.CharStrings=this.charstrings;for(var oA=0,sA=["version","Notice","Copyright","FullName","FamilyName","Weight","PostScript","BaseFontName","FontName"];oA0&&Object.defineProperty(this,x,{get:this._getTable.bind(this,P)})}}eA.probe=function(M){var x=M.toString("ascii",0,4);return"true"===x||"OTTO"===x||x===String.fromCharCode(0,1,0,0)};var G=eA.prototype;return G.setDefaultLanguage=function(M){void 0===M&&(M=null),this.defaultLanguage=M},G._getTable=function(M){if(!(M.tag in this._tables))try{this._tables[M.tag]=this._decodeTable(M)}catch(x){D.logErrors&&(console.error("Error decoding table ".concat(M.tag)),console.error(x.stack))}return this._tables[M.tag]},G._getTableStream=function(M){var x=this.directory.tables[M];return x?(this.stream.pos=x.offset,this.stream):null},G._decodeDirectory=function(){return this.directory=ci.decode(this.stream,{_startOffset:0})},G._decodeTable=function(M){var x=this.stream.pos,P=this._getTableStream(M.tag),tA=se[M.tag].decode(P,this,M.length);return this.stream.pos=x,tA},G.getName=function(M,x){void 0===x&&(x=this.defaultLanguage||D.defaultLanguage);var P=this.name&&this.name.records[M];return P&&(P[x]||P[this.defaultLanguage]||P[D.defaultLanguage]||P.en||P[Object.keys(P)[0]])||null},G.hasGlyphForCodePoint=function(M){return!!this._cmapProcessor.lookup(M)},G.glyphForCodePoint=function(M){return this.getGlyph(this._cmapProcessor.lookup(M),[M])},G.glyphsForString=function(M){for(var x=[],P=M.length,tA=0,oA=-1,sA=-1;tA<=P;){var iA=0,NA=0;if(tA>>6&3},transformed:function(G){return"glyf"===G.tag||"loca"===G.tag?0===G.transformVersion:0!==G.transformVersion},transformLength:new e.Optional(_a,function(eA){return eA.transformed})}),$a=new e.Struct({tag:new e.String(4),flavor:e.uint32,length:e.uint32,numTables:e.uint16,reserved:new e.Reserved(e.uint16),totalSfntSize:e.uint32,totalCompressedSize:e.uint32,majorVersion:e.uint16,minorVersion:e.uint16,metaOffset:e.uint32,metaLength:e.uint32,metaOrigLength:e.uint32,privOffset:e.uint32,privLength:e.uint32,tables:new e.Array(vl,"numTables")});$a.process=function(){for(var eA={},G=0;G0){for(var iA=[],NA=0,kA=0;kA>7);if((iA&=127)<10)oA=0,sA=nr(iA,((14&iA)<<7)+G.readUInt8());else if(iA<20)oA=nr(iA,((iA-10&14)<<7)+G.readUInt8()),sA=0;else if(iA<84)oA=nr(iA,1+(48&(kA=iA-20))+((gt=G.readUInt8())>>4)),sA=nr(iA>>1,1+((12&kA)<<2)+(15>));else if(iA<120){var kA;oA=nr(iA,1+((kA=iA-84)/12<<8)+G.readUInt8()),sA=nr(iA>>1,1+(kA%12>>2<<8)+G.readUInt8())}else if(iA<124){var gt=G.readUInt8(),_A=G.readUInt8();oA=nr(iA,(gt<<4)+(_A>>4)),sA=nr(iA>>1,((15&_A)<<8)+G.readUInt8())}else oA=nr(iA,G.readUInt16BE()),sA=nr(iA>>1,G.readUInt16BE());P.push(new cr(NA,!1,x+=oA,M+=sA))}return P}var Yl=new e.VersionedStruct(e.uint32,{65536:{numFonts:e.uint32,offsets:new e.Array(e.uint32,"numFonts")},131072:{numFonts:e.uint32,offsets:new e.Array(e.uint32,"numFonts"),dsigTag:e.uint32,dsigLength:e.uint32,dsigOffset:e.uint32}}),Tl=function(){function eA(V){if(this.stream=V,"ttcf"!==V.readString(4))throw new Error("Not a TrueType collection");this.header=Yl.decode(V)}return eA.probe=function(M){return"ttcf"===M.toString("ascii",0,4)},eA.prototype.getFont=function(M){for(var P,x=g(this.header.offsets);!(P=x()).done;){var tA=P.value,oA=new e.DecodeStream(this.stream.buffer);oA.pos=tA;var sA=new yr(oA);if(sA.postscriptName===M)return sA}return null},l(eA,[{key:"fonts",get:function(){for(var P,M=[],x=g(this.header.offsets);!(P=x()).done;){var tA=P.value,oA=new e.DecodeStream(this.stream.buffer);oA.pos=tA,M.push(new yr(oA))}return M}}]),eA}(),Sl=new e.String(e.uint8),Nl=(new e.Struct({len:e.uint32,buf:new e.Buffer("len")}),new e.Struct({id:e.uint16,nameOffset:e.int16,attr:e.uint8,dataOffset:e.uint24,handle:e.uint32})),Ul=new e.Struct({name:new e.String(4),maxTypeIndex:e.uint16,refList:new e.Pointer(e.uint16,new e.Array(Nl,function(eA){return eA.maxTypeIndex+1}),{type:"parent"})}),Pl=new e.Struct({length:e.uint16,types:new e.Array(Ul,function(eA){return eA.length+1})}),Rl=new e.Struct({reserved:new e.Reserved(e.uint8,24),typeList:new e.Pointer(e.uint16,Pl),nameListOffset:new e.Pointer(e.uint16,"void")}),eo=new e.Struct({dataOffset:e.uint32,map:new e.Pointer(e.uint32,Rl),dataLength:e.uint32,mapLength:e.uint32}),zl=function(){function eA(V){this.stream=V,this.header=eo.decode(this.stream);for(var x,M=g(this.header.map.typeList.types);!(x=M()).done;){for(var oA,P=x.value,tA=g(P.refList);!(oA=tA()).done;){var sA=oA.value;sA.nameOffset>=0?(this.stream.pos=sA.nameOffset+this.header.map.nameListOffset,sA.name=Sl.decode(this.stream)):sA.name=null}"sfnt"===P.name&&(this.sfnt=P)}}return eA.probe=function(M){var x=new e.DecodeStream(M);try{var P=eo.decode(x)}catch(iA){return!1}for(var oA,tA=g(P.map.typeList.types);!(oA=tA()).done;)if("sfnt"===oA.value.name)return!0;return!1},eA.prototype.getFont=function(M){if(!this.sfnt)return null;for(var P,x=g(this.sfnt.refList);!(P=x()).done;){var sA=new e.DecodeStream(this.stream.buffer.slice(this.header.dataOffset+P.value.dataOffset+4)),iA=new yr(sA);if(iA.postscriptName===M)return iA}return null},l(eA,[{key:"fonts",get:function(){for(var P,M=[],x=g(this.sfnt.refList);!(P=x()).done;){var sA=new e.DecodeStream(this.stream.buffer.slice(this.header.dataOffset+P.value.dataOffset+4));M.push(new yr(sA))}return M}}]),eA}();D.registerFormat(yr),D.registerFormat(pl),D.registerFormat(Ao),D.registerFormat(Tl),D.registerFormat(zl),Y.exports=D},7337:function(Y,I,n){"use strict";var c=n(4781),i=n(9742),o=n(2055),l=o.BK,h=o.CR,a=o.LF,g=o.NL,E=o.SG,u=o.WJ,C=o.SP,e=o.ZWJ,f=o.BA,B=o.HY,w=o.NS,Q=o.AI,p=o.AL,S=o.CJ,m=o.HL,d=o.RI,v=o.SA,D=o.XX,U=n(8383),T=U.DI_BRK,F=U.IN_BRK,R=U.CI_BRK,L=U.CP_BRK,aA=U.pairTable,lA=new c(i.toByteArray("AAgOAAAAAACA3QAAAe0OEvHtnXuMXUUdx+d2d2/33r237V3YSoFC11r6IGgbRFBEfFF5KCVCMYKFaKn8AYqmwUeqECFabUGQipUiNCkgSRElUkKwJRWtwSpJrZpCI4E2NQqiBsFGwWL8Tu6Md3Z23o9zbund5JM5c+b1m9/85nnOuXtTHyFrwXpwL9gBngTPgj+Dv4H9Ae4B0N9PSAMcDqaB0X57urmIs8AQ72SEnQ4+ABaBxWAJWAquENJ9BtdfANeCleBGcCv4NvgeuBv8AGwCm8FWlpbzOPw7wC7wFNgDngMvgpfAq2DCACF10ACHgaPAzIF2+PFwT2Th1P8OuO8FZ4MPggvAxWAp+A6VHe5ysILFvx7u6oF2+Wvg3g7uYvlT+TbC/TH4CdgCtoGtfW3/E2An8++Gu5eleR7uP8B+8BoLf4LFH6i23Vp1rB5a1Q7TGMeCUYYY18RcxF0gxT8H5b3dIw8X3iPkdxauPwQWgyVgWbVT30/h+mrwZan8r8L/FcEWVsJ/E1grpKXcwdLdI9y/H9cPgUerbbun0PadCHcbjQd+D55mafcx9y9wXwKvCLJUJiLdRH09ef4xupqE/KeCY8Bx4M3gbeBdYCE4G3wYXASWgGXgSibTcuaugHs9WA3WgNvBBha2Ee4D4GFNPTYL9x/D9XaJXwnXvwW7wDPgTzQd2A9eAwODhDTBCJgOZoETwEngtEFmF3DPAouY/0K4Swb9dbaMpbkS7nKP9CsCyrpOSrNK8K9kNnYL7q0DGwbb/XnjoDv3gQfBZvBz8GvwO/AHdr3Pkv4F4fplj3J79OgRBx8HypajR48ePXr06NGjx8HFv7pABhX/HRx7HqKjr9Y+y6PXg7X2WRoPm1Kzpz8CcWaweLPhHt/fPq95C65PZnmfDnchOLfWPo/7OLgQ15ewdJ+E++na2PMhyudw72bDGc01CP8aWAm+Dr4BVoHV4IZeWC+sF9YL64UlD1sD1oE7au0z0zK5p1YuZde/R49uJnYdez/62EPgkVr4c7pHkfYXivTbcW8n2A32gOekOH+F/5/gAOivE9IArXpbrmlwR+vljz9bJrV552RCvgQ2GXgRzJ9CyGVTxofdLd17Gv6jW4RcAG5ote/9FO4B8NZhQs4DN4O9kOFY6OFSsB48C/qGCFkAyERCzh9q+0WuA2sqHX4m+Smv4t6RjXYelItwvQ7sBtOahHwU3NYcn+5Q4pFmRz89evTocajxStM898/FfLSgrg8/sT5+zcLDTkXY+6S0C+E/l907SXO+Rt/Lujrxe1kmztPU70JDvSmXILwJWS9TxLuC3VtuycPGCoV+VfD41yvKW6W4d1O9/S5YtZ+Qtbi+k/m/D/eHYBPzb4G7DfyS+enZ42/qnXPFp+pjZdgD/yX0XcV6+93DF+H+G5AhtcxPIs/BoY5cg0g7RRGXx/8Ewo8Y6vhp/Bnwz2F5zId7CgunZ6Dv1uTF0585pNY7P9NdhPCPDI1Ncyn8l4OrwHKwguVB12WrNPnpoPW5BWluA3eCuxRl3cfyfFCom43NBjkeQ9h2Tzlzs7PL5CmD3UwHew26+KMm7AVHu8hJaL1fTtj29L3E/wi6oPvWvkY7bAjucKOYtpymKWdGo/3e5KxGR8YTGvmfZ4XW46RGmnMIG6excs6Ae46nPuh7pGXbvm/fOB91vLhRXvkmlkKuK8BnFTb8xYL6TyqugbzXJZCZ9tlVrO9+C+53G5134A8G1htsjdbvXoT/KEBPmwq04dS2v6UxNnxbAXV5gul4Z6J+tMtBZtv4+Qzy2Ndof+fwPHP/zsbg/QFz02tIM4B9ZRO0mp379NxxBpgD5gv3T8H16eAMcCZYxMIWw/2YEG8pri9n/qvgfr45fm67VtjPzmbpVrJ7NzL3VrjvF/Jdh+sN3M/cB+A+LOV/bVNdX13b0G9KtmrSHCo8jvqfGjFu7WiWP37E8s2+yv8ZwVbYRgvMAm9kvMkhjStzAZbIBGIR+ngAy2NSZ9f0Hv2bIIShCckU5k5sb+OdGGQ0BKqSPzeE1WFCgWXK5dO2rDD/COn9zTvEUfXJ4zT3c9DP2oH2+ZoAtc9RBr/mY0SLdGyap+Nxh6W0In2Sn5C8/W00c/7dXn63we1DtAHud9WZbFNimmFL2iIoqt8eDPQHptERIkNoO8prFVvblm13OaG6oGM+n7P4/RrRz2HdTktotxHFdZW5tvm72UWEtm9dQF6n++hU1FmVFL++L2Nsdt3/1IVrWaacda4Se91t+pHDVXF5HFd9pG7X14NNyePr6wkfPTRI+H6qDPvLqRM5DR2beZ8W95Divq0IWXXyy/d18Yq09ZhyY/fyPjafY37yta8ybD9l3W15+crXYhQ5rsj2Wkb7iDadon1c+tKI4p5NR6HjPl/vqvLm92uK8lTjWNntkwJTu9hkiJmHVf3S1V5UOii6PWL1nVqOkP5QI/b2L2o+Kqr/h9i0bHNl9HudnKn0btKBbZzItQ7n47Drmutg6P+ubZK7/5va0PU8XZS56DP4Isci07gUo3/fscdlfMyp6xR6dy0vt/275K1bJ8qkHI99bdK3v4vt4Gtzs7sEWa5aZH4NDz3yfWG368bXLlQ6GZYQ7/UL1y3mryroZ+nkZwK28SD1vlt+7sNd+lcR3Ji1RKq1WcvhftFzousYxftH7Ngu2pZubcGfD8eMizp5Y/uha/m69NNK5siSOapkcq2lTOOGvE4y9aPclFl20eXTvwoZO374ymob90Jx3Zfk2h/I849q7VNE+WXsj+ZFlJ96Xcd1PyD4ue2J69/Q9V+u9uPrQC7/sHRftjE+n+eQP2Ztl5Kc+0TX/WND8vP2iF23xO7lfO3XtKfLhUm/PE6Ze78RD/3Fknr8i907yWsoUx+M3S+0SNjcHyu7qg6+aYvqF671TLXfTzU+2uaTnOOzbFc+7yHoZE59npIL175kay/ZxlKMH6a+NSJdl90XKXytpbMpTr/kP5zJfqxQDzneYWTstxh9pPPdYJ/CL8alTBag+fFvHFXtQMutWxBloOUMMHS6GWSyVYS4pvgmexXtVjc/TFWk9ZnnZLt3+caI10/8Xkb+hsYlfeh+QOyPNQN1S7hv2nqivEVSj/Ex+1lu73Ib1olbu4jpfN4ddbWbHN+/mcpWfUem+g7RhK4833SuepHbN0d5PjKF1kUll3xPFc5d+btTW9uqdCHXwaQ7kw252ENIW9vKTdEfTLox+VPYT6r8XXUWq7tYuXyZnEAG+ic+pwyVdRLDp8wcOp0kEZNXzLyqw3f+yEkjMI1sFznk8ulDKcoKlcFVlz75qPyu9+U8YuvnqnfXNDn6t6neNr3xfHj4JEU500ma8SSkjjodptBlTLurbI7rTxUnhcxF6d9W76KRbd6G3DdVNj2qia/qD3KY2O90elLJocpHJc90Q7kqVLqaLlGUjYj+Pg00jD8Xk+Wnf5UAN8c8HGrvXKYi+4irnsoo09ctU29Fll2UraSyaxnTOar8DFw+w60St+cRNlzfm9E9y9CNUTZM5/7iOTWR6imOgaKf/pn6hJw/f8dDdS6u0tNhDN1ZOlGUoauTrqyQNvCd21Mjy8N/T7AixBkQrm3tRKS0tngDwrWYzobuLFwXV3WfP5uR9TGTXdvc3BRVjq18l3rbwmaS8c9QByR4m3Sb/lPVX2V/M4naDkV79GFmJDad2NaLOdpBpxsbvs+/YubgVPO5bn3h+75BahnEOU/EVb+yTL7vQeTQp04GH/twfTYaCv9ehe8XXdZ0Ic+IY94Hcik/9h0Zk35c7MdWXo737HM/y6dllPENj9zeuvq7vMMYam88fZnfU7nOHznf6/AdP+W8ffXv2q6uelDlE1N/Wx+Prb/MG8ARBVJ0eb7rz5Tf6sl5l/G9nizDnJLJudZoaNqU/hbsCPH73dhu+03aWPiZhW9/yLHf8IGvT1OtzwZJ56yG/7YvX5sSdn+yof6x5av2ebxcV1dOZ9pDVgSXys/36uLzG1s5Nvj7pKo9axm2zsueylxeT1lWlQ4rkuuzx5f3+VXPPGIhgbLnKp/rtiJdcz2lOtMpAtMZV27E/kRttyaF83dFbf3NdYwXx6sZpH0uVkZ/VslmOrspa24V1+O56u3TdmXpQdaJy36wLPm4LZVR7jyp/CLOmULtzeWZoqstuLS9rhzTmqwIe3LVia0f2OSP3c/71Ec8V0itv6JtONbOXdb3Oc5YdcTaQVFzRWg7+z6HydnHy+qPoWO+j1yq8anofifWl7ri97chNiq/z6KyM37t8333sJR/SF/3bUvd+z+8nV3KNPWfIvt3mfNZijFAZT8xfXSekLfOtl3rHCuPzxrEdT7U9UvRjn3HKV5/XTuo2i3n+E3L5L+3yN+TkH+z07ZGDlkviuXLcX3aL7b+8m+duhCzJonp/yF9wabPItZhJmJ/N8pVfvn31Fok7PeiYsalFON4bPnyuOO7Ru2G+S52fqB5DAt55bJtXf2LtJdQParCVevHlqcufduvKJuQ5yxxvA/Zw6W0l5D3+nz7a4wdieXxd+FS2SjPN7Z9XXDRp62/dMv4GTM22uwx1/iTe7zTUSfjf1Mqld36EHv2xvPoprMnGfGvIiDHk+/x+EQTP7fMOjl928f0/855OTnaJ5XeQsevVHNojO5147ePXLH681mDqOBhqef/Ivp+7PMF1Vxs02kMITLK30zp/k+FbX1RdP/w1b2OMt9hiR1bKLHfZ+XWT+4+ahqzVM8iUug81r5tfTf3+JB6DPFpk1zllLUu9523cpPLdlR6zTVP+bShGFd1lh/Td33rVdT44WqTtjqktOtc87osc8x5hM9vyLrK49v+Pvmp7De0/vyvLJvk1C3+1OOyLyG/aSSud1L/TlLq/BoZ5M2xNj66IFRlT9fcT4GqDYosQ3df/G0zlR5U4UVzjAJZPpW8NlLI5lOejzwq+eS4rnWZbsjTx7ZUrq4sXdrQPmAa82Pb0HVuyZl3rrrZ7Nal/ULzdy0zBUXrMaQcU18v6ncmxd9eM/1fkdQ24Tvu+paZ2q5S6z13+anlTyVfrv4aWz/desfFfn3WEj727rNGKHJdlqsM1VompjzT+shXv7F75dj3J3K3qY7QM7DcZ2L/Aw==")),pA=function(xA){switch(xA){case Q:case v:case E:case D:return p;case S:return w;default:return xA}},cA=function(xA){switch(xA){case a:case g:return l;case C:return u;default:return xA}},gA=function(xA,_){void 0===_&&(_=!1),this.position=xA,this.required=_};Y.exports=function(){function yA(_){this.string=_,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null,this.LB8a=!1,this.LB21a=!1,this.LB30a=0}var xA=yA.prototype;return xA.nextCodePoint=function(){var MA=this.string.charCodeAt(this.pos++),uA=this.string.charCodeAt(this.pos);return 55296<=MA&&MA<=56319&&56320<=uA&&uA<=57343?(this.pos++,1024*(MA-55296)+(uA-56320)+65536):MA},xA.nextCharClass=function(){return pA(lA.get(this.nextCodePoint()))},xA.getSimpleBreak=function(){switch(this.nextClass){case C:return!1;case l:case a:case g:return this.curClass=l,!1;case h:return this.curClass=h,!1}return null},xA.getPairTableBreak=function(MA){var uA=!1;switch(aA[this.curClass][this.nextClass]){case T:uA=!0;break;case F:uA=MA===C;break;case R:if(!(uA=MA===C))return!1;break;case L:if(MA!==C)return uA}return this.LB8a&&(uA=!1),!this.LB21a||this.curClass!==B&&this.curClass!==f?this.LB21a=this.curClass===m:(uA=!1,this.LB21a=!1),this.curClass===d?(this.LB30a++,2==this.LB30a&&this.nextClass===d&&(uA=!0,this.LB30a=0)):this.LB30a=0,this.curClass=this.nextClass,uA},xA.nextBreak=function(){if(null==this.curClass){var MA=this.nextCharClass();this.curClass=cA(MA),this.nextClass=MA,this.LB8a=MA===e,this.LB30a=0}for(;this.pos=ZA)return $;switch($){case"%s":return String(bA[SA++]);case"%d":return Number(bA[SA++]);case"%j":try{return JSON.stringify(bA[SA++])}catch(W){return"[Circular]"}default:return $}}),J=bA[SA];SA=3&&(SA.depth=arguments[2]),arguments.length>=4&&(SA.colors=arguments[3]),m(QA)?SA.showHidden=QA:QA&&I._extend(SA,QA),F(SA.showHidden)&&(SA.showHidden=!1),F(SA.depth)&&(SA.depth=2),F(SA.colors)&&(SA.colors=!1),F(SA.customInspect)&&(SA.customInspect=!0),SA.colors&&(SA.stylize=E),e(SA,uA,SA.depth)}function E(uA,QA){var SA=g.styles[QA];return SA?"\x1b["+g.colors[SA][0]+"m"+uA+"\x1b["+g.colors[SA][1]+"m":uA}function u(uA,QA){return uA}function e(uA,QA,SA){if(uA.customInspect&&QA&&AA(QA.inspect)&&QA.inspect!==I.inspect&&(!QA.constructor||QA.constructor.prototype!==QA)){var bA=QA.inspect(SA,uA);return U(bA)||(bA=e(uA,bA,SA)),bA}var ZA=function f(uA,QA){if(F(QA))return uA.stylize("undefined","undefined");if(U(QA)){var SA="'"+JSON.stringify(QA).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return uA.stylize(SA,"string")}return D(QA)?uA.stylize(""+QA,"number"):m(QA)?uA.stylize(""+QA,"boolean"):d(QA)?uA.stylize("null","null"):void 0}(uA,QA);if(ZA)return ZA;var q=Object.keys(QA),J=function C(uA){var QA={};return uA.forEach(function(SA,bA){QA[SA]=!0}),QA}(q);if(uA.showHidden&&(q=Object.getOwnPropertyNames(QA)),aA(QA)&&(q.indexOf("message")>=0||q.indexOf("description")>=0))return B(QA);if(0===q.length){if(AA(QA))return uA.stylize("[Function"+(QA.name?": "+QA.name:"")+"]","special");if(R(QA))return uA.stylize(RegExp.prototype.toString.call(QA),"regexp");if(Z(QA))return uA.stylize(Date.prototype.toString.call(QA),"date");if(aA(QA))return B(QA)}var EA,W="",hA=!1,vA=["{","}"];return S(QA)&&(hA=!0,vA=["[","]"]),AA(QA)&&(W=" [Function"+(QA.name?": "+QA.name:"")+"]"),R(QA)&&(W=" "+RegExp.prototype.toString.call(QA)),Z(QA)&&(W=" "+Date.prototype.toUTCString.call(QA)),aA(QA)&&(W=" "+B(QA)),0!==q.length||hA&&0!=QA.length?SA<0?R(QA)?uA.stylize(RegExp.prototype.toString.call(QA),"regexp"):uA.stylize("[Object]","special"):(uA.seen.push(QA),EA=hA?function w(uA,QA,SA,bA,ZA){for(var q=[],J=0,$=QA.length;J<$;++J)yA(QA,String(J))?q.push(Q(uA,QA,SA,bA,String(J),!0)):q.push("");return ZA.forEach(function(W){W.match(/^\d+$/)||q.push(Q(uA,QA,SA,bA,W,!0))}),q}(uA,QA,SA,J,q):q.map(function(GA){return Q(uA,QA,SA,J,GA,hA)}),uA.seen.pop(),function p(uA,QA,SA){return uA.reduce(function(q,J){return J.indexOf("\n"),q+J.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?SA[0]+(""===QA?"":QA+"\n ")+" "+uA.join(",\n ")+" "+SA[1]:SA[0]+QA+" "+uA.join(", ")+" "+SA[1]}(EA,W,vA)):vA[0]+W+vA[1]}function B(uA){return"["+Error.prototype.toString.call(uA)+"]"}function Q(uA,QA,SA,bA,ZA,q){var J,$,W;if((W=Object.getOwnPropertyDescriptor(QA,ZA)||{value:QA[ZA]}).get?$=uA.stylize(W.set?"[Getter/Setter]":"[Getter]","special"):W.set&&($=uA.stylize("[Setter]","special")),yA(bA,ZA)||(J="["+ZA+"]"),$||(uA.seen.indexOf(W.value)<0?($=d(SA)?e(uA,W.value,null):e(uA,W.value,SA-1)).indexOf("\n")>-1&&($=q?$.split("\n").map(function(hA){return" "+hA}).join("\n").substr(2):"\n"+$.split("\n").map(function(hA){return" "+hA}).join("\n")):$=uA.stylize("[Circular]","special")),F(J)){if(q&&ZA.match(/^\d+$/))return $;(J=JSON.stringify(""+ZA)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(J=J.substr(1,J.length-2),J=uA.stylize(J,"name")):(J=J.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),J=uA.stylize(J,"string"))}return J+": "+$}function S(uA){return Array.isArray(uA)}function m(uA){return"boolean"==typeof uA}function d(uA){return null===uA}function D(uA){return"number"==typeof uA}function U(uA){return"string"==typeof uA}function F(uA){return void 0===uA}function R(uA){return L(uA)&&"[object RegExp]"===pA(uA)}function L(uA){return"object"==typeof uA&&null!==uA}function Z(uA){return L(uA)&&"[object Date]"===pA(uA)}function aA(uA){return L(uA)&&("[object Error]"===pA(uA)||uA instanceof Error)}function AA(uA){return"function"==typeof uA}function pA(uA){return Object.prototype.toString.call(uA)}function cA(uA){return uA<10?"0"+uA.toString(10):uA.toString(10)}I.debuglog=function(uA){if(uA=uA.toUpperCase(),!l[uA])if(h.test(uA)){var QA=c.pid;l[uA]=function(){var SA=I.format.apply(I,arguments);console.error("%s %d: %s",uA,QA,SA)}}else l[uA]=function(){};return l[uA]},I.inspect=g,g.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},g.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},I.types=n(5955),I.isArray=S,I.isBoolean=m,I.isNull=d,I.isNullOrUndefined=function v(uA){return null==uA},I.isNumber=D,I.isString=U,I.isSymbol=function T(uA){return"symbol"==typeof uA},I.isUndefined=F,I.isRegExp=R,I.types.isRegExp=R,I.isObject=L,I.isDate=Z,I.types.isDate=Z,I.isError=aA,I.types.isNativeError=aA,I.isFunction=AA,I.isPrimitive=function lA(uA){return null===uA||"boolean"==typeof uA||"number"==typeof uA||"string"==typeof uA||"symbol"==typeof uA||void 0===uA},I.isBuffer=n(384);var gA=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function BA(){var uA=new Date,QA=[cA(uA.getHours()),cA(uA.getMinutes()),cA(uA.getSeconds())].join(":");return[uA.getDate(),gA[uA.getMonth()],QA].join(" ")}function yA(uA,QA){return Object.prototype.hasOwnProperty.call(uA,QA)}I.log=function(){console.log("%s - %s",BA(),I.format.apply(I,arguments))},I.inherits=n(5717),I._extend=function(uA,QA){if(!QA||!L(QA))return uA;for(var SA=Object.keys(QA),bA=SA.length;bA--;)uA[SA[bA]]=QA[SA[bA]];return uA};var xA="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function _(uA,QA){if(!uA){var SA=new Error("Promise was rejected with a falsy value");SA.reason=uA,uA=SA}return QA(uA)}I.promisify=function(QA){if("function"!=typeof QA)throw new TypeError('The "original" argument must be of type Function');if(xA&&QA[xA]){var SA;if("function"!=typeof(SA=QA[xA]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(SA,xA,{value:SA,enumerable:!1,writable:!1,configurable:!0}),SA}function SA(){for(var bA,ZA,q=new Promise(function(W,hA){bA=W,ZA=hA}),J=[],$=0;$1?D.attr[v[1]]:D.val},i.prototype.toString=function(d){return this.toStringWithIndent("",d)},i.prototype.toStringWithIndent=function(d,v){var D=d+"<"+this.name,U=v&&v.compressed?"":"\n";for(var F in this.attr)Object.prototype.hasOwnProperty.call(this.attr,F)&&(D+=" "+F+'="'+S(this.attr[F])+'"');if(1===this.children.length&&"element"!==this.children[0].type)D+=">"+this.children[0].toString(v)+"";else if(this.children.length){D+=">"+U;for(var R=d+(v&&v.compressed?"":" "),L=0,Z=this.children.length;L"}else v&&v.html?-1!==["area","base","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"].indexOf(this.name)?D+="/>":D+=">":D+="/>";return D},o.prototype.toString=function(d){return m(S(this.text),d)},o.prototype.toStringWithIndent=function(d,v){return d+this.toString(v)},l.prototype.toString=function(d){return""},l.prototype.toStringWithIndent=function(d,v){return d+this.toString(v)},h.prototype.toString=function(d){return"\x3c!--"+m(S(this.comment),d)+"--\x3e"},h.prototype.toStringWithIndent=function(d,v){return d+this.toString(v)},i.prototype.type="element",o.prototype.type="text",l.prototype.type="cdata",h.prototype.type="comment",function p(d,v){for(var D in v)v.hasOwnProperty(D)&&(d[D]=v[D])}(a.prototype,i.prototype),a.prototype._opentag=function(d){void 0===this.children?i.call(this,d):i.prototype._opentag.apply(this,arguments)},a.prototype._doctype=function(d){this.doctype+=d};var g=null;function u(){g[0]&&g[0]._opentag.apply(g[0],arguments)}function C(){g[0]&&g[0]._closetag.apply(g[0],arguments)}function e(){g[0]&&g[0]._text.apply(g[0],arguments)}function f(){g[0]&&g[0]._cdata.apply(g[0],arguments)}function B(){g[0]&&g[0]._comment.apply(g[0],arguments)}function w(){g[0]&&g[0]._doctype.apply(g[0],arguments)}function Q(){g[0]&&g[0]._error.apply(g[0],arguments)}function S(d){return d.toString().replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")}function m(d,v){var D=d;return v&&v.trimmed&&d.length>25&&(D=D.substring(0,25).trim()+"\u2026"),v&&v.preserveWhitespace||(D=D.trim()),D}Y.exports&&!n.g.xmldocAssumeBrowser?Y.exports.XmlDocument=a:this.XmlDocument=a}()},6255:function(Y,I,n){"use strict";"undefined"!=typeof window&&!window.Promise&&n(3867),n(4667);function i(o){this.fs=o,this.resolving={}}i.prototype.resolve=function(o,l){if(!this.resolving[o]){var h=this;this.resolving[o]=new Promise(function(a,g){0===o.toLowerCase().indexOf("https://")||0===o.toLowerCase().indexOf("http://")?function(o,l){return new Promise(function(h,a){var g=new XMLHttpRequest;for(var E in g.open("GET",o,!0),l)g.setRequestHeader(E,l[E]);g.responseType="arraybuffer",g.onreadystatechange=function(){4===g.readyState&&(g.status>=200&&g.status<300||setTimeout(function(){a(new TypeError('Failed to fetch (url: "'+o+'")'))},0))},g.onload=function(){g.status>=200&&g.status<300&&h(g.response)},g.onerror=function(){setTimeout(function(){a(new TypeError('Network request failed (url: "'+o+'")'))},0)},g.ontimeout=function(){setTimeout(function(){a(new TypeError('Network request failed (url: "'+o+'")'))},0)},g.send()})}(o,l).then(function(E){h.fs.writeFileSync(o,E),a()},function(E){g(E)}):a()})}return this.resolving[o]},i.prototype.resolved=function(){var o=this;return new Promise(function(l,h){Promise.all(Object.values(o.resolving)).then(function(){l()},function(a){h(a)})})},Y.exports=i},4275:function(Y,I,n){"use strict";var c=n(8823).Buffer,i=n(6225).isFunction,o=n(6225).isUndefined,a=(n(6225),n(1818).saveAs),g={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}};function E(C,e,f,B){this.docDefinition=C,this.tableLayouts=e||null,this.fonts=f||g,this.vfs=B}E.prototype._createDoc=function(C,e){var f=function(U){return"object"==typeof U?{url:U.url,headers:U.headers}:{url:U,headers:{}}};C=C||{},this.tableLayouts&&(C.tableLayouts=this.tableLayouts);var w=new(n(8617))(this.fonts);if(n(3857).bindFS(this.vfs),!i(e))return w.createPdfKitDocument(this.docDefinition,C);var S=new(n(6255))(n(3857));for(var m in this.fonts)if(this.fonts.hasOwnProperty(m)){if(this.fonts[m].normal){var d=f(this.fonts[m].normal);S.resolve(d.url,d.headers),this.fonts[m].normal=d.url}this.fonts[m].bold&&(d=f(this.fonts[m].bold),S.resolve(d.url,d.headers),this.fonts[m].bold=d.url),this.fonts[m].italics&&(d=f(this.fonts[m].italics),S.resolve(d.url,d.headers),this.fonts[m].italics=d.url),this.fonts[m].bolditalics&&(d=f(this.fonts[m].bolditalics),S.resolve(d.url,d.headers),this.fonts[m].bolditalics=d.url)}if(this.docDefinition.images)for(var v in this.docDefinition.images)this.docDefinition.images.hasOwnProperty(v)&&(d=f(this.docDefinition.images[v]),S.resolve(d.url,d.headers),this.docDefinition.images[v]=d.url);var D=this;S.resolved().then(function(){var U=w.createPdfKitDocument(D.docDefinition,C);e(U)},function(U){throw U})},E.prototype._flushDoc=function(C,e){var B,f=[];C.on("readable",function(){for(var w;null!==(w=C.read(9007199254740991));)f.push(w)}),C.on("end",function(){B=c.concat(f),e(B,C._pdfMakePages)}),C.end()},E.prototype._getPages=function(C,e){if(!e)throw"_getPages is an async method and needs a callback argument";var f=this;this._createDoc(C,function(B){f._flushDoc(B,function(w,Q){e(Q)})})},E.prototype._bufferToBlob=function(C){var e;try{e=new Blob([C],{type:"application/pdf"})}catch(B){if("InvalidStateError"===B.name){var f=new Uint8Array(C);e=new Blob([f.buffer],{type:"application/pdf"})}}if(!e)throw"Could not generate blob";return e},E.prototype._openWindow=function(){var C=window.open("","_blank");if(null===C)throw"Open PDF in new window blocked by browser";return C},E.prototype._openPdf=function(C,e){e||(e=this._openWindow());try{this.getBlob(function(f){var w=(window.URL||window.webkitURL).createObjectURL(f);e.location.href=w},C)}catch(f){throw e.close(),f}},E.prototype.open=function(C,e){(C=C||{}).autoPrint=!1,this._openPdf(C,e=e||null)},E.prototype.print=function(C,e){(C=C||{}).autoPrint=!0,this._openPdf(C,e=e||null)},E.prototype.download=function(C,e,f){i(C)&&(o(e)||(f=e),e=C,C=null),C=C||"file.pdf",this.getBlob(function(B){a(B,C),i(e)&&e()},f)},E.prototype.getBase64=function(C,e){if(!C)throw"getBase64 is an async method and needs a callback argument";this.getBuffer(function(f){C(f.toString("base64"))},e)},E.prototype.getDataUrl=function(C,e){if(!C)throw"getDataUrl is an async method and needs a callback argument";this.getBuffer(function(f){C("data:application/pdf;base64,"+f.toString("base64"))},e)},E.prototype.getBlob=function(C,e){if(!C)throw"getBlob is an async method and needs a callback argument";var f=this;this.getBuffer(function(B){var w=f._bufferToBlob(B);C(w)},e)},E.prototype.getBuffer=function(C,e){if(!C)throw"getBuffer is an async method and needs a callback argument";var f=this;this._createDoc(e,function(B){f._flushDoc(B,function(w){C(w)})})},E.prototype.getStream=function(C,e){if(!i(e))return this._createDoc(C);this._createDoc(C,function(B){e(B)})},Y.exports={createPdf:function(C,e,f,B){if(!function u(){try{var C=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(C,e),42===C.foo()}catch(f){return!1}}())throw"Your browser does not provide the level of support needed";return new E(C,e||n.g.pdfMake.tableLayouts,f||n.g.pdfMake.fonts,B||n.g.pdfMake.vfs)}}},3857:function(Y,I,n){"use strict";var i=n(8823).Buffer;function o(){this.fileSystem={},this.dataSystem={}}function l(h){return 0===h.indexOf("/")&&(h=h.substring("/".length)),0===h.indexOf("/")&&(h=h.substring(1)),h}o.prototype.existsSync=function(h){return h=l(h),void 0!==this.fileSystem[h]||void 0!==this.dataSystem[h]},o.prototype.readFileSync=function(h,a){h=l(h);var g=this.dataSystem[h];if("string"==typeof g&&"utf8"===a)return g;if(g)return new i(g,"string"==typeof g?"base64":void 0);var E=this.fileSystem[h];if(E)return E;throw"File '"+h+"' not found in virtual file system"},o.prototype.writeFileSync=function(h,a){this.fileSystem[l(h)]=a},o.prototype.bindFS=function(h){this.dataSystem=h||{}},Y.exports=new o},4498:function(Y,I,n){"use strict";var c=n(6225).isString;function o(a){return"auto"===a.width}function l(a){return null==a.width||"*"===a.width||"star"===a.width}Y.exports={buildColumnWidths:function i(a,g){var E=[],u=0,C=0,e=[],f=0,B=0,w=[],Q=g;a.forEach(function(D){o(D)?(E.push(D),u+=D._minWidth,C+=D._maxWidth):l(D)?(e.push(D),f=Math.max(f,D._minWidth),B=Math.max(B,D._maxWidth)):w.push(D)}),w.forEach(function(D){c(D.width)&&/\d+%/.test(D.width)&&(D.width=parseFloat(D.width)*Q/100),D._calcWidth=D.width=g)E.forEach(function(D){D._calcWidth=D._minWidth}),e.forEach(function(D){D._calcWidth=f});else{if(S0){var v=g/e.length;e.forEach(function(D){D._calcWidth=v})}}},measureMinMax:function h(a){for(var g={min:0,max:0},E={min:0,max:0},u=0,C=0,e=a.length;C=0;R--){var Z=w.styleStack.styleDictionary[T[R]];for(var aA in Z)Z.hasOwnProperty(aA)&&(F[aA]=Z[aA])}return F}function d(T){return h(T)?T=[T,T,T,T]:g(T)&&2===T.length&&(T=[T[0],T[1],T[0],T[1]]),T}var v=[void 0,void 0,void 0,void 0];if(B.style){var U=m(g(B.style)?B.style:[B.style]);U&&(v=S(U,v)),U.margin&&(v=d(U.margin))}return v=S(B,v),B.margin&&(v=d(B.margin)),void 0===v[0]&&void 0===v[1]&&void 0===v[2]&&void 0===v[3]?null:v}(),B.columns)return Q(w.measureColumns(B));if(B.stack)return Q(w.measureVerticalContainer(B));if(B.ul)return Q(w.measureUnorderedList(B));if(B.ol)return Q(w.measureOrderedList(B));if(B.table)return Q(w.measureTable(B));if(void 0!==B.text)return Q(w.measureLeaf(B));if(B.toc)return Q(w.measureToc(B));if(B.image)return Q(w.measureImage(B));if(B.svg)return Q(w.measureSVG(B));if(B.canvas)return Q(w.measureCanvas(B));if(B.qr)return Q(w.measureQr(B));throw"Unrecognized document structure: "+JSON.stringify(B,E)});function Q(S){var m=S._margin;return m&&(S._minWidth+=m[0]+m[2],S._maxWidth+=m[0]+m[2]),S}},f.prototype.convertIfBase64Image=function(B){if(/^data:image\/(jpeg|jpg|png);base64,/.test(B.image)){var w="$$pdfmake$$"+this.autoImageIndex++;this.images[w]=B.image,B.image=w}},f.prototype.measureImageWithDimensions=function(B,w){if(B.fit){var Q=w.width/w.height>B.fit[0]/B.fit[1]?B.fit[0]/w.width:B.fit[1]/w.height;B._width=B._minWidth=B._maxWidth=w.width*Q,B._height=w.height*Q}else B._width=B._minWidth=B._maxWidth=B.width||w.width,B._height=B.height||w.height*B._width/w.width,h(B.maxWidth)&&B.maxWidthB._width&&(B._width=B._minWidth=B._maxWidth=B.minWidth,B._height=B._width*w.height/w.width),h(B.minHeight)&&B.minHeight>B._height&&(B._height=B.minHeight,B._width=B._minWidth=B._maxWidth=B._height*w.width/w.height);B._alignment=this.styleStack.getProperty("alignment")},f.prototype.measureImage=function(B){this.images&&this.convertIfBase64Image(B);var w=this.imageMeasure.measureImage(B.image);return this.measureImageWithDimensions(B,w),B},f.prototype.measureSVG=function(B){var w=this.svgMeasure.measureSVG(B.svg);return this.measureImageWithDimensions(B,w),B.font=this.styleStack.getProperty("font"),B.svg=this.svgMeasure.writeDimensions(B.svg,{width:B._width,height:B._height}),B},f.prototype.measureLeaf=function(B){B._textRef&&B._textRef._textNodeRef.text&&(B.text=B._textRef._textNodeRef.text);var w=this.styleStack.clone();w.push(B);var Q=this.textTools.buildInlines(B.text,w);return B._inlines=Q.items,B._minWidth=Q.minWidth,B._maxWidth=Q.maxWidth,B},f.prototype.measureToc=function(B){if(B.toc.title&&(B.toc.title=this.measureNode(B.toc.title)),B.toc._items.length>0){for(var w=[],Q=B.toc.textStyle||{},p=B.toc.numberStyle||Q,S=B.toc.textMargin||[0,0,0,0],m=0,d=B.toc._items.length;m=26?F((R/26>>0)-1):"")+"abcdefghijklmnopqrstuvwxyz"[R%26>>0]}(T-1)}function m(T){if(T<1||T>4999)return T.toString();var Z,F=T,R={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},L="";for(Z in R)for(;F>=R[Z];)L+=Z,F-=R[Z];return L}var v;switch(Q){case"none":v=null;break;case"upper-alpha":v=S(B).toUpperCase();break;case"lower-alpha":v=S(B);break;case"upper-roman":v=m(B);break;case"lower-roman":v=m(B).toLowerCase();break;default:v=function d(T){return T.toString()}(B)}if(null===v)return{};p&&(g(p)?(p[0]&&(v=p[0]+v),p[1]&&(v+=p[1]),v+=" "):v+=p+" ");var D={text:v},U=w.getProperty("markerColor");return U&&(D.color=U),{_inlines:this.textTools.buildInlines(D,w).items}},f.prototype.measureUnorderedList=function(B){var w=this.styleStack.clone(),Q=B.ul;B.type=B.type||"disc",B._gapSize=this.gapSizeForList(),B._minWidth=0,B._maxWidth=0;for(var p=0,S=Q.length;p0?w.length-1:0;return B._minWidth=S.min+B._gap*m,B._maxWidth=S.max+B._gap*m,B},f.prototype.measureTable=function(B){(function lA(pA){if(pA.table.widths||(pA.table.widths="auto"),l(pA.table.widths))for(pA.table.widths=[pA.table.widths];pA.table.widths.length1?(aA(v,Q,D.colSpan),w.push({col:Q,span:D.colSpan,minWidth:D._minWidth,maxWidth:D._maxWidth})):(d._minWidth=Math.max(d._minWidth,D._minWidth),d._maxWidth=Math.max(d._maxWidth,D._maxWidth))),D.rowSpan&&D.rowSpan>1&&AA(B.table,p,Q,D.rowSpan)}}!function L(){for(var pA,cA,gA=0,BA=w.length;gA0)for(pA=_/yA.span,cA=0;cA0)for(pA=MA/yA.span,cA=0;cAE.page?g:E.page>g.page?E:g.y>E.y?g:E).page,x:u.x,y:u.y,availableHeight:u.availableHeight,availableWidth:u.availableWidth}}(this,g.bottomMost)},o.prototype.markEnding=function(g){this.page=g._columnEndingContext.page,this.x=g._columnEndingContext.x,this.y=g._columnEndingContext.y,this.availableWidth=g._columnEndingContext.availableWidth,this.availableHeight=g._columnEndingContext.availableHeight,this.lastColumnWidth=g._columnEndingContext.lastColumnWidth},o.prototype.saveContextInEndingCell=function(g){g._columnEndingContext={page:this.page,x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,lastColumnWidth:this.lastColumnWidth}},o.prototype.completeColumnGroup=function(g){var E=this.snapshots.pop();this.calculateBottomMost(E),this.endingCell=null,this.x=E.x;var u=E.bottomMost.y;g&&(E.page===E.bottomMost.page?E.y+g>u&&(u=E.y+g):u+=g),this.y=u,this.page=E.bottomMost.page,this.availableWidth=E.availableWidth,this.availableHeight=E.bottomMost.availableHeight,g&&(this.availableHeight-=u-E.bottomMost.y),this.lastColumnWidth=E.lastColumnWidth},o.prototype.addMargin=function(g,E){this.x+=g,this.availableWidth-=g+(E||0)},o.prototype.moveDown=function(g){return this.y+=g,this.availableHeight-=g,this.availableHeight>0},o.prototype.initializePage=function(){this.y=this.pageMargins.top,this.availableHeight=this.getCurrentPage().pageSize.height-this.pageMargins.top-this.pageMargins.bottom,this.pageSnapshot().availableWidth=this.getCurrentPage().pageSize.width-this.pageMargins.left-this.pageMargins.right},o.prototype.pageSnapshot=function(){return this.snapshots[0]?this.snapshots[0]:this},o.prototype.moveTo=function(g,E){null!=g&&(this.x=g,this.availableWidth=this.getCurrentPage().pageSize.width-this.x-this.pageMargins.right),null!=E&&(this.y=E,this.availableHeight=this.getCurrentPage().pageSize.height-this.y-this.pageMargins.bottom)},o.prototype.moveToRelative=function(g,E){null!=g&&(this.x=this.x+g),null!=E&&(this.y=this.y+E)},o.prototype.beginDetachedBlock=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth})},o.prototype.endDetachedBlock=function(){var g=this.snapshots.pop();this.x=g.x,this.y=g.y,this.availableWidth=g.availableWidth,this.availableHeight=g.availableHeight,this.page=g.page,this.endingCell=g.endingCell,this.lastColumnWidth=g.lastColumnWidth};var h=function(g,E){return(E=function l(g,E){return void 0===g?E:i(g)&&"landscape"===g.toLowerCase()?"landscape":"portrait"}(E,g.pageSize.orientation))!==g.pageSize.orientation?{orientation:E,width:g.pageSize.height,height:g.pageSize.width}:{orientation:g.pageSize.orientation,width:g.pageSize.width,height:g.pageSize.height}};o.prototype.moveToNextPage=function(g){var E=this.page+1,u=this.page,C=this.y,e=E>=this.pages.length;if(e){var f=this.availableWidth,B=this.getCurrentPage().pageSize.orientation,w=h(this.getCurrentPage(),g);this.addPage(w),B===w.orientation&&(this.availableWidth=f)}else this.page=E,this.initializePage();return{newPageCreated:e,prevPage:u,prevY:C,y:this.y}},o.prototype.addPage=function(g){var E={items:[],pageSize:g};return this.pages.push(E),this.backgroundLength.push(0),this.page=this.pages.length-1,this.initializePage(),this.tracker.emit("pageAdded"),E},o.prototype.getCurrentPage=function(){return this.page<0||this.page>=this.pages.length?null:this.pages[this.page]},o.prototype.getCurrentPosition=function(){var g=this.getCurrentPage().pageSize,E=g.height-this.pageMargins.top-this.pageMargins.bottom,u=g.width-this.pageMargins.left-this.pageMargins.right;return{pageNumber:this.page+1,pageOrientation:g.orientation,pageInnerHeight:E,pageInnerWidth:u,left:this.x,top:this.y,verticalRatio:(this.y-this.pageMargins.top)/E,horizontalRatio:(this.x-this.pageMargins.left)/u}},Y.exports=o},1196:function(Y,I,n){"use strict";var c=n(4775),i=n(6225).isNumber,o=n(6225).pack,l=n(6225).offsetVector,h=n(3858);function a(u,C){this.context=u,this.contextStack=[],this.tracker=C}function g(u,C,e){null==e||e<0||e>u.items.length?u.items.push(C):u.items.splice(e,0,C)}a.prototype.addLine=function(u,C,e){var f=u.getHeight(),B=this.context,w=B.getCurrentPage(),Q=this.getCurrentPositionOnPage();return!(B.availableHeight0&&u.inlines[0].alignment,B=0;switch(f){case"right":B=C-e;break;case"center":B=(C-e)/2}if(B&&(u.x=(u.x||0)+B),"justify"===f&&!u.newLineForced&&!u.lastLineInParagraph&&u.inlines.length>1)for(var w=(C-e)/(u.inlines.length-1),Q=1,p=u.inlines.length;Q0)&&(void 0===u._x&&(u._x=u.x||0),u.x=f.x+u._x,u.y=f.y,this.alignImage(u),g(B,{type:e||"image",item:u},C),f.moveDown(u._height),w)},a.prototype.addSVG=function(u,C){return this.addImage(u,C,"svg")},a.prototype.addQr=function(u,C){var e=this.context,f=e.getCurrentPage(),B=this.getCurrentPositionOnPage();if(!f||void 0===u.absolutePosition&&e.availableHeightB.availableHeight||(u.items.forEach(function(Q){switch(Q.type){case"line":var p=function E(u){var C=new c(u.maxWidth);for(var e in u)u.hasOwnProperty(e)&&(C[e]=u[e]);return C}(Q.item);p._node&&(p._node.positions[0].pageNumber=B.page+1),p.x=(p.x||0)+(C?u.xOffset||0:B.x),p.y=(p.y||0)+(e?u.yOffset||0:B.y),w.items.push({type:"line",item:p});break;case"vector":var S=o(Q.item);l(S,C?u.xOffset||0:B.x,e?u.yOffset||0:B.y),w.items.push({type:"vector",item:S});break;case"image":case"svg":var m=o(Q.item);m.x=(m.x||0)+(C?u.xOffset||0:B.x),m.y=(m.y||0)+(e?u.yOffset||0:B.y),w.items.push({type:Q.type,item:m})}}),f||B.moveDown(u.height),0))},a.prototype.pushContext=function(u,C){void 0===u&&(C=this.context.getCurrentPage().height-this.context.pageMargins.top-this.context.pageMargins.bottom,u=this.context.availableWidth),i(u)&&(u=new h({width:u,height:C},{left:0,right:0,top:0,bottom:0})),this.contextStack.push(this.context),this.context=u},a.prototype.popContext=function(){this.context=this.contextStack.pop()},a.prototype.getCurrentPositionOnPage=function(){return(this.contextStack[0]||this.context).getCurrentPosition()},Y.exports=a},2249:function(Y,I,n){"use strict";var c=n(6225).isArray;function o(l,h){for(var a in this.fonts={},this.pdfKitDoc=h,this.fontCache={},l)if(l.hasOwnProperty(a)){var g=l[a];this.fonts[a]={normal:g.normal,bold:g.bold,italics:g.italics,bolditalics:g.bolditalics}}}o.prototype.getFontType=function(l,h){return function i(l,h){var a="normal";return l&&h?a="bolditalics":l?a="bold":h&&(a="italics"),a}(l,h)},o.prototype.getFontFile=function(l,h,a){var g=this.getFontType(h,a);return this.fonts[l]&&this.fonts[l][g]?this.fonts[l][g]:null},o.prototype.provideFont=function(l,h,a){var g=this.getFontType(h,a);if(null===this.getFontFile(l,h,a))throw new Error("Font '"+l+"' in style '"+g+"' is not defined in the font section of the document definition.");if(this.fontCache[l]=this.fontCache[l]||{},!this.fontCache[l][g]){var E=this.fonts[l][g];c(E)||(E=[E]),this.fontCache[l][g]=this.pdfKitDoc.font.apply(this.pdfKitDoc,E)._font}return this.fontCache[l][g]},Y.exports=o},6225:function(Y){"use strict";function i(B){return Array.isArray(B)}Y.exports={isString:function I(B){return"string"==typeof B||B instanceof String},isNumber:function n(B){return"number"==typeof B||B instanceof Number},isBoolean:function c(B){return"boolean"==typeof B},isArray:i,isFunction:function o(B){return"function"==typeof B},isObject:function l(B){return null!==B&&"object"==typeof B},isNull:function h(B){return null===B},isUndefined:function a(B){return void 0===B},pack:function g(){for(var B={},w=0,Q=arguments.length;w0})).forEach(function(W){var hA={};["id","text","ul","ol","table","image","qr","canvas","svg","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"].forEach(function(vA){void 0!==W[vA]&&(hA[vA]=W[vA])}),hA.startPosition=W.positions[0],hA.pageNumbers=Array.from(new Set(W.positions.map(function(vA){return vA.pageNumber}))),hA.pages=MA.length,hA.stack=C(W.stack),W.nodeInfo=hA});for(var uA=0;uA<_.length;uA++){var QA=_[uA];if("before"!==QA.pageBreak&&!QA.pageBreakCalculated){QA.pageBreakCalculated=!0;var SA=QA.nodeInfo.pageNumbers[0],bA=[],ZA=[],q=[];if(gA.length>1)for(var J=uA+1,$=_.length;J<$;J++)_[J].nodeInfo.pageNumbers.indexOf(SA)>-1&&bA.push(_[J].nodeInfo),gA.length>2&&_[J].nodeInfo.pageNumbers.indexOf(SA+1)>-1&&ZA.push(_[J].nodeInfo);if(gA.length>3)for(J=0;J-1&&q.push(_[J].nodeInfo);if(gA(QA.nodeInfo,bA,ZA,q))return QA.pageBreak="before",!0}}return!1}this.docPreprocessor=new i,this.docMeasure=new o(R,L,Z,this.imageMeasure,this.svgMeasure,this.tableLayouts,pA);for(var xA=this.tryLayoutDocument(F,R,L,Z,aA,AA,lA,pA,cA);BA(xA.linearNodeList,xA.pages);)xA.linearNodeList.forEach(function(MA){MA.resetXY()}),xA=this.tryLayoutDocument(F,R,L,Z,aA,AA,lA,pA,cA);return xA.pages},U.prototype.tryLayoutDocument=function(F,R,L,Z,aA,AA,lA,pA,cA,gA){this.linearNodeList=[],F=this.docPreprocessor.preprocessDocument(F),F=this.docMeasure.measureDocument(F),this.writer=new h(new l(this.pageSize,this.pageMargins),this.tracker);var BA=this;return this.writer.context().tracker.startTracking("pageAdded",function(){BA.addBackground(aA)}),this.addBackground(aA),this.processNode(F),this.addHeadersAndFooters(AA,lA),null!=cA&&this.addWatermark(cA,R,Z),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},U.prototype.addBackground=function(F){var R=S(F)?F:function(){return F},L=this.writer.context(),Z=L.getCurrentPage().pageSize,aA=R(L.page+1,Z);aA&&(this.writer.beginUnbreakableBlock(Z.width,Z.height),aA=this.docPreprocessor.preprocessDocument(aA),this.processNode(this.docMeasure.measureDocument(aA)),this.writer.commitUnbreakableBlock(0,0),L.backgroundLength[L.page]+=aA.positions.length)},U.prototype.addStaticRepeatable=function(F,R){this.addDynamicRepeatable(function(){return JSON.parse(JSON.stringify(F))},R)},U.prototype.addDynamicRepeatable=function(F,R){for(var Z=0,aA=this.writer.context().pages.length;Z1;)_.push({fontSize:SA}),(MA=xA.sizeOfRotatedText(BA.text,BA.angle,_)).width>gA.width?SA=(uA+(QA=SA))/2:MA.widthgA.height?(uA+(QA=SA))/2:((uA=SA)+QA)/2),_.pop();return SA}(this.pageSize,F,R));var Z={text:F.text,font:R.provideFont(F.font,F.bold,F.italics),fontSize:F.fontSize,color:F.color,opacity:F.opacity,angle:F.angle};Z._size=function pA(gA,BA){var yA=new m(BA),xA=new d(null,{font:gA.font,bold:gA.bold,italics:gA.italics});return xA.push({fontSize:gA.fontSize}),{size:yA.sizeOfString(gA.text,xA),rotatedSize:yA.sizeOfRotatedText(gA.text,gA.angle,xA)}}(F,R);for(var aA=this.writer.context().pages,AA=0,lA=aA.length;AA0;cA--)pA.push(lA);return pA}(F._gap);Z&&(L-=(Z.length-1)*F._gap),a.buildColumnWidths(R,L);var aA=this.processRow(R,R,Z);D(F.positions,aA.positions)},U.prototype.processRow=function(F,R,L,Z,aA,AA){var lA=this,pA=[],cA=[];return this.tracker.auto("pageChanged",function gA(xA){for(var _,MA=0,uA=pA.length;MA1)for(var SA=1;SAxA?L[xA]:0}function yA(xA,_){if(xA.rowSpan&&xA.rowSpan>1){var MA=aA+xA.rowSpan-1;if(MA>=Z.length)throw"Row span for column "+_+" (with indexes starting from 0) exceeded row count";return Z[MA][_]}return null}},U.prototype.processList=function(F,R){var AA,L=this,Z=F?R.ol:R.ul,aA=R._gapSize;this.writer.context().addMargin(aA.width),this.tracker.auto("lineAdded",function lA(pA){if(AA){var cA=AA;if(AA=null,cA.canvas){var gA=cA.canvas[0];w(gA,-cA._minWidth,0),L.writer.addVector(gA)}else if(cA._inlines){var BA=new E(L.pageSize.width);BA.addInline(cA._inlines[0]),BA.x=-cA._minWidth,BA.y=pA.getAscenderHeight()-BA.getAscenderHeight(),L.writer.addLine(BA,!0)}}},function(){Z.forEach(function(pA){AA=pA.listMarker,L.processNode(pA),D(R.positions,pA.positions)})}),this.writer.context().addMargin(-aA.width)},U.prototype.processTable=function(F){var R=new g(F);R.beginTable(this.writer);for(var L=F.table.heights,Z=0,aA=F.table.body.length;Z0&&(L.hasEnoughSpaceForInline(F._inlines[0],F._inlines.slice(1))||aA);){var AA=!1,lA=F._inlines.shift();if(aA=!1,!lA.noWrap&&lA.text.length>1&&lA.width>L.getAvailableWidth()){var pA=lA.width/lA.text.length,cA=Math.floor(L.getAvailableWidth()/pA);if(cA<1&&(cA=1),cA0){var u=g.pages[0];if(u.xOffset=h,u.yOffset=a,E>1)if(void 0!==h||void 0!==a)u.height=g.getCurrentPage().pageSize.height-g.pageMargins.top-g.pageMargins.bottom;else{u.height=this.writer.context.getCurrentPage().pageSize.height-this.writer.context.pageMargins.top-this.writer.context.pageMargins.bottom;for(var C=0,e=this.repeatables.length;CZA.item.y2?ZA.item.y1:ZA.item.y2:0}(ZA)}var SA=T(MA||40),bA=SA.top;return _.forEach(function(ZA){ZA.items.forEach(function(q){var J=QA(q);J>bA&&(bA=J)})}),bA+=SA.bottom}function U(_,MA){_&&"auto"===_.height&&(_.height=1/0);var QA=function R(_){if(C(_)){var MA=l[_.toUpperCase()];if(!MA)throw"Page size "+_+" not recognized";return{width:MA[0],height:MA[1]}}return _}(_||"A4");return function uA(SA){return!!C(SA)&&("portrait"===(SA=SA.toLowerCase())&&QA.width>QA.height||"landscape"===SA&&QA.widthQA.height?"landscape":"portrait",QA}function T(_){if(e(_))_={left:_,right:_,top:_,bottom:_};else if(B(_))if(2===_.length)_={left:_[0],top:_[1],right:_[0],bottom:_[1]};else{if(4!==_.length)throw"Invalid pageMargins definition";_={left:_[0],top:_[1],right:_[2],bottom:_[3]}}return _}function L(_,MA){_.pageSize.orientation!==(MA.options.size[0]>MA.options.size[1]?"landscape":"portrait")&&(MA.options.size=[MA.options.size[1],MA.options.size[0]])}function aA(_,MA){var uA=_;return MA.sup&&(uA-=.75*MA.fontSize),MA.sub&&(uA+=.35*MA.fontSize),uA}function AA(_,MA,uA,QA,SA){function bA(lt,TA){var it,vt,It=new E(null);if(w(lt.positions))throw"Page reference id not found";var Mt=lt.positions[0].pageNumber.toString();switch(TA.text=Mt,it=It.widthOfString(TA.text,TA.font,TA.fontSize,TA.characterSpacing,TA.fontFeatures),vt=TA.width-it,TA.width=it,TA.alignment){case"right":TA.x+=vt;break;case"center":TA.x+=vt/2}}_._pageNodeRef&&bA(_._pageNodeRef,_.inlines[0]),MA=MA||0,uA=uA||0;var ZA=_.getHeight(),J=ZA-_.getAscenderHeight();g.drawBackground(_,MA,uA,QA,SA);for(var $=0,W=_.inlines.length;$1){var ZA=_.points[0],q=_.points[_.points.length-1];(_.closePath||ZA.x===q.x&&ZA.y===q.y)&&uA.closePath()}break;case"path":uA.path(_.d)}if(_.linearGradient&&QA){var J=1/(_.linearGradient.length-1);for(SA=0;SA<_.linearGradient.length;SA++)QA.stop(SA*J,_.linearGradient[SA]);_.color=QA}Q(_.color)&&(_.color=p(_.color,MA));var $=e(_.fillOpacity)?_.fillOpacity:1,W=e(_.strokeOpacity)?_.strokeOpacity:1;_.color&&_.lineColor?(uA.fillColor(_.color,$),uA.strokeColor(_.lineColor,W),uA.fillAndStroke()):_.color?(uA.fillColor(_.color,$),uA.fill()):(uA.strokeColor(_.lineColor||"black",W),uA.stroke())}function cA(_,MA,uA,QA){var SA=e(_.opacity)?_.opacity:1;if(QA.opacity(SA),_.cover){var bA=_.cover.align||"center",ZA=_.cover.valign||"center",q=_.cover.width?_.cover.width:_.width,J=_.cover.height?_.cover.height:_.height;QA.save(),QA.rect(_.x,_.y,q,J).clip(),QA.image(_.image,_.x,_.y,{cover:[q,J],align:bA,valign:ZA}),QA.restore()}else QA.image(_.image,_.x,_.y,{width:_._width,height:_._height});_.link&&QA.link(_.x,_.y,_._width,_._height,_.link),_.linkToPage&&(QA.ref({Type:"Action",S:"GoTo",D:[_.linkToPage,0,0]}).end(),QA.annotate(_.x,_.y,_._width,_._height,{Subtype:"Link",Dest:[_.linkToPage-1,"XYZ",null,null,null]})),_.linkToDestination&&QA.goTo(_.x,_.y,_._width,_._height,_.linkToDestination)}function gA(_,MA,uA,QA,SA){var bA=Object.assign({width:_._width,height:_._height,assumePt:!0},_.options);bA.fontCallback=function(ZA,q,J){var $=ZA.split(",").map(function(nA){return nA.trim().replace(/('|")/g,"")}),W=function(_,MA,uA){for(var QA=0;QA-1&&(bA=bA.slice(0,ZA)),uA.height===1/0){var q=D(bA,_.pageMargins);this.pdfKitDoc.options.size=[uA.width,q]}var J=function xA(_,MA){var uA={};return Object.keys(_).forEach(function(QA){var SA=_[QA];uA[QA]=MA.pattern(SA.boundingBox,SA.xStep,SA.yStep,SA.pattern,SA.colored)}),uA}(_.patterns||{},this.pdfKitDoc);if(function Z(_,MA,uA,QA,SA){uA._pdfMakePages=_,uA.addPage();var bA=0;SA&&_.forEach(function(vA){bA+=vA.items.length});var ZA=0;SA=SA||function(){};for(var q=0;q<_.length;q++){q>0&&(L(_[q],uA),uA.addPage(uA.options));for(var J=_[q],$=0,W=J.items.length;$=128?285:0);var p=[[]];for(w=0;w<30;++w){for(var S=p[w],m=[],d=0;d<=w;++d)m.push(B[(d6},Z=function(q,J){var $=-8&function(q){var J=I[q],$=16*q*q+128*q+64;return F(q)&&($-=36),J[2].length&&($-=25*J[2].length*J[2].length-10*J[2].length-55),$}(q),W=I[q];return $-8*W[0][J]*W[1][J]},aA=function(q,J){switch(J){case 1:return q<10?10:q<27?12:14;case 2:return q<10?9:q<27?11:13;case 4:return q<10?8:16;case 8:return q<10?8:q<27?10:12}},AA=function(q,J,$){var W=Z(q,$)-4-aA(q,J);switch(J){case 1:return 3*(W/10|0)+(W%10<4?0:W%10<7?1:2);case 2:return 2*(W/11|0)+(W%11<6?0:1);case 4:return W/8|0;case 8:return W/13|0}},cA=function(q,J){for(var $=q.slice(0),W=q.length,hA=J.length,vA=0;vA=0)for(var EA=0;EA=0;--vA)hA>>W+vA&1&&(hA^=$<>nA&1;return q},uA=function(q){for(var vA=function(JA){for(var qA=0,at=0;at=5&&(qA+=JA[at]-5+3);for(at=5;at=4*et||JA[at+1]>=4*et)&&(qA+=40)}return qA},nA=q.length,EA=0,GA=0,nt=0;nt=nA){for(hA.push(vA|TA>>(it-=nA));it>=8;)hA.push(TA>>(it-=8)&255);vA=0,nA=8}it>0&&(vA|=(TA&(1<>3);nA=function(q,J,$){for(var W=[],hA=q.length/J|0,vA=0,nA=J-q.length%J,EA=0;EA>FA&1,hA[It+et][Mt+FA]=1};for(nA(0,0,9,9,[127,65,93,93,93,65,383,0,64]),nA($-8,0,8,9,[256,127,65,93,93,93,65,127]),nA(0,$-8,9,8,[254,130,186,186,186,130,254,0,0]),vA=9;vA<$-8;++vA)W[6][vA]=W[vA][6]=1&~vA,hA[6][vA]=hA[vA][6]=1;var EA=J[2],GA=EA.length;for(vA=0;vA>vt++&1,hA[vA][$-11+TA]=hA[$-11+TA][vA]=1}return{matrix:W,reserved:hA}}(J),GA=EA.matrix,nt=EA.reserved;if(function(q,J,$){for(var W=q.length,hA=0,vA=-1,nA=W-1;nA>=0;nA-=2){6==nA&&--nA;for(var EA=vA<0?W-1:0,GA=0;GAnA-2;--nt)J[EA][nt]||(q[EA][nt]=$[hA>>3]>>(7&~hA)&1,++hA);EA+=vA}vA=-vA}}(GA,nt,nA),hA<0){_(GA,nt,0),MA(GA,0,W,0);var lt=0,TA=uA(GA);for(_(GA,nt,0),hA=1;hA<8;++hA){_(GA,nt,hA),MA(GA,0,W,hA);var it=uA(GA);TA>it&&(TA=it,lt=hA),_(GA,nt,hA)}hA=lt}return _(GA,nt,hA),MA(GA,0,W,hA),GA};function SA(q,J){var $={numeric:1,alphanumeric:2,octet:4},hA=(J=J||{}).version||-1,vA={L:1,M:0,Q:3,H:2}[(J.eccLevel||"L").toUpperCase()],nA=J.mode?$[J.mode.toLowerCase()]:-1,EA="mask"in J?J.mask:-1;if(nA<0)nA="string"==typeof q?q.match(h)?1:q.match(g)?2:4:4;else if(1!=nA&&2!=nA&&4!=nA)throw"invalid or unsupported mode";if(null===(q=function(q,J){switch(q){case 1:return J.match(h)?J:null;case 2:return J.match(a)?J.toUpperCase():null;case 4:if("string"==typeof J){for(var $=[],W=0;W>6,128|63&hA):hA<65536?$.push(224|hA>>12,128|hA>>6&63,128|63&hA):$.push(240|hA>>18,128|hA>>12&63,128|hA>>6&63,128|63&hA)}return $}return J}}(nA,q)))throw"invalid data format";if(vA<0||vA>3)throw"invalid ECC level";if(hA<0){for(hA=1;hA<=40&&!(q.length<=AA(hA,nA,vA));++hA);if(hA>40)throw"too large data for the Qr format"}else if(hA<1||hA>40)throw"invalid Qr version! should be between 1 and 40";if(-1!=EA&&(EA<0||EA>8))throw"invalid mask";return QA(q,hA,nA,vA,EA)}Y.exports={measure:function ZA(q){var J=function bA(q,J){var $=[],W=J.background||"#fff",hA=J.foreground||"#000",vA=SA(q,J),nA=vA.length,EA=Math.floor(J.fit?J.fit/nA:5),GA=nA*EA;$.push({type:"rect",x:0,y:0,w:GA,h:GA,lineWidth:0,color:W});for(var nt=0;nt0;)this.styleOverrides.pop()},h.prototype.autopush=function(a){if(c(a))return 0;var g=[];a.style&&(g=i(a.style)?a.style:[a.style]);for(var E=0,u=g.length;E0&&this.pop(E),u},h.prototype.getProperty=function(a){if(this.styleOverrides)for(var g=this.styleOverrides.length-1;g>=0;g--){var E=this.styleOverrides[g];if(c(E)){var u=this.styleDictionary[E];if(u&&!o(u[a])&&!l(u[a]))return u[a]}else if(!o(E[a])&&!l(E[a]))return E[a]}return this.defaultStyle&&this.defaultStyle[a]},Y.exports=h},7601:function(Y,I,n){"use strict";var c=n(6513);function i(h){var a=parseFloat(h);if("number"==typeof a&&!isNaN(a))return a}function o(h){var a;try{a=new c.XmlDocument(h)}catch(g){throw new Error("SVGMeasure: "+g)}if("svg"!==a.name)throw new Error("SVGMeasure: expected document");return a}function l(){}l.prototype.measureSVG=function(h){var a=o(h),g=i(a.attr.width),E=i(a.attr.height);if((null==g||null==E)&&"string"==typeof a.attr.viewBox){var u=a.attr.viewBox.split(/[,\s]+/);if(4!==u.length)throw new Error("Unexpected svg viewbox format, should have 4 entries but found: '"+a.attr.viewBox+"'");null==g&&(g=i(u[2])),null==E&&(E=i(u[3]))}return{width:g,height:E}},l.prototype.writeDimensions=function(h,a){var g=o(h);return g.attr.width=""+a.width,g.attr.height=""+a.height,g.toString()},Y.exports=l},9342:function(Y,I,n){"use strict";var c=n(4498),i=n(6225).isFunction,o=n(6225).isNumber;function l(h){this.tableNode=h}l.prototype.beginTable=function(h){var a,g,E=this;this.offsets=(a=this.tableNode)._offsets,this.layout=a._layout,g=h.context().availableWidth-this.offsets.total,c.buildColumnWidths(a.table.widths,g),this.tableWidth=a._offsets.total+function u(){var f=0;return a.table.widths.forEach(function(B){f+=B._calcWidth}),f}(),this.rowSpanData=function C(){var f=[],B=0,w=0;f.push({left:0,rowSpan:0});for(var Q=0,p=E.tableNode.table.body[0].length;Q0&&D(B+d,Q,0,p.border[0]),void 0!==p.border[2]&&D(B+d,Q+m-1,2,p.border[2]);for(var v=0;v0&&D(B,Q+v,1,p.border[1]),void 0!==p.border[3]&&D(B+S-1,Q+v,3,p.border[3])}}function D(U,T,F,R){var L=f[U][T];L.border=L.border||{},L.border[F]=R}}(this.tableNode.table.body),this.drawHorizontalLine(0,h)},l.prototype.onRowBreak=function(h,a){var g=this;return function(){var E=g.rowPaddingTop+(g.headerRows?0:g.topLineWidth);a.context().availableHeight-=g.reservedAtBottom,a.context().moveDown(E)}},l.prototype.beginRow=function(h,a){this.topLineWidth=this.layout.hLineWidth(h,this.tableNode),this.rowPaddingTop=this.layout.paddingTop(h,this.tableNode),this.bottomLineWidth=this.layout.hLineWidth(h+1,this.tableNode),this.rowPaddingBottom=this.layout.paddingBottom(h,this.tableNode),this.rowCallback=this.onRowBreak(h,a),a.tracker.startTracking("pageChanged",this.rowCallback),this.dontBreakRows&&a.beginUnbreakableBlock(),this.rowTopY=a.context().y,this.reservedAtBottom=this.bottomLineWidth+this.rowPaddingBottom,a.context().availableHeight-=this.reservedAtBottom,a.context().moveDown(this.rowPaddingTop)},l.prototype.drawHorizontalLine=function(h,a,g){var E=this.layout.hLineWidth(h,this.tableNode);if(E){var C,u=this.layout.hLineStyle(h,this.tableNode);u&&u.dash&&(C=u.dash);for(var w,Q,p,e=E/2,f=null,B=this.tableNode.table.body,S=0,m=this.rowSpanData.length;S0&&(T=(w=B[h-1][S]).border?w.border[3]:this.layout.defaultBorder)&&w.borderColor&&(D=w.borderColor[3]),hR;)f.width+=this.rowSpanData[S+R++].width||0;S+=R-1}else if(w&&w.colSpan&&T){for(;w.colSpan>R;)f.width+=this.rowSpanData[S+R++].width||0;S+=R-1}else if(Q&&Q.colSpan&&U){for(;Q.colSpan>R;)f.width+=this.rowSpanData[S+R++].width||0;S+=R-1}else f.width+=this.rowSpanData[S].width||0}var L=(g||0)+e;v&&f&&f.width&&(a.addVector({type:"line",x1:f.left,x2:f.left+f.width,y1:L,y2:L,lineWidth:E,dash:C,lineColor:D},!1,g),f=null,D=null,w=null,Q=null,p=null)}a.context().moveDown(E)}},l.prototype.drawVerticalLine=function(h,a,g,E,u,C,e){var f=this.layout.vLineWidth(E,this.tableNode);if(0!==f){var w,B=this.layout.vLineStyle(E,this.tableNode);B&&B.dash&&(w=B.dash);var p,S,m,Q=this.tableNode.table.body;if(E>0&&(p=Q[C][e])&&p.borderColor&&(p.border?p.border[2]:this.layout.defaultBorder)&&(m=p.borderColor[2]),null==m&&E0&&$--}return J.push({x:C.rowSpanData[C.rowSpanData.length-1].left,index:C.rowSpanData.length-1}),J}(),w=[],Q=g&&g.length>0,p=this.tableNode.table.body;if(w.push({y0:this.rowTopY,page:Q?g[0].prevPage:e}),Q)for(u=0,E=g.length;u0&&!this.headerRows,T=U?0:this.topLineWidth,F=w[d].y0,R=w[d].y1;for(D&&(R+=this.rowPaddingBottom),a.context().page!=w[d].page&&(a.context().page=w[d].page,this.reservedAtBottom=0),u=0,E=B.length;u0&&!L&&(L=(AA=p[h][aA-1]).border?AA.border[2]:this.layout.defaultBorder),aA+11)for(var ZA=1;ZA1)for(ZA=1;ZA0&&this.rowSpanData[u].rowSpan--}this.drawHorizontalLine(h+1,a),this.headerRows&&h===this.headerRows-1&&(this.headerRepeatable=a.currentBlockToRepeatable()),this.dontBreakRows&&a.tracker.auto("pageChanged",function(){!C.headerRows&&!1!==C.layout.hLineWhenBroken&&C.drawHorizontalLine(h,a)},function(){a.commitUnbreakableBlock()}),this.headerRepeatable&&(h===this.rowsWithoutPageBreak-1||h===this.tableNode.table.body.length-1)&&(a.commitUnbreakableBlock(),a.pushToRepeatables(this.headerRepeatable),this.cleanUpRepeatables=!0,this.headerRepeatable=null)},Y.exports=l},3497:function(Y,I,n){"use strict";var c=n(6225).isArray,i=n(6225).isPattern,o=n(6225).getPattern;function h(E,u,C,e){var w=E.inlines[0],Q=function f(){for(var BA=0,yA=0,xA=E.inlines.length;yABA?yA:BA;return E.inlines[BA]}(),p=function B(){for(var BA=0,yA=0,xA=E.inlines.length;yA=0&&i.splice(o,1)}},I.prototype.emit=function(n){var c=Array.prototype.slice.call(arguments,1),i=this.events[n];!i||i.forEach(function(o){o.apply(this,c)})},I.prototype.auto=function(n,c,i){this.startTracking(n,c),i(),this.stopTracking(n,c)},Y.exports=I},2480:function(){},5832:function(){},9862:function(){},964:function(){},3083:function(Y,I,n){"use strict";var c=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?n.g:globalThis;Y.exports=function(){for(var l=[],h=0;h{var Fr=function(Nt){"use strict";var Pn,ht=Object.prototype,qt=ht.hasOwnProperty,A="function"==typeof Symbol?Symbol:{},wt=A.iterator||"@@iterator",Y=A.asyncIterator||"@@asyncIterator",I=A.toStringTag||"@@toStringTag";function n(F,R,L){return Object.defineProperty(F,R,{value:L,enumerable:!0,configurable:!0,writable:!0}),F[R]}try{n({},"")}catch(F){n=function(R,L,Z){return R[L]=Z}}function c(F,R,L,Z){var AA=Object.create((R&&R.prototype instanceof E?R:E).prototype),lA=new D(Z||[]);return AA._invoke=function S(F,R,L){var Z=o;return function(AA,lA){if(Z===h)throw new Error("Generator is already running");if(Z===a){if("throw"===AA)throw lA;return T()}for(L.method=AA,L.arg=lA;;){var pA=L.delegate;if(pA){var cA=m(pA,L);if(cA){if(cA===g)continue;return cA}}if("next"===L.method)L.sent=L._sent=L.arg;else if("throw"===L.method){if(Z===o)throw Z=a,L.arg;L.dispatchException(L.arg)}else"return"===L.method&&L.abrupt("return",L.arg);Z=h;var gA=i(F,R,L);if("normal"===gA.type){if(Z=L.done?a:l,gA.arg===g)continue;return{value:gA.arg,done:L.done}}"throw"===gA.type&&(Z=a,L.method="throw",L.arg=gA.arg)}}}(F,L,lA),AA}function i(F,R,L){try{return{type:"normal",arg:F.call(R,L)}}catch(Z){return{type:"throw",arg:Z}}}Nt.wrap=c;var o="suspendedStart",l="suspendedYield",h="executing",a="completed",g={};function E(){}function u(){}function C(){}var e={};n(e,wt,function(){return this});var f=Object.getPrototypeOf,B=f&&f(f(U([])));B&&B!==ht&&qt.call(B,wt)&&(e=B);var w=C.prototype=E.prototype=Object.create(e);function Q(F){["next","throw","return"].forEach(function(R){n(F,R,function(L){return this._invoke(R,L)})})}function p(F,R){function L(AA,lA,pA,cA){var gA=i(F[AA],F,lA);if("throw"!==gA.type){var BA=gA.arg,yA=BA.value;return yA&&"object"==typeof yA&&qt.call(yA,"__await")?R.resolve(yA.__await).then(function(xA){L("next",xA,pA,cA)},function(xA){L("throw",xA,pA,cA)}):R.resolve(yA).then(function(xA){BA.value=xA,pA(BA)},function(xA){return L("throw",xA,pA,cA)})}cA(gA.arg)}var Z;this._invoke=function aA(AA,lA){function pA(){return new R(function(cA,gA){L(AA,lA,cA,gA)})}return Z=Z?Z.then(pA,pA):pA()}}function m(F,R){var L=F.iterator[R.method];if(L===Pn){if(R.delegate=null,"throw"===R.method){if(F.iterator.return&&(R.method="return",R.arg=Pn,m(F,R),"throw"===R.method))return g;R.method="throw",R.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var Z=i(L,F.iterator,R.arg);if("throw"===Z.type)return R.method="throw",R.arg=Z.arg,R.delegate=null,g;var aA=Z.arg;return aA?aA.done?(R[F.resultName]=aA.value,R.next=F.nextLoc,"return"!==R.method&&(R.method="next",R.arg=Pn),R.delegate=null,g):aA:(R.method="throw",R.arg=new TypeError("iterator result is not an object"),R.delegate=null,g)}function d(F){var R={tryLoc:F[0]};1 in F&&(R.catchLoc=F[1]),2 in F&&(R.finallyLoc=F[2],R.afterLoc=F[3]),this.tryEntries.push(R)}function v(F){var R=F.completion||{};R.type="normal",delete R.arg,F.completion=R}function D(F){this.tryEntries=[{tryLoc:"root"}],F.forEach(d,this),this.reset(!0)}function U(F){if(F){var R=F[wt];if(R)return R.call(F);if("function"==typeof F.next)return F;if(!isNaN(F.length)){var L=-1,Z=function aA(){for(;++L=0;--Z){var aA=this.tryEntries[Z],AA=aA.completion;if("root"===aA.tryLoc)return L("end");if(aA.tryLoc<=this.prev){var lA=qt.call(aA,"catchLoc"),pA=qt.call(aA,"finallyLoc");if(lA&&pA){if(this.prev=0;--L){var Z=this.tryEntries[L];if(Z.tryLoc<=this.prev&&qt.call(Z,"finallyLoc")&&this.prev=0;--R){var L=this.tryEntries[R];if(L.finallyLoc===F)return this.complete(L.completion,L.afterLoc),v(L),g}},catch:function(F){for(var R=this.tryEntries.length-1;R>=0;--R){var L=this.tryEntries[R];if(L.tryLoc===F){var Z=L.completion;if("throw"===Z.type){var aA=Z.arg;v(L)}return aA}}throw new Error("illegal catch attempt")},delegateYield:function(F,R,L){return this.delegate={iterator:U(F),resultName:R,nextLoc:L},"next"===this.method&&(this.arg=Pn),g}},Nt}(oi.exports);try{regeneratorRuntime=Fr}catch(Nt){"object"==typeof globalThis?globalThis.regeneratorRuntime=Fr:Function("r","regeneratorRuntime = r")(Fr)}},7757:(oi,Fr,Nt)=>{oi.exports=Nt(4979)}}]); \ No newline at end of file diff --git a/frontend/564.d224f537513d1972.js b/frontend/564.d224f537513d1972.js new file mode 100644 index 00000000..60bcc1be --- /dev/null +++ b/frontend/564.d224f537513d1972.js @@ -0,0 +1 @@ +(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[564],{9564:(oi,Fr,Nt)=>{"use strict";Nt.r(Fr),Nt.d(Fr,{CLNModule:()=>cf});var Et=Nt(9808),qt=Nt(1402),Pn=Nt(8878),A=Nt(5e3),Ct=Nt(7093),T=Nt(5899);function I(r,D){1&r&&A._UZ(0,"mat-progress-bar",3)}let n=(()=>{class r{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(s=>{switch(!0){case s instanceof qt.OD:this.loading=!0;break;case s instanceof qt.m2:case s instanceof qt.gk:case s instanceof qt.Q3:this.loading=!1}})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,I,1,0,"mat-progress-bar",1),A._UZ(2,"router-outlet",null,2),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",s.loading))},directives:[Ct.xw,Ct.yH,Ct.Wh,Et.O5,T.pW,qt.lC],styles:[""],data:{animation:[Pn.g]}}),r})();var c=Nt(7579),i=Nt(2722),o=Nt(1365),l=Nt(534),h=Nt(801),a=Nt(7731),B=Nt(9828),E=Nt(5043),u=Nt(5620),C=Nt(62),e=Nt(9444),f=Nt(3954),g=Nt(9224),w=Nt(7423),Q=Nt(2181),p=Nt(5245),Y=Nt(3322);const y=function(r){return{backgroundColor:r}};function d(r,D){if(1&r&&A._UZ(0,"span",6),2&r){const t=A.oxw();A.Q6J("ngStyle",A.VKq(1,y,"#"+(null==t.information?null:t.information.color)))}}function m(r,D){if(1&r&&(A.TgZ(0,"div")(1,"h4",1),A._uU(2,"Color"),A.qZA(),A.TgZ(3,"div",2),A._UZ(4,"span",7),A._uU(5),A.ALo(6,"uppercase"),A.qZA()()),2&r){const t=A.oxw();A.xp6(4),A.Q6J("ngStyle",A.VKq(4,y,"#"+(null==t.information?null:t.information.color))),A.xp6(1),A.hij(" ",A.lcZ(6,2,null==t.information?null:t.information.color)," ")}}function v(r,D){if(1&r&&(A.TgZ(0,"span",2),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(t)}}let P=(()=>{class r{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.information&&this.information.chains&&this.information.chains.length>0&&(this.chains=[""],this.information.chains.forEach(t=>{this.chains.push(this.commonService.titleCase(t.chain||"")+" "+this.commonService.titleCase(t.network||""))}))}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(C.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[A.TTD],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div")(2,"h4",1),A._uU(3,"Alias"),A.qZA(),A.TgZ(4,"div",2),A._uU(5),A.YNc(6,d,1,3,"span",3),A.qZA()(),A.YNc(7,m,7,6,"div",4),A.TgZ(8,"div")(9,"h4",1),A._uU(10,"Implementation"),A.qZA(),A.TgZ(11,"div",2),A._uU(12),A.qZA()(),A.TgZ(13,"div")(14,"h4",1),A._uU(15,"Chain"),A.qZA(),A.YNc(16,v,2,1,"span",5),A.qZA()()),2&t&&(A.xp6(5),A.hij(" ",null==s.information?null:s.information.alias," "),A.xp6(1),A.Q6J("ngIf",!s.showColorFieldSeparately),A.xp6(1),A.Q6J("ngIf",s.showColorFieldSeparately),A.xp6(5),A.Oqu(null!=s.information&&s.information.lnImplementation||null!=s.information&&s.information.version?(null==s.information?null:s.information.lnImplementation)+" "+(null==s.information?null:s.information.version):""),A.xp6(4),A.Q6J("ngForOf",s.chains))},directives:[Ct.xw,Ct.yH,Ct.Wh,Et.O5,Et.PC,Y.Zl,Et.sg],pipes:[Et.gd],styles:[""]}),r})();function S(r,D){if(1&r&&(A.TgZ(0,"div",2)(1,"div")(2,"h4",3),A._uU(3,"Lightning"),A.qZA(),A.TgZ(4,"div",4),A._uU(5),A.ALo(6,"number"),A.qZA(),A._UZ(7,"mat-progress-bar",5),A.qZA(),A.TgZ(8,"div")(9,"h4",3),A._uU(10,"On-chain"),A.qZA(),A.TgZ(11,"div",4),A._uU(12),A.ALo(13,"number"),A.qZA(),A._UZ(14,"mat-progress-bar",5),A.qZA(),A.TgZ(15,"div")(16,"h4",3),A._uU(17,"Total"),A.qZA(),A.TgZ(18,"div",4),A._uU(19),A.ALo(20,"number"),A.qZA()()()),2&r){const t=A.oxw();A.xp6(5),A.hij("",A.lcZ(6,5,t.balances.lightning)," Sats"),A.xp6(2),A.s9C("value",t.balances.lightning/t.balances.total*100),A.xp6(5),A.hij("",A.lcZ(13,7,t.balances.onchain)," Sats"),A.xp6(2),A.s9C("value",t.balances.onchain/t.balances.total*100),A.xp6(5),A.hij("",A.lcZ(20,9,t.balances.total)," Sats")}}function F(r,D){if(1&r&&(A.TgZ(0,"div",6)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let z=(()=>{class r{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(t,s){if(1&t&&(A.YNc(0,S,21,11,"div",0),A.YNc(1,F,3,1,"ng-template",null,1,A.W1O)),2&t){const L=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",L)}},directives:[Et.O5,Ct.xw,Ct.yH,Ct.Wh,T.pW],pipes:[Et.JJ],styles:[""]}),r})();var U=Nt(7322),eA=Nt(7238),sA=Nt(4834),q=Nt(8129);const BA=function(){return["../connections/channels/open"]},pA=function(r){return{filter:r}};function lA(r,D){if(1&r&&(A.TgZ(0,"div",19)(1,"a",20),A._uU(2),A.ALo(3,"slice"),A.qZA(),A.TgZ(4,"div",6)(5,"mat-hint",21)(6,"strong",8),A._uU(7,"Local:"),A.qZA(),A._uU(8),A.ALo(9,"number"),A.qZA(),A.TgZ(10,"mat-hint",22),A._UZ(11,"fa-icon",23),A._uU(12),A.ALo(13,"number"),A.qZA(),A.TgZ(14,"mat-hint",24)(15,"strong",8),A._uU(16,"Remote:"),A.qZA(),A._uU(17),A.ALo(18,"number"),A.qZA()(),A._UZ(19,"mat-progress-bar",25),A.qZA()),2&r){const t=D.$implicit,s=A.oxw(3);A.xp6(1),A.s9C("matTooltip",t.alias||t.id),A.s9C("matTooltipDisabled",(t.alias||t.id).length<26),A.Q6J("routerLink",A.DdM(23,BA))("state",A.VKq(24,pA,t.id)),A.xp6(1),A.AsE(" ",A.Dn7(3,11,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":""," "),A.xp6(6),A.hij("",A.xi3(9,15,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats"),A.xp6(3),A.Q6J("icon",s.faBalanceScale),A.xp6(1),A.hij(" (",A.lcZ(13,18,t.balancedness||0),") "),A.xp6(5),A.hij("",A.xi3(18,20,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats"),A.xp6(2),A.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function cA(r,D){if(1&r&&(A.TgZ(0,"div",17),A.YNc(1,lA,20,26,"div",18),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngForOf",t.activeChannels)}}function gA(r,D){if(1&r&&(A.TgZ(0,"div",3)(1,"div",4)(2,"span",5),A._uU(3,"Total Capacity"),A.qZA(),A.TgZ(4,"div",6)(5,"mat-hint",7)(6,"strong",8),A._uU(7,"Local:"),A.qZA(),A._uU(8),A.ALo(9,"number"),A.qZA(),A.TgZ(10,"mat-hint",9),A._UZ(11,"fa-icon",10),A._uU(12),A.ALo(13,"number"),A.qZA(),A.TgZ(14,"mat-hint",11)(15,"strong",8),A._uU(16,"Remote:"),A.qZA(),A._uU(17),A.ALo(18,"number"),A.qZA()(),A._UZ(19,"mat-progress-bar",12),A.qZA(),A.TgZ(20,"div",13),A._UZ(21,"mat-divider",14),A.qZA(),A.TgZ(22,"div",15),A.YNc(23,cA,2,1,"div",16),A.qZA()()),2&r){const t=A.oxw(),s=A.MAs(2);A.xp6(8),A.hij("",A.xi3(9,7,(null==t.channelBalances?null:t.channelBalances.localBalance)||0,"1.0-0")," Sats"),A.xp6(3),A.Q6J("icon",t.faBalanceScale),A.xp6(1),A.hij(" (",A.lcZ(13,10,(null==t.channelBalances?null:t.channelBalances.balancedness)||0),") "),A.xp6(5),A.hij("",A.xi3(18,12,(null==t.channelBalances?null:t.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),A.xp6(2),A.s9C("value",null!=t.channelBalances&&t.channelBalances.localBalance&&(null==t.channelBalances?null:t.channelBalances.localBalance)>0?+(null==t.channelBalances?null:t.channelBalances.localBalance)/(+(null==t.channelBalances?null:t.channelBalances.localBalance)+ +(null==t.channelBalances?null:t.channelBalances.remoteBalance))*100:0),A.xp6(4),A.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",s)}}function yA(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",26),A._uU(1," No channels available. "),A.TgZ(2,"button",27),A.NdJ("click",function(){return A.CHM(t),A.oxw().goToChannels()}),A._uU(3,"Open Channel"),A.qZA()()}}function FA(r,D){if(1&r&&(A.TgZ(0,"div",28)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let _=(()=>{class r{constructor(t){this.router=t,this.faBalanceScale=h.DL8,this.faDumbbell=h.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/cln/connections")}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",activeChannels:"activeChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["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(t,s){if(1&t&&(A.YNc(0,gA,24,15,"div",0),A.YNc(1,yA,4,0,"ng-template",null,1,A.W1O),A.YNc(3,FA,3,1,"ng-template",null,2,A.W1O)),2&t){const L=A.MAs(4);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",L)}},directives:[Et.O5,Ct.xw,Ct.Wh,Ct.yH,U.bx,e.BN,eA.gM,T.pW,sA.d,q.$V,Et.sg,qt.yS,w.lW],pipes:[Et.JJ,Et.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),r})();function MA(r,D){if(1&r&&(A.TgZ(0,"div")(1,"h4",4),A._uU(2,"Transactions"),A.qZA(),A.TgZ(3,"div",5),A._uU(4),A.ALo(5,"number"),A.qZA()()),2&r){const t=A.oxw(2);A.xp6(4),A.Oqu(A.lcZ(5,1,null==t.fees?null:t.fees.totalTxCount))}}function uA(r,D){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4,"Total"),A.qZA(),A.TgZ(5,"div",5),A._uU(6),A.ALo(7,"number"),A.qZA()()(),A.TgZ(8,"div",6),A.YNc(9,MA,6,3,"div",7),A.qZA()()),2&r){const t=A.oxw();A.xp6(6),A.hij("",A.lcZ(7,2,(null==t.fees?null:t.fees.feeCollected)/1e3)," Sats"),A.xp6(3),A.Q6J("ngIf",null==t.fees?null:t.fees.totalTxCount)}}function QA(r,D){if(1&r&&(A.TgZ(0,"div",8)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let SA=(()=>{class r{constructor(){this.totalFees=[{name:"Total",value:0}]}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start",1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],[4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,uA,10,4,"div",0),A.YNc(1,QA,3,1,"ng-template",null,1,A.W1O)),2&t){const L=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",L)}},directives:[Et.O5,Ct.xw,Ct.yH,Ct.Wh],pipes:[Et.JJ],styles:[""]}),r})();function bA(r,D){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4,"Active"),A.qZA(),A.TgZ(5,"div",5),A._UZ(6,"span",6),A._uU(7),A.ALo(8,"number"),A.qZA()(),A.TgZ(9,"div")(10,"h4",4),A._uU(11,"Pending"),A.qZA(),A.TgZ(12,"div",5),A._UZ(13,"span",7),A._uU(14),A.ALo(15,"number"),A.qZA()(),A.TgZ(16,"div")(17,"h4",4),A._uU(18,"Inactive"),A.qZA(),A.TgZ(19,"div",5),A._UZ(20,"span",8),A._uU(21),A.ALo(22,"number"),A.qZA()()(),A.TgZ(23,"div",3)(24,"div")(25,"h4",4),A._uU(26,"Capacity"),A.qZA(),A.TgZ(27,"div",5),A._uU(28),A.ALo(29,"number"),A.qZA()(),A.TgZ(30,"div")(31,"h4",4),A._uU(32,"Capacity"),A.qZA(),A.TgZ(33,"div",5),A._uU(34),A.ALo(35,"number"),A.qZA()(),A.TgZ(36,"div")(37,"h4",4),A._uU(38,"Capacity"),A.qZA(),A.TgZ(39,"div",5),A._uU(40),A.ALo(41,"number"),A.qZA()()()()),2&r){const t=A.oxw();A.xp6(7),A.Oqu(A.lcZ(8,6,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.channels)||0)),A.xp6(7),A.Oqu(A.lcZ(15,8,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.channels)||0)),A.xp6(7),A.Oqu(A.lcZ(22,10,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.channels)||0)),A.xp6(7),A.hij("",A.lcZ(29,12,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.capacity)||0)," Sats"),A.xp6(6),A.hij("",A.lcZ(35,14,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.capacity)||0)," Sats"),A.xp6(6),A.hij("",A.lcZ(41,16,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.capacity)||0)," Sats")}}function XA(r,D){if(1&r&&(A.TgZ(0,"div",9)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let X=(()=>{class r{constructor(){this.channelsStatus={active:{},pending:{},inactive:{}}}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(t,s){if(1&t&&(A.YNc(0,bA,42,18,"div",0),A.YNc(1,XA,3,1,"ng-template",null,1,A.W1O)),2&t){const L=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",L)}},directives:[Et.O5,Ct.xw,Ct.yH,Ct.Wh],pipes:[Et.JJ],styles:[""]}),r})();function O(r,D){if(1&r&&(A.TgZ(0,"mat-hint",19)(1,"strong",20),A._uU(2,"Capacity: "),A.qZA(),A._uU(3),A.ALo(4,"number"),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(3),A.hij("",A.xi3(4,1,t.msatoshi_to_them/1e3||0,"1.0-0")," Sats")}}function $(r,D){if(1&r&&(A.TgZ(0,"mat-hint",19)(1,"strong",20),A._uU(2,"Capacity: "),A.qZA(),A._uU(3),A.ALo(4,"number"),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(3),A.hij("",A.xi3(4,1,t.msatoshi_to_us/1e3||0,"1.0-0")," Sats")}}function W(r,D){if(1&r&&A._UZ(0,"mat-progress-bar",21),2&r){const t=A.oxw().$implicit,s=A.oxw(3);A.s9C("value",s.totalLiquidity>0?(+t.msatoshi_to_them/1e3||0)/s.totalLiquidity*100:0)}}function hA(r,D){if(1&r&&A._UZ(0,"mat-progress-bar",21),2&r){const t=A.oxw().$implicit,s=A.oxw(3);A.s9C("value",s.totalLiquidity>0?(+t.msatoshi_to_us/1e3||0)/s.totalLiquidity*100:0)}}const vA=function(){return["../connections/channels/open"]},nA=function(r){return{filter:r}};function EA(r,D){if(1&r&&(A.TgZ(0,"div",14)(1,"a",15),A._uU(2),A.ALo(3,"slice"),A.qZA(),A.TgZ(4,"div",16),A.YNc(5,O,5,4,"mat-hint",17),A.YNc(6,$,5,4,"mat-hint",17),A.qZA(),A.YNc(7,W,1,1,"mat-progress-bar",18),A.YNc(8,hA,1,1,"mat-progress-bar",18),A.qZA()),2&r){const t=D.$implicit,s=A.oxw(3);A.xp6(1),A.s9C("matTooltip",t.alias||t.id),A.s9C("matTooltipDisabled",(t.alias||t.id).length<26),A.Q6J("routerLink",A.DdM(14,vA))("state",A.VKq(15,nA,t.id)),A.xp6(1),A.AsE(" ",A.Dn7(3,10,t.alias||t.id,0,24),"",(t.alias||t.id).length>25?"...":""," "),A.xp6(3),A.Q6J("ngIf","In"===s.direction),A.xp6(1),A.Q6J("ngIf","Out"===s.direction),A.xp6(1),A.Q6J("ngIf","In"===s.direction),A.xp6(1),A.Q6J("ngIf","Out"===s.direction)}}function GA(r,D){if(1&r&&(A.TgZ(0,"div",12),A.YNc(1,EA,9,17,"div",13),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngForOf",t.activeChannels)}}const et=function(r,D,t){return{"mb-4":r,"mb-2":D,"mb-1":t}};function st(r,D){if(1&r&&(A.TgZ(0,"div",3)(1,"div",4)(2,"span",5),A._uU(3,"Total Capacity"),A.qZA(),A.TgZ(4,"mat-hint",6),A._uU(5),A.ALo(6,"number"),A.qZA(),A._UZ(7,"mat-progress-bar",7),A.qZA(),A.TgZ(8,"div",8),A._UZ(9,"mat-divider",9),A.qZA(),A.TgZ(10,"div",10),A.YNc(11,GA,2,1,"div",11),A.qZA()()),2&r){const t=A.oxw(),s=A.MAs(2);A.Q6J("ngClass",A.kEZ(7,et,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD,t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),A.xp6(5),A.hij("",A.xi3(6,4,t.totalLiquidity,"1.0-0")," Sats"),A.xp6(6),A.Q6J("ngIf",t.activeChannels&&t.activeChannels.length>0)("ngIfElse",s)}}function TA(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"button",24),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).goToChannels()}),A._uU(1,"Open Channel"),A.qZA()}}function it(r,D){if(1&r&&(A.TgZ(0,"div",22),A._uU(1," No channels available. "),A.YNc(2,TA,2,0,"button",23),A.qZA()),2&r){const t=A.oxw();A.xp6(2),A.Q6J("ngIf","Out"===t.direction)}}function mt(r,D){if(1&r&&(A.TgZ(0,"div",25)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let It=(()=>{class r{constructor(t,s){this.router=t,this.commonService=s,this.screenSize="",this.screenSizeEnum=a.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/cln/connections")}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0),A.Y36(C.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",activeChannels:"activeChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],["fxLayout","column","fxFlex.gt-sm","88","fxFlex","84","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100","class","w-100",4,"ngIf","ngIfElse"],["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 center",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(t,s){if(1&t&&(A.YNc(0,st,12,11,"div",0),A.YNc(1,it,3,1,"ng-template",null,1,A.W1O),A.YNc(3,mt,3,1,"ng-template",null,2,A.W1O)),2&t){const L=A.MAs(4);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",L)}},directives:[Et.O5,Ct.xw,Ct.Wh,Ct.yH,Et.mk,Y.oO,U.bx,T.pW,sA.d,q.$V,Et.sg,qt.yS,eA.gM,w.lW],pipes:[Et.JJ,Et.OU],styles:[""]}),r})();var ft=Nt(3251),JA=Nt(9300),WA=Nt(6087),rt=Nt(4847),xA=Nt(2075),Mt=Nt(8966),ht=Nt(429),Yt=Nt(6642),OA=Nt(3075),H=Nt(7531),k=Nt(3390),b=Nt(6534),CA=Nt(4107),wA=Nt(508),RA=Nt(2368);function rA(r,D){if(1&r&&(A.TgZ(0,"mat-option",27),A._uU(1),A.ALo(2,"titlecase"),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(A.lcZ(2,2,t))}}function gt(r,D){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.invoiceError)}}function Ft(r,D){if(1&r&&(A.TgZ(0,"div",28),A._UZ(1,"fa-icon",29),A.YNc(2,gt,2,1,"span",30),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.invoiceError)}}let j=(()=>{class r{constructor(t,s,L,dA,ot,Ae){this.dialogRef=t,this.data=s,this.store=L,this.decimalPipe=dA,this.commonService=ot,this.actions=Ae,this.faExclamationTriangle=h.eHv,this.selNode={},this.description="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.timeUnitEnum=a.Qk,this.timeUnits=a.LO,this.selTimeUnit=a.Qk.SECS,this.invoiceError="",this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(B.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.actions.pipe((0,i.R)(this.unSubs[2]),(0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewInvoice"===t.payload.action&&(t.payload.status===a.Bn.ERROR&&(this.invoiceError=t.payload.message),t.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(t){this.invoiceError="",this.invoiceValue||(this.invoiceValue=0);let s=this.expiry?this.expiry:3600;this.selTimeUnit!==a.Qk.SECS&&(s=this.commonService.convertTime(this.expiry,this.selTimeUnit,a.Qk.SECS)),this.store.dispatch((0,ht.Rd)({payload:{label:"ulbl"+Math.random().toString(36).slice(2)+Date.now(),amount:1e3*this.invoiceValue,description:this.description,expiry:s,private:this.private}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=a.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[3])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,a.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onTimeUnitChange(t){this.expiry&&this.selTimeUnit!==t.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,t.value)),this.selTimeUnit=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(Et.JJ),A.Y36(C.v),A.Y36(Yt.eX))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-create-invoices"]],decls:39,vars:16,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invoiceValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","name","expiry","placeholder","Expiry","type","number","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","50","fxLayoutAlign","start center",1,"mt-2"],["tabindex","6","color","primary","name","private",3,"ngModel","ngModelChange"],["matTooltip","Include routing hints for private channels","matTooltipPosition","above",1,"info-icon"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,s){if(1&t){const L=A.EpF();A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Create Invoice"),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),A.NdJ("ngModelChange",function(ot){return s.description=ot}),A.qZA()(),A.TgZ(13,"div",11)(14,"mat-form-field",12)(15,"input",13),A.NdJ("ngModelChange",function(ot){return s.invoiceValue=ot})("keyup",function(){return s.onInvoiceValueChange()}),A.qZA(),A.TgZ(16,"span",14),A._uU(17," Sats "),A.qZA(),A.TgZ(18,"mat-hint"),A._uU(19),A.qZA()(),A.TgZ(20,"mat-form-field",15)(21,"input",16),A.NdJ("ngModelChange",function(ot){return s.expiry=ot}),A.qZA(),A.TgZ(22,"span",14),A._uU(23),A.ALo(24,"titlecase"),A.qZA()(),A.TgZ(25,"mat-form-field",17)(26,"mat-select",18),A.NdJ("selectionChange",function(ot){return s.onTimeUnitChange(ot)}),A.YNc(27,rA,3,4,"mat-option",19),A.qZA()()(),A.TgZ(28,"div",20)(29,"mat-slide-toggle",21),A.NdJ("ngModelChange",function(ot){return s.private=ot}),A._uU(30,"Private Routing Hints"),A.qZA(),A.TgZ(31,"mat-icon",22),A._uU(32,"info_outline"),A.qZA()(),A.YNc(33,Ft,3,2,"div",23),A.TgZ(34,"div",24)(35,"button",25),A.NdJ("click",function(){return s.resetData()}),A._uU(36,"Clear Field"),A.qZA(),A.TgZ(37,"button",26),A.NdJ("click",function(){A.CHM(L);const ot=A.MAs(10);return s.onAddInvoice(ot)}),A._uU(38,"Create Invoice"),A.qZA()()()()()()}2&t&&(A.xp6(6),A.Q6J("mat-dialog-close",!1),A.xp6(6),A.Q6J("ngModel",s.description),A.xp6(3),A.Q6J("ngModel",s.invoiceValue)("step",100)("min",1),A.xp6(4),A.Oqu(s.invoiceValueHint),A.xp6(2),A.Q6J("ngModel",s.expiry)("step",s.selTimeUnit===s.timeUnitEnum.SECS?300:s.selTimeUnit===s.timeUnitEnum.MINS?10:s.selTimeUnit===s.timeUnitEnum.HOURS?2:1)("min",1),A.xp6(2),A.hij(" ",A.lcZ(24,14,s.selTimeUnit)," "),A.xp6(3),A.Q6J("value",s.selTimeUnit),A.xp6(1),A.Q6J("ngForOf",s.timeUnits),A.xp6(2),A.Q6J("ngModel",s.private),A.xp6(4),A.Q6J("ngIf",""!==s.invoiceError))},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,Mt.ZT,g.dn,OA._Y,OA.JL,OA.F,U.KE,H.Nt,OA.Fj,k.h,OA.JJ,OA.On,OA.wV,OA.qQ,b.q,U.R9,U.bx,CA.gD,Et.sg,wA.ey,RA.Rr,p.Hw,eA.gM,Et.O5,e.BN],pipes:[Et.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();var qA=Nt(5566),KA=Nt(7861),DA=Nt(3093);function jA(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"input",7),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().description=L}),A.qZA()(),A.TgZ(4,"mat-form-field",8)(5,"input",9),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().invoiceValue=L})("keyup",function(){return A.CHM(t),A.oxw().onInvoiceValueChange()}),A.qZA(),A.TgZ(6,"span",10),A._uU(7," Sats "),A.qZA(),A.TgZ(8,"mat-hint"),A._uU(9),A.qZA()(),A.TgZ(10,"div",11)(11,"button",12),A.NdJ("click",function(){return A.CHM(t),A.oxw().resetData()}),A._uU(12,"Clear Field"),A.qZA(),A.TgZ(13,"button",13),A.NdJ("click",function(){A.CHM(t);const L=A.MAs(1);return A.oxw().onAddInvoice(L)}),A._uU(14,"Create Invoice"),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.description),A.xp6(2),A.Q6J("ngModel",t.invoiceValue)("step",100)("min",1),A.xp6(4),A.Oqu(t.invoiceValueHint)}}function lt(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",14)(1,"button",15),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDeleteExpiredInvoices()}),A._uU(2,"Delete Expired"),A.qZA(),A.TgZ(3,"button",16),A.NdJ("click",function(){return A.CHM(t),A.oxw().openCreateInvoiceModal()}),A._uU(4,"Create Invoice"),A.qZA()()}}function Lt(r,D){1&r&&A._UZ(0,"mat-progress-bar",46)}function yt(r,D){1&r&&(A.TgZ(0,"th",47),A._uU(1," Expiry Date "),A.qZA())}const Rt=function(r){return{"mr-0":r}};function Vt(r,D){if(1&r&&A._UZ(0,"span",52),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Rt,t.screenSize===t.screenSizeEnum.XS))}}function Le(r,D){if(1&r&&A._UZ(0,"span",53),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Rt,t.screenSize===t.screenSizeEnum.XS))}}function ie(r,D){if(1&r&&A._UZ(0,"span",54),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Rt,t.screenSize===t.screenSizeEnum.XS))}}function te(r,D){if(1&r&&(A.TgZ(0,"td",48),A.YNc(1,Vt,1,3,"span",49),A.YNc(2,Le,1,3,"span",50),A.YNc(3,ie,1,3,"span",51),A._uU(4),A.ALo(5,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Q6J("ngIf","paid"===(null==t?null:t.status)),A.xp6(1),A.Q6J("ngIf","unpaid"===(null==t?null:t.status)),A.xp6(1),A.Q6J("ngIf","expired"===(null==t?null:t.status)),A.xp6(1),A.hij(" ",A.xi3(5,4,1e3*(null==t?null:t.expires_at),"dd/MMM/y HH:mm")," ")}}function ye(r,D){1&r&&(A.TgZ(0,"th",47),A._uU(1," Date Settled "),A.qZA())}function be(r,D){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.paid_at),"dd/MMM/y HH:mm")||"-")}}function Re(r,D){1&r&&(A.TgZ(0,"th",47),A._uU(1," Type "),A.qZA())}function vn(r,D){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11&&!t.label.includes("keysend-")?"Bolt11":"Keysend")}}function Dn(r,D){1&r&&(A.TgZ(0,"th",47),A._uU(1," Description "),A.qZA())}const re=function(r){return{"max-width":r}};function en(r,D){if(1&r&&(A.TgZ(0,"td",48)(1,"div",55)(2,"span",56),A._uU(3),A.qZA()()()),2&r){const t=D.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,re,s.screenSize===s.screenSizeEnum.XS?"10rem":"32rem")),A.xp6(2),A.Oqu(null==t?null:t.description)}}function Te(r,D){1&r&&(A.TgZ(0,"th",57),A._uU(1," Amount (Sats) "),A.qZA())}function nn(r,D){if(1&r&&(A.TgZ(0,"td",48)(1,"span",58),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0"),"")}}function Xe(r,D){1&r&&(A.TgZ(0,"th",57),A._uU(1," Amount Settled (Sats) "),A.qZA())}function bn(r,D){if(1&r&&(A.TgZ(0,"td",48)(1,"span",58),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_received)/1e3,(null==t?null:t.msatoshi_received)<1e3?"1.0-4":"1.0-0"),"")}}function Gn(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",59)(1,"div",60)(2,"mat-select",61),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",62),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}const Jt=function(r){return{"px-3":r}};function bt(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",63)(1,"div",64)(2,"mat-select",65),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",62),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onInvoiceClick(dA)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",62),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onRefreshInvoice(dA)}),A._uU(7,"Refresh"),A.qZA()()()()}if(2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Jt,t.screenSize!==t.screenSizeEnum.XS))}}function Xt(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No invoice available."),A.qZA())}function oe(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting invoices..."),A.qZA())}function In(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function dn(r,D){if(1&r&&(A.TgZ(0,"td",66),A.YNc(1,Xt,2,0,"p",67),A.YNc(2,oe,2,0,"p",67),A.YNc(3,In,2,1,"p",67),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Fn=function(r){return{"display-none":r}};function Kn(r,D){if(1&r&&A._UZ(0,"tr",68),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Fn,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function gr(r,D){1&r&&A._UZ(0,"tr",69)}function Yn(r,D){1&r&&A._UZ(0,"tr",70)}const ZA=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},YA=function(){return["no_invoice"]};function tt(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",17)(1,"div",18)(2,"div",19),A._UZ(3,"fa-icon",20),A.TgZ(4,"span",21),A._uU(5,"Invoices History"),A.qZA()(),A.TgZ(6,"mat-form-field",22)(7,"input",23),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(L){return A.CHM(t),A.oxw().selFilter=L}),A.qZA()()(),A.TgZ(8,"div",24),A.YNc(9,Lt,1,0,"mat-progress-bar",25),A.TgZ(10,"table",26,27),A.ynx(12,28),A.YNc(13,yt,2,0,"th",29),A.YNc(14,te,6,7,"td",30),A.BQk(),A.ynx(15,31),A.YNc(16,ye,2,0,"th",29),A.YNc(17,be,3,4,"td",30),A.BQk(),A.ynx(18,32),A.YNc(19,Re,2,0,"th",29),A.YNc(20,vn,2,1,"td",30),A.BQk(),A.ynx(21,33),A.YNc(22,Dn,2,0,"th",29),A.YNc(23,en,4,4,"td",30),A.BQk(),A.ynx(24,34),A.YNc(25,Te,2,0,"th",35),A.YNc(26,nn,4,4,"td",30),A.BQk(),A.ynx(27,36),A.YNc(28,Xe,2,0,"th",35),A.YNc(29,bn,4,4,"td",30),A.BQk(),A.ynx(30,37),A.YNc(31,Gn,6,0,"th",38),A.YNc(32,bt,8,3,"td",39),A.BQk(),A.ynx(33,40),A.YNc(34,dn,4,3,"td",41),A.BQk(),A.YNc(35,Kn,1,3,"tr",42),A.YNc(36,gr,1,0,"tr",43),A.YNc(37,Yn,1,0,"tr",44),A.qZA()(),A._UZ(38,"mat-paginator",45),A.qZA()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("icon",t.faHistory),A.xp6(4),A.Q6J("ngModel",t.selFilter),A.xp6(2),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.invoices)("ngClass",A.VKq(12,ZA,""!==t.errorMessage)),A.xp6(25),A.Q6J("matFooterRowDef",A.DdM(14,YA)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let UA=(()=>{class r{constructor(t,s,L,dA,ot,Ae,un){this.logger=t,this.store=s,this.decimalPipe=L,this.commonService=dA,this.rtlEffects=ot,this.datePipe=Ae,this.actions=un,this.calledFrom="transactions",this.faHistory=h.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgSticky=!1,this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["expires_at","msatoshi","actions"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["expires_at","description","msatoshi","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["expires_at","type","description","msatoshi","msatoshi_received","actions"]):(this.flgSticky=!0,this.displayedColumns=["expires_at","paid_at","type","description","msatoshi","msatoshi_received","actions"])}ngOnInit(){this.store.select(B.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(B.gc).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.invoiceJSONArr=t.listInvoices.invoices||[],this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(t)}),this.actions.pipe((0,i.R)(this.unSubs[3]),(0,JA.h)(t=>t.type===a.AB.SET_LOOKUP_CLN||t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.SET_LOOKUP_CLN&&this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&t.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(t.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,KA.qR)({payload:{data:{pageSize:this.pageSize,component:j}}}))}onAddInvoice(t){this.invoiceValue||(this.invoiceValue=0);const s=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue,this.store.dispatch((0,ht.Rd)({payload:{label:this.newlyAddedInvoiceMemo,amount:1e3*this.invoiceValue,description:this.description,expiry:s,private:this.private}})),this.resetData()}onDeleteExpiredInvoices(){this.store.dispatch((0,KA.c1)({payload:{data:{type:"CONFIRM",titleMessage:"Delete Expired Invoices",noBtnText:"Cancel",yesBtnText:"Delete Invoices"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[4])).subscribe(t=>{t&&this.store.dispatch((0,ht.g6)({payload:null}))})}onInvoiceClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{invoice:{msatoshi:t.msatoshi,label:t.label,expires_at:t.expires_at,paid_at:t.paid_at,bolt11:t.bolt11,payment_hash:t.payment_hash,description:t.description,status:t.status,msatoshi_received:t.msatoshi_received},newlyAdded:!1,component:qA.y}}}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[5])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,a.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onRefreshInvoice(t){this.store.dispatch((0,ht.n7)({payload:t.label}))}updateInvoicesData(t){this.invoiceJSONArr=this.invoiceJSONArr.map(s=>s.label===t.label?t:s)}loadInvoicesTable(t){this.invoices=new xA.by(t?[...t]:[]),this.invoices.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(s,L)=>((s.paid_at?this.datePipe.transform(new Date(1e3*s.paid_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(s.expires_at?this.datePipe.transform(new Date(1e3*s.expires_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(s.bolt12?"bolt12":s.bolt11?"bolt11":"keysend")+JSON.stringify(s).toLowerCase()).includes(L),this.invoices.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(Et.JJ),A.Y36(C.v),A.Y36(DA.V),A.Y36(Et.uU),A.Y36(Yt.eX))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-lightning-invoices-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},inputs:{calledFrom:"calledFrom"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["matInput","","placeholder","Description","tabindex","2","name","description",3,"ngModel","ngModelChange"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","name","invoiceValue","type","number","tabindex","3",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","9","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","10",3,"click"],["fxLayout","row"],["mat-stroked-button","","color","warn","tabindex","7","type","button",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","expires_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","paid_at"],["matColumnDef","type"],["matColumnDef","description"],["matColumnDef","msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_received"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Paid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unpaid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Expired","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Paid","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Unpaid","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Expired","matTooltipPosition","right",1,"dot","red",3,"ngClass"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,jA,15,5,"form",1),A.YNc(2,lt,5,0,"div",2),A.YNc(3,tt,39,15,"div",3),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf","home"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom))},directives:[Ct.xw,Ct.yH,Ct.Wh,Et.O5,OA._Y,OA.JL,OA.F,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,OA.wV,OA.qQ,b.q,U.R9,U.bx,w.lW,e.BN,q.$V,T.pW,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,eA.gM,Et.PC,Y.Zl,CA.gD,CA.$L,wA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.uU,Et.JJ],styles:[".mat-column-description[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();var PA=Nt(5698),zA=Nt(8104),HA=Nt(9814),$A=Nt(7446);const LA=["sendPaymentForm"],at=["paymentAmt"],VA=["offerAmt"],dt=["paymentReq"],St=["offerReq"];function Ut(r,D){if(1&r&&(A.TgZ(0,"mat-radio-button",22),A._uU(1,"Offer"),A.qZA()),2&r){const t=A.oxw(2);A.s9C("value",t.paymentTypes.OFFER)}}function kt(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-radio-group",18),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().paymentType=L})("change",function(){return A.CHM(t),A.oxw().onPaymentTypeChange()}),A.TgZ(1,"mat-radio-button",19),A._uU(2,"Invoice"),A.qZA(),A.TgZ(3,"mat-radio-button",20),A._uU(4,"Keysend"),A.qZA(),A.YNc(5,Ut,2,1,"mat-radio-button",21),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("ngModel",t.paymentType),A.xp6(1),A.s9C("value",t.paymentTypes.INVOICE),A.xp6(2),A.s9C("value",t.paymentTypes.KEYSEND),A.xp6(2),A.Q6J("ngIf",t.selNode.enableOffers)}}function Wt(r,D){1&r&&A.GkF(0)}function ne(r,D){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentError)}}function wt(r,D){if(1&r&&(A.TgZ(0,"div",23),A._UZ(1,"fa-icon",24),A.YNc(2,ne,2,1,"span",25),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.paymentError)}}function Pt(r,D){if(1&r&&(A.TgZ(0,"mat-hint"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentDecodedHint)}}function jt(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Payment request is required."),A.qZA())}function Ht(r,D){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentDecodedHint)}}function ce(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Payment amount is required."),A.qZA())}function Zt(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",29,30),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw(2).paymentAmount=L})("change",function(L){return A.CHM(t),A.oxw(2).onAmountChange(L)}),A.qZA(),A.TgZ(3,"mat-hint"),A._uU(4,"It is a zero amount invoice, enter amount to be paid."),A.qZA(),A.YNc(5,ce,2,0,"mat-error",25),A.qZA()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.paymentAmount),A.xp6(4),A.Q6J("ngIf",!t.paymentAmount)}}function ue(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"textarea",26,27),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().onPaymentRequestEntry(L)})("matTextareaAutosize",function(){return!0}),A.qZA(),A.YNc(3,Pt,2,1,"mat-hint",25),A.YNc(4,jt,2,0,"mat-error",25),A.YNc(5,Ht,2,1,"mat-error",25),A.qZA(),A.YNc(6,Zt,6,2,"mat-form-field",28)}if(2&r){const t=A.MAs(2),s=A.oxw();A.xp6(1),A.Q6J("ngModel",s.paymentRequest),A.xp6(2),A.Q6J("ngIf",s.paymentRequest&&""!==s.paymentDecodedHint),A.xp6(1),A.Q6J("ngIf",!s.paymentRequest),A.xp6(1),A.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),A.xp6(1),A.Q6J("ngIf",s.zeroAmtInvoice)}}function ge(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Pubkey is required."),A.qZA())}function ve(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Keysend amount is required."),A.qZA())}function Ge(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",31),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().pubkey=L}),A.qZA(),A.YNc(2,ge,2,0,"mat-error",25),A.qZA(),A.TgZ(3,"mat-form-field",1)(4,"input",32,33),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().keysendAmount=L}),A.qZA(),A.YNc(6,ve,2,0,"mat-error",25),A.qZA()}if(2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngModel",t.pubkey),A.xp6(1),A.Q6J("ngIf",!t.pubkey),A.xp6(2),A.Q6J("ngModel",t.keysendAmount),A.xp6(2),A.Q6J("ngIf",!t.keysendAmount)}}function Se(r,D){if(1&r&&(A.TgZ(0,"mat-hint"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.offerDecodedHint)}}function xe(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Offer request is required."),A.qZA())}function Ne(r,D){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.offerDecodedHint)}}function $e(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Offer amount is required."),A.qZA())}function yn(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",40,41),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw(2).offerAmount=L})("change",function(L){return A.CHM(t),A.oxw(2).onAmountChange(L)}),A.qZA(),A.TgZ(3,"mat-hint"),A._uU(4,"It is a zero amount offer, enter amount to be paid."),A.qZA(),A.YNc(5,$e,2,0,"mat-error",25),A.qZA()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.offerAmount),A.xp6(4),A.Q6J("ngIf",!t.offerAmount)}}function an(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",42)(1,"input",43),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw(2).offerTitle=L}),A.qZA()()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.offerTitle)}}function Mn(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"textarea",34,35),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().onPaymentRequestEntry(L)})("matTextareaAutosize",function(){return!0}),A.qZA(),A.YNc(3,Se,2,1,"mat-hint",25),A.YNc(4,xe,2,0,"mat-error",25),A.YNc(5,Ne,2,1,"mat-error",25),A.qZA(),A.YNc(6,yn,6,2,"mat-form-field",28),A.TgZ(7,"div",36)(8,"mat-checkbox",37),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().flgSaveToDB=L}),A._uU(9,"Bookmark Offer"),A.qZA(),A.TgZ(10,"mat-icon",38),A._uU(11,"info_outline"),A.qZA()(),A.YNc(12,an,2,1,"mat-form-field",39)}if(2&r){const t=A.MAs(2),s=A.oxw();A.xp6(1),A.Q6J("ngModel",s.offerRequest),A.xp6(2),A.Q6J("ngIf",s.offerRequest&&""!==s.offerDecodedHint),A.xp6(1),A.Q6J("ngIf",!s.offerRequest),A.xp6(1),A.Q6J("ngIf",null==t.errors?null:t.errors.decodeError),A.xp6(1),A.Q6J("ngIf",s.zeroAmtOffer),A.xp6(2),A.Q6J("ngModel",s.flgSaveToDB),A.xp6(4),A.Q6J("ngIf",s.flgSaveToDB||""!==s.offerTitle)}}let xn=(()=>{class r{constructor(t,s,L,dA,ot,Ae,un,Qe){this.dialogRef=t,this.data=s,this.store=L,this.logger=dA,this.commonService=ot,this.decimalPipe=Ae,this.actions=un,this.dataService=Qe,this.faExclamationTriangle=h.eHv,this.paymentTypes=a.IX,this.paymentType=a.IX.INVOICE,this.selNode={},this.offerDecoded={},this.offerRequest="",this.offerDecodedHint="",this.offerDescription="",this.offerVendor="",this.offerTitle="",this.zeroAmtOffer=!1,this.offerInvoice=null,this.offerAmount=null,this.flgSaveToDB=!1,this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentAmount=null,this.pubkey="",this.keysendAmount=null,this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=a.Vc[0],this.feeLimitTypes=a.Vc,this.paymentError="",this.isCompatibleVersion=!1,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x]}set payReq(t){t&&(this.paymentReq=t)}set offrReq(t){t&&(this.offerReq=t)}ngOnInit(){if(this.data&&this.data.paymentType)switch(this.paymentType=this.data.paymentType,this.paymentType){case a.IX.INVOICE:this.paymentRequest=this.data.invoiceBolt11;break;case a.IX.KEYSEND:this.pubkey=this.data.pubkeyKeysend;break;case a.IX.OFFER:this.onPaymentRequestEntry(this.data.bolt12),this.offerTitle=this.data.offerTitle,this.flgSaveToDB=!1}this.store.select(B.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.isCompatibleVersion=this.commonService.isVersionCompatible(t.version,"0.9.0")&&this.commonService.isVersionCompatible(t.api_version,"0.4.0")}),this.store.select(B.ZW).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.activeChannels=t.activeChannels,this.logger.info(t)}),this.actions.pipe((0,i.R)(this.unSubs[3]),(0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN||t.type===a.AB.SEND_PAYMENT_STATUS_CLN||t.type===a.AB.SET_OFFER_INVOICE_CLN)).subscribe(t=>{t.type===a.AB.SEND_PAYMENT_STATUS_CLN&&this.dialogRef.close(),t.type===a.AB.SET_OFFER_INVOICE_CLN&&(this.offerInvoice=t.payload,this.sendPayment()),t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&("SendPayment"===t.payload.action&&(delete this.paymentDecoded.msatoshi,this.paymentError=t.payload.message),"DecodePayment"===t.payload.action&&(this.paymentType===a.IX.INVOICE&&(this.paymentDecodedHint="ERROR: "+t.payload.message,this.paymentReq.control.setErrors({decodeError:!0})),this.paymentType===a.IX.OFFER&&(this.offerDecodedHint="ERROR: "+t.payload.message,this.offerReq.control.setErrors({decodeError:!0}))),"FetchOfferInvoice"===t.payload.action&&this.paymentType===a.IX.OFFER&&(this.paymentError=t.payload.message))})}onSendPayment(){switch(this.paymentType){case a.IX.KEYSEND:if(!this.pubkey||""===this.pubkey.trim()||!this.keysendAmount||this.keysendAmount<=0)return!0;this.keysendPayment();break;case a.IX.INVOICE:if(!this.paymentRequest||this.zeroAmtInvoice&&(0===this.paymentAmount||!this.paymentAmount))return this.paymentReq.control.markAsTouched(),this.paymentAmt.control.markAsTouched(),!0;this.paymentDecoded.created_at?this.sendPayment():(this.resetInvoiceDetails(),this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,i.R)(this.unSubs[4])).subscribe(t=>{"bolt12 offer"===t.type&&t.offer_id?(this.paymentDecodedHint="ERROR: Select Offer option to pay the bolt12 offer invoice.",this.paymentReq.control.setErrors({decodeError:!0})):(this.paymentDecoded=t,this.setPaymentDecodedDetails())}));break;case a.IX.OFFER:if(!this.offerRequest||this.zeroAmtOffer&&(0===this.offerAmount||!this.offerAmount))return this.offerReq.control.markAsTouched(),this.offerAmt.control.markAsTouched(),!0;this.offerDecoded.offer_id?this.sendPayment():(this.resetOfferDetails(),this.dataService.decodePayment(this.offerRequest,!0).pipe((0,i.R)(this.unSubs[5])).subscribe(t=>{"bolt11 invoice"===t.type&&t.payment_hash?(this.offerDecodedHint="ERROR: Select Invoice option to pay the bolt11 invoice.",this.offerReq.control.setErrors({decodeError:!0})):(this.offerDecoded=t,this.setOfferDecodedDetails())}))}}keysendPayment(){this.store.dispatch((0,ht.oV)({payload:{uiMessage:a.m6.SEND_KEYSEND,paymentType:a.IX.KEYSEND,pubkey:this.pubkey,amount:1e3*this.keysendAmount,fromDialog:!0}}))}sendPayment(){this.paymentError="",this.paymentType===a.IX.INVOICE?this.store.dispatch((0,ht.oV)(this.zeroAmtInvoice?{payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*this.paymentAmount,fromDialog:!0}}:{payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!0}})):this.paymentType===a.IX.OFFER&&this.store.dispatch(this.offerInvoice?(0,ht.oV)({payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.OFFER,invoice:this.offerInvoice.invoice,saveToDB:this.flgSaveToDB,bolt12:this.offerRequest,amount:1e3*this.offerAmount,zeroAmtOffer:this.zeroAmtOffer,title:this.offerTitle,vendor:this.offerVendor,description:this.offerDescription,fromDialog:!0}}):(0,ht.eM)(this.zeroAmtOffer?{payload:{offer:this.offerRequest,msatoshi:1e3*this.offerAmount}}:{payload:{offer:this.offerRequest}}))}onPaymentRequestEntry(t){this.paymentType===a.IX.INVOICE?(this.paymentRequest=t,this.resetInvoiceDetails()):this.paymentType===a.IX.OFFER&&(this.offerRequest=t,this.resetOfferDetails()),t.length>100&&this.dataService.decodePayment(t,!0).pipe((0,i.R)(this.unSubs[6])).subscribe(s=>{this.paymentType===a.IX.INVOICE?"bolt12 offer"===s.type&&s.offer_id?(this.paymentDecodedHint="ERROR: Select Offer option to pay the bolt12 offer invoice.",this.paymentReq.control.setErrors({decodeError:!0})):(this.paymentDecoded=s,this.setPaymentDecodedDetails()):this.paymentType===a.IX.OFFER&&("bolt11 invoice"===s.type&&s.payment_hash?(this.offerDecodedHint="ERROR: Select Invoice option to pay the bolt11 invoice.",this.offerReq.control.setErrors({decodeError:!0})):(this.offerDecoded=s,this.setOfferDecodedDetails()))})}resetOfferDetails(){this.offerInvoice=null,this.offerAmount=null,this.offerDecodedHint="",this.zeroAmtOffer=!1,this.paymentError="",this.offerReq&&this.offerReq.control.setErrors(null)}resetInvoiceDetails(){this.paymentAmount=null,this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentError="",this.paymentReq&&this.paymentReq.control.setErrors(null)}onAmountChange(t){this.paymentType===a.IX.INVOICE&&(delete this.paymentDecoded.msatoshi,this.paymentDecoded.msatoshi=+t.target.value),this.paymentType===a.IX.OFFER&&(delete this.offerDecoded.amount,delete this.offerDecoded.amount_msat,this.offerDecoded.amount=1e3*+t.target.value,this.offerDecoded.amount_msat=t.target.value+"msat")}onPaymentTypeChange(){this.paymentError="",this.paymentDecodedHint="",this.offerDecodedHint="",this.offerInvoice=null}setOfferDecodedDetails(){this.offerDecoded.offer_id&&!this.offerDecoded.amount_msat?(this.offerDecoded.amount_msat="0msat",this.offerDecoded.amount=0,this.zeroAmtOffer=!0,this.offerDescription=this.offerDecoded.description,this.offerVendor=this.offerDecoded.vendor?this.offerDecoded.vendor:this.offerDecoded.issuer?this.offerDecoded.issuer:"",this.offerDecodedHint="Zero Amount Offer | Description: "+this.offerDecoded.description):(this.zeroAmtOffer=!1,this.offerDecoded.amount=+(this.offerDecoded.amount||this.offerDecoded.amount_msat.slice(0,-4)),this.offerAmount=this.offerDecoded.amount?this.offerDecoded.amount/1e3:0,this.offerDescription=this.offerDecoded.description,this.offerVendor=this.offerDecoded.vendor?this.offerDecoded.vendor:this.offerDecoded.issuer?this.offerDecoded.issuer:"",this.selNode.fiatConversion?this.commonService.convertCurrency(this.offerAmount,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[7])).subscribe({next:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,a.Xz.OTHER)+") | Description: "+this.offerDecoded.description},error:t=>{this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description+". Unable to convert currency."}}):this.offerDecodedHint="Sending: "+this.decimalPipe.transform(this.offerAmount)+" Sats | Description: "+this.offerDecoded.description)}setPaymentDecodedDetails(){this.paymentDecoded.created_at&&!this.paymentDecoded.msatoshi?(this.paymentDecoded.msatoshi=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[8])).subscribe({next:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+t.symbol+this.decimalPipe.transform(t.OTHER?t.OTHER:0,a.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:t=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description)}resetData(){switch(this.paymentType){case a.IX.KEYSEND:this.pubkey="",this.keysendAmount=null;break;case a.IX.INVOICE:this.paymentRequest="",this.paymentDecoded={},this.selActiveChannel=null,this.feeLimit=null,this.selFeeLimitType=a.Vc[0],this.resetInvoiceDetails();break;case a.IX.OFFER:this.offerRequest="",this.offerDecoded={},this.flgSaveToDB=!1,this.resetOfferDetails()}this.paymentError=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(E.mQ),A.Y36(C.v),A.Y36(Et.JJ),A.Y36(Yt.eX),A.Y36(zA.D))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-lightning-send-payments"]],viewQuery:function(t,s){if(1&t&&(A.Gf(LA,5),A.Gf(at,5),A.Gf(VA,5),A.Gf(dt,5),A.Gf(St,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.form=L.first),A.iGM(L=A.CRH())&&(s.paymentAmt=L.first),A.iGM(L=A.CRH())&&(s.offerAmt=L.first),A.iGM(L=A.CRH())&&(s.payReq=L.first),A.iGM(L=A.CRH())&&(s.offrReq=L.first)}},decls:25,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","12","fxFlex","10","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["class","my-1","color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",3,"ngModel","ngModelChange","change",4,"ngIf"],["fxLayoutAlign","space-between stretch","fxLayout","column",3,"submit","reset"],["sendPaymentForm","ngForm"],[4,"ngTemplateOutlet"],["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"],["mat-button","","color","primary","type","submit","tabindex","8"],["invoiceBlock",""],["keysendBlock",""],["offerBlock",""],["color","primary","name","paymentType","fxFlex","100","fxLayoutAlign","start start",1,"my-1",3,"ngModel","ngModelChange","change"],["fxFlex","20","tabindex","1",3,"value"],["fxFlex","20","tabindex","2",3,"value"],["fxFlex","20","tabindex","3",3,"value",4,"ngIf"],["fxFlex","20","tabindex","3",3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"],["autoFocus","","matInput","","placeholder","Payment Request","rows","4","name","paymentRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],["fxFlex","100",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["autoFocus","","matInput","","placeholder","Pubkey","name","pubkey","tabindex","4","required","",3,"ngModel","ngModelChange"],["matInput","","placeholder","Amount (Sats)","name","keysendAmount","tabindex","5","required","",3,"ngModel","ngModelChange"],["keysendAmt","ngModel"],["autoFocus","","matInput","","placeholder","Offer Request","rows","4","name","offerRequest","tabindex","4","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["offerReq","ngModel"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"mt-1"],["fxFlex","none","tabindex","6","color","primary",3,"ngModel","ngModelChange"],["matTooltip","Save offer in database for future payments","matTooltipPosition","below","fxFlex","none",1,"info-icon"],["fxFlex","100","class","mt-1",4,"ngIf"],["matInput","","placeholder","Amount (Sats)","name","amountoffer","tabindex","5","required","",3,"ngModel","ngModelChange","change"],["offerAmt","ngModel"],["fxFlex","100",1,"mt-1"],["matInput","","placeholder","Title to Save","tabindex","7",3,"ngModel","ngModelChange"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Send Payment"),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6),A.YNc(9,kt,6,4,"mat-radio-group",7),A.TgZ(10,"form",8,9),A.NdJ("submit",function(){return s.onSendPayment()})("reset",function(){return s.resetData()}),A.YNc(12,Wt,1,0,"ng-container",10),A.YNc(13,wt,3,2,"div",11),A.TgZ(14,"div",12)(15,"button",13),A._uU(16,"Clear Fields"),A.qZA(),A.TgZ(17,"button",14),A._uU(18,"Send Payment"),A.qZA()()()()()(),A.YNc(19,ue,7,5,"ng-template",null,15,A.W1O),A.YNc(21,Ge,7,4,"ng-template",null,16,A.W1O),A.YNc(23,Mn,13,7,"ng-template",null,17,A.W1O)),2&t){const L=A.MAs(20),dA=A.MAs(22),ot=A.MAs(24);A.xp6(6),A.Q6J("mat-dialog-close",!1),A.xp6(3),A.Q6J("ngIf",s.isCompatibleVersion),A.xp6(3),A.Q6J("ngTemplateOutlet",s.paymentType===s.paymentTypes.KEYSEND?dA:s.paymentType===s.paymentTypes.OFFER?ot:L),A.xp6(1),A.Q6J("ngIf",""!==s.paymentError)}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,Mt.ZT,g.dn,Et.O5,HA.VQ,OA.JJ,OA.On,HA.U0,OA._Y,OA.JL,OA.F,Et.tP,e.BN,U.KE,H.Nt,OA.Fj,k.h,OA.Q7,U.bx,U.TO,$A.oG,p.Hw,eA.gM],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();var qe=Nt(4947);const fn=["sendPaymentForm"];function cn(r,D){if(1&r&&(A.TgZ(0,"mat-hint"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.paymentDecodedHint)}}function Xn(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Payment request is required."),A.qZA())}function Yr(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"textarea",7,8),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().onPaymentRequestEntry(L)})("matTextareaAutosize",function(){return!0}),A.qZA(),A.YNc(5,cn,2,1,"mat-hint",9),A.YNc(6,Xn,2,0,"mat-error",9),A.qZA(),A.TgZ(7,"div",10)(8,"button",11),A.NdJ("click",function(){return A.CHM(t),A.oxw().resetData()}),A._uU(9,"Clear Field"),A.qZA(),A.TgZ(10,"button",12),A.NdJ("click",function(){return A.CHM(t),A.oxw().onSendPayment()}),A._uU(11,"Send Payment"),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.paymentRequest),A.xp6(2),A.Q6J("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),A.xp6(1),A.Q6J("ngIf",!t.paymentRequest)}}function Tr(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",13)(1,"button",12),A.NdJ("click",function(){return A.CHM(t),A.oxw().openSendPaymentModal()}),A._uU(2,"Send Payment"),A.qZA()()}}function rr(r,D){1&r&&A._UZ(0,"mat-progress-bar",50)}function Tn(r,D){1&r&&(A.TgZ(0,"th",51),A._uU(1,"Created At"),A.qZA())}const Sn=function(r){return{"mr-0":r}};function mA(r,D){if(1&r&&A._UZ(0,"span",55),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function J(r,D){if(1&r&&A._UZ(0,"span",56),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function N(r,D){if(1&r&&(A.TgZ(0,"td",52),A.YNc(1,mA,1,3,"span",53),A.YNc(2,J,1,3,"span",54),A._uU(3),A.ALo(4,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Q6J("ngIf","complete"===t.status),A.xp6(1),A.Q6J("ngIf","complete"!==t.status),A.xp6(1),A.hij(" ",A.xi3(4,3,1e3*(null==t?null:t.created_at),"dd/MMM/y HH:mm")," ")}}function Z(r,D){1&r&&(A.TgZ(0,"th",51),A._uU(1," Type "),A.qZA())}function K(r,D){if(1&r&&(A.TgZ(0,"td",52),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11?"Bolt11":"Keysend")}}function fA(r,D){1&r&&(A.TgZ(0,"th",51),A._uU(1,"Payment Hash"),A.qZA())}const IA=function(r){return{"max-width":r}};function At(r,D){if(1&r&&(A.TgZ(0,"td",52)(1,"span",57)(2,"span",58),A._uU(3),A.qZA()()()),2&r){const t=D.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(2,IA,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.payment_hash)}}function nt(r,D){1&r&&(A.TgZ(0,"th",59),A._uU(1,"Sats Sent"),A.qZA())}function ut(r,D){if(1&r&&(A.TgZ(0,"td",52)(1,"span",60),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0"))}}function Qt(r,D){1&r&&(A.TgZ(0,"th",59),A._uU(1,"Sats Received"),A.qZA())}function vt(r,D){if(1&r&&(A.TgZ(0,"td",52)(1,"span",60),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0"))}}function xt(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",61)(1,"div",62)(2,"mat-select",63),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",64),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Tt(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",65)(1,"button",66),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onPaymentClick(dA)}),A._uU(2,"View Info"),A.qZA()()}}function Ot(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No payment available."),A.qZA())}function Kt(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting payments..."),A.qZA())}function fe(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function Ee(r,D){if(1&r&&(A.TgZ(0,"td",67),A.YNc(1,Ot,2,0,"p",9),A.YNc(2,Kt,2,0,"p",9),A.YNc(3,fe,2,1,"p",9),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}function pe(r,D){if(1&r&&A._UZ(0,"span",71),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function rn(r,D){if(1&r&&A._UZ(0,"span",72),2&r){const t=A.oxw(3);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function Me(r,D){if(1&r&&A._UZ(0,"span",71),2&r){const t=A.oxw(5);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function je(r,D){if(1&r&&A._UZ(0,"span",72),2&r){const t=A.oxw(5);A.Q6J("ngClass",A.VKq(1,Sn,t.screenSize===t.screenSizeEnum.XS))}}function wn(r,D){if(1&r&&(A.TgZ(0,"span",74),A.YNc(1,Me,1,3,"span",69),A.YNc(2,je,1,3,"span",70),A._uU(3),A.ALo(4,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Q6J("ngIf","complete"===t.status),A.xp6(1),A.Q6J("ngIf","complete"!==t.status),A.xp6(1),A.hij(" ",A.xi3(4,3,1e3*t.created_at,"dd/MMM/y HH:mm")," ")}}function Ke(r,D){if(1&r&&(A.ynx(0),A.YNc(1,wn,5,6,"span",73),A.BQk()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Cn(r,D){if(1&r&&(A.TgZ(0,"td",52)(1,"span",68),A.YNc(2,pe,1,3,"span",69),A.YNc(3,rn,1,3,"span",70),A._uU(4),A.qZA(),A.YNc(5,Ke,2,1,"ng-container",9),A.qZA()),2&r){const t=D.$implicit;A.xp6(2),A.Q6J("ngIf","complete"===t.status),A.xp6(1),A.Q6J("ngIf","complete"!==t.status),A.xp6(1),A.hij(" Total Attempts: ",null==t?null:t.total_parts," "),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function Vn(r,D){if(1&r&&(A.TgZ(0,"span",68),A._uU(1),A.qZA()),2&r){const t=A.oxw(2).$implicit;A.xp6(1),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11?"Bolt11":"Keysend")}}function qn(r,D){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,Vn,2,1,"span",75),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Nn(r,D){if(1&r&&(A.TgZ(0,"td",52)(1,"span",68),A._uU(2),A.qZA(),A.YNc(3,qn,2,1,"span",9),A.qZA()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(null!=t&&t.bolt12?"Bolt12":null!=t&&t.bolt11?"Bolt11":"Keysend"),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function zr(r,D){if(1&r&&(A.TgZ(0,"span",68),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" Part ID ",t.partid?t.partid:0," ")}}function Jn(r,D){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,zr,2,1,"span",75),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function ir(r,D){if(1&r&&(A.TgZ(0,"td",52)(1,"span",76)(2,"span",58),A._uU(3),A.qZA()(),A.YNc(4,Jn,2,1,"span",9),A.qZA()),2&r){const t=D.$implicit,s=A.oxw(2);A.xp6(1),A.Q6J("ngStyle",A.VKq(3,IA,s.screenSize===s.screenSizeEnum.XS?"10rem":"30rem")),A.xp6(2),A.Oqu(null==t?null:t.payment_hash),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function dr(r,D){if(1&r&&(A.TgZ(0,"span",77),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",A.xi3(2,1,t.msatoshi_sent/1e3,t.msatoshi_sent<1e3?"1.0-4":"1.0-0")," ")}}function _n(r,D){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,dr,3,4,"span",78),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Br(r,D){if(1&r&&(A.TgZ(0,"td",52)(1,"span",77),A._uU(2),A.ALo(3,"number"),A.qZA(),A.YNc(4,_n,2,1,"span",9),A.qZA()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,2,(null==t?null:t.msatoshi_sent)/1e3,(null==t?null:t.msatoshi_sent)<1e3?"1.0-4":"1.0-0")),A.xp6(2),A.Q6J("ngIf",t.is_expanded)}}function Lr(r,D){if(1&r&&(A.TgZ(0,"span",77),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",A.xi3(2,1,t.msatoshi/1e3,t.msatoshi<1e3?"1.0-4":"1.0-0")," ")}}function Wn(r,D){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,Lr,3,4,"span",78),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function br(r,D){if(1&r&&(A.TgZ(0,"td",52)(1,"span",77),A._uU(2),A.ALo(3,"number"),A.qZA(),A.YNc(4,Wn,2,1,"span",9),A.qZA()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,2,(null==t?null:t.msatoshi)/1e3,(null==t?null:t.msatoshi)<1e3?"1.0-4":"1.0-0")),A.xp6(2),A.Q6J("ngIf",t.is_expanded)}}function Mr(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",60)(1,"button",82),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(4).onPaymentClick(dA)}),A._uU(2),A.qZA()()}if(2&r){const t=D.$implicit;A.xp6(2),A.hij("View ",t.partid?t.partid:0,"")}}function Gr(r,D){if(1&r&&(A.TgZ(0,"div"),A.YNc(1,Mr,3,1,"div",81),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Q6J("ngForOf",null==t?null:t.mpps)}}function Hr(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",79)(1,"span",60)(2,"button",80),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return dA.is_expanded=!dA.is_expanded}),A._uU(3),A.qZA()(),A.YNc(4,Gr,2,1,"div",9),A.qZA()}if(2&r){const t=D.$implicit;A.xp6(3),A.Oqu(t.is_expanded?"Hide":"Show"),A.xp6(1),A.Q6J("ngIf",t.is_expanded)}}function si(r,D){1&r&&A._UZ(0,"tr",83)}const Jr=function(r){return{"display-none":r}};function ar(r,D){if(1&r&&A._UZ(0,"tr",84),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Jr,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function Or(r,D){1&r&&A._UZ(0,"tr",85)}function Zn(r,D){1&r&&A._UZ(0,"tr",83)}const Li=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},bi=function(){return["no_payment"]};function oo(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",14)(1,"div",15)(2,"div",16),A._UZ(3,"fa-icon",17),A.TgZ(4,"span",18),A._uU(5,"Payments History"),A.qZA()(),A.TgZ(6,"mat-form-field",19)(7,"input",20),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(L){return A.CHM(t),A.oxw().selFilter=L}),A.qZA()()(),A.TgZ(8,"div",21)(9,"div",22),A.YNc(10,rr,1,0,"mat-progress-bar",23),A.TgZ(11,"table",24,25),A.ynx(13,26),A.YNc(14,Tn,2,0,"th",27),A.YNc(15,N,5,6,"td",28),A.BQk(),A.ynx(16,29),A.YNc(17,Z,2,0,"th",27),A.YNc(18,K,2,1,"td",28),A.BQk(),A.ynx(19,30),A.YNc(20,fA,2,0,"th",27),A.YNc(21,At,4,4,"td",28),A.BQk(),A.ynx(22,31),A.YNc(23,nt,2,0,"th",32),A.YNc(24,ut,4,4,"td",28),A.BQk(),A.ynx(25,33),A.YNc(26,Qt,2,0,"th",32),A.YNc(27,vt,4,4,"td",28),A.BQk(),A.ynx(28,34),A.YNc(29,xt,6,0,"th",35),A.YNc(30,Tt,3,0,"td",36),A.BQk(),A.ynx(31,37),A.YNc(32,Ee,4,3,"td",38),A.BQk(),A.ynx(33,39),A.YNc(34,Cn,6,4,"td",28),A.BQk(),A.ynx(35,40),A.YNc(36,Nn,4,2,"td",28),A.BQk(),A.ynx(37,41),A.YNc(38,ir,5,5,"td",28),A.BQk(),A.ynx(39,42),A.YNc(40,Br,5,5,"td",28),A.BQk(),A.ynx(41,43),A.YNc(42,br,5,5,"td",28),A.BQk(),A.ynx(43,44),A.YNc(44,Hr,5,2,"td",45),A.BQk(),A.YNc(45,si,1,0,"tr",46),A.YNc(46,ar,1,3,"tr",47),A.YNc(47,Or,1,0,"tr",48),A.YNc(48,Zn,1,0,"tr",46),A.qZA()()(),A._UZ(49,"mat-paginator",49),A.qZA()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("icon",t.faHistory),A.xp6(4),A.Q6J("ngModel",t.selFilter),A.xp6(3),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.payments)("ngClass",A.VKq(15,Li,""!==t.errorMessage)),A.xp6(34),A.Q6J("matRowDefColumns",t.mppColumns)("matRowDefWhen",t.is_group),A.xp6(1),A.Q6J("matFooterRowDef",A.DdM(17,bi)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)("matRowDefWhen",!t.is_group),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let aa=(()=>{class r{constructor(t,s,L,dA,ot,Ae,un,Qe,tn){this.logger=t,this.commonService=s,this.store=L,this.rtlEffects=dA,this.clnEffects=ot,this.decimalPipe=Ae,this.titleCasePipe=un,this.datePipe=Qe,this.dataService=tn,this.calledFrom="transactions",this.faHistory=h.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.paymentJSONArr=[],this.displayedColumns=[],this.mppColumns=[],this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["created_at","actions"],this.mppColumns=["groupTotal","groupAction"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["created_at","msatoshi","actions"],this.mppColumns=["groupTotal","groupAmtRecv","groupAction"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["created_at","type","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupType","groupAmtSent","groupAmtRecv","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["created_at","type","payment_hash","msatoshi_sent","msatoshi","actions"],this.mppColumns=["groupTotal","groupType","groupHash","groupAmtSent","groupAmtRecv","groupAction"])}ngOnInit(){this.store.select(B.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(B.PP).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.paymentJSONArr=t.payments||[],this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr)}is_group(t,s){return s.is_group}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.created_at?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.created_at?(this.paymentDecoded.msatoshi||(this.paymentDecoded.msatoshi=0),this.sendPayment()):this.resetData()})}sendPayment(){this.newlyAddedPayment=this.paymentDecoded.payment_hash,this.paymentDecoded.msatoshi&&0!==this.paymentDecoded.msatoshi?(this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:50,type:a.Gi.DATE_TIME},{key:"num_satoshis",value:this.paymentDecoded.msatoshi/1e3,title:"Amount (Sats)",width:50,type:a.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:a.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,PA.q)(1)).subscribe(s=>{s&&(this.store.dispatch((0,ht.oV)({payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"payee",value:this.paymentDecoded.payee,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"created_at",value:this.paymentDecoded.created_at,title:"Creation Date",width:40,type:a.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:a.Gi.NUMBER},{key:"min_finaltv_expiry",value:this.paymentDecoded.min_final_cltv_expiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",getInputs:[{placeholder:"Amount (Sats)",inputType:a.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,PA.q)(1)).subscribe(L=>{L&&(this.paymentDecoded.msatoshi=L[0].inputValue,this.store.dispatch((0,ht.oV)({payload:{uiMessage:a.m6.SEND_PAYMENT,paymentType:a.IX.INVOICE,invoice:this.paymentRequest,amount:1e3*L[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,i.R)(this.unSubs[1])).subscribe(s=>{this.paymentDecoded=s,this.paymentDecoded.msatoshi?this.selNode.fiatConversion?this.commonService.convertCurrency(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[3])).subscribe({next:L=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats ("+L.symbol+this.decimalPipe.transform(L.OTHER?L.OTHER:0,a.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:L=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.msatoshi?this.paymentDecoded.msatoshi/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description:this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description})}openSendPaymentModal(){this.store.dispatch((0,KA.qR)({payload:{data:{component:xn}}}))}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}onPaymentClick(t){const s=[[{key:"payment_preimage",value:t.payment_preimage,title:"Payment Preimage",width:100,type:a.Gi.STRING}],[{key:"id",value:t.id,title:"ID",width:20,type:a.Gi.STRING},{key:"destination",value:t.destination,title:"Destination",width:80,type:a.Gi.STRING}],[{key:"created_at",value:t.created_at,title:"Creation Date",width:50,type:a.Gi.DATE_TIME},{key:"status",value:this.titleCasePipe.transform(t.status),title:"Status",width:50,type:a.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"Amount (mSats)",width:50,type:a.Gi.NUMBER},{key:"msatoshi_sent",value:t.msatoshi_sent,title:"Amount Sent (mSats)",width:50,type:a.Gi.NUMBER}]];t.bolt11&&""!==t.bolt11&&s.unshift([{key:"bolt11",value:t.bolt11,title:"Bolt 11",width:100,type:a.Gi.STRING}]),t.bolt12&&""!==t.bolt12&&s.unshift([{key:"bolt12",value:t.bolt12,title:"Bolt 12",width:100,type:a.Gi.STRING}]),t.memo&&""!==t.memo&&s.splice(2,0,[{key:"memo",value:t.memo,title:"Memo",width:100,type:a.Gi.STRING}]),t.hasOwnProperty("partid")?s.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:80,type:a.Gi.STRING},{key:"partid",value:t.partid,title:"Part ID",width:20,type:a.Gi.STRING}]):s.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:a.Gi.STRING}]),this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Payment Information",message:s}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}loadPaymentsTable(t){this.payments=new xA.by(t?[...t]:[]),this.payments.data=this.paymentJSONArr,this.payments.sort=this.sort,this.payments.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.payments.filterPredicate=(s,L)=>((s.created_at?this.datePipe.transform(new Date(1e3*s.created_at),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(s.bolt12?"bolt12":s.bolt11?"bolt11":"keysend")+JSON.stringify(s).toLowerCase()).includes(L),this.payments.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const s=JSON.parse(JSON.stringify(this.payments.data)).reduce((L,dA)=>dA.mpps?L.concat(dA.mpps):(delete dA.is_group,delete dA.is_expanded,delete dA.total_parts,L.concat(dA)),[]);this.commonService.downloadFile(s,"Payments")}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(DA.V),A.Y36(qe.J),A.Y36(Et.JJ),A.Y36(Et.rS),A.Y36(Et.uU),A.Y36(zA.D))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-lightning-payments"]],viewQuery:function(t,s){if(1&t&&(A.Gf(fn,5),A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.form=L.first),A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},inputs:{calledFrom:"calledFrom"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","created_at"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","type"],["matColumnDef","payment_hash"],["matColumnDef","msatoshi_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","groupTotal"],["matColumnDef","groupType"],["matColumnDef","groupHash"],["matColumnDef","groupAmtSent"],["matColumnDef","groupAmtRecv"],["matColumnDef","groupAction"],["mat-cell","","class","px-3",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Failed","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"mpp-row-span"],["class","dot green mt-0","matTooltip","Completed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow mt-0","matTooltip","Incomplete/Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Completed","matTooltipPosition","right",1,"dot","green","mt-0",3,"ngClass"],["matTooltip","Incomplete/Failed","matTooltipPosition","right",1,"dot","yellow","mt-0",3,"ngClass"],["fxLayoutAlign","start center","class","mpp-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"mpp-row-span","pl-3"],["fxLayoutAlign","start center","class","mpp-row-span",4,"ngFor","ngForOf"],["fxLayout","row",1,"ellipsis-parent","mpp-row-span",3,"ngStyle"],["fxLayoutAlign","end center",1,"mpp-row-span"],["fxLayoutAlign","end center","class","mpp-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-mpp-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-mpp-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,Yr,12,3,"form",1),A.YNc(2,Tr,3,0,"div",2),A.YNc(3,oo,50,18,"div",3),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf","home"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom),A.xp6(1),A.Q6J("ngIf","transactions"===s.calledFrom))},directives:[Ct.xw,Ct.yH,Ct.Wh,Et.O5,OA._Y,OA.JL,OA.F,U.KE,H.Nt,OA.Fj,OA.Q7,q.$V,OA.JJ,OA.On,U.bx,U.TO,w.lW,e.BN,T.pW,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,eA.gM,Et.PC,Y.Zl,CA.gD,CA.$L,wA.ey,xA.mD,xA.yh,Et.sg,xA.nj,xA.Gk,xA.Ke,xA.Q2,xA.as,xA.XQ,WA.NW],pipes:[Et.uU,Et.JJ],styles:[".mat-column-payment_hash[_ngcontent-%COMP%]{flex:0 0 25%;width:25%}.mat-column-payment_hash[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%], .mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-mpp-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.mpp-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:17rem}"]}),r})();function so(r,D){if(1&r&&(A.TgZ(0,"button",26)(1,"mat-icon"),A._uU(2,"more_vert"),A.qZA()()),2&r){A.oxw();const t=A.MAs(11);A.Q6J("matMenuTriggerFor",t)}}function lo(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){const dA=A.CHM(t).index,ot=A.oxw().$implicit;return A.oxw(2).onNavigateTo(ot.links[dA])}),A._uU(1),A.qZA()}if(2&r){const t=D.$implicit;A.xp6(1),A.Oqu(t)}}function co(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){return A.CHM(t),A.oxw(3).onsortChannelsBy()}),A._uU(1),A.qZA()}if(2&r){const t=A.oxw(3);A.xp6(1),A.hij("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}function go(r,D){1&r&&A._UZ(0,"mat-progress-bar",28)}function Bo(r,D){if(1&r&&A._UZ(0,"rtl-cln-node-info",29),2&r){const t=A.oxw(3);A.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function oa(r,D){if(1&r&&A._UZ(0,"rtl-cln-balances-info",30),2&r){const t=A.oxw(3);A.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function uo(r,D){if(1&r&&A._UZ(0,"rtl-cln-channel-capacity-info",31),2&r){const t=A.oxw(3);A.Q6J("sortBy",t.sortField)("channelBalances",t.channelBalances)("activeChannels",t.activeChannelsCapacity)("errorMessage",t.errorMessages[4]+" "+t.errorMessages[3])}}function sa(r,D){if(1&r&&A._UZ(0,"rtl-cln-fee-info",32),2&r){const t=A.oxw(3);A.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[4]+" "+t.errorMessages[5])}}function la(r,D){if(1&r&&A._UZ(0,"rtl-cln-channel-status-info",33),2&r){const t=A.oxw(3);A.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function fo(r,D){1&r&&(A.TgZ(0,"h3"),A._uU(1,"Error! Unable to find information!"),A.qZA())}const ca=function(r){return{"dashboard-card-content":!0,"error-border":r}};function ho(r,D){if(1&r&&(A.TgZ(0,"mat-grid-tile",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-title",10)(4,"div"),A._UZ(5,"fa-icon",11),A.TgZ(6,"span"),A._uU(7),A.qZA()(),A.TgZ(8,"div"),A.YNc(9,so,3,1,"button",12),A.TgZ(10,"mat-menu",13,14),A.YNc(12,lo,2,1,"button",15),A.YNc(13,co,2,1,"button",16),A.qZA()()()(),A.TgZ(14,"mat-card-content",17),A.YNc(15,go,1,0,"mat-progress-bar",18),A.TgZ(16,"div",19),A.YNc(17,Bo,1,2,"rtl-cln-node-info",20),A.YNc(18,oa,1,2,"rtl-cln-balances-info",21),A.YNc(19,uo,1,4,"rtl-cln-channel-capacity-info",22),A.YNc(20,sa,1,2,"rtl-cln-fee-info",23),A.YNc(21,la,1,2,"rtl-cln-channel-status-info",24),A.YNc(22,fo,2,0,"h3",25),A.qZA()()()()),2&r){const t=D.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(5),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(2),A.Q6J("ngIf",t.links[0]),A.xp6(3),A.Q6J("ngForOf",t.goToOptions),A.xp6(1),A.Q6J("ngIf","capacity"===t.id),A.xp6(1),A.s9C("fxFlex","capacity"===t.id?90:70),A.Q6J("ngClass",A.VKq(16,ca,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"capacity"===t.id&&(s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.ERROR)||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR))),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"capacity"===t.id&&(s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.INITIATED)||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","balance"),A.xp6(1),A.Q6J("ngSwitchCase","capacity"),A.xp6(1),A.Q6J("ngSwitchCase","fee"),A.xp6(1),A.Q6J("ngSwitchCase","status")}}function Eo(r,D){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3),A._UZ(2,"fa-icon",4),A.TgZ(3,"span",5),A._uU(4),A.qZA()(),A.TgZ(5,"mat-grid-list",6),A.YNc(6,ho,23,18,"mat-grid-tile",7),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Q6J("icon",t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.ERROR?t.faFrown:t.faSmile),A.xp6(2),A.Oqu(t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.COMPLETED?"Welcome "+t.information.alias+"! Your node is up and running.":t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),A.xp6(1),A.Q6J("rowHeight",t.operatorCardHeight),A.xp6(1),A.Q6J("ngForOf",t.operatorCards)}}function wo(r,D){if(1&r&&(A.TgZ(0,"button",26)(1,"mat-icon"),A._uU(2,"more_vert"),A.qZA()()),2&r){A.oxw();const t=A.MAs(9);A.Q6J("matMenuTriggerFor",t)}}function Co(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){const dA=A.CHM(t).index,ot=A.oxw(2).$implicit;return A.oxw(2).onNavigateTo(ot.links[dA])}),A._uU(1),A.qZA()}if(2&r){const t=D.$implicit;A.xp6(1),A.Oqu(t)}}function Qo(r,D){if(1&r&&(A.TgZ(0,"mat-card-header")(1,"mat-card-title",10)(2,"div"),A._UZ(3,"fa-icon",11),A.TgZ(4,"span"),A._uU(5),A.qZA()(),A.TgZ(6,"div"),A.YNc(7,wo,3,1,"button",12),A.TgZ(8,"mat-menu",13,42),A.YNc(10,Co,2,1,"button",15),A.qZA()()()()),2&r){const t=A.oxw().$implicit;A.xp6(3),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(2),A.Q6J("ngIf",t.links[0]),A.xp6(3),A.Q6J("ngForOf",t.goToOptions)}}function Mo(r,D){1&r&&A._UZ(0,"mat-progress-bar",28)}function po(r,D){if(1&r&&A._UZ(0,"rtl-cln-node-info",43),2&r){const t=A.oxw(3);A.Q6J("information",t.information)}}function Io(r,D){if(1&r&&A._UZ(0,"rtl-cln-balances-info",30),2&r){const t=A.oxw(3);A.Q6J("balances",t.balances)("errorMessage",t.errorMessages[2]+" "+t.errorMessages[3])}}function ga(r,D){if(1&r&&A._UZ(0,"rtl-cln-channel-liquidity-info",44),2&r){const t=A.oxw(3);A.Q6J("direction","In")("totalLiquidity",t.totalInboundLiquidity)("activeChannels",t.allInboundChannels)("errorMessage",t.errorMessages[4])}}function mo(r,D){if(1&r&&A._UZ(0,"rtl-cln-channel-liquidity-info",44),2&r){const t=A.oxw(3);A.Q6J("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("activeChannels",t.allOutboundChannels)("errorMessage",t.errorMessages[4])}}function vo(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"button",27),A.NdJ("click",function(){const dA=A.CHM(t).index,ot=A.oxw(3).$implicit;return A.oxw(2).onNavigateTo(ot.links[dA])}),A._uU(1),A.qZA()}if(2&r){const t=D.$implicit;A.xp6(1),A.Oqu(t)}}function Do(r,D){if(1&r&&(A.TgZ(0,"button",26)(1,"mat-icon"),A._uU(2,"more_vert"),A.qZA()(),A.TgZ(3,"mat-menu",13,53),A.YNc(5,vo,2,1,"button",15),A.qZA()),2&r){const t=A.MAs(4),s=A.oxw(2).$implicit;A.Q6J("matMenuTriggerFor",t),A.xp6(5),A.Q6J("ngForOf",s.goToOptions)}}function yo(r,D){1&r&&(A.TgZ(0,"span",45)(1,"mat-tab-group",46)(2,"mat-tab",47),A._UZ(3,"rtl-cln-lightning-invoices-table",48),A.qZA(),A.TgZ(4,"mat-tab",49),A._UZ(5,"rtl-cln-lightning-payments",50),A.qZA(),A.TgZ(6,"mat-tab",51),A.YNc(7,Do,6,2,"ng-template",52),A.qZA()()()),2&r&&(A.xp6(3),A.Q6J("calledFrom","home"),A.xp6(2),A.Q6J("calledFrom","home"),A.xp6(1),A.Q6J("disabled",!0))}function $n(r,D){1&r&&(A.TgZ(0,"h3"),A._uU(1,"Error! Unable to find information!"),A.qZA())}const ur=function(r){return{"p-0":r}};function li(r,D){if(1&r&&(A.TgZ(0,"mat-grid-tile",8)(1,"mat-card",36),A.YNc(2,Qo,11,4,"mat-card-header",37),A.TgZ(3,"mat-card-content",38),A.YNc(4,Mo,1,0,"mat-progress-bar",18),A.TgZ(5,"div",19),A.YNc(6,po,1,1,"rtl-cln-node-info",39),A.YNc(7,Io,1,2,"rtl-cln-balances-info",21),A.YNc(8,ga,1,4,"rtl-cln-channel-liquidity-info",40),A.YNc(9,mo,1,4,"rtl-cln-channel-liquidity-info",40),A.YNc(10,yo,8,3,"span",41),A.YNc(11,$n,2,0,"h3",25),A.qZA()()()()),2&r){const t=D.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(1),A.Q6J("ngClass",A.VKq(13,ur,"transactions"===t.id)),A.xp6(1),A.Q6J("ngIf","transactions"!==t.id),A.xp6(1),A.s9C("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),A.Q6J("ngClass",A.VKq(15,ca,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR)),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"balance"===t.id&&(s.apiCallStatusBalance.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","balance"),A.xp6(1),A.Q6J("ngSwitchCase","inboundLiq"),A.xp6(1),A.Q6J("ngSwitchCase","outboundLiq"),A.xp6(1),A.Q6J("ngSwitchCase","transactions")}}function xo(r,D){if(1&r&&(A.TgZ(0,"div",34),A._UZ(1,"fa-icon",4),A.TgZ(2,"span",5),A._uU(3),A.qZA()(),A.TgZ(4,"mat-grid-list",35),A.YNc(5,li,12,17,"mat-grid-tile",7),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faSmile),A.xp6(2),A.hij("Welcome ",t.information.alias,"! Your node is up and running."),A.xp6(1),A.Q6J("rowHeight",t.merchantCardHeight),A.xp6(1),A.Q6J("ngForOf",t.merchantCards)}}let Fo=(()=>{class r{constructor(t,s,L,dA){this.logger=t,this.store=s,this.commonService=L,this.router=dA,this.faSmile=l.ctA,this.faFrown=l.KfU,this.faAngleDoubleDown=h.Sbq,this.faAngleDoubleUp=h.Vfw,this.faChartPie=h.OS1,this.faBolt=h.BDt,this.faServer=h.xf3,this.faNetworkWired=h.kXW,this.userPersonaEnum=a.ol,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.totalBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.activeChannels=[],this.channelsStatus={active:{},pending:{},inactive:{}},this.activeChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="330px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.errorMessages=["","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusFees=null,this.apiCallStatusBalance=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFHistory=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.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/pending"],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===a.cu.SM||this.screenSize===a.cu.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/pending"],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/pending"],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(B.Hz).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.errorMessages[5]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusFHistory=t.apisCallStatus[1],this.apiCallStatusNodeInfo.status===a.Bn.ERROR&&(this.errorMessages[0]=this.apiCallStatusNodeInfo.message?"object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message:""),this.apiCallStatusFHistory.status===a.Bn.ERROR&&(this.errorMessages[5]=this.apiCallStatusFHistory.message?"object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message:""),this.selNode=t.nodeSettings,this.information=t.information}),this.store.select(B.JG).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===a.Bn.ERROR&&(this.errorMessages[1]=this.apiCallStatusFees.message?"object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message:""),this.fees=t.fees,this.logger.info(t)}),this.store.select(B.ZW).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusChannels=t.apiCallStatus,this.apiCallStatusChannels.status===a.Bn.ERROR&&(this.errorMessages[4]=this.apiCallStatusChannels.message?"object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message:""),this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.activeChannels=t.activeChannels,this.activeChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels,"balancedness")))||[],this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter(s=>!!s.msatoshi_to_them&&s.msatoshi_to_them>0),"msatoshi_to_them")))||[],this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.activeChannels.filter(s=>!!s.msatoshi_to_us&&s.msatoshi_to_us>0),"msatoshi_to_us")))||[],this.activeChannels.forEach(s=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil((s.msatoshi_to_them||0)/1e3),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor((s.msatoshi_to_us||0)/1e3)}),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.logger.info(t)}),this.store.select(B.Rn).pipe((0,i.R)(this.unSubs[3]),(0,o.M)(this.store.select(B.Wj))).subscribe(([t,s])=>{this.errorMessages[2]="",this.apiCallStatusBalance=t.apiCallStatus,this.apiCallStatusBalance.status===a.Bn.ERROR&&(this.errorMessages[2]=this.apiCallStatusBalance.message?"object"==typeof this.apiCallStatusBalance.message?JSON.stringify(this.apiCallStatusBalance.message):this.apiCallStatusBalance.message:""),this.errorMessages[3]="",this.apiCallStatusLRBal=s.apiCallStatus,this.apiCallStatusLRBal.status===a.Bn.ERROR&&(this.errorMessages[3]=this.apiCallStatusLRBal.message?"object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message:""),this.totalBalance=t.balance,this.balances.onchain=t.balance.totalBalance||0,this.balances.lightning=s.localRemoteBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const L=s.localRemoteBalance.localBalance?+s.localRemoteBalance.localBalance:0,dA=s.localRemoteBalance.remoteBalance?+s.localRemoteBalance.remoteBalance:0;this.channelBalances={localBalance:L,remoteBalance:dA,balancedness:+(1-Math.abs((L-dA)/(L+dA))).toFixed(3)},this.channelsStatus.active.capacity=s.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=s.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=s.localRemoteBalance.inactiveBalance||0,this.logger.info(t),this.logger.info(s)})}onNavigateTo(t){this.router.navigateByUrl("/cln/"+t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.activeChannelsCapacity=this.activeChannels.sort((t,s)=>{const L=(t.msatoshi_to_us?+t.msatoshi_to_us:0)+(t.msatoshi_to_them?+t.msatoshi_to_them:0),dA=(s.msatoshi_to_them?+s.msatoshi_to_them:0)+(s.msatoshi_to_them?+s.msatoshi_to_them:0);return L>dA?-1:L{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-0"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10",3,"rowHeight"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click",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","activeChannels","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","activeChannels","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container","mb-0"],["cols","6",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","activeChannels","errorMessage"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start"],["fxLayout","column",1,"w-100","dashboard-tabs-group"],["label","Receive"],[1,"h-100",3,"calledFrom"],["label","Pay"],[3,"calledFrom"],[3,"disabled"],["mat-tab-label",""],["menuTransactions","matMenu"]],template:function(t,s){if(1&t&&(A.YNc(0,Eo,7,4,"div",0),A.YNc(1,xo,6,4,"ng-template",null,1,A.W1O)),2&t){const L=A.MAs(2);A.Q6J("ngIf",(null==s.selNode?null:s.selNode.userPersona)===s.userPersonaEnum.OPERATOR)("ngIfElse",L)}},directives:[Et.O5,Ct.xw,Ct.Wh,e.BN,f.Il,Et.sg,f.DX,g.a8,Ct.yH,g.dk,g.n5,w.lW,Q.p6,p.Hw,Q.VK,Q.OP,g.dn,Et.mk,Y.oO,T.pW,Et.RF,Et.n9,P,z,_,SA,X,Et.ED,It,ft.SP,ft.uX,UA,aa,ft.uD],styles:[""]}),r})();var Ba=Nt(9841),Yo=Nt(8012),ua=Nt(8377),Sr=Nt(7261),or=Nt(1125),pr=Nt(5615);const To=["form"],So=["formSweepAll"],No=["stepper"];function Uo(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Bitcoin address is required."),A.qZA())}function Po(r,D){1&r&&(A.TgZ(0,"mat-hint"),A._uU(1,"Amount replaced by UTXO balance"),A.qZA())}function Ro(r,D){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.amountError)}}function zo(r,D){if(1&r&&(A.TgZ(0,"mat-option",38),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(t)}}function Lo(r,D){if(1&r&&(A.TgZ(0,"mat-option",38),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function bo(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function Go(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",39)(1,"input",40,41),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw(2).customFeeRate=L}),A.qZA(),A.YNc(3,bo,2,0,"mat-error",14),A.qZA()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),A.xp6(2),A.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function Ho(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function fa(r,D){if(1&r&&(A.TgZ(0,"mat-option",38),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t),A.xp6(1),A.hij("",A.lcZ(2,2,t.value)," Sats")}}function Jo(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",23)(1,"mat-expansion-panel",42),A.NdJ("closed",function(){return A.CHM(t),A.oxw(2).onAdvancedPanelToggle(!0)})("opened",function(){return A.CHM(t),A.oxw(2).onAdvancedPanelToggle(!1)}),A.TgZ(2,"mat-expansion-panel-header")(3,"mat-panel-title")(4,"span"),A._uU(5),A.qZA()()(),A.TgZ(6,"div",22)(7,"div",43)(8,"mat-form-field",44)(9,"mat-select",45),A.NdJ("selectionChange",function(L){return A.CHM(t),A.oxw(2).onUTXOSelectionChange(L)})("valueChange",function(L){return A.CHM(t),A.oxw(2).selUTXOs=L}),A.TgZ(10,"mat-select-trigger"),A._uU(11),A.ALo(12,"number"),A.qZA(),A.YNc(13,fa,3,4,"mat-option",21),A.qZA()(),A.TgZ(14,"div",46)(15,"mat-slide-toggle",47),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw(2).flgUseAllBalance=L})("change",function(){return A.CHM(t),A.oxw(2).onUTXOAllBalanceChange()}),A._uU(16," Use selected UTXOs balance "),A.qZA(),A.TgZ(17,"mat-icon",48),A._uU(18,"info_outline"),A.qZA()()()()()()}if(2&r){const t=A.oxw(2);A.xp6(5),A.Oqu(t.advancedTitle),A.xp6(4),A.Q6J("value",t.selUTXOs),A.xp6(2),A.AsE("",A.lcZ(12,7,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),A.xp6(2),A.Q6J("ngForOf",t.utxos),A.xp6(2),A.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function Oo(r,D){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.sendFundError)}}function ko(r,D){if(1&r&&(A.TgZ(0,"div",49),A._UZ(1,"fa-icon",50),A.YNc(2,Oo,2,1,"span",14),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.sendFundError)}}const ha=function(r,D){return{"mr-6":r,"mr-2":D}};function jo(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"form",9,10),A.NdJ("submit",function(){return A.CHM(t),A.oxw().onSendFunds()})("reset",function(){return A.CHM(t),A.oxw().resetData()}),A.TgZ(2,"mat-form-field",11)(3,"input",12,13),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().transaction.address=L}),A.qZA(),A.YNc(5,Uo,2,0,"mat-error",14),A.qZA(),A.TgZ(6,"mat-form-field",15)(7,"input",16,17),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().transaction.satoshis=L}),A.qZA(),A.YNc(9,Po,2,0,"mat-hint",14),A.TgZ(10,"span",18),A._uU(11),A.qZA(),A.YNc(12,Ro,2,1,"mat-error",14),A.qZA(),A.TgZ(13,"mat-form-field",19)(14,"mat-select",20),A.NdJ("selectionChange",function(L){return A.CHM(t),A.oxw().onAmountUnitChange(L)}),A.YNc(15,zo,2,2,"mat-option",21),A.qZA()(),A.TgZ(16,"div",22)(17,"div",23)(18,"div",24)(19,"mat-form-field",25)(20,"mat-select",26),A.NdJ("valueChange",function(L){return A.CHM(t),A.oxw().selFeeRate=L})("selectionChange",function(){return A.CHM(t),A.oxw().customFeeRate=null}),A.YNc(21,Lo,2,2,"mat-option",21),A.qZA()(),A.YNc(22,Go,4,5,"mat-form-field",27),A.qZA(),A.TgZ(23,"div",28)(24,"mat-checkbox",29),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().flgMinConf=L})("change",function(){A.CHM(t);const L=A.oxw();return L.flgMinConf?L.selFeeRate=null:L.minConfValue=null}),A.qZA(),A.TgZ(25,"mat-form-field",30)(26,"input",31,32),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().minConfValue=L}),A.qZA(),A.YNc(28,Ho,2,0,"mat-error",14),A.qZA()()(),A.YNc(29,Jo,19,9,"div",33),A._UZ(30,"div",22),A.YNc(31,ko,3,2,"div",34),A.TgZ(32,"div",35)(33,"button",36),A._uU(34,"Clear Fields"),A.qZA(),A.TgZ(35,"button",37),A._uU(36,"Send Funds"),A.qZA()()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.transaction.address),A.xp6(2),A.Q6J("ngIf",!t.transaction.address),A.xp6(2),A.Q6J("ngModel",t.transaction.satoshis)("type",t.flgUseAllBalance?"text":"number")("step",100)("min",0)("disabled",t.flgUseAllBalance),A.xp6(2),A.Q6J("ngIf",t.flgUseAllBalance),A.xp6(2),A.hij(" ",t.selAmountUnit," "),A.xp6(1),A.Q6J("ngIf",!t.transaction.satoshis),A.xp6(2),A.Q6J("value",t.selAmountUnit)("disabled",t.flgUseAllBalance),A.xp6(1),A.Q6J("ngForOf",t.amountUnits),A.xp6(4),A.Q6J("fxFlex","customperkb"!==t.selFeeRate||t.flgMinConf?"100":"48"),A.xp6(1),A.Q6J("value",t.selFeeRate)("disabled",t.flgMinConf),A.xp6(1),A.Q6J("ngForOf",t.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf),A.xp6(2),A.Q6J("ngModel",t.flgMinConf)("ngClass",A.WLB(28,ha,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),A.xp6(2),A.Q6J("ngModel",t.minConfValue)("step",1)("min",0)("required",t.flgMinConf)("disabled",!t.flgMinConf),A.xp6(2),A.Q6J("ngIf",t.flgMinConf&&!t.minConfValue),A.xp6(1),A.Q6J("ngIf",t.isCompatibleVersion),A.xp6(2),A.Q6J("ngIf",""!==t.sendFundError)}}function Ko(r,D){if(1&r&&A._uU(0),2&r){const t=A.oxw(3);A.Oqu(t.passwordFormLabel)}}function Vo(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Password is required."),A.qZA())}function Wo(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-step",55)(1,"form",73),A.YNc(2,Ko,1,1,"ng-template",67),A.TgZ(3,"div",0)(4,"mat-form-field",1),A._UZ(5,"input",74),A.YNc(6,Vo,2,0,"mat-error",14),A.qZA()(),A.TgZ(7,"div",75)(8,"button",76),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onAuthenticate()}),A._uU(9,"Confirm"),A.qZA()()()()}if(2&r){const t=A.oxw(2);A.Q6J("stepControl",t.passwordFormGroup)("editable",t.flgEditable),A.xp6(1),A.Q6J("formGroup",t.passwordFormGroup),A.xp6(5),A.Q6J("ngIf",null==t.passwordFormGroup.controls.password.errors?null:t.passwordFormGroup.controls.password.errors.required)}}function Zo(r,D){if(1&r&&A._uU(0),2&r){const t=A.oxw(2);A.Oqu(t.sendFundFormLabel)}}function Xo(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Bitcoin address is required."),A.qZA())}function qo(r,D){if(1&r&&(A.TgZ(0,"mat-option",38),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function _o(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function se(r,D){if(1&r&&(A.TgZ(0,"mat-form-field",39),A._UZ(1,"input",77),A.YNc(2,_o,2,0,"mat-error",14),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("step",.1)("min",0),A.xp6(1),A.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.customFeeRate.value)}}function $o(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function ci(r,D){if(1&r&&A._uU(0),2&r){const t=A.oxw(2);A.Oqu(t.confirmFormLabel)}}function gi(r,D){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.sendFundError)}}function Nr(r,D){if(1&r&&(A.TgZ(0,"div",49),A._UZ(1,"fa-icon",50),A.YNc(2,gi,2,1,"span",14),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.sendFundError)}}function fr(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",51)(1,"mat-vertical-stepper",52,53),A.NdJ("selectionChange",function(L){return A.CHM(t),A.oxw().stepSelectionChanged(L)}),A.YNc(3,Wo,10,4,"mat-step",54),A.TgZ(4,"mat-step",55)(5,"form",56),A.YNc(6,Zo,1,1,"ng-template",57),A.TgZ(7,"div",22)(8,"mat-form-field",1),A._UZ(9,"input",58),A.YNc(10,Xo,2,0,"mat-error",14),A.qZA(),A.TgZ(11,"div",59)(12,"div",24)(13,"mat-form-field",25)(14,"mat-select",60),A.YNc(15,qo,2,2,"mat-option",21),A.qZA()(),A.YNc(16,se,3,3,"mat-form-field",27),A.qZA(),A.TgZ(17,"div",28),A._UZ(18,"mat-checkbox",61),A.TgZ(19,"mat-form-field",30),A._UZ(20,"input",62),A.YNc(21,$o,2,0,"mat-error",14),A.qZA()()()(),A.TgZ(22,"div",63)(23,"button",64),A._uU(24,"Next"),A.qZA()()()(),A.TgZ(25,"mat-step",65)(26,"form",66),A.YNc(27,ci,1,1,"ng-template",67),A.TgZ(28,"div",51)(29,"div",68),A._UZ(30,"fa-icon",69),A.TgZ(31,"span"),A._uU(32,"You are about to sweep all funds from RTL. Are you sure?"),A.qZA()(),A.YNc(33,Nr,3,2,"div",34),A.TgZ(34,"div",63)(35,"button",70),A.NdJ("click",function(){return A.CHM(t),A.oxw().onSendFunds()}),A._uU(36,"Sweep All Funds"),A.qZA()()()()()(),A.TgZ(37,"div",71)(38,"button",72),A._uU(39),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(1),A.Q6J("linear",!0),A.xp6(2),A.Q6J("ngIf",!t.appConfig.sso.rtlSSO),A.xp6(1),A.Q6J("stepControl",t.sendFundFormGroup)("editable",t.flgEditable),A.xp6(1),A.Q6J("formGroup",t.sendFundFormGroup),A.xp6(5),A.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionAddress.errors?null:t.sendFundFormGroup.controls.transactionAddress.errors.required),A.xp6(3),A.Q6J("fxFlex","customperkb"!==t.sendFundFormGroup.controls.selFeeRate.value||t.sendFundFormGroup.controls.flgMinConf.value?"100":"48"),A.xp6(2),A.Q6J("ngForOf",t.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===t.sendFundFormGroup.controls.selFeeRate.value&&!t.sendFundFormGroup.controls.flgMinConf.value),A.xp6(2),A.Q6J("ngClass",A.WLB(20,ha,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD||t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),A.xp6(2),A.Q6J("step",1)("min",0)("required",t.sendFundFormGroup.controls.flgMinConf.value),A.xp6(1),A.Q6J("ngIf",t.sendFundFormGroup.controls.flgMinConf.value&&!t.sendFundFormGroup.controls.minConfValue.value),A.xp6(4),A.Q6J("stepControl",t.confirmFormGroup),A.xp6(1),A.Q6J("formGroup",t.confirmFormGroup),A.xp6(4),A.Q6J("icon",t.faExclamationTriangle),A.xp6(3),A.Q6J("ngIf",""!==t.sendFundError),A.xp6(5),A.Q6J("mat-dialog-close",!1),A.xp6(1),A.Oqu(t.flgValidated?"Close":"Cancel")}}let Bi=(()=>{class r{constructor(t,s,L,dA,ot,Ae,un,Qe,tn,ia){this.dialogRef=t,this.data=s,this.logger=L,this.store=dA,this.commonService=ot,this.decimalPipe=Ae,this.actions=un,this.formBuilder=Qe,this.rtlEffects=tn,this.snackBar=ia,this.faExclamationTriangle=h.eHv,this.sweepAll=!1,this.selNode={},this.addressTypes=[],this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=null,this.selectedAddress=a._t[1],this.blockchainBalance={},this.information={},this.isCompatibleVersion=!1,this.newAddress="",this.transaction={},this.feeRateTypes=a.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.sendFundError="",this.fiatConversion=!1,this.amountUnits=a.uA,this.selAmountUnit=a.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=a.Xz,this.advancedTitle="Advanced Options",this.flgValidated=!1,this.flgEditable=!0,this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds",this.confirmFormLabel="Confirm sweep",this.amountError="Amount is Required.",this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.sweepAll=this.data.sweepAll,this.passwordFormGroup=this.formBuilder.group({hiddenPassword:["",[OA.kI.required]],password:["",[OA.kI.required]]}),this.sendFundFormGroup=this.formBuilder.group({transactionAddress:["",OA.kI.required],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}]}),this.confirmFormGroup=this.formBuilder.group({}),this.sendFundFormGroup.controls.flgMinConf.valueChanges.pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{t?(this.sendFundFormGroup.controls.selFeeRate.disable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.reset(),this.sendFundFormGroup.controls.minConfValue.enable(),this.sendFundFormGroup.controls.minConfValue.setValidators([OA.kI.required]),this.sendFundFormGroup.controls.minConfValue.setValue(null)):(this.sendFundFormGroup.controls.selFeeRate.enable(),this.sendFundFormGroup.controls.selFeeRate.setValue(null),this.sendFundFormGroup.controls.minConfValue.setValue(null),this.sendFundFormGroup.controls.minConfValue.disable(),this.sendFundFormGroup.controls.minConfValue.setValidators(null),this.sendFundFormGroup.controls.minConfValue.setErrors(null))}),this.sendFundFormGroup.controls.selFeeRate.valueChanges.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.sendFundFormGroup.controls.customFeeRate.setValue(null),this.sendFundFormGroup.controls.customFeeRate.reset(),this.sendFundFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.sendFundFormGroup.controls.flgMinConf.value?null:[OA.kI.required])}),(0,Ba.a)([this.store.select(ua.dT),this.store.select(ua.Yj)]).pipe((0,i.R)(this.unSubs[1])).subscribe(([t,s])=>{this.fiatConversion=t.settings.fiatConversion,this.amountUnits=t.settings.currencyUnits,this.appConfig=s}),this.store.select(B.ey).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.information=t,this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")}),this.store.select(B.T4).pipe((0,i.R)(this.unSubs[3])).subscribe(t=>{this.utxos=this.commonService.sortAscByKey(t.utxos.filter(s=>"confirmed"===s.status),"value"),this.logger.info(t)}),this.actions.pipe((0,i.R)(this.unSubs[4]),(0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN||t.type===a.AB.SET_CHANNEL_TRANSACTION_RES_CLN)).subscribe(t=>{t.type===a.AB.SET_CHANNEL_TRANSACTION_RES_CLN&&(this.store.dispatch((0,KA.jW)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&"SetChannelTransaction"===t.payload.action&&(this.sendFundError=t.payload.message)})}onAuthenticate(){if(!this.passwordFormGroup.controls.password.value)return!0;this.flgValidated=!1,this.store.dispatch((0,KA.QO)({payload:Yo(this.passwordFormGroup.controls.password.value).toString()})),this.rtlEffects.isAuthorizedRes.pipe((0,PA.q)(1)).subscribe(t=>{"ERROR"!==t?(this.passwordFormGroup.controls.hiddenPassword.setValue(this.passwordFormGroup.controls.password.value),this.stepper.next()):(this.dialogRef.close(),this.snackBar.open("Unauthorized User. Logging out from RTL."))})}onSendFunds(){if(this.sendFundError="",this.flgUseAllBalance&&(this.transaction.satoshis="all"),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.transaction.utxos=[],this.selUTXOs.forEach(t=>this.transaction.utxos.push(t.txid+":"+t.output))),this.sweepAll){if(!this.sendFundFormGroup.controls.transactionAddress.value||""===this.sendFundFormGroup.controls.transactionAddress.value||this.sendFundFormGroup.controls.flgMinConf.value&&(!this.sendFundFormGroup.controls.minConfValue.value||this.sendFundFormGroup.controls.minConfValue.value<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis="all",this.transaction.address=this.sendFundFormGroup.controls.transactionAddress.value,this.sendFundFormGroup.controls.flgMinConf.value?(delete this.transaction.feeRate,this.transaction.minconf=this.sendFundFormGroup.controls.flgMinConf.value?this.sendFundFormGroup.controls.minConfValue.value:null):(delete this.transaction.minconf,this.transaction.feeRate="customperkb"===this.sendFundFormGroup.controls.selFeeRate.value&&!this.sendFundFormGroup.controls.flgMinConf.value&&this.sendFundFormGroup.controls.customFeeRate.value?1e3*this.sendFundFormGroup.controls.customFeeRate.value+"perkb":this.sendFundFormGroup.controls.selFeeRate.value),delete this.transaction.utxos,this.store.dispatch((0,ht.Wi)({payload:this.transaction}))}else{if(this.transaction.minconf=this.flgMinConf?this.minConfValue:null,this.transaction.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,!this.transaction.address||""===this.transaction.address||!this.transaction.satoshis||+this.transaction.satoshis<=0||this.flgMinConf&&(!this.transaction.minconf||this.transaction.minconf<=0)||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;this.transaction.satoshis&&"all"!==this.transaction.satoshis&&this.selAmountUnit!==a.NT.SATS?this.commonService.convertCurrency(+this.transaction.satoshis,this.selAmountUnit===this.amountUnits[2]?a.NT.OTHER:this.selAmountUnit,a.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,i.R)(this.unSubs[5])).subscribe({next:t=>{this.transaction.satoshis=t[a.NT.SATS],this.selAmountUnit=a.NT.SATS,this.store.dispatch((0,ht.Wi)({payload:this.transaction}))},error:t=>{this.transaction.satoshis=null,this.selAmountUnit=a.NT.SATS,this.amountError="Conversion Error: "+t}}):this.store.dispatch((0,ht.Wi)({payload:this.transaction}))}}resetData(){this.sendFundError="",this.transaction={},this.flgMinConf=!1,this.totalSelectedUTXOAmount=null,this.selUTXOs=[],this.flgUseAllBalance=!1,this.selAmountUnit=a.uA[0]}stepSelectionChanged(t){switch(this.sendFundError="",t.selectedIndex){case 0:default:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds";break;case 1:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds";break;case 2:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds | Address: "+this.sendFundFormGroup.controls.transactionAddress.value+(this.sendFundFormGroup.controls.flgMinConf.value?" | Min Confirmation Blocks: "+this.sendFundFormGroup.controls.minConfValue.value:this.sendFundFormGroup.controls.selFeeRate.value?" | Fee Rate: "+this.feeRateTypes.find(s=>s.feeRateId===this.sendFundFormGroup.controls.selFeeRate.value).feeRateType:"")}t.selectedIndex0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((L,dA)=>(s.value=L.value+dA.value,s)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=null,this.transaction.satoshis=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.flgUseAllBalance?(this.transaction.satoshis=this.totalSelectedUTXOAmount,this.selAmountUnit=a.uA[0]):this.transaction.satoshis=null}onAmountUnitChange(t){const s=this,L=this.selAmountUnit===this.amountUnits[2]?a.NT.OTHER:this.selAmountUnit;let dA=t.value===this.amountUnits[2]?a.NT.OTHER:t.value;this.transaction.satoshis&&this.selAmountUnit!==t.value&&this.commonService.convertCurrency(+this.transaction.satoshis,L,dA,this.amountUnits[2],this.fiatConversion).pipe((0,i.R)(this.unSubs[6])).subscribe({next:ot=>{this.selAmountUnit=t.value,s.transaction.satoshis=s.decimalPipe.transform(ot[dA],s.currencyUnitFormats[dA]).replace(/,/g,"")},error:ot=>{s.transaction.satoshis=null,this.amountError="Conversion Error: "+ot,this.selAmountUnit=L,dA=L}})}onAdvancedPanelToggle(t){this.advancedTitle=t&&this.selUTXOs.length&&this.selUTXOs.length>0?"Advanced Options | Selected UTXOs: "+this.selUTXOs.length+" | Selected UTXO Amount: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats":"Advanced Options"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(Et.JJ),A.Y36(Yt.eX),A.Y36(OA.qu),A.Y36(DA.V),A.Y36(Sr.ux))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain-send-modal"]],viewQuery:function(t,s){if(1&t&&(A.Gf(To,7),A.Gf(So,5),A.Gf(No,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.form=L.first),A.iGM(L=A.CRH())&&(s.formSweepAll=L.first),A.iGM(L=A.CRH())&&(s.stepper=L.first)}},decls:12,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100","class","overflow-x-hidden",3,"submit","reset",4,"ngIf","ngIfElse"],["sweepAllBlock",""],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","address","required","",3,"ngModel","ngModelChange"],["address","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amount","tabindex","2","required","",3,"ngModel","type","step","min","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","disabled","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","48","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",4,"ngIf"],["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"],["mat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxLayout","column","fxFlex","100","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","35","fxLayoutAlign","start end"],["tabindex","8","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["fxFlex","60","fxLayout","row","fxLayoutAlign","start center"],["tabindex","9","color","primary","name","flgUseAllBalance",3,"ngModel","disabled","ngModelChange","change"],["matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","above",1,"info-icon"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable",4,"ngIf"],[3,"stepControl","editable"],["fxLayout","column",1,"my-1","pr-1",3,"formGroup"],["matStepLabel","","disabled","true"],["matInput","","formControlName","transactionAddress","placeholder","Bitcoin Address","tabindex","4","name","address","required",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","8","type","default","matStepperNext",""],[3,"stepControl"],["fxLayout","column","fxLayoutAlign","start",1,"my-1","pr-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100",1,"w-100","alert","alert-warn"],[1,"mt-1","mr-1","alert-icon",3,"icon"],["mat-button","","color","primary","tabindex","9","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","space-between",1,"my-1","pr-1",3,"formGroup"],["autoFocus","","matInput","","placeholder","Password","type","password","tabindex","1","formControlName","password","required",""],["fxLayout","row",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","default",3,"click"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6),A.YNc(9,jo,37,31,"form",7),A.qZA()()(),A.YNc(10,fr,40,23,"ng-template",null,8,A.W1O)),2&t){const L=A.MAs(11);A.xp6(5),A.Oqu(s.sweepAll?"Sweep All Funds":"Send Funds"),A.xp6(1),A.Q6J("mat-dialog-close",!1),A.xp6(3),A.Q6J("ngIf",!s.sweepAll)("ngIfElse",L)}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,Mt.ZT,g.dn,Et.O5,OA._Y,OA.JL,OA.F,U.KE,H.Nt,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,U.TO,b.q,U.bx,U.R9,CA.gD,Et.sg,wA.ey,OA.wV,OA.qQ,$A.oG,Et.mk,Y.oO,or.ib,or.yz,or.yK,CA.$L,RA.Rr,p.Hw,eA.gM,e.BN,pr.Vq,pr.C0,OA.sg,pr.VY,OA.u,pr.Ic],pipes:[Et.JJ],styles:[""]}),r})();var Gi=Nt(1203),ui=Nt(7544);function As(r,D){1&r&&A._UZ(0,"mat-progress-bar",27)}function Ur(r,D){1&r&&(A.TgZ(0,"th",28),A._uU(1," Transaction ID "),A.qZA())}function Pr(r,D){1&r&&(A.TgZ(0,"span",36)(1,"mat-icon",37),A._uU(2,"warning"),A.qZA()())}function Hi(r,D){if(1&r&&(A.TgZ(0,"span"),A.YNc(1,Pr,3,0,"span",35),A.qZA()),2&r){const t=A.oxw().$implicit;A.oxw();const s=A.MAs(32);A.xp6(1),A.Q6J("ngIf",t.value<1e3)("ngIfElse",s)}}function Ji(r,D){1&r&&A._UZ(0,"span",38)}function Oi(r,D){if(1&r&&(A._UZ(0,"span",39),A.ALo(1,"titlecase")),2&r){const t=A.oxw().$implicit;A.s9C("matTooltip",A.lcZ(1,1,t.status))}}const ts=function(r){return{"max-width":r}};function Ea(r,D){if(1&r&&(A.TgZ(0,"td",29)(1,"span",30),A.YNc(2,Hi,2,2,"span",31),A.YNc(3,Ji,1,0,"span",32),A.YNc(4,Oi,2,3,"span",33),A.TgZ(5,"span",34),A._uU(6),A.qZA()()()),2&r){const t=D.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(5,ts,s.screenSize===s.screenSizeEnum.XS?"10rem":"50rem")),A.xp6(1),A.Q6J("ngIf",s.numDustUTXOs>0&&!s.isDustUTXO),A.xp6(1),A.Q6J("ngIf","confirmed"===t.status),A.xp6(1),A.Q6J("ngIf","confirmed"!==t.status),A.xp6(2),A.Oqu(t.txid)}}function es(r,D){1&r&&(A.TgZ(0,"th",40),A._uU(1," Output "),A.qZA())}function ns(r,D){if(1&r&&(A.TgZ(0,"td",29)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.output)," ")}}function rs(r,D){1&r&&(A.TgZ(0,"th",40),A._uU(1," Value (Sats) "),A.qZA())}function is(r,D){if(1&r&&(A.TgZ(0,"span",41),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.Oqu(A.lcZ(2,1,t.value))}}function as(r,D){if(1&r&&(A.TgZ(0,"span",44),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=A.oxw().$implicit;A.xp6(1),A.hij("(",A.lcZ(2,1,-1*t.value),")")}}function wa(r,D){if(1&r&&(A.TgZ(0,"td",29),A.YNc(1,is,3,3,"span",42),A.YNc(2,as,3,3,"span",43),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Q6J("ngIf",t.value>0||0===t.value),A.xp6(1),A.Q6J("ngIf",t.value<0)}}function os(r,D){1&r&&(A.TgZ(0,"th",40),A._uU(1," Blockheight "),A.qZA())}function ss(r,D){if(1&r&&(A.TgZ(0,"td",29)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.blockheight)," ")}}function Ir(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",45)(1,"div",46)(2,"mat-select",47),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",48),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function zt(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",49)(1,"button",50),A.NdJ("click",function(L){const ot=A.CHM(t).$implicit;return A.oxw().onUTXOClick(ot,L)}),A._uU(2,"View Info"),A.qZA()()}}function fi(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No utxos available."),A.qZA())}function hi(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting utxos..."),A.qZA())}function mr(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function Ca(r,D){if(1&r&&(A.TgZ(0,"td",51),A.YNc(1,fi,2,0,"p",31),A.YNc(2,hi,2,0,"p",31),A.YNc(3,mr,2,1,"p",31),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Ei=function(r){return{"display-none":r}};function ls(r,D){if(1&r&&A._UZ(0,"tr",52),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,Ei,(null==t.listUTXOs?null:t.listUTXOs.data)&&(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)>0))}}function Qa(r,D){1&r&&A._UZ(0,"tr",53)}function cs(r,D){1&r&&A._UZ(0,"tr",54)}function kr(r,D){1&r&&A._UZ(0,"mat-icon",37)}const wi=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},gs=function(){return["no_utxo"]};let da=(()=>{class r{constructor(t,s,L){this.logger=t,this.commonService=s,this.store=L,this.numDustUTXOs=0,this.isDustUTXO=!1,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["txid","value","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["txid","output","value","blockheight","actions"]):(this.flgSticky=!0,this.displayedColumns=["txid","output","value","blockheight","actions"])}ngOnInit(){this.store.select(B.T4).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.logger.info(t)})}ngAfterViewInit(){this.utxos&&this.utxos.length>0&&this.sort&&this.paginator&&this.loadUTXOsTable(this.utxos)}ngOnChanges(){this.utxos&&this.utxos.length>0&&this.loadUTXOsTable(this.utxos)}applyFilter(){this.listUTXOs.filter=this.selFilter.trim().toLowerCase()}onUTXOClick(t,s){const L=[[{key:"txid",value:t.txid,title:"Transaction ID",width:100}],[{key:"output",value:t.output,title:"Output",width:50,type:a.Gi.NUMBER},{key:"value",value:t.value,title:"Value (Sats)",width:50,type:a.Gi.NUMBER}],[{key:"status",value:this.commonService.titleCase(t.status),title:"Status",width:50,type:a.Gi.STRING},{key:"blockheight",value:t.blockheight,title:"Blockheight",width:50,type:a.Gi.NUMBER}],[{key:"address",value:t.address,title:"Address",width:100}]];this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"UTXO Information",message:L}}}))}loadUTXOsTable(t){this.listUTXOs=new xA.by([...t]),this.listUTXOs.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.listUTXOs.sort=this.sort,this.listUTXOs.filterPredicate=(s,L)=>JSON.stringify(s).toLowerCase().includes(L),this.listUTXOs.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listUTXOs)}onDownloadCSV(){this.listUTXOs.data&&this.listUTXOs.data.length>0&&this.commonService.downloadFile(this.listUTXOs.data,"UTXOs")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain-utxos"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},inputs:{numDustUTXOs:"numDustUTXOs",isDustUTXO:"isDustUTXO",utxos:"utxos"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("UTXOs")}]),A.TTD],decls:33,vars:14,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch",1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","txid"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","output"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","value"],["matColumnDef","blockheight"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_utxo"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["emptySpace",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[4,"ngIf"],["class","dot green","matTooltip","Confirmed","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltipPosition","right",3,"matTooltip",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Risk of dust attack","matTooltipPosition","right",4,"ngIf","ngIfElse"],["matTooltip","Risk of dust attack","matTooltipPosition","right"],["fxLayoutAlign","start center","color","warn",1,"mr-1"],["matTooltip","Confirmed","matTooltipPosition","right",1,"dot","green"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center",1,"red"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"div",2),A.TgZ(3,"mat-form-field",3)(4,"input",4),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.TgZ(5,"div",5)(6,"div",6),A.YNc(7,As,1,0,"mat-progress-bar",7),A.TgZ(8,"table",8,9),A.ynx(10,10),A.YNc(11,Ur,2,0,"th",11),A.YNc(12,Ea,7,7,"td",12),A.BQk(),A.ynx(13,13),A.YNc(14,es,2,0,"th",14),A.YNc(15,ns,4,3,"td",12),A.BQk(),A.ynx(16,15),A.YNc(17,rs,2,0,"th",14),A.YNc(18,wa,3,2,"td",12),A.BQk(),A.ynx(19,16),A.YNc(20,os,2,0,"th",14),A.YNc(21,ss,4,3,"td",12),A.BQk(),A.ynx(22,17),A.YNc(23,Ir,6,0,"th",18),A.YNc(24,zt,3,0,"td",19),A.BQk(),A.ynx(25,20),A.YNc(26,Ca,4,3,"td",21),A.BQk(),A.YNc(27,ls,1,3,"tr",22),A.YNc(28,Qa,1,0,"tr",23),A.YNc(29,cs,1,0,"tr",24),A.qZA(),A._UZ(30,"mat-paginator",25),A.qZA()()(),A.YNc(31,kr,1,0,"ng-template",null,26,A.W1O)),2&t&&(A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(3),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.listUTXOs)("ngClass",A.VKq(11,wi,""!==s.errorMessage)),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(13,gs)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.Wh,Ct.yH,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,q.$V,Et.O5,T.pW,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,Et.PC,Y.Zl,eA.gM,p.Hw,CA.gD,CA.$L,wA.ey,w.lW,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.rS,Et.JJ],styles:[".mat-column-txid[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-txid[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();function Ma(r,D){if(1&r&&(A.TgZ(0,"span",5),A._uU(1,"UTXOs"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.numUtxos)}}function pa(r,D){if(1&r&&(A.TgZ(0,"span",5),A._uU(1,"Dust UTXOs"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.numDustUtxos)}}let Bs=(()=>{class r{constructor(t,s){this.logger=t,this.store=s,this.selectedTableIndex=0,this.selectedTableIndexChange=new A.vpe,this.utxos=[],this.numUtxos=0,this.dustUtxos=[],this.numDustUtxos=0,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.store.select(B.T4).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{t.utxos&&t.utxos.length>0&&(this.utxos=t.utxos,this.numUtxos=this.utxos.length,this.dustUtxos=t.utxos.filter(s=>+s.value<1e3),this.numDustUtxos=this.dustUtxos.length),t.utxos&&t.utxos.length>0&&(this.utxos=t.utxos,this.numUtxos=this.utxos.length),this.logger.info(t)})}onSelectedIndexChanged(t){this.selectedTableIndexChange.emit(t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-utxo-tables"]],inputs:{selectedTableIndex:"selectedTableIndex"},outputs:{selectedTableIndexChange:"selectedTableIndexChange"},decls:8,vars:7,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"bordered-box"],[3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],["xLayout","row","fxFlex","100",3,"utxos","numDustUTXOs","isDustUTXO"],["fxLayout","row","fxFlex","100",3,"utxos","numDustUTXOs","isDustUTXO"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"mat-tab-group",1),A.NdJ("selectedIndexChange",function(dA){return s.onSelectedIndexChanged(dA)}),A.TgZ(2,"mat-tab"),A.YNc(3,Ma,2,1,"ng-template",2),A._UZ(4,"rtl-cln-on-chain-utxos",3),A.qZA(),A.TgZ(5,"mat-tab"),A.YNc(6,pa,2,1,"ng-template",2),A._UZ(7,"rtl-cln-on-chain-utxos",4),A.qZA()()()),2&t&&(A.xp6(1),A.Q6J("selectedIndex",s.selectedTableIndex),A.xp6(3),A.Q6J("utxos",s.utxos)("numDustUTXOs",s.numDustUtxos)("isDustUTXO",!1),A.xp6(3),A.Q6J("utxos",s.dustUtxos)("numDustUTXOs",s.numDustUtxos)("isDustUTXO",!0))},directives:[Ct.xw,Ct.yH,Ct.Wh,ft.SP,ft.uX,ft.uD,ui.k,da],styles:[""]}),r})();const us=function(r,D){return[r,D]};function jr(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",12),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=null==dA?null:dA.link}),A._uU(1),A.qZA()}if(2&r){const t=D.$implicit,s=A.oxw();A.Q6J("active",s.activeLink===(null==t?null:t.link))("routerLink",A.WLB(3,us,null==t?null:t.link,null==s.selectedTable?null:s.selectedTable.name)),A.xp6(1),A.Oqu(null==t?null:t.name)}}let fs=(()=>{class r{constructor(t,s,L){this.store=t,this.router=s,this.activatedRoute=L,this.selNode={},this.faExchangeAlt=h.Ssp,this.faChartPie=h.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"},{link:"sweep",name:"Sweep All"}],this.activeLink=this.links[0].link,this.tables=[{id:0,name:"utxos"},{id:1,name:"dustUtxos"}],this.selectedTable=this.tables[0],this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.selectedTable=this.tables.find(s=>s.name===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const L=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=L?L.link:this.links[0].link,this.selectedTable=this.tables.find(dA=>dA.name===s.urlAfterRedirects.substring(s.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(B.lw).pipe((0,i.R)(this.unSubs[1])).subscribe(s=>{this.selNode=s}),this.store.select(B.Rn).pipe((0,i.R)(this.unSubs[2])).subscribe(s=>{this.balances=[{title:"Total Balance",dataValue:s.balance.totalBalance||0},{title:"Confirmed",dataValue:s.balance.confBalance},{title:"Unconfirmed",dataValue:s.balance.unconfBalance}]})}openSendFundsModal(t){this.store.dispatch((0,KA.qR)({payload:{data:{sweepAll:t,component:Bi}}}))}onSelectedTableIndexChanged(t){this.selectedTable=this.tables.find(s=>s.id===t),this.router.navigate(["./",this.activeLink,this.selectedTable.name],{relativeTo:this.activatedRoute})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(qt.F0),A.Y36(qt.gz))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain"]],decls:21,vars:5,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100",3,"selectedTableIndex","selectedTableIndexChange"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"On-chain Balance"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),A._UZ(7,"rtl-currency-unit-converter",5),A.qZA()()(),A.TgZ(8,"div",0),A._UZ(9,"fa-icon",1),A.TgZ(10,"span",2),A._uU(11,"On-chain Transactions"),A.qZA()(),A.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",7),A.YNc(16,jr,2,6,"div",8),A.qZA(),A.TgZ(17,"div",9),A._UZ(18,"router-outlet"),A.qZA(),A.TgZ(19,"div",10)(20,"rtl-cln-utxo-tables",11),A.NdJ("selectedTableIndexChange",function(dA){return s.onSelectedTableIndexChanged(dA)}),A.qZA()()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartPie),A.xp6(6),A.Q6J("values",s.balances),A.xp6(2),A.Q6J("icon",s.faExchangeAlt),A.xp6(7),A.Q6J("ngForOf",s.links),A.xp6(4),A.Q6J("selectedTableIndex",null==s.selectedTable?null:s.selectedTable.id))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,Gi.D,ft.BU,Et.sg,ft.Nj,qt.rH,Ct.yH,qt.lC,Bs],styles:[""]}),r})();function hs(r,D){if(1&r&&(A.TgZ(0,"span",10),A._uU(1,"Channels"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.activeChannels)}}function Es(r,D){if(1&r&&(A.TgZ(0,"span",10),A._uU(1,"Peers"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.activePeers)}}let Ia=(()=>{class r{constructor(t,s,L){this.store=t,this.logger=s,this.router=L,this.activePeers=0,this.activeChannels=0,this.faUsers=h.FVb,this.faChartPie=h.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(t=>t instanceof qt.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(s=>s.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(B.ZW).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.activeChannels=t.activeChannels.length||0}),this.store.select(B.Wi).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.logger.info(t)}),this.store.select(B.Rn).pipe((0,i.R)(this.unSubs[3])).subscribe(t=>{this.balances=[{title:"Total Balance",dataValue:t.balance.totalBalance||0},{title:"Confirmed",dataValue:t.balance.confBalance},{title:"Unconfirmed",dataValue:t.balance.unconfBalance}]})}onSelectedTabChange(t){this.router.navigateByUrl("/cln/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(E.mQ),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-connections"]],decls:22,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"On-chain Balance"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),A._UZ(7,"rtl-currency-unit-converter",5),A.qZA()()(),A.TgZ(8,"div",0),A._UZ(9,"fa-icon",1),A.TgZ(10,"span",2),A._uU(11,"Connections"),A.qZA()(),A.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"mat-tab-group",7),A.NdJ("selectedIndexChange",function(dA){return s.activeLink=dA})("selectedTabChange",function(dA){return s.onSelectedTabChange(dA)}),A.TgZ(16,"mat-tab"),A.YNc(17,hs,2,1,"ng-template",8),A.qZA(),A.TgZ(18,"mat-tab"),A.YNc(19,Es,2,1,"ng-template",8),A.qZA()(),A.TgZ(20,"div",9),A._UZ(21,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartPie),A.xp6(6),A.Q6J("values",s.balances),A.xp6(2),A.Q6J("icon",s.faUsers),A.xp6(6),A.Q6J("selectedIndex",s.activeLink))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,Gi.D,ft.SP,ft.uX,ft.uD,ui.k,Ct.yH,qt.lC],styles:[""]}),r})();function ws(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",11),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=D.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let Cs=(()=>{class r{constructor(t,s,L){this.logger=t,this.store=s,this.router=L,this.faExchangeAlt=h.Ssp,this.faChartPie=h.OS1,this.currencyUnits=[],this.routerUrl="",this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.selNode={},this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const L=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=L?L.link:this.links[0].link,this.routerUrl=s.urlAfterRedirects}}),this.store.select(B.lw).pipe((0,i.R)(this.unSubs[1])).subscribe(s=>{if(this.selNode=s,this.selNode.enableOffers){this.store.dispatch((0,ht.yl)()),this.store.dispatch((0,ht.uT)()),this.links.push({link:"offers",name:"Offers"}),this.links.push({link:"offrBookmarks",name:"Paid Offer Bookmarks"});const L=this.links.find(dA=>this.router.url.includes(dA.link));this.activeLink=L?L.link:this.links[0].link}}),this.store.select(B.Wj).pipe((0,i.R)(this.unSubs[2]),(0,o.M)(this.store.select(B.lw))).subscribe(([s,L])=>{this.currencyUnits=L.currencyUnits,this.balances=L.userPersona===a.ol.OPERATOR?[{title:"Local Capacity",dataValue:s.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:s.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:s.localRemoteBalance.localBalance,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:s.localRemoteBalance.remoteBalance,tooltip:"Amount you can receive"}],this.logger.info(s)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Lightning Balance"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),A._UZ(7,"rtl-currency-unit-converter",5),A.qZA()()(),A.TgZ(8,"div",6),A._UZ(9,"fa-icon",1),A.TgZ(10,"span",2),A._uU(11,"Lightning Transactions"),A.qZA()(),A.TgZ(12,"div",7)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",8),A.YNc(16,ws,2,3,"div",9),A.qZA(),A.TgZ(17,"div",10),A._UZ(18,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartPie),A.xp6(6),A.Q6J("values",s.balances),A.xp6(2),A.Q6J("icon",s.faExchangeAlt),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,Gi.D,ft.BU,Et.sg,ft.Nj,qt.rH,Ct.yH,qt.lC],styles:[""]}),r})();function Qs(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",11),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=D.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let ds=(()=>{class r{constructor(t){this.router=t,this.faMapSigns=h.SuH,this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"routingpeers",name:"Routing Peers"},{link:"failedtransactions",name:"Failed Transactions"},{link:"localfail",name:"Local Failed Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const L=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=L?L.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-routing"]],decls:13,vars:2,consts:[["fxLayout","column",1,"mb-2"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"fa-icon",2),A.TgZ(3,"span",3),A._uU(4,"Routing"),A.qZA()(),A.TgZ(5,"div",4)(6,"mat-card",5)(7,"mat-card-content",6)(8,"div",7)(9,"nav",8),A.YNc(10,Qs,2,3,"div",9),A.qZA()(),A.TgZ(11,"div",10),A._UZ(12,"router-outlet"),A.qZA()()()()()),2&t&&(A.xp6(2),A.Q6J("icon",s.faMapSigns),A.xp6(8),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,Ct.yH,g.a8,g.dn,ft.BU,Et.sg,ft.Nj,qt.rH,qt.lC],styles:[""]}),r})();var Kr=Nt(6895);function ma(r,D){if(1&r&&(A.TgZ(0,"span",6),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(t)}}function Ms(r,D){1&r&&(A.TgZ(0,"th",27),A._uU(1,"Type"),A.qZA())}function ps(r,D){if(1&r&&(A.TgZ(0,"td",28),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.type," ")}}function Is(r,D){1&r&&(A.TgZ(0,"th",27),A._uU(1,"Address"),A.qZA())}function ms(r,D){if(1&r&&(A.TgZ(0,"td",28),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.address," ")}}function vs(r,D){1&r&&(A.TgZ(0,"th",27),A._uU(1,"Port"),A.qZA())}function Un(r,D){if(1&r&&(A.TgZ(0,"td",28),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.port," ")}}function Ds(r,D){1&r&&(A.TgZ(0,"th",29)(1,"span",30),A._uU(2,"Actions"),A.qZA()())}function ys(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",31)(1,"span",30)(2,"button",32),A.NdJ("copied",function(L){return A.CHM(t),A.oxw(2).onCopyNodeURI(L)}),A._uU(3,"Copy Node URI"),A.qZA()()()}if(2&r){const t=D.$implicit,s=A.oxw(2);A.xp6(2),A.Q6J("payload",(null==s.lookupResult?null:s.lookupResult.nodeid)+"@"+t.address+":"+t.port)}}function xs(r,D){1&r&&A._UZ(0,"tr",33)}function Fs(r,D){1&r&&A._UZ(0,"tr",34)}const Ys=function(r){return{"background-color":r}};function Ts(r,D){if(1&r&&(A.TgZ(0,"div",1),A._UZ(1,"mat-divider",2),A.TgZ(2,"div",3)(3,"div",4)(4,"h4",5),A._uU(5,"Alias"),A.qZA(),A.TgZ(6,"span",6),A._uU(7),A.TgZ(8,"span",7),A._uU(9),A.qZA()()(),A.TgZ(10,"div",8)(11,"h4",5),A._uU(12,"Pub Key"),A.qZA(),A.TgZ(13,"span",9),A._uU(14),A.qZA()()(),A._UZ(15,"mat-divider",10),A.TgZ(16,"div",3)(17,"div",4)(18,"h4",5),A._uU(19,"Last Update"),A.qZA(),A.TgZ(20,"span",6),A._uU(21),A.ALo(22,"date"),A.qZA()(),A.TgZ(23,"div",8)(24,"h4",5),A._uU(25,"Features"),A.qZA(),A.YNc(26,ma,2,1,"span",11),A.qZA()(),A._UZ(27,"mat-divider",10),A.TgZ(28,"div",12)(29,"h4",13),A._uU(30,"Addresses"),A.qZA(),A.TgZ(31,"div",14)(32,"table",15,16),A.ynx(34,17),A.YNc(35,Ms,2,0,"th",18),A.YNc(36,ps,2,1,"td",19),A.BQk(),A.ynx(37,20),A.YNc(38,Is,2,0,"th",18),A.YNc(39,ms,2,1,"td",19),A.BQk(),A.ynx(40,21),A.YNc(41,vs,2,0,"th",18),A.YNc(42,Un,2,1,"td",19),A.BQk(),A.ynx(43,22),A.YNc(44,Ds,3,0,"th",23),A.YNc(45,ys,4,1,"td",24),A.BQk(),A.YNc(46,xs,1,0,"tr",25),A.YNc(47,Fs,1,0,"tr",26),A.qZA()()()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(null==t.lookupResult?null:t.lookupResult.alias),A.xp6(1),A.Q6J("ngStyle",A.VKq(15,Ys,"#"+(null==t.lookupResult?null:t.lookupResult.color))),A.xp6(1),A.Oqu(null!=t.lookupResult&&t.lookupResult.color?"#"+(null==t.lookupResult?null:t.lookupResult.color):""),A.xp6(5),A.Oqu(null==t.lookupResult?null:t.lookupResult.nodeid),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(A.xi3(22,12,1e3*(null==t.lookupResult?null:t.lookupResult.last_timestamp),"dd/MMM/y HH:mm")),A.xp6(5),A.Q6J("ngForOf",t.featureDescriptions),A.xp6(1),A.Q6J("inset",!0),A.xp6(5),A.Q6J("dataSource",t.addresses),A.xp6(14),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}let Ss=(()=>{class r{constructor(t,s){this.logger=t,this.snackBar=s,this.featureDescriptions=[],this.displayedColumns=["type","address","port","actions"]}ngOnInit(){if(this.addresses=new xA.by(this.lookupResult&&this.lookupResult.addresses?[...this.lookupResult.addresses]:[]),this.addresses.data=this.lookupResult.addresses||[],this.addresses.sort=this.sort,this.addresses.sortingDataAccessor=(t,s)=>t[s]&&isNaN(t[s])?t[s].toLocaleLowerCase():t[s]?+t[s]:null,this.lookupResult.features&&""!==this.lookupResult.features.trim()){const t=parseInt(this.lookupResult.features,16);a.Df.forEach(s=>{t&(1<{class r{constructor(t){this.store=t,this.lookupResult=[],this.node1_match=!1,this.node2_match=!1,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.store.select(B.ey).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.lookupResult.length>0&&this.lookupResult[0].source===t.id&&(this.node1_match=!0),this.lookupResult.length>1&&this.lookupResult[1].source===t.id&&(this.node2_match=!0)})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start",1,"mt-1","bordered-box","padding-gap-large"],["fxLayout","column"],["class","page-title font-bold-500",4,"ngIf"],[3,"inset"],["fxLayout","column","fxFlex","20",1,"my-1"],[1,"font-bold-500"],[1,"foreground-secondary-text"],["fxLayout","column","fxFlex","10",1,"my-1"],[1,"page-title","font-bold-500"]],template:function(t,s){1&t&&A.YNc(0,ki,204,91,"div",0),2&t&&A.Q6J("ngIf",s.lookupResult)},directives:[Et.O5,Ct.xw,sA.d,Ct.Wh,Ct.yH],pipes:[Et.JJ,Et.uU],styles:[".mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%], .mat-list-base[_ngcontent-%COMP%] .mat-list-option[_ngcontent-%COMP%]{height:38px!important}"]}),r})();const Er=["form"];function ji(r,D){if(1&r&&(A.TgZ(0,"mat-radio-button",17),A._uU(1),A.qZA()),2&r){const t=D.$implicit,s=A.oxw();A.Q6J("value",t.id)("checked",s.selectedFieldId===t.id),A.xp6(1),A.hij(" ",t.name," ")}}function Ps(r,D){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function Ci(r,D){if(1&r&&(A.TgZ(0,"div"),A._UZ(1,"rtl-cln-node-lookup",26),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Q6J("lookupResult",t.nodeLookupValue)}}function Qi(r,D){if(1&r&&(A.TgZ(0,"span",24),A.YNc(1,Ci,2,1,"div",25),A.qZA()),2&r){const t=A.oxw(2),s=A.MAs(19);A.xp6(1),A.Q6J("ngIf",""!==t.nodeLookupValue.nodeid)("ngIfElse",s)}}function di(r,D){if(1&r&&(A.TgZ(0,"div"),A._UZ(1,"rtl-cln-channel-lookup",26),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Q6J("lookupResult",t.channelLookupValue)}}function De(r,D){if(1&r&&(A.TgZ(0,"span",24),A.YNc(1,di,2,1,"div",25),A.qZA()),2&r){const t=A.oxw(2),s=A.MAs(19);A.xp6(1),A.Q6J("ngIf",t.channelLookupValue.length>0)("ngIfElse",s)}}function Rs(r,D){1&r&&(A.TgZ(0,"span",24)(1,"h3"),A._uU(2,"Error! Unable to find details!"),A.qZA()())}function wr(r,D){if(1&r&&(A.TgZ(0,"div",18)(1,"div",19)(2,"span",20),A._uU(3),A.qZA()(),A.TgZ(4,"div",21),A.YNc(5,Qi,2,2,"span",22),A.YNc(6,De,2,2,"span",22),A.YNc(7,Rs,3,0,"span",23),A.qZA()()),2&r){const t=A.oxw();A.xp6(3),A.hij("",t.lookupFields[t.selectedFieldId].name," Details"),A.xp6(1),A.Q6J("ngSwitch",t.selectedFieldId),A.xp6(1),A.Q6J("ngSwitchCase",0),A.xp6(1),A.Q6J("ngSwitchCase",1)}}function zs(r,D){1&r&&(A.TgZ(0,"h3"),A._uU(1,"Error! Unable to find details!"),A.qZA())}const Ls=function(r){return{"mt-1":!0,"mt-2":r}};let bs=(()=>{class r{constructor(t,s,L,dA){this.logger=t,this.commonService=s,this.store=L,this.actions=dA,this.lookupKey="",this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Pubkey"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=h.wn1,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(t=>t.type===a.AB.SET_LOOKUP_CLN||t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{if(t.type===a.AB.SET_LOOKUP_CLN){switch(this.flgLoading[0]=!0,this.selectedFieldId){case 0:this.nodeLookupValue="object"!=typeof t.payload[0]?{nodeid:""}:JSON.parse(JSON.stringify(t.payload[0]));break;case 1:this.channelLookupValue="object"!=typeof t.payload[0]?[]:JSON.parse(JSON.stringify(t.payload))}this.flgSetLookupValue=!0,this.logger.info(this.nodeLookupValue),this.logger.info(this.channelLookupValue)}t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&"Lookup"===t.payload.action&&(this.flgLoading[0]="error")})}onLookup(){if(!this.lookupKey)return!0;switch(this.flgSetLookupValue=!1,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.selectedFieldId){case 0:this.store.dispatch((0,ht.Sf)({payload:this.lookupKey.trim()}));break;case 1:this.store.dispatch((0,ht.$A)({payload:{uiMessage:a.m6.SEARCHING_CHANNEL,shortChannelID:this.lookupKey.trim(),showError:!1}}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.form.resetForm()}clearLookupValue(){this.nodeLookupValue={nodeid:""},this.channelLookupValue=[],this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(Yt.eX))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-lookups"]],viewQuery:function(t,s){if(1&t&&A.Gf(Er,7),2&t){let L;A.iGM(L=A.CRH())&&(s.form=L.first)}},decls:20,vars:9,consts:[["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"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[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"],["errorBlock",""],[1,"mr-4",3,"value","checked"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[4,"ngIf","ngIfElse"],[3,"lookupResult"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-content",2)(3,"form",3,4)(5,"div",5)(6,"mat-radio-group",6),A.NdJ("ngModelChange",function(dA){return s.selectedFieldId=dA})("change",function(dA){return s.onSelectChange(dA)}),A.YNc(7,ji,2,3,"mat-radio-button",7),A.qZA()(),A.TgZ(8,"mat-form-field",8)(9,"input",9,10),A.NdJ("change",function(){return s.clearLookupValue()})("ngModelChange",function(dA){return s.lookupKey=dA}),A.qZA(),A.YNc(11,Ps,2,1,"mat-error",11),A.qZA(),A.TgZ(12,"div",12)(13,"button",13),A.NdJ("click",function(){return s.resetData()}),A._uU(14,"Clear"),A.qZA(),A.TgZ(15,"button",14),A.NdJ("click",function(){return s.onLookup()}),A._uU(16,"Lookup"),A.qZA()()(),A.YNc(17,wr,8,4,"div",15),A.qZA()()(),A.YNc(18,zs,2,0,"ng-template",null,16,A.W1O)),2&t&&(A.xp6(6),A.Q6J("ngModel",s.selectedFieldId),A.xp6(1),A.Q6J("ngForOf",s.lookupFields),A.xp6(1),A.Q6J("ngClass",A.VKq(7,Ls,s.screenSize===s.screenSizeEnum.XS||s.screenSize===s.screenSizeEnum.SM)),A.xp6(1),A.Q6J("placeholder",(null==s.lookupFields[s.selectedFieldId]?null:s.lookupFields[s.selectedFieldId].placeholder)||"Lookup Key")("ngModel",s.lookupKey),A.xp6(2),A.Q6J("ngIf",!s.lookupKey),A.xp6(6),A.Q6J("ngIf",s.flgSetLookupValue))},directives:[Ct.xw,Ct.yH,Ct.Wh,g.dn,OA._Y,OA.JL,OA.F,HA.VQ,OA.JJ,OA.On,Et.sg,HA.U0,U.KE,Et.mk,Y.oO,H.Nt,OA.Fj,OA.Q7,Et.O5,U.TO,w.lW,Et.RF,Et.n9,Ss,Ve,Et.ED],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}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),r})();var Cr=(()=>{return(r=Cr||(Cr={})).KB="KB",r.KW="KW",Cr;var r})();function sr(r,D){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4," Opening "),A.TgZ(5,"mat-icon",5),A._uU(6,"info_outline"),A.qZA()(),A.TgZ(7,"div",6),A._uU(8),A.ALo(9,"number"),A.qZA()(),A.TgZ(10,"div")(11,"h4",4),A._uU(12," Mutual Close "),A.TgZ(13,"mat-icon",7),A._uU(14,"info_outline"),A.qZA()(),A.TgZ(15,"div",6),A._uU(16),A.ALo(17,"number"),A.qZA()(),A.TgZ(18,"div")(19,"h4",4),A._uU(20," Unilateral Close "),A.TgZ(21,"mat-icon",8),A._uU(22,"info_outline"),A.qZA()(),A.TgZ(23,"div",6),A._uU(24),A.ALo(25,"number"),A.qZA()(),A.TgZ(26,"div")(27,"h4",4),A._uU(28," Delayed To Us "),A.TgZ(29,"mat-icon",9),A._uU(30,"info_outline"),A.qZA()(),A.TgZ(31,"div",6),A._uU(32),A.ALo(33,"number"),A.qZA()()(),A.TgZ(34,"div",3)(35,"div")(36,"h4",4),A._uU(37," Minimum Acceptable "),A.TgZ(38,"mat-icon",10),A._uU(39,"info_outline"),A.qZA()(),A.TgZ(40,"div",6),A._uU(41),A.ALo(42,"number"),A.qZA()(),A.TgZ(43,"div")(44,"h4",4),A._uU(45," Maximum Acceptable "),A.TgZ(46,"mat-icon",11),A._uU(47,"info_outline"),A.qZA()(),A.TgZ(48,"div",6),A._uU(49),A.ALo(50,"number"),A.qZA()(),A.TgZ(51,"div")(52,"h4",4),A._uU(53," HTLC Resolution "),A.TgZ(54,"mat-icon",12),A._uU(55,"info_outline"),A.qZA()(),A.TgZ(56,"div",6),A._uU(57),A.ALo(58,"number"),A.qZA()(),A.TgZ(59,"div")(60,"h4",4),A._uU(61," Penalty "),A.TgZ(62,"mat-icon",13),A._uU(63,"info_outline"),A.qZA()(),A.TgZ(64,"div",6),A._uU(65),A.ALo(66,"number"),A.qZA()()()()),2&r){const t=A.oxw();A.xp6(8),A.Oqu(A.lcZ(9,8,null==t.perkbw?null:t.perkbw.opening)),A.xp6(8),A.Oqu(A.lcZ(17,10,null==t.perkbw?null:t.perkbw.mutual_close)),A.xp6(8),A.Oqu(A.lcZ(25,12,null==t.perkbw?null:t.perkbw.unilateral_close)),A.xp6(8),A.Oqu(A.lcZ(33,14,null==t.perkbw?null:t.perkbw.delayed_to_us)),A.xp6(9),A.Oqu(A.lcZ(42,16,null==t.perkbw?null:t.perkbw.min_acceptable)),A.xp6(8),A.Oqu(A.lcZ(50,18,null==t.perkbw?null:t.perkbw.max_acceptable)),A.xp6(8),A.Oqu(A.lcZ(58,20,null==t.perkbw?null:t.perkbw.htlc_resolution)),A.xp6(8),A.Oqu(A.lcZ(66,22,null==t.perkbw?null:t.perkbw.penalty))}}function Da(r,D){if(1&r&&(A.TgZ(0,"div",14)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let Rr=(()=>{class r{constructor(){this.perkbw={}}ngAfterContentChecked(){this.feeRateStyle===Cr.KB?this.perkbw=this.feeRates.perkb:this.feeRateStyle===Cr.KW&&(this.perkbw=this.feeRates.perkw)}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-fee-rates"]],inputs:{feeRateStyle:"feeRateStyle",feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start center",1,"dashboard-info-title"],["matTooltip","Default feerate for fundchannel and withdraw","matTooltipPosition","below",1,"info-icon","info-icon-primary"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Feerate to aim for in cooperative shutdown. Note that since mutual close is a negotiation, the actual feerate used in mutual close will be somewhere between this and the corresponding mutual close feerate of the peer","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate for commitment_transaction in a live channel which we originally funded","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate for returning unilateral close funds to our wallet","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","The smallest feerate that you can use, usually the minimum relayed feerate of the backend","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","The largest feerate we will accept from remote negotiations. If a peer attempts to set the feerate higher than this we will unilaterally close the channel (or simply forget it if it's not open yet)","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate for returning unilateral close HTLC outputs to our wallet","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Feerate to start at when penalizing a cheat attempt","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,sr,67,24,"div",0),A.YNc(1,Da,3,1,"ng-template",null,1,A.W1O)),2&t){const L=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",L)}},directives:[Et.O5,Ct.xw,Ct.yH,Ct.Wh,p.Hw,eA.gM],pipes:[Et.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),r})();function ya(r,D){if(1&r&&(A.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),A._uU(4," Opening Channel "),A.TgZ(5,"mat-icon",5),A._uU(6,"info_outline"),A.qZA()(),A.TgZ(7,"div",6),A._uU(8),A.ALo(9,"number"),A.qZA()(),A.TgZ(10,"div")(11,"h4",4),A._uU(12," Mutual Close "),A.TgZ(13,"mat-icon",7),A._uU(14,"info_outline"),A.qZA()(),A.TgZ(15,"div",6),A._uU(16),A.ALo(17,"number"),A.qZA()(),A.TgZ(18,"div")(19,"h4",4),A._uU(20," Unilateral Close "),A.TgZ(21,"mat-icon",8),A._uU(22,"info_outline"),A.qZA()(),A.TgZ(23,"div",6),A._uU(24),A.ALo(25,"number"),A.qZA()(),A.TgZ(26,"div",9),A._UZ(27,"h4",4)(28,"div",6),A.qZA()(),A.TgZ(29,"div",3)(30,"div")(31,"h4",4),A._uU(32," HTLC Timeout "),A.TgZ(33,"mat-icon",10),A._uU(34,"info_outline"),A.qZA()(),A.TgZ(35,"div",6),A._uU(36),A.ALo(37,"number"),A.qZA()(),A.TgZ(38,"div")(39,"h4",4),A._uU(40," HTLC Success "),A.TgZ(41,"mat-icon",11),A._uU(42,"info_outline"),A.qZA()(),A.TgZ(43,"div",6),A._uU(44),A.ALo(45,"number"),A.qZA()(),A.TgZ(46,"div",9),A._UZ(47,"h4",4)(48,"div",6),A.qZA(),A.TgZ(49,"div",9),A._UZ(50,"h4",4)(51,"div",6),A.qZA()()()),2&r){const t=A.oxw();A.xp6(8),A.Oqu(A.lcZ(9,5,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.opening_channel_satoshis)),A.xp6(8),A.Oqu(A.lcZ(17,7,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.mutual_close_satoshis)),A.xp6(8),A.Oqu(A.lcZ(25,9,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.unilateral_close_satoshis)),A.xp6(12),A.Oqu(A.lcZ(37,11,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_timeout_satoshis)),A.xp6(8),A.Oqu(A.lcZ(45,13,null==t.feeRates||null==t.feeRates.onchain_fee_estimates?null:t.feeRates.onchain_fee_estimates.htlc_success_satoshis))}}function Gs(r,D){if(1&r&&(A.TgZ(0,"div",12)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw();A.xp6(2),A.Oqu(t.errorMessage)}}let Mi=(()=>{class r{constructor(){}}return r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-onchain-fee-estimates"]],inputs:{feeRates:"feeRates",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch","class","h-100",4,"ngIf","ngIfElse"],["errorBlock",""],["fxLayout","row","fxFlex","100","fxLayoutAlign","stretch",1,"h-100"],["fxLayout","column","fxFlex","50","fxLayoutAlign","space-between stretch"],["fxLayoutAlign","start center",1,"dashboard-info-title"],["matTooltip","Estimated cost of typical channel open","matTooltipPosition","below",1,"info-icon","info-icon-primary"],[1,"overflow-wrap","dashboard-info-value"],["matTooltip","Estimated cost of typical channel close","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Estimated cost of typical unilateral close (without HTLCs)","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["fxFlex","12"],["matTooltip","Estimated cost of typical HTLC timeout transaction","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["matTooltip","Estimated cost of typical HTLC fulfillment transaction","matTooltipPosition","below",1,"info-icon","info-icon-primary"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,s){if(1&t&&(A.YNc(0,ya,52,15,"div",0),A.YNc(1,Gs,3,1,"ng-template",null,1,A.W1O)),2&t){const L=A.MAs(2);A.Q6J("ngIf",""===(null==s.errorMessage?null:s.errorMessage.trim()))("ngIfElse",L)}},directives:[Et.O5,Ct.xw,Ct.yH,Ct.Wh,p.Hw,eA.gM],pipes:[Et.JJ],styles:[".fee-rate-list[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%]{height:44px}"]}),r})();function pi(r,D){1&r&&A._UZ(0,"mat-progress-bar",19)}function vr(r,D){if(1&r&&A._UZ(0,"rtl-cln-node-info",20),2&r){const t=A.oxw(3);A.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Hs(r,D){if(1&r&&A._UZ(0,"rtl-cln-channel-status-info",21),2&r){const t=A.oxw(3);A.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function Ii(r,D){if(1&r&&A._UZ(0,"rtl-cln-fee-info",22),2&r){const t=A.oxw(3);A.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function Vr(r,D){if(1&r&&A._UZ(0,"rtl-cln-fee-rates",23),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function Js(r,D){if(1&r&&A._UZ(0,"rtl-cln-fee-rates",23),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[6])}}function Os(r,D){if(1&r&&A._UZ(0,"rtl-cln-onchain-fee-estimates",24),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}const xa=function(r){return{"dashboard-card-content":!0,"error-border":r}};function Fa(r,D){if(1&r&&(A.TgZ(0,"mat-grid-tile",4)(1,"div",5)(2,"div",6)(3,"div",7),A._UZ(4,"fa-icon",8),A.TgZ(5,"span"),A._uU(6),A.qZA()()(),A.TgZ(7,"div",9)(8,"mat-card",10)(9,"mat-card-content",11),A.YNc(10,pi,1,0,"mat-progress-bar",12),A.TgZ(11,"div",13),A.YNc(12,vr,1,2,"rtl-cln-node-info",14),A.YNc(13,Hs,1,2,"rtl-cln-channel-status-info",15),A.YNc(14,Ii,1,2,"rtl-cln-fee-info",16),A.YNc(15,Vr,1,3,"rtl-cln-fee-rates",17),A.YNc(16,Js,1,3,"rtl-cln-fee-rates",17),A.YNc(17,Os,1,2,"rtl-cln-onchain-fee-estimates",18),A.qZA()()()()()()),2&r){const t=D.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(4),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(3),A.Q6J("ngClass",A.VKq(13,xa,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR)),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","status"),A.xp6(1),A.Q6J("ngSwitchCase","fee"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKB"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKW"),A.xp6(1),A.Q6J("ngSwitchCase","onChainFeeEstimates")}}function ks(r,D){if(1&r&&(A.TgZ(0,"mat-grid-list",2),A.YNc(1,Fa,18,15,"mat-grid-tile",3),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngForOf",t.nodeCardsOperator)}}function js(r,D){1&r&&A._UZ(0,"mat-progress-bar",19)}function Ks(r,D){if(1&r&&A._UZ(0,"rtl-cln-node-info",20),2&r){const t=A.oxw(3);A.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Vs(r,D){if(1&r&&A._UZ(0,"rtl-cln-channel-status-info",21),2&r){const t=A.oxw(3);A.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[0]+" "+t.errorMessages[2])}}function Ws(r,D){if(1&r&&A._UZ(0,"rtl-cln-fee-info",22),2&r){const t=A.oxw(3);A.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1]+" "+t.errorMessages[3]+" "+t.errorMessages[4])}}function Zs(r,D){if(1&r&&A._UZ(0,"rtl-cln-fee-rates",23),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKB)("feeRateStyle","KB")("errorMessage",t.errorMessages[5])}}function Xs(r,D){if(1&r&&A._UZ(0,"rtl-cln-fee-rates",23),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("feeRateStyle","KW")("errorMessage",t.errorMessages[5])}}function qs(r,D){if(1&r&&A._UZ(0,"rtl-cln-onchain-fee-estimates",24),2&r){const t=A.oxw(3);A.Q6J("feeRates",t.feeRatesPerKW)("errorMessage",t.errorMessages[5])}}function _s(r,D){if(1&r&&(A.TgZ(0,"mat-grid-tile",4)(1,"div",5)(2,"div",6)(3,"div",25),A._UZ(4,"fa-icon",8),A.TgZ(5,"span"),A._uU(6),A.qZA()()(),A.TgZ(7,"div",9)(8,"mat-card",10)(9,"mat-card-content",11),A.YNc(10,js,1,0,"mat-progress-bar",12),A.TgZ(11,"div",13),A.YNc(12,Ks,1,2,"rtl-cln-node-info",14),A.YNc(13,Vs,1,2,"rtl-cln-channel-status-info",15),A.YNc(14,Ws,1,2,"rtl-cln-fee-info",16),A.YNc(15,Zs,1,3,"rtl-cln-fee-rates",17),A.YNc(16,Xs,1,3,"rtl-cln-fee-rates",17),A.YNc(17,qs,1,2,"rtl-cln-onchain-fee-estimates",18),A.qZA()()()()()()),2&r){const t=D.$implicit,s=A.oxw(2);A.Q6J("colspan",t.cols)("rowspan",t.rows),A.xp6(4),A.Q6J("icon",t.icon),A.xp6(2),A.Oqu(t.title),A.xp6(3),A.Q6J("ngClass",A.VKq(13,xa,"node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.ERROR)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusChannels.status===s.apiCallStatusEnum.ERROR||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.ERROR)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.ERROR||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.ERROR)),A.xp6(1),A.Q6J("ngIf","node"===t.id&&s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||"status"===t.id&&(s.apiCallStatusNodeInfo.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusLRBal.status===s.apiCallStatusEnum.INITIATED)||"fee"===t.id&&(s.apiCallStatusFees.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusChannels.status===s.apiCallStatusEnum.INITIATED||s.apiCallStatusFHistory.status===s.apiCallStatusEnum.INITIATED)||"feeRatesKB"===t.id&&s.apiCallStatusPerKB.status===s.apiCallStatusEnum.INITIATED||"feeRatesKW"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED||"onChainFeeEstimates"===t.id&&s.apiCallStatusPerKW.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngSwitch",t.id),A.xp6(1),A.Q6J("ngSwitchCase","node"),A.xp6(1),A.Q6J("ngSwitchCase","status"),A.xp6(1),A.Q6J("ngSwitchCase","fee"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKB"),A.xp6(1),A.Q6J("ngSwitchCase","feeRatesKW"),A.xp6(1),A.Q6J("ngSwitchCase","onChainFeeEstimates")}}function $s(r,D){if(1&r&&(A.TgZ(0,"mat-grid-list",2),A.YNc(1,_s,18,15,"mat-grid-tile",3),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngForOf",t.nodeCardsMerchant)}}let A0=(()=>{class r{constructor(t,s,L){this.logger=t,this.commonService=s,this.store=L,this.faBolt=h.BDt,this.faServer=h.xf3,this.faNetworkWired=h.kXW,this.faLink=h.nNP,this.selNode={},this.information={},this.channelsStatus={active:{},pending:{},inactive:{}},this.feeRatesPerKB={},this.feeRatesPerKW={},this.nodeCardsOperator=[],this.nodeCardsMerchant=[],this.screenSize="",this.screenSizeEnum=a.cu,this.userPersonaEnum=a.ol,this.errorMessages=["","","","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusLRBal=null,this.apiCallStatusChannels=null,this.apiCallStatusFees=null,this.apiCallStatusFHistory=null,this.apiCallStatusPerKB=null,this.apiCallStatusPerKW=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:6,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:6,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:6,rows:1},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:4,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:4,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:4,rows:4}]):(this.nodeCardsMerchant=[{id:"node",icon:this.faServer,title:"Node Information",cols:2,rows:3},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:2,rows:3},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:2,rows:3},{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}],this.nodeCardsOperator=[{id:"feeRatesKB",icon:this.faServer,title:"Fee Rate Per KB",cols:2,rows:4},{id:"feeRatesKW",icon:this.faNetworkWired,title:"Fee Rate Per KW",cols:2,rows:4},{id:"onChainFeeEstimates",icon:this.faLink,title:"Onchain Fee Estimates (Sats)",cols:2,rows:4}])}ngOnInit(){this.store.select(B.Hz).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=t.apisCallStatus[0],this.apiCallStatusNodeInfo.status===a.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.selNode=t.nodeSettings,this.information=t.information,this.logger.info(t)}),this.store.select(B.ZW).pipe((0,i.R)(this.unSubs[1]),(0,o.M)(this.store.select(B.Wj))).subscribe(([t,s])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusLRBal=t.apiCallStatus,this.apiCallStatusChannels=s.apiCallStatus,this.apiCallStatusLRBal.status===a.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusLRBal.message?JSON.stringify(this.apiCallStatusLRBal.message):this.apiCallStatusLRBal.message),this.apiCallStatusChannels.status===a.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message),this.channelsStatus.active.channels=t.activeChannels.length||0,this.channelsStatus.pending.channels=t.pendingChannels.length||0,this.channelsStatus.inactive.channels=t.inactiveChannels.length||0,this.channelsStatus.active.capacity=s.localRemoteBalance.localBalance||0,this.channelsStatus.pending.capacity=s.localRemoteBalance.pendingBalance||0,this.channelsStatus.inactive.capacity=s.localRemoteBalance.inactiveBalance||0}),this.store.select(B.JG).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===a.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees}),this.store.select(B.Bo).pipe((0,i.R)(this.unSubs[3])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusFHistory=t.apiCallStatus,this.apiCallStatusFHistory.status===a.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusFHistory.message?JSON.stringify(this.apiCallStatusFHistory.message):this.apiCallStatusFHistory.message),t.forwardingHistory&&t.forwardingHistory.listForwards.length&&(this.fees.totalTxCount=t.forwardingHistory.listForwards.length)}),this.store.select(B.zm).pipe((0,i.R)(this.unSubs[4])).subscribe(t=>{this.errorMessages[5]="",this.apiCallStatusPerKB=t.apiCallStatus,this.apiCallStatusPerKB.status===a.Bn.ERROR&&(this.errorMessages[5]="object"==typeof this.apiCallStatusPerKB.message?JSON.stringify(this.apiCallStatusPerKB.message):this.apiCallStatusPerKB.message),this.feeRatesPerKB=t.feeRatesPerKB}),this.store.select(B.hx).pipe((0,i.R)(this.unSubs[5])).subscribe(t=>{this.errorMessages[6]="",this.apiCallStatusPerKW=t.apiCallStatus,this.apiCallStatusPerKW.status===a.Bn.ERROR&&(this.errorMessages[6]="object"==typeof this.apiCallStatusPerKW.message?JSON.stringify(this.apiCallStatusPerKW.message):this.apiCallStatusPerKW.message),this.feeRatesPerKW=t.feeRatesPerKW})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-network-info"]],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch",1,"mb-4"],["cols","6","rowHeight","100px",4,"ngIf"],["cols","6","rowHeight","100px"],["class","node-grid-tile",3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"node-grid-tile",3,"colspan","rowspan"],["fxLayout","column","fxLayoutAlign","stretch start","fxFlex","100",1,"h-100"],["fxLayout","row","fxLayoutAlign","start start",1,"w-100"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-2"],[1,"mr-1",3,"icon"],["fxLayout","column","fxLayoutAlign","stretch center","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","center stretch",1,"w-100","h-93"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","w-96","h-93"],["fxLayout","column","fxFlex","100",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","feeRateStyle","errorMessage",4,"ngSwitchCase"],["class","h-100",3,"feeRates","errorMessage",4,"ngSwitchCase"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],[1,"h-100",3,"feeRates","feeRateStyle","errorMessage"],[1,"h-100",3,"feeRates","errorMessage"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","pl-15px"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,ks,2,1,"mat-grid-list",1),A.YNc(2,$s,2,1,"mat-grid-list",1),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",s.selNode.userPersona===s.userPersonaEnum.OPERATOR),A.xp6(1),A.Q6J("ngIf",s.selNode.userPersona===s.userPersonaEnum.MERCHANT))},directives:[Ct.xw,Ct.Wh,Et.O5,f.Il,Et.sg,f.DX,Ct.yH,e.BN,g.a8,g.dn,Et.mk,Y.oO,T.pW,Et.RF,Et.n9,P,X,SA,Rr,Mi],styles:[""]}),r})();function mi(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",8),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=D.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let Ki=(()=>{class r{constructor(t){this.router=t,this.faUserCheck=h.hkK,this.links=[{link:"sign",name:"Sign"},{link:"verify",name:"Verify"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const L=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=L?L.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-sign-verify-message"]],decls:11,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Sign/Verify Message"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),A.YNc(8,mi,2,3,"div",6),A.qZA(),A.TgZ(9,"div",7),A._UZ(10,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faUserCheck),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,ft.BU,Et.sg,ft.Nj,qt.rH,Ct.yH,qt.lC],styles:[""]}),r})();var vi=Nt(9122);function Ya(r,D){if(1&r&&(A.TgZ(0,"mat-option",7),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t),A.xp6(1),A.hij(" ",t.addressTp," ")}}let t0=(()=>{class r{constructor(t,s){this.store=t,this.clnEffects=s,this.addressTypes=a._t,this.selectedAddressType=a._t[0],this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,ht._E)({payload:this.selectedAddressType})),this.clnEffects.setNewAddressCL.pipe((0,PA.q)(1)).subscribe(t=>{this.newAddress=t,setTimeout(()=>{this.store.dispatch((0,KA.qR)({payload:{data:{address:this.newAddress,addressType:this.selectedAddressType.addressTp,component:vi.n}}}))},0)})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(qe.J))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain-receive"]],decls:8,vars:2,consts:[["fxLayout","column",1,"padding-gap-x"],["fxLayout","row","fxLayoutAlign","space-between end","fxLayoutAlign.gt-sm","start end"],["fxFlex","48","fxFlex.gt-md","25","fxLayoutAlign","start end",1,"mr-2"],["placeholder","Address Type","name","address_type","tabindex","1",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"mt-2"],["mat-flat-button","","color","primary","tabindex","2",1,"top-minus-15px",3,"click"],[3,"value"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-select",3),A.NdJ("ngModelChange",function(dA){return s.selectedAddressType=dA}),A.YNc(4,Ya,2,2,"mat-option",4),A.qZA()(),A.TgZ(5,"div",5)(6,"button",6),A.NdJ("click",function(){return s.onGenerateAddress()}),A._uU(7,"Generate Address"),A.qZA()()()()),2&t&&(A.xp6(3),A.Q6J("ngModel",s.selectedAddressType),A.xp6(1),A.Q6J("ngForOf",s.addressTypes))},directives:[Ct.xw,Ct.Wh,U.KE,Ct.yH,CA.gD,OA.JJ,OA.On,Et.sg,wA.ey,w.lW],styles:[""]}),r})(),Wr=(()=>{class r{constructor(t,s){this.store=t,this.activatedRoute=s,this.sweepAll=!1,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.activatedRoute.data.pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.sweepAll=t.sweepAll})}openSendFundsModal(){this.store.dispatch((0,KA.qR)({payload:{data:{sweepAll:this.sweepAll,component:Bi}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(qt.gz))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"button",2),A.NdJ("click",function(){return s.openSendFundsModal()}),A._uU(3),A.qZA()()()),2&t&&(A.xp6(3),A.Oqu(s.sweepAll?"Sweep All":"Send Funds"))},directives:[Ct.xw,Ct.yH,Ct.Wh,w.lW],styles:[""]}),r})();var Rn=Nt(8675),Ar=Nt(4004),Di=Nt(1079),yi=Nt(9843);const Vi=["form"];function e0(r,D){if(1&r&&(A.TgZ(0,"mat-option",42),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t),A.xp6(1),A.Oqu(t.alias?t.alias:t.id?t.id:"")}}function Zr(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Peer alias is required."),A.qZA())}function Ta(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Peer not found in the list."),A.qZA())}function n0(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",1)(1,"input",39),A.NdJ("change",function(){return A.CHM(t),A.oxw().onSelectedPeerChanged()}),A.qZA(),A.TgZ(2,"mat-autocomplete",40,41),A.NdJ("optionSelected",function(){return A.CHM(t),A.oxw().onSelectedPeerChanged()}),A.YNc(4,e0,2,2,"mat-option",26),A.ALo(5,"async"),A.qZA(),A.YNc(6,Zr,2,0,"mat-error",17),A.YNc(7,Ta,2,0,"mat-error",17),A.qZA()}if(2&r){const t=A.MAs(3),s=A.oxw();A.xp6(1),A.Q6J("formControl",s.selectedPeer)("matAutocomplete",t),A.xp6(1),A.Q6J("displayWith",s.displayFn),A.xp6(2),A.Q6J("ngForOf",A.lcZ(5,6,s.filteredPeers)),A.xp6(2),A.Q6J("ngIf",null==s.selectedPeer.errors?null:s.selectedPeer.errors.required),A.xp6(1),A.Q6J("ngIf",null==s.selectedPeer.errors?null:s.selectedPeer.errors.notfound)}}function r0(r,D){1&r&&A.GkF(0)}function i0(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount is required."),A.qZA())}function a0(r,D){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function o0(r,D){if(1&r&&(A.TgZ(0,"mat-option",42),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function s0(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function l0(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-form-field",43)(1,"input",44,45),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().customFeeRate=L}),A.qZA(),A.YNc(3,s0,2,0,"mat-error",17),A.qZA()}if(2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngModel",t.customFeeRate)("step",.1)("min",0)("required","customperkb"===t.selFeeRate&&!t.flgMinConf),A.xp6(2),A.Q6J("ngIf","customperkb"===t.selFeeRate&&!t.flgMinConf&&!t.customFeeRate)}}function c0(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function g0(r,D){if(1&r&&(A.TgZ(0,"mat-option",42),A._uU(1),A.ALo(2,"number"),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t),A.xp6(1),A.hij("",A.lcZ(2,2,t.value)," Sats")}}function B0(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",22)(1,"mat-form-field",46)(2,"mat-select",47),A.NdJ("selectionChange",function(L){return A.CHM(t),A.oxw().onUTXOSelectionChange(L)})("valueChange",function(L){return A.CHM(t),A.oxw().selUTXOs=L}),A.TgZ(3,"mat-select-trigger"),A._uU(4),A.ALo(5,"number"),A.qZA(),A.YNc(6,g0,3,4,"mat-option",26),A.qZA()(),A.TgZ(7,"div",28)(8,"mat-slide-toggle",48),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().flgUseAllBalance=L})("change",function(){return A.CHM(t),A.oxw().onUTXOAllBalanceChange()}),A._uU(9," Use selected UTXOs balance "),A.qZA(),A.TgZ(10,"mat-icon",49),A._uU(11,"info_outline"),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(2),A.Q6J("value",t.selUTXOs),A.xp6(2),A.AsE("",A.lcZ(5,6,t.totalSelectedUTXOAmount)," Sats (",t.selUTXOs.length>1?t.selUTXOs.length+" UTXOs":"1 UTXO",")"),A.xp6(2),A.Q6J("ngForOf",t.utxos),A.xp6(2),A.Q6J("ngModel",t.flgUseAllBalance)("disabled",t.selUTXOs.length<1)}}function u0(r,D){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.channelConnectionError)}}function f0(r,D){if(1&r&&(A.TgZ(0,"div",50),A._UZ(1,"fa-icon",51),A.YNc(2,u0,2,1,"span",17),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.channelConnectionError)}}function h0(r,D){if(1&r&&(A.TgZ(0,"mat-expansion-panel",53)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),A._uU(4,"Peer: \xa0"),A.qZA(),A.TgZ(5,"strong",54),A._uU(6),A.qZA()()(),A.TgZ(7,"div",9)(8,"div",0)(9,"div",1)(10,"h4",55),A._uU(11,"Pubkey"),A.qZA(),A.TgZ(12,"span",56),A._uU(13),A.qZA()()(),A._UZ(14,"mat-divider",57),A.TgZ(15,"div",0)(16,"div",58)(17,"h4",55),A._uU(18,"Address"),A.qZA(),A.TgZ(19,"span",59),A._uU(20),A.qZA()(),A.TgZ(21,"div",58)(22,"h4",55),A._uU(23,"Connected"),A.qZA(),A.TgZ(24,"span",59),A._uU(25),A.qZA()()()()()),2&r){const t=A.oxw(2);A.xp6(6),A.Oqu((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.id)),A.xp6(7),A.Oqu(t.peer.id),A.xp6(7),A.Oqu(null==t.peer?null:t.peer.netaddr),A.xp6(5),A.Oqu(t.peer.connected?"True":"False")}}function xi(r,D){if(1&r&&A.YNc(0,h0,26,4,"mat-expansion-panel",52),2&r){const t=A.oxw();A.Q6J("ngIf",t.peer)}}const Ie=function(r,D){return{"mr-6":r,"mr-2":D}};let ee=(()=>{class r{constructor(t,s,L,dA,ot,Ae){this.dialogRef=t,this.data=s,this.store=L,this.actions=dA,this.decimalPipe=ot,this.commonService=Ae,this.selectedPeer=new OA.NI,this.faExclamationTriangle=h.eHv,this.isCompatibleVersion=!1,this.utxos=[],this.selUTXOs=[],this.flgUseAllBalance=!1,this.totalSelectedUTXOAmount=0,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.fundingAmount=null,this.selectedPubkey="",this.isPrivate=!1,this.feeRateTypes=a.vn,this.selFeeRate="",this.customFeeRate=null,this.flgMinConf=!1,this.minConfValue=null,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.isCompatibleVersion=this.data.message.isCompatibleVersion,this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.utxos=this.data.message.utxos,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(L=>L.type===a.AB.UPDATE_API_CALL_STATUS_CLN||L.type===a.AB.FETCH_CHANNELS_CLN)).subscribe(L=>{L.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&L.payload.status===a.Bn.ERROR&&"SaveNewChannel"===L.payload.action&&(this.channelConnectionError=L.payload.message),L.type===a.AB.FETCH_CHANNELS_CLN&&this.dialogRef.close()});let t="",s="";this.sortedPeers=this.peers.sort((L,dA)=>(t=L.alias?L.alias.toLowerCase():L.id?L.id.toLowerCase():"",s=dA.alias?dA.alias.toLowerCase():L.id.toLowerCase(),ts?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,i.R)(this.unSubs[1]),(0,Rn.O)(""),(0,Ar.U)(L=>"string"==typeof L?L:L.alias?L.alias:L.id),(0,Ar.U)(L=>L?this.filterPeers(L):this.sortedPeers.slice()))}filterPeers(t){return this.sortedPeers.filter(s=>0===s.alias.toLowerCase().indexOf(t?t.toLowerCase():""))}displayFn(t){return t&&t.alias?t.alias:t&&t.id?t.id:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.id?this.selectedPeer.value.id:null,"string"==typeof this.selectedPeer.value){const t=this.peers.filter(s=>s.alias.length===this.selectedPeer.value.length&&0===s.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===t.length&&t[0].id&&(this.selectedPubkey=t[0].id)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.flgMinConf=!1,this.selFeeRate="",this.minConfValue=null,this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(t){t&&(this.flgMinConf||this.selFeeRate||this.selUTXOs.length&&0!==this.selUTXOs.length)?(this.advancedTitle="Advanced Options",this.flgMinConf&&(this.advancedTitle=this.advancedTitle+" | Min Confirmation Blocks: "+this.minConfValue),this.selFeeRate&&(this.advancedTitle=this.advancedTitle+" | Fee Rate: "+(this.customFeeRate?this.customFeeRate+" (Sats/vByte)":this.feeRateTypes.find(s=>s.feeRateId===this.selFeeRate).feeRateType)),this.selUTXOs.length&&this.selUTXOs.length>0&&(this.advancedTitle=this.advancedTitle+" | Total Selected: "+this.selUTXOs.length+" | Selected UTXOs: "+this.decimalPipe.transform(this.totalSelectedUTXOAmount)+" Sats")):this.advancedTitle="Advanced Options"}onUTXOSelectionChange(t){const s={value:0};this.selUTXOs.length&&this.selUTXOs.length>0?(this.totalSelectedUTXOAmount=this.selUTXOs.reduce((L,dA)=>(s.value=L.value+dA.value,s)).value,this.flgUseAllBalance&&this.onUTXOAllBalanceChange()):(this.totalSelectedUTXOAmount=0,this.fundingAmount=null,this.flgUseAllBalance=!1)}onUTXOAllBalanceChange(){this.fundingAmount=this.flgUseAllBalance?this.totalSelectedUTXOAmount:null}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||this.flgMinConf&&!this.minConfValue||"customperkb"===this.selFeeRate&&!this.flgMinConf&&!this.customFeeRate)return!0;const t={peerId:this.peer&&this.peer.id?this.peer.id:this.selectedPubkey,satoshis:this.flgUseAllBalance?"all":this.fundingAmount.toString(),announce:!this.isPrivate,minconf:this.flgMinConf?this.minConfValue:null};t.feeRate="customperkb"===this.selFeeRate&&!this.flgMinConf&&this.customFeeRate?1e3*this.customFeeRate+"perkb":this.selFeeRate,this.selUTXOs.length&&this.selUTXOs.length>0&&(t.utxos=[],this.selUTXOs.forEach(s=>t.utxos.push(s.txid+":"+s.output))),this.store.dispatch((0,ht.YX)({payload:t}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(Yt.eX),A.Y36(Et.JJ),A.Y36(C.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-open-channel"]],viewQuery:function(t,s){if(1&t&&A.Gf(Vi,7),2&t){let L;A.iGM(L=A.CRH())&&(s.form=L.first)}},decls:56,vars:34,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","70","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amount",3,"ngModel","step","min","max","disabled","ngModelChange"],["amount","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","25","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","54","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate",3,"value","disabled","valueChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","42","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","name","flgMinConf","fxLayoutAlign","stretch start",3,"ngModel","ngClass","ngModelChange","change"],["fxFlex","98"],["matInput","","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"ngModel","step","min","required","disabled","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap",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","7","type","reset",1,"mr-1"],["autoFocus","","mat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"ngModel","step","min","required","ngModelChange"],["custFeeRate","ngModel"],["fxFlex","54","fxLayoutAlign","start end"],["tabindex","6","placeholder","Coin Selection","multiple","",3,"value","selectionChange","valueChange"],["tabindex","7","color","primary","name","flgUseAllBalance",3,"ngModel","disabled","ngModelChange","change"],["matTooltip","Use selected UTXOs balance as the amount to be sent. Final amount sent will be less the mining fee.","matTooltipPosition","before",1,"info-icon"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8),A.NdJ("submit",function(){return s.onOpenChannel()})("reset",function(){return s.resetData()}),A.TgZ(11,"div",9),A.YNc(12,n0,8,8,"mat-form-field",10),A.qZA(),A.YNc(13,r0,1,0,"ng-container",11),A.TgZ(14,"div",9)(15,"div",12)(16,"mat-form-field",13)(17,"input",14,15),A.NdJ("ngModelChange",function(dA){return s.fundingAmount=dA}),A.qZA(),A.TgZ(19,"mat-hint"),A._uU(20),A.ALo(21,"number"),A.qZA(),A.TgZ(22,"span",16),A._uU(23," Sats "),A.qZA(),A.YNc(24,i0,2,0,"mat-error",17),A.YNc(25,a0,2,1,"mat-error",17),A.qZA(),A.TgZ(26,"div",18)(27,"mat-slide-toggle",19),A.NdJ("ngModelChange",function(dA){return s.isPrivate=dA}),A._uU(28,"Private Channel"),A.qZA()()(),A.TgZ(29,"mat-expansion-panel",20),A.NdJ("closed",function(){return s.onAdvancedPanelToggle(!0)})("opened",function(){return s.onAdvancedPanelToggle(!1)}),A.TgZ(30,"mat-expansion-panel-header")(31,"mat-panel-title")(32,"span"),A._uU(33),A.qZA()()(),A.TgZ(34,"div",21)(35,"div",22)(36,"div",23)(37,"mat-form-field",24)(38,"mat-select",25),A.NdJ("valueChange",function(dA){return s.selFeeRate=dA})("selectionChange",function(){return s.customFeeRate=null}),A.YNc(39,o0,2,2,"mat-option",26),A.qZA()(),A.YNc(40,l0,4,5,"mat-form-field",27),A.qZA(),A.TgZ(41,"div",28)(42,"mat-checkbox",29),A.NdJ("ngModelChange",function(dA){return s.flgMinConf=dA})("change",function(){return s.flgMinConf?s.selFeeRate=null:s.minConfValue=null}),A.qZA(),A.TgZ(43,"mat-form-field",30)(44,"input",31,32),A.NdJ("ngModelChange",function(dA){return s.minConfValue=dA}),A.qZA(),A.YNc(46,c0,2,0,"mat-error",17),A.qZA()()(),A.YNc(47,B0,12,8,"div",33),A.qZA()()(),A.YNc(48,f0,3,2,"div",34),A.TgZ(49,"div",35)(50,"button",36),A._uU(51,"Clear Fields"),A.qZA(),A.TgZ(52,"button",37),A._uU(53,"Open Channel"),A.qZA()()()()()(),A.YNc(54,xi,1,1,"ng-template",null,38,A.W1O)),2&t){const L=A.MAs(18),dA=A.MAs(55);A.xp6(5),A.Oqu(s.alertTitle),A.xp6(7),A.Q6J("ngIf",!s.peer&&s.peers&&s.peers.length>0),A.xp6(1),A.Q6J("ngTemplateOutlet",dA),A.xp6(4),A.Q6J("ngModel",s.fundingAmount)("step",1e3)("min",1)("max",s.totalBalance)("disabled",s.flgUseAllBalance),A.xp6(3),A.AsE("Remaining Bal: ",A.lcZ(21,29,s.totalBalance-(s.fundingAmount?s.fundingAmount:0)),"",s.flgUseAllBalance?". Amount replaced by UTXO balance":"",""),A.xp6(4),A.Q6J("ngIf",(null==L.errors?null:L.errors.required)||!s.fundingAmount),A.xp6(1),A.Q6J("ngIf",null==L.errors?null:L.errors.max),A.xp6(2),A.Q6J("ngModel",s.isPrivate),A.xp6(6),A.Oqu(s.advancedTitle),A.xp6(4),A.Q6J("fxFlex","customperkb"!==s.selFeeRate||s.flgMinConf?"100":"48"),A.xp6(1),A.Q6J("value",s.selFeeRate)("disabled",s.flgMinConf),A.xp6(1),A.Q6J("ngForOf",s.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===s.selFeeRate&&!s.flgMinConf),A.xp6(2),A.Q6J("ngModel",s.flgMinConf)("ngClass",A.WLB(31,Ie,s.screenSize===s.screenSizeEnum.XS||s.screenSize===s.screenSizeEnum.SM,s.screenSize===s.screenSizeEnum.MD||s.screenSize===s.screenSizeEnum.LG||s.screenSize===s.screenSizeEnum.XL)),A.xp6(2),A.Q6J("ngModel",s.minConfValue)("step",1)("min",0)("required",s.flgMinConf)("disabled",!s.flgMinConf),A.xp6(2),A.Q6J("ngIf",s.flgMinConf&&!s.minConfValue),A.xp6(1),A.Q6J("ngIf",s.isCompatibleVersion),A.xp6(1),A.Q6J("ngIf",""!==s.channelConnectionError)}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,g.dn,OA._Y,OA.JL,OA.F,Et.O5,U.KE,H.Nt,OA.Fj,Di.ZL,OA.Q7,OA.JJ,OA.oH,Di.XC,Et.sg,wA.ey,U.TO,Et.tP,OA.wV,OA.qQ,OA.Fd,b.q,yi.F,OA.On,U.bx,U.R9,RA.Rr,or.ib,or.yz,or.yK,CA.gD,$A.oG,Et.mk,Y.oO,CA.$L,p.Hw,eA.gM,e.BN,k.h,sA.d],pipes:[Et.Ov,Et.JJ],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),r})();function E0(r,D){if(1&r&&(A.TgZ(0,"span",7),A._uU(1,"Open"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.openChannels)}}function Sa(r,D){if(1&r&&(A.TgZ(0,"span",7),A._uU(1,"Pending/Inactive"),A.qZA()),2&r){const t=A.oxw();A.s9C("matBadge",t.pendingChannels)}}let Xr=(()=>{class r{constructor(t,s,L,dA){this.logger=t,this.store=s,this.commonService=L,this.router=dA,this.openChannels=0,this.pendingChannels=0,this.selNode={},this.information={},this.peers=[],this.utxos=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending/Inactive"}],this.activeLink=0,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(t=>t instanceof qt.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(s=>s.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(B.OL).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.selNode=t.nodeSettings,this.information=t.information,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(B.Wi).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.peers=t.peers}),this.store.select(B.T4).pipe((0,i.R)(this.unSubs[3])).subscribe(t=>{this.utxos=this.commonService.sortAscByKey(t.utxos.filter(s=>"confirmed"===s.status),"value")}),this.store.select(B.ZW).pipe((0,i.R)(this.unSubs[4])).subscribe(t=>{this.openChannels=t.activeChannels.length||0,this.pendingChannels=t.pendingChannels.length+t.inactiveChannels.length||0,this.logger.info(t)})}onOpenChannel(){const t={peers:this.peers,information:this.information,balance:this.totalBalance,utxos:this.utxos,isCompatibleVersion:this.commonService.isVersionCompatible(this.information.version,"0.9.0")&&this.commonService.isVersionCompatible(this.information.api_version,"0.4.0")};this.store.dispatch((0,KA.qR)({payload:{data:{alertTitle:"Open Channel",message:t,component:ee}}}))}onSelectedTabChange(t){this.router.navigateByUrl("/cln/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channels-tables"]],decls:12,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"button",2),A.NdJ("click",function(){return s.onOpenChannel()}),A._uU(3,"Open Channel"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-tab-group",4),A.NdJ("selectedIndexChange",function(dA){return s.activeLink=dA})("selectedTabChange",function(dA){return s.onSelectedTabChange(dA)}),A.TgZ(6,"mat-tab"),A.YNc(7,E0,2,1,"ng-template",5),A.qZA(),A.TgZ(8,"mat-tab"),A.YNc(9,Sa,2,1,"ng-template",5),A.qZA()(),A.TgZ(10,"div",6),A._UZ(11,"router-outlet"),A.qZA()()()),2&t&&(A.xp6(5),A.Q6J("selectedIndex",s.activeLink))},directives:[Ct.xw,Ct.yH,Ct.Wh,w.lW,ft.SP,ft.uX,ft.uD,ui.k,qt.lC],styles:[""]}),r})();function Na(r,D){if(1&r&&(A.TgZ(0,"div")(1,"div",9)(2,"div",1)(3,"h4",11),A._uU(4,"Funding Transaction Id"),A.qZA(),A.TgZ(5,"span",12),A._uU(6),A.qZA()()(),A._UZ(7,"mat-divider",13),A.qZA()),2&r){const t=A.oxw();A.xp6(6),A.Oqu(t.channel.funding_txid),A.xp6(1),A.Q6J("inset",!0)}}function w0(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Show Advanced"),A.qZA())}function C0(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Hide Advanced"),A.qZA())}function Ua(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"button",23),A.NdJ("copied",function(L){return A.CHM(t),A.oxw().onCopyChanID(L)}),A._uU(1,"Copy Short Channel ID"),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("payload",t.channel.short_channel_id)}}function Q0(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"button",24),A.NdJ("click",function(){return A.CHM(t),A.oxw().onClose()}),A._uU(1,"OK"),A.qZA()}}const hn=function(r){return{"xs-scroll-y":r}},Wi=function(r,D){return{"mt-2":r,"mt-1":D}};let Zi=(()=>{class r{constructor(t,s,L,dA,ot){this.dialogRef=t,this.data=s,this.logger=L,this.commonService=dA,this.snackBar=ot,this.faReceipt=h.dLy,this.showAdvanced=!1,this.showCopy=!0,this.showCopyField=null,this.screenSize="",this.screenSizeEnum=a.cu}ngOnInit(){this.channel=this.data.channel,this.showCopy=this.data.showCopy,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("Short channel ID "+t+" copied."),this.logger.info("Copied Text: "+t)}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(E.mQ),A.Y36(C.v),A.Y36(Sr.ux))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-information"]],decls:94,vars:40,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","25"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3),A._UZ(4,"fa-icon",4),A.TgZ(5,"span",5),A._uU(6,"Channel Information"),A.qZA()(),A.TgZ(7,"button",6),A.NdJ("click",function(){return s.onClose()}),A._uU(8,"X"),A.qZA()(),A.TgZ(9,"mat-card-content",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h4",11),A._uU(14,"Short Channel ID"),A.qZA(),A.TgZ(15,"span",12),A._uU(16),A.qZA()(),A.TgZ(17,"div",10)(18,"h4",11),A._uU(19,"Peer Alias"),A.qZA(),A.TgZ(20,"span",12),A._uU(21),A.qZA()()(),A._UZ(22,"mat-divider",13),A.TgZ(23,"div",9)(24,"div",1)(25,"h4",11),A._uU(26,"Channel ID"),A.qZA(),A.TgZ(27,"span",12),A._uU(28),A.qZA()()(),A._UZ(29,"mat-divider",13),A.TgZ(30,"div",9)(31,"div",1)(32,"h4",11),A._uU(33,"Peer Public Key"),A.qZA(),A.TgZ(34,"span",12),A._uU(35),A.qZA()()(),A._UZ(36,"mat-divider",13),A.TgZ(37,"div",9)(38,"div",14)(39,"h4",11),A._uU(40,"mSatoshi to Us"),A.qZA(),A.TgZ(41,"span",15),A._uU(42),A.ALo(43,"number"),A.qZA()(),A.TgZ(44,"div",14)(45,"h4",11),A._uU(46,"Spendable (mSats)"),A.qZA(),A.TgZ(47,"span",15),A._uU(48),A.ALo(49,"number"),A.qZA()(),A.TgZ(50,"div",14)(51,"h4",11),A._uU(52,"Total (mSats)"),A.qZA(),A.TgZ(53,"span",15),A._uU(54),A.ALo(55,"number"),A.qZA()(),A.TgZ(56,"div",14)(57,"h4",11),A._uU(58,"State"),A.qZA(),A.TgZ(59,"span",15),A._uU(60),A.qZA()()(),A._UZ(61,"mat-divider",13),A.TgZ(62,"div",9)(63,"div",14)(64,"h4",11),A._uU(65,"Our Reserve (Sats)"),A.qZA(),A.TgZ(66,"span",15),A._uU(67),A.ALo(68,"number"),A.qZA()(),A.TgZ(69,"div",14)(70,"h4",11),A._uU(71,"Their Reserve (Sats)"),A.qZA(),A.TgZ(72,"span",15),A._uU(73),A.ALo(74,"number"),A.qZA()(),A.TgZ(75,"div",14)(76,"h4",11),A._uU(77,"Connected"),A.qZA(),A.TgZ(78,"span",15),A._uU(79),A.qZA()(),A.TgZ(80,"div",14)(81,"h4",11),A._uU(82,"Private"),A.qZA(),A.TgZ(83,"span",15),A._uU(84),A.qZA()()(),A._UZ(85,"mat-divider",13),A.YNc(86,Na,8,2,"div",16),A.TgZ(87,"div",17)(88,"button",18),A.NdJ("click",function(){return s.onShowAdvanced()}),A.YNc(89,w0,2,0,"p",19),A.YNc(90,C0,2,0,"ng-template",null,20,A.W1O),A.qZA(),A.YNc(92,Ua,2,1,"button",21),A.YNc(93,Q0,2,0,"button",22),A.qZA()()()()()),2&t){const L=A.MAs(91);A.xp6(4),A.Q6J("icon",s.faReceipt),A.xp6(5),A.Q6J("ngClass",A.VKq(35,hn,s.screenSize===s.screenSizeEnum.XS)),A.xp6(7),A.Oqu(s.channel.short_channel_id),A.xp6(5),A.Oqu(s.channel.alias),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(s.channel.channel_id),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(s.channel.id),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(A.lcZ(43,25,s.channel.msatoshi_to_us)),A.xp6(6),A.Oqu(A.lcZ(49,27,s.channel.spendable_msatoshi)),A.xp6(6),A.Oqu(A.lcZ(55,29,s.channel.msatoshi_total)),A.xp6(6),A.Oqu(s.channel.state),A.xp6(1),A.Q6J("inset",!0),A.xp6(6),A.Oqu(A.lcZ(68,31,s.channel.our_channel_reserve_satoshis)),A.xp6(6),A.Oqu(A.lcZ(74,33,s.channel.their_channel_reserve_satoshis)),A.xp6(6),A.Oqu(s.channel.connected?"Yes":"No"),A.xp6(5),A.Oqu(s.channel.private?"Yes":"No"),A.xp6(1),A.Q6J("inset",!0),A.xp6(1),A.Q6J("ngIf",s.showAdvanced),A.xp6(1),A.Q6J("ngClass",A.WLB(37,Wi,!s.showAdvanced,s.showAdvanced)),A.xp6(2),A.Q6J("ngIf",!s.showAdvanced)("ngIfElse",L),A.xp6(3),A.Q6J("ngIf",s.showCopy),A.xp6(1),A.Q6J("ngIf",!s.showCopy)}},directives:[Ct.xw,Ct.Wh,Ct.yH,g.dk,e.BN,w.lW,g.dn,Et.mk,Y.oO,sA.d,Et.O5,k.h,Kr.y],pipes:[Et.JJ],styles:[""]}),r})();function Fi(r,D){1&r&&A._UZ(0,"mat-progress-bar",33)}function d0(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1," Short Channel ID "),A.qZA())}function Dr(r,D){if(1&r&&(A.TgZ(0,"span",40),A._UZ(1,"fa-icon",41),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faEyeSlash)}}function tr(r,D){if(1&r&&(A.TgZ(0,"span",42),A._UZ(1,"fa-icon",41),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("icon",t.faEye)}}const er=function(r){return{"max-width":r}};function lr(r,D){if(1&r&&(A.TgZ(0,"td",35)(1,"div",36),A.YNc(2,Dr,2,1,"span",37),A.YNc(3,tr,2,1,"span",38),A.TgZ(4,"span",39),A._uU(5),A.qZA()()()),2&r){const t=D.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(4,er,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(1),A.Q6J("ngIf",t.private),A.xp6(1),A.Q6J("ngIf",!t.private),A.xp6(2),A.Oqu(null==t?null:t.short_channel_id)}}function M0(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1," Alias "),A.qZA())}function p0(r,D){if(1&r&&(A.TgZ(0,"td",35)(1,"div",36)(2,"span",39),A._uU(3),A.qZA()()()),2&r){const t=D.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,er,s.screenSize===s.screenSizeEnum.XS?"12rem":"22rem")),A.xp6(2),A.Oqu(null==t?null:t.alias)}}function I0(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1," Connected "),A.qZA())}function Yi(r,D){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function m0(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1," Private "),A.qZA())}function Pa(r,D){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.private?"Private":"Public"," ")}}function v0(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1," State "),A.qZA())}function D0(r,D){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.state,"")}}function de(r,D){1&r&&(A.TgZ(0,"th",43),A._uU(1," Local Balance (Sats) "),A.qZA())}function Ra(r,D){if(1&r&&(A.TgZ(0,"td",35)(1,"span",44),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_to_us)/1e3,(null==t?null:t.msatoshi_to_us)<1e3?"1.0-4":"1.0-0")," ")}}function y0(r,D){1&r&&(A.TgZ(0,"th",43),A._uU(1," Remote Balance (Sats) "),A.qZA())}function x0(r,D){if(1&r&&(A.TgZ(0,"td",35)(1,"span",44),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,(null==t?null:t.msatoshi_to_them)/1e3,(null==t?null:t.msatoshi_to_them)<1e3?"1.0-4":"1.0-0")," ")}}function za(r,D){1&r&&(A.TgZ(0,"th",43),A._uU(1," Total mSatoshis "),A.qZA())}function F0(r,D){if(1&r&&(A.TgZ(0,"td",35)(1,"span",44),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.msatoshi_total)," ")}}function Y0(r,D){1&r&&(A.TgZ(0,"th",43),A._uU(1," Spendable Satoshi "),A.qZA())}function T0(r,D){if(1&r&&(A.TgZ(0,"td",35)(1,"span",44),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.spendable_msatoshi)," ")}}function La(r,D){1&r&&(A.TgZ(0,"th",45),A._uU(1,"Balance Score "),A.qZA())}function Ti(r,D){if(1&r&&(A.TgZ(0,"td",46)(1,"div",47)(2,"mat-hint",48),A._uU(3),A.ALo(4,"number"),A.qZA()(),A._UZ(5,"mat-progress-bar",49),A.qZA()),2&r){const t=D.$implicit;A.xp6(3),A.Oqu(A.lcZ(4,2,t.balancedness||0)),A.xp6(2),A.s9C("value",t.msatoshi_to_us&&t.msatoshi_to_us>0?+t.msatoshi_to_us/(+t.msatoshi_to_us+ +t.msatoshi_to_them)*100:0)}}function ba(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",50)(1,"div",51)(2,"mat-select",52),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",53),A.NdJ("click",function(){return A.CHM(t),A.oxw().onChannelUpdate("all")}),A._uU(5,"Update Fee Policy"),A.qZA(),A.TgZ(6,"mat-option",53),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(7,"Download CSV"),A.qZA()()()()}}function S0(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",54)(1,"div",55)(2,"mat-select",56),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",53),A.NdJ("click",function(L){const ot=A.CHM(t).$implicit;return A.oxw().onChannelClick(ot,L)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",53),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onViewRemotePolicy(dA)}),A._uU(7,"View Remote Fee"),A.qZA(),A.TgZ(8,"mat-option",53),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onChannelUpdate(dA)}),A._uU(9,"Update Fee Policy"),A.qZA(),A.TgZ(10,"mat-option",53),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onChannelClose(dA)}),A._uU(11,"Close Channel"),A.qZA()()()()}}function N0(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No peers connected. Add a peer in order to open a channel."),A.qZA())}function U0(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No channel available."),A.qZA())}function P0(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting channels..."),A.qZA())}function R0(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function z0(r,D){if(1&r&&(A.TgZ(0,"td",57),A.YNc(1,N0,2,0,"p",58),A.YNc(2,U0,2,0,"p",58),A.YNc(3,P0,2,0,"p",58),A.YNc(4,R0,2,1,"p",58),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const L0=function(r){return{"display-none":r}};function Si(r,D){if(1&r&&A._UZ(0,"tr",59),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,L0,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function b0(r,D){1&r&&A._UZ(0,"tr",60)}function Xi(r,D){1&r&&A._UZ(0,"tr",61)}const Ga=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},G0=function(){return["no_peer"]};let qr=(()=>{class r{constructor(t,s,L,dA,ot,Ae){var un,Qe,tn,ia,Gl,Hl,Jl,Ol;this.logger=t,this.store=s,this.rtlEffects=L,this.clnEffects=dA,this.commonService=ot,this.router=Ae,this.faEye=h.Mdf,this.faEyeSlash=h.Aq,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=a.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi_to_us","msatoshi_to_them","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","actions"]):(this.flgSticky=!0,this.displayedColumns=["short_channel_id","alias","msatoshi_to_us","msatoshi_to_them","balancedness","actions"]),this.selFilter=(null===(ia=null===(tn=null===(Qe=null===(un=this.router)||void 0===un?void 0:un.getCurrentNavigation())||void 0===Qe?void 0:Qe.extras)||void 0===tn?void 0:tn.state)||void 0===ia?void 0:ia.filter)?null===(Ol=null===(Jl=null===(Hl=null===(Gl=this.router)||void 0===Gl?void 0:Gl.getCurrentNavigation())||void 0===Hl?void 0:Hl.extras)||void 0===Jl?void 0:Jl.state)||void 0===Ol?void 0:Ol.filter:""}ngOnInit(){this.store.select(B.jK).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance||0,this.logger.info(t)}),this.store.select(B.ZW).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.channelsData=t.activeChannels,this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}onViewRemotePolicy(t){this.store.dispatch((0,ht.$A)({payload:{uiMessage:a.m6.GET_REMOTE_POLICY,shortChannelID:t.short_channel_id||"",showError:!0}})),this.clnEffects.setLookupCL.pipe((0,PA.q)(1)).subscribe(s=>{if(0===s.length)return!1;let L={};L=s[0].source!==this.information.id?s[0]:s[1];const dA=[[{key:"base_fee_millisatoshi",value:L.base_fee_millisatoshi,title:"Base Fees (mSats)",width:34,type:a.Gi.NUMBER},{key:"fee_per_millionth",value:L.fee_per_millionth,title:"Fee/Millionth",width:33,type:a.Gi.NUMBER},{key:"delay",value:L.delay,title:"Delay",width:33,type:a.Gi.NUMBER}]],ot="Remote policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id);setTimeout(()=>{this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Remote Channel Policy",titleMessage:ot,message:dA}}}))},0)})}onChannelUpdate(t){"all"!==t&&"ONCHAIN"===t.state||("all"===t?(this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update All",message:[],titleMessage:"Update fee policy for all channels",flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:1,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[1])).subscribe(L=>{L&&this.store.dispatch((0,ht.pW)({payload:{baseFeeMsat:L[0].inputValue,feeRate:L[1].inputValue,channelId:"all"}}))})):(this.myChanPolicy={fee_base_msat:0,fee_rate_milli_msat:0},this.store.dispatch((0,ht.$A)({payload:{uiMessage:a.m6.GET_CHAN_POLICY,shortChannelID:t.short_channel_id,showError:!1}})),this.clnEffects.setLookupCL.pipe((0,PA.q)(1)).subscribe(s=>{this.myChanPolicy=s.length>0&&s[0].source===this.information.id?{fee_base_msat:s[0].base_fee_millisatoshi,fee_rate_milli_msat:s[0].fee_per_millionth}:s.length>1&&s[1].source===this.information.id?{fee_base_msat:s[1].base_fee_millisatoshi,fee_rate_milli_msat:s[1].fee_per_millionth}:{fee_base_msat:0,fee_rate_milli_msat:0},this.logger.info(this.myChanPolicy);const L="Update fee policy for Channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),dA=[];setTimeout(()=>{this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:dA,titleMessage:L,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSats)",inputType:"number",inputValue:""===this.myChanPolicy.fee_base_msat?0:this.myChanPolicy.fee_base_msat,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:this.myChanPolicy.fee_rate_milli_msat,min:1,width:48,hintFunction:this.percentHintFunction}]}}}))},0)}),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[2])).subscribe(s=>{s&&this.store.dispatch((0,ht.pW)({payload:{baseFeeMsat:s[0].inputValue,feeRate:s[1].inputValue,channelId:t.channel_id}}))})),this.applyFilter())}percentHintFunction(t){return(t/1e4).toString()+"%"}onChannelClose(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Close Channel",titleMessage:"Closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Close Channel"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[3])).subscribe(s=>{s&&this.store.dispatch((0,ht.BL)({payload:{id:t.id||"",channelId:t.channel_id||"",force:!1}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{channel:t,showCopy:!0,component:Zi}}}))}loadChannelsTable(t){t.sort((s,L)=>s.active===L.active?0:L.active?1:-1),this.channels=new xA.by([...t]),this.channels.filterPredicate=(s,L)=>((s.connected?"connected":"disconnected")+(s.channel_id?s.channel_id.toLowerCase():"")+(s.short_channel_id?s.short_channel_id.toLowerCase():"")+(s.id?s.id.toLowerCase():"")+(s.alias?s.alias.toLowerCase():"")+(s.private?"private":"public")+(s.state?s.state.toLowerCase():"")+(s.funding_txid?s.funding_txid.toLowerCase():"")+(s.msatoshi_to_us?s.msatoshi_to_us:"")+(s.msatoshi_total?s.msatoshi_total:"")+(s.their_channel_reserve_satoshis?s.their_channel_reserve_satoshis:"")+(s.our_channel_reserve_satoshis?s.our_channel_reserve_satoshis:"")+(s.spendable_msatoshi?s.spendable_msatoshi:"")).includes(L),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.channels.paginator=this.paginator,this.applyFilter(),this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Open-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(DA.V),A.Y36(qe.J),A.Y36(C.v),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-open-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Channels")}])],decls:48,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_to_them"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"div",2),A.TgZ(3,"mat-form-field",3)(4,"input",4),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.YNc(5,Fi,1,0,"mat-progress-bar",5),A.TgZ(6,"div",6)(7,"table",7,8),A.ynx(9,9),A.YNc(10,d0,2,0,"th",10),A.YNc(11,lr,6,6,"td",11),A.BQk(),A.ynx(12,12),A.YNc(13,M0,2,0,"th",10),A.YNc(14,p0,4,4,"td",11),A.BQk(),A.ynx(15,13),A.YNc(16,I0,2,0,"th",10),A.YNc(17,Yi,2,1,"td",11),A.BQk(),A.ynx(18,14),A.YNc(19,m0,2,0,"th",10),A.YNc(20,Pa,2,1,"td",11),A.BQk(),A.ynx(21,15),A.YNc(22,v0,2,0,"th",10),A.YNc(23,D0,2,1,"td",11),A.BQk(),A.ynx(24,16),A.YNc(25,de,2,0,"th",17),A.YNc(26,Ra,4,4,"td",11),A.BQk(),A.ynx(27,18),A.YNc(28,y0,2,0,"th",17),A.YNc(29,x0,4,4,"td",11),A.BQk(),A.ynx(30,19),A.YNc(31,za,2,0,"th",17),A.YNc(32,F0,4,3,"td",11),A.BQk(),A.ynx(33,20),A.YNc(34,Y0,2,0,"th",17),A.YNc(35,T0,4,3,"td",11),A.BQk(),A.ynx(36,21),A.YNc(37,La,2,0,"th",22),A.YNc(38,Ti,6,4,"td",23),A.BQk(),A.ynx(39,24),A.YNc(40,ba,8,0,"th",25),A.YNc(41,S0,12,0,"td",26),A.BQk(),A.ynx(42,27),A.YNc(43,z0,5,4,"td",28),A.BQk(),A.YNc(44,Si,1,3,"tr",29),A.YNc(45,b0,1,0,"tr",30),A.YNc(46,Xi,1,0,"tr",31),A.qZA()(),A._UZ(47,"mat-paginator",32),A.qZA()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(1),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(2),A.Q6J("dataSource",s.channels)("ngClass",A.VKq(11,Ga,""!==s.errorMessage)),A.xp6(37),A.Q6J("matFooterRowDef",A.DdM(13,G0)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.Wh,Ct.yH,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,Et.O5,T.pW,q.$V,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,Et.PC,Y.Zl,eA.gM,e.BN,U.bx,CA.gD,CA.$L,wA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.JJ],styles:[".mat-column-short_channel_id[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-short_channel_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 22%;width:22%}.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-msatoshi_to_us[_ngcontent-%COMP%], .mat-column-msatoshi_to_them[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),r})();const En=["outputIdx"];function Ni(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Output Index required."),A.qZA())}function Ha(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Invalid index value."),A.qZA())}function H0(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fees is required."),A.qZA())}function J0(r,D){if(1&r&&(A.TgZ(0,"div",27),A._UZ(1,"fa-icon",13),A.TgZ(2,"span"),A._uU(3),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(2),A.Oqu(t.bumpFeeError)}}let O0=(()=>{class r{constructor(t,s,L,dA,ot,Ae){this.actions=t,this.dialogRef=s,this.data=L,this.store=dA,this.logger=ot,this.snackBar=Ae,this.newAddress="",this.fees=null,this.outputIndex=null,this.faCopy=h.kZ_,this.faInfoCircle=h.sqG,this.faExclamationTriangle=h.eHv,this.bumpFeeError="",this.unSubs=[new c.x,new c.x]}set payReq(t){t&&(this.outputIdx=t)}ngOnInit(){this.bumpFeeChannel=this.data.channel}onBumpFee(){if(!this.outputIndex&&0!==this.outputIndex||!this.fees)return!0;this.bumpFeeError="",this.store.dispatch((0,ht._E)({payload:a._t[0]})),this.actions.pipe((0,JA.h)(t=>t.type===a.AB.SET_NEW_ADDRESS_CLN),(0,PA.q)(1)).subscribe(t=>{this.store.dispatch((0,ht.Wi)({payload:{address:t.payload,satoshis:"all",feeRate:this.fees,utxos:[this.bumpFeeChannel.funding_txid+":"+this.outputIndex.toString()]}}))}),this.actions.pipe((0,JA.h)(t=>t.type===a.AB.SET_CHANNEL_TRANSACTION_RES_CLN),(0,PA.q)(1)).subscribe(t=>{this.store.dispatch((0,KA.jW)({payload:"Successfully bumped the fee. Use the block explorer to verify transaction."})),this.dialogRef.close()}),this.actions.pipe((0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN),(0,i.R)(this.unSubs[0])).subscribe(t=>{t.payload.status===a.Bn.ERROR&&("SetChannelTransaction"===t.payload.action||"GenerateNewAddress"===t.payload.action)&&(this.logger.error(t.payload.message),this.bumpFeeError=t.payload.message)})}onCopyID(t){this.snackBar.open("Transaction ID copied.")}resetData(){this.bumpFeeError="",this.fees=null,this.outputIndex=null,this.outputIdx.control.setErrors(null)}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(Yt.eX),A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(E.mQ),A.Y36(Sr.ux))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-bump-fee"]],viewQuery:function(t,s){if(1&t&&A.Gf(En,5),2&t){let L;A.iGM(L=A.CRH())&&(s.payReq=L.first)}},decls:47,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxLayout","column",1,"bordered-box","mb-1","p-2"],["fxLayoutAlign","start center",1,"pb-1","word-break"],["matSuffix","","rtlClipboard","","matTooltip","Copy transaction ID",1,"ml-1",3,"icon","payload","copied"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxFlex","100"],[1,"pl-1"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","49"],["autoFocus","","matInput","","placeholder","Output Index","type","number","tabindex","1","required","","name","outputIdx",3,"ngModel","step","min","ngModelChange"],["outputIdx","ngModel"],[4,"ngIf"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","fees","required","","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center"],["mat-button","","color","primary","type","reset","tabindex","5","default","",1,"mr-1",3,"click"],["mat-button","","color","primary","type","submit","tabindex","6",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Bump Fee"),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7)(10,"div",8)(11,"p",9),A._uU(12),A.TgZ(13,"fa-icon",10),A.NdJ("copied",function(dA){return s.onCopyID(dA)}),A.qZA()(),A.TgZ(14,"div",11)(15,"div",12),A._UZ(16,"fa-icon",13),A.TgZ(17,"span",14),A._uU(18,"Bumping fee on pending open channels is an advanced feature, attempt it only if you are familiar with the functionality of Bitcoin transactions. "),A.TgZ(19,"div"),A._uU(20,"Before attempting fee bump ensure the following:"),A.qZA(),A.TgZ(21,"div",15),A._uU(22,"1: Use a Bitcoin block explorer to ensure that channel opening transaction is not confirmed."),A.qZA(),A.TgZ(23,"div",15),A._uU(24,"2: The channel opening transaction must have a sizable change output, which can be spent further. The fee cannot be bumped without the change output."),A.qZA(),A.TgZ(25,"div",15),A._uU(26,"3: Find the index value of the change output via a block explorer."),A.qZA(),A.TgZ(27,"div",15),A._uU(28,"4: Enter the index value of the change output in the form below and the desired fee rate."),A.qZA(),A.TgZ(29,"div",15),A._uU(30,"5: Upon successful fee bump, use your block explorer to track the child transaction in the mempool, which should be linked with the change output transaction."),A.qZA()()(),A.TgZ(31,"div",16)(32,"mat-form-field",17)(33,"input",18,19),A.NdJ("ngModelChange",function(dA){return s.outputIndex=dA}),A.qZA(),A.YNc(35,Ni,2,0,"mat-error",20),A.YNc(36,Ha,2,0,"mat-error",20),A.qZA(),A.TgZ(37,"mat-form-field",17)(38,"input",21,22),A.NdJ("ngModelChange",function(dA){return s.fees=dA}),A.qZA(),A.YNc(40,H0,2,0,"mat-error",20),A.qZA()(),A.YNc(41,J0,4,2,"div",23),A.qZA()(),A.TgZ(42,"div",24)(43,"button",25),A.NdJ("click",function(){return s.resetData()}),A._uU(44,"Clear"),A.qZA(),A.TgZ(45,"button",26),A.NdJ("click",function(){return s.onBumpFee()}),A._uU(46),A.qZA()()()()()()),2&t){const L=A.MAs(34);A.xp6(12),A.hij("Bump fee for transaction id: ",null==s.bumpFeeChannel?null:s.bumpFeeChannel.funding_txid," "),A.xp6(1),A.Q6J("icon",s.faCopy)("payload",null==s.bumpFeeChannel?null:s.bumpFeeChannel.funding_txid),A.xp6(3),A.Q6J("icon",s.faInfoCircle),A.xp6(17),A.Q6J("ngModel",s.outputIndex)("step",1)("min",0),A.xp6(2),A.Q6J("ngIf",null==L.errors?null:L.errors.required),A.xp6(1),A.Q6J("ngIf",null==L.errors?null:L.errors.pendingChannelOutputIndex),A.xp6(2),A.Q6J("ngModel",s.fees)("step",1)("min",0),A.xp6(2),A.Q6J("ngIf",!s.fees),A.xp6(1),A.Q6J("ngIf",""!==s.bumpFeeError),A.xp6(5),A.Oqu(""!==s.bumpFeeError?"Retry Bump Fee":"Bump Fee")}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,g.dn,OA._Y,OA.JL,OA.F,e.BN,U.R9,Kr.y,eA.gM,U.KE,H.Nt,OA.wV,OA.qQ,OA.Fj,b.q,k.h,OA.Q7,OA.JJ,OA.On,Et.O5,U.TO],styles:[""]}),r})();function k0(r,D){1&r&&A._UZ(0,"mat-progress-bar",30)}function j0(r,D){1&r&&(A.TgZ(0,"th",31),A._uU(1," Short Channel ID "),A.qZA())}function K0(r,D){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.short_channel_id,"")}}function V0(r,D){1&r&&(A.TgZ(0,"th",31),A._uU(1," Alias "),A.qZA())}function W0(r,D){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(null==t?null:t.alias)}}function Ja(r,D){1&r&&(A.TgZ(0,"th",31),A._uU(1," Connected "),A.qZA())}function Z0(r,D){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.connected?"Connected":"Disconnected"," ")}}function X0(r,D){1&r&&(A.TgZ(0,"th",31),A._uU(1," Private "),A.qZA())}function q0(r,D){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null!=t&&t.private?"Private":"Public"," ")}}function cr(r,D){1&r&&(A.TgZ(0,"th",31),A._uU(1," State "),A.qZA())}const _0=function(r){return{"max-width":r}};function Ui(r,D){if(1&r&&(A.TgZ(0,"td",33),A._uU(1),A.qZA()),2&r){const t=D.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(2,_0,s.screenSize===s.screenSizeEnum.XS?"10rem":"")),A.xp6(1),A.hij(" ",s.CLNChannelPendingState[null==t?null:t.state]," ")}}function $0(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1," mSatoshi To Us "),A.qZA())}function Al(r,D){if(1&r&&(A.TgZ(0,"td",32)(1,"span",35),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.msatoshi_to_us)," ")}}function tl(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1," Total (Sats) "),A.qZA())}function Oa(r,D){if(1&r&&(A.TgZ(0,"td",32)(1,"span",35),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,(null==t?null:t.msatoshi_total)/1e3)," ")}}function el(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1," Spendable Satoshi "),A.qZA())}function nl(r,D){if(1&r&&(A.TgZ(0,"td",32)(1,"span",35),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.spendable_msatoshi)," ")}}function rl(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",36)(1,"div",37)(2,"mat-select",38),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",39),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function il(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",39),A.NdJ("click",function(){A.CHM(t);const L=A.oxw().$implicit;return A.oxw().onChannelClose(L)}),A._uU(1,"Close Channel"),A.qZA()}}function ka(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",39),A.NdJ("click",function(){A.CHM(t);const L=A.oxw().$implicit;return A.oxw().onBumpFee(L)}),A._uU(1,"Bump Fee"),A.qZA()}}function al(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",40)(1,"div",37)(2,"mat-select",41),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",39),A.NdJ("click",function(L){const ot=A.CHM(t).$implicit;return A.oxw().onChannelClick(ot,L)}),A._uU(5,"View Info"),A.qZA(),A.YNc(6,il,2,0,"mat-option",42),A.YNc(7,ka,2,0,"mat-option",42),A.qZA()()()}if(2&r){const t=D.$implicit,s=A.oxw();A.xp6(6),A.Q6J("ngIf",s.isCompatibleVersion&&("CHANNELD_SHUTTING_DOWN"===t.state||"CLOSINGD_SIGEXCHANGE"===t.state||!t.connected&&"CHANNELD_NORMAL"===t.state)),A.xp6(1),A.Q6J("ngIf","CHANNELD_AWAITING_LOCKIN"===t.state)}}function ja(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No peers connected. Add a peer in order to open a channel."),A.qZA())}function Ka(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No pending/inactive channel available."),A.qZA())}function Va(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting pending/inactive channels..."),A.qZA())}function ol(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function sl(r,D){if(1&r&&(A.TgZ(0,"td",43),A.YNc(1,ja,2,0,"p",44),A.YNc(2,Ka,2,0,"p",44),A.YNc(3,Va,2,0,"p",44),A.YNc(4,ol,2,1,"p",44),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const ll=function(r){return{"display-none":r}};function cl(r,D){if(1&r&&A._UZ(0,"tr",45),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,ll,t.numPeers>0&&(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function gl(r,D){1&r&&A._UZ(0,"tr",46)}function Wa(r,D){1&r&&A._UZ(0,"tr",47)}const Bl=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},ul=function(){return["no_peer"]};let fl=(()=>{class r{constructor(t,s,L,dA){this.logger=t,this.store=s,this.rtlEffects=L,this.commonService=dA,this.isCompatibleVersion=!1,this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=a.vn,this.selFilter="",this.flgSticky=!1,this.CLNChannelPendingState=a.Zs,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","state","actions"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","connected","state","msatoshi_total","actions"])}ngOnInit(){this.store.select(B.jK).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.information.api_version&&(this.isCompatibleVersion=this.commonService.isVersionCompatible(this.information.api_version,"0.4.2")),this.numPeers=t.numPeers,this.totalBalance=t.balance.totalBalance,this.logger.info(t)}),this.store.select(B.ZW).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.channelsData=[...t.pendingChannels,...t.inactiveChannels],this.channelsData=this.channelsData.sort((s,L)=>this.CLNChannelPendingState[s.state]>=this.CLNChannelPendingState[L.state]?1:-1),this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData&&this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onBumpFee(t){this.store.dispatch((0,KA.qR)({payload:{data:{channel:t,component:O0}}}))}onChannelClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{channel:t,showCopy:!0,component:Zi}}}))}onChannelClose(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Force Close Channel",titleMessage:"Force closing channel: "+(t.alias||t.short_channel_id?t.alias&&t.short_channel_id?t.alias+" ("+t.short_channel_id+")":t.alias?t.alias:t.short_channel_id:t.channel_id),noBtnText:"Cancel",yesBtnText:"Force Close"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[2])).subscribe(s=>{s&&this.store.dispatch((0,ht.BL)({payload:{id:t.id,channelId:t.channel_id,force:!0}}))})}loadChannelsTable(t){t.sort((s,L)=>s.active===L.active?0:L.active?1:-1),this.channels=new xA.by([...t]),this.channels.filterPredicate=(s,L)=>((s.connected?"connected":"disconnected")+(s.channel_id?s.channel_id.toLowerCase():"")+(s.short_channel_id?s.short_channel_id.toLowerCase():"")+(s.id?s.id.toLowerCase():"")+(s.alias?s.alias.toLowerCase():"")+(s.private?"private":"public")+(s.state&&this.CLNChannelPendingState[s.state]?this.CLNChannelPendingState[s.state].toLowerCase():"")+(s.funding_txid?s.funding_txid.toLowerCase():"")+(s.msatoshi_to_us?s.msatoshi_to_us:"")+(s.msatoshi_total?s.msatoshi_total:"")+(s.their_channel_reserve_satoshis?s.their_channel_reserve_satoshis:"")+(s.our_channel_reserve_satoshis?s.our_channel_reserve_satoshis:"")+(s.spendable_msatoshi?s.spendable_msatoshi:"")).includes(L),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(s,L)=>"state"===L?this.CLNChannelPendingState[s.state]:s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.channels.paginator=this.paginator,this.logger.info(this.channels)}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Pending-inactive-channels")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(DA.V),A.Y36(C.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-channel-pending-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Channels")}])],decls:42,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container","w-100",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","short_channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","connected"],["matColumnDef","private"],["matColumnDef","state"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","msatoshi_to_us"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi_total"],["matColumnDef","spendable_msatoshi"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pr-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pr-3"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1),A._UZ(2,"div",2),A.TgZ(3,"mat-form-field",3)(4,"input",4),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.YNc(5,k0,1,0,"mat-progress-bar",5),A.TgZ(6,"div",6)(7,"table",7,8),A.ynx(9,9),A.YNc(10,j0,2,0,"th",10),A.YNc(11,K0,2,1,"td",11),A.BQk(),A.ynx(12,12),A.YNc(13,V0,2,0,"th",10),A.YNc(14,W0,2,1,"td",11),A.BQk(),A.ynx(15,13),A.YNc(16,Ja,2,0,"th",10),A.YNc(17,Z0,2,1,"td",11),A.BQk(),A.ynx(18,14),A.YNc(19,X0,2,0,"th",10),A.YNc(20,q0,2,1,"td",11),A.BQk(),A.ynx(21,15),A.YNc(22,cr,2,0,"th",10),A.YNc(23,Ui,2,4,"td",16),A.BQk(),A.ynx(24,17),A.YNc(25,$0,2,0,"th",18),A.YNc(26,Al,4,3,"td",11),A.BQk(),A.ynx(27,19),A.YNc(28,tl,2,0,"th",18),A.YNc(29,Oa,4,3,"td",11),A.BQk(),A.ynx(30,20),A.YNc(31,el,2,0,"th",18),A.YNc(32,nl,4,3,"td",11),A.BQk(),A.ynx(33,21),A.YNc(34,rl,6,0,"th",22),A.YNc(35,al,8,2,"td",23),A.BQk(),A.ynx(36,24),A.YNc(37,sl,5,4,"td",25),A.BQk(),A.YNc(38,cl,1,3,"tr",26),A.YNc(39,gl,1,0,"tr",27),A.YNc(40,Wa,1,0,"tr",28),A.qZA()(),A._UZ(41,"mat-paginator",29),A.qZA()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(1),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(2),A.Q6J("dataSource",s.channels)("ngClass",A.VKq(11,Bl,""!==s.errorMessage)),A.xp6(31),A.Q6J("matFooterRowDef",A.DdM(13,ul)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.Wh,Ct.yH,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,Et.O5,T.pW,q.$V,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,Et.PC,Y.Zl,CA.gD,CA.$L,wA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-state[_ngcontent-%COMP%]{flex:1 1 15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();const hl=["peersForm"],El=["stepper"];function wl(r,D){if(1&r&&A._uU(0),2&r){const t=A.oxw();A.Oqu(t.peerFormLabel)}}function Za(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Address is required."),A.qZA())}function Xa(r,D){if(1&r&&(A.TgZ(0,"div",40),A._UZ(1,"fa-icon",41),A.TgZ(2,"span"),A._uU(3),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(2),A.Oqu(t.peerConnectionError)}}function Cl(r,D){if(1&r&&A._uU(0),2&r){const t=A.oxw();A.Oqu(t.channelFormLabel)}}function Ql(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount is required."),A.qZA())}function dl(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount must be a positive number."),A.qZA())}function on(r,D){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function yr(r,D){if(1&r&&(A.TgZ(0,"mat-option",42),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.Q6J("value",t.feeRateId),A.xp6(1),A.hij(" ",t.feeRateType," ")}}function Ml(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee Rate is required."),A.qZA())}function qa(r,D){if(1&r&&(A.TgZ(0,"mat-form-field",43),A._UZ(1,"input",44),A.YNc(2,Ml,2,0,"mat-error",14),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("step",.1)("min",0),A.xp6(1),A.Q6J("ngIf","customperkb"===t.channelFormGroup.controls.selFeeRate.value&&!t.channelFormGroup.controls.flgMinConf.value&&!t.channelFormGroup.controls.customFeeRate.value)}}function pl(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Min Confirmation Blocks is required."),A.qZA())}function Il(r,D){if(1&r&&(A.TgZ(0,"div",40),A._UZ(1,"fa-icon",41),A.TgZ(2,"span"),A._uU(3),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(2),A.Oqu(t.channelConnectionError)}}const _a=function(r,D){return{"mr-6":r,"mr-2":D}};let ml=(()=>{class r{constructor(t,s,L,dA,ot,Ae,un){this.dialogRef=t,this.data=s,this.store=L,this.formBuilder=dA,this.actions=ot,this.logger=Ae,this.commonService=un,this.faExclamationTriangle=h.eHv,this.peerAddress="",this.totalBalance=0,this.feeRateTypes=a.vn,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.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.id&&this.data.message.peer.netaddr?this.data.message.peer.id+"@"+this.data.message.peer.netaddr:this.data.message.peer&&this.data.message.peer.id&&!this.data.message.peer.netaddr?this.data.message.peer.id:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[OA.kI.required]],peerAddress:[this.peerAddress,[OA.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[OA.kI.required,OA.kI.min(1),OA.kI.max(this.totalBalance)]],isPrivate:[!1],selFeeRate:[null],customFeeRate:[null],flgMinConf:[!1],minConfValue:[{value:null,disabled:!0}],hiddenAmount:["",[OA.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.channelFormGroup.controls.flgMinConf.valueChanges.pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{t?(this.channelFormGroup.controls.selFeeRate.setValue(null),this.channelFormGroup.controls.selFeeRate.disable(),this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.minConfValue.reset(),this.channelFormGroup.controls.minConfValue.enable(),this.channelFormGroup.controls.minConfValue.setValidators([OA.kI.required])):(this.channelFormGroup.controls.selFeeRate.enable(),this.channelFormGroup.controls.minConfValue.setValue(null),this.channelFormGroup.controls.minConfValue.disable(),this.channelFormGroup.controls.minConfValue.setValidators(null))}),this.channelFormGroup.controls.selFeeRate.valueChanges.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.channelFormGroup.controls.customFeeRate.setValue(null),this.channelFormGroup.controls.customFeeRate.reset(),this.channelFormGroup.controls.customFeeRate.setValidators("customperkb"!==t||this.channelFormGroup.controls.flgMinConf.value?null:[OA.kI.required])}),this.actions.pipe((0,i.R)(this.unSubs[2]),(0,JA.h)(t=>t.type===a.AB.NEWLY_ADDED_PEER_CLN||t.type===a.AB.FETCH_CHANNELS_CLN||t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.NEWLY_ADDED_PEER_CLN&&(this.logger.info(t.payload),this.flgEditable=!1,this.newlyAddedPeer=t.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),t.type===a.AB.FETCH_CHANNELS_CLN&&this.dialogRef.close(),t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&t.payload.status===a.Bn.ERROR&&("SaveNewPeer"===t.payload.action?this.peerConnectionError=t.payload.message:"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch((0,ht.El)({payload:{id:this.peerFormGroup.controls.peerAddress.value}}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||this.channelFormGroup.controls.flgMinConf.value&&!this.channelFormGroup.controls.minConfValue.value)return!0;this.channelConnectionError="",this.store.dispatch((0,ht.YX)({payload:{peerId:this.newlyAddedPeer.id,satoshis:this.channelFormGroup.controls.fundingAmount.value,announce:!this.channelFormGroup.controls.isPrivate.value,feeRate:"customperkb"===this.channelFormGroup.controls.selFeeRate.value&&!this.channelFormGroup.controls.flgMinConf.value&&this.channelFormGroup.controls.customFeeRate.value?1e3*this.channelFormGroup.controls.customFeeRate.value+"perkb":this.channelFormGroup.controls.selFeeRate.value,minconf:this.channelFormGroup.controls.flgMinConf.value?this.channelFormGroup.controls.minConfValue.value:null}}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(t){switch(t.selectedIndex){case 0: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.id):"Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 2:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+(this.newlyAddedPeer.alias?this.newlyAddedPeer.alias:this.newlyAddedPeer.id):"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)"}t.selectedIndex{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(OA.qu),A.Y36(Yt.eX),A.Y36(E.mQ),A.Y36(C.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-connect-peer"]],viewQuery:function(t,s){if(1&t&&(A.Gf(hl,5),A.Gf(El,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.form=L.first),A.iGM(L=A.CRH())&&(s.stepper=L.first)}},decls:57,vars:30,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-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","ngSubmit"],["matStepLabel","","disabled","true"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","autoFocus","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center"],["fxFlex","60","fxLayoutAlign","space-between end"],["fxLayoutAlign","start center",3,"fxFlex"],["tabindex","4","placeholder","Fee Rate","formControlName","selFeeRate"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48","fxLayoutAlign","end center",4,"ngIf"],["fxFlex","35","fxLayout","row","fxLayoutAlign","start center"],["fxFlex","2","tabindex","5","color","primary","formControlName","flgMinConf","fxLayoutAlign","stretch start",3,"ngClass"],["fxFlex","98"],["matInput","","formControlName","minConfValue","placeholder","Min Confirmation Blocks","type","number","name","blocks","tabindex","8",3,"step","min","required"],["mat-button","","color","primary","tabindex","8","type","submit"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"],["fxFlex","48","fxLayoutAlign","end center"],["matInput","","formControlName","customFeeRate","placeholder","Fee Rate (Sats/vByte)","type","number","name","custFeeRate","tabindex","4",3,"step","min"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Connect to a new peer"),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"div",7)(10,"mat-vertical-stepper",8,9),A.NdJ("selectionChange",function(dA){return s.stepSelectionChanged(dA)}),A.TgZ(12,"mat-step",10)(13,"form",11),A.YNc(14,wl,1,1,"ng-template",12),A.TgZ(15,"mat-form-field",1),A._UZ(16,"input",13),A.YNc(17,Za,2,0,"mat-error",14),A.qZA(),A.YNc(18,Xa,4,2,"div",15),A.TgZ(19,"div",16)(20,"button",17),A.NdJ("click",function(){return s.onConnectPeer()}),A._uU(21),A.qZA()()()(),A.TgZ(22,"mat-step",10)(23,"form",18),A.NdJ("ngSubmit",function(){return s.onOpenChannel()}),A.YNc(24,Cl,1,1,"ng-template",19),A.TgZ(25,"div",20)(26,"div",21)(27,"mat-form-field",22),A._UZ(28,"input",23),A.TgZ(29,"mat-hint"),A._uU(30),A.qZA(),A.TgZ(31,"span",24),A._uU(32," Sats "),A.qZA(),A.YNc(33,Ql,2,0,"mat-error",14),A.YNc(34,dl,2,0,"mat-error",14),A.YNc(35,on,2,1,"mat-error",14),A.qZA(),A.TgZ(36,"div",25)(37,"mat-slide-toggle",26),A._uU(38,"Private Channel"),A.qZA()()(),A.TgZ(39,"div",27)(40,"div",28)(41,"mat-form-field",29)(42,"mat-select",30),A.YNc(43,yr,2,2,"mat-option",31),A.qZA()(),A.YNc(44,qa,3,3,"mat-form-field",32),A.qZA(),A.TgZ(45,"div",33),A._UZ(46,"mat-checkbox",34),A.TgZ(47,"mat-form-field",35),A._UZ(48,"input",36),A.YNc(49,pl,2,0,"mat-error",14),A.qZA()()()(),A.YNc(50,Il,4,2,"div",15),A.TgZ(51,"div",16)(52,"button",37),A._uU(53),A.qZA()()()()(),A.TgZ(54,"div",38)(55,"button",39),A._uU(56),A.qZA()()()()()()),2&t&&(A.xp6(10),A.Q6J("linear",!0),A.xp6(2),A.Q6J("stepControl",s.peerFormGroup)("editable",s.flgEditable),A.xp6(1),A.Q6J("formGroup",s.peerFormGroup),A.xp6(4),A.Q6J("ngIf",null==s.peerFormGroup.controls.peerAddress.errors?null:s.peerFormGroup.controls.peerAddress.errors.required),A.xp6(1),A.Q6J("ngIf",""!==s.peerConnectionError),A.xp6(3),A.Oqu(""!==s.peerConnectionError?"Retry":"Add Peer"),A.xp6(1),A.Q6J("stepControl",s.channelFormGroup)("editable",s.flgEditable),A.xp6(1),A.Q6J("formGroup",s.channelFormGroup),A.xp6(5),A.Q6J("step",1e3),A.xp6(2),A.hij("Remaining Bal: ",s.totalBalance-(s.channelFormGroup.controls.fundingAmount.value?s.channelFormGroup.controls.fundingAmount.value:0),""),A.xp6(3),A.Q6J("ngIf",null==s.channelFormGroup.controls.fundingAmount.errors?null:s.channelFormGroup.controls.fundingAmount.errors.required),A.xp6(1),A.Q6J("ngIf",null==s.channelFormGroup.controls.fundingAmount.errors?null:s.channelFormGroup.controls.fundingAmount.errors.min),A.xp6(1),A.Q6J("ngIf",null==s.channelFormGroup.controls.fundingAmount.errors?null:s.channelFormGroup.controls.fundingAmount.errors.max),A.xp6(6),A.Q6J("fxFlex","customperkb"!==s.channelFormGroup.controls.selFeeRate.value||s.channelFormGroup.controls.flgMinConf.value?"100":"48"),A.xp6(2),A.Q6J("ngForOf",s.feeRateTypes),A.xp6(1),A.Q6J("ngIf","customperkb"===s.channelFormGroup.controls.selFeeRate.value&&!s.channelFormGroup.controls.flgMinConf.value),A.xp6(2),A.Q6J("ngClass",A.WLB(27,_a,s.screenSize===s.screenSizeEnum.XS||s.screenSize===s.screenSizeEnum.SM,s.screenSize===s.screenSizeEnum.MD||s.screenSize===s.screenSizeEnum.LG||s.screenSize===s.screenSizeEnum.XL)),A.xp6(2),A.Q6J("step",1)("min",0)("required",s.channelFormGroup.controls.flgMinConf.value),A.xp6(1),A.Q6J("ngIf",s.channelFormGroup.controls.flgMinConf.value&&!s.channelFormGroup.controls.minConfValue.value),A.xp6(1),A.Q6J("ngIf",""!==s.channelConnectionError),A.xp6(3),A.Oqu(""!==s.channelConnectionError?"Retry":"Open Channel"),A.xp6(2),A.Q6J("mat-dialog-close",!1),A.xp6(1),A.Oqu(null!=s.newlyAddedPeer&&s.newlyAddedPeer.id?"Do It Later":"Close"))},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,g.dn,pr.Vq,pr.C0,OA._Y,OA.JL,OA.sg,pr.VY,U.KE,H.Nt,OA.Fj,k.h,OA.JJ,OA.u,OA.Q7,Et.O5,U.TO,e.BN,OA.wV,U.bx,U.R9,RA.Rr,CA.gD,Et.sg,wA.ey,OA.qQ,b.q,$A.oG,Et.mk,Y.oO,Mt.ZT],styles:[""]}),r})();function vl(r,D){1&r&&A._UZ(0,"mat-progress-bar",32)}function $a(r,D){1&r&&(A.TgZ(0,"th",33),A._uU(1," Alias "),A.qZA())}const Ao=function(r){return{"mr-0":r}};function xr(r,D){if(1&r&&A._UZ(0,"span",37),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Ao,t.screenSize===t.screenSizeEnum.XS))}}function Dl(r,D){if(1&r&&A._UZ(0,"span",38),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Ao,t.screenSize===t.screenSizeEnum.XS))}}const qi=function(r){return{"max-width":r}};function yl(r,D){if(1&r&&(A.TgZ(0,"td",34),A.YNc(1,xr,1,3,"span",35),A.YNc(2,Dl,1,3,"span",36),A._uU(3),A.qZA()),2&r){const t=D.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(4,qi,s.screenSize===s.screenSizeEnum.XS?"10rem":"40rem")),A.xp6(1),A.Q6J("ngIf",null==t?null:t.connected),A.xp6(1),A.Q6J("ngIf",!(null!=t&&t.connected)),A.xp6(1),A.hij(" ",null==t?null:t.alias," ")}}function xl(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1," ID "),A.qZA())}function to(r,D){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=D.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(2,qi,s.screenSize===s.screenSizeEnum.XS?"10rem":"40rem")),A.xp6(1),A.hij(" ",null==t?null:t.id," ")}}function _i(r,D){1&r&&(A.TgZ(0,"th",33),A._uU(1," Network Address "),A.qZA())}function nr(r,D){1&r&&(A.TgZ(0,"span"),A._uU(1,","),A._UZ(2,"br"),A.qZA())}function Fl(r,D){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.YNc(2,nr,3,0,"span",42),A.qZA()),2&r){const t=D.$implicit,s=D.last;A.xp6(1),A.Oqu(t),A.xp6(1),A.Q6J("ngIf",!s)}}function Yl(r,D){if(1&r&&(A.TgZ(0,"td",34),A.YNc(1,Fl,3,2,"span",41),A.qZA()),2&r){const t=D.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(2,qi,s.screenSize===s.screenSizeEnum.XS?"10rem":"20rem")),A.xp6(1),A.Q6J("ngForOf",null==t?null:t.netaddr)}}function Tl(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",43)(1,"div",44)(2,"mat-select",45),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",46),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Sl(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",46),A.NdJ("click",function(){A.CHM(t);const L=A.oxw().$implicit;return A.oxw().onPeerDetach(L)}),A._uU(1,"Disconnect"),A.qZA()}}function kl(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",46),A.NdJ("click",function(){A.CHM(t);const L=A.oxw().$implicit;return A.oxw().onConnectPeer(L)}),A._uU(1,"Reconnect"),A.qZA()}}function Nl(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",47)(1,"div",48)(2,"mat-select",45),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",46),A.NdJ("click",function(L){const ot=A.CHM(t).$implicit;return A.oxw().onPeerClick(ot,L)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",46),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onOpenChannel(dA)}),A._uU(7,"Open Channel"),A.qZA(),A.YNc(8,Sl,2,0,"mat-option",49),A.YNc(9,kl,2,0,"mat-option",49),A.qZA()()()}if(2&r){const t=D.$implicit;A.xp6(8),A.Q6J("ngIf",t.connected),A.xp6(1),A.Q6J("ngIf",!t.connected)}}function Ul(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No connected peer."),A.qZA())}function Pl(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting peers..."),A.qZA())}function Rl(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function eo(r,D){if(1&r&&(A.TgZ(0,"td",50),A.YNc(1,Ul,2,0,"p",42),A.YNc(2,Pl,2,0,"p",42),A.YNc(3,Rl,2,1,"p",42),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers||null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const zl=function(r){return{"display-none":r}};function tA(r,D){if(1&r&&A._UZ(0,"tr",51),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,zl,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function G(r,D){1&r&&A._UZ(0,"tr",52)}function V(r,D){1&r&&A._UZ(0,"tr",53)}const M=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},x=function(){return["no_peer"]};let R=(()=>{class r{constructor(t,s,L,dA,ot){this.logger=t,this.store=s,this.rtlEffects=L,this.actions=dA,this.commonService=ot,this.faUsers=h.FVb,this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","id","netaddr","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","id","netaddr","actions"])}ngOnInit(){this.store.select(B.Ao).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.information=t.information,this.availableBalance=t.balance.totalBalance||0}),this.store.select(B.Wi).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.peersData=t.peers||[],this.peersData.length>0&&this.loadPeersTable(this.peersData),this.logger.info(t)}),this.actions.pipe((0,i.R)(this.unSubs[2]),(0,JA.h)(t=>t.type===a.AB.SET_PEERS_CLN)).subscribe(t=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.id,message:[[{key:"id",value:t.id,title:"Public Key",width:100}],[{key:"netaddr",value:t.netaddr,title:"Address",width:100}],[{key:"alias",value:t.alias,title:"Alias",width:50},{key:"connected",value:t.connected?"True":"False",title:"Connected",width:50}]]}}}))}onConnectPeer(t){this.store.dispatch((0,KA.qR)({payload:{data:{message:{peer:t.id?t:null,information:this.information,balance:this.availableBalance},component:ml}}}))}onOpenChannel(t){this.store.dispatch((0,KA.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:ee}}}))}onPeerDetach(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.id),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[3])).subscribe(L=>{L&&this.store.dispatch((0,ht.z)({payload:{id:t.id,force:!1}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(t){this.peers=new xA.by([...t]),this.peers.sortingDataAccessor=(s,L)=>{if("netaddr"===L){if(s.netaddr&&s.netaddr[0]){const dA=s.netaddr[0].toString().split(".");return dA[0]?+dA[0]:s.netaddr[0]}return""}return s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null},this.peers.sort=this.sort,this.peers.filterPredicate=(s,L)=>JSON.stringify(s).toLowerCase().includes(L),this.peers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(DA.V),A.Y36(Yt.eX),A.Y36(C.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-peers"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Peers")}])],decls:36,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["peersForm","ngForm"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","30","fxFlex.gt-xs","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","id"],["mat-header-cell","","class","px-3","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","netaddr"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["class","dot green","matTooltip","Connected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Disconnected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Connected","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Disconnected","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],[4,"ngFor","ngForOf"],[4,"ngIf"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["fxFlex","100","fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"form",1,2)(3,"button",3),A.NdJ("click",function(){return s.onConnectPeer({})}),A._uU(4,"Add Peer"),A.qZA()(),A.TgZ(5,"div",4)(6,"div",5)(7,"div",6),A._UZ(8,"fa-icon",7),A.TgZ(9,"span",8),A._uU(10,"Connected Peers"),A.qZA()(),A.TgZ(11,"mat-form-field",9)(12,"div",10)(13,"input",11),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()()(),A.TgZ(14,"div",12),A.YNc(15,vl,1,0,"mat-progress-bar",13),A.TgZ(16,"table",14,15),A.ynx(18,16),A.YNc(19,$a,2,0,"th",17),A.YNc(20,yl,4,6,"td",18),A.BQk(),A.ynx(21,19),A.YNc(22,xl,2,0,"th",20),A.YNc(23,to,2,4,"td",21),A.BQk(),A.ynx(24,22),A.YNc(25,_i,2,0,"th",17),A.YNc(26,Yl,2,4,"td",18),A.BQk(),A.ynx(27,23),A.YNc(28,Tl,6,0,"th",24),A.YNc(29,Nl,10,2,"td",25),A.BQk(),A.ynx(30,26),A.YNc(31,eo,4,3,"td",27),A.BQk(),A.YNc(32,tA,1,3,"tr",28),A.YNc(33,G,1,0,"tr",29),A.YNc(34,V,1,0,"tr",30),A.qZA()(),A._UZ(35,"mat-paginator",31),A.qZA()()),2&t&&(A.xp6(8),A.Q6J("icon",s.faUsers),A.xp6(5),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.peers)("ngClass",A.VKq(12,M,""!==s.errorMessage)),A.xp6(16),A.Q6J("matFooterRowDef",A.DdM(14,x)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.yH,Ct.Wh,OA._Y,OA.JL,OA.F,w.lW,e.BN,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,q.$V,Et.O5,T.pW,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,Et.PC,Y.Zl,eA.gM,Et.sg,CA.gD,CA.$L,wA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-id[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:2rem}.mat-column-netaddr[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();const AA=["queryRoutesForm"];function aA(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Destination pubkey is required."),A.qZA())}function oA(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Amount is required."),A.qZA())}function iA(r,D){1&r&&A._UZ(0,"mat-progress-bar",38)}function NA(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1," ID "),A.qZA())}function kA(r,D){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.id," ")}}function ct(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1," Alias "),A.qZA())}function _A(r,D){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.alias," ")}}function Bt(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1," Channel "),A.qZA())}function pt(r,D){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.channel," ")}}function Dt(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1," Direction "),A.qZA())}function Gt(r,D){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.direction," ")}}function $t(r,D){1&r&&(A.TgZ(0,"th",41),A._uU(1," Delay "),A.qZA())}function _t(r,D){if(1&r&&(A.TgZ(0,"td",40)(1,"span",42),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,null==t?null:t.delay)," ")}}function ae(r,D){1&r&&(A.TgZ(0,"th",41),A._uU(1," Amount (Sats) "),A.qZA())}function Be(r,D){if(1&r&&(A.TgZ(0,"td",40)(1,"span",42),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.lcZ(3,1,(null==t?null:t.msatoshi)/1e3)," ")}}function we(r,D){1&r&&(A.TgZ(0,"th",43),A._uU(1," Amount mSat "),A.qZA())}function Ce(r,D){if(1&r&&(A.TgZ(0,"td",44),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.amount_msat," ")}}function He(r,D){1&r&&(A.TgZ(0,"th",45)(1,"span",42),A._uU(2,"Actions"),A.qZA()())}function sn(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",44)(1,"button",46),A.NdJ("click",function(L){const ot=A.CHM(t).$implicit;return A.oxw().onHopClick(ot,L)}),A._uU(2,"View Info"),A.qZA()()}}function Je(r,D){1&r&&A._UZ(0,"tr",47)}function le(r,D){1&r&&A._UZ(0,"tr",48)}const ln=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}};let We=(()=>{class r{constructor(t,s,L){this.store=t,this.clnEffects=s,this.commonService=L,this.destinationPubkey="",this.amount=null,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=h.FpQ,this.faExclamationTriangle=h.eHv,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","msatoshi","actions"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","direction","msatoshi","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","direction","delay","msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","channel","direction","delay","msatoshi","actions"])}ngOnInit(){this.clnEffects.setQueryRoutesCL.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.qrHops=new xA.by([]),this.qrHops.data=[],t.routes&&t.routes.length&&t.routes.length>0?(this.flgLoading[0]=!1,this.qrHops=new xA.by([...t.routes]),this.qrHops.data=t.routes):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null})}onQueryRoutes(){if(!this.destinationPubkey||!this.amount)return!0;this.flgLoading[0]=!0,this.store.dispatch((0,ht.WO)({payload:{destPubkey:this.destinationPubkey,amount:1e3*this.amount}}))}resetData(){this.destinationPubkey="",this.amount=null,this.flgLoading[0]=!1,this.qrHops.data=[],this.form.resetForm()}onHopClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"id",value:t.id,title:"ID",width:100,type:a.Gi.STRING}],[{key:"channel",value:t.channel,title:"Channel",width:50,type:a.Gi.STRING},{key:"alias",value:t.alias,title:"Peer Alias",width:50,type:a.Gi.STRING}],[{key:"msatoshi",value:t.msatoshi,title:"mSatoshi",width:50,type:a.Gi.NUMBER},{key:"amount_msat",value:t.amount_msat,title:"Amount mSat",width:50,type:a.Gi.STRING}],[{key:"direction",value:t.direction,title:"Direction",width:50,type:a.Gi.STRING},{key:"delay",value:t.delay,title:"Delay",width:50,type:a.Gi.NUMBER}]]}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(u.yh),A.Y36(qe.J),A.Y36(C.v))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-query-routes"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(AA,7)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.form=L.first)}},decls:54,vars:16,consts:[["fxLayout","column","fxFlex","100",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Pubkey","name","destinationPubkey","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-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","row","fxLayoutAlign","start center",1,"page-sub-title-container","mt-2","mb-1"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],[1,"table-container","mb-6",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","channel"],["matColumnDef","direction"],["matColumnDef","delay"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","msatoshi"],["matColumnDef","amount_msat"],["mat-header-cell","","class","pl-4","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],["mat-header-cell","",1,"pl-4","pr-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,s){if(1&t){const L=A.EpF();A.TgZ(0,"div",0)(1,"form",1,2),A.NdJ("ngSubmit",function(){return A.CHM(L),A.MAs(2).form.valid&&s.onQueryRoutes()}),A.TgZ(3,"div",3),A._UZ(4,"fa-icon",4),A.TgZ(5,"span"),A._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),A.qZA()(),A.TgZ(7,"mat-form-field",5)(8,"input",6,7),A.NdJ("ngModelChange",function(ot){return s.destinationPubkey=ot}),A.qZA(),A.YNc(10,aA,2,0,"mat-error",8),A.qZA(),A.TgZ(11,"mat-form-field",9)(12,"input",10),A.NdJ("ngModelChange",function(ot){return s.amount=ot}),A.qZA(),A.YNc(13,oA,2,0,"mat-error",8),A.qZA(),A.TgZ(14,"div",11)(15,"button",12),A.NdJ("click",function(){return s.resetData()}),A._uU(16,"Clear"),A.qZA(),A.TgZ(17,"button",13),A._uU(18,"Query Route"),A.qZA()()(),A.TgZ(19,"div",14)(20,"div",15),A._UZ(21,"fa-icon",16),A.TgZ(22,"span",17),A._uU(23,"Transaction Route"),A.qZA()()(),A.TgZ(24,"div",18),A.YNc(25,iA,1,0,"mat-progress-bar",19),A.TgZ(26,"table",20,21),A.ynx(28,22),A.YNc(29,NA,2,0,"th",23),A.YNc(30,kA,2,1,"td",24),A.BQk(),A.ynx(31,25),A.YNc(32,ct,2,0,"th",23),A.YNc(33,_A,2,1,"td",24),A.BQk(),A.ynx(34,26),A.YNc(35,Bt,2,0,"th",23),A.YNc(36,pt,2,1,"td",24),A.BQk(),A.ynx(37,27),A.YNc(38,Dt,2,0,"th",23),A.YNc(39,Gt,2,1,"td",24),A.BQk(),A.ynx(40,28),A.YNc(41,$t,2,0,"th",29),A.YNc(42,_t,4,3,"td",24),A.BQk(),A.ynx(43,30),A.YNc(44,ae,2,0,"th",29),A.YNc(45,Be,4,3,"td",24),A.BQk(),A.ynx(46,31),A.YNc(47,we,2,0,"th",32),A.YNc(48,Ce,2,1,"td",33),A.BQk(),A.ynx(49,34),A.YNc(50,He,3,0,"th",35),A.YNc(51,sn,3,0,"td",33),A.BQk(),A.YNc(52,Je,1,0,"tr",36),A.YNc(53,le,1,0,"tr",37),A.qZA()()()}2&t&&(A.xp6(4),A.Q6J("icon",s.faExclamationTriangle),A.xp6(4),A.Q6J("ngModel",s.destinationPubkey),A.xp6(2),A.Q6J("ngIf",!s.destinationPubkey),A.xp6(2),A.Q6J("ngModel",s.amount)("step",1e3)("min",0),A.xp6(1),A.Q6J("ngIf",!s.amount),A.xp6(8),A.Q6J("icon",s.faRoute),A.xp6(4),A.Q6J("ngIf",!0===s.flgLoading[0]),A.xp6(1),A.Q6J("dataSource",s.qrHops)("ngClass",A.VKq(14,ln,"error"===s.flgLoading[0])),A.xp6(26),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns))},directives:[Ct.xw,Ct.yH,OA._Y,OA.JL,OA.F,Ct.Wh,e.BN,U.KE,H.Nt,OA.Fj,OA.Q7,OA.JJ,OA.On,Et.O5,U.TO,OA.wV,OA.qQ,b.q,w.lW,q.$V,T.pW,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,xA.as,xA.XQ,xA.nj,xA.Gk],pipes:[Et.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{flex:0 0 5%;width:5%}.mat-column-pubkey_alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();function Oe(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Message is required."),A.qZA())}let he=(()=>{class r{constructor(t,s,L){this.dataService=t,this.snackBar=s,this.logger=L,this.message="",this.signedMessage="",this.signature="",this.unSubs=[new c.x,new c.x]}onSign(){if(!this.message||""===this.message)return!0;this.dataService.signMessage(this.message).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.signedMessage=this.message,this.signature=t.zbase})}onMessageChange(){this.signedMessage!==this.message&&(this.signature="")}onCopyField(t){this.snackBar.open("Signature copied."),this.logger.info("Copied Text: "+t)}resetData(){this.message="",this.signature="",this.signedMessage=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(zA.D),A.Y36(Sr.ux),A.Y36(E.mQ))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-sign"]],decls:20,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to sign","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3","type","submit",3,"click"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","4","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),A.NdJ("ngModelChange",function(dA){return s.message=dA})("keyup",function(){return s.onMessageChange()}),A.qZA(),A.YNc(5,Oe,2,0,"mat-error",5),A.qZA(),A.TgZ(6,"div",6)(7,"button",7),A.NdJ("click",function(){return s.resetData()}),A._uU(8,"Clear Field"),A.qZA(),A.TgZ(9,"button",8),A.NdJ("click",function(){return s.onSign()}),A._uU(10,"Sign"),A.qZA()(),A._UZ(11,"mat-divider",9),A.TgZ(12,"div",10)(13,"p"),A._uU(14,"Generated Signature"),A.qZA()(),A.TgZ(15,"div",11),A._uU(16),A.qZA(),A.TgZ(17,"div",12)(18,"button",13),A.NdJ("copied",function(dA){return s.onCopyField(dA)}),A._uU(19,"Copy Signature"),A.qZA()()()()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.message),A.xp6(1),A.Q6J("ngIf",!s.message),A.xp6(6),A.Q6J("inset",!0),A.xp6(5),A.Oqu(s.signature),A.xp6(2),A.Q6J("payload",s.signature))},directives:[Ct.xw,Ct.yH,Ct.Wh,OA._Y,OA.JL,OA.F,U.KE,H.Nt,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,Et.O5,U.TO,w.lW,sA.d,Kr.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();function _e(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Message is required."),A.qZA())}function Ue(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Signature is required."),A.qZA())}function Fe(r,D){1&r&&(A.TgZ(0,"p",13)(1,"mat-icon",14),A._uU(2,"close"),A.qZA(),A._uU(3,"Verification failed, please double check message and signature"),A.qZA())}function An(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Pubkey Used"),A.qZA())}function zn(r,D){if(1&r&&(A.TgZ(0,"div",20)(1,"p"),A._uU(2),A.qZA()()),2&r){const t=A.oxw(2);A.xp6(2),A.Oqu(null==t.verifyRes?null:t.verifyRes.pubkey)}}function gn(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",21)(1,"button",22),A.NdJ("copied",function(L){return A.CHM(t),A.oxw(2).onCopyField(L)}),A._uU(2,"Copy Pubkey"),A.qZA()()}if(2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("payload",null==t.verifyRes?null:t.verifyRes.pubkey)}}function pn(r,D){if(1&r&&(A.TgZ(0,"div",15),A._UZ(1,"mat-divider",16),A.TgZ(2,"div",17),A.YNc(3,An,2,0,"p",5),A.qZA(),A.YNc(4,zn,3,1,"div",18),A.YNc(5,gn,3,1,"div",19),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("inset",!0),A.xp6(2),A.Q6J("ngIf",t.verifyRes.verified),A.xp6(1),A.Q6J("ngIf",t.verifyRes.verified),A.xp6(1),A.Q6J("ngIf",t.verifyRes.verified)}}let Hn=(()=>{class r{constructor(t,s,L){this.dataService=t,this.snackBar=s,this.logger=L,this.message="",this.verifiedMessage="",this.signature="",this.verifiedSignature="",this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null},this.unSubs=[new c.x,new c.x]}onVerify(){if(!this.message||""===this.message||!this.signature||""===this.signature)return!0;this.dataService.verifyMessage(this.message,this.signature).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.verifyRes=t,this.showVerifyStatus=!0,this.verifiedMessage=this.message,this.verifiedSignature=this.signature})}onChange(){(this.verifiedMessage!==this.message||this.verifiedSignature!==this.signature)&&(this.showVerifyStatus=!1,this.verifyRes={pubkey:"",verified:null})}resetData(){this.message="",this.signature="",this.verifyRes=null,this.showVerifyStatus=!1}onCopyField(t){this.snackBar.open("Pubkey copied."),this.logger.info("Copied Text: "+t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(zA.D),A.Y36(Sr.ux),A.Y36(E.mQ))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-verify"]],decls:17,vars:6,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to verify","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Signature provided","name","signature","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["sign","ngModel"],["fxFlex","100","class","color-warn","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start","class","bordered-box read-only h-4 padding-gap",4,"ngIf"],["fxLayout","row","class","mt-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","5","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),A.NdJ("ngModelChange",function(dA){return s.message=dA})("keyup",function(){return s.onChange()}),A.qZA(),A.YNc(5,_e,2,0,"mat-error",5),A.qZA(),A.TgZ(6,"mat-form-field",3)(7,"input",6,7),A.NdJ("ngModelChange",function(dA){return s.signature=dA})("keyup",function(){return s.onChange()}),A.qZA(),A.YNc(9,Ue,2,0,"mat-error",5),A.qZA(),A.YNc(10,Fe,4,0,"p",8),A.TgZ(11,"div",9)(12,"button",10),A.NdJ("click",function(){return s.resetData()}),A._uU(13,"Clear Fields"),A.qZA(),A.TgZ(14,"button",11),A.NdJ("click",function(){return s.onVerify()}),A._uU(15,"Verify"),A.qZA()(),A.YNc(16,pn,6,4,"div",12),A.qZA()()),2&t&&(A.xp6(4),A.Q6J("ngModel",s.message),A.xp6(1),A.Q6J("ngIf",!s.message),A.xp6(2),A.Q6J("ngModel",s.signature),A.xp6(2),A.Q6J("ngIf",!s.signature),A.xp6(1),A.Q6J("ngIf",s.showVerifyStatus&&!s.verifyRes.verified),A.xp6(6),A.Q6J("ngIf",s.showVerifyStatus&&s.verifyRes.verified))},directives:[Ct.xw,Ct.yH,Ct.Wh,OA._Y,OA.JL,OA.F,U.KE,H.Nt,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,Et.O5,U.TO,p.Hw,w.lW,sA.d,Kr.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();function On(r,D){if(1&r&&(A.TgZ(0,"div",5),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function mn(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",6),A._UZ(1,"div",7),A.TgZ(2,"mat-form-field",8)(3,"input",9),A.NdJ("ngModelChange",function(L){return A.CHM(t),A.oxw().filterValue=L})("input",function(){return A.CHM(t),A.oxw().applyFilter()})("keyup",function(){return A.CHM(t),A.oxw().applyFilter()}),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(3),A.Q6J("ngModel",t.filterValue)}}function Qn(r,D){1&r&&A._UZ(0,"mat-progress-bar",33)}function kn(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1,"Status"),A.qZA())}function jn(r,D){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(null==t?null:t.status)}}function me(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1,"Received Time"),A.qZA())}function Pe(r,D){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/y HH:mm"))}}function Ye(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1,"Resolved Time"),A.qZA())}function Ze(r,D){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.resolved_time),"dd/MMM/y HH:mm"))}}function ke(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1,"In Channel"),A.qZA())}function Bn(r,D){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(null==t?null:t.in_channel_alias)}}function $i(r,D){1&r&&(A.TgZ(0,"th",34),A._uU(1,"Out Channel"),A.qZA())}function Ln(r,D){if(1&r&&(A.TgZ(0,"td",35),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(null==t?null:t.out_channel_alias)}}function Aa(r,D){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Amount In (Sats)"),A.qZA())}function ta(r,D){if(1&r&&(A.TgZ(0,"td",35)(1,"span",37),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Ll(r,D){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Amount Out (Sats)"),A.qZA())}function bl(r,D){if(1&r&&(A.TgZ(0,"td",35)(1,"span",37),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function Pi(r,D){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Fee (mSat)"),A.qZA())}function _r(r,D){if(1&r&&(A.TgZ(0,"td",35)(1,"span",37),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.lcZ(3,1,null==t?null:t.fee))}}function ea(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",38)(1,"div",39)(2,"mat-select",40),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",41),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Ri(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",42)(1,"button",43),A.NdJ("click",function(L){const ot=A.CHM(t).$implicit;return A.oxw(2).onForwardingEventClick(ot,L)}),A._uU(2,"View Info"),A.qZA()()}}function zi(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No forwarding history available."),A.qZA())}function $r(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting forwarding history..."),A.qZA())}function Ai(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function ti(r,D){if(1&r&&(A.TgZ(0,"td",44),A.YNc(1,zi,2,0,"p",45),A.YNc(2,$r,2,0,"p",45),A.YNc(3,Ai,2,1,"p",45),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const ei=function(r){return{"display-none":r}};function ni(r,D){if(1&r&&A._UZ(0,"tr",46),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,ei,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function ri(r,D){1&r&&A._UZ(0,"tr",47)}function ii(r,D){1&r&&A._UZ(0,"tr",48)}const ai=function(){return["no_event"]};function Qr(r,D){if(1&r&&(A.TgZ(0,"div",10),A.YNc(1,Qn,1,0,"mat-progress-bar",11),A.TgZ(2,"table",12,13),A.ynx(4,14),A.YNc(5,kn,2,0,"th",15),A.YNc(6,jn,2,1,"td",16),A.BQk(),A.ynx(7,17),A.YNc(8,me,2,0,"th",15),A.YNc(9,Pe,3,4,"td",16),A.BQk(),A.ynx(10,18),A.YNc(11,Ye,2,0,"th",15),A.YNc(12,Ze,3,4,"td",16),A.BQk(),A.ynx(13,19),A.YNc(14,ke,2,0,"th",15),A.YNc(15,Bn,2,1,"td",16),A.BQk(),A.ynx(16,20),A.YNc(17,$i,2,0,"th",15),A.YNc(18,Ln,2,1,"td",16),A.BQk(),A.ynx(19,21),A.YNc(20,Aa,2,0,"th",22),A.YNc(21,ta,4,4,"td",16),A.BQk(),A.ynx(22,23),A.YNc(23,Ll,2,0,"th",22),A.YNc(24,bl,4,4,"td",16),A.BQk(),A.ynx(25,24),A.YNc(26,Pi,2,0,"th",22),A.YNc(27,_r,4,3,"td",16),A.BQk(),A.ynx(28,25),A.YNc(29,ea,6,0,"th",26),A.YNc(30,Ri,3,0,"td",27),A.BQk(),A.ynx(31,28),A.YNc(32,ti,4,3,"td",29),A.BQk(),A.YNc(33,ni,1,3,"tr",30),A.YNc(34,ri,1,0,"tr",31),A.YNc(35,ii,1,0,"tr",32),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.forwardingHistoryEvents),A.xp6(31),A.Q6J("matFooterRowDef",A.DdM(6,ai)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function no(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-paginator",49),A.NdJ("page",function(L){return A.CHM(t),A.oxw().onPageChange(L)}),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("length",t.totalForwardedTransactions)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let na=(()=>{class r{constructor(t,s,L,dA,ot){this.logger=t,this.commonService=s,this.store=L,this.datePipe=dA,this.router=ot,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.displayedColumns=[],this.flgSticky=!1,this.indexOffset=-1,this.totalForwardedTransactions=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["in_msatoshi","out_msatoshi","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_msatoshi","out_msatoshi","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.pipe((0,PA.q)(1)).subscribe(t=>{var s;t.cln.apisCallStatus.FetchForwardingHistoryS.status===a.Bn.UN_INITIATED&&!(null===(s=t.cln.forwardingHistory.listForwards)||void 0===s?void 0:s.length)&&this.store.dispatch((0,ht.u0)({payload:{status:a.OO.SETTLED}}))}),this.store.select(B.Bo).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.eventsData.length<=0&&t.forwardingHistory.listForwards&&(this.totalForwardedTransactions=t.forwardingHistory.totalForwards||0,this.successfulEvents=t.forwardingHistory.listForwards||[],this.successfulEvents.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.successfulEvents.slice(0,this.pageSize)),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadForwardingEventsTable(this.successfulEvents.slice(0,this.pageSize))}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:a.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,this.indexOffset=0,this.totalForwardedTransactions=this.eventsData.length,this.paginator&&this.paginator.firstPage(),t.eventsData.firstChange||this.loadForwardingEventsTable(this.successfulEvents.slice(0,this.pageSize))),t.filterValue&&!t.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(t,s){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Event Information",message:[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:a.Gi.STRING}],[{key:"status",value:"Settled",title:"Status",width:50,type:a.Gi.STRING},{key:"fee",value:t.fee,title:"Fee (mSats)",width:50,type:a.Gi.NUMBER}],[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:a.Gi.DATE_TIME},{key:"resolved_time",value:t.resolved_time,title:"Resolved Time",width:50,type:a.Gi.DATE_TIME}],[{key:"in_channel",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:a.Gi.STRING},{key:"out_channel",value:t.out_channel_alias,title:"Outbound Channel",width:50,type:a.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"In (mSats)",width:50,type:a.Gi.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Out (mSats)",width:50,type:a.Gi.NUMBER}]]}}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new xA.by([...t]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.forwardingHistoryEvents.filterPredicate=(s,L)=>{var dA,ot;return((s.received_time?(null===(dA=this.datePipe.transform(new Date(1e3*s.received_time),"dd/MMM/YYYY HH:mm"))||void 0===dA?void 0:dA.toLowerCase())+" ":"")+(s.resolved_time?(null===(ot=this.datePipe.transform(new Date(1e3*s.resolved_time),"dd/MMM/YYYY HH:mm"))||void 0===ot?void 0:ot.toLowerCase())+" ":"")+(s.in_channel?s.in_channel.toLowerCase()+" ":"")+(s.out_channel?s.out_channel.toLowerCase()+" ":"")+(s.in_channel_alias?s.in_channel_alias.toLowerCase()+" ":"")+(s.out_channel_alias?s.out_channel_alias.toLowerCase()+" ":"")+(s.in_msatoshi?s.in_msatoshi/1e3+" ":"")+(s.out_msatoshi?s.out_msatoshi/1e3+" ":"")+(s.fee?s.fee+" ":"")).includes(L)},this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}onPageChange(t){this.pageSize!==t.pageSize?(this.pageSize=t.pageSize,this.indexOffset=0):this.indexOffset=t.pageIndex*this.pageSize,this.loadForwardingEventsTable(this.successfulEvents.slice(this.indexOffset,this.indexOffset+this.pageSize))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(Et.uU),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-forwarding-history"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Events")}]),A.TTD],decls:5,vars:4,consts:[["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,"length","pageSize","pageSizeOptions","showFirstLastButtons","page",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","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["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,"dataSource"],["table",""],["matColumnDef","status"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","received_time"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,On,2,1,"div",1),A.YNc(2,mn,4,1,"div",2),A.YNc(3,Qr,36,7,"div",3),A.YNc(4,no,1,4,"mat-paginator",4),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[Ct.xw,Ct.Wh,Et.O5,Ct.yH,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,q.$V,T.pW,xA.BZ,rt.YE,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,CA.gD,CA.$L,wA.ey,w.lW,xA.mD,xA.yh,xA.Ke,xA.Q2,Et.mk,Y.oO,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.uU,Et.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();function ro(r,D){if(1&r&&(A.TgZ(0,"div",5),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function io(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",6)(1,"div",7),A._UZ(2,"fa-icon",8),A.TgZ(3,"span"),A._uU(4,"Maximum 1,000 failed transactions only."),A.qZA()(),A.TgZ(5,"div",9),A._UZ(6,"div",10),A.TgZ(7,"mat-form-field",11)(8,"input",12),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(L){return A.CHM(t),A.oxw().selFilter=L}),A.qZA()()()()}if(2&r){const t=A.oxw();A.xp6(2),A.Q6J("icon",t.faExclamationTriangle),A.xp6(6),A.Q6J("ngModel",t.selFilter)}}function ra(r,D){1&r&&A._UZ(0,"mat-progress-bar",35)}function _l(r,D){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Received Time"),A.qZA())}function $l(r,D){if(1&r&&(A.TgZ(0,"td",37),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/y HH:mm"))}}function Ac(r,D){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Resolved Time"),A.qZA())}function tc(r,D){if(1&r&&(A.TgZ(0,"td",37),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.resolved_time),"dd/MMM/y HH:mm"))}}function ec(r,D){1&r&&(A.TgZ(0,"th",36),A._uU(1,"In Channel"),A.qZA())}function nc(r,D){if(1&r&&(A.TgZ(0,"td",37),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(null==t?null:t.in_channel_alias)}}function rc(r,D){1&r&&(A.TgZ(0,"th",36),A._uU(1,"Out Channel"),A.qZA())}function ic(r,D){if(1&r&&(A.TgZ(0,"td",37),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(null==t?null:t.out_channel_alias)}}function ac(r,D){1&r&&(A.TgZ(0,"th",38),A._uU(1,"Amount In (Sats)"),A.qZA())}function oc(r,D){if(1&r&&(A.TgZ(0,"td",37)(1,"span",39),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function sc(r,D){1&r&&(A.TgZ(0,"th",38),A._uU(1,"Amount Out (Sats)"),A.qZA())}function lc(r,D){if(1&r&&(A.TgZ(0,"td",37)(1,"span",39),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.out_msatoshi)/1e3,(null==t?null:t.out_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function cc(r,D){1&r&&(A.TgZ(0,"th",38),A._uU(1,"Fee (mSats)"),A.qZA())}function gc(r,D){if(1&r&&(A.TgZ(0,"td",37)(1,"span",39),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,null==t?null:t.fee,"1.0-0"))}}function Bc(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",40)(1,"div",41)(2,"mat-select",42),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",43),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function uc(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",44)(1,"button",45),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onFailedEventClick(dA)}),A._uU(2,"View Info"),A.qZA()()}}function fc(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No failed transaction available."),A.qZA())}function hc(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting failed transactions..."),A.qZA())}function Ec(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function wc(r,D){if(1&r&&(A.TgZ(0,"td",46),A.YNc(1,fc,2,0,"p",47),A.YNc(2,hc,2,0,"p",47),A.YNc(3,Ec,2,1,"p",47),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedForwardingEvents&&t.failedForwardingEvents.data)||(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Cc=function(r){return{"display-none":r}};function Qc(r,D){if(1&r&&A._UZ(0,"tr",48),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Cc,(null==t.failedForwardingEvents?null:t.failedForwardingEvents.data)&&(null==t.failedForwardingEvents||null==t.failedForwardingEvents.data?null:t.failedForwardingEvents.data.length)>0))}}function dc(r,D){1&r&&A._UZ(0,"tr",49)}function Mc(r,D){1&r&&A._UZ(0,"tr",50)}const pc=function(){return["no_event"]};function Ic(r,D){if(1&r&&(A.TgZ(0,"div",13),A.YNc(1,ra,1,0,"mat-progress-bar",14),A.TgZ(2,"table",15,16),A.ynx(4,17),A.YNc(5,_l,2,0,"th",18),A.YNc(6,$l,3,4,"td",19),A.BQk(),A.ynx(7,20),A.YNc(8,Ac,2,0,"th",18),A.YNc(9,tc,3,4,"td",19),A.BQk(),A.ynx(10,21),A.YNc(11,ec,2,0,"th",18),A.YNc(12,nc,2,1,"td",19),A.BQk(),A.ynx(13,22),A.YNc(14,rc,2,0,"th",18),A.YNc(15,ic,2,1,"td",19),A.BQk(),A.ynx(16,23),A.YNc(17,ac,2,0,"th",24),A.YNc(18,oc,4,4,"td",19),A.BQk(),A.ynx(19,25),A.YNc(20,sc,2,0,"th",24),A.YNc(21,lc,4,4,"td",19),A.BQk(),A.ynx(22,26),A.YNc(23,cc,2,0,"th",24),A.YNc(24,gc,4,4,"td",19),A.BQk(),A.ynx(25,27),A.YNc(26,Bc,6,0,"th",28),A.YNc(27,uc,3,0,"td",29),A.BQk(),A.ynx(28,30),A.YNc(29,wc,4,3,"td",31),A.BQk(),A.YNc(30,Qc,1,3,"tr",32),A.YNc(31,dc,1,0,"tr",33),A.YNc(32,Mc,1,0,"tr",34),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.failedForwardingEvents),A.xp6(28),A.Q6J("matFooterRowDef",A.DdM(6,pc)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function mc(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-paginator",51),A.NdJ("page",function(L){return A.CHM(t),A.oxw().onPageChange(L)}),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("length",t.totalFailedTransactions)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let vc=(()=>{class r{constructor(t,s,L,dA,ot){this.logger=t,this.commonService=s,this.store=L,this.datePipe=dA,this.router=ot,this.faExclamationTriangle=h.eHv,this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.selFilter="",this.indexOffset=-1,this.totalFailedTransactions=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["received_time","in_channel","in_msatoshi","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_channel","out_channel","in_msatoshi","out_msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","resolved_time","in_channel","out_channel","in_msatoshi","out_msatoshi","fee","actions"])}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.dispatch((0,ht.u0)({payload:{status:a.OO.FAILED}})),this.store.select(B.xQ).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.totalFailedTransactions=t.failedForwardingHistory.totalForwards||0,this.failedEvents=t.failedForwardingHistory.listForwards||[],this.failedEvents.length>0&&this.sort&&this.paginator&&this.loadFailedEventsTable(this.failedEvents.slice(0,this.pageSize)),this.logger.info(t)})}ngAfterViewInit(){this.failedEvents.length>0&&this.loadFailedEventsTable(this.failedEvents.slice(0,this.pageSize))}onFailedEventClick(t){const s=[[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:a.Gi.DATE_TIME},{key:"resolved_time",value:t.resolved_time,title:"Resolved Time",width:50,type:a.Gi.DATE_TIME}],[{key:"in_channel_alias",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:a.Gi.STRING},{key:"out_channel_alias",value:t.out_channel_alias,title:"Outbound Channel",width:50,type:a.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"Amount In (mSats)",width:33,type:a.Gi.NUMBER},{key:"out_msatoshi",value:t.out_msatoshi,title:"Amount Out (mSats)",width:33,type:a.Gi.NUMBER},{key:"fee",value:t.fee,title:"Fee (mSats)",width:34,type:a.Gi.NUMBER}]];t.payment_hash&&s.unshift([{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:a.Gi.STRING}]),this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Failed Event Information",message:s}}}))}loadFailedEventsTable(t){this.failedForwardingEvents=new xA.by([...t]),this.failedForwardingEvents.sort=this.sort,this.failedForwardingEvents.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.failedForwardingEvents.filterPredicate=(s,L)=>{var dA,ot;const Ae=s.received_time?null===(dA=this.datePipe.transform(new Date(1e3*s.received_time),"dd/MMM/YYYY HH:mm"))||void 0===dA?void 0:dA.toLowerCase():""+(s.resolved_time?null===(ot=this.datePipe.transform(new Date(1e3*s.resolved_time),"dd/MMM/YYYY HH:mm"))||void 0===ot?void 0:ot.toLowerCase():"")+(s.payment_hash?s.payment_hash.toLowerCase():"")+(s.in_channel?s.in_channel.toLowerCase():"")+(s.out_channel?s.out_channel.toLowerCase():"")+(s.in_channel_alias?s.in_channel_alias.toLowerCase():"")+(s.out_channel_alias?s.out_channel_alias.toLowerCase():"")+(s.in_msatoshi?s.in_msatoshi/1e3:"")+(s.out_msatoshi?s.out_msatoshi/1e3:"")+(s.fee?s.fee:"");return(null==Ae?void 0:Ae.includes(L))||!1},this.applyFilter(),this.logger.info(this.failedForwardingEvents)}onDownloadCSV(){this.failedForwardingEvents&&this.failedForwardingEvents.data&&this.failedForwardingEvents.data.length>0&&this.commonService.downloadFile(this.failedForwardingEvents.data,"Failed-transactions")}applyFilter(){this.failedForwardingEvents.filter=this.selFilter.trim().toLowerCase()}onPageChange(t){this.pageSize!==t.pageSize?(this.pageSize=t.pageSize,this.indexOffset=0):this.indexOffset=t.pageIndex*this.pageSize,this.loadFailedEventsTable(this.failedEvents.slice(this.indexOffset,this.indexOffset+this.pageSize))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(Et.uU),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-failed-history"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Failed events")}])],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout.gt-xs","column","fxLayout","row","fxLayoutAlign","start center","fxLayoutAlign.gt-xs","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,"length","pageSize","pageSizeOptions","showFirstLastButtons","page",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout.gt-xs","column","fxLayout","row","fxLayoutAlign","start center","fxLayoutAlign.gt-xs","start stretch",1,"page-sub-title-container"],["fxFlex","100",1,"alert","alert-warn","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","100"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource"],["table",""],["matColumnDef","received_time"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","resolved_time"],["matColumnDef","in_channel"],["matColumnDef","out_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","out_msatoshi"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,ro,2,1,"div",1),A.YNc(2,io,9,2,"div",2),A.YNc(3,Ic,33,7,"div",3),A.YNc(4,mc,1,4,"mat-paginator",4),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[Ct.xw,Ct.Wh,Et.O5,Ct.yH,e.BN,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,q.$V,T.pW,xA.BZ,rt.YE,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,CA.gD,CA.$L,wA.ey,w.lW,xA.mD,xA.yh,xA.Ke,xA.Q2,Et.mk,Y.oO,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.uU,Et.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();const Dc=["tableIn"],yc=["tableOut"],xc=["paginatorIn"],Fc=["paginatorOut"];function Yc(r,D){if(1&r&&(A.TgZ(0,"div",3),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function Tc(r,D){1&r&&A._UZ(0,"mat-progress-bar",36)}function Sc(r,D){1&r&&(A.TgZ(0,"th",37),A._uU(1,"Channel ID"),A.qZA())}const ao=function(r){return{"max-width":r}};function Nc(r,D){if(1&r&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&r){const t=D.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,ao,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.channel_id)}}function Uc(r,D){1&r&&(A.TgZ(0,"th",37),A._uU(1,"Peer Alias"),A.qZA())}function Pc(r,D){if(1&r&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&r){const t=D.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,ao,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.alias)}}function Rc(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Events"),A.qZA())}function zc(r,D){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.lcZ(3,1,t.events))}}function Lc(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Amount (Sats)"),A.qZA())}function bc(r,D){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function Gc(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Fee (Sats)"),A.qZA())}function Hc(r,D){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function Jc(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No incoming routing peer available."),A.qZA())}function Oc(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting incoming routing peers..."),A.qZA())}function kc(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function jc(r,D){if(1&r&&(A.TgZ(0,"td",42),A.YNc(1,Jc,2,0,"p",43),A.YNc(2,Oc,2,0,"p",43),A.YNc(3,kc,2,1,"p",43),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const jl=function(r){return{"display-none":r}};function Kc(r,D){if(1&r&&A._UZ(0,"tr",44),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,jl,(null==t.RoutingPeersIncoming?null:t.RoutingPeersIncoming.data)&&(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)>0))}}function Vc(r,D){1&r&&A._UZ(0,"tr",45)}function Wc(r,D){1&r&&A._UZ(0,"tr",46)}function Zc(r,D){1&r&&A._UZ(0,"mat-progress-bar",36)}function Xc(r,D){1&r&&(A.TgZ(0,"th",37),A._uU(1,"Channel ID"),A.qZA())}function qc(r,D){if(1&r&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&r){const t=D.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,ao,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.channel_id)}}function _c(r,D){1&r&&(A.TgZ(0,"th",37),A._uU(1,"Peer Alias"),A.qZA())}function $c(r,D){if(1&r&&(A.TgZ(0,"td",38),A._uU(1),A.qZA()),2&r){const t=D.$implicit,s=A.oxw(2);A.Q6J("ngStyle",A.VKq(2,ao,s.screenSize===s.screenSizeEnum.XS?"5rem":"10rem")),A.xp6(1),A.Oqu(t.alias)}}function Ag(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Events"),A.qZA())}function tg(r,D){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.lcZ(3,1,t.events))}}function eg(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Amount (Sats)"),A.qZA())}function ng(r,D){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_amount)/1e3,(null==t?null:t.total_amount)<1e3?"1.0-4":"1.0-0"))}}function rg(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Fee (Sats)"),A.qZA())}function ig(r,D){if(1&r&&(A.TgZ(0,"td",40)(1,"span",41),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.total_fee)/1e3,(null==t?null:t.total_fee)<1e3?"1.0-4":"1.0-0"))}}function ag(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No outgoing routing peer available."),A.qZA())}function og(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting outgoing routing peers..."),A.qZA())}function sg(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function lg(r,D){if(1&r&&(A.TgZ(0,"td",42),A.YNc(1,ag,2,0,"p",43),A.YNc(2,og,2,0,"p",43),A.YNc(3,sg,2,1,"p",43),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}function cg(r,D){if(1&r&&A._UZ(0,"tr",44),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,jl,(null==t.RoutingPeersOutgoing?null:t.RoutingPeersOutgoing.data)&&(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)>0))}}function gg(r,D){1&r&&A._UZ(0,"tr",45)}function Bg(r,D){1&r&&A._UZ(0,"tr",46)}const ug=function(r,D){return{"mt-2":r,"mt-1":D}},fg=function(){return["no_incoming_event"]},hg=function(r){return{"mt-2":r}},Eg=function(){return["no_outgoing_event"]};function wg(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7),A._uU(4,"Incoming"),A.qZA(),A.TgZ(5,"mat-form-field",8)(6,"input",9),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyIncomingFilter()})("ngModelChange",function(L){return A.CHM(t),A.oxw().filterIn=L}),A.qZA()()(),A.TgZ(7,"div",10),A.YNc(8,Tc,1,0,"mat-progress-bar",11),A.TgZ(9,"table",12,13),A.ynx(11,14),A.YNc(12,Sc,2,0,"th",15),A.YNc(13,Nc,2,4,"td",16),A.BQk(),A.ynx(14,17),A.YNc(15,Uc,2,0,"th",15),A.YNc(16,Pc,2,4,"td",16),A.BQk(),A.ynx(17,18),A.YNc(18,Rc,2,0,"th",19),A.YNc(19,zc,4,3,"td",20),A.BQk(),A.ynx(20,21),A.YNc(21,Lc,2,0,"th",19),A.YNc(22,bc,4,4,"td",20),A.BQk(),A.ynx(23,22),A.YNc(24,Gc,2,0,"th",19),A.YNc(25,Hc,4,4,"td",20),A.BQk(),A.ynx(26,23),A.YNc(27,jc,4,3,"td",24),A.BQk(),A.YNc(28,Kc,1,3,"tr",25),A.YNc(29,Vc,1,0,"tr",26),A.YNc(30,Wc,1,0,"tr",27),A.qZA()(),A._UZ(31,"mat-paginator",28,29),A.qZA(),A.TgZ(33,"div",30)(34,"div",6)(35,"div",7),A._uU(36,"Outgoing"),A.qZA(),A.TgZ(37,"mat-form-field",8)(38,"input",9),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyOutgoingFilter()})("ngModelChange",function(L){return A.CHM(t),A.oxw().filterOut=L}),A.qZA()()(),A.TgZ(39,"div",31),A.YNc(40,Zc,1,0,"mat-progress-bar",11),A.TgZ(41,"table",32,33),A.ynx(43,14),A.YNc(44,Xc,2,0,"th",15),A.YNc(45,qc,2,4,"td",16),A.BQk(),A.ynx(46,17),A.YNc(47,_c,2,0,"th",15),A.YNc(48,$c,2,4,"td",16),A.BQk(),A.ynx(49,18),A.YNc(50,Ag,2,0,"th",19),A.YNc(51,tg,4,3,"td",20),A.BQk(),A.ynx(52,21),A.YNc(53,eg,2,0,"th",19),A.YNc(54,ng,4,4,"td",20),A.BQk(),A.ynx(55,22),A.YNc(56,rg,2,0,"th",19),A.YNc(57,ig,4,4,"td",20),A.BQk(),A.ynx(58,34),A.YNc(59,lg,4,3,"td",24),A.BQk(),A.YNc(60,cg,1,3,"tr",25),A.YNc(61,gg,1,0,"tr",26),A.YNc(62,Bg,1,0,"tr",27),A.qZA(),A._UZ(63,"mat-paginator",28,35),A.qZA()()()}if(2&r){const t=A.oxw();A.xp6(2),A.Q6J("ngClass",A.WLB(22,ug,t.screenSize===t.screenSizeEnum.XS,t.screenSize===t.screenSizeEnum.SM)),A.xp6(4),A.Q6J("ngModel",t.filterIn),A.xp6(2),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.RoutingPeersIncoming),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(25,fg)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS),A.xp6(3),A.Q6J("ngClass",A.VKq(26,hg,t.screenSize!==t.screenSizeEnum.LG)),A.xp6(4),A.Q6J("ngModel",t.filterOut),A.xp6(2),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.RoutingPeersOutgoing),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(28,Eg)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns),A.xp6(1),A.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Cg=(()=>{class r{constructor(t,s,L){this.logger=t,this.commonService=s,this.store=L,this.eventsData=[],this.filterValue="",this.successfulEvents=[],this.displayedColumns=[],this.RoutingPeersIncoming=[],this.RoutingPeersOutgoing=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","total_fee"]):this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","total_fee"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","total_amount","total_fee"]):(this.flgSticky=!0,this.displayedColumns=["channel_id","alias","events","total_amount","total_fee"])}ngOnInit(){this.store.select(B.Bo).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.eventsData.length<=0&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.successfulEvents=t.forwardingHistory.listForwards||[],this.successfulEvents.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.successfulEvents),this.logger.info(t))})}ngAfterViewInit(){this.successfulEvents.length>0&&this.loadRoutingPeersTable(this.successfulEvents)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:a.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.successfulEvents=this.eventsData,t.eventsData.firstChange||this.loadRoutingPeersTable(this.successfulEvents))}loadRoutingPeersTable(t){if(t.length>0){const s=this.groupRoutingPeers(t);this.RoutingPeersIncoming=new xA.by(s[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(L,dA)=>JSON.stringify(L).toLowerCase().includes(dA),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new xA.by(s[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(L,dA)=>JSON.stringify(L).toLowerCase().includes(dA),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new xA.by([]),this.RoutingPeersOutgoing=new xA.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter(),this.logger.info(this.RoutingPeersIncoming),this.logger.info(this.RoutingPeersOutgoing)}groupRoutingPeers(t){const s=[],L=[];return t.forEach(dA=>{const ot=s.find(un=>un.channel_id===dA.in_channel),Ae=L.find(un=>un.channel_id===dA.out_channel);ot?(ot.events++,ot.total_amount=+ot.total_amount+ +dA.in_msatoshi,ot.total_fee=dA.in_msatoshi-dA.out_msatoshi+ +ot.total_fee):s.push({channel_id:dA.in_channel,alias:dA.in_channel_alias,events:1,total_amount:dA.in_msatoshi,total_fee:dA.in_msatoshi-dA.out_msatoshi}),Ae?(Ae.events++,Ae.total_amount=+Ae.total_amount+ +dA.out_msatoshi,Ae.total_fee=dA.in_msatoshi-dA.out_msatoshi+ +Ae.total_fee):L.push({channel_id:dA.out_channel,alias:dA.out_channel_alias,events:1,total_amount:dA.out_msatoshi,total_fee:dA.in_msatoshi-dA.out_msatoshi})}),[this.commonService.sortDescByKey(s,"total_fee"),this.commonService.sortDescByKey(L,"total_fee")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-routing-peers"]],viewQuery:function(t,s){if(1&t&&(A.Gf(Dc,5,rt.YE),A.Gf(yc,5,rt.YE),A.Gf(xc,5),A.Gf(Fc,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sortIn=L.first),A.iGM(L=A.CRH())&&(s.sortOut=L.first),A.iGM(L=A.CRH())&&(s.paginatorIn=L.first),A.iGM(L=A.CRH())&&(s.paginatorOut=L.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Peers")}]),A.TTD],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["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",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"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"page-sub-title-container","w-100",3,"ngClass"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",1,"overflow-auto","incoming-table",3,"dataSource"],["tableIn",""],["matColumnDef","channel_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","total_amount"],["matColumnDef","total_fee"],["matColumnDef","no_incoming_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","end stretch"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,Yc,2,1,"div",1),A.YNc(2,wg,65,29,"div",2),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[Ct.xw,Ct.Wh,Et.O5,Ct.yH,Et.mk,Y.oO,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,q.$V,T.pW,xA.BZ,rt.YE,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,Et.PC,Y.Zl,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.JJ],styles:[".mat-column-channelId[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),r})();function Qg(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",7),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=D.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let dg=(()=>{class r{constructor(t){this.router=t,this.faChartBar=h.koM,this.links=[{link:"routingreport",name:"Routing"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const L=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=L?L.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Reports"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),A.YNc(8,Qg,2,3,"div",6),A.qZA(),A._UZ(9,"router-outlet"),A.qZA()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faChartBar),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,ft.BU,Et.sg,ft.Nj,qt.rH,qt.lC],styles:[""]}),r})();var Kl=Nt(7772),Vl=Nt(7671),Wl=Nt(1210);function Mg(r,D){1&r&&(A.TgZ(0,"div",14),A._UZ(1,"mat-progress-bar",15),A.TgZ(2,"p"),A._uU(3,"Getting Forwarding History..."),A.qZA()())}function pg(r,D){if(1&r&&(A.TgZ(0,"div",16),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function Ig(r,D){if(1&r&&(A.TgZ(0,"div",17),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=A.oxw();A.Q6J("@fadeIn",t.totalFeeMsat),A.xp6(1),A.AsE("",A.xi3(2,3,t.totalFeeMsat/1e3||0,"1.0-2")," Sats/",A.lcZ(3,6,t.filteredEventsBySelectedPeriod.length||0)," Events")}}function mg(r,D){1&r&&(A.TgZ(0,"div",14),A._uU(1,"No routing report for the selected period"),A.qZA())}function vg(r,D){if(1&r&&(A.TgZ(0,"span")(1,"span",20),A._uU(2),A.ALo(3,"number"),A.qZA(),A.TgZ(4,"span",20),A._uU(5),A.ALo(6,"number"),A.qZA()()),2&r){const t=D.model,s=A.oxw(2);A.xp6(2),A.hij("Events: ",A.lcZ(3,2,(s.selReportBy===s.reportBy.EVENTS?t.value:t.extra.totalEvents)||0),""),A.xp6(3),A.hij("Fee: ",A.xi3(6,4,(s.selReportBy===s.reportBy.EVENTS?t.extra.totalFees:t.value)||0,"1.0-2"),"")}}function Dg(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"ngx-charts-bar-vertical",18),A.NdJ("select",function(L){return A.CHM(t),A.oxw().onChartBarSelected(L)})("mouseup",function(L){return A.CHM(t),A.oxw().onChartMouseUp(L)}),A.YNc(1,vg,7,7,"ng-template",null,19,A.W1O),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("view",t.view)("results",t.routingReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function yg(r,D){if(1&r&&A._UZ(0,"rtl-cln-forwarding-history",21),2&r){const t=A.oxw();A.Q6J("eventsData",t.filteredEventsBySelectedPeriod)("filterValue",t.eventFilterValue)}}let xg=(()=>{class r{constructor(t,s,L,dA){this.logger=t,this.commonService=s,this.store=L,this.dataService=dA,this.reportPeriod=a.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.reportBy=a.Xr,this.selReportBy=a.Xr.FEES,this.totalFeeMsat=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=a.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===a.cu.XS||this.screenSize===a.cu.SM),this.store.pipe((0,PA.q)(1)).subscribe(t=>{var s;t.cln.apisCallStatus.FetchForwardingHistoryS.status===a.Bn.UN_INITIATED&&!(null===(s=t.cln.forwardingHistory.listForwards)||void 0===s?void 0:s.length)&&this.store.dispatch((0,ht.u0)({payload:{status:a.OO.SETTLED}}))}),this.store.select(B.Bo).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{t.forwardingHistory.status===a.OO.SETTLED&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR?this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:"":this.apiCallStatus.status===a.Bn.COMPLETED&&(this.events=t.forwardingHistory.listForwards||[],this.filterForwardingEvents(this.startDate,this.endDate)),this.logger.info(t))}),this.commonService.containerSizeUpdated.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case a.cu.MD:this.screenPaddingX=t.width/10;break;case a.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}filterForwardingEvents(t,s){const L=Math.round(t.getTime()/1e3),dA=Math.round(s.getTime()/1e3);this.filteredEventsBySelectedPeriod=[],this.routingReportData=[],this.totalFeeMsat=null,this.events&&this.events.length>0&&(this.events.forEach(ot=>{ot.received_time&&ot.received_time>=L&&ot.received_time0&&"ngx-charts"===t.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(t){this.eventFilterValue=this.reportPeriod===a.op[1]?t.name+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+a.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(t){const s=Math.round(t.getTime()/1e3),L=[];if(this.totalFeeMsat=0,this.reportPeriod===a.op[1]){for(let dA=0;dA<12;dA++)L.push({name:a.gg[dA].name,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(dA=>{const ot=dA.received_time?new Date(1e3*+dA.received_time).getMonth():12;return L[ot].value=dA.fee?L[ot].value+ +dA.fee/1e3:L[ot].value,L[ot].extra.totalEvents=L[ot].extra.totalEvents+1,this.totalFeeMsat=dA.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +dA.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}else{for(let dA=0;dA{const ot=dA.received_time?Math.floor((+dA.received_time-s)/this.secondsInADay):0;return L[ot].value=dA.fee?L[ot].value+ +dA.fee/1e3:L[ot].value,L[ot].extra.totalEvents=L[ot].extra.totalEvents+1,this.totalFeeMsat=dA.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +dA.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}return L}prepareEventsReport(t){const s=Math.round(t.getTime()/1e3),L=[];if(this.totalFeeMsat=0,this.reportPeriod===a.op[1]){for(let dA=0;dA<12;dA++)L.push({name:a.gg[dA].name,value:0,extra:{totalFees:0}});this.filteredEventsBySelectedPeriod.map(dA=>{const ot=dA.received_time?new Date(1e3*+dA.received_time).getMonth():12;return L[ot].value=L[ot].value+1,L[ot].extra.totalFees=dA.fee?L[ot].extra.totalFees+ +dA.fee/1e3:L[ot].extra.totalFees,this.totalFeeMsat=dA.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +dA.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}else{for(let dA=0;dA{const ot=dA.received_time?Math.floor((+dA.received_time-s)/this.secondsInADay):0;return L[ot].value=L[ot].value+1,L[ot].extra.totalFees=dA.fee?L[ot].extra.totalFees+ +dA.fee/1e3:L[ot].extra.totalFees,this.totalFeeMsat=dA.fee?(this.totalFeeMsat?this.totalFeeMsat:0)+ +dA.fee:this.totalFeeMsat,this.filteredEventsBySelectedPeriod})}return L}onSelectionChange(t){const s=t.selDate.getMonth(),L=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===a.op[1]?(this.startDate=new Date(L,0,1,0,0,0),this.endDate=new Date(L,11,31,23,59,59)):(this.startDate=new Date(L,s,1,0,0,0),this.endDate=new Date(L,s,this.getMonthDays(s,L),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(t,s){return 1===t&&s%4==0?a.gg[t].days+1:a.gg[t].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(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(zA.D))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-routing-report"]],hostBindings:function(t,s){1&t&&A.NdJ("mouseup",function(dA){return s.onChartMouseUp(dA)})},decls:19,vars:9,consts:[["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 start",1,"my-1",3,"ngModel","ngModelChange","change"],[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 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1 error-border",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],[1,"mt-1"],["class","one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup",4,"ngIf"],[3,"eventsData","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],["mode","indeterminate"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1","error-border"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),A.NdJ("stepChanged",function(dA){return s.onSelectionChange(dA)}),A.qZA(),A.TgZ(2,"div",2)(3,"mat-radio-group",3),A.NdJ("ngModelChange",function(dA){return s.selReportBy=dA})("change",function(){return s.onSelReportByChange()}),A.TgZ(4,"span",4),A._uU(5,"Report By: "),A.qZA(),A.TgZ(6,"mat-radio-button",5),A._uU(7,"Fees"),A.qZA(),A.TgZ(8,"mat-radio-button",6),A._uU(9,"Events"),A.qZA()()(),A.TgZ(10,"div",7),A.YNc(11,Mg,4,0,"div",8),A.YNc(12,pg,2,1,"div",9),A.YNc(13,Ig,4,8,"div",10),A.YNc(14,mg,2,0,"div",8),A.TgZ(15,"div",11),A.YNc(16,Dg,3,11,"ngx-charts-bar-vertical",12),A.qZA(),A.TgZ(17,"div",11),A.YNc(18,yg,1,2,"rtl-cln-forwarding-history",13),A.qZA()()()),2&t&&(A.xp6(3),A.Q6J("ngModel",s.selReportBy),A.xp6(3),A.s9C("value",s.reportBy.FEES),A.xp6(2),A.s9C("value",s.reportBy.EVENTS),A.xp6(3),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.ERROR),A.xp6(1),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.COMPLETED&&s.routingReportData.length>0&&s.filteredEventsBySelectedPeriod.length>0),A.xp6(1),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.COMPLETED&&(s.routingReportData.length<=0||s.filteredEventsBySelectedPeriod.length<=0)),A.xp6(2),A.Q6J("ngIf",s.routingReportData.length>0&&s.filteredEventsBySelectedPeriod.length>0),A.xp6(2),A.Q6J("ngIf",s.filteredEventsBySelectedPeriod&&s.filteredEventsBySelectedPeriod.length>0))},directives:[Ct.xw,Ct.Wh,Ct.yH,Vl.D,HA.VQ,OA.JJ,OA.On,HA.U0,Et.O5,T.pW,Wl.K$,na],pipes:[Et.JJ],styles:[""],data:{animation:[Kl.J]}}),r})();var Fg=Nt(165);function Yg(r,D){if(1&r&&(A.TgZ(0,"div",10),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.AsE(" Paid ",A.xi3(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod/1e3||0,"1.0-2")," Sats/",A.lcZ(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function Tg(r,D){if(1&r&&(A.TgZ(0,"div",10),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.AsE(" Received ",A.xi3(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod/1e3||0,"1.0-2")," Sats/",A.lcZ(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function Sg(r,D){if(1&r&&(A.TgZ(0,"div",8),A.YNc(1,Yg,4,7,"div",9),A.YNc(2,Tg,4,7,"div",9),A.qZA()),2&r){const t=A.oxw();A.Q6J("@fadeIn",t.transactionsReportSummary),A.xp6(1),A.Q6J("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod),A.xp6(1),A.Q6J("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function Ng(r,D){1&r&&(A.TgZ(0,"div",11),A._uU(1,"No transactions report for the selected period"),A.qZA())}function Ug(r,D){if(1&r&&(A.TgZ(0,"span",14),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=D.model;A.xp6(1),A.HOy("",t.name,": ",A.xi3(2,4,t.value||0,"1.0-2"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",A.lcZ(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function Pg(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"ngx-charts-bar-vertical-2d",12),A.NdJ("select",function(L){return A.CHM(t),A.oxw().onChartBarSelected(L)})("mouseup",function(L){return A.CHM(t),A.oxw().onChartMouseUp(L)}),A.YNc(1,Ug,4,9,"ng-template",null,13,A.W1O),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("view",t.view)("results",t.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",t.reportPeriod===t.scrollRanges[0]?2:4)}}function Rg(r,D){if(1&r&&A._UZ(0,"rtl-transactions-report-table",15),2&r){const t=A.oxw();A.Q6J("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let zg=(()=>{class r{constructor(t,s,L){this.logger=t,this.commonService=s,this.store=L,this.scrollRanges=a.op,this.reportPeriod=a.op[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[],this.transactionsNonZeroReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Amount (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=a.cu,this.unSubs=[new c.x,new c.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===a.cu.XS||this.screenSize===a.cu.SM),this.store.select(B.PP).pipe((0,i.R)(this.unSubs[0]),(0,o.M)(this.store.select(B.gc))).subscribe(([t,s])=>{this.payments=t.payments,this.invoices=s.listInvoices.invoices,this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()}),this.commonService.containerSizeUpdated.pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case a.cu.MD:this.screenPaddingX=t.width/10;break;case a.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(t){this.transactionFilterValue=this.reportPeriod===a.op[1]?t.series+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+a.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,s){const L=Math.round(t.getTime()/1e3),dA=Math.round(s.getTime()/1e3),ot=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const Ae=this.payments.filter(Qe=>"complete"===Qe.status&&Qe.created_at>=L&&Qe.created_at"paid"===Qe.status&&Qe.paid_at>=L&&Qe.paid_at{const tn=new Date(1e3*Qe.created_at).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+Qe.msatoshi_sent,ot[tn].series[0].value=ot[tn].series[0].value+Qe.msatoshi_sent/1e3,ot[tn].series[0].extra.total=ot[tn].series[0].extra.total+1,this.transactionsReportSummary}),un.map(Qe=>{const tn=new Date(1e3*+Qe.paid_at).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+Qe.msatoshi_received,ot[tn].series[1].value=ot[tn].series[1].value+Qe.msatoshi_received/1e3,ot[tn].series[1].extra.total=ot[tn].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let Qe=0;Qe{const tn=Math.floor((+Qe.created_at-L)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+Qe.msatoshi_sent,ot[tn].series[0].value=ot[tn].series[0].value+Qe.msatoshi_sent/1e3,ot[tn].series[0].extra.total=ot[tn].series[0].extra.total+1,this.transactionsReportSummary}),un.map(Qe=>{const tn=Math.floor((+Qe.paid_at-L)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+Qe.msatoshi_received,ot[tn].series[1].value=ot[tn].series[1].value+Qe.msatoshi_received/1e3,ot[tn].series[1].extra.total=ot[tn].series[1].extra.total+1,this.transactionsReportSummary})}return ot}prepareTableData(){return this.transactionsReportData.reduce((t,s)=>s.series[0].extra.total>0||s.series[1].extra.total>0?t.concat({date:s.date,amount_paid:s.series[0].value,num_payments:s.series[0].extra.total,amount_received:s.series[1].value,num_invoices:s.series[1].extra.total}):t,[])}onSelectionChange(t){const s=t.selDate.getMonth(),L=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===a.op[1]?(this.startDate=new Date(L,0,1,0,0,0),this.endDate=new Date(L,11,31,23,59,59)):(this.startDate=new Date(L,s,1,0,0,0),this.endDate=new Date(L,s,this.getMonthDays(s,L),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(t,s){return 1===t&&s%4==0?a.gg[t].days+1:a.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-transactions-report"]],hostBindings:function(t,s){1&t&&A.NdJ("mouseup",function(dA){return s.onChartMouseUp(dA)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[3,"dataList","dataRange","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"dataList","dataRange","filterValue"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),A.NdJ("stepChanged",function(dA){return s.onSelectionChange(dA)}),A.qZA(),A.TgZ(2,"div",2),A.YNc(3,Sg,3,3,"div",3),A.YNc(4,Ng,2,0,"div",4),A.TgZ(5,"div",5),A.YNc(6,Pg,3,13,"ngx-charts-bar-vertical-2d",6),A.qZA(),A.TgZ(7,"div",5),A.YNc(8,Rg,1,3,"rtl-transactions-report-table",7),A.qZA()()()),2&t&&(A.xp6(3),A.Q6J("ngIf",s.transactionsNonZeroReportData.length>0),A.xp6(1),A.Q6J("ngIf",s.transactionsNonZeroReportData.length<=0),A.xp6(2),A.Q6J("ngIf",s.transactionsNonZeroReportData.length>0),A.xp6(2),A.Q6J("ngIf",s.transactionsNonZeroReportData.length>0))},directives:[Ct.xw,Ct.Wh,Ct.yH,Vl.D,Et.O5,Wl.H5,Fg.g],pipes:[Et.JJ],styles:[""],data:{animation:[Kl.J]}}),r})();var ze=Nt(1643),Lg=Nt(9442);function bg(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",8),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().activeLink=dA.link}),A._uU(1),A.qZA()}if(2&r){const t=D.$implicit,s=A.oxw();A.s9C("routerLink",t.link),A.Q6J("active",s.activeLink===t.link),A.xp6(1),A.Oqu(t.name)}}let Gg=(()=>{class r{constructor(t){this.router=t,this.faSearch=h.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new c.x,new c.x,new c.x,new c.x]}ngOnInit(){const t=this.links.find(s=>this.router.url.includes(s.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(s=>s instanceof qt.Av)).subscribe({next:s=>{const L=this.links.find(dA=>s.urlAfterRedirects.includes(dA.link));this.activeLink=L?L.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-graph"]],decls:11,vars:2,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Graph Lookups"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),A.YNc(8,bg,2,3,"div",6),A.qZA(),A.TgZ(9,"div",7),A._UZ(10,"router-outlet"),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faSearch),A.xp6(7),A.Q6J("ngForOf",s.links))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,ft.BU,Et.sg,ft.Nj,qt.rH,Ct.yH,qt.lC],styles:[""]}),r})();var Hg=Nt(4641),Jg=Nt(8493);function Og(r,D){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.offerError)}}function kg(r,D){if(1&r&&(A.TgZ(0,"div",21),A._UZ(1,"fa-icon",22),A.YNc(2,Og,2,1,"span",23),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.offerError)}}let jg=(()=>{class r{constructor(t,s,L,dA,ot,Ae){this.dialogRef=t,this.data=s,this.store=L,this.decimalPipe=dA,this.commonService=ot,this.actions=Ae,this.faExclamationTriangle=h.eHv,this.selNode={},this.description="",this.vendor="",this.offerValueHint="",this.information={},this.pageSize=a.IV,this.offerError="",this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(B.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t,this.vendor=this.information.alias}),this.actions.pipe((0,i.R)(this.unSubs[2]),(0,JA.h)(t=>t.type===a.AB.UPDATE_API_CALL_STATUS_CLN)).subscribe(t=>{t.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&"SaveNewOffer"===t.payload.action&&(t.payload.status===a.Bn.ERROR&&(this.offerError=t.payload.message),t.payload.status===a.Bn.COMPLETED&&this.dialogRef.close())})}onAddOffer(){this.offerError="",this.store.dispatch((0,ht.dh)({payload:{amount:this.offerValue?this.offerValue+"sats":"any",description:this.description,vendor:this.vendor}}))}resetData(){this.description="",this.vendor=this.information.alias,this.offerValue=null,this.offerValueHint="",this.offerError=""}onOfferValueChange(){this.selNode.fiatConversion&&this.offerValue>99&&(this.offerValueHint="",this.commonService.convertCurrency(this.offerValue,a.NT.SATS,a.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,i.R)(this.unSubs[3])).subscribe({next:t=>{this.offerValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,a.Xz.OTHER)+" "+t.unit},error:t=>{this.offerValueHint="Conversion Error: "+t}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(u.yh),A.Y36(Et.JJ),A.Y36(C.v),A.Y36(Yt.eX))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-create-offer"]],decls:28,vars:8,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","6","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addOfferForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","1","name","description",3,"ngModel","ngModelChange"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","2","name","offerValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","58","fxLayoutAlign","start end"],["matInput","","placeholder","Vendor","tabindex","3","name","vendor",3,"ngModel","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","4","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","5",3,"click"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5,"Create Offer"),A.qZA()(),A.TgZ(6,"button",5),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),A.NdJ("ngModelChange",function(dA){return s.description=dA}),A.qZA()(),A.TgZ(13,"div",11)(14,"mat-form-field",12)(15,"input",13),A.NdJ("ngModelChange",function(dA){return s.offerValue=dA})("keyup",function(){return s.onOfferValueChange()}),A.qZA(),A.TgZ(16,"span",14),A._uU(17," Sats "),A.qZA(),A.TgZ(18,"mat-hint"),A._uU(19),A.qZA()(),A.TgZ(20,"mat-form-field",15)(21,"input",16),A.NdJ("ngModelChange",function(dA){return s.vendor=dA}),A.qZA()()(),A.YNc(22,kg,3,2,"div",17),A.TgZ(23,"div",18)(24,"button",19),A.NdJ("click",function(){return s.resetData()}),A._uU(25,"Clear Field"),A.qZA(),A.TgZ(26,"button",20),A.NdJ("click",function(){return s.onAddOffer()}),A._uU(27,"Create Offer"),A.qZA()()()()()()),2&t&&(A.xp6(6),A.Q6J("mat-dialog-close",!1),A.xp6(6),A.Q6J("ngModel",s.description),A.xp6(3),A.Q6J("ngModel",s.offerValue)("step",100)("min",1),A.xp6(4),A.Oqu(s.offerValueHint),A.xp6(2),A.Q6J("ngModel",s.vendor),A.xp6(1),A.Q6J("ngIf",""!==s.offerError))},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,Mt.ZT,g.dn,OA._Y,OA.JL,OA.F,U.KE,H.Nt,OA.Fj,k.h,OA.JJ,OA.On,OA.wV,OA.qQ,b.q,U.R9,U.bx,Et.O5,e.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();var Zl=Nt(1462);function Kg(r,D){1&r&&A._UZ(0,"mat-progress-bar",28)}function Vg(r,D){1&r&&(A.TgZ(0,"th",29),A._uU(1," Offer ID "),A.qZA())}const Xl=function(r){return{"mr-0":r}};function Wg(r,D){if(1&r&&A._UZ(0,"span",35),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Xl,t.screenSize===t.screenSizeEnum.XS))}}function Zg(r,D){if(1&r&&A._UZ(0,"span",36),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,Xl,t.screenSize===t.screenSizeEnum.XS))}}const Xg=function(r){return{"max-width":r}};function qg(r,D){if(1&r&&(A.TgZ(0,"td",30)(1,"div",31)(2,"span",32),A.YNc(3,Wg,1,3,"span",33),A.YNc(4,Zg,1,3,"span",34),A._uU(5),A.qZA()()()),2&r){const t=D.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(4,Xg,s.screenSize===s.screenSizeEnum.XS?"25rem":"45rem")),A.xp6(2),A.Q6J("ngIf",t.active),A.xp6(1),A.Q6J("ngIf",!t.active),A.xp6(1),A.hij(" ",t.offer_id," ")}}function _g(r,D){1&r&&(A.TgZ(0,"th",29),A._uU(1," Single Use "),A.qZA())}function $g(r,D){if(1&r&&(A.TgZ(0,"td",30),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(t.single_use?"Yes":"No")}}function AB(r,D){1&r&&(A.TgZ(0,"th",29),A._uU(1," Used "),A.qZA())}function tB(r,D){if(1&r&&(A.TgZ(0,"td",30),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",t.used?"Yes":"No"," ")}}function eB(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",37)(1,"div",38)(2,"mat-select",39),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",40),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function nB(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",40),A.NdJ("click",function(){A.CHM(t);const L=A.oxw().$implicit;return A.oxw().onDisableOffer(L)}),A._uU(1,"Disable Offer"),A.qZA()}}function rB(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-option",40),A.NdJ("click",function(){A.CHM(t);const L=A.oxw().$implicit;return A.oxw().onPrintOffer(L)}),A._uU(1,"Export QR code"),A.qZA()}}const iB=function(r){return{"px-3":r}};function aB(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",41)(1,"div",42)(2,"mat-select",43),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",40),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onOfferClick(dA)}),A._uU(5,"View Info"),A.qZA(),A.YNc(6,nB,2,0,"mat-option",44),A.YNc(7,rB,2,0,"mat-option",44),A.qZA()()()}if(2&r){const t=D.$implicit,s=A.oxw();A.Q6J("ngClass",A.VKq(3,iB,s.screenSize!==s.screenSizeEnum.XS)),A.xp6(6),A.Q6J("ngIf",t.active),A.xp6(1),A.Q6J("ngIf",t.active)}}function oB(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No offer available."),A.qZA())}function sB(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting offers..."),A.qZA())}function lB(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function cB(r,D){if(1&r&&(A.TgZ(0,"td",45),A.YNc(1,oB,2,0,"p",46),A.YNc(2,sB,2,0,"p",46),A.YNc(3,lB,2,1,"p",46),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offers&&t.offers.data)||(null==t.offers||null==t.offers.data?null:t.offers.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const gB=function(r){return{"display-none":r}};function BB(r,D){if(1&r&&A._UZ(0,"tr",47),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,gB,(null==t.offers?null:t.offers.data)&&(null==t.offers||null==t.offers.data?null:t.offers.data.length)>0))}}function uB(r,D){1&r&&A._UZ(0,"tr",48)}function fB(r,D){1&r&&A._UZ(0,"tr",49)}const hB=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},EB=function(){return["no_offer"]};let wB=(()=>{class r{constructor(t,s,L,dA,ot,Ae,un){this.logger=t,this.store=s,this.commonService=L,this.rtlEffects=dA,this.dataService=ot,this.decimalPipe=Ae,this.datePipe=un,this.faHistory=h.qO$,this.selNode={},this.newlyAddedOfferMemo="",this.newlyAddedOfferValue=0,this.description="",this.offerValue=null,this.offerValueHint="",this.displayedColumns=[],this.offerPaymentReq="",this.offerJSONArr=[],this.information={},this.flgSticky=!1,this.private=!1,this.expiryStep=100,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["offer_id","single_use","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["offer_id","single_use","used","actions"]):(this.flgSticky=!0,this.displayedColumns=["offer_id","single_use","used","actions"])}ngOnInit(){this.store.select(B.lw).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(B.ey).pipe((0,i.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(B.Y_).pipe((0,i.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.offerJSONArr=t.offers||[],this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.offerJSONArr&&this.offerJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offerJSONArr)}openCreateOfferModal(){this.store.dispatch((0,KA.qR)({payload:{data:{pageSize:this.pageSize,component:jg}}}))}onOfferClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{offer:{used:t.used,single_use:t.single_use,active:t.active,offer_id:t.offer_id,bolt12:t.bolt12,bolt12_unsigned:t.bolt12_unsigned},newlyAdded:!1,component:Zl.k}}}))}onDisableOffer(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Disable Offer",titleMessage:"Disabling Offer: "+(t.offer_id||t.bolt12),noBtnText:"Cancel",yesBtnText:"Disable"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[3])).subscribe(s=>{s&&this.store.dispatch((0,ht.i9)({payload:{offer_id:t.offer_id}}))})}onPrintOffer(t){this.dataService.decodePayment(t.bolt12,!1).pipe((0,PA.q)(1)).subscribe(s=>{s.offer_id&&!s.amount_msat?(s.amount_msat="0msat",s.amount=0):s.amount=+(s.amount||s.amount_msat.slice(0,-4));const L={pageSize:"A5",pageOrientation:"portrait",pageMargins:[10,50,10,50],background:{svg:'\n \n \n \n \n \n ',width:249,height:333,absolutePosition:{x:84,y:160}},header:{text:s.vendor||s.issuer||"",alignment:"center",fontSize:25,color:"#272727",margin:[0,20,0,0]},content:[{svg:'',width:249,height:40,alignment:"center"},{text:s.description?s.description.substring(0,160):"",alignment:"center",fontSize:16,color:"#5C5C5C"},{qr:t.bolt12,eccLevel:"M",fit:"227",alignment:"center",absolutePosition:{x:7,y:205}},{text:(null==s?void 0:s.amount_msat)&&0!==(null==s?void 0:s.amount)?this.decimalPipe.transform(s.amount/1e3)+" SATS":"Open amount",fontSize:20,bold:!1,color:"white",alignment:"center",absolutePosition:{x:0,y:430}},{text:"SCAN TO PAY",fontSize:22,bold:!0,color:"white",alignment:"center",absolutePosition:{x:0,y:455}}],footer:{svg:'\n \n \n \n \n ',alignment:"center"}};Hg.createPdf(L,null,null,Jg.I.vfs).download("Offer-"+(s&&s.description?s.description:t.bolt12))})}applyFilter(){this.offers.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){this.offers=new xA.by(t?[...t]:[]),this.offers.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.offers.sort=this.sort,this.offers.filterPredicate=(s,L)=>(("active"===L||"inactive"===L||"used"===L||"unused"===L||"single"===L||"multiple"===L)&&(L=" "+L),((s.active?" active":" inactive")+(s.used?" used":" unused")+(s.single_use?" single":" multiple")+JSON.stringify(s).toLowerCase()).includes(L)),this.offers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.offers.data&&this.offers.data.length>0&&this.commonService.downloadFile(this.offers.data,"Offers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(DA.V),A.Y36(zA.D),A.Y36(Et.JJ),A.Y36(Et.uU))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-offers-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Offers")}])],decls:34,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","offer_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","single_use"],["matColumnDef","used"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["class","dot green","matTooltip","Active","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Inactive","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Active","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Inactive","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"button",2),A.NdJ("click",function(){return s.openCreateOfferModal()}),A._uU(3,"Create Offer"),A.qZA()(),A.TgZ(4,"div",3)(5,"div",4)(6,"div",5),A._UZ(7,"fa-icon",6),A.TgZ(8,"span",7),A._uU(9,"Offers History"),A.qZA()(),A.TgZ(10,"mat-form-field",8)(11,"input",9),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.TgZ(12,"div",10),A.YNc(13,Kg,1,0,"mat-progress-bar",11),A.TgZ(14,"table",12,13),A.ynx(16,14),A.YNc(17,Vg,2,0,"th",15),A.YNc(18,qg,6,6,"td",16),A.BQk(),A.ynx(19,17),A.YNc(20,_g,2,0,"th",15),A.YNc(21,$g,2,1,"td",16),A.BQk(),A.ynx(22,18),A.YNc(23,AB,2,0,"th",15),A.YNc(24,tB,2,1,"td",16),A.BQk(),A.ynx(25,19),A.YNc(26,eB,6,0,"th",20),A.YNc(27,aB,8,5,"td",21),A.BQk(),A.ynx(28,22),A.YNc(29,cB,4,3,"td",23),A.BQk(),A.YNc(30,BB,1,3,"tr",24),A.YNc(31,uB,1,0,"tr",25),A.YNc(32,fB,1,0,"tr",26),A.qZA()(),A._UZ(33,"mat-paginator",27),A.qZA()()),2&t&&(A.xp6(7),A.Q6J("icon",s.faHistory),A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.offers)("ngClass",A.VKq(12,hB,""!==s.errorMessage)),A.xp6(16),A.Q6J("matFooterRowDef",A.DdM(14,EB)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.yH,Ct.Wh,w.lW,e.BN,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,q.$V,Et.O5,T.pW,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,Et.PC,Y.Zl,eA.gM,CA.gD,CA.$L,wA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],styles:[".mat-column-offer_id[_ngcontent-%COMP%]{flex:0 0 65%;width:65%}.mat-column-offer_id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();function CB(r,D){1&r&&A._UZ(0,"mat-progress-bar",30)}function QB(r,D){1&r&&(A.TgZ(0,"th",31),A._uU(1," Updated At "),A.qZA())}function dB(r,D){if(1&r&&(A.TgZ(0,"td",32),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,t.lastUpdatedAt,"dd/MMM/y HH:mm"))}}function MB(r,D){1&r&&(A.TgZ(0,"th",31),A._uU(1," Title "),A.qZA())}const ql=function(r){return{"max-width":r}};function pB(r,D){if(1&r&&(A.TgZ(0,"td",32)(1,"div",33)(2,"span",34),A._uU(3),A.qZA()()()),2&r){const t=D.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,ql,s.screenSize===s.screenSizeEnum.XS?"20rem":"35rem")),A.xp6(2),A.Oqu(t.title)}}function IB(r,D){1&r&&(A.TgZ(0,"th",35),A._uU(1," Amount (Sats) "),A.qZA())}function mB(r,D){if(1&r&&(A.TgZ(0,"td",36)(1,"span",37),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(0===t.amountmSat?"Open":A.lcZ(3,1,t.amountmSat/1e3))}}function vB(r,D){1&r&&(A.TgZ(0,"th",31),A._uU(1," Description "),A.qZA())}function DB(r,D){if(1&r&&(A.TgZ(0,"td",32)(1,"div",33)(2,"span",34),A._uU(3),A.qZA()()()),2&r){const t=D.$implicit,s=A.oxw();A.xp6(1),A.Q6J("ngStyle",A.VKq(2,ql,s.screenSize===s.screenSizeEnum.XS?"20rem":"35rem")),A.xp6(2),A.Oqu(t.description)}}function yB(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",38)(1,"div",39)(2,"mat-select",40),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",41),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}const xB=function(r){return{"px-3":r}};function FB(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",42)(1,"div",43)(2,"mat-select",44),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",41),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onOfferBookmarkClick(dA)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",41),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onRePayOffer(dA)}),A._uU(7,"Pay Again"),A.qZA(),A.TgZ(8,"mat-option",41),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onDeleteBookmark(dA)}),A._uU(9,"Delete Bookmark"),A.qZA()()()()}if(2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,xB,t.screenSize!==t.screenSizeEnum.XS))}}function YB(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No offer bookmarked."),A.qZA())}function TB(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting offer bookmarks..."),A.qZA())}function SB(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function NB(r,D){if(1&r&&(A.TgZ(0,"td",45),A.YNc(1,YB,2,0,"p",46),A.YNc(2,TB,2,0,"p",46),A.YNc(3,SB,2,1,"p",46),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.offersBookmarks&&t.offersBookmarks.data)||(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offersBookmarks&&t.offersBookmarks.data)||(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.offersBookmarks&&t.offersBookmarks.data)||(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const UB=function(r){return{"display-none":r}};function PB(r,D){if(1&r&&A._UZ(0,"tr",47),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,UB,(null==t.offersBookmarks?null:t.offersBookmarks.data)&&(null==t.offersBookmarks||null==t.offersBookmarks.data?null:t.offersBookmarks.data.length)>0))}}function RB(r,D){1&r&&A._UZ(0,"tr",48)}function zB(r,D){1&r&&A._UZ(0,"tr",49)}const LB=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},bB=function(){return["no_offer"]};let GB=(()=>{class r{constructor(t,s,L,dA){this.logger=t,this.store=s,this.commonService=L,this.rtlEffects=dA,this.faHistory=h.qO$,this.displayedColumns=[],this.offersBookmarksJSONArr=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.selFilter="",this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS||this.screenSize===a.cu.SM?(this.flgSticky=!1,this.displayedColumns=["lastUpdatedAt","title","amountmSat","actions"]):this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["lastUpdatedAt","title","amountmSat","description","actions"]):(this.flgSticky=!0,this.displayedColumns=["lastUpdatedAt","title","amountmSat","description","actions"])}ngOnInit(){this.store.select(B.EQ).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.offersBookmarksJSONArr=t.offersBookmarks||[],this.offersBookmarksJSONArr&&this.offersBookmarksJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offersBookmarksJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.offersBookmarksJSONArr&&this.offersBookmarksJSONArr.length>0&&this.sort&&this.paginator&&this.loadOffersTable(this.offersBookmarksJSONArr)}onOfferBookmarkClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{offer:{bolt12:t.bolt12},newlyAdded:!1,component:Zl.k}}}))}onDeleteBookmark(t){this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Delete Bookmark",titleMessage:"Deleting Bookmark: "+(t.title||t.description),noBtnText:"Cancel",yesBtnText:"Delete"}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[1])).subscribe(s=>{s&&this.store.dispatch((0,ht._9)({payload:{bolt12:t.bolt12}}))})}onRePayOffer(t){this.store.dispatch((0,KA.qR)({payload:{data:{paymentType:a.IX.OFFER,bolt12:t.bolt12,offerTitle:t.title,component:xn}}}))}applyFilter(){this.offersBookmarks.filter=this.selFilter.trim().toLowerCase()}loadOffersTable(t){this.offersBookmarks=new xA.by(t?[...t]:[]),this.offersBookmarks.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.offersBookmarks.sort=this.sort,this.offersBookmarks.filterPredicate=(s,L)=>JSON.stringify(s).toLowerCase().includes(L),this.offersBookmarks.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.offersBookmarks.data&&this.offersBookmarks.data.length>0&&this.commonService.downloadFile(this.offersBookmarks.data,"OfferBookmarks")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(C.v),A.Y36(DA.V))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-offer-bookmarks-table"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Offer Bookmarks")}])],decls:35,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","lastUpdatedAt"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","title"],["matColumnDef","amountmSat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-2",4,"matHeaderCellDef"],["mat-cell","","class","pr-2",4,"matCellDef"],["matColumnDef","description"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_offer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-2"],["mat-cell","",1,"pr-2"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"div",1),A.TgZ(2,"div",2)(3,"div",3)(4,"div",4),A._UZ(5,"fa-icon",5),A.TgZ(6,"span",6),A._uU(7,"Offer Bookmarks"),A.qZA()(),A.TgZ(8,"mat-form-field",7)(9,"input",8),A.NdJ("keyup",function(){return s.applyFilter()})("ngModelChange",function(dA){return s.selFilter=dA}),A.qZA()()(),A.TgZ(10,"div",9),A.YNc(11,CB,1,0,"mat-progress-bar",10),A.TgZ(12,"table",11,12),A.ynx(14,13),A.YNc(15,QB,2,0,"th",14),A.YNc(16,dB,3,4,"td",15),A.BQk(),A.ynx(17,16),A.YNc(18,MB,2,0,"th",14),A.YNc(19,pB,4,4,"td",15),A.BQk(),A.ynx(20,17),A.YNc(21,IB,2,0,"th",18),A.YNc(22,mB,4,3,"td",19),A.BQk(),A.ynx(23,20),A.YNc(24,vB,2,0,"th",14),A.YNc(25,DB,4,4,"td",15),A.BQk(),A.ynx(26,21),A.YNc(27,yB,6,0,"th",22),A.YNc(28,FB,10,3,"td",23),A.BQk(),A.ynx(29,24),A.YNc(30,NB,4,3,"td",25),A.BQk(),A.YNc(31,PB,1,3,"tr",26),A.YNc(32,RB,1,0,"tr",27),A.YNc(33,zB,1,0,"tr",28),A.qZA()(),A._UZ(34,"mat-paginator",29),A.qZA()()),2&t&&(A.xp6(5),A.Q6J("icon",s.faHistory),A.xp6(4),A.Q6J("ngModel",s.selFilter),A.xp6(2),A.Q6J("ngIf",(null==s.apiCallStatus?null:s.apiCallStatus.status)===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.offersBookmarks)("ngClass",A.VKq(12,LB,""!==s.errorMessage)),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(14,bB)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.yH,Ct.Wh,e.BN,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,q.$V,Et.O5,T.pW,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,Et.PC,Y.Zl,CA.gD,CA.$L,wA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.uU,Et.JJ],styles:[".mat-column-title[_ngcontent-%COMP%], .mat-column-description[_ngcontent-%COMP%]{flex:0 0 30%;width:30%}.mat-column-title[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();function HB(r,D){if(1&r&&(A.TgZ(0,"div",5),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Oqu(t.errorMessage)}}function JB(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"div",6)(1,"div",7),A._UZ(2,"fa-icon",8),A.TgZ(3,"span"),A._uU(4,"Maximum 1,000 local failed transactions only."),A.qZA()(),A.TgZ(5,"div",9),A._UZ(6,"div",10),A.TgZ(7,"mat-form-field",11)(8,"input",12),A.NdJ("keyup",function(){return A.CHM(t),A.oxw().applyFilter()})("ngModelChange",function(L){return A.CHM(t),A.oxw().selFilter=L}),A.qZA()()()()}if(2&r){const t=A.oxw();A.xp6(2),A.Q6J("icon",t.faExclamationTriangle),A.xp6(6),A.Q6J("ngModel",t.selFilter)}}function OB(r,D){1&r&&A._UZ(0,"mat-progress-bar",34)}function kB(r,D){1&r&&(A.TgZ(0,"th",35),A._uU(1,"Received Time"),A.qZA())}function jB(r,D){if(1&r&&(A.TgZ(0,"td",36),A._uU(1),A.ALo(2,"date"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(A.xi3(2,1,1e3*(null==t?null:t.received_time),"dd/MMM/y HH:mm"))}}function KB(r,D){1&r&&(A.TgZ(0,"th",35),A._uU(1,"In Channel"),A.qZA())}function VB(r,D){if(1&r&&(A.TgZ(0,"td",36),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.Oqu(null==t?null:t.in_channel_alias)}}function WB(r,D){1&r&&(A.TgZ(0,"th",37),A._uU(1,"Amount In (Sats)"),A.qZA())}function ZB(r,D){if(1&r&&(A.TgZ(0,"td",36)(1,"span",38),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.Oqu(A.xi3(3,1,(null==t?null:t.in_msatoshi)/1e3,(null==t?null:t.in_msatoshi)<1e3?"1.0-4":"1.0-0"))}}function XB(r,D){1&r&&(A.TgZ(0,"th",39),A._uU(1,"Fail Reason"),A.qZA())}function qB(r,D){if(1&r&&(A.TgZ(0,"td",40),A._uU(1),A.qZA()),2&r){const t=D.$implicit,s=A.oxw(2);A.xp6(1),A.Oqu(s.CLNFailReason[null==t?null:t.failreason])}}function _B(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",41)(1,"div",42)(2,"mat-select",43),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",44),A.NdJ("click",function(){return A.CHM(t),A.oxw(2).onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function $B(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",45)(1,"button",46),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw(2).onFailedLocalEventClick(dA)}),A._uU(2,"View Info"),A.qZA()()}}function Au(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No failed transaction available."),A.qZA())}function tu(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting failed transactions..."),A.qZA())}function eu(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(3);A.xp6(1),A.Oqu(t.errorMessage)}}function nu(r,D){if(1&r&&(A.TgZ(0,"td",47),A.YNc(1,Au,2,0,"p",48),A.YNc(2,tu,2,0,"p",48),A.YNc(3,eu,2,1,"p",48),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedLocalForwardingEvents&&t.failedLocalForwardingEvents.data)||(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedLocalForwardingEvents&&t.failedLocalForwardingEvents.data)||(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.failedLocalForwardingEvents&&t.failedLocalForwardingEvents.data)||(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const ru=function(r){return{"display-none":r}};function iu(r,D){if(1&r&&A._UZ(0,"tr",49),2&r){const t=A.oxw(2);A.Q6J("ngClass",A.VKq(1,ru,(null==t.failedLocalForwardingEvents?null:t.failedLocalForwardingEvents.data)&&(null==t.failedLocalForwardingEvents||null==t.failedLocalForwardingEvents.data?null:t.failedLocalForwardingEvents.data.length)>0))}}function au(r,D){1&r&&A._UZ(0,"tr",50)}function ou(r,D){1&r&&A._UZ(0,"tr",51)}const su=function(){return["no_event"]};function lu(r,D){if(1&r&&(A.TgZ(0,"div",13),A.YNc(1,OB,1,0,"mat-progress-bar",14),A.TgZ(2,"table",15,16),A.ynx(4,17),A.YNc(5,kB,2,0,"th",18),A.YNc(6,jB,3,4,"td",19),A.BQk(),A.ynx(7,20),A.YNc(8,KB,2,0,"th",18),A.YNc(9,VB,2,1,"td",19),A.BQk(),A.ynx(10,21),A.YNc(11,WB,2,0,"th",22),A.YNc(12,ZB,4,4,"td",19),A.BQk(),A.ynx(13,23),A.YNc(14,XB,2,0,"th",24),A.YNc(15,qB,2,1,"td",25),A.BQk(),A.ynx(16,26),A.YNc(17,_B,6,0,"th",27),A.YNc(18,$B,3,0,"td",28),A.BQk(),A.ynx(19,29),A.YNc(20,nu,4,3,"td",30),A.BQk(),A.YNc(21,iu,1,3,"tr",31),A.YNc(22,au,1,0,"tr",32),A.YNc(23,ou,1,0,"tr",33),A.qZA()()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",t.failedLocalForwardingEvents),A.xp6(19),A.Q6J("matFooterRowDef",A.DdM(6,su)),A.xp6(1),A.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function cu(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"mat-paginator",52),A.NdJ("page",function(L){return A.CHM(t),A.oxw().onPageChange(L)}),A.qZA()}if(2&r){const t=A.oxw();A.Q6J("length",t.totalLocalFailedTransactions)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let gu=(()=>{class r{constructor(t,s,L,dA,ot){this.logger=t,this.commonService=s,this.store=L,this.datePipe=dA,this.router=ot,this.faExclamationTriangle=h.eHv,this.CLNFailReason=a.p7,this.errorMessage="",this.displayedColumns=[],this.flgSticky=!1,this.selFilter="",this.indexOffset=0,this.totalLocalFailedTransactions=0,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.apiCallStatus=null,this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS||this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["received_time","in_channel","in_msatoshi","actions"]):(this.flgSticky=!0,this.displayedColumns=["received_time","in_channel","in_msatoshi","failreason","actions"])}ngOnInit(){this.router.routeReuseStrategy.shouldReuseRoute=()=>!1,this.router.onSameUrlNavigation="reload",this.store.dispatch((0,ht.u0)({payload:{status:a.OO.LOCAL_FAILED}})),this.store.select(B.lK).pipe((0,i.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===a.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.totalLocalFailedTransactions=t.localFailedForwardingHistory.totalForwards||0,this.failedLocalEvents=t.localFailedForwardingHistory.listForwards||[],this.failedLocalEvents.length>0&&this.sort&&this.paginator&&this.loadLocalfailedLocalEventsTable(this.failedLocalEvents.slice(0,this.pageSize)),this.logger.info(t)})}ngAfterViewInit(){this.failedLocalEvents.length>0&&this.loadLocalfailedLocalEventsTable(this.failedLocalEvents.slice(0,this.pageSize))}onFailedLocalEventClick(t){this.store.dispatch((0,KA.qR)({payload:{data:{type:a.n_.INFORMATION,alertTitle:"Local Failed Event Information",message:[[{key:"received_time",value:t.received_time,title:"Received Time",width:50,type:a.Gi.DATE_TIME},{key:"in_channel_alias",value:t.in_channel_alias,title:"Inbound Channel",width:50,type:a.Gi.STRING}],[{key:"in_msatoshi",value:t.in_msatoshi,title:"Amount In (mSats)",width:100,type:a.Gi.NUMBER}],[{key:"failreason",value:t.failreason?this.CLNFailReason[t.failreason]:"",title:"Reason for Failure",width:100,type:a.Gi.STRING}]]}}}))}loadLocalfailedLocalEventsTable(t){this.failedLocalForwardingEvents=new xA.by([...t]),this.failedLocalForwardingEvents.filterPredicate=(s,L)=>{var dA;const ot=(s.received_time?null===(dA=this.datePipe.transform(new Date(1e3*s.received_time),"dd/MMM/YYYY HH:mm"))||void 0===dA?void 0:dA.toLowerCase():"")+(s.in_channel_alias?s.in_channel_alias.toLowerCase():"")+(s.failreason&&this.CLNFailReason[s.failreason]?this.CLNFailReason[s.failreason].toLowerCase():"")+(s.in_msatoshi?s.in_msatoshi/1e3:"");return(null==ot?void 0:ot.includes(L))||!1},this.failedLocalForwardingEvents.sort=this.sort,this.failedLocalForwardingEvents.sortingDataAccessor=(s,L)=>"failreason"===L?s.failreason?this.CLNFailReason[s.failreason]:"":s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.applyFilter(),this.logger.info(this.failedLocalForwardingEvents)}onDownloadCSV(){this.failedLocalForwardingEvents&&this.failedLocalForwardingEvents.data&&this.failedLocalForwardingEvents.data.length>0&&this.commonService.downloadFile(this.failedLocalForwardingEvents.data,"Local-failed-transactions")}applyFilter(){this.failedLocalForwardingEvents.filter=this.selFilter.trim().toLowerCase()}onPageChange(t){this.pageSize!==t.pageSize?(this.pageSize=t.pageSize,this.indexOffset=0):this.indexOffset=t.pageIndex*this.pageSize,this.loadLocalfailedLocalEventsTable(this.failedLocalEvents.slice(this.indexOffset,this.indexOffset+this.pageSize))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(C.v),A.Y36(u.yh),A.Y36(Et.uU),A.Y36(qt.F0))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-local-failed-history"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Local failed events")}])],decls:5,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout.gt-xs","column","fxLayout","row","fxLayoutAlign","start center","fxLayoutAlign.gt-xs","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,"length","pageSize","pageSizeOptions","showFirstLastButtons","page",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout.gt-xs","column","fxLayout","row","fxLayoutAlign","start center","fxLayoutAlign.gt-xs","start stretch",1,"page-sub-title-container"],["fxFlex","100",1,"alert","alert-warn","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","100"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource"],["table",""],["matColumnDef","received_time"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","in_channel"],["matColumnDef","in_msatoshi"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","failreason"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A.YNc(1,HB,2,1,"div",1),A.YNc(2,JB,9,2,"div",2),A.YNc(3,lu,24,7,"div",3),A.YNc(4,cu,1,4,"mat-paginator",4),A.qZA()),2&t&&(A.xp6(1),A.Q6J("ngIf",""!==s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage),A.xp6(1),A.Q6J("ngIf",""===s.errorMessage))},directives:[Ct.xw,Ct.Wh,Et.O5,Ct.yH,e.BN,U.KE,H.Nt,OA.Fj,OA.JJ,OA.On,q.$V,T.pW,xA.BZ,rt.YE,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,CA.gD,CA.$L,wA.ey,w.lW,xA.mD,xA.yh,xA.Ke,xA.Q2,Et.mk,Y.oO,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.uU,Et.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})();const Bu=["form"];function uu(r,D){1&r&&A.GkF(0)}function fu(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Requested amount is required."),A.qZA())}function hu(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Fee rate is required."),A.qZA())}function Eu(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Local amount is required."),A.qZA())}function wu(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Local amount must be greater than or equal to 20000. This estimate covers force close fee for the provider."),A.qZA())}function Cu(r,D){if(1&r&&(A.TgZ(0,"mat-error"),A._uU(1),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.hij("Local amount must be less than or equal to ",t.totalBalance,".")}}function Qu(r,D){if(1&r&&(A.TgZ(0,"span"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.channelConnectionError)}}function du(r,D){if(1&r&&(A.TgZ(0,"div",26),A._UZ(1,"fa-icon",27),A.YNc(2,Qu,2,1,"span",15),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("icon",t.faExclamationTriangle),A.xp6(1),A.Q6J("ngIf",""!==t.channelConnectionError)}}function Mu(r,D){1&r&&(A.TgZ(0,"th",47),A._uU(1,"Type"),A.qZA())}function pu(r,D){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.type," ")}}function Iu(r,D){1&r&&(A.TgZ(0,"th",47),A._uU(1,"Address"),A.qZA())}function mu(r,D){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.address," ")}}function vu(r,D){1&r&&(A.TgZ(0,"th",47),A._uU(1,"Port"),A.qZA())}function Du(r,D){if(1&r&&(A.TgZ(0,"td",48),A._uU(1),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.hij(" ",null==t?null:t.port," ")}}function yu(r,D){1&r&&A._UZ(0,"tr",49)}function xu(r,D){1&r&&A._UZ(0,"tr",50)}function Fu(r,D){if(1&r&&(A.TgZ(0,"mat-expansion-panel",29)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),A._uU(4,"Node: \xa0"),A.qZA(),A.TgZ(5,"strong",30),A._uU(6),A.qZA()()(),A.TgZ(7,"div",7)(8,"div",0)(9,"div",1)(10,"h4",31),A._uU(11,"Pubkey"),A.qZA(),A.TgZ(12,"span",32),A._uU(13),A.qZA()()(),A._UZ(14,"mat-divider",33),A.TgZ(15,"div",0)(16,"div",1)(17,"h4",31),A._uU(18,"Last Timestamp"),A.qZA(),A.TgZ(19,"span",34),A._uU(20),A.ALo(21,"date"),A.qZA()()(),A._UZ(22,"mat-divider",33),A.TgZ(23,"div",35)(24,"h4",36),A._uU(25,"Addresses"),A.qZA(),A.TgZ(26,"div",37)(27,"table",38,39),A.ynx(29,40),A.YNc(30,Mu,2,0,"th",41),A.YNc(31,pu,2,1,"td",42),A.BQk(),A.ynx(32,43),A.YNc(33,Iu,2,0,"th",41),A.YNc(34,mu,2,1,"td",42),A.BQk(),A.ynx(35,44),A.YNc(36,vu,2,0,"th",41),A.YNc(37,Du,2,1,"td",42),A.BQk(),A.YNc(38,yu,1,0,"tr",45),A.YNc(39,xu,1,0,"tr",46),A.qZA()()()()()),2&r){const t=A.oxw(2);A.xp6(6),A.Oqu((null==t.node?null:t.node.alias)||(null==t.node?null:t.node.nodeid)),A.xp6(7),A.Oqu(t.node.nodeid),A.xp6(7),A.Oqu(A.xi3(21,6,1e3*t.node.last_timestamp,"dd/MMM/y HH:mm")),A.xp6(7),A.Q6J("dataSource",t.node.addresses),A.xp6(11),A.Q6J("matHeaderRowDef",t.displayedColumns),A.xp6(1),A.Q6J("matRowDefColumns",t.displayedColumns)}}function Yu(r,D){if(1&r&&A.YNc(0,Fu,40,9,"mat-expansion-panel",28),2&r){const t=A.oxw();A.Q6J("ngIf",t.node)}}let Tu=(()=>{class r{constructor(t,s,L,dA){this.dialogRef=t,this.data=s,this.actions=L,this.store=dA,this.faExclamationTriangle=h.eHv,this.totalBalance=0,this.node={},this.requestedAmount=0,this.feeRate=0,this.localAmount=0,this.channelConnectionError="",this.displayedColumns=["type","address","port"],this.unSubs=[new c.x,new c.x]}ngOnInit(){var t,s,L,dA,ot;this.alertTitle=this.data.alertTitle||"",this.totalBalance=(null===(t=this.data.message)||void 0===t?void 0:t.balance)||0,this.node=(null===(s=this.data.message)||void 0===s?void 0:s.node)||{},this.requestedAmount=(null===(L=this.data.message)||void 0===L?void 0:L.requestedAmount)||0,this.feeRate=(null===(dA=this.data.message)||void 0===dA?void 0:dA.feeRate)||0,this.localAmount=(null===(ot=this.data.message)||void 0===ot?void 0:ot.localAmount)||0,this.actions.pipe((0,i.R)(this.unSubs[0]),(0,JA.h)(Ae=>Ae.type===a.AB.UPDATE_API_CALL_STATUS_CLN||Ae.type===a.AB.FETCH_CHANNELS_CLN)).subscribe(Ae=>{Ae.type===a.AB.UPDATE_API_CALL_STATUS_CLN&&Ae.payload.status===a.Bn.ERROR&&"SaveNewChannel"===Ae.payload.action&&(this.channelConnectionError=Ae.payload.message),Ae.type===a.AB.FETCH_CHANNELS_CLN&&this.dialogRef.close()})}onClose(){this.dialogRef.close(!1)}resetData(){var t,s,L;this.form.resetForm(),this.form.controls.ramount.setValue(null===(t=this.data.message)||void 0===t?void 0:t.requestedAmount),this.form.controls.feerate.setValue(null===(s=this.data.message)||void 0===s?void 0:s.feeRate),this.form.controls.lamount.setValue(null===(L=this.data.message)||void 0===L?void 0:L.localAmount),this.calculateFee(),this.channelConnectionError=""}calculateFee(){var t,s,L;this.node.channelOpeningFee=+((null===(t=this.node.option_will_fund)||void 0===t?void 0:t.lease_fee_base_msat)||0)/1e3+this.requestedAmount*+((null===(s=this.node.option_will_fund)||void 0===s?void 0:s.lease_fee_basis)||0)/1e4+ +((null===(L=this.node.option_will_fund)||void 0===L?void 0:L.funding_weight)||0)/4*this.feeRate}onOpenChannel(){if(!this.node||!this.node.option_will_fund||!this.requestedAmount||!this.feeRate||!this.localAmount||this.localAmount<2e4)return!0;const t={peerId:this.node.nodeid||"",satoshis:this.localAmount.toString(),feeRate:this.feeRate+"perkb",requestAmount:this.requestedAmount.toString(),compactLease:this.node.option_will_fund.compact_lease};this.store.dispatch((0,ht.YX)({payload:t}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(Mt.so),A.Y36(Mt.WI),A.Y36(Yt.eX),A.Y36(u.yh))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-open-liquidity-channel"]],viewQuery:function(t,s){if(1&t&&A.Gf(Bu,7),2&t){let L;A.iGM(L=A.CRH())&&(s.form=L.first)}},decls:48,vars:24,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","6","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["form","ngForm"],[4,"ngTemplateOutlet"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayoutAlign.gt-sm","space-between center","fxLayout.gt-sm","row wrap"],["fxFlex","30","fxLayoutAlign","start end"],["autoFocus","","matInput","","placeholder","Requested Amount","type","number","tabindex","1","required","","name","ramount",3,"ngModel","step","min","ngModelChange","keyup"],["ramount","ngModel"],["matSuffix",""],[4,"ngIf"],["matInput","","placeholder","Fee Rate","type","number","tabindex","2","required","","name","feerate",3,"ngModel","step","min","ngModelChange","keyup"],["feeRt","ngModel"],["matInput","","placeholder","Local Amount","type","number","tabindex","3","required","","name","lamount",3,"ngModel","step","min","max","ngModelChange"],["lamount","ngModel"],["fxFlex","100",1,"alert","alert-info","mt-4"],["fxFlex","100","class","alert alert-danger mt-2",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","4",1,"mr-1",3,"click"],["autoFocus","","mat-button","","color","primary","tabindex","5",3,"click"],["nodeDetailsExpansionBlock",""],["fxFlex","100",1,"alert","alert-danger","mt-2"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel mt-1 mb-2","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","mt-1","mb-2"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],[1,"overflow-wrap","foreground-secondary-text"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxFlex","100",1,"font-bold-500","mb-1"],[1,"table-container"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","type"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","port"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-row",""],["mat-row",""]],template:function(t,s){if(1&t&&(A.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),A._uU(5),A.qZA()(),A.TgZ(6,"button",5),A.NdJ("click",function(){return s.onClose()}),A._uU(7,"X"),A.qZA()(),A.TgZ(8,"mat-card-content",6)(9,"form",7,8),A.YNc(11,uu,1,0,"ng-container",9),A.TgZ(12,"div",10)(13,"mat-form-field",11)(14,"input",12,13),A.NdJ("ngModelChange",function(dA){return s.requestedAmount=dA})("keyup",function(){return s.calculateFee()}),A.qZA(),A.TgZ(16,"span",14),A._uU(17," Sats "),A.qZA(),A.YNc(18,fu,2,0,"mat-error",15),A.qZA(),A.TgZ(19,"mat-form-field",11)(20,"input",16,17),A.NdJ("ngModelChange",function(dA){return s.feeRate=dA})("keyup",function(){return s.calculateFee()}),A.qZA(),A.TgZ(22,"span",14),A._uU(23," Sats/vByte "),A.qZA(),A.YNc(24,hu,2,0,"mat-error",15),A.qZA(),A.TgZ(25,"mat-form-field",11)(26,"input",18,19),A.NdJ("ngModelChange",function(dA){return s.localAmount=dA}),A.qZA(),A.TgZ(28,"mat-hint"),A._uU(29),A.ALo(30,"number"),A.qZA(),A.TgZ(31,"span",14),A._uU(32," Sats "),A.qZA(),A.YNc(33,Eu,2,0,"mat-error",15),A.YNc(34,wu,2,0,"mat-error",15),A.YNc(35,Cu,2,1,"mat-error",15),A.qZA()(),A.TgZ(36,"div",20)(37,"span"),A._uU(38),A.ALo(39,"number"),A.qZA()(),A.YNc(40,du,3,2,"div",21),A.TgZ(41,"div",22)(42,"button",23),A.NdJ("click",function(){return s.resetData()}),A._uU(43,"Clear"),A.qZA(),A.TgZ(44,"button",24),A.NdJ("click",function(){return s.onOpenChannel()}),A._uU(45,"Execute"),A.qZA()()()()()(),A.YNc(46,Yu,1,1,"ng-template",null,25,A.W1O)),2&t){const L=A.MAs(15),dA=A.MAs(21),ot=A.MAs(27),Ae=A.MAs(47);A.xp6(5),A.Oqu(s.alertTitle),A.xp6(6),A.Q6J("ngTemplateOutlet",Ae),A.xp6(3),A.Q6J("ngModel",s.requestedAmount)("step",1e4)("min",0),A.xp6(4),A.Q6J("ngIf",null==L.errors?null:L.errors.required),A.xp6(2),A.Q6J("ngModel",s.feeRate)("step",10)("min",0),A.xp6(4),A.Q6J("ngIf",null==dA.errors?null:dA.errors.required),A.xp6(2),A.Q6J("ngModel",s.localAmount)("step",1e4)("min",2e4)("max",s.totalBalance),A.xp6(3),A.hij("Remaining Bal: ",A.lcZ(30,20,s.totalBalance-(s.localAmount?s.localAmount:0)),""),A.xp6(4),A.Q6J("ngIf",null==ot.errors?null:ot.errors.required),A.xp6(1),A.Q6J("ngIf",null==ot.errors?null:ot.errors.min),A.xp6(1),A.Q6J("ngIf",null==ot.errors?null:ot.errors.max),A.xp6(3),A.hij("Total cost to lease ",A.lcZ(39,22,s.node.channelOpeningFee)," (Sats)"),A.xp6(2),A.Q6J("ngIf",""!==s.channelConnectionError)}},directives:[Ct.xw,Ct.yH,g.dk,Ct.Wh,w.lW,g.dn,OA._Y,OA.JL,OA.F,Et.tP,U.KE,H.Nt,OA.wV,OA.qQ,OA.Fj,b.q,k.h,OA.Q7,OA.JJ,OA.On,U.R9,Et.O5,U.TO,OA.Fd,yi.F,U.bx,e.BN,or.ib,or.yz,or.yK,sA.d,xA.BZ,rt.YE,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,xA.as,xA.XQ,xA.nj,xA.Gk],pipes:[Et.JJ,Et.uU],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),r})();function Su(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Channel amount is required."),A.qZA())}function Nu(r,D){1&r&&(A.TgZ(0,"mat-error"),A._uU(1,"Channel opening fee rate is required."),A.qZA())}function Uu(r,D){1&r&&A._UZ(0,"mat-progress-bar",40)}function Pu(r,D){1&r&&(A.TgZ(0,"th",41),A._uU(1," Alias "),A.qZA())}function Ru(r,D){1&r&&A._UZ(0,"span",44)}const zu=function(r){return{"max-width":r}};function Lu(r,D){if(1&r&&(A.TgZ(0,"td",42),A._uU(1),A.YNc(2,Ru,1,0,"span",43),A.qZA()),2&r){const t=D.$implicit,s=A.oxw();A.Q6J("ngStyle",A.VKq(3,zu,s.screenSize===s.screenSizeEnum.XS?"10rem":"40rem")),A.xp6(1),A.hij(" ",null==t?null:t.alias,""),A.xp6(1),A.Q6J("ngIf",t.tor_node)}}function bu(r,D){1&r&&(A.TgZ(0,"th",45),A._uU(1," Capacity/Channels "),A.qZA())}function Gu(r,D){if(1&r&&(A.TgZ(0,"td",46),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.AsE(" ",A.xi3(2,2,(null==t?null:t.nodeCapacity)/1e8,"1.0-2")," BTC / ",A.xi3(3,5,null==t?null:t.channelCount,"1.0-0")," ")}}function Hu(r,D){1&r&&(A.TgZ(0,"th",45),A._uU(1," Lease Fee "),A.qZA())}function Ju(r,D){if(1&r&&(A.TgZ(0,"td",46),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.AsE(" ",A.xi3(2,2,(null==t||null==t.option_will_fund?null:t.option_will_fund.lease_fee_base_msat)/1e3,"1.0-0")," Sats + ",A.xi3(3,5,(null==t||null==t.option_will_fund?null:t.option_will_fund.lease_fee_basis)/100,"1.2-2"),"% ")}}function Ou(r,D){1&r&&(A.TgZ(0,"th",45),A._uU(1," Routing Fee "),A.qZA())}function ku(r,D){if(1&r&&(A.TgZ(0,"td",46),A._uU(1),A.ALo(2,"number"),A.ALo(3,"number"),A.qZA()),2&r){const t=D.$implicit;A.xp6(1),A.AsE(" ",A.xi3(2,2,(null==t||null==t.option_will_fund?null:t.option_will_fund.channel_fee_max_base_msat)/1e3,"1.0-0")," Sats + ",A.xi3(3,5,1e3*(null==t||null==t.option_will_fund?null:t.option_will_fund.channel_fee_max_proportional_thousandths),"1.0-0")," ppm ")}}function ju(r,D){1&r&&(A.TgZ(0,"th",47),A._uU(1," Channel Opening Fee "),A.qZA())}function Ku(r,D){if(1&r&&(A.TgZ(0,"td",46)(1,"span",48),A._uU(2),A.ALo(3,"number"),A.qZA()()),2&r){const t=D.$implicit;A.xp6(2),A.hij(" ",A.xi3(3,1,t.channelOpeningFee,"1.0-0")," Sats ")}}function Vu(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"th",49)(1,"div",50)(2,"mat-select",51),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",52),A.NdJ("click",function(){return A.CHM(t),A.oxw().onDownloadCSV()}),A._uU(5,"Download CSV"),A.qZA()()()()}}function Wu(r,D){if(1&r){const t=A.EpF();A.TgZ(0,"td",53)(1,"div",54)(2,"mat-select",51),A._UZ(3,"mat-select-trigger"),A.TgZ(4,"mat-option",52),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onViewLeaseInfo(dA)}),A._uU(5,"View Info"),A.qZA(),A.TgZ(6,"mat-option",52),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().onOpenChannel(dA)}),A._uU(7,"Open Channel"),A.qZA(),A.TgZ(8,"mat-option",52),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().viewLeaseOn(dA,"LN")}),A._uU(9,"View on Lnrouter"),A.qZA(),A.TgZ(10,"mat-option",52),A.NdJ("click",function(){const dA=A.CHM(t).$implicit;return A.oxw().viewLeaseOn(dA,"AM")}),A._uU(11,"View on Amboss"),A.qZA()()()()}}function Zu(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"No node with liquidity."),A.qZA())}function Xu(r,D){1&r&&(A.TgZ(0,"p"),A._uU(1,"Getting nodes with liquidity..."),A.qZA())}function qu(r,D){if(1&r&&(A.TgZ(0,"p"),A._uU(1),A.qZA()),2&r){const t=A.oxw(2);A.xp6(1),A.Oqu(t.errorMessage)}}function _u(r,D){if(1&r&&(A.TgZ(0,"td",55),A.YNc(1,Zu,2,0,"p",15),A.YNc(2,Xu,2,0,"p",15),A.YNc(3,qu,2,1,"p",15),A.qZA()),2&r){const t=A.oxw();A.xp6(1),A.Q6J("ngIf",(!(null!=t.liquidityNodes&&t.liquidityNodes.data)||(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.liquidityNodes&&t.liquidityNodes.data)||(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("ngIf",(!(null!=t.liquidityNodes&&t.liquidityNodes.data)||(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const $u=function(r){return{"display-none":r}};function Af(r,D){if(1&r&&A._UZ(0,"tr",56),2&r){const t=A.oxw();A.Q6J("ngClass",A.VKq(1,$u,(null==t.liquidityNodes?null:t.liquidityNodes.data)&&(null==t.liquidityNodes||null==t.liquidityNodes.data?null:t.liquidityNodes.data.length)>0))}}function tf(r,D){1&r&&A._UZ(0,"tr",57)}function ef(r,D){1&r&&A._UZ(0,"tr",58)}const nf=function(r){return{"overflow-auto error-border":r,"overflow-auto":!0}},rf=function(){return["no_lqNode"]},sf=qt.Bz.forChild([{path:"",component:n,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:Fo,canActivate:[ze.eQ]},{path:"onchain",component:fs,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"receive/utxos"},{path:"receive/:selTab",component:t0,canActivate:[ze.eQ]},{path:"send/:selTab",component:Wr,data:{sweepAll:!1},canActivate:[ze.eQ]},{path:"sweep/:selTab",component:Wr,data:{sweepAll:!0},canActivate:[ze.eQ]}]},{path:"connections",component:Ia,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:Xr,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:qr,canActivate:[ze.eQ]},{path:"pending",component:fl,canActivate:[ze.eQ]}]},{path:"peers",component:R,data:{sweepAll:!1},canActivate:[ze.eQ]}]},{path:"liquidityads",component:(()=>{class r{constructor(t,s,L,dA,ot){this.logger=t,this.store=s,this.dataService=L,this.commonService=dA,this.rtlEffects=ot,this.askTooltipMsg="",this.nodesTooltipMsg="",this.displayedColumns=[],this.faBullhorn=h.Acd,this.faExclamationTriangle=h.eHv,this.totalBalance=0,this.channelAmount=1e5,this.channelOpeningFeeRate=10,this.nodeCapacity=5e5,this.channelCount=5,this.liquidityNodesData=[],this.flgSticky=!1,this.pageSize=a.IV,this.pageSizeOptions=a.TJ,this.screenSize="",this.screenSizeEnum=a.cu,this.errorMessage="",this.apiCallStatus={status:a.Bn.INITIATED},this.apiCallStatusEnum=a.Bn,this.unSubs=[new c.x,new c.x,new c.x,new c.x],this.askTooltipMsg="Specify the liquidity requirements for your node: \n 1. Channel Amount - Amount in Sats you need for the channel opened to your node \n 2. Channel opening fee rate - Rate in Sats/vByte that you are willing to pay to open the channel to you",this.nodesTooltipMsg="These nodes are advertising their liquidity offering on the network.\nYou should pay attention to the following aspects to evaluate each node offer: \n- The total bitcoin deployed on the node, the more the better\n",this.nodesTooltipMsg=this.nodesTooltipMsg+"- The number of channels open on the node, the more the better\n- The channel open fee which the node will charge from you\n- The routing fee which the node will charge on the payments, the lesser the better\n- The reliability of the node, ideally uptime. Refer to the information being provided by the node explorers",this.screenSize=this.commonService.getScreenSize(),this.screenSize===a.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","channelOpeningFee","actions"]):this.screenSize===a.cu.SM||this.screenSize===a.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","leaseFee","routingFee","channelOpeningFee","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","leaseFee","routingFee","channelOpeningFee","actions"])}ngOnInit(){(0,Ba.a)([this.store.select(B.OL),this.dataService.listNetworkNodes("?liquidity_ads=yes")]).pipe((0,i.R)(this.unSubs[0])).subscribe({next:([t,s])=>{this.information=t.information,this.totalBalance=t.balance.totalBalance,this.logger.info(t),s&&!s.length&&(s=[]),this.logger.info("Received Liquidity Ads Enabled Nodes: "+JSON.stringify(s)),this.apiCallStatus.status=a.Bn.COMPLETED,this.liquidityNodesData=s.filter(L=>(L.tor_node=!!L.addresses&&L.addresses.filter(dA=>{var ot;return null===(ot=null==dA?void 0:dA.type)||void 0===ot?void 0:ot.includes("tor")}).length>0,L.nodeid!==this.information.id)),this.onCalculateOpeningFee(),this.loadLiqNodesTable(this.liquidityNodesData)},error:t=>{this.logger.error("Liquidity Ads Nodes Error: "+JSON.stringify(t)),this.apiCallStatus.status=a.Bn.ERROR,this.errorMessage=JSON.stringify(t)}})}onCalculateOpeningFee(){this.liquidityNodesData.forEach(t=>{t.option_will_fund&&(t.channelOpeningFee=+t.option_will_fund.lease_fee_base_msat/1e3+this.channelAmount*+t.option_will_fund.lease_fee_basis/1e4+ +t.option_will_fund.funding_weight/4*this.channelOpeningFeeRate)}),this.paginator&&this.paginator.firstPage()}onFilter(){}loadLiqNodesTable(t){this.liquidityNodes=new xA.by([...t]),this.liquidityNodes.sortingDataAccessor=(s,L)=>s[L]&&isNaN(s[L])?s[L].toLocaleLowerCase():s[L]?+s[L]:null,this.liquidityNodes.sort=this.sort,this.liquidityNodes.paginator=this.paginator,this.sort&&this.sort.sort({id:"channelOpeningFee",start:"asc",disableClear:!0}),this.liquidityNodes.filterPredicate=(s,L)=>s.channelCount>=this.channelCount&&s.nodeCapacity>=this.nodeCapacity,this.onFilter()}viewLeaseOn(t,s){"LN"===s?window.open("https://lnrouter.app/node/"+t.nodeid,"_blank"):"AM"===s&&window.open("https://amboss.space/node/"+t.nodeid,"_blank")}onOpenChannel(t){this.store.dispatch((0,KA.qR)({payload:{data:{alertTitle:"Open Channel",message:{node:t,balance:this.totalBalance,requestedAmount:this.channelAmount,feeRate:this.channelOpeningFeeRate,localAmount:2e4},component:Tu}}}))}onViewLeaseInfo(t){const s=t.addresses.reduce((dA,ot)=>(ot.address.length>40&&(ot.address=ot.address.substring(0,39)+"..."),dA.concat(JSON.stringify(ot).replace("{","").replace("}","").replace(/:/g,": ").replace(/,/g,"        ").replace(/"/g,""))),[]);this.store.dispatch((0,KA.c1)({payload:{data:{type:a.n_.CONFIRM,alertTitle:"Lease Information",noBtnText:"Close",yesBtnText:"Open Channel",message:[[{key:"alias",value:t.alias,title:"Node Alias",width:50,type:a.Gi.STRING},{key:"last_timestamp",value:t.last_timestamp,title:"Last Timestamp",width:50,type:a.Gi.DATE_TIME}],[{key:"nodeid",value:t.nodeid,title:"Node ID",width:100,type:a.Gi.STRING}],[{key:"base_fee",value:t.option_will_fund.lease_fee_base_msat/1e3,title:"Lease Base Fee (Sats)",width:50,type:a.Gi.NUMBER},{key:"fee_basis",value:t.option_will_fund.lease_fee_basis,title:"Lease Base Basis (bps)",width:50,type:a.Gi.NUMBER}],[{key:"channel_max_base",value:t.option_will_fund.channel_fee_max_base_msat/1e3,title:"Max Channel Routing Base Fee (Sats)",width:50,type:a.Gi.NUMBER},{key:"channel_max_rate",value:1e3*t.option_will_fund.channel_fee_max_proportional_thousandths,title:"Max Channel Routing Fee Rate (ppm)",width:50,type:a.Gi.NUMBER}],[{key:"funding_rate",value:t.option_will_fund.funding_weight,title:"Funding Weight",width:100,type:a.Gi.NUMBER}],[{key:"address",value:s,title:"Address",width:100,type:a.Gi.ARRAY}]]}}})),this.rtlEffects.closeConfirm.pipe((0,i.R)(this.unSubs[1])).subscribe(dA=>{dA&&this.onOpenChannel(t)})}onDownloadCSV(){this.liquidityNodes.data&&this.liquidityNodes.data.length>0&&this.commonService.downloadFile(this.liquidityNodes.data,"LiquidityNodes")}onFilterReset(){this.nodeCapacity=0,this.channelCount=0}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return r.\u0275fac=function(t){return new(t||r)(A.Y36(E.mQ),A.Y36(u.yh),A.Y36(zA.D),A.Y36(C.v),A.Y36(DA.V))},r.\u0275cmp=A.Xpm({type:r,selectors:[["rtl-cln-liquidity-ads-list"]],viewQuery:function(t,s){if(1&t&&(A.Gf(rt.YE,5),A.Gf(WA.NW,5)),2&t){let L;A.iGM(L=A.CRH())&&(s.sort=L.first),A.iGM(L=A.CRH())&&(s.paginator=L.first)}},features:[A._Bn([{provide:WA.ye,useValue:(0,a.pt)("Liquidity Ads")}])],decls:54,vars:20,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"],[1,"padding-gap-large"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["formAsk","ngForm"],["fxFlex","100","fxLayout","row",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start start",1,"page-sub-title-container","mt-1"],["fxFlex","30"],["matTooltipPosition","above","matTooltipClass","pre-wrap",1,"info-icon","info-icon-primary",3,"matTooltip"],["fxFlex","34"],["autoFocus","","matInput","","placeholder","Channel Amount (Sats)","name","channelAmount","tabindex","1","type","number","step","10000","required","",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Channel Opening Fee Rate (Sats/vByte)","name","channelOpeningFeeRate","type","number","step","10","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container","mt-2",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","capacityChannels"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","leaseFee"],["matColumnDef","routingFee"],["matColumnDef","channelOpeningFee"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_lqNode"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["matBadge","Tor Node","matBadgeOverlap","false","class","tab-badge",4,"ngIf"],["matBadge","Tor Node","matBadgeOverlap","false",1,"tab-badge"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,s){1&t&&(A.TgZ(0,"div",0),A._UZ(1,"fa-icon",1),A.TgZ(2,"span",2),A._uU(3,"Liquidity Ads"),A.qZA()(),A.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"div",5)(8,"form",6,7)(10,"div",8),A._UZ(11,"fa-icon",9),A.TgZ(12,"span"),A._uU(13,"Ads should be suplemented with additional research of the nodes, before buying liquidity."),A.qZA()(),A.TgZ(14,"div",10)(15,"div",11)(16,"span",2),A._uU(17," Liquidity Ask "),A.TgZ(18,"mat-icon",12),A._uU(19,"info_outline"),A.qZA()()(),A.TgZ(20,"mat-form-field",13)(21,"input",14),A.NdJ("ngModelChange",function(dA){return s.channelAmount=dA})("keyup",function(){return s.onCalculateOpeningFee()}),A.qZA(),A.YNc(22,Su,2,0,"mat-error",15),A.qZA(),A.TgZ(23,"mat-form-field",13)(24,"input",16),A.NdJ("ngModelChange",function(dA){return s.channelOpeningFeeRate=dA})("keyup",function(){return s.onCalculateOpeningFee()}),A.qZA(),A.YNc(25,Nu,2,0,"mat-error",15),A.qZA()()(),A.TgZ(26,"div",17),A.YNc(27,Uu,1,0,"mat-progress-bar",18),A.TgZ(28,"table",19,20),A.ynx(30,21),A.YNc(31,Pu,2,0,"th",22),A.YNc(32,Lu,3,5,"td",23),A.BQk(),A.ynx(33,24),A.YNc(34,bu,2,0,"th",25),A.YNc(35,Gu,4,8,"td",26),A.BQk(),A.ynx(36,27),A.YNc(37,Hu,2,0,"th",25),A.YNc(38,Ju,4,8,"td",26),A.BQk(),A.ynx(39,28),A.YNc(40,Ou,2,0,"th",25),A.YNc(41,ku,4,8,"td",26),A.BQk(),A.ynx(42,29),A.YNc(43,ju,2,0,"th",30),A.YNc(44,Ku,4,4,"td",26),A.BQk(),A.ynx(45,31),A.YNc(46,Vu,6,0,"th",32),A.YNc(47,Wu,12,0,"td",33),A.BQk(),A.ynx(48,34),A.YNc(49,_u,4,3,"td",35),A.BQk(),A.YNc(50,Af,1,3,"tr",36),A.YNc(51,tf,1,0,"tr",37),A.YNc(52,ef,1,0,"tr",38),A.qZA()(),A._UZ(53,"mat-paginator",39),A.qZA()()()()),2&t&&(A.xp6(1),A.Q6J("icon",s.faBullhorn),A.xp6(10),A.Q6J("icon",s.faExclamationTriangle),A.xp6(7),A.Q6J("matTooltip",s.askTooltipMsg),A.xp6(3),A.Q6J("ngModel",s.channelAmount),A.xp6(1),A.Q6J("ngIf",!s.channelAmount),A.xp6(2),A.Q6J("ngModel",s.channelOpeningFeeRate),A.xp6(1),A.Q6J("ngIf",!s.channelOpeningFeeRate),A.xp6(2),A.Q6J("ngIf",s.apiCallStatus.status===s.apiCallStatusEnum.INITIATED),A.xp6(1),A.Q6J("dataSource",s.liquidityNodes)("ngClass",A.VKq(17,nf,""!==s.errorMessage)),A.xp6(22),A.Q6J("matFooterRowDef",A.DdM(19,rf)),A.xp6(1),A.Q6J("matHeaderRowDef",s.displayedColumns)("matHeaderRowDefSticky",s.flgSticky),A.xp6(1),A.Q6J("matRowDefColumns",s.displayedColumns),A.xp6(1),A.Q6J("pageSize",s.pageSize)("pageSizeOptions",s.pageSizeOptions)("showFirstLastButtons",s.screenSize!==s.screenSizeEnum.XS))},directives:[Ct.xw,Ct.Wh,e.BN,g.a8,g.dn,Ct.yH,OA._Y,OA.JL,OA.F,p.Hw,eA.gM,U.KE,H.Nt,OA.wV,OA.Fj,k.h,OA.Q7,OA.JJ,OA.On,Et.O5,U.TO,q.$V,T.pW,xA.BZ,rt.YE,Et.mk,Y.oO,xA.w1,xA.fO,xA.ge,rt.nU,xA.Dz,xA.ev,Et.PC,Y.Zl,ui.k,CA.gD,CA.$L,wA.ey,xA.mD,xA.yh,xA.Ke,xA.Q2,xA.as,xA.XQ,xA.nj,xA.Gk,WA.NW],pipes:[Et.JJ],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),r})(),canActivate:[ze.eQ]},{path:"transactions",component:Cs,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:aa,canActivate:[ze.eQ]},{path:"invoices",component:UA,canActivate:[ze.eQ]},{path:"offers",component:wB,canActivate:[ze.eQ]},{path:"offrBookmarks",component:GB,canActivate:[ze.eQ]}]},{path:"messages",component:Ki,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"sign"},{path:"sign",component:he,canActivate:[ze.eQ]},{path:"verify",component:Hn,canActivate:[ze.eQ]}]},{path:"routing",component:ds,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:na,canActivate:[ze.eQ]},{path:"failedtransactions",component:vc,canActivate:[ze.eQ]},{path:"localfail",component:gu,canActivate:[ze.eQ]},{path:"routingpeers",component:Cg,canActivate:[ze.eQ]}]},{path:"reports",component:dg,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"routingreport"},{path:"routingreport",component:xg,canActivate:[ze.eQ]},{path:"transactions",component:zg,canActivate:[ze.eQ]}]},{path:"graph",component:Gg,canActivate:[ze.eQ],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:bs,canActivate:[ze.eQ]},{path:"queryroutes",component:We,canActivate:[ze.eQ]}]},{path:"rates",component:A0,canActivate:[ze.eQ]},{path:"**",component:Lg.w},{path:"network",redirectTo:"rates"},{path:"wallet",redirectTo:"home"},{path:"backup",redirectTo:"home"}]}]);var lf=Nt(8750);let cf=(()=>{class r{}return r.\u0275fac=function(t){return new(t||r)},r.\u0275mod=A.oAB({type:r,bootstrap:[n]}),r.\u0275inj=A.cJS({providers:[ze.eQ],imports:[[Et.ez,lf.m,sf]]}),r})()},4641:function(oi,Fr,Nt){var Et=Nt(7757);"undefined"!=typeof self&&self,oi.exports=function(){var qt={9282:function(T,I,n){"use strict";var c=n(4155);function i($){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(hA){return typeof hA}:function(hA){return hA&&"function"==typeof Symbol&&hA.constructor===Symbol&&hA!==Symbol.prototype?"symbol":typeof hA})($)}var m,v,h=n(2136).codes,a=h.ERR_AMBIGUOUS_ARGUMENT,B=h.ERR_INVALID_ARG_TYPE,E=h.ERR_INVALID_ARG_VALUE,u=h.ERR_INVALID_RETURN_VALUE,C=h.ERR_MISSING_ARGS,e=n(5961),g=n(9539).inspect,w=n(9539).types,Q=w.isPromise,p=w.isRegExp,Y=Object.assign?Object.assign:n(8091).assign,y=Object.is?Object.is:n(609);function z(){var $=n(9158);m=$.isDeepEqual,v=$.isDeepStrictEqual}var q=!1,BA=T.exports=yA,pA={};function lA($){throw $.message instanceof Error?$.message:new e($)}function gA($,W,hA,vA){if(!hA){var nA=!1;if(0===W)nA=!0,vA="No value argument passed to `assert.ok()`";else if(vA instanceof Error)throw vA;var EA=new e({actual:hA,expected:!0,message:vA,operator:"==",stackStartFn:$});throw EA.generatedMessage=nA,EA}}function yA(){for(var $=arguments.length,W=new Array($),hA=0;hA<$;hA++)W[hA]=arguments[hA];gA.apply(void 0,[yA,W.length].concat(W))}BA.fail=function cA($,W,hA,vA,nA){var GA,EA=arguments.length;if(0===EA?GA="Failed":1===EA?(hA=$,$=void 0):(!1===q&&(q=!0,(c.emitWarning?c.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")),2===EA&&(vA="!=")),hA instanceof Error)throw hA;var st={actual:$,expected:W,operator:void 0===vA?"fail":vA,stackStartFn:nA||cA};void 0!==hA&&(st.message=hA);var TA=new e(st);throw GA&&(TA.message=GA,TA.generatedMessage=!0),TA},BA.AssertionError=e,BA.ok=yA,BA.equal=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");W!=hA&&lA({actual:W,expected:hA,message:vA,operator:"==",stackStartFn:$})},BA.notEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");W==hA&&lA({actual:W,expected:hA,message:vA,operator:"!=",stackStartFn:$})},BA.deepEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");void 0===m&&z(),m(W,hA)||lA({actual:W,expected:hA,message:vA,operator:"deepEqual",stackStartFn:$})},BA.notDeepEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");void 0===m&&z(),m(W,hA)&&lA({actual:W,expected:hA,message:vA,operator:"notDeepEqual",stackStartFn:$})},BA.deepStrictEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");void 0===m&&z(),v(W,hA)||lA({actual:W,expected:hA,message:vA,operator:"deepStrictEqual",stackStartFn:$})},BA.notDeepStrictEqual=function FA($,W,hA){if(arguments.length<2)throw new C("actual","expected");void 0===m&&z(),v($,W)&&lA({actual:$,expected:W,message:hA,operator:"notDeepStrictEqual",stackStartFn:FA})},BA.strictEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");y(W,hA)||lA({actual:W,expected:hA,message:vA,operator:"strictEqual",stackStartFn:$})},BA.notStrictEqual=function $(W,hA,vA){if(arguments.length<2)throw new C("actual","expected");y(W,hA)&&lA({actual:W,expected:hA,message:vA,operator:"notStrictEqual",stackStartFn:$})};var _=function $(W,hA,vA){var nA=this;(function o($,W){if(!($ instanceof W))throw new TypeError("Cannot call a class as a function")})(this,$),hA.forEach(function(EA){EA in W&&(nA[EA]=void 0!==vA&&"string"==typeof vA[EA]&&p(W[EA])&&W[EA].test(vA[EA])?vA[EA]:W[EA])})};function MA($,W,hA,vA,nA,EA){if(!(hA in $)||!v($[hA],W[hA])){if(!vA){var GA=new _($,nA),et=new _(W,nA,$),st=new e({actual:GA,expected:et,operator:"deepStrictEqual",stackStartFn:EA});throw st.actual=$,st.expected=W,st.operator=EA.name,st}lA({actual:$,expected:W,message:vA,operator:EA.name,stackStartFn:EA})}}function uA($,W,hA,vA){if("function"!=typeof W){if(p(W))return W.test($);if(2===arguments.length)throw new B("expected",["Function","RegExp"],W);if("object"!==i($)||null===$){var nA=new e({actual:$,expected:W,message:hA,operator:"deepStrictEqual",stackStartFn:vA});throw nA.operator=vA.name,nA}var EA=Object.keys(W);if(W instanceof Error)EA.push("name","message");else if(0===EA.length)throw new E("error",W,"may not be an empty object");return void 0===m&&z(),EA.forEach(function(GA){"string"==typeof $[GA]&&p(W[GA])&&W[GA].test($[GA])||MA($,W,GA,hA,EA,vA)}),!0}return void 0!==W.prototype&&$ instanceof W||!Error.isPrototypeOf(W)&&!0===W.call({},$)}function QA($){if("function"!=typeof $)throw new B("fn","Function",$);try{$()}catch(W){return W}return pA}function SA($){return Q($)||null!==$&&"object"===i($)&&"function"==typeof $.then&&"function"==typeof $.catch}function bA($){return Promise.resolve().then(function(){var W;if("function"==typeof $){if(!SA(W=$()))throw new u("instance of Promise","promiseFn",W)}else{if(!SA($))throw new B("promiseFn",["Function","Promise"],$);W=$}return Promise.resolve().then(function(){return W}).then(function(){return pA}).catch(function(hA){return hA})})}function XA($,W,hA,vA){if("string"==typeof hA){if(4===arguments.length)throw new B("error",["Object","Error","Function","RegExp"],hA);if("object"===i(W)&&null!==W){if(W.message===hA)throw new a("error/message",'The error message "'.concat(W.message,'" is identical to the message.'))}else if(W===hA)throw new a("error/message",'The error "'.concat(W,'" is identical to the message.'));vA=hA,hA=void 0}else if(null!=hA&&"object"!==i(hA)&&"function"!=typeof hA)throw new B("error",["Object","Error","Function","RegExp"],hA);if(W===pA){var nA="";hA&&hA.name&&(nA+=" (".concat(hA.name,")")),nA+=vA?": ".concat(vA):".",lA({actual:void 0,expected:hA,operator:$.name,message:"Missing expected ".concat("rejects"===$.name?"rejection":"exception").concat(nA),stackStartFn:$})}if(hA&&!uA(W,hA,vA,$))throw W}function X($,W,hA,vA){if(W!==pA){if("string"==typeof hA&&(vA=hA,hA=void 0),!hA||uA(W,hA)){var nA=vA?": ".concat(vA):".";lA({actual:W,expected:hA,operator:$.name,message:"Got unwanted ".concat("doesNotReject"===$.name?"rejection":"exception").concat(nA,"\n")+'Actual message: "'.concat(W&&W.message,'"'),stackStartFn:$})}throw W}}function O(){for(var $=arguments.length,W=new Array($),hA=0;hA<$;hA++)W[hA]=arguments[hA];gA.apply(void 0,[O,W.length].concat(W))}BA.throws=function $(W){for(var hA=arguments.length,vA=new Array(hA>1?hA-1:0),nA=1;nA1?hA-1:0),nA=1;nA1?hA-1:0),nA=1;nA1?hA-1:0),nA=1;nAcA.length)&&(yA=cA.length),cA.substring(yA-gA.length,yA)===gA}var S="",F="",z="",U="",eA={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function q(cA){var gA=Object.keys(cA),yA=Object.create(Object.getPrototypeOf(cA));return gA.forEach(function(FA){yA[FA]=cA[FA]}),Object.defineProperty(yA,"message",{value:cA.message}),yA}function BA(cA){return y(cA,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function pA(cA,gA,yA){var FA="",_="",MA=0,uA="",QA=!1,SA=BA(cA),bA=SA.split("\n"),XA=BA(gA).split("\n"),X=0,O="";if("strictEqual"===yA&&"object"===p(cA)&&"object"===p(gA)&&null!==cA&&null!==gA&&(yA="strictEqualObject"),1===bA.length&&1===XA.length&&bA[0]!==XA[0]){var $=bA[0].length+XA[0].length;if($<=10){if(!("object"===p(cA)&&null!==cA||"object"===p(gA)&&null!==gA||0===cA&&0===gA))return"".concat(eA[yA],"\n\n")+"".concat(bA[0]," !== ").concat(XA[0],"\n")}else if("strictEqualObject"!==yA&&$<(c.stderr&&c.stderr.isTTY?c.stderr.columns:80)){for(;bA[0][X]===XA[0][X];)X++;X>2&&(O="\n ".concat(function P(cA,gA){if(gA=Math.floor(gA),0==cA.length||0==gA)return"";var yA=cA.length*gA;for(gA=Math.floor(Math.log(gA)/Math.log(2));gA;)cA+=cA,gA--;return cA+cA.substring(0,yA-cA.length)}(" ",X),"^"),X=0)}}for(var hA=bA[bA.length-1],vA=XA[XA.length-1];hA===vA&&(X++<2?uA="\n ".concat(hA).concat(uA):FA=hA,bA.pop(),XA.pop(),0!==bA.length&&0!==XA.length);)hA=bA[bA.length-1],vA=XA[XA.length-1];var nA=Math.max(bA.length,XA.length);if(0===nA){var EA=SA.split("\n");if(EA.length>30)for(EA[26]="".concat(S,"...").concat(U);EA.length>27;)EA.pop();return"".concat(eA.notIdentical,"\n\n").concat(EA.join("\n"),"\n")}X>3&&(uA="\n".concat(S,"...").concat(U).concat(uA),QA=!0),""!==FA&&(uA="\n ".concat(FA).concat(uA),FA="");var GA=0,et=eA[yA]+"\n".concat(F,"+ actual").concat(U," ").concat(z,"- expected").concat(U),st=" ".concat(S,"...").concat(U," Lines skipped");for(X=0;X1&&X>2&&(TA>4?(_+="\n".concat(S,"...").concat(U),QA=!0):TA>3&&(_+="\n ".concat(XA[X-2]),GA++),_+="\n ".concat(XA[X-1]),GA++),MA=X,FA+="\n".concat(z,"-").concat(U," ").concat(XA[X]),GA++;else if(XA.length1&&X>2&&(TA>4?(_+="\n".concat(S,"...").concat(U),QA=!0):TA>3&&(_+="\n ".concat(bA[X-2]),GA++),_+="\n ".concat(bA[X-1]),GA++),MA=X,_+="\n".concat(F,"+").concat(U," ").concat(bA[X]),GA++;else{var it=XA[X],mt=bA[X],It=mt!==it&&(!v(mt,",")||mt.slice(0,-1)!==it);It&&v(it,",")&&it.slice(0,-1)===mt&&(It=!1,mt+=","),It?(TA>1&&X>2&&(TA>4?(_+="\n".concat(S,"...").concat(U),QA=!0):TA>3&&(_+="\n ".concat(bA[X-2]),GA++),_+="\n ".concat(bA[X-1]),GA++),MA=X,_+="\n".concat(F,"+").concat(U," ").concat(mt),FA+="\n".concat(z,"-").concat(U," ").concat(it),GA+=2):(_+=FA,FA="",(1===TA||0===X)&&(_+="\n ".concat(mt),GA++))}if(GA>20&&X30)for(X[26]="".concat(S,"...").concat(U);X.length>27;)X.pop();FA=B(this,1===X.length?Q(gA).call(this,"".concat(XA," ").concat(X[0])):Q(gA).call(this,"".concat(XA,"\n\n").concat(X.join("\n"),"\n")))}else{var O=BA(QA),$="",W=eA[MA];"notDeepEqual"===MA||"notEqual"===MA?(O="".concat(eA[MA],"\n\n").concat(O)).length>1024&&(O="".concat(O.slice(0,1021),"...")):($="".concat(BA(SA)),O.length>512&&(O="".concat(O.slice(0,509),"...")),$.length>512&&($="".concat($.slice(0,509),"...")),"deepEqual"===MA||"equal"===MA?O="".concat(W,"\n\n").concat(O,"\n\nshould equal\n\n"):$=" ".concat(MA," ").concat($)),FA=B(this,Q(gA).call(this,"".concat(O).concat($)))}return Error.stackTraceLimit=bA,FA.generatedMessage=!_,Object.defineProperty(E(FA),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),FA.code="ERR_ASSERTION",FA.actual=QA,FA.expected=SA,FA.operator=MA,Error.captureStackTrace&&Error.captureStackTrace(E(FA),uA),FA.name="AssertionError",B(FA)}return function u(cA,gA){if("function"!=typeof gA&&null!==gA)throw new TypeError("Super expression must either be null or a function");cA.prototype=Object.create(gA&&gA.prototype,{constructor:{value:cA,writable:!0,configurable:!0}}),gA&&w(cA,gA)}(gA,cA),function a(cA,gA,yA){return gA&&h(cA.prototype,gA),yA&&h(cA,yA),cA}(gA,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:y.custom,value:function(FA,_){return y(this,function i(cA){for(var gA=1;gA2?"one of ".concat(Y," ").concat(p.slice(0,y-1).join(", "),", or ")+p[y-1]:2===y?"one of ".concat(Y," ").concat(p[0]," or ").concat(p[1]):"of ".concat(Y," ").concat(p[0])}return"of ".concat(Y," ").concat(String(p))}e("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),e("ERR_INVALID_ARG_TYPE",function(p,Y,y){var d,m;if(void 0===u&&(u=n(9282)),u("string"==typeof p,"'name' must be a string"),"string"==typeof Y&&function g(p,Y,y){return p.substr(!y||y<0?0:+y,Y.length)===Y}(Y,"not ")?(d="must not be",Y=Y.replace(/^not /,"")):d="must be",function w(p,Y,y){return(void 0===y||y>p.length)&&(y=p.length),p.substring(y-Y.length,y)===Y}(p," argument"))m="The ".concat(p," ").concat(d," ").concat(f(Y,"type"));else{var v=function Q(p,Y,y){return"number"!=typeof y&&(y=0),!(y+Y.length>p.length)&&-1!==p.indexOf(Y,y)}(p,".")?"property":"argument";m='The "'.concat(p,'" ').concat(v," ").concat(d," ").concat(f(Y,"type"))}return m+". Received type ".concat(c(y))},TypeError),e("ERR_INVALID_ARG_VALUE",function(p,Y){var y=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===C&&(C=n(9539));var d=C.inspect(Y);return d.length>128&&(d="".concat(d.slice(0,128),"...")),"The argument '".concat(p,"' ").concat(y,". Received ").concat(d)},TypeError,RangeError),e("ERR_INVALID_RETURN_VALUE",function(p,Y,y){var d;return d=y&&y.constructor&&y.constructor.name?"instance of ".concat(y.constructor.name):"type ".concat(c(y)),"Expected ".concat(p,' to be returned from the "').concat(Y,'"')+" function but got ".concat(d,".")},TypeError),e("ERR_MISSING_ARGS",function(){for(var p=arguments.length,Y=new Array(p),y=0;y0,"At least one arg needs to be specified");var d="The ",m=Y.length;switch(Y=Y.map(function(v){return'"'.concat(v,'"')}),m){case 1:d+="".concat(Y[0]," argument");break;case 2:d+="".concat(Y[0]," and ").concat(Y[1]," arguments");break;default:d+=Y.slice(0,m-1).join(", "),d+=", and ".concat(Y[m-1]," arguments")}return"".concat(d," must be specified")},TypeError),T.exports.codes=E},9158:function(T,I,n){"use strict";function c(JA,WA){return function l(JA){if(Array.isArray(JA))return JA}(JA)||function o(JA,WA){var rt=[],xA=!0,Mt=!1,ht=void 0;try{for(var OA,Yt=JA[Symbol.iterator]();!(xA=(OA=Yt.next()).done)&&(rt.push(OA.value),!WA||rt.length!==WA);xA=!0);}catch(H){Mt=!0,ht=H}finally{try{!xA&&null!=Yt.return&&Yt.return()}finally{if(Mt)throw ht}}return rt}(JA,WA)||function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function h(JA){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(rt){return typeof rt}:function(rt){return rt&&"function"==typeof Symbol&&rt.constructor===Symbol&&rt!==Symbol.prototype?"symbol":typeof rt})(JA)}var a=void 0!==/a/g.flags,B=function(WA){var rt=[];return WA.forEach(function(xA){return rt.push(xA)}),rt},E=function(WA){var rt=[];return WA.forEach(function(xA,Mt){return rt.push([Mt,xA])}),rt},u=Object.is?Object.is:n(609),C=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},e=Number.isNaN?Number.isNaN:n(360);function f(JA){return JA.call.bind(JA)}var g=f(Object.prototype.hasOwnProperty),w=f(Object.prototype.propertyIsEnumerable),Q=f(Object.prototype.toString),p=n(9539).types,Y=p.isAnyArrayBuffer,y=p.isArrayBufferView,d=p.isDate,m=p.isMap,v=p.isRegExp,P=p.isSet,S=p.isNativeError,F=p.isBoxedPrimitive,z=p.isNumberObject,U=p.isStringObject,eA=p.isBooleanObject,sA=p.isBigIntObject,q=p.isSymbolObject,BA=p.isFloat32Array,pA=p.isFloat64Array;function lA(JA){if(0===JA.length||JA.length>10)return!0;for(var WA=0;WA57)return!0}return 10===JA.length&&JA>=Math.pow(2,32)}function cA(JA){return Object.keys(JA).filter(lA).concat(C(JA).filter(Object.prototype.propertyIsEnumerable.bind(JA)))}function gA(JA,WA){if(JA===WA)return 0;for(var rt=JA.length,xA=WA.length,Mt=0,ht=Math.min(rt,xA);Mt=E.length?{done:!0}:{done:!1,value:E[e++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(E,u){(null==u||u>E.length)&&(u=E.length);for(var C=0,e=new Array(u);Cthis.buffer.length)return this.flush()},f.flush=function(){if(this.bufferOffset>0)return this.push(c.from(this.buffer.slice(0,this.bufferOffset))),this.bufferOffset=0},f.writeBuffer=function(w){return this.flush(),this.push(w),this.pos+=w.length},f.writeString=function(w,Q){switch(void 0===Q&&(Q="ascii"),Q){case"utf16le":case"ucs2":case"utf8":case"ascii":return this.writeBuffer(c.from(w,Q));case"utf16be":for(var p=c.from(w,"utf16le"),Y=0,y=p.length-1;Y>>16&255,this.buffer[this.bufferOffset++]=w>>>8&255,this.buffer[this.bufferOffset++]=255&w,this.pos+=3},f.writeUInt24LE=function(w){return this.ensure(3),this.buffer[this.bufferOffset++]=255&w,this.buffer[this.bufferOffset++]=w>>>8&255,this.buffer[this.bufferOffset++]=w>>>16&255,this.pos+=3},f.writeInt24BE=function(w){return this.writeUInt24BE(w>=0?w:w+16777215+1)},f.writeInt24LE=function(w){return this.writeUInt24LE(w>=0?w:w+16777215+1)},f.fill=function(w,Q){if(Q=this.length)){if(null==this.items[w]){var Q=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.ctx)*w,this.items[w]=this.type.decode(this.stream,this.ctx),this.stream.pos=Q}return this.items[w]}},f.toArray=function(){for(var w=[],Q=0,p=this.length;Q>1),(f=a.call(this,"Int"+u,C)||this)._point=1<u)throw new RangeError('The value "'+H+'" is invalid for option "size"');var k=new Uint8Array(H);return Object.setPrototypeOf(k,f.prototype),k}function f(H,k,b){if("number"==typeof H){if("string"==typeof k)throw new TypeError('The "string" argument must be of type string. Received type number');return p(H)}return g(H,k,b)}function g(H,k,b){if("string"==typeof H)return function Y(H,k){if(("string"!=typeof k||""===k)&&(k="utf8"),!f.isEncoding(k))throw new TypeError("Unknown encoding: "+k);var b=0|F(H,k),CA=e(b),wA=CA.write(H,k);return wA!==b&&(CA=CA.slice(0,wA)),CA}(H,k);if(ArrayBuffer.isView(H))return function d(H){if(xA(H,Uint8Array)){var k=new Uint8Array(H);return m(k.buffer,k.byteOffset,k.byteLength)}return y(H)}(H);if(null==H)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H);if(xA(H,ArrayBuffer)||H&&xA(H.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(xA(H,SharedArrayBuffer)||H&&xA(H.buffer,SharedArrayBuffer)))return m(H,k,b);if("number"==typeof H)throw new TypeError('The "value" argument must not be of type number. Received type number');var CA=H.valueOf&&H.valueOf();if(null!=CA&&CA!==H)return f.from(CA,k,b);var wA=function v(H){if(f.isBuffer(H)){var k=0|P(H.length),b=e(k);return 0===b.length||H.copy(b,0,0,k),b}return void 0!==H.length?"number"!=typeof H.length||Mt(H.length)?e(0):y(H):"Buffer"===H.type&&Array.isArray(H.data)?y(H.data):void 0}(H);if(wA)return wA;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof H[Symbol.toPrimitive])return f.from(H[Symbol.toPrimitive]("string"),k,b);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof H)}function w(H){if("number"!=typeof H)throw new TypeError('"size" argument must be of type number');if(H<0)throw new RangeError('The value "'+H+'" is invalid for option "size"')}function p(H){return w(H),e(H<0?0:0|P(H))}function y(H){for(var k=H.length<0?0:0|P(H.length),b=e(k),CA=0;CA=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return 0|H}function F(H,k){if(f.isBuffer(H))return H.length;if(ArrayBuffer.isView(H)||xA(H,ArrayBuffer))return H.byteLength;if("string"!=typeof H)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof H);var b=H.length,CA=arguments.length>2&&!0===arguments[2];if(!CA&&0===b)return 0;for(var wA=!1;;)switch(k){case"ascii":case"latin1":case"binary":return b;case"utf8":case"utf-8":return It(H).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*b;case"hex":return b>>>1;case"base64":return WA(H).length;default:if(wA)return CA?-1:It(H).length;k=(""+k).toLowerCase(),wA=!0}}function z(H,k,b){var CA=!1;if((void 0===k||k<0)&&(k=0),k>this.length||((void 0===b||b>this.length)&&(b=this.length),b<=0)||(b>>>=0)<=(k>>>=0))return"";for(H||(H="utf8");;)switch(H){case"hex":return QA(this,k,b);case"utf8":case"utf-8":return yA(this,k,b);case"ascii":return MA(this,k,b);case"latin1":case"binary":return uA(this,k,b);case"base64":return gA(this,k,b);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return SA(this,k,b);default:if(CA)throw new TypeError("Unknown encoding: "+H);H=(H+"").toLowerCase(),CA=!0}}function U(H,k,b){var CA=H[k];H[k]=H[b],H[b]=CA}function eA(H,k,b,CA,wA){if(0===H.length)return-1;if("string"==typeof b?(CA=b,b=0):b>2147483647?b=2147483647:b<-2147483648&&(b=-2147483648),Mt(b=+b)&&(b=wA?0:H.length-1),b<0&&(b=H.length+b),b>=H.length){if(wA)return-1;b=H.length-1}else if(b<0){if(!wA)return-1;b=0}if("string"==typeof k&&(k=f.from(k,CA)),f.isBuffer(k))return 0===k.length?-1:sA(H,k,b,CA,wA);if("number"==typeof k)return k&=255,"function"==typeof Uint8Array.prototype.indexOf?wA?Uint8Array.prototype.indexOf.call(H,k,b):Uint8Array.prototype.lastIndexOf.call(H,k,b):sA(H,[k],b,CA,wA);throw new TypeError("val must be string, number or Buffer")}function sA(H,k,b,CA,wA){var j,RA=1,rA=H.length,gt=k.length;if(void 0!==CA&&("ucs2"===(CA=String(CA).toLowerCase())||"ucs-2"===CA||"utf16le"===CA||"utf-16le"===CA)){if(H.length<2||k.length<2)return-1;RA=2,rA/=2,gt/=2,b/=2}function Ft(jA,lt){return 1===RA?jA[lt]:jA.readUInt16BE(lt*RA)}if(wA){var qA=-1;for(j=b;jrA&&(b=rA-gt),j=b;j>=0;j--){for(var KA=!0,DA=0;DAwA&&(CA=wA):CA=wA;var rA,RA=k.length;for(CA>RA/2&&(CA=RA/2),rA=0;rA>8,RA.push(b%256),RA.push(CA);return RA}(k,H.length-b),H,b,CA)}function gA(H,k,b){return a.fromByteArray(0===k&&b===H.length?H:H.slice(k,b))}function yA(H,k,b){b=Math.min(H.length,b);for(var CA=[],wA=k;wA239?4:RA>223?3:RA>191?2:1;if(wA+gt<=b){var Ft=void 0,j=void 0,qA=void 0,KA=void 0;switch(gt){case 1:RA<128&&(rA=RA);break;case 2:128==(192&(Ft=H[wA+1]))&&(KA=(31&RA)<<6|63&Ft)>127&&(rA=KA);break;case 3:j=H[wA+2],128==(192&(Ft=H[wA+1]))&&128==(192&j)&&(KA=(15&RA)<<12|(63&Ft)<<6|63&j)>2047&&(KA<55296||KA>57343)&&(rA=KA);break;case 4:j=H[wA+2],qA=H[wA+3],128==(192&(Ft=H[wA+1]))&&128==(192&j)&&128==(192&qA)&&(KA=(15&RA)<<18|(63&Ft)<<12|(63&j)<<6|63&qA)>65535&&KA<1114112&&(rA=KA)}}null===rA?(rA=65533,gt=1):rA>65535&&(CA.push((rA-=65536)>>>10&1023|55296),rA=56320|1023&rA),CA.push(rA),wA+=gt}return function _(H){var k=H.length;if(k<=4096)return String.fromCharCode.apply(String,H);for(var b="",CA=0;CAwA.length?(f.isBuffer(rA)||(rA=f.from(rA)),rA.copy(wA,RA)):Uint8Array.prototype.set.call(wA,rA,RA);else{if(!f.isBuffer(rA))throw new TypeError('"list" argument must be an Array of Buffers');rA.copy(wA,RA)}RA+=rA.length}return wA},f.byteLength=F,f.prototype._isBuffer=!0,f.prototype.swap16=function(){var k=this.length;if(k%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var b=0;bb&&(k+=" ... "),""},E&&(f.prototype[E]=f.prototype.inspect),f.prototype.compare=function(k,b,CA,wA,RA){if(xA(k,Uint8Array)&&(k=f.from(k,k.offset,k.byteLength)),!f.isBuffer(k))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof k);if(void 0===b&&(b=0),void 0===CA&&(CA=k?k.length:0),void 0===wA&&(wA=0),void 0===RA&&(RA=this.length),b<0||CA>k.length||wA<0||RA>this.length)throw new RangeError("out of range index");if(wA>=RA&&b>=CA)return 0;if(wA>=RA)return-1;if(b>=CA)return 1;if(this===k)return 0;for(var rA=(RA>>>=0)-(wA>>>=0),gt=(CA>>>=0)-(b>>>=0),Ft=Math.min(rA,gt),j=this.slice(wA,RA),qA=k.slice(b,CA),KA=0;KA>>=0,isFinite(CA)?(CA>>>=0,void 0===wA&&(wA="utf8")):(wA=CA,CA=void 0)}var RA=this.length-b;if((void 0===CA||CA>RA)&&(CA=RA),k.length>0&&(CA<0||b<0)||b>this.length)throw new RangeError("Attempt to write outside buffer bounds");wA||(wA="utf8");for(var rA=!1;;)switch(wA){case"hex":return q(this,k,b,CA);case"utf8":case"utf-8":return BA(this,k,b,CA);case"ascii":case"latin1":case"binary":return pA(this,k,b,CA);case"base64":return lA(this,k,b,CA);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return cA(this,k,b,CA);default:if(rA)throw new TypeError("Unknown encoding: "+wA);wA=(""+wA).toLowerCase(),rA=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function MA(H,k,b){var CA="";b=Math.min(H.length,b);for(var wA=k;wACA)&&(b=CA);for(var wA="",RA=k;RAb)throw new RangeError("Trying to access beyond buffer length")}function XA(H,k,b,CA,wA,RA){if(!f.isBuffer(H))throw new TypeError('"buffer" argument must be a Buffer instance');if(k>wA||kH.length)throw new RangeError("Index out of range")}function X(H,k,b,CA,wA){et(k,CA,wA,H,b,7);var RA=Number(k&BigInt(4294967295));H[b++]=RA,H[b++]=RA>>=8,H[b++]=RA>>=8,H[b++]=RA>>=8;var rA=Number(k>>BigInt(32)&BigInt(4294967295));return H[b++]=rA,H[b++]=rA>>=8,H[b++]=rA>>=8,H[b++]=rA>>=8,b}function O(H,k,b,CA,wA){et(k,CA,wA,H,b,7);var RA=Number(k&BigInt(4294967295));H[b+7]=RA,H[b+6]=RA>>=8,H[b+5]=RA>>=8,H[b+4]=RA>>=8;var rA=Number(k>>BigInt(32)&BigInt(4294967295));return H[b+3]=rA,H[b+2]=rA>>=8,H[b+1]=rA>>=8,H[b]=rA>>=8,b+8}function $(H,k,b,CA,wA,RA){if(b+CA>H.length)throw new RangeError("Index out of range");if(b<0)throw new RangeError("Index out of range")}function W(H,k,b,CA,wA){return k=+k,b>>>=0,wA||$(H,0,b,4),B.write(H,k,b,CA,23,4),b+4}function hA(H,k,b,CA,wA){return k=+k,b>>>=0,wA||$(H,0,b,8),B.write(H,k,b,CA,52,8),b+8}f.prototype.slice=function(k,b){var CA=this.length;(k=~~k)<0?(k+=CA)<0&&(k=0):k>CA&&(k=CA),(b=void 0===b?CA:~~b)<0?(b+=CA)<0&&(b=0):b>CA&&(b=CA),b>>=0,b>>>=0,CA||bA(k,b,this.length);for(var wA=this[k],RA=1,rA=0;++rA>>=0,b>>>=0,CA||bA(k,b,this.length);for(var wA=this[k+--b],RA=1;b>0&&(RA*=256);)wA+=this[k+--b]*RA;return wA},f.prototype.readUint8=f.prototype.readUInt8=function(k,b){return k>>>=0,b||bA(k,1,this.length),this[k]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(k,b){return k>>>=0,b||bA(k,2,this.length),this[k]|this[k+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(k,b){return k>>>=0,b||bA(k,2,this.length),this[k]<<8|this[k+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(k,b){return k>>>=0,b||bA(k,4,this.length),(this[k]|this[k+1]<<8|this[k+2]<<16)+16777216*this[k+3]},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(k,b){return k>>>=0,b||bA(k,4,this.length),16777216*this[k]+(this[k+1]<<16|this[k+2]<<8|this[k+3])},f.prototype.readBigUInt64LE=Yt(function(k){st(k>>>=0,"offset");var b=this[k],CA=this[k+7];(void 0===b||void 0===CA)&&TA(k,this.length-8);var wA=b+this[++k]*Math.pow(2,8)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,24),RA=this[++k]+this[++k]*Math.pow(2,8)+this[++k]*Math.pow(2,16)+CA*Math.pow(2,24);return BigInt(wA)+(BigInt(RA)<>>=0,"offset");var b=this[k],CA=this[k+7];(void 0===b||void 0===CA)&&TA(k,this.length-8);var wA=b*Math.pow(2,24)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,8)+this[++k],RA=this[++k]*Math.pow(2,24)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,8)+CA;return(BigInt(wA)<>>=0,b>>>=0,CA||bA(k,b,this.length);for(var wA=this[k],RA=1,rA=0;++rA=(RA*=128)&&(wA-=Math.pow(2,8*b)),wA},f.prototype.readIntBE=function(k,b,CA){k>>>=0,b>>>=0,CA||bA(k,b,this.length);for(var wA=b,RA=1,rA=this[k+--wA];wA>0&&(RA*=256);)rA+=this[k+--wA]*RA;return rA>=(RA*=128)&&(rA-=Math.pow(2,8*b)),rA},f.prototype.readInt8=function(k,b){return k>>>=0,b||bA(k,1,this.length),128&this[k]?-1*(255-this[k]+1):this[k]},f.prototype.readInt16LE=function(k,b){k>>>=0,b||bA(k,2,this.length);var CA=this[k]|this[k+1]<<8;return 32768&CA?4294901760|CA:CA},f.prototype.readInt16BE=function(k,b){k>>>=0,b||bA(k,2,this.length);var CA=this[k+1]|this[k]<<8;return 32768&CA?4294901760|CA:CA},f.prototype.readInt32LE=function(k,b){return k>>>=0,b||bA(k,4,this.length),this[k]|this[k+1]<<8|this[k+2]<<16|this[k+3]<<24},f.prototype.readInt32BE=function(k,b){return k>>>=0,b||bA(k,4,this.length),this[k]<<24|this[k+1]<<16|this[k+2]<<8|this[k+3]},f.prototype.readBigInt64LE=Yt(function(k){st(k>>>=0,"offset");var b=this[k],CA=this[k+7];(void 0===b||void 0===CA)&&TA(k,this.length-8);var wA=this[k+4]+this[k+5]*Math.pow(2,8)+this[k+6]*Math.pow(2,16)+(CA<<24);return(BigInt(wA)<>>=0,"offset");var b=this[k],CA=this[k+7];(void 0===b||void 0===CA)&&TA(k,this.length-8);var wA=(b<<24)+this[++k]*Math.pow(2,16)+this[++k]*Math.pow(2,8)+this[++k];return(BigInt(wA)<>>=0,b||bA(k,4,this.length),B.read(this,k,!0,23,4)},f.prototype.readFloatBE=function(k,b){return k>>>=0,b||bA(k,4,this.length),B.read(this,k,!1,23,4)},f.prototype.readDoubleLE=function(k,b){return k>>>=0,b||bA(k,8,this.length),B.read(this,k,!0,52,8)},f.prototype.readDoubleBE=function(k,b){return k>>>=0,b||bA(k,8,this.length),B.read(this,k,!1,52,8)},f.prototype.writeUintLE=f.prototype.writeUIntLE=function(k,b,CA,wA){k=+k,b>>>=0,CA>>>=0,wA||XA(this,k,b,CA,Math.pow(2,8*CA)-1,0);var rA=1,gt=0;for(this[b]=255&k;++gt>>=0,CA>>>=0,wA||XA(this,k,b,CA,Math.pow(2,8*CA)-1,0);var rA=CA-1,gt=1;for(this[b+rA]=255&k;--rA>=0&&(gt*=256);)this[b+rA]=k/gt&255;return b+CA},f.prototype.writeUint8=f.prototype.writeUInt8=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,1,255,0),this[b]=255&k,b+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,2,65535,0),this[b]=255&k,this[b+1]=k>>>8,b+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,2,65535,0),this[b]=k>>>8,this[b+1]=255&k,b+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,4,4294967295,0),this[b+3]=k>>>24,this[b+2]=k>>>16,this[b+1]=k>>>8,this[b]=255&k,b+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,4,4294967295,0),this[b]=k>>>24,this[b+1]=k>>>16,this[b+2]=k>>>8,this[b+3]=255&k,b+4},f.prototype.writeBigUInt64LE=Yt(function(k,b){return void 0===b&&(b=0),X(this,k,b,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=Yt(function(k,b){return void 0===b&&(b=0),O(this,k,b,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(k,b,CA,wA){if(k=+k,b>>>=0,!wA){var RA=Math.pow(2,8*CA-1);XA(this,k,b,CA,RA-1,-RA)}var rA=0,gt=1,Ft=0;for(this[b]=255&k;++rA>0)-Ft&255;return b+CA},f.prototype.writeIntBE=function(k,b,CA,wA){if(k=+k,b>>>=0,!wA){var RA=Math.pow(2,8*CA-1);XA(this,k,b,CA,RA-1,-RA)}var rA=CA-1,gt=1,Ft=0;for(this[b+rA]=255&k;--rA>=0&&(gt*=256);)k<0&&0===Ft&&0!==this[b+rA+1]&&(Ft=1),this[b+rA]=(k/gt>>0)-Ft&255;return b+CA},f.prototype.writeInt8=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,1,127,-128),k<0&&(k=255+k+1),this[b]=255&k,b+1},f.prototype.writeInt16LE=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,2,32767,-32768),this[b]=255&k,this[b+1]=k>>>8,b+2},f.prototype.writeInt16BE=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,2,32767,-32768),this[b]=k>>>8,this[b+1]=255&k,b+2},f.prototype.writeInt32LE=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,4,2147483647,-2147483648),this[b]=255&k,this[b+1]=k>>>8,this[b+2]=k>>>16,this[b+3]=k>>>24,b+4},f.prototype.writeInt32BE=function(k,b,CA){return k=+k,b>>>=0,CA||XA(this,k,b,4,2147483647,-2147483648),k<0&&(k=4294967295+k+1),this[b]=k>>>24,this[b+1]=k>>>16,this[b+2]=k>>>8,this[b+3]=255&k,b+4},f.prototype.writeBigInt64LE=Yt(function(k,b){return void 0===b&&(b=0),X(this,k,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=Yt(function(k,b){return void 0===b&&(b=0),O(this,k,b,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeFloatLE=function(k,b,CA){return W(this,k,b,!0,CA)},f.prototype.writeFloatBE=function(k,b,CA){return W(this,k,b,!1,CA)},f.prototype.writeDoubleLE=function(k,b,CA){return hA(this,k,b,!0,CA)},f.prototype.writeDoubleBE=function(k,b,CA){return hA(this,k,b,!1,CA)},f.prototype.copy=function(k,b,CA,wA){if(!f.isBuffer(k))throw new TypeError("argument should be a Buffer");if(CA||(CA=0),!wA&&0!==wA&&(wA=this.length),b>=k.length&&(b=k.length),b||(b=0),wA>0&&wA=this.length)throw new RangeError("Index out of range");if(wA<0)throw new RangeError("sourceEnd out of bounds");wA>this.length&&(wA=this.length),k.length-b>>=0,CA=void 0===CA?this.length:CA>>>0,k||(k=0),"number"==typeof k)for(rA=b;rA=CA+4;b-=3)k="_"+H.slice(b-3,b)+k;return""+H.slice(0,b)+k}function et(H,k,b,CA,wA,RA){if(H>b||H3?0===k||k===BigInt(0)?">= 0"+rA+" and < 2"+rA+" ** "+8*(RA+1)+rA:">= -(2"+rA+" ** "+(8*(RA+1)-1)+rA+") and < 2 ** "+(8*(RA+1)-1)+rA:">= "+k+rA+" and <= "+b+rA,new vA.ERR_OUT_OF_RANGE("value",gt,H)}!function GA(H,k,b){st(k,"offset"),(void 0===H[k]||void 0===H[k+b])&&TA(k,H.length-(b+1))}(CA,wA,RA)}function st(H,k){if("number"!=typeof H)throw new vA.ERR_INVALID_ARG_TYPE(k,"number",H)}function TA(H,k,b){throw Math.floor(H)!==H?(st(H,b),new vA.ERR_OUT_OF_RANGE(b||"offset","an integer",H)):k<0?new vA.ERR_BUFFER_OUT_OF_BOUNDS:new vA.ERR_OUT_OF_RANGE(b||"offset",">= "+(b?1:0)+" and <= "+k,H)}nA("ERR_BUFFER_OUT_OF_BOUNDS",function(H){return H?H+" is outside of buffer bounds":"Attempt to access memory outside buffer bounds"},RangeError),nA("ERR_INVALID_ARG_TYPE",function(H,k){return'The "'+H+'" argument must be of type number. Received type '+typeof k},TypeError),nA("ERR_OUT_OF_RANGE",function(H,k,b){var CA='The value of "'+H+'" is out of range.',wA=b;return Number.isInteger(b)&&Math.abs(b)>Math.pow(2,32)?wA=EA(String(b)):"bigint"==typeof b&&(wA=String(b),(b>Math.pow(BigInt(2),BigInt(32))||b<-Math.pow(BigInt(2),BigInt(32)))&&(wA=EA(wA)),wA+="n"),CA+" It must be "+k+". Received "+wA},RangeError);var it=/[^+/0-9A-Za-z-_]/g;function It(H,k){k=k||1/0;for(var b,CA=H.length,wA=null,RA=[],rA=0;rA55295&&b<57344){if(!wA){if(b>56319){(k-=3)>-1&&RA.push(239,191,189);continue}if(rA+1===CA){(k-=3)>-1&&RA.push(239,191,189);continue}wA=b;continue}if(b<56320){(k-=3)>-1&&RA.push(239,191,189),wA=b;continue}b=65536+(wA-55296<<10|b-56320)}else wA&&(k-=3)>-1&&RA.push(239,191,189);if(wA=null,b<128){if((k-=1)<0)break;RA.push(b)}else if(b<2048){if((k-=2)<0)break;RA.push(b>>6|192,63&b|128)}else if(b<65536){if((k-=3)<0)break;RA.push(b>>12|224,b>>6&63|128,63&b|128)}else{if(!(b<1114112))throw new Error("Invalid code point");if((k-=4)<0)break;RA.push(b>>18|240,b>>12&63|128,b>>6&63|128,63&b|128)}}return RA}function WA(H){return a.toByteArray(function mt(H){if((H=(H=H.split("=")[0]).trim().replace(it,"")).length<2)return"";for(;H.length%4!=0;)H+="=";return H}(H))}function rt(H,k,b,CA){var wA;for(wA=0;wA=k.length||wA>=H.length);++wA)k[wA+b]=H[wA];return wA}function xA(H,k){return H instanceof k||null!=H&&null!=H.constructor&&null!=H.constructor.name&&H.constructor.name===k.name}function Mt(H){return H!=H}var ht=function(){for(var H="0123456789abcdef",k=new Array(256),b=0;b<16;++b)for(var CA=16*b,wA=0;wA<16;++wA)k[CA+wA]=H[b]+H[wA];return k}();function Yt(H){return"undefined"==typeof BigInt?OA:H}function OA(){throw new Error("BigInt not supported")}},477:function(T,I,n){"use strict";n(7803),n(1539),T.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},2094:function(T,I,n){"use strict";var BA,pA,lA,c=n(477),i=n(9781),o=n(7854),l=n(614),h=n(111),a=n(2597),B=n(648),E=n(6330),u=n(8880),C=n(1320),e=n(3070).f,f=n(7976),g=n(9518),w=n(7674),Q=n(5112),p=n(9711),Y=o.Int8Array,y=Y&&Y.prototype,d=o.Uint8ClampedArray,m=d&&d.prototype,v=Y&&g(Y),P=y&&g(y),S=Object.prototype,F=o.TypeError,z=Q("toStringTag"),U=p("TYPED_ARRAY_TAG"),eA=p("TYPED_ARRAY_CONSTRUCTOR"),sA=c&&!!w&&"Opera"!==B(o.opera),q=!1,cA={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},gA={BigInt64Array:8,BigUint64Array:8},FA=function(bA){if(!h(bA))return!1;var XA=B(bA);return a(cA,XA)||a(gA,XA)};for(BA in cA)(lA=(pA=o[BA])&&pA.prototype)?u(lA,eA,pA):sA=!1;for(BA in gA)(lA=(pA=o[BA])&&pA.prototype)&&u(lA,eA,pA);if((!sA||!l(v)||v===Function.prototype)&&(v=function(){throw F("Incorrect invocation")},sA))for(BA in cA)o[BA]&&w(o[BA],v);if((!sA||!P||P===S)&&(P=v.prototype,sA))for(BA in cA)o[BA]&&w(o[BA].prototype,P);if(sA&&g(m)!==P&&w(m,P),i&&!a(P,z))for(BA in q=!0,e(P,z,{get:function(){return h(this)?this[U]:void 0}}),cA)o[BA]&&u(o[BA],U,BA);T.exports={NATIVE_ARRAY_BUFFER_VIEWS:sA,TYPED_ARRAY_CONSTRUCTOR:eA,TYPED_ARRAY_TAG:q&&U,aTypedArray:function(bA){if(FA(bA))return bA;throw F("Target is not a typed array")},aTypedArrayConstructor:function(bA){if(l(bA)&&(!w||f(v,bA)))return bA;throw F(E(bA)+" is not a typed array constructor")},exportTypedArrayMethod:function(bA,XA,X){if(i){if(X)for(var O in cA){var $=o[O];if($&&a($.prototype,bA))try{delete $.prototype[bA]}catch(W){}}(!P[bA]||X)&&C(P,bA,X?XA:sA&&y[bA]||XA)}},exportTypedArrayStaticMethod:function(bA,XA,X){var O,$;if(i){if(w){if(X)for(O in cA)if(($=o[O])&&a($,bA))try{delete $[bA]}catch(W){}if(v[bA]&&!X)return;try{return C(v,bA,X?XA:sA&&v[bA]||XA)}catch(W){}}for(O in cA)($=o[O])&&(!$[bA]||X)&&C($,bA,XA)}},isView:function(bA){if(!h(bA))return!1;var XA=B(bA);return"DataView"===XA||a(cA,XA)||a(gA,XA)},isTypedArray:FA,TypedArray:v,TypedArrayPrototype:P}},2091:function(T,I,n){"use strict";n(8309);var c=n(7854),i=n(1702),o=n(9781),l=n(477),h=n(6530),a=n(8880),B=n(2248),E=n(7293),u=n(5787),C=n(9303),e=n(7466),f=n(7067),g=n(1179),w=n(9518),Q=n(7674),p=n(8006).f,Y=n(3070).f,y=n(1285),d=n(206),m=n(8003),v=n(9909),P=h.PROPER,S=h.CONFIGURABLE,F=v.get,z=v.set,U="ArrayBuffer",eA="DataView",sA="prototype",BA="Wrong index",pA=c[U],lA=pA,cA=lA&&lA[sA],gA=c[eA],yA=gA&&gA[sA],FA=Object.prototype,_=c.Array,MA=c.RangeError,uA=i(y),QA=i([].reverse),SA=g.pack,bA=g.unpack,XA=function(ft){return[255&ft]},X=function(ft){return[255&ft,ft>>8&255]},O=function(ft){return[255&ft,ft>>8&255,ft>>16&255,ft>>24&255]},$=function(ft){return ft[3]<<24|ft[2]<<16|ft[1]<<8|ft[0]},W=function(ft){return SA(ft,23,4)},hA=function(ft){return SA(ft,52,8)},vA=function(ft,JA){Y(ft[sA],JA,{get:function(){return F(this)[JA]}})},nA=function(ft,JA,WA,rt){var xA=f(WA),Mt=F(ft);if(xA+JA>Mt.byteLength)throw MA(BA);var ht=F(Mt.buffer).bytes,Yt=xA+Mt.byteOffset,OA=d(ht,Yt,Yt+JA);return rt?OA:QA(OA)},EA=function(ft,JA,WA,rt,xA,Mt){var ht=f(WA),Yt=F(ft);if(ht+JA>Yt.byteLength)throw MA(BA);for(var OA=F(Yt.buffer).bytes,H=ht+Yt.byteOffset,k=rt(+xA),b=0;bst;)(TA=et[st++])in lA||a(lA,TA,pA[TA]);cA.constructor=lA}Q&&w(yA)!==FA&&Q(yA,FA);var it=new gA(new lA(2)),mt=i(yA.setInt8);it.setInt8(0,2147483648),it.setInt8(1,2147483649),(it.getInt8(0)||!it.getInt8(1))&&B(yA,{setInt8:function(ft,JA){mt(this,ft,JA<<24>>24)},setUint8:function(ft,JA){mt(this,ft,JA<<24>>24)}},{unsafe:!0})}else cA=(lA=function(ft){u(this,cA);var JA=f(ft);z(this,{bytes:uA(_(JA),0),byteLength:JA}),o||(this.byteLength=JA)})[sA],yA=(gA=function(ft,JA,WA){u(this,yA),u(ft,cA);var rt=F(ft).byteLength,xA=C(JA);if(xA<0||xA>rt)throw MA("Wrong offset");if(xA+(WA=void 0===WA?rt-xA:e(WA))>rt)throw MA("Wrong length");z(this,{buffer:ft,byteLength:WA,byteOffset:xA}),o||(this.buffer=ft,this.byteLength=WA,this.byteOffset=xA)})[sA],o&&(vA(lA,"byteLength"),vA(gA,"buffer"),vA(gA,"byteLength"),vA(gA,"byteOffset")),B(yA,{getInt8:function(ft){return nA(this,1,ft)[0]<<24>>24},getUint8:function(ft){return nA(this,1,ft)[0]},getInt16:function(ft){var JA=nA(this,2,ft,arguments.length>1?arguments[1]:void 0);return(JA[1]<<8|JA[0])<<16>>16},getUint16:function(ft){var JA=nA(this,2,ft,arguments.length>1?arguments[1]:void 0);return JA[1]<<8|JA[0]},getInt32:function(ft){return $(nA(this,4,ft,arguments.length>1?arguments[1]:void 0))},getUint32:function(ft){return $(nA(this,4,ft,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(ft){return bA(nA(this,4,ft,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(ft){return bA(nA(this,8,ft,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(ft,JA){EA(this,1,ft,XA,JA)},setUint8:function(ft,JA){EA(this,1,ft,XA,JA)},setInt16:function(ft,JA){EA(this,2,ft,X,JA,arguments.length>2?arguments[2]:void 0)},setUint16:function(ft,JA){EA(this,2,ft,X,JA,arguments.length>2?arguments[2]:void 0)},setInt32:function(ft,JA){EA(this,4,ft,O,JA,arguments.length>2?arguments[2]:void 0)},setUint32:function(ft,JA){EA(this,4,ft,O,JA,arguments.length>2?arguments[2]:void 0)},setFloat32:function(ft,JA){EA(this,4,ft,W,JA,arguments.length>2?arguments[2]:void 0)},setFloat64:function(ft,JA){EA(this,8,ft,hA,JA,arguments.length>2?arguments[2]:void 0)}});m(lA,U),m(gA,eA),T.exports={ArrayBuffer:lA,DataView:gA}},7803:function(T,I,n){"use strict";var c=n(2109),i=n(7854),o=n(2091),l=n(6340),h="ArrayBuffer",a=o[h];c({global:!0,forced:i[h]!==a},{ArrayBuffer:a}),l(h)},194:function(T,I,n){"use strict";T.exports=function(c){return function(){var i=c,l=i.lib.BlockCipher,h=i.algo,a=[],B=[],E=[],u=[],C=[],e=[],f=[],g=[],w=[],Q=[];!function(){for(var y=[],d=0;d<256;d++)y[d]=d<128?d<<1:d<<1^283;var m=0,v=0;for(d=0;d<256;d++){var P=v^v<<1^v<<2^v<<3^v<<4;a[m]=P=P>>>8^255&P^99,B[P]=m;var U,S=y[m],F=y[S],z=y[F];E[m]=(U=257*y[P]^16843008*P)<<24|U>>>8,u[m]=U<<16|U>>>16,C[m]=U<<8|U>>>24,e[m]=U,f[P]=(U=16843009*z^65537*F^257*S^16843008*m)<<24|U>>>8,g[P]=U<<16|U>>>16,w[P]=U<<8|U>>>24,Q[P]=U,m?(m=S^y[y[y[z^S]]],v^=y[y[v]]):m=v=1}}();var p=[0,1,2,4,8,16,32,64,128,27,54],Y=h.AES=l.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var m=this._keyPriorReset=this._key,v=m.words,P=m.sigBytes/4,F=4*((this._nRounds=P+6)+1),z=this._keySchedule=[],U=0;U6&&U%P==4&&(d=a[d>>>24]<<24|a[d>>>16&255]<<16|a[d>>>8&255]<<8|a[255&d]):(d=a[(d=d<<8|d>>>24)>>>24]<<24|a[d>>>16&255]<<16|a[d>>>8&255]<<8|a[255&d],d^=p[U/P|0]<<24),z[U]=z[U-P]^d);for(var eA=this._invKeySchedule=[],sA=0;sA>>24]]^g[a[d>>>16&255]]^w[a[d>>>8&255]]^Q[a[255&d]]}}},encryptBlock:function(d,m){this._doCryptBlock(d,m,this._keySchedule,E,u,C,e,a)},decryptBlock:function(d,m){var v=d[m+1];d[m+1]=d[m+3],d[m+3]=v,this._doCryptBlock(d,m,this._invKeySchedule,f,g,w,Q,B),v=d[m+1],d[m+1]=d[m+3],d[m+3]=v},_doCryptBlock:function(d,m,v,P,S,F,z,U){for(var eA=this._nRounds,sA=d[m]^v[0],q=d[m+1]^v[1],BA=d[m+2]^v[2],pA=d[m+3]^v[3],lA=4,cA=1;cA>>24]^S[q>>>16&255]^F[BA>>>8&255]^z[255&pA]^v[lA++],yA=P[q>>>24]^S[BA>>>16&255]^F[pA>>>8&255]^z[255&sA]^v[lA++],FA=P[BA>>>24]^S[pA>>>16&255]^F[sA>>>8&255]^z[255&q]^v[lA++],_=P[pA>>>24]^S[sA>>>16&255]^F[q>>>8&255]^z[255&BA]^v[lA++];sA=gA,q=yA,BA=FA,pA=_}gA=(U[sA>>>24]<<24|U[q>>>16&255]<<16|U[BA>>>8&255]<<8|U[255&pA])^v[lA++],yA=(U[q>>>24]<<24|U[BA>>>16&255]<<16|U[pA>>>8&255]<<8|U[255&sA])^v[lA++],FA=(U[BA>>>24]<<24|U[pA>>>16&255]<<16|U[sA>>>8&255]<<8|U[255&q])^v[lA++],_=(U[pA>>>24]<<24|U[sA>>>16&255]<<16|U[q>>>8&255]<<8|U[255&BA])^v[lA++],d[m]=gA,d[m+1]=yA,d[m+2]=FA,d[m+3]=_},keySize:8});i.AES=l._createHelper(Y)}(),c.AES}(n(757),n(7508),n(3440),n(3839),n(1582))},1582:function(T,I,n){"use strict";n(7042),n(2222),n(1539),n(9714),n(561),T.exports=function(c){var o,l,h,a,B,C,f,g,Q,p,Y,d,v,S,F,U,eA;c.lib.Cipher||(a=(l=(o=c).lib).WordArray,C=o.enc.Base64,f=o.algo.EvpKDF,g=l.Cipher=(B=l.BufferedBlockAlgorithm).extend({cfg:(h=l.Base).extend(),createEncryptor:function(q,BA){return this.create(this._ENC_XFORM_MODE,q,BA)},createDecryptor:function(q,BA){return this.create(this._DEC_XFORM_MODE,q,BA)},init:function(q,BA,pA){this.cfg=this.cfg.extend(pA),this._xformMode=q,this._key=BA,this.reset()},reset:function(){B.reset.call(this),this._doReset()},process:function(q){return this._append(q),this._process()},finalize:function(q){return q&&this._append(q),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function sA(q){return"string"==typeof q?eA:F}return function(q){return{encrypt:function(pA,lA,cA){return sA(lA).encrypt(q,pA,lA,cA)},decrypt:function(pA,lA,cA){return sA(lA).decrypt(q,pA,lA,cA)}}}}()}),l.StreamCipher=g.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),Q=o.mode={},p=l.BlockCipherMode=h.extend({createEncryptor:function(q,BA){return this.Encryptor.create(q,BA)},createDecryptor:function(q,BA){return this.Decryptor.create(q,BA)},init:function(q,BA){this._cipher=q,this._iv=BA}}),Y=Q.CBC=function(){var sA=p.extend();function q(BA,pA,lA){var cA,gA=this._iv;gA?(cA=gA,this._iv=undefined):cA=this._prevBlock;for(var yA=0;yA>>2]}},l.BlockCipher=g.extend({cfg:g.cfg.extend({mode:Y,padding:d}),reset:function(){var q;g.reset.call(this);var BA=this.cfg,pA=BA.iv,lA=BA.mode;this._xformMode==this._ENC_XFORM_MODE?q=lA.createEncryptor:(q=lA.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==q?this._mode.init(this,pA&&pA.words):(this._mode=q.call(lA,this,pA&&pA.words),this._mode.__creator=q)},_doProcessBlock:function(q,BA){this._mode.processBlock(q,BA)},_doFinalize:function(){var q,BA=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(BA.pad(this._data,this.blockSize),q=this._process(!0)):(q=this._process(!0),BA.unpad(q)),q},blockSize:4}),v=l.CipherParams=h.extend({init:function(q){this.mixIn(q)},toString:function(q){return(q||this.formatter).stringify(this)}}),S=(o.format={}).OpenSSL={stringify:function(q){var pA=q.ciphertext,lA=q.salt;return(lA?a.create([1398893684,1701076831]).concat(lA).concat(pA):pA).toString(C)},parse:function(q){var BA,pA=C.parse(q),lA=pA.words;return 1398893684==lA[0]&&1701076831==lA[1]&&(BA=a.create(lA.slice(2,4)),lA.splice(0,4),pA.sigBytes-=16),v.create({ciphertext:pA,salt:BA})}},F=l.SerializableCipher=h.extend({cfg:h.extend({format:S}),encrypt:function(q,BA,pA,lA){lA=this.cfg.extend(lA);var cA=q.createEncryptor(pA,lA),gA=cA.finalize(BA),yA=cA.cfg;return v.create({ciphertext:gA,key:pA,iv:yA.iv,algorithm:q,mode:yA.mode,padding:yA.padding,blockSize:q.blockSize,formatter:lA.format})},decrypt:function(q,BA,pA,lA){return lA=this.cfg.extend(lA),BA=this._parse(BA,lA.format),q.createDecryptor(pA,lA).finalize(BA.ciphertext)},_parse:function(q,BA){return"string"==typeof q?BA.parse(q,this):q}}),U=(o.kdf={}).OpenSSL={execute:function(q,BA,pA,lA){lA||(lA=a.random(8));var cA=f.create({keySize:BA+pA}).compute(q,lA),gA=a.create(cA.words.slice(BA),4*pA);return cA.sigBytes=4*BA,v.create({key:cA,iv:gA,salt:lA})}},eA=l.PasswordBasedCipher=F.extend({cfg:F.cfg.extend({kdf:U}),encrypt:function(q,BA,pA,lA){var cA=(lA=this.cfg.extend(lA)).kdf.execute(pA,q.keySize,q.ivSize);lA.iv=cA.iv;var gA=F.encrypt.call(this,q,BA,cA.key,lA);return gA.mixIn(cA),gA},decrypt:function(q,BA,pA,lA){lA=this.cfg.extend(lA),BA=this._parse(BA,lA.format);var cA=lA.kdf.execute(pA,q.keySize,q.ivSize,BA.salt);return lA.iv=cA.iv,F.decrypt.call(this,q,BA,cA.key,lA)}}))}(n(757),n(3839))},757:function(T,I,n){"use strict";var i;n(5743),n(6992),n(1539),n(9135),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(9714),n(7042),n(9600),n(2222),n(561),i=function(){var c=c||function(i,o){var l;if("undefined"!=typeof window&&window.crypto&&(l=window.crypto),"undefined"!=typeof self&&self.crypto&&(l=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(l=globalThis.crypto),!l&&"undefined"!=typeof window&&window.msCrypto&&(l=window.msCrypto),!l&&void 0!==n.g&&n.g.crypto&&(l=n.g.crypto),!l)try{l=n(2480)}catch(y){}var h=function(){if(l){if("function"==typeof l.getRandomValues)try{return l.getRandomValues(new Uint32Array(1))[0]}catch(d){}if("function"==typeof l.randomBytes)try{return l.randomBytes(4).readInt32LE()}catch(d){}}throw new Error("Native crypto module could not be used to get secure random number.")},a=Object.create||function(){function y(){}return function(d){var m;return y.prototype=d,m=new y,y.prototype=null,m}}(),B={},E=B.lib={},u=E.Base={extend:function(d){var m=a(this);return d&&m.mixIn(d),(!m.hasOwnProperty("init")||this.init===m.init)&&(m.init=function(){m.$super.init.apply(this,arguments)}),m.init.prototype=m,m.$super=this,m},create:function(){var d=this.extend();return d.init.apply(d,arguments),d},init:function(){},mixIn:function(d){for(var m in d)d.hasOwnProperty(m)&&(this[m]=d[m]);d.hasOwnProperty("toString")&&(this.toString=d.toString)},clone:function(){return this.init.prototype.extend(this)}},C=E.WordArray=u.extend({init:function(d,m){d=this.words=d||[],this.sigBytes=null!=m?m:4*d.length},toString:function(d){return(d||f).stringify(this)},concat:function(d){var m=this.words,v=d.words,P=this.sigBytes,S=d.sigBytes;if(this.clamp(),P%4)for(var F=0;F>>2]|=(v[F>>>2]>>>24-F%4*8&255)<<24-(P+F)%4*8;else for(var U=0;U>>2]=v[U>>>2];return this.sigBytes+=S,this},clamp:function(){var d=this.words,m=this.sigBytes;d[m>>>2]&=4294967295<<32-m%4*8,d.length=i.ceil(m/4)},clone:function(){var d=u.clone.call(this);return d.words=this.words.slice(0),d},random:function(d){for(var m=[],v=0;v>>2]>>>24-S%4*8&255;P.push((F>>>4).toString(16)),P.push((15&F).toString(16))}return P.join("")},parse:function(d){for(var m=d.length,v=[],P=0;P>>3]|=parseInt(d.substr(P,2),16)<<24-P%8*4;return new C.init(v,m/2)}},g=e.Latin1={stringify:function(d){for(var m=d.words,v=d.sigBytes,P=[],S=0;S>>2]>>>24-S%4*8&255));return P.join("")},parse:function(d){for(var m=d.length,v=[],P=0;P>>2]|=(255&d.charCodeAt(P))<<24-P%4*8;return new C.init(v,m)}},w=e.Utf8={stringify:function(d){try{return decodeURIComponent(escape(g.stringify(d)))}catch(m){throw new Error("Malformed UTF-8 data")}},parse:function(d){return g.parse(unescape(encodeURIComponent(d)))}},Q=E.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new C.init,this._nDataBytes=0},_append:function(d){"string"==typeof d&&(d=w.parse(d)),this._data.concat(d),this._nDataBytes+=d.sigBytes},_process:function(d){var m,v=this._data,P=v.words,S=v.sigBytes,F=this.blockSize,U=S/(4*F),eA=(U=d?i.ceil(U):i.max((0|U)-this._minBufferSize,0))*F,sA=i.min(4*eA,S);if(eA){for(var q=0;q>>2]>>>24-w%4*8&255)<<16|(C[w+1>>>2]>>>24-(w+1)%4*8&255)<<8|C[w+2>>>2]>>>24-(w+2)%4*8&255,d=0;d<4&&w+.75*d>>6*(3-d)&63));var m=f.charAt(64);if(m)for(;g.length%4;)g.push(m);return g.join("")},parse:function(u){var C=u.length,e=this._map,f=this._reverseMap;if(!f){f=this._reverseMap=[];for(var g=0;g>>6-g%4*2;e[f>>>2]|=(w|Q)<<24-f%4*8,f++}return l.create(e,f)}(u,C,f)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},c.enc.Base64;var l}(n(757))},7590:function(T,I,n){"use strict";n(9600),T.exports=function(c){return l=c.lib.WordArray,c.enc.Base64url={stringify:function(u,C){void 0===C&&(C=!0);var e=u.words,f=u.sigBytes,g=C?this._safe_map:this._map;u.clamp();for(var w=[],Q=0;Q>>2]>>>24-Q%4*8&255)<<16|(e[Q+1>>>2]>>>24-(Q+1)%4*8&255)<<8|e[Q+2>>>2]>>>24-(Q+2)%4*8&255,m=0;m<4&&Q+.75*m>>6*(3-m)&63));var v=g.charAt(64);if(v)for(;w.length%4;)w.push(v);return w.join("")},parse:function(u,C){void 0===C&&(C=!0);var e=u.length,f=C?this._safe_map:this._map,g=this._reverseMap;if(!g){g=this._reverseMap=[];for(var w=0;w>>6-g%4*2;e[f>>>2]|=(w|Q)<<24-f%4*8,f++}return l.create(e,f)}(u,e,g)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},c.enc.Base64url;var l}(n(757))},4978:function(T,I,n){"use strict";n(9600),T.exports=function(c){return function(){var l=c.lib.WordArray,h=c.enc;function B(E){return E<<8&4278255360|E>>>8&16711935}h.Utf16=h.Utf16BE={stringify:function(u){for(var C=u.words,e=u.sigBytes,f=[],g=0;g>>2]>>>16-g%4*8&65535));return f.join("")},parse:function(u){for(var C=u.length,e=[],f=0;f>>1]|=u.charCodeAt(f)<<16-f%2*16;return l.create(e,2*C)}},h.Utf16LE={stringify:function(u){for(var C=u.words,e=u.sigBytes,f=[],g=0;g>>2]>>>16-g%4*8&65535);f.push(String.fromCharCode(w))}return f.join("")},parse:function(u){for(var C=u.length,e=[],f=0;f>>1]|=B(u.charCodeAt(f)<<16-f%2*16);return l.create(e,2*C)}}}(),c.enc.Utf16}(n(757))},3839:function(T,I,n){"use strict";n(2222),T.exports=function(c){return h=(o=(i=c).lib).WordArray,E=(a=i.algo).EvpKDF=(l=o.Base).extend({cfg:l.extend({keySize:4,hasher:a.MD5,iterations:1}),init:function(C){this.cfg=this.cfg.extend(C)},compute:function(C,e){for(var f,g=this.cfg,w=g.hasher.create(),Q=h.create(),p=Q.words,Y=g.keySize,y=g.iterations;p.lengthg&&(e=C.finalize(e)),e.clamp();for(var w=this._oKey=e.clone(),Q=this._iKey=e.clone(),p=w.words,Y=Q.words,y=0;y>>2]|=B[C]<<24-C%4*8;h.call(this,u,E)}else h.apply(this,arguments)};a.prototype=l}}(),c.lib.WordArray},T.exports=i(n(757))},3440:function(T,I,n){"use strict";T.exports=function(c){return function(i){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,B=o.algo,E=[];!function(){for(var w=0;w<64;w++)E[w]=4294967296*i.abs(i.sin(w+1))|0}();var u=B.MD5=a.extend({_doReset:function(){this._hash=new h.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(Q,p){for(var Y=0;Y<16;Y++){var y=p+Y,d=Q[y];Q[y]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}var m=this._hash.words,v=Q[p+0],P=Q[p+1],S=Q[p+2],F=Q[p+3],z=Q[p+4],U=Q[p+5],eA=Q[p+6],sA=Q[p+7],q=Q[p+8],BA=Q[p+9],pA=Q[p+10],lA=Q[p+11],cA=Q[p+12],gA=Q[p+13],yA=Q[p+14],FA=Q[p+15],_=m[0],MA=m[1],uA=m[2],QA=m[3];_=C(_,MA,uA,QA,v,7,E[0]),QA=C(QA,_,MA,uA,P,12,E[1]),uA=C(uA,QA,_,MA,S,17,E[2]),MA=C(MA,uA,QA,_,F,22,E[3]),_=C(_,MA,uA,QA,z,7,E[4]),QA=C(QA,_,MA,uA,U,12,E[5]),uA=C(uA,QA,_,MA,eA,17,E[6]),MA=C(MA,uA,QA,_,sA,22,E[7]),_=C(_,MA,uA,QA,q,7,E[8]),QA=C(QA,_,MA,uA,BA,12,E[9]),uA=C(uA,QA,_,MA,pA,17,E[10]),MA=C(MA,uA,QA,_,lA,22,E[11]),_=C(_,MA,uA,QA,cA,7,E[12]),QA=C(QA,_,MA,uA,gA,12,E[13]),uA=C(uA,QA,_,MA,yA,17,E[14]),_=e(_,MA=C(MA,uA,QA,_,FA,22,E[15]),uA,QA,P,5,E[16]),QA=e(QA,_,MA,uA,eA,9,E[17]),uA=e(uA,QA,_,MA,lA,14,E[18]),MA=e(MA,uA,QA,_,v,20,E[19]),_=e(_,MA,uA,QA,U,5,E[20]),QA=e(QA,_,MA,uA,pA,9,E[21]),uA=e(uA,QA,_,MA,FA,14,E[22]),MA=e(MA,uA,QA,_,z,20,E[23]),_=e(_,MA,uA,QA,BA,5,E[24]),QA=e(QA,_,MA,uA,yA,9,E[25]),uA=e(uA,QA,_,MA,F,14,E[26]),MA=e(MA,uA,QA,_,q,20,E[27]),_=e(_,MA,uA,QA,gA,5,E[28]),QA=e(QA,_,MA,uA,S,9,E[29]),uA=e(uA,QA,_,MA,sA,14,E[30]),_=f(_,MA=e(MA,uA,QA,_,cA,20,E[31]),uA,QA,U,4,E[32]),QA=f(QA,_,MA,uA,q,11,E[33]),uA=f(uA,QA,_,MA,lA,16,E[34]),MA=f(MA,uA,QA,_,yA,23,E[35]),_=f(_,MA,uA,QA,P,4,E[36]),QA=f(QA,_,MA,uA,z,11,E[37]),uA=f(uA,QA,_,MA,sA,16,E[38]),MA=f(MA,uA,QA,_,pA,23,E[39]),_=f(_,MA,uA,QA,gA,4,E[40]),QA=f(QA,_,MA,uA,v,11,E[41]),uA=f(uA,QA,_,MA,F,16,E[42]),MA=f(MA,uA,QA,_,eA,23,E[43]),_=f(_,MA,uA,QA,BA,4,E[44]),QA=f(QA,_,MA,uA,cA,11,E[45]),uA=f(uA,QA,_,MA,FA,16,E[46]),_=g(_,MA=f(MA,uA,QA,_,S,23,E[47]),uA,QA,v,6,E[48]),QA=g(QA,_,MA,uA,sA,10,E[49]),uA=g(uA,QA,_,MA,yA,15,E[50]),MA=g(MA,uA,QA,_,U,21,E[51]),_=g(_,MA,uA,QA,cA,6,E[52]),QA=g(QA,_,MA,uA,F,10,E[53]),uA=g(uA,QA,_,MA,pA,15,E[54]),MA=g(MA,uA,QA,_,P,21,E[55]),_=g(_,MA,uA,QA,q,6,E[56]),QA=g(QA,_,MA,uA,FA,10,E[57]),uA=g(uA,QA,_,MA,eA,15,E[58]),MA=g(MA,uA,QA,_,gA,21,E[59]),_=g(_,MA,uA,QA,z,6,E[60]),QA=g(QA,_,MA,uA,lA,10,E[61]),uA=g(uA,QA,_,MA,S,15,E[62]),MA=g(MA,uA,QA,_,BA,21,E[63]),m[0]=m[0]+_|0,m[1]=m[1]+MA|0,m[2]=m[2]+uA|0,m[3]=m[3]+QA|0},_doFinalize:function(){var Q=this._data,p=Q.words,Y=8*this._nDataBytes,y=8*Q.sigBytes;p[y>>>5]|=128<<24-y%32;var d=i.floor(Y/4294967296),m=Y;p[15+(y+64>>>9<<4)]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),p[14+(y+64>>>9<<4)]=16711935&(m<<8|m>>>24)|4278255360&(m<<24|m>>>8),Q.sigBytes=4*(p.length+1),this._process();for(var v=this._hash,P=v.words,S=0;S<4;S++){var F=P[S];P[S]=16711935&(F<<8|F>>>24)|4278255360&(F<<24|F>>>8)}return v},clone:function(){var Q=a.clone.call(this);return Q._hash=this._hash.clone(),Q}});function C(w,Q,p,Y,y,d,m){var v=w+(Q&p|~Q&Y)+y+m;return(v<>>32-d)+Q}function e(w,Q,p,Y,y,d,m){var v=w+(Q&Y|p&~Y)+y+m;return(v<>>32-d)+Q}function f(w,Q,p,Y,y,d,m){var v=w+(Q^p^Y)+y+m;return(v<>>32-d)+Q}function g(w,Q,p,Y,y,d,m){var v=w+(p^(Q|~Y))+y+m;return(v<>>32-d)+Q}o.MD5=a._createHelper(u),o.HmacMD5=a._createHmacHelper(u)}(Math),c.MD5}(n(757))},702:function(T,I,n){"use strict";n(7042),T.exports=function(c){return c.mode.CFB=function(){var i=c.lib.BlockCipherMode.extend();function o(l,h,a,B){var E,u=this._iv;u?(E=u.slice(0),this._iv=void 0):E=this._prevBlock,B.encryptBlock(E,0);for(var C=0;C>24&255)){var B=a>>16&255,E=a>>8&255,u=255&a;255===B?(B=0,255===E?(E=0,255===u?u=0:++u):++E):++B,a=0,a+=B<<16,a+=E<<8,a+=u}else a+=16777216;return a}var h=i.Encryptor=i.extend({processBlock:function(B,E){var u=this._cipher,C=u.blockSize,e=this._iv,f=this._counter;e&&(f=this._counter=e.slice(0),this._iv=void 0),function l(a){return 0===(a[0]=o(a[0]))&&(a[1]=o(a[1])),a}(f);var g=f.slice(0);u.encryptBlock(g,0);for(var w=0;w>>2]|=B<<24-E%4*8,o.sigBytes+=B},unpad:function(o){o.sigBytes-=255&o.words[o.sigBytes-1>>>2]}},c.pad.Ansix923}(n(757),n(1582))},4431:function(T,I,n){"use strict";n(2222),T.exports=function(c){return c.pad.Iso10126={pad:function(o,l){var h=4*l,a=h-o.sigBytes%h;o.concat(c.lib.WordArray.random(a-1)).concat(c.lib.WordArray.create([a<<24],1))},unpad:function(o){o.sigBytes-=255&o.words[o.sigBytes-1>>>2]}},c.pad.Iso10126}(n(757),n(1582))},8800:function(T,I,n){"use strict";n(2222),T.exports=function(c){return c.pad.Iso97971={pad:function(o,l){o.concat(c.lib.WordArray.create([2147483648],1)),c.pad.ZeroPadding.pad(o,l)},unpad:function(o){c.pad.ZeroPadding.unpad(o),o.sigBytes--}},c.pad.Iso97971}(n(757),n(1582))},649:function(T,I,n){"use strict";T.exports=function(c){return c.pad.NoPadding={pad:function(){},unpad:function(){}},c.pad.NoPadding}(n(757),n(1582))},3992:function(T,I,n){"use strict";T.exports=function(c){return c.pad.ZeroPadding={pad:function(o,l){var h=4*l;o.clamp(),o.sigBytes+=h-(o.sigBytes%h||h)},unpad:function(o){var l=o.words,h=o.sigBytes-1;for(h=o.sigBytes-1;h>=0;h--)if(l[h>>>2]>>>24-h%4*8&255){o.sigBytes=h+1;break}}},c.pad.ZeroPadding}(n(757),n(1582))},3486:function(T,I,n){"use strict";n(2222),T.exports=function(c){return h=(o=(i=c).lib).WordArray,E=(a=i.algo).HMAC,u=a.PBKDF2=(l=o.Base).extend({cfg:l.extend({keySize:4,hasher:a.SHA1,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,f){for(var g=this.cfg,w=E.create(g.hasher,e),Q=h.create(),p=h.create([1]),Y=Q.words,y=p.words,d=g.keySize,m=g.iterations;Y.length>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],Q=this._C=[f[2]<<16|f[2]>>>16,4294901760&f[0]|65535&f[1],f[3]<<16|f[3]>>>16,4294901760&f[1]|65535&f[2],f[0]<<16|f[0]>>>16,4294901760&f[2]|65535&f[3],f[1]<<16|f[1]>>>16,4294901760&f[3]|65535&f[0]];this._b=0;for(var p=0;p<4;p++)C.call(this);for(p=0;p<8;p++)Q[p]^=w[p+4&7];if(g){var Y=g.words,y=Y[0],d=Y[1],m=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8),v=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),P=m>>>16|4294901760&v,S=v<<16|65535&m;for(Q[0]^=m,Q[1]^=P,Q[2]^=v,Q[3]^=S,Q[4]^=m,Q[5]^=P,Q[6]^=v,Q[7]^=S,p=0;p<4;p++)C.call(this)}},_doProcessBlock:function(f,g){var w=this._X;C.call(this),a[0]=w[0]^w[5]>>>16^w[3]<<16,a[1]=w[2]^w[7]>>>16^w[5]<<16,a[2]=w[4]^w[1]>>>16^w[7]<<16,a[3]=w[6]^w[3]>>>16^w[1]<<16;for(var Q=0;Q<4;Q++)a[Q]=16711935&(a[Q]<<8|a[Q]>>>24)|4278255360&(a[Q]<<24|a[Q]>>>8),f[g+Q]^=a[Q]},blockSize:4,ivSize:2});function C(){for(var e=this._X,f=this._C,g=0;g<8;g++)B[g]=f[g];for(f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0>>0?1:0)|0,this._b=f[7]>>>0>>0?1:0,g=0;g<8;g++){var w=e[g]+f[g],Q=65535&w,p=w>>>16;E[g]=((Q*Q>>>17)+Q*p>>>15)+p*p^((4294901760&w)*w|0)+((65535&w)*w|0)}e[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,e[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,e[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,e[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,e[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,e[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,e[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,e[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}i.RabbitLegacy=l._createHelper(u)}(),c.RabbitLegacy}(n(757),n(7508),n(3440),n(3839),n(1582))},5323:function(T,I,n){"use strict";T.exports=function(c){return function(){var i=c,l=i.lib.StreamCipher,a=[],B=[],E=[],u=i.algo.Rabbit=l.extend({_doReset:function(){for(var f=this._key.words,g=this.cfg.iv,w=0;w<4;w++)f[w]=16711935&(f[w]<<8|f[w]>>>24)|4278255360&(f[w]<<24|f[w]>>>8);var Q=this._X=[f[0],f[3]<<16|f[2]>>>16,f[1],f[0]<<16|f[3]>>>16,f[2],f[1]<<16|f[0]>>>16,f[3],f[2]<<16|f[1]>>>16],p=this._C=[f[2]<<16|f[2]>>>16,4294901760&f[0]|65535&f[1],f[3]<<16|f[3]>>>16,4294901760&f[1]|65535&f[2],f[0]<<16|f[0]>>>16,4294901760&f[2]|65535&f[3],f[1]<<16|f[1]>>>16,4294901760&f[3]|65535&f[0]];for(this._b=0,w=0;w<4;w++)C.call(this);for(w=0;w<8;w++)p[w]^=Q[w+4&7];if(g){var Y=g.words,y=Y[0],d=Y[1],m=16711935&(y<<8|y>>>24)|4278255360&(y<<24|y>>>8),v=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),P=m>>>16|4294901760&v,S=v<<16|65535&m;for(p[0]^=m,p[1]^=P,p[2]^=v,p[3]^=S,p[4]^=m,p[5]^=P,p[6]^=v,p[7]^=S,w=0;w<4;w++)C.call(this)}},_doProcessBlock:function(f,g){var w=this._X;C.call(this),a[0]=w[0]^w[5]>>>16^w[3]<<16,a[1]=w[2]^w[7]>>>16^w[5]<<16,a[2]=w[4]^w[1]>>>16^w[7]<<16,a[3]=w[6]^w[3]>>>16^w[1]<<16;for(var Q=0;Q<4;Q++)a[Q]=16711935&(a[Q]<<8|a[Q]>>>24)|4278255360&(a[Q]<<24|a[Q]>>>8),f[g+Q]^=a[Q]},blockSize:4,ivSize:2});function C(){for(var e=this._X,f=this._C,g=0;g<8;g++)B[g]=f[g];for(f[0]=f[0]+1295307597+this._b|0,f[1]=f[1]+3545052371+(f[0]>>>0>>0?1:0)|0,f[2]=f[2]+886263092+(f[1]>>>0>>0?1:0)|0,f[3]=f[3]+1295307597+(f[2]>>>0>>0?1:0)|0,f[4]=f[4]+3545052371+(f[3]>>>0>>0?1:0)|0,f[5]=f[5]+886263092+(f[4]>>>0>>0?1:0)|0,f[6]=f[6]+1295307597+(f[5]>>>0>>0?1:0)|0,f[7]=f[7]+3545052371+(f[6]>>>0>>0?1:0)|0,this._b=f[7]>>>0>>0?1:0,g=0;g<8;g++){var w=e[g]+f[g],Q=65535&w,p=w>>>16;E[g]=((Q*Q>>>17)+Q*p>>>15)+p*p^((4294901760&w)*w|0)+((65535&w)*w|0)}e[0]=E[0]+(E[7]<<16|E[7]>>>16)+(E[6]<<16|E[6]>>>16)|0,e[1]=E[1]+(E[0]<<8|E[0]>>>24)+E[7]|0,e[2]=E[2]+(E[1]<<16|E[1]>>>16)+(E[0]<<16|E[0]>>>16)|0,e[3]=E[3]+(E[2]<<8|E[2]>>>24)+E[1]|0,e[4]=E[4]+(E[3]<<16|E[3]>>>16)+(E[2]<<16|E[2]>>>16)|0,e[5]=E[5]+(E[4]<<8|E[4]>>>24)+E[3]|0,e[6]=E[6]+(E[5]<<16|E[5]>>>16)+(E[4]<<16|E[4]>>>16)|0,e[7]=E[7]+(E[6]<<8|E[6]>>>24)+E[5]|0}i.Rabbit=l._createHelper(u)}(),c.Rabbit}(n(757),n(7508),n(3440),n(3839),n(1582))},4640:function(T,I,n){"use strict";n(1539),n(8674),T.exports=function(c){return function(){var i=c,l=i.lib.StreamCipher,h=i.algo,a=h.RC4=l.extend({_doReset:function(){for(var C=this._key,e=C.words,f=C.sigBytes,g=this._S=[],w=0;w<256;w++)g[w]=w;w=0;for(var Q=0;w<256;w++){var p=w%f,y=g[w];g[w]=g[Q=(Q+g[w]+(e[p>>>2]>>>24-p%4*8&255))%256],g[Q]=y}this._i=this._j=0},_doProcessBlock:function(C,e){C[e]^=B.call(this)},keySize:8,ivSize:0});function B(){for(var u=this._S,C=this._i,e=this._j,f=0,g=0;g<4;g++){var w=u[C=(C+1)%256];u[C]=u[e=(e+u[C])%256],u[e]=w,f|=u[(u[C]+u[e])%256]<<24-8*g}return this._i=C,this._j=e,f}i.RC4=l._createHelper(a);var E=h.RC4Drop=a.extend({cfg:a.cfg.extend({drop:192}),_doReset:function(){a._doReset.call(this);for(var C=this.cfg.drop;C>0;C--)B.call(this)}});i.RC4Drop=l._createHelper(E)}(),c.RC4}(n(757),n(7508),n(3440),n(3839),n(1582))},8714:function(T,I,n){"use strict";T.exports=function(c){return function(i){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,B=o.algo,E=h.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),u=h.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),C=h.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),e=h.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=h.create([0,1518500249,1859775393,2400959708,2840853838]),g=h.create([1352829926,1548603684,1836072691,2053994217,0]),w=B.RIPEMD160=a.extend({_doReset:function(){this._hash=h.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(P,S){for(var F=0;F<16;F++){var z=S+F,U=P[z];P[z]=16711935&(U<<8|U>>>24)|4278255360&(U<<24|U>>>8)}var gA,yA,FA,_,MA,uA,QA,SA,bA,XA,X,eA=this._hash.words,sA=f.words,q=g.words,BA=E.words,pA=u.words,lA=C.words,cA=e.words;for(uA=gA=eA[0],QA=yA=eA[1],SA=FA=eA[2],bA=_=eA[3],XA=MA=eA[4],F=0;F<80;F+=1)X=gA+P[S+BA[F]]|0,X+=F<16?Q(yA,FA,_)+sA[0]:F<32?p(yA,FA,_)+sA[1]:F<48?Y(yA,FA,_)+sA[2]:F<64?y(yA,FA,_)+sA[3]:d(yA,FA,_)+sA[4],X=(X=m(X|=0,lA[F]))+MA|0,gA=MA,MA=_,_=m(FA,10),FA=yA,yA=X,X=uA+P[S+pA[F]]|0,X+=F<16?d(QA,SA,bA)+q[0]:F<32?y(QA,SA,bA)+q[1]:F<48?Y(QA,SA,bA)+q[2]:F<64?p(QA,SA,bA)+q[3]:Q(QA,SA,bA)+q[4],X=(X=m(X|=0,cA[F]))+XA|0,uA=XA,XA=bA,bA=m(SA,10),SA=QA,QA=X;X=eA[1]+FA+bA|0,eA[1]=eA[2]+_+XA|0,eA[2]=eA[3]+MA+uA|0,eA[3]=eA[4]+gA+QA|0,eA[4]=eA[0]+yA+SA|0,eA[0]=X},_doFinalize:function(){var P=this._data,S=P.words,F=8*this._nDataBytes,z=8*P.sigBytes;S[z>>>5]|=128<<24-z%32,S[14+(z+64>>>9<<4)]=16711935&(F<<8|F>>>24)|4278255360&(F<<24|F>>>8),P.sigBytes=4*(S.length+1),this._process();for(var U=this._hash,eA=U.words,sA=0;sA<5;sA++){var q=eA[sA];eA[sA]=16711935&(q<<8|q>>>24)|4278255360&(q<<24|q>>>8)}return U},clone:function(){var P=a.clone.call(this);return P._hash=this._hash.clone(),P}});function Q(v,P,S){return v^P^S}function p(v,P,S){return v&P|~v&S}function Y(v,P,S){return(v|~P)^S}function y(v,P,S){return v&S|P&~S}function d(v,P,S){return v^(P|~S)}function m(v,P){return v<>>32-P}o.RIPEMD160=a._createHelper(w),o.HmacRIPEMD160=a._createHmacHelper(w)}(Math),c.RIPEMD160}(n(757))},9865:function(T,I,n){"use strict";T.exports=function(c){return l=(o=(i=c).lib).WordArray,B=[],E=i.algo.SHA1=(h=o.Hasher).extend({_doReset:function(){this._hash=new l.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(C,e){for(var f=this._hash.words,g=f[0],w=f[1],Q=f[2],p=f[3],Y=f[4],y=0;y<80;y++){if(y<16)B[y]=0|C[e+y];else{var d=B[y-3]^B[y-8]^B[y-14]^B[y-16];B[y]=d<<1|d>>>31}var m=(g<<5|g>>>27)+Y+B[y];m+=y<20?1518500249+(w&Q|~w&p):y<40?1859775393+(w^Q^p):y<60?(w&Q|w&p|Q&p)-1894007588:(w^Q^p)-899497514,Y=p,p=Q,Q=w<<30|w>>>2,w=g,g=m}f[0]=f[0]+g|0,f[1]=f[1]+w|0,f[2]=f[2]+Q|0,f[3]=f[3]+p|0,f[4]=f[4]+Y|0},_doFinalize:function(){var C=this._data,e=C.words,f=8*this._nDataBytes,g=8*C.sigBytes;return e[g>>>5]|=128<<24-g%32,e[14+(g+64>>>9<<4)]=Math.floor(f/4294967296),e[15+(g+64>>>9<<4)]=f,C.sigBytes=4*e.length,this._process(),this._hash},clone:function(){var C=h.clone.call(this);return C._hash=this._hash.clone(),C}}),i.SHA1=h._createHelper(E),i.HmacSHA1=h._createHmacHelper(E),c.SHA1;var i,o,l,h,B,E}(n(757))},6876:function(T,I,n){"use strict";T.exports=function(c){return l=(i=c).lib.WordArray,B=(h=i.algo).SHA224=(a=h.SHA256).extend({_doReset:function(){this._hash=new l.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var u=a._doFinalize.call(this);return u.sigBytes-=4,u}}),i.SHA224=a._createHelper(B),i.HmacSHA224=a._createHmacHelper(B),c.SHA224;var i,l,h,a,B}(n(757),n(8921))},8921:function(T,I,n){"use strict";n(7042),T.exports=function(c){return function(i){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,B=o.algo,E=[],u=[];!function(){function f(p){for(var Y=i.sqrt(p),y=2;y<=Y;y++)if(!(p%y))return!1;return!0}function g(p){return 4294967296*(p-(0|p))|0}for(var w=2,Q=0;Q<64;)f(w)&&(Q<8&&(E[Q]=g(i.pow(w,.5))),u[Q]=g(i.pow(w,.3333333333333333)),Q++),w++}();var C=[],e=B.SHA256=a.extend({_doReset:function(){this._hash=new h.init(E.slice(0))},_doProcessBlock:function(g,w){for(var Q=this._hash.words,p=Q[0],Y=Q[1],y=Q[2],d=Q[3],m=Q[4],v=Q[5],P=Q[6],S=Q[7],F=0;F<64;F++){if(F<16)C[F]=0|g[w+F];else{var z=C[F-15],eA=C[F-2];C[F]=((z<<25|z>>>7)^(z<<14|z>>>18)^z>>>3)+C[F-7]+((eA<<15|eA>>>17)^(eA<<13|eA>>>19)^eA>>>10)+C[F-16]}var BA=p&Y^p&y^Y&y,cA=S+((m<<26|m>>>6)^(m<<21|m>>>11)^(m<<7|m>>>25))+(m&v^~m&P)+u[F]+C[F];S=P,P=v,v=m,m=d+cA|0,d=y,y=Y,Y=p,p=cA+(((p<<30|p>>>2)^(p<<19|p>>>13)^(p<<10|p>>>22))+BA)|0}Q[0]=Q[0]+p|0,Q[1]=Q[1]+Y|0,Q[2]=Q[2]+y|0,Q[3]=Q[3]+d|0,Q[4]=Q[4]+m|0,Q[5]=Q[5]+v|0,Q[6]=Q[6]+P|0,Q[7]=Q[7]+S|0},_doFinalize:function(){var g=this._data,w=g.words,Q=8*this._nDataBytes,p=8*g.sigBytes;return w[p>>>5]|=128<<24-p%32,w[14+(p+64>>>9<<4)]=i.floor(Q/4294967296),w[15+(p+64>>>9<<4)]=Q,g.sigBytes=4*w.length,this._process(),this._hash},clone:function(){var g=a.clone.call(this);return g._hash=this._hash.clone(),g}});o.SHA256=a._createHelper(e),o.HmacSHA256=a._createHmacHelper(e)}(Math),c.SHA256}(n(757))},8342:function(T,I,n){"use strict";n(7042),T.exports=function(c){return function(i){var o=c,l=o.lib,h=l.WordArray,a=l.Hasher,E=o.x64.Word,u=o.algo,C=[],e=[],f=[];!function(){for(var Q=1,p=0,Y=0;Y<24;Y++){C[Q+5*p]=(Y+1)*(Y+2)/2%64;var d=(2*Q+3*p)%5;Q=p%5,p=d}for(Q=0;Q<5;Q++)for(p=0;p<5;p++)e[Q+5*p]=p+(2*Q+3*p)%5*5;for(var m=1,v=0;v<24;v++){for(var P=0,S=0,F=0;F<7;F++){if(1&m){var z=(1<>>24)|4278255360&(v<<24|v>>>8),(S=y[m]).high^=P=16711935&(P<<8|P>>>24)|4278255360&(P<<24|P>>>8),S.low^=v}for(var F=0;F<24;F++){for(var z=0;z<5;z++){for(var U=0,eA=0,sA=0;sA<5;sA++)U^=(S=y[z+5*sA]).high,eA^=S.low;var q=g[z];q.high=U,q.low=eA}for(z=0;z<5;z++){var BA=g[(z+4)%5],pA=g[(z+1)%5],lA=pA.high,cA=pA.low;for(U=BA.high^(lA<<1|cA>>>31),eA=BA.low^(cA<<1|lA>>>31),sA=0;sA<5;sA++)(S=y[z+5*sA]).high^=U,S.low^=eA}for(var gA=1;gA<25;gA++){var yA=(S=y[gA]).high,FA=S.low,_=C[gA];_<32?(U=yA<<_|FA>>>32-_,eA=FA<<_|yA>>>32-_):(U=FA<<_-32|yA>>>64-_,eA=yA<<_-32|FA>>>64-_);var MA=g[e[gA]];MA.high=U,MA.low=eA}var uA=g[0],QA=y[0];for(uA.high=QA.high,uA.low=QA.low,z=0;z<5;z++)for(sA=0;sA<5;sA++){var SA=g[gA=z+5*sA],bA=g[(z+1)%5+5*sA],XA=g[(z+2)%5+5*sA];(S=y[gA]).high=SA.high^~bA.high&XA.high,S.low=SA.low^~bA.low&XA.low}var S,X=f[F];(S=y[0]).high^=X.high,S.low^=X.low}},_doFinalize:function(){var p=this._data,Y=p.words,d=8*p.sigBytes,m=32*this.blockSize;Y[d>>>5]|=1<<24-d%32,Y[(i.ceil((d+1)/m)*m>>>5)-1]|=128,p.sigBytes=4*Y.length,this._process();for(var v=this._state,P=this.cfg.outputLength/8,S=P/8,F=[],z=0;z>>24)|4278255360&(eA<<24|eA>>>8),F.push(sA=16711935&(sA<<8|sA>>>24)|4278255360&(sA<<24|sA>>>8)),F.push(eA)}return new h.init(F,P)},clone:function(){for(var p=a.clone.call(this),Y=p._state=this._state.slice(0),y=0;y<25;y++)Y[y]=Y[y].clone();return p}});o.SHA3=a._createHelper(w),o.HmacSHA3=a._createHmacHelper(w)}(Math),c.SHA3}(n(757),n(2601))},8122:function(T,I,n){"use strict";T.exports=function(c){return l=(o=(i=c).x64).Word,h=o.WordArray,E=(a=i.algo).SHA384=(B=a.SHA512).extend({_doReset:function(){this._hash=new h.init([new l.init(3418070365,3238371032),new l.init(1654270250,914150663),new l.init(2438529370,812702999),new l.init(355462360,4144912697),new l.init(1731405415,4290775857),new l.init(2394180231,1750603025),new l.init(3675008525,1694076839),new l.init(1203062813,3204075428)])},_doFinalize:function(){var C=B._doFinalize.call(this);return C.sigBytes-=16,C}}),i.SHA384=B._createHelper(E),i.HmacSHA384=B._createHmacHelper(E),c.SHA384;var i,o,l,h,a,B,E}(n(757),n(2601),n(7991))},7991:function(T,I,n){"use strict";var i;i=function(c){return function(){var i=c,l=i.lib.Hasher,h=i.x64,a=h.Word,B=h.WordArray,E=i.algo;function u(){return a.create.apply(a,arguments)}var C=[u(1116352408,3609767458),u(1899447441,602891725),u(3049323471,3964484399),u(3921009573,2173295548),u(961987163,4081628472),u(1508970993,3053834265),u(2453635748,2937671579),u(2870763221,3664609560),u(3624381080,2734883394),u(310598401,1164996542),u(607225278,1323610764),u(1426881987,3590304994),u(1925078388,4068182383),u(2162078206,991336113),u(2614888103,633803317),u(3248222580,3479774868),u(3835390401,2666613458),u(4022224774,944711139),u(264347078,2341262773),u(604807628,2007800933),u(770255983,1495990901),u(1249150122,1856431235),u(1555081692,3175218132),u(1996064986,2198950837),u(2554220882,3999719339),u(2821834349,766784016),u(2952996808,2566594879),u(3210313671,3203337956),u(3336571891,1034457026),u(3584528711,2466948901),u(113926993,3758326383),u(338241895,168717936),u(666307205,1188179964),u(773529912,1546045734),u(1294757372,1522805485),u(1396182291,2643833823),u(1695183700,2343527390),u(1986661051,1014477480),u(2177026350,1206759142),u(2456956037,344077627),u(2730485921,1290863460),u(2820302411,3158454273),u(3259730800,3505952657),u(3345764771,106217008),u(3516065817,3606008344),u(3600352804,1432725776),u(4094571909,1467031594),u(275423344,851169720),u(430227734,3100823752),u(506948616,1363258195),u(659060556,3750685593),u(883997877,3785050280),u(958139571,3318307427),u(1322822218,3812723403),u(1537002063,2003034995),u(1747873779,3602036899),u(1955562222,1575990012),u(2024104815,1125592928),u(2227730452,2716904306),u(2361852424,442776044),u(2428436474,593698344),u(2756734187,3733110249),u(3204031479,2999351573),u(3329325298,3815920427),u(3391569614,3928383900),u(3515267271,566280711),u(3940187606,3454069534),u(4118630271,4000239992),u(116418474,1914138554),u(174292421,2731055270),u(289380356,3203993006),u(460393269,320620315),u(685471733,587496836),u(852142971,1086792851),u(1017036298,365543100),u(1126000580,2618297676),u(1288033470,3409855158),u(1501505948,4234509866),u(1607167915,987167468),u(1816402316,1246189591)],e=[];!function(){for(var g=0;g<80;g++)e[g]=u()}();var f=E.SHA512=l.extend({_doReset:function(){this._hash=new B.init([new a.init(1779033703,4089235720),new a.init(3144134277,2227873595),new a.init(1013904242,4271175723),new a.init(2773480762,1595750129),new a.init(1359893119,2917565137),new a.init(2600822924,725511199),new a.init(528734635,4215389547),new a.init(1541459225,327033209)])},_doProcessBlock:function(w,Q){for(var p=this._hash.words,Y=p[0],y=p[1],d=p[2],m=p[3],v=p[4],P=p[5],S=p[6],F=p[7],z=Y.high,U=Y.low,eA=y.high,sA=y.low,q=d.high,BA=d.low,pA=m.high,lA=m.low,cA=v.high,gA=v.low,yA=P.high,FA=P.low,_=S.high,MA=S.low,uA=F.high,QA=F.low,SA=z,bA=U,XA=eA,X=sA,O=q,$=BA,W=pA,hA=lA,vA=cA,nA=gA,EA=yA,GA=FA,et=_,st=MA,TA=uA,it=QA,mt=0;mt<80;mt++){var It,ft,JA=e[mt];if(mt<16)ft=JA.high=0|w[Q+2*mt],It=JA.low=0|w[Q+2*mt+1];else{var WA=e[mt-15],rt=WA.high,xA=WA.low,ht=(xA>>>1|rt<<31)^(xA>>>8|rt<<24)^(xA>>>7|rt<<25),Yt=e[mt-2],OA=Yt.high,H=Yt.low,b=(H>>>19|OA<<13)^(H<<3|OA>>>29)^(H>>>6|OA<<26),CA=e[mt-7],rA=e[mt-16],Ft=rA.low;JA.high=ft=(ft=(ft=((rt>>>1|xA<<31)^(rt>>>8|xA<<24)^rt>>>7)+CA.high+((It=ht+CA.low)>>>0>>0?1:0))+((OA>>>19|H<<13)^(OA<<3|H>>>29)^OA>>>6)+((It+=b)>>>0>>0?1:0))+rA.high+((It+=Ft)>>>0>>0?1:0),JA.low=It}var ie,j=vA&EA^~vA&et,qA=nA&GA^~nA&st,KA=SA&XA^SA&O^XA&O,lt=(bA>>>28|SA<<4)^(bA<<30|SA>>>2)^(bA<<25|SA>>>7),Rt=C[mt],Le=Rt.low,te=TA+((vA>>>14|nA<<18)^(vA>>>18|nA<<14)^(vA<<23|nA>>>9))+((ie=it+((nA>>>14|vA<<18)^(nA>>>18|vA<<14)^(nA<<23|vA>>>9)))>>>0>>0?1:0),ye=lt+(bA&X^bA&$^X&$);TA=et,it=st,et=EA,st=GA,EA=vA,GA=nA,vA=W+(te=(te=(te=te+j+((ie+=qA)>>>0>>0?1:0))+Rt.high+((ie+=Le)>>>0>>0?1:0))+ft+((ie+=It)>>>0>>0?1:0))+((nA=hA+ie|0)>>>0>>0?1:0)|0,W=O,hA=$,O=XA,$=X,XA=SA,X=bA,SA=te+(((SA>>>28|bA<<4)^(SA<<30|bA>>>2)^(SA<<25|bA>>>7))+KA+(ye>>>0>>0?1:0))+((bA=ie+ye|0)>>>0>>0?1:0)|0}U=Y.low=U+bA,Y.high=z+SA+(U>>>0>>0?1:0),sA=y.low=sA+X,y.high=eA+XA+(sA>>>0>>0?1:0),BA=d.low=BA+$,d.high=q+O+(BA>>>0<$>>>0?1:0),lA=m.low=lA+hA,m.high=pA+W+(lA>>>0>>0?1:0),gA=v.low=gA+nA,v.high=cA+vA+(gA>>>0>>0?1:0),FA=P.low=FA+GA,P.high=yA+EA+(FA>>>0>>0?1:0),MA=S.low=MA+st,S.high=_+et+(MA>>>0>>0?1:0),QA=F.low=QA+it,F.high=uA+TA+(QA>>>0>>0?1:0)},_doFinalize:function(){var w=this._data,Q=w.words,p=8*this._nDataBytes,Y=8*w.sigBytes;return Q[Y>>>5]|=128<<24-Y%32,Q[30+(Y+128>>>10<<5)]=Math.floor(p/4294967296),Q[31+(Y+128>>>10<<5)]=p,w.sigBytes=4*Q.length,this._process(),this._hash.toX32()},clone:function(){var w=l.clone.call(this);return w._hash=this._hash.clone(),w},blockSize:32});i.SHA512=l._createHelper(f),i.HmacSHA512=l._createHmacHelper(f)}(),c.SHA512},T.exports=i(n(757),n(2601))},8437:function(T,I,n){"use strict";n(7042),T.exports=function(c){return function(){var i=c,o=i.lib,l=o.WordArray,h=o.BlockCipher,a=i.algo,B=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],E=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],u=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],C=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],e=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=a.DES=h.extend({_doReset:function(){for(var y=this._key.words,d=[],m=0;m<56;m++){var v=B[m]-1;d[m]=y[v>>>5]>>>31-v%32&1}for(var P=this._subKeys=[],S=0;S<16;S++){var F=P[S]=[],z=u[S];for(m=0;m<24;m++)F[m/6|0]|=d[(E[m]-1+z)%28]<<31-m%6,F[4+(m/6|0)]|=d[28+(E[m+24]-1+z)%28]<<31-m%6;for(F[0]=F[0]<<1|F[0]>>>31,m=1;m<7;m++)F[m]=F[m]>>>4*(m-1)+3;F[7]=F[7]<<5|F[7]>>>27}var U=this._invSubKeys=[];for(m=0;m<16;m++)U[m]=P[15-m]},encryptBlock:function(Y,y){this._doCryptBlock(Y,y,this._subKeys)},decryptBlock:function(Y,y){this._doCryptBlock(Y,y,this._invSubKeys)},_doCryptBlock:function(Y,y,d){this._lBlock=Y[y],this._rBlock=Y[y+1],g.call(this,4,252645135),g.call(this,16,65535),w.call(this,2,858993459),w.call(this,8,16711935),g.call(this,1,1431655765);for(var m=0;m<16;m++){for(var v=d[m],P=this._lBlock,S=this._rBlock,F=0,z=0;z<8;z++)F|=C[z][((S^v[z])&e[z])>>>0];this._lBlock=S,this._rBlock=P^F}var U=this._lBlock;this._lBlock=this._rBlock,this._rBlock=U,g.call(this,1,1431655765),w.call(this,8,16711935),w.call(this,2,858993459),g.call(this,16,65535),g.call(this,4,252645135),Y[y]=this._lBlock,Y[y+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function g(p,Y){var y=(this._lBlock>>>p^this._rBlock)&Y;this._rBlock^=y,this._lBlock^=y<>>p^this._lBlock)&Y;this._lBlock^=y,this._rBlock^=y<192.");var d=y.slice(0,2),m=y.length<4?y.slice(0,2):y.slice(2,4),v=y.length<6?y.slice(0,2):y.slice(4,6);this._des1=f.createEncryptor(l.create(d)),this._des2=f.createEncryptor(l.create(m)),this._des3=f.createEncryptor(l.create(v))},encryptBlock:function(Y,y){this._des1.encryptBlock(Y,y),this._des2.decryptBlock(Y,y),this._des3.encryptBlock(Y,y)},decryptBlock:function(Y,y){this._des3.decryptBlock(Y,y),this._des2.encryptBlock(Y,y),this._des1.decryptBlock(Y,y)},keySize:6,ivSize:2,blockSize:2});i.TripleDES=h._createHelper(Q)}(),c.TripleDES}(n(757),n(7508),n(3440),n(3839),n(1582))},2601:function(T,I,n){"use strict";n(7042),T.exports=function(c){return h=(l=c.lib).Base,a=l.WordArray,(B=c.x64={}).Word=h.extend({init:function(e,f){this.high=e,this.low=f}}),B.WordArray=h.extend({init:function(e,f){e=this.words=e||[],this.sigBytes=null!=f?f:8*e.length},toX32:function(){for(var e=this.words,f=e.length,g=[],w=0;w=B.length?{done:!0}:{done:!1,value:B[C++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(B,E){(null==E||E>B.length)&&(E=B.length);for(var u=0,C=new Array(E);u=Q)){v.next=13;break}return v.next=13,[Q,p,f.tags[Y]];case 13:w=f.stateTable[1][d],Q=null;case 15:0!==w&&null==Q&&(Q=y),f.accepting[w]&&(p=y),0===w&&(w=1);case 18:y++,v.next=5;break;case 21:if(!(null!=Q&&null!=p&&p>=Q)){v.next=24;break}return v.next=24,[Q,p,f.tags[w]];case 24:case"end":return v.stop()}},g)}),e},E.apply=function(C,e){for(var g,f=c(this.match(C));!(g=f()).done;)for(var d,w=g.value,Q=w[0],p=w[1],y=c(w[2]);!(d=y()).done;){var m=d.value;"function"==typeof e[m]&&e[m](Q,p,C.slice(Q,p+1))}},B}()},8478:function(T,I,n){"use strict";var c=n(8823).Buffer;n(7042),n(6699);var i=n(3857),o=n(2635);T.exports=function(){function l(a){var B;for(this.data=a,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.text={};;){var E=this.readUInt32(),u="";for(B=0;B<4;B++)u+=String.fromCharCode(this.data[this.pos++]);switch(u){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"PLTE":this.palette=this.read(E);break;case"IDAT":for(B=0;B0)for(B=0;Bthis.data.length)throw new Error("Incomplete or corrupt PNG file")}}l.decode=function(B,E){return i.readFile(B,function(u,C){return new l(C).decode(function(f){return E(f)})})},l.load=function(B){return new l(i.readFileSync(B))};var h=l.prototype;return h.read=function(B){for(var E=new Array(B),u=0;u=2147483648)throw new RangeError('The value "'+B+'" is invalid for option "size"');var C=o(B);return E&&0!==E.length?"string"==typeof u?C.fill(E,u):C.fill(E):C.fill(0),C}),!l.kStringMaxLength)try{l.kStringMaxLength=c.binding("buffer").kStringMaxLength}catch(B){}l.constants||(l.constants={MAX_LENGTH:l.kMaxLength},l.kStringMaxLength&&(l.constants.MAX_STRING_LENGTH=l.kStringMaxLength)),T.exports=l},3361:function(T,I,n){"use strict";function c(g,w){var Q=Object.keys(g);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(g);w&&(p=p.filter(function(Y){return Object.getOwnPropertyDescriptor(g,Y).enumerable})),Q.push.apply(Q,p)}return Q}function o(g,w,Q){return w in g?Object.defineProperty(g,w,{value:Q,enumerable:!0,configurable:!0,writable:!0}):g[w]=Q,g}function h(g,w){for(var Q=0;Q0?this.tail.next=p:this.head=p,this.tail=p,++this.length}},{key:"unshift",value:function(Q){var p={data:Q,next:this.head};0===this.length&&(this.tail=p),this.head=p,++this.length}},{key:"shift",value:function(){if(0!==this.length){var Q=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,Q}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(Q){if(0===this.length)return"";for(var p=this.head,Y=""+p.data;p=p.next;)Y+=Q+p.data;return Y}},{key:"concat",value:function(Q){if(0===this.length)return E.alloc(0);for(var p=E.allocUnsafe(Q>>>0),Y=this.head,y=0;Y;)f(Y.data,p,y),y+=Y.data.length,Y=Y.next;return p}},{key:"consume",value:function(Q,p){var Y;return Qd.length?d.length:Q;if(y+=m===d.length?d:d.slice(0,Q),0==(Q-=m)){m===d.length?(++Y,this.head=p.next?p.next:this.tail=null):(this.head=p,p.data=d.slice(m));break}++Y}return this.length-=Y,y}},{key:"_getBuffer",value:function(Q){var p=E.allocUnsafe(Q),Y=this.head,y=1;for(Y.data.copy(p),Q-=Y.data.length;Y=Y.next;){var d=Y.data,m=Q>d.length?d.length:Q;if(d.copy(p,p.length-Q,0,m),0==(Q-=m)){m===d.length?(++y,this.head=Y.next?Y.next:this.tail=null):(this.head=Y,Y.data=d.slice(m));break}++y}return this.length-=y,p}},{key:e,value:function(Q,p){return C(this,function i(g){for(var w=1;wmA.length)&&(J=mA.length);for(var N=0,Z=new Array(J);N=mA.length?{done:!0}:{done:!1,value:mA[Z++]}},e:function(ut){throw ut},f:K}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var At,fA=!0,IA=!1;return{s:function(){N=mA[Symbol.iterator]()},n:function(){var ut=N.next();return fA=ut.done,ut},e:function(ut){IA=!0,At=ut},f:function(){try{!fA&&null!=N.return&&N.return()}finally{if(IA)throw At}}}}var FA=function(){function mA(){f(this,mA)}return w(mA,[{key:"toString",value:function(){throw new Error("Must be implemented by subclasses")}}]),mA}(),_=function(){function mA(){var J=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f(this,mA),this._items={},this.limits="boolean"!=typeof J.limits||J.limits}return w(mA,[{key:"add",value:function(N,Z){return this._items[N]=Z}},{key:"get",value:function(N){return this._items[N]}},{key:"toString",value:function(){var N=this,Z=Object.keys(this._items).sort(function(Qt,vt){return N._compareKeys(Qt,vt)}),K=["<<"];if(this.limits&&Z.length>1){var IA=Z[Z.length-1];K.push(" /Limits ".concat(bA.convert([this._dataForKey(Z[0]),this._dataForKey(IA)])))}K.push(" /".concat(this._keysName()," ["));var nt,At=yA(Z);try{for(At.s();!(nt=At.n()).done;){var ut=nt.value;K.push(" ".concat(bA.convert(this._dataForKey(ut))," ").concat(bA.convert(this._items[ut])))}}catch(Qt){At.e(Qt)}finally{At.f()}return K.push("]"),K.push(">>"),K.join("\n")}},{key:"_compareKeys",value:function(){throw new Error("Must be implemented by subclasses")}},{key:"_keysName",value:function(){throw new Error("Must be implemented by subclasses")}},{key:"_dataForKey",value:function(){throw new Error("Must be implemented by subclasses")}}]),mA}(),MA=function(J,N){return(Array(N+1).join("0")+J).slice(-N)},uA=/[\n\r\t\b\f()\\]/g,QA={"\n":"\\n","\r":"\\r","\t":"\\t","\b":"\\b","\f":"\\f","\\":"\\\\","(":"\\(",")":"\\)"},SA=function(J){var N=J.length;if(1&N)throw new Error("Buffer length must be even");for(var Z=0,K=N-1;Z1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof N)return"/".concat(N);if(N instanceof String){for(var K=N,fA=!1,IA=0,At=K.length;IA127){fA=!0;break}var nt;return nt=fA?SA(i.from("\ufeff".concat(K),"utf16le")):i.from(K.valueOf(),"ascii"),K=(K=Z?Z(nt).toString("binary"):nt.toString("binary")).replace(uA,function(Ot){return QA[Ot]}),"(".concat(K,")")}if(i.isBuffer(N))return"<".concat(N.toString("hex"),">");if(N instanceof FA||N instanceof _)return N.toString();if(N instanceof Date){var ut="D:".concat(MA(N.getUTCFullYear(),4))+MA(N.getUTCMonth()+1,2)+MA(N.getUTCDate(),2)+MA(N.getUTCHours(),2)+MA(N.getUTCMinutes(),2)+MA(N.getUTCSeconds(),2)+"Z";return Z&&(ut=(ut=Z(i.from(ut,"ascii")).toString("binary")).replace(uA,function(Ot){return QA[Ot]})),"(".concat(ut,")")}if(Array.isArray(N)){var Qt=N.map(function(Ot){return mA.convert(Ot,Z)}).join(" ");return"[".concat(Qt,"]")}if("[object Object]"==={}.toString.call(N)){var vt=["<<"];for(var xt in N){var Tt=N[xt];vt.push("/".concat(xt," ").concat(mA.convert(Tt,Z)))}return vt.push(">>"),vt.join("\n")}return"number"==typeof N?mA.number(N):"".concat(N)}},{key:"number",value:function(N){if(N>-1e21&&N<1e21)return Math.round(1e6*N)/1e6;throw new Error("unsupported number: ".concat(N))}}]),mA}(),XA=function(mA){y(N,mA);var J=F(N);function N(Z,K){var fA,IA=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return f(this,N),(fA=J.call(this)).document=Z,fA.id=K,fA.data=IA,fA.gen=0,fA.compress=fA.document.compress&&!fA.data.Filter,fA.uncompressedLength=0,fA.buffer=[],fA}return w(N,[{key:"write",value:function(K){if(i.isBuffer(K)||(K=i.from(K+"\n","binary")),this.uncompressedLength+=K.length,null==this.data.Length&&(this.data.Length=0),this.buffer.push(K),this.data.Length+=K.length,this.compress)return this.data.Filter="FlateDecode"}},{key:"end",value:function(K){return K&&this.write(K),this.finalize()}},{key:"finalize",value:function(){this.offset=this.document._offset;var K=this.document._security?this.document._security.getEncryptFn(this.id,this.gen):null;this.buffer.length&&(this.buffer=i.concat(this.buffer),this.compress&&(this.buffer=l.default.deflateSync(this.buffer)),K&&(this.buffer=K(this.buffer)),this.data.Length=this.buffer.length),this.document._write("".concat(this.id," ").concat(this.gen," obj")),this.document._write(bA.convert(this.data,K)),this.buffer.length&&(this.document._write("stream"),this.document._write(this.buffer),this.buffer=[],this.document._write("\nendstream")),this.document._write("endobj"),this.document._refEnd(this)}},{key:"toString",value:function(){return"".concat(this.id," ").concat(this.gen," R")}}]),N}(FA),X={top:72,left:72,bottom:72,right:72},O={"4A0":[4767.87,6740.79],"2A0":[3370.39,4767.87],A0:[2383.94,3370.39],A1:[1683.78,2383.94],A2:[1190.55,1683.78],A3:[841.89,1190.55],A4:[595.28,841.89],A5:[419.53,595.28],A6:[297.64,419.53],A7:[209.76,297.64],A8:[147.4,209.76],A9:[104.88,147.4],A10:[73.7,104.88],B0:[2834.65,4008.19],B1:[2004.09,2834.65],B2:[1417.32,2004.09],B3:[1000.63,1417.32],B4:[708.66,1000.63],B5:[498.9,708.66],B6:[354.33,498.9],B7:[249.45,354.33],B8:[175.75,249.45],B9:[124.72,175.75],B10:[87.87,124.72],C0:[2599.37,3676.54],C1:[1836.85,2599.37],C2:[1298.27,1836.85],C3:[918.43,1298.27],C4:[649.13,918.43],C5:[459.21,649.13],C6:[323.15,459.21],C7:[229.61,323.15],C8:[161.57,229.61],C9:[113.39,161.57],C10:[79.37,113.39],RA0:[2437.8,3458.27],RA1:[1729.13,2437.8],RA2:[1218.9,1729.13],RA3:[864.57,1218.9],RA4:[609.45,864.57],SRA0:[2551.18,3628.35],SRA1:[1814.17,2551.18],SRA2:[1275.59,1814.17],SRA3:[907.09,1275.59],SRA4:[637.8,907.09],EXECUTIVE:[521.86,756],FOLIO:[612,936],LEGAL:[612,1008],LETTER:[612,792],TABLOID:[792,1224]},$=function(){function mA(J){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};f(this,mA),this.document=J,this.size=N.size||"letter",this.layout=N.layout||"portrait",this.margins="number"==typeof N.margin?{top:N.margin,left:N.margin,bottom:N.margin,right:N.margin}:N.margins||X;var Z=Array.isArray(this.size)?this.size:O[this.size.toUpperCase()];this.width=Z["portrait"===this.layout?0:1],this.height=Z["portrait"===this.layout?1:0],this.content=this.document.ref(),this.resources=this.document.ref({ProcSet:["PDF","Text","ImageB","ImageC","ImageI"]}),this.dictionary=this.document.ref({Type:"Page",Parent:this.document._root.data.Pages,MediaBox:[0,0,this.width,this.height],Contents:this.content,Resources:this.resources}),this.markings=[]}return w(mA,[{key:"maxY",value:function(){return this.height-this.margins.bottom}},{key:"write",value:function(N){return this.content.write(N)}},{key:"end",value:function(){return this.dictionary.end(),this.resources.end(),this.content.end()}},{key:"fonts",get:function(){var N=this.resources.data;return null!=N.Font?N.Font:N.Font={}}},{key:"xobjects",get:function(){var N=this.resources.data;return null!=N.XObject?N.XObject:N.XObject={}}},{key:"ext_gstates",get:function(){var N=this.resources.data;return null!=N.ExtGState?N.ExtGState:N.ExtGState={}}},{key:"patterns",get:function(){var N=this.resources.data;return null!=N.Pattern?N.Pattern:N.Pattern={}}},{key:"colorSpaces",get:function(){var N=this.resources.data;return N.ColorSpace||(N.ColorSpace={})}},{key:"annotations",get:function(){var N=this.dictionary.data;return null!=N.Annots?N.Annots:N.Annots=[]}},{key:"structParentTreeKey",get:function(){var N=this.dictionary.data;return null!=N.StructParents?N.StructParents:N.StructParents=this.document.createStructParentTreeNextKey()}}]),mA}(),W=function(mA){y(N,mA);var J=F(N);function N(){return f(this,N),J.apply(this,arguments)}return w(N,[{key:"_compareKeys",value:function(K,fA){return K.localeCompare(fA)}},{key:"_keysName",value:function(){return"Names"}},{key:"_dataForKey",value:function(K){return new String(K)}}]),N}(_);function hA(mA,J){if(mA=J[fA]&&mA<=J[fA+1])return!0;mA>J[fA+1]?N=K+1:Z=K-1}return!1}var vA=[545,545,564,591,686,687,751,767,848,863,880,883,886,889,891,893,895,899,907,907,909,909,930,930,975,975,1015,1023,1159,1159,1231,1231,1270,1271,1274,1279,1296,1328,1367,1368,1376,1376,1416,1416,1419,1424,1442,1442,1466,1466,1477,1487,1515,1519,1525,1547,1549,1562,1564,1566,1568,1568,1595,1599,1622,1631,1774,1775,1791,1791,1806,1806,1837,1839,1867,1919,1970,2304,2308,2308,2362,2363,2382,2383,2389,2391,2417,2432,2436,2436,2445,2446,2449,2450,2473,2473,2481,2481,2483,2485,2490,2491,2493,2493,2501,2502,2505,2506,2510,2518,2520,2523,2526,2526,2532,2533,2555,2561,2563,2564,2571,2574,2577,2578,2601,2601,2609,2609,2612,2612,2615,2615,2618,2619,2621,2621,2627,2630,2633,2634,2638,2648,2653,2653,2655,2661,2677,2688,2692,2692,2700,2700,2702,2702,2706,2706,2729,2729,2737,2737,2740,2740,2746,2747,2758,2758,2762,2762,2766,2767,2769,2783,2785,2789,2800,2816,2820,2820,2829,2830,2833,2834,2857,2857,2865,2865,2868,2869,2874,2875,2884,2886,2889,2890,2894,2901,2904,2907,2910,2910,2914,2917,2929,2945,2948,2948,2955,2957,2961,2961,2966,2968,2971,2971,2973,2973,2976,2978,2981,2983,2987,2989,2998,2998,3002,3005,3011,3013,3017,3017,3022,3030,3032,3046,3059,3072,3076,3076,3085,3085,3089,3089,3113,3113,3124,3124,3130,3133,3141,3141,3145,3145,3150,3156,3159,3167,3170,3173,3184,3201,3204,3204,3213,3213,3217,3217,3241,3241,3252,3252,3258,3261,3269,3269,3273,3273,3278,3284,3287,3293,3295,3295,3298,3301,3312,3329,3332,3332,3341,3341,3345,3345,3369,3369,3386,3389,3396,3397,3401,3401,3406,3414,3416,3423,3426,3429,3440,3457,3460,3460,3479,3481,3506,3506,3516,3516,3518,3519,3527,3529,3531,3534,3541,3541,3543,3543,3552,3569,3573,3584,3643,3646,3676,3712,3715,3715,3717,3718,3721,3721,3723,3724,3726,3731,3736,3736,3744,3744,3748,3748,3750,3750,3752,3753,3756,3756,3770,3770,3774,3775,3781,3781,3783,3783,3790,3791,3802,3803,3806,3839,3912,3912,3947,3952,3980,3983,3992,3992,4029,4029,4045,4046,4048,4095,4130,4130,4136,4136,4139,4139,4147,4149,4154,4159,4186,4255,4294,4303,4345,4346,4348,4351,4442,4446,4515,4519,4602,4607,4615,4615,4679,4679,4681,4681,4686,4687,4695,4695,4697,4697,4702,4703,4743,4743,4745,4745,4750,4751,4783,4783,4785,4785,4790,4791,4799,4799,4801,4801,4806,4807,4815,4815,4823,4823,4847,4847,4879,4879,4881,4881,4886,4887,4895,4895,4935,4935,4955,4960,4989,5023,5109,5120,5751,5759,5789,5791,5873,5887,5901,5901,5909,5919,5943,5951,5972,5983,5997,5997,6001,6001,6004,6015,6109,6111,6122,6143,6159,6159,6170,6175,6264,6271,6314,7679,7836,7839,7930,7935,7958,7959,7966,7967,8006,8007,8014,8015,8024,8024,8026,8026,8028,8028,8030,8030,8062,8063,8117,8117,8133,8133,8148,8149,8156,8156,8176,8177,8181,8181,8191,8191,8275,8278,8280,8286,8292,8297,8306,8307,8335,8351,8370,8399,8427,8447,8507,8508,8524,8530,8580,8591,9167,9215,9255,9279,9291,9311,9471,9471,9748,9749,9752,9752,9854,9855,9866,9984,9989,9989,9994,9995,10024,10024,10060,10060,10062,10062,10067,10069,10071,10071,10079,10080,10133,10135,10160,10160,10175,10191,10220,10223,11008,11903,11930,11930,12020,12031,12246,12271,12284,12287,12352,12352,12439,12440,12544,12548,12589,12592,12687,12687,12728,12783,12829,12831,12868,12880,12924,12926,13004,13007,13055,13055,13175,13178,13278,13279,13311,13311,19894,19967,40870,40959,42125,42127,42183,44031,55204,55295,64046,64047,64107,64255,64263,64274,64280,64284,64311,64311,64317,64317,64319,64319,64322,64322,64325,64325,64434,64466,64832,64847,64912,64913,64968,64975,65021,65023,65040,65055,65060,65071,65095,65096,65107,65107,65127,65127,65132,65135,65141,65141,65277,65278,65280,65280,65471,65473,65480,65481,65488,65489,65496,65497,65501,65503,65511,65511,65519,65528,65536,66303,66335,66335,66340,66351,66379,66559,66598,66599,66638,118783,119030,119039,119079,119081,119262,119807,119893,119893,119965,119965,119968,119969,119971,119972,119975,119976,119981,119981,119994,119994,119996,119996,120001,120001,120004,120004,120070,120070,120075,120076,120085,120085,120093,120093,120122,120122,120127,120127,120133,120133,120135,120137,120145,120145,120484,120487,120778,120781,120832,131069,173783,194559,195102,196605,196608,262141,262144,327677,327680,393213,393216,458749,458752,524285,524288,589821,589824,655357,655360,720893,720896,786429,786432,851965,851968,917501,917504,917504,917506,917535,917632,983037],nA=function(J){return hA(J,vA)},EA=[173,173,847,847,6150,6150,6155,6155,6156,6156,6157,6157,8203,8203,8204,8204,8205,8205,8288,8288,65024,65024,65025,65025,65026,65026,65027,65027,65028,65028,65029,65029,65030,65030,65031,65031,65032,65032,65033,65033,65034,65034,65035,65035,65036,65036,65037,65037,65038,65038,65039,65039,65279,65279],et=[160,160,5760,5760,8192,8192,8193,8193,8194,8194,8195,8195,8196,8196,8197,8197,8198,8198,8199,8199,8200,8200,8201,8201,8202,8202,8203,8203,8239,8239,8287,8287,12288,12288],TA=[128,159,1757,1757,1807,1807,6158,6158,8204,8204,8205,8205,8232,8232,8233,8233,8288,8288,8289,8289,8290,8290,8291,8291,8298,8303,65279,65279,65529,65532,119155,119162],it=[64976,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1114110,1114111],mt=[0,31,127,127,832,832,833,833,8206,8206,8207,8207,8234,8234,8235,8235,8236,8236,8237,8237,8238,8238,8298,8298,8299,8299,8300,8300,8301,8301,8302,8302,8303,8303,12272,12283,55296,57343,57344,63743,65529,65529,65530,65530,65531,65531,65532,65532,65533,65533,917505,917505,917536,917631,983040,1048573,1048576,1114109],It=function(J){return hA(J,et)||hA(J,mt)||hA(J,TA)||hA(J,it)},ft=[1470,1470,1472,1472,1475,1475,1488,1514,1520,1524,1563,1563,1567,1567,1569,1594,1600,1610,1645,1647,1649,1749,1757,1757,1765,1766,1786,1790,1792,1805,1808,1808,1810,1836,1920,1957,1969,1969,8207,8207,64285,64285,64287,64296,64298,64310,64312,64316,64318,64318,64320,64321,64323,64324,64326,64433,64467,64829,64848,64911,64914,64967,65008,65020,65136,65140,65142,65276],JA=function(J){return hA(J,ft)},WA=[65,90,97,122,170,170,181,181,186,186,192,214,216,246,248,544,546,563,592,685,688,696,699,705,720,721,736,740,750,750,890,890,902,902,904,906,908,908,910,929,931,974,976,1013,1024,1154,1162,1230,1232,1269,1272,1273,1280,1295,1329,1366,1369,1375,1377,1415,1417,1417,2307,2307,2309,2361,2365,2368,2377,2380,2384,2384,2392,2401,2404,2416,2434,2435,2437,2444,2447,2448,2451,2472,2474,2480,2482,2482,2486,2489,2494,2496,2503,2504,2507,2508,2519,2519,2524,2525,2527,2529,2534,2545,2548,2554,2565,2570,2575,2576,2579,2600,2602,2608,2610,2611,2613,2614,2616,2617,2622,2624,2649,2652,2654,2654,2662,2671,2674,2676,2691,2691,2693,2699,2701,2701,2703,2705,2707,2728,2730,2736,2738,2739,2741,2745,2749,2752,2761,2761,2763,2764,2768,2768,2784,2784,2790,2799,2818,2819,2821,2828,2831,2832,2835,2856,2858,2864,2866,2867,2870,2873,2877,2878,2880,2880,2887,2888,2891,2892,2903,2903,2908,2909,2911,2913,2918,2928,2947,2947,2949,2954,2958,2960,2962,2965,2969,2970,2972,2972,2974,2975,2979,2980,2984,2986,2990,2997,2999,3001,3006,3007,3009,3010,3014,3016,3018,3020,3031,3031,3047,3058,3073,3075,3077,3084,3086,3088,3090,3112,3114,3123,3125,3129,3137,3140,3168,3169,3174,3183,3202,3203,3205,3212,3214,3216,3218,3240,3242,3251,3253,3257,3262,3262,3264,3268,3271,3272,3274,3275,3285,3286,3294,3294,3296,3297,3302,3311,3330,3331,3333,3340,3342,3344,3346,3368,3370,3385,3390,3392,3398,3400,3402,3404,3415,3415,3424,3425,3430,3439,3458,3459,3461,3478,3482,3505,3507,3515,3517,3517,3520,3526,3535,3537,3544,3551,3570,3572,3585,3632,3634,3635,3648,3654,3663,3675,3713,3714,3716,3716,3719,3720,3722,3722,3725,3725,3732,3735,3737,3743,3745,3747,3749,3749,3751,3751,3754,3755,3757,3760,3762,3763,3773,3773,3776,3780,3782,3782,3792,3801,3804,3805,3840,3863,3866,3892,3894,3894,3896,3896,3902,3911,3913,3946,3967,3967,3973,3973,3976,3979,4030,4037,4039,4044,4047,4047,4096,4129,4131,4135,4137,4138,4140,4140,4145,4145,4152,4152,4160,4183,4256,4293,4304,4344,4347,4347,4352,4441,4447,4514,4520,4601,4608,4614,4616,4678,4680,4680,4682,4685,4688,4694,4696,4696,4698,4701,4704,4742,4744,4744,4746,4749,4752,4782,4784,4784,4786,4789,4792,4798,4800,4800,4802,4805,4808,4814,4816,4822,4824,4846,4848,4878,4880,4880,4882,4885,4888,4894,4896,4934,4936,4954,4961,4988,5024,5108,5121,5750,5761,5786,5792,5872,5888,5900,5902,5905,5920,5937,5941,5942,5952,5969,5984,5996,5998,6e3,6016,6070,6078,6085,6087,6088,6100,6106,6108,6108,6112,6121,6160,6169,6176,6263,6272,6312,7680,7835,7840,7929,7936,7957,7960,7965,7968,8005,8008,8013,8016,8023,8025,8025,8027,8027,8029,8029,8031,8061,8064,8116,8118,8124,8126,8126,8130,8132,8134,8140,8144,8147,8150,8155,8160,8172,8178,8180,8182,8188,8206,8206,8305,8305,8319,8319,8450,8450,8455,8455,8458,8467,8469,8469,8473,8477,8484,8484,8486,8486,8488,8488,8490,8493,8495,8497,8499,8505,8509,8511,8517,8521,8544,8579,9014,9082,9109,9109,9372,9449,12293,12295,12321,12329,12337,12341,12344,12348,12353,12438,12445,12447,12449,12538,12540,12543,12549,12588,12593,12686,12688,12727,12784,12828,12832,12867,12896,12923,12927,12976,12992,13003,13008,13054,13056,13174,13179,13277,13280,13310,13312,19893,19968,40869,40960,42124,44032,55203,55296,64045,64048,64106,64256,64262,64275,64279,65313,65338,65345,65370,65382,65470,65474,65479,65482,65487,65490,65495,65498,65500,66304,66334,66336,66339,66352,66378,66560,66597,66600,66637,118784,119029,119040,119078,119082,119142,119146,119154,119171,119172,119180,119209,119214,119261,119808,119892,119894,119964,119966,119967,119970,119970,119973,119974,119977,119980,119982,119993,119995,119995,119997,12e4,120002,120003,120005,120069,120071,120074,120077,120084,120086,120092,120094,120121,120123,120126,120128,120132,120134,120134,120138,120144,120146,120483,120488,120777,131072,173782,194560,195101,983040,1048573,1048576,1114109],rt=function(J){return hA(J,WA)},xA=function(J){return hA(J,et)},Mt=function(J){return hA(J,EA)},ht=function(J){return J.codePointAt(0)},Yt=function(J){return J[0]},OA=function(J){return J[J.length-1]};function H(mA){for(var J=[],N=mA.length,Z=0;Z=55296&&K<=56319&&N>Z+1){var fA=mA.charCodeAt(Z+1);if(fA>=56320&&fA<=57343){J.push(1024*(K-55296)+fA-56320+65536),Z+=1;continue}}J.push(K)}return J}function k(mA){var J=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"!=typeof mA)throw new TypeError("Expected string.");if(0===mA.length)return"";var N=H(mA).map(function(vt){return xA(vt)?32:vt}).filter(function(vt){return!Mt(vt)}),Z=String.fromCodePoint.apply(null,N).normalize("NFKC"),K=H(Z);if(K.some(It))throw new Error("Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3");if(!0!==J.allowUnassigned&&K.some(nA))throw new Error("Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5");var At=K.some(JA),nt=K.some(rt);if(At&&nt)throw new Error("String must not contain RandALCat and LCat at the same time, see https://tools.ietf.org/html/rfc3454#section-6");var ut=JA(ht(Yt(Z))),Qt=JA(ht(OA(Z)));if(At&&(!ut||!Qt))throw new Error("Bidirectional RandALCat character must be the first and the last character of the string, see https://tools.ietf.org/html/rfc3454#section-6");return Z}var b=function(){function mA(J){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(f(this,mA),!N.ownerPassword&&!N.userPassword)throw new Error("None of owner password and user password is defined.");this.document=J,this._setupEncryption(N)}return w(mA,null,[{key:"generateFileID",value:function(){var N=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},Z="".concat(N.CreationDate.getTime(),"\n");for(var K in N)!N.hasOwnProperty(K)||(Z+="".concat(K,": ").concat(N[K].valueOf(),"\n"));return Vt(h.default.MD5(Z))}},{key:"generateRandomWordArray",value:function(N){return h.default.lib.WordArray.random(N)}},{key:"create",value:function(N){var Z=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Z.ownerPassword||Z.userPassword?new mA(N,Z):null}}]),w(mA,[{key:"_setupEncryption",value:function(N){switch(N.pdfVersion){case"1.4":case"1.5":this.version=2;break;case"1.6":case"1.7":this.version=4;break;case"1.7ext3":this.version=5;break;default:this.version=1}var Z={Filter:"Standard"};switch(this.version){case 1:case 2:case 4:this._setupEncryptionV1V2V4(this.version,Z,N);break;case 5:this._setupEncryptionV5(Z,N)}this.dictionary=this.document.ref(Z)}},{key:"_setupEncryptionV1V2V4",value:function(N,Z,K){var fA,IA;switch(N){case 1:fA=2,this.keyBits=40,IA=function CA(){var mA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},J=-64;return mA.printing&&(J|=4),mA.modifying&&(J|=8),mA.copying&&(J|=16),mA.annotating&&(J|=32),J}(K.permissions);break;case 2:fA=3,this.keyBits=128,IA=wA(K.permissions);break;case 4:fA=4,this.keyBits=128,IA=wA(K.permissions)}var Qt,At=Lt(K.userPassword),nt=K.ownerPassword?Lt(K.ownerPassword):At,ut=function gt(mA,J,N,Z){for(var K=Z,fA=mA>=3?51:1,IA=0;IA=3?20:1;for(var ut=0;ut=3?51:1,nt=0;nt=2&&(Z.Length=this.keyBits),4===N&&(Z.CF={StdCF:{AuthEvent:"DocOpen",CFM:"AESV2",Length:this.keyBits/8}},Z.StmF="StdCF",Z.StrF="StdCF"),Z.R=fA,Z.O=Vt(ut),Z.U=Vt(Qt),Z.P=IA}},{key:"_setupEncryptionV5",value:function(N,Z){this.keyBits=256;var K=wA(Z.permissions),fA=yt(Z.userPassword),IA=Z.ownerPassword?yt(Z.ownerPassword):fA;this.encryptionKey=function jA(mA){return mA(32)}(mA.generateRandomWordArray);var At=function j(mA,J){var N=J(8),Z=J(8);return h.default.SHA256(mA.clone().concat(N)).concat(N).concat(Z)}(fA,mA.generateRandomWordArray),ut=function qA(mA,J,N){var Z=h.default.SHA256(mA.clone().concat(J)),K={mode:h.default.mode.CBC,padding:h.default.pad.NoPadding,iv:h.default.lib.WordArray.create(null,16)};return h.default.AES.encrypt(N,Z,K).ciphertext}(fA,h.default.lib.WordArray.create(At.words.slice(10,12),8),this.encryptionKey),Qt=function KA(mA,J,N){var Z=N(8),K=N(8);return h.default.SHA256(mA.clone().concat(Z).concat(J)).concat(Z).concat(K)}(IA,At,mA.generateRandomWordArray),xt=function DA(mA,J,N,Z){var K=h.default.SHA256(mA.clone().concat(J).concat(N)),fA={mode:h.default.mode.CBC,padding:h.default.pad.NoPadding,iv:h.default.lib.WordArray.create(null,16)};return h.default.AES.encrypt(Z,K,fA).ciphertext}(IA,h.default.lib.WordArray.create(Qt.words.slice(10,12),8),At,this.encryptionKey),Tt=function lt(mA,J,N){var Z=h.default.lib.WordArray.create([Rt(mA),4294967295,1415668834],12).concat(N(4));return h.default.AES.encrypt(Z,J,{mode:h.default.mode.ECB,padding:h.default.pad.NoPadding}).ciphertext}(K,this.encryptionKey,mA.generateRandomWordArray);N.V=5,N.Length=this.keyBits,N.CF={StdCF:{AuthEvent:"DocOpen",CFM:"AESV3",Length:this.keyBits/8}},N.StmF="StdCF",N.StrF="StdCF",N.R=5,N.O=Vt(Qt),N.OE=Vt(xt),N.U=Vt(At),N.UE=Vt(ut),N.P=K,N.Perms=Vt(Tt)}},{key:"getEncryptFn",value:function(N,Z){var K,IA;if(this.version<5&&(K=this.encryptionKey.clone().concat(h.default.lib.WordArray.create([(255&N)<<24|(65280&N)<<8|N>>8&65280|255&Z,(65280&Z)<<16],5))),1===this.version||2===this.version){var fA=h.default.MD5(K);return fA.sigBytes=Math.min(16,this.keyBits/8+5),function(ut){return Vt(h.default.RC4.encrypt(h.default.lib.WordArray.create(ut),fA).ciphertext)}}IA=4===this.version?h.default.MD5(K.concat(h.default.lib.WordArray.create([1933667412],4))):this.encryptionKey;var At=mA.generateRandomWordArray(16),nt={mode:h.default.mode.CBC,padding:h.default.pad.Pkcs7,iv:At};return function(ut){return Vt(At.clone().concat(h.default.AES.encrypt(h.default.lib.WordArray.create(ut),IA,nt).ciphertext))}}},{key:"end",value:function(){this.dictionary.end()}}]),mA}();function wA(){var mA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},J=-3904;return"lowResolution"===mA.printing&&(J|=4),"highResolution"===mA.printing&&(J|=2052),mA.modifying&&(J|=8),mA.copying&&(J|=16),mA.annotating&&(J|=32),mA.fillingForms&&(J|=256),mA.contentAccessibility&&(J|=512),mA.documentAssembly&&(J|=1024),J}function Lt(){for(var mA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",J=i.alloc(32),N=mA.length,Z=0;Z255)throw new Error("Password contains one or more invalid characters.");J[Z]=K,Z++}for(;Z<32;)J[Z]=Le[Z-N],Z++;return h.default.lib.WordArray.create(J)}function yt(){var mA=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";mA=unescape(encodeURIComponent(k(mA)));for(var J=Math.min(127,mA.length),N=i.alloc(J),Z=0;Z>8&65280|mA>>24&255}function Vt(mA){for(var J=[],N=0;N>8*(3-N%4)&255);return i.from(J)}var Jt,bt,Xt,oe,In,dn,Le=[40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122],ie=bA.number,te=function(){function mA(J){f(this,mA),this.doc=J,this.stops=[],this.embedded=!1,this.transform=[1,0,0,1,0,0]}return w(mA,[{key:"stop",value:function(N,Z,K){if(null==K&&(K=1),Z=this.doc._normalizeColor(Z),0===this.stops.length)if(3===Z.length)this._colorSpace="DeviceRGB";else if(4===Z.length)this._colorSpace="DeviceCMYK";else{if(1!==Z.length)throw new Error("Unknown color space");this._colorSpace="DeviceGray"}else if("DeviceRGB"===this._colorSpace&&3!==Z.length||"DeviceCMYK"===this._colorSpace&&4!==Z.length||"DeviceGray"===this._colorSpace&&1!==Z.length)throw new Error("All gradient stops must use the same color space");return K=Math.max(0,Math.min(1,K)),this.stops.push([N,Z,K]),this}},{key:"setTransform",value:function(N,Z,K,fA,IA,At){return this.transform=[N,Z,K,fA,IA,At],this}},{key:"embed",value:function(N){var Z,K=this.stops.length;if(0!==K){this.embedded=!0,this.matrix=N;var fA=this.stops[K-1];fA[0]<1&&this.stops.push([1,fA[1],fA[2]]);for(var IA=[],At=[],nt=[],ut=0;ut>16,N>>8&255,255&N]}else Gn[J]&&(J=Gn[J]);return Array.isArray(J)?(3===J.length?J=J.map(function(Z){return Z/255}):4===J.length&&(J=J.map(function(Z){return Z/100})),J):null},_setColor:function(J,N){return J instanceof en?(J.apply(N),!0):Array.isArray(J)&&J[0]instanceof Xe?(J[0].apply(N,J[1]),!0):this._setColorCore(J,N)},_setColorCore:function(J,N){if(!(J=this._normalizeColor(J)))return!1;var Z=N?"SCN":"scn",K=this._getColorSpace(J);return this._setColorSpace(K,N),J=J.join(" "),this.addContent("".concat(J," ").concat(Z)),!0},_setColorSpace:function(J,N){var Z=N?"CS":"cs";return this.addContent("/".concat(J," ").concat(Z))},_getColorSpace:function(J){return 4===J.length?"DeviceCMYK":"DeviceRGB"},fillColor:function(J,N){return this._setColor(J,!1)&&this.fillOpacity(N),this._fillColor=[J,N],this},strokeColor:function(J,N){return this._setColor(J,!0)&&this.strokeOpacity(N),this},opacity:function(J){return this._doOpacity(J,J),this},fillOpacity:function(J){return this._doOpacity(J,null),this},strokeOpacity:function(J){return this._doOpacity(null,J),this},_doOpacity:function(J,N){var Z,K;if(null!=J||null!=N){null!=J&&(J=Math.max(0,Math.min(1,J))),null!=N&&(N=Math.max(0,Math.min(1,N)));var fA="".concat(J,"_").concat(N);if(this._opacityRegistry[fA]){var IA=z(this._opacityRegistry[fA],2);Z=IA[0],K=IA[1]}else{Z={Type:"ExtGState"},null!=J&&(Z.ca=J),null!=N&&(Z.CA=N),(Z=this.ref(Z)).end();var At=++this._opacityCount;K="Gs".concat(At),this._opacityRegistry[fA]=[Z,K]}return this.page.ext_gstates[K]=Z,this.addContent("/".concat(K," gs"))}},linearGradient:function(J,N,Z,K){return new Te(this,J,N,Z,K)},radialGradient:function(J,N,Z,K,fA,IA){return new nn(this,J,N,Z,K,fA,IA)},pattern:function(J,N,Z,K){return new Xe(this,J,N,Z,K)}},Gn={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};Jt=bt=Xt=oe=In=dn=0;var Fn={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},Yn={M:function(J,N){return Xt=oe=null,In=Jt=N[0],dn=bt=N[1],J.moveTo(Jt,bt)},m:function(J,N){return Xt=oe=null,In=Jt+=N[0],dn=bt+=N[1],J.moveTo(Jt,bt)},C:function(J,N){return Jt=N[4],bt=N[5],Xt=N[2],oe=N[3],J.bezierCurveTo.apply(J,U(N))},c:function(J,N){return J.bezierCurveTo(N[0]+Jt,N[1]+bt,N[2]+Jt,N[3]+bt,N[4]+Jt,N[5]+bt),Xt=Jt+N[2],oe=bt+N[3],Jt+=N[4],bt+=N[5]},S:function(J,N){return null===Xt&&(Xt=Jt,oe=bt),J.bezierCurveTo(Jt-(Xt-Jt),bt-(oe-bt),N[0],N[1],N[2],N[3]),Xt=N[0],oe=N[1],Jt=N[2],bt=N[3]},s:function(J,N){return null===Xt&&(Xt=Jt,oe=bt),J.bezierCurveTo(Jt-(Xt-Jt),bt-(oe-bt),Jt+N[0],bt+N[1],Jt+N[2],bt+N[3]),Xt=Jt+N[0],oe=bt+N[1],Jt+=N[2],bt+=N[3]},Q:function(J,N){return Xt=N[0],oe=N[1],J.quadraticCurveTo(N[0],N[1],Jt=N[2],bt=N[3])},q:function(J,N){return J.quadraticCurveTo(N[0]+Jt,N[1]+bt,N[2]+Jt,N[3]+bt),Xt=Jt+N[0],oe=bt+N[1],Jt+=N[2],bt+=N[3]},T:function(J,N){return null===Xt?(Xt=Jt,oe=bt):(Xt=Jt-(Xt-Jt),oe=bt-(oe-bt)),J.quadraticCurveTo(Xt,oe,N[0],N[1]),Xt=Jt-(Xt-Jt),oe=bt-(oe-bt),Jt=N[0],bt=N[1]},t:function(J,N){return null===Xt?(Xt=Jt,oe=bt):(Xt=Jt-(Xt-Jt),oe=bt-(oe-bt)),J.quadraticCurveTo(Xt,oe,Jt+N[0],bt+N[1]),Jt+=N[0],bt+=N[1]},A:function(J,N){return ZA(J,Jt,bt,N),Jt=N[5],bt=N[6]},a:function(J,N){return N[5]+=Jt,N[6]+=bt,ZA(J,Jt,bt,N),Jt=N[5],bt=N[6]},L:function(J,N){return Xt=oe=null,J.lineTo(Jt=N[0],bt=N[1])},l:function(J,N){return Xt=oe=null,J.lineTo(Jt+=N[0],bt+=N[1])},H:function(J,N){return Xt=oe=null,J.lineTo(Jt=N[0],bt)},h:function(J,N){return Xt=oe=null,J.lineTo(Jt+=N[0],bt)},V:function(J,N){return Xt=oe=null,J.lineTo(Jt,bt=N[0])},v:function(J,N){return Xt=oe=null,J.lineTo(Jt,bt+=N[0])},Z:function(J){return J.closePath(),Jt=In,bt=dn},z:function(J){return J.closePath(),Jt=In,bt=dn}},ZA=function(J,N,Z,K){var Kt,fA=z(K,7),Ot=yA(YA(fA[5],fA[6],fA[0],fA[1],fA[3],fA[4],fA[2],N,Z));try{for(Ot.s();!(Kt=Ot.n()).done;){var Ee=tt.apply(void 0,U(Kt.value));J.bezierCurveTo.apply(J,U(Ee))}}catch(pe){Ot.e(pe)}finally{Ot.f()}},YA=function(J,N,Z,K,fA,IA,At,nt,ut){var Qt=At*(Math.PI/180),vt=Math.sin(Qt),xt=Math.cos(Qt);Z=Math.abs(Z),K=Math.abs(K);var Tt=(Xt=xt*(nt-J)*.5+vt*(ut-N)*.5)*Xt/(Z*Z)+(oe=xt*(ut-N)*.5-vt*(nt-J)*.5)*oe/(K*K);Tt>1&&(Z*=Tt=Math.sqrt(Tt),K*=Tt);var Ot=xt/Z,Kt=vt/Z,fe=-vt/K,Ee=xt/K,pe=Ot*nt+Kt*ut,rn=fe*nt+Ee*ut,Me=Ot*J+Kt*N,je=fe*J+Ee*N,Ke=1/((Me-pe)*(Me-pe)+(je-rn)*(je-rn))-.25;Ke<0&&(Ke=0);var Cn=Math.sqrt(Ke);IA===fA&&(Cn=-Cn);var Vn=.5*(pe+Me)-Cn*(je-rn),qn=.5*(rn+je)+Cn*(Me-pe),Nn=Math.atan2(rn-qn,pe-Vn),Jn=Math.atan2(je-qn,Me-Vn)-Nn;Jn<0&&1===IA?Jn+=2*Math.PI:Jn>0&&0===IA&&(Jn-=2*Math.PI);for(var ir=Math.ceil(Math.abs(Jn/(.5*Math.PI+.001))),dr=[],_n=0;_n0&&(K[K.length]=+fA),Z[Z.length]={cmd:N,args:K},K=[],fA="",IA=!1),N=Qt;else if([" ",","].includes(Qt)||"-"===Qt&&fA.length>0&&"e"!==fA[fA.length-1]||"."===Qt&&IA){if(0===fA.length)continue;K.length===At?(Z[Z.length]={cmd:N,args:K},K=[+fA],"M"===N&&(N="L"),"m"===N&&(N="l")):K[K.length]=+fA,IA="."===Qt,fA=["-","."].includes(Qt)?Qt:""}else fA+=Qt,"."===Qt&&(IA=!0)}}catch(vt){nt.e(vt)}finally{nt.f()}return fA.length>0&&(K.length===At?(Z[Z.length]={cmd:N,args:K},K=[+fA],"M"===N&&(N="L"),"m"===N&&(N="l")):K[K.length]=+fA),Z[Z.length]={cmd:N,args:K},Z}(Z);!function(J,N){Jt=bt=Xt=oe=In=dn=0;for(var Z=0;Z1&&void 0!==arguments[1]?arguments[1]:{},Z=J;if(Array.isArray(J)||(J=[J,N.space||J]),!J.every(function(fA){return Number.isFinite(fA)&&fA>0}))throw new Error("dash(".concat(JSON.stringify(Z),", ").concat(JSON.stringify(N),") invalid, lengths must be numeric and greater than zero"));return J=J.map(PA).join(" "),this.addContent("[".concat(J,"] ").concat(PA(N.phase||0)," d"))},undash:function(){return this.addContent("[] 0 d")},moveTo:function(J,N){return this.addContent("".concat(PA(J)," ").concat(PA(N)," m"))},lineTo:function(J,N){return this.addContent("".concat(PA(J)," ").concat(PA(N)," l"))},bezierCurveTo:function(J,N,Z,K,fA,IA){return this.addContent("".concat(PA(J)," ").concat(PA(N)," ").concat(PA(Z)," ").concat(PA(K)," ").concat(PA(fA)," ").concat(PA(IA)," c"))},quadraticCurveTo:function(J,N,Z,K){return this.addContent("".concat(PA(J)," ").concat(PA(N)," ").concat(PA(Z)," ").concat(PA(K)," v"))},rect:function(J,N,Z,K){return this.addContent("".concat(PA(J)," ").concat(PA(N)," ").concat(PA(Z)," ").concat(PA(K)," re"))},roundedRect:function(J,N,Z,K,fA){null==fA&&(fA=0);var IA=(fA=Math.min(fA,.5*Z,.5*K))*(1-zA);return this.moveTo(J+fA,N),this.lineTo(J+Z-fA,N),this.bezierCurveTo(J+Z-IA,N,J+Z,N+IA,J+Z,N+fA),this.lineTo(J+Z,N+K-fA),this.bezierCurveTo(J+Z,N+K-IA,J+Z-IA,N+K,J+Z-fA,N+K),this.lineTo(J+fA,N+K),this.bezierCurveTo(J+IA,N+K,J,N+K-IA,J,N+K-fA),this.lineTo(J,N+fA),this.bezierCurveTo(J,N+IA,J+IA,N,J+fA,N),this.closePath()},ellipse:function(J,N,Z,K){null==K&&(K=Z);var fA=Z*zA,IA=K*zA,At=(J-=Z)+2*Z,nt=(N-=K)+2*K,ut=J+Z,Qt=N+K;return this.moveTo(J,Qt),this.bezierCurveTo(J,Qt-IA,ut-fA,N,ut,N),this.bezierCurveTo(ut+fA,N,At,Qt-IA,At,Qt),this.bezierCurveTo(At,Qt+IA,ut+fA,nt,ut,nt),this.bezierCurveTo(ut-fA,nt,J,Qt+IA,J,Qt),this.closePath()},circle:function(J,N,Z){return this.ellipse(J,N,Z)},arc:function(J,N,Z,K,fA,IA){null==IA&&(IA=!1);var At=2*Math.PI,nt=.5*Math.PI,ut=fA-K;Math.abs(ut)>At?ut=At:0!==ut&&IA!==ut<0&&(ut=(IA?-1:1)*At+ut);var vt=Math.ceil(Math.abs(ut)/nt),xt=ut/vt,Tt=xt/nt*zA*Z,Ot=K,Kt=-Math.sin(Ot)*Tt,fe=Math.cos(Ot)*Tt,Ee=J+Math.cos(Ot)*Z,pe=N+Math.sin(Ot)*Z;this.moveTo(Ee,pe);for(var rn=0;rn1&&void 0!==arguments[1]?arguments[1]:{},K=J*Math.PI/180,fA=Math.cos(K),IA=Math.sin(K),At=Z=0;if(null!=N.origin){var nt=z(N.origin,2),Qt=(At=nt[0])*IA+(Z=nt[1])*fA;At-=At*fA-Z*IA,Z-=Qt}return this.transform(fA,IA,-IA,fA,At,Z)},scale:function(J,N){var K,Z=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};null==N&&(N=J),"object"==typeof N&&(Z=N,N=J);var fA=K=0;if(null!=Z.origin){var IA=z(Z.origin,2);fA=IA[0],K=IA[1],fA-=J*fA,K-=N*K}return this.transform(J,0,0,N,fA,K)}},$A={402:131,8211:150,8212:151,8216:145,8217:146,8218:130,8220:147,8221:148,8222:132,8224:134,8225:135,8226:149,8230:133,8364:128,8240:137,8249:139,8250:155,710:136,8482:153,338:140,339:156,732:152,352:138,353:154,376:159,381:142,382:158},LA=".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n \nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n \nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n \ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n \nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n \nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n \nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n \nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/),at=function(){function mA(J){f(this,mA),this.contents=J,this.attributes={},this.glyphWidths={},this.boundingBoxes={},this.kernPairs={},this.parse(),this.charWidths=new Array(256);for(var N=0;N<=255;N++)this.charWidths[N]=this.glyphWidths[LA[N]];this.bbox=this.attributes.FontBBox.split(/\s+/).map(function(Z){return+Z}),this.ascender=+(this.attributes.Ascender||0),this.descender=+(this.attributes.Descender||0),this.xHeight=+(this.attributes.XHeight||0),this.capHeight=+(this.attributes.CapHeight||0),this.lineGap=this.bbox[3]-this.bbox[1]-(this.ascender-this.descender)}return w(mA,null,[{key:"open",value:function(N){return new mA(e.readFileSync(N,"utf8"))}}]),w(mA,[{key:"parse",value:function(){var K,N="",Z=yA(this.contents.split("\n"));try{for(Z.s();!(K=Z.n()).done;){var IA,At,fA=K.value;if(IA=fA.match(/^Start(\w+)/))N=IA[1];else if(IA=fA.match(/^End(\w+)/))N="";else switch(N){case"FontMetrics":var nt=(IA=fA.match(/(^\w+)\s+(.*)/))[1],ut=IA[2];(At=this.attributes[nt])?(Array.isArray(At)||(At=this.attributes[nt]=[At]),At.push(ut)):this.attributes[nt]=ut;break;case"CharMetrics":if(!/^CH?\s/.test(fA))continue;var Qt=fA.match(/\bN\s+(\.?\w+)\s*;/)[1];this.glyphWidths[Qt]=+fA.match(/\bWX\s+(\d+)\s*;/)[1];break;case"KernPairs":(IA=fA.match(/^KPX\s+(\.?\w+)\s+(\.?\w+)\s+(-?\d+)/))&&(this.kernPairs[IA[1]+"\0"+IA[2]]=parseInt(IA[3]))}}}catch(vt){Z.e(vt)}finally{Z.f()}}},{key:"encodeText",value:function(N){for(var Z=[],K=0,fA=N.length;K>8,nt=0;this.font.post.isFixedPitch&&(nt|=1),1<=At&&At<=7&&(nt|=2),nt|=4,10===At&&(nt|=8),this.font.head.macStyle.italic&&(nt|=64);var Qt=[1,2,3,4,5,6].map(function(Kt){return String.fromCharCode((K.id.charCodeAt(Kt)||73)+17)}).join("")+"+"+this.font.postscriptName,vt=this.font.bbox,xt=this.document.ref({Type:"FontDescriptor",FontName:Qt,Flags:nt,FontBBox:[vt.minX*this.scale,vt.minY*this.scale,vt.maxX*this.scale,vt.maxY*this.scale],ItalicAngle:this.font.italicAngle,Ascent:this.ascender,Descent:this.descender,CapHeight:(this.font.capHeight||this.font.ascent)*this.scale,XHeight:(this.font.xHeight||0)*this.scale,StemV:0});fA?xt.data.FontFile3=IA:xt.data.FontFile2=IA,xt.end();var Tt={Type:"Font",Subtype:"CIDFontType0",BaseFont:Qt,CIDSystemInfo:{Registry:new String("Adobe"),Ordering:new String("Identity"),Supplement:0},FontDescriptor:xt,W:[0,this.widths]};fA||(Tt.Subtype="CIDFontType2",Tt.CIDToGIDMap="Identity");var Ot=this.document.ref(Tt);return Ot.end(),this.dictionary.data={Type:"Font",Subtype:"Type0",BaseFont:Qt,Encoding:"Identity-H",DescendantFonts:[Ot],ToUnicode:this.toUnicodeCmap()},this.dictionary.end()}},{key:"toUnicodeCmap",value:function(){var At,K=this.document.ref(),fA=[],IA=yA(this.unicode);try{for(IA.s();!(At=IA.n()).done;){var vt,ut=[],Qt=yA(At.value);try{for(Qt.s();!(vt=Qt.n()).done;){var xt=vt.value;xt>65535&&(ut.push(Ut((xt-=65536)>>>10&1023|55296)),xt=56320|1023&xt),ut.push(Ut(xt))}}catch(Tt){Qt.e(Tt)}finally{Qt.f()}fA.push("<".concat(ut.join(" "),">"))}}catch(Tt){IA.e(Tt)}finally{IA.f()}return K.end("/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange\n1 beginbfrange\n<0000> <".concat(Ut(fA.length-1),"> [").concat(fA.join(" "),"]\nendbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend")),K}}]),N}(VA),Wt=function(){function mA(){f(this,mA)}return w(mA,null,[{key:"open",value:function(N,Z,K,fA){var IA;if("string"==typeof Z){if(St.isStandardFont(Z))return new St(N,Z,fA);Z=e.readFileSync(Z)}if(i.isBuffer(Z)?IA=a.default.create(Z,K):Z instanceof Uint8Array?IA=a.default.create(i.from(Z),K):Z instanceof ArrayBuffer&&(IA=a.default.create(i.from(new Uint8Array(Z)),K)),null==IA)throw new Error("Not a supported font format or standard PDF font.");return new kt(N,IA,fA)}}]),mA}(),ne={initFonts:function(){var J=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Helvetica";this._fontFamilies={},this._fontCount=0,this._fontSize=12,this._font=null,this._registeredFonts={},J&&this.font(J)},font:function(J,N,Z){var K,fA;if("number"==typeof N&&(Z=N,N=null),"string"==typeof J&&this._registeredFonts[J]){K=J;var IA=this._registeredFonts[J];J=IA.src,N=IA.family}else"string"!=typeof(K=N||J)&&(K=null);if(null!=Z&&this.fontSize(Z),fA=this._fontFamilies[K])return this._font=fA,this;var At="F".concat(++this._fontCount);return this._font=Wt.open(this,J,N,At),(fA=this._fontFamilies[this._font.name])?(this._font=fA,this):(K&&(this._fontFamilies[K]=this._font),this._font.name&&(this._fontFamilies[this._font.name]=this._font),this)},fontSize:function(J){return this._fontSize=J,this},currentLineHeight:function(J){return null==J&&(J=!1),this._font.lineHeight(this._fontSize,J)},registerFont:function(J,N,Z){return this._registeredFonts[J]={src:N,family:Z},this}},wt=function(mA){y(N,mA);var J=F(N);function N(Z,K){var fA;return f(this,N),(fA=J.call(this)).document=Z,fA.indent=K.indent||0,fA.characterSpacing=K.characterSpacing||0,fA.wordSpacing=0===K.wordSpacing,fA.columns=K.columns||1,fA.columnGap=null!=K.columnGap?K.columnGap:18,fA.lineWidth=(K.width-fA.columnGap*(fA.columns-1))/fA.columns,fA.spaceLeft=fA.lineWidth,fA.startX=fA.document.x,fA.startY=fA.document.y,fA.column=1,fA.ellipsis=K.ellipsis,fA.continuedX=0,fA.features=K.features,null!=K.height?(fA.height=K.height,fA.maxY=fA.startY+K.height):fA.maxY=fA.document.page.maxY(),fA.on("firstLine",function(IA){var At=fA.continuedX||fA.indent;return fA.document.x+=At,fA.lineWidth-=At,fA.once("line",function(){if(fA.document.x-=At,fA.lineWidth+=At,IA.continued&&!fA.continuedX&&(fA.continuedX=fA.indent),!IA.continued)return fA.continuedX=0})}),fA.on("lastLine",function(IA){var At=IA.align;return"justify"===At&&(IA.align="left"),fA.lastLine=!0,fA.once("line",function(){return fA.document.y+=IA.paragraphGap||0,IA.align=At,fA.lastLine=!1})}),fA}return w(N,[{key:"wordWidth",value:function(K){return this.document.widthOfString(K,this)+this.characterSpacing+this.wordSpacing}},{key:"eachWord",value:function(K,fA){for(var IA,At=new E.default(K),nt=null,ut=Object.create(null);IA=At.nextBreak();){var Qt,vt=K.slice((null!=nt?nt.position:void 0)||0,IA.position),xt=null!=ut[vt]?ut[vt]:ut[vt]=this.wordWidth(vt);if(xt>this.lineWidth+this.continuedX)for(var Tt=nt,Ot={};vt.length;){var Kt,fe;xt>this.spaceLeft?(Kt=Math.ceil(this.spaceLeft/(xt/vt.length)),fe=(xt=this.wordWidth(vt.slice(0,Kt)))<=this.spaceLeft&&Ktthis.spaceLeft&&Kt>0;Ee||fe;)Ee?Ee=(xt=this.wordWidth(vt.slice(0,--Kt)))>this.spaceLeft&&Kt>0:(Ee=(xt=this.wordWidth(vt.slice(0,++Kt)))>this.spaceLeft&&Kt>0,fe=xt<=this.spaceLeft&&Ktthis.maxY||At>this.maxY)&&this.nextSection();var nt="",ut=0,Qt=0,vt=0,xt=this.document.y,Tt=function(){return fA.textWidth=ut+IA.wordSpacing*(Qt-1),fA.wordCount=Qt,fA.lineWidth=IA.lineWidth,xt=IA.document.y,IA.emit("line",nt,fA,IA),vt++};return this.emit("sectionStart",fA,this),this.eachWord(K,function(Ot,Kt,fe,Ee){if((null==Ee||Ee.required)&&(IA.emit("firstLine",fA,IA),IA.spaceLeft=IA.lineWidth),Kt<=IA.spaceLeft&&(nt+=Ot,ut+=Kt,Qt++),fe.required||Kt>IA.spaceLeft){var pe=IA.document.currentLineHeight(!0);if(null!=IA.height&&IA.ellipsis&&IA.document.y+2*pe>IA.maxY&&IA.column>=IA.columns){for(!0===IA.ellipsis&&(IA.ellipsis="\u2026"),nt=nt.replace(/\s+$/,""),ut=IA.wordWidth(nt+IA.ellipsis);nt&&ut>IA.lineWidth;)nt=nt.slice(0,-1).replace(/\s+$/,""),ut=IA.wordWidth(nt+IA.ellipsis);ut<=IA.lineWidth&&(nt+=IA.ellipsis),ut=IA.wordWidth(nt)}return fe.required&&(Kt>IA.spaceLeft&&(Tt(),nt=Ot,ut=Kt,Qt=1),IA.emit("lastLine",fA,IA)),Tt(),IA.document.y+pe>IA.maxY&&!IA.nextSection()?(Qt=0,nt="",!1):fe.required?(IA.spaceLeft=IA.lineWidth,nt="",ut=0,Qt=0):(IA.spaceLeft=IA.lineWidth-Kt,nt=Ot,ut=Kt,Qt=1)}return IA.spaceLeft-=Kt}),Qt>0&&(this.emit("lastLine",fA,this),Tt()),this.emit("sectionEnd",fA,this),!0===fA.continued?(vt>1&&(this.continuedX=0),this.continuedX+=fA.textWidth||0,this.document.y=xt):this.document.x=this.startX}},{key:"nextSection",value:function(K){if(this.emit("sectionEnd",K,this),++this.column>this.columns){if(null!=this.height)return!1;var fA;this.document.continueOnNewPage(),this.column=1,this.startY=this.document.page.margins.top,this.maxY=this.document.page.maxY(),this.document.x=this.startX,this.document._fillColor&&(fA=this.document).fillColor.apply(fA,U(this.document._fillColor)),this.emit("pageBreak",K,this)}else this.document.x+=this.lineWidth+this.columnGap,this.document.y=this.startY,this.emit("columnBreak",K,this);return this.emit("sectionStart",K,this),!0}}]),N}(B.EventEmitter),Pt=bA.number,jt={initText:function(){return this._line=this._line.bind(this),this.x=0,this.y=0,this._lineGap=0},lineGap:function(J){return this._lineGap=J,this},moveDown:function(J){return null==J&&(J=1),this.y+=this.currentLineHeight(!0)*J+this._lineGap,this},moveUp:function(J){return null==J&&(J=1),this.y-=this.currentLineHeight(!0)*J+this._lineGap,this},_text:function(J,N,Z,K,fA){var IA=this;K=this._initOptions(N,Z,K),J=null==J?"":"".concat(J),K.wordSpacing&&(J=J.replace(/\s{2,}/g," "));var At=function(){K.structParent&&K.structParent.add(IA.struct(K.structType||"P",[IA.markStructureContent(K.structType||"P")]))};if(K.width){var nt=this._wrapper;nt||((nt=new wt(this,K)).on("line",fA),nt.on("firstLine",At)),this._wrapper=K.continued?nt:null,this._textOptions=K.continued?K:null,nt.wrap(J,K)}else{var Qt,ut=yA(J.split("\n"));try{for(ut.s();!(Qt=ut.n()).done;){var vt=Qt.value;At(),fA(vt,K)}}catch(xt){ut.e(xt)}finally{ut.f()}}return this},text:function(J,N,Z,K){return this._text(J,N,Z,K,this._line)},widthOfString:function(J){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._font.widthOfString(J,this._fontSize,N.features)+(N.characterSpacing||0)*(J.length-1)},heightOfString:function(J,N){var Z=this,K=this.x,fA=this.y;(N=this._initOptions(N)).height=1/0;var IA=N.lineGap||this._lineGap||0;this._text(J,this.x,this.y,N,function(){return Z.y+=Z.currentLineHeight(!0)+IA});var At=this.y-fA;return this.x=K,this.y=fA,At},list:function(J,N,Z,K,fA){var IA=this,At=(K=this._initOptions(N,Z,K)).listType||"bullet",nt=Math.round(this._font.ascender/1e3*this._fontSize),ut=nt/2,Qt=K.bulletRadius||nt/3,vt=K.textIndent||("bullet"===At?5*Qt:2*nt),xt=K.bulletIndent||("bullet"===At?8*Qt:2*nt),Tt=1,Ot=[],Kt=[],fe=[];!function Me(je){for(var wn=1,Ke=0;Ke0&&void 0!==arguments[0]?arguments[0]:{},N=arguments.length>1?arguments[1]:void 0,Z=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};"object"==typeof J&&(Z=J,J=null);var K=Object.assign({},Z);if(this._textOptions)for(var fA in this._textOptions)"continued"!==fA&&void 0===K[fA]&&(K[fA]=this._textOptions[fA]);return null!=J&&(this.x=J),null!=N&&(this.y=N),!1!==K.lineBreak&&(null==K.width&&(K.width=this.page.width-this.x-this.page.margins.right),K.width=Math.max(K.width,0)),K.columns||(K.columns=0),null==K.columnGap&&(K.columnGap=18),K},_line:function(J){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Z=arguments.length>2?arguments[2]:void 0;this._fragment(J,this.x,this.y,N);var K=N.lineGap||this._lineGap||0;return Z?this.y+=this.currentLineHeight(!0)+K:this.x+=this.widthOfString(J)},_fragment:function(J,N,Z,K){var IA,At,nt,ut,Qt,vt,fA=this;if(0!==(J="".concat(J).replace(/\n/g,"")).length){var Tt=K.wordSpacing||0,Ot=K.characterSpacing||0;if(K.width)switch(K.align||"left"){case"right":Qt=this.widthOfString(J.replace(/\s+$/,""),K),N+=K.lineWidth-Qt;break;case"center":N+=K.lineWidth/2-K.textWidth/2;break;case"justify":vt=J.trim().split(/\s+/),Qt=this.widthOfString(J.replace(/\s+/g,""),K);var Kt=this.widthOfString(" ")+Ot;Tt=Math.max(0,(K.lineWidth-Qt)/Math.max(1,vt.length-1)-Kt)}if("number"==typeof K.baseline)IA=-K.baseline;else{switch(K.baseline){case"svg-middle":IA=.5*this._font.xHeight;break;case"middle":case"svg-central":IA=.5*(this._font.descender+this._font.ascender);break;case"bottom":case"ideographic":IA=this._font.descender;break;case"alphabetic":IA=0;break;case"mathematical":IA=.5*this._font.ascender;break;case"hanging":IA=.8*this._font.ascender;break;default:IA=this._font.ascender}IA=IA/1e3*this._fontSize}var je,fe=K.textWidth+Tt*(K.wordCount-1)+Ot*(J.length-1);if(null!=K.link&&this.link(N,Z,fe,this.currentLineHeight(),K.link),null!=K.goTo&&this.goTo(N,Z,fe,this.currentLineHeight(),K.goTo),null!=K.destination&&this.addNamedDestination(K.destination,"XYZ",N,Z,null),K.underline){this.save(),K.stroke||this.strokeColor.apply(this,U(this._fillColor||[]));var Ee=this._fontSize<10?.5:Math.floor(this._fontSize/10);this.lineWidth(Ee);var pe=Z+this.currentLineHeight()-Ee;this.moveTo(N,pe),this.lineTo(N+fe,pe),this.stroke(),this.restore()}if(K.strike){this.save(),K.stroke||this.strokeColor.apply(this,U(this._fillColor||[]));var rn=this._fontSize<10?.5:Math.floor(this._fontSize/10);this.lineWidth(rn);var Me=Z+this.currentLineHeight()/2;this.moveTo(N,Me),this.lineTo(N+fe,Me),this.stroke(),this.restore()}this.save(),K.oblique&&(je="number"==typeof K.oblique?-Math.tan(K.oblique*Math.PI/180):-.25,this.transform(1,0,0,1,N,Z),this.transform(1,0,je,1,-je*IA,0),this.transform(1,0,0,1,-N,-Z)),this.transform(1,0,0,-1,0,this.page.height),Z=this.page.height-Z-IA,null==this.page.fonts[this._font.id]&&(this.page.fonts[this._font.id]=this._font.ref()),this.addContent("BT"),this.addContent("1 0 0 1 ".concat(Pt(N)," ").concat(Pt(Z)," Tm")),this.addContent("/".concat(this._font.id," ").concat(Pt(this._fontSize)," Tf"));var wn=K.fill&&K.stroke?2:K.stroke?1:0;if(wn&&this.addContent("".concat(wn," Tr")),Ot&&this.addContent("".concat(Pt(Ot)," Tc")),Tt){vt=J.trim().split(/\s+/),Tt+=this.widthOfString(" ")+Ot,Tt*=1e3/this._fontSize,At=[],ut=[];var Cn,Ke=yA(vt);try{for(Ke.s();!(Cn=Ke.n()).done;){var Nn=z(this._font.encode(Cn.value,K.features),2),Jn=Nn[1];At=At.concat(Nn[0]),ut=ut.concat(Jn);var ir={},dr=ut[ut.length-1];for(var _n in dr)ir[_n]=dr[_n];ir.xAdvance+=Tt,ut[ut.length-1]=ir}}catch(Or){Ke.e(Or)}finally{Ke.f()}}else{var Wn=z(this._font.encode(J,K.features),2);At=Wn[0],ut=Wn[1]}var br=this._fontSize/1e3,Mr=[],Gr=0,Hr=!1,si=function(Zn){if(Gr ").concat(Pt(-bi)))}return Gr=Zn},Jr=function(Zn){if(si(Zn),Mr.length>0)return fA.addContent("[".concat(Mr.join(" "),"] TJ")),Mr.length=0};for(nt=0;nt3&&void 0!==arguments[3]?arguments[3]:{};"object"==typeof N&&(K=N,N=null),N=null!=(Qt=null!=N?N:K.x)?Qt:this.x,Z=null!=(vt=null!=Z?Z:K.y)?vt:this.y,"string"==typeof J&&(nt=this._imageRegistry[J]),nt||(nt=J.width&&J.height?J:this.openImage(J)),nt.obj||nt.embed(this),null==this.page.xobjects[nt.label]&&(this.page.xobjects[nt.label]=nt.obj);var xt=K.width||nt.width,Tt=K.height||nt.height;if(K.width&&!K.height){var Ot=xt/nt.width;xt=nt.width*Ot,Tt=nt.height*Ot}else if(K.height&&!K.width){var Kt=Tt/nt.height;xt=nt.width*Kt,Tt=nt.height*Kt}else if(K.scale)xt=nt.width*K.scale,Tt=nt.height*K.scale;else if(K.fit){var fe=z(K.fit,2);(ut=nt.width/nt.height)>(At=fe[0])/(fA=fe[1])?(xt=At,Tt=At/ut):(Tt=fA,xt=fA*ut)}else if(K.cover){var Ee=z(K.cover,2);(ut=nt.width/nt.height)>(At=Ee[0])/(fA=Ee[1])?(Tt=fA,xt=fA*ut):(xt=At,Tt=At/ut)}return(K.fit||K.cover)&&("center"===K.align?N=N+At/2-xt/2:"right"===K.align&&(N=N+At-xt),"center"===K.valign?Z=Z+fA/2-Tt/2:"bottom"===K.valign&&(Z=Z+fA-Tt)),null!=K.link&&this.link(N,Z,xt,Tt,K.link),null!=K.goTo&&this.goTo(N,Z,xt,Tt,K.goTo),null!=K.destination&&this.addNamedDestination(K.destination,"XYZ",N,Z,null),this.y===Z&&(this.y+=Tt),this.save(),this.transform(xt,0,0,-Tt,N,Z+Tt),this.addContent("/".concat(nt.label," Do")),this.restore(),this},openImage:function(J){var N;return"string"==typeof J&&(N=this._imageRegistry[J]),N||(N=ge.open(J,"I".concat(++this._imageCount)),"string"==typeof J&&(this._imageRegistry[J]=N)),N}},Ge={annotate:function(J,N,Z,K,fA){for(var IA in fA.Type="Annot",fA.Rect=this._convertRect(J,N,Z,K),fA.Border=[0,0,0],"Link"===fA.Subtype&&void 0===fA.F&&(fA.F=4),"Link"!==fA.Subtype&&null==fA.C&&(fA.C=this._normalizeColor(fA.color||[0,0,0])),delete fA.color,"string"==typeof fA.Dest&&(fA.Dest=new String(fA.Dest)),fA){var At=fA[IA];fA[IA[0].toUpperCase()+IA.slice(1)]=At}var nt=this.ref(fA);return this.page.annotations.push(nt),nt.end(),this},note:function(J,N,Z,K,fA){var IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return IA.Subtype="Text",IA.Contents=new String(fA),IA.Name="Comment",null==IA.color&&(IA.color=[243,223,92]),this.annotate(J,N,Z,K,IA)},goTo:function(J,N,Z,K,fA){var IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return IA.Subtype="Link",IA.A=this.ref({S:"GoTo",D:new String(fA)}),IA.A.end(),this.annotate(J,N,Z,K,IA)},link:function(J,N,Z,K,fA){var IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};if(IA.Subtype="Link","number"==typeof fA){var At=this._root.data.Pages.data;if(!(fA>=0&&fA4&&void 0!==arguments[4]?arguments[4]:{},At=z(this._convertRect(J,N,Z,K),4),nt=At[0],ut=At[1],Qt=At[2],vt=At[3];return fA.QuadPoints=[nt,vt,Qt,vt,nt,ut,Qt,ut],fA.Contents=new String,this.annotate(J,N,Z,K,fA)},highlight:function(J,N,Z,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Highlight",null==fA.color&&(fA.color=[241,238,148]),this._markup(J,N,Z,K,fA)},underline:function(J,N,Z,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Underline",this._markup(J,N,Z,K,fA)},strike:function(J,N,Z,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="StrikeOut",this._markup(J,N,Z,K,fA)},lineAnnotation:function(J,N,Z,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Line",fA.Contents=new String,fA.L=[J,this.page.height-N,Z,this.page.height-K],this.annotate(J,N,Z,K,fA)},rectAnnotation:function(J,N,Z,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Square",fA.Contents=new String,this.annotate(J,N,Z,K,fA)},ellipseAnnotation:function(J,N,Z,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return fA.Subtype="Circle",fA.Contents=new String,this.annotate(J,N,Z,K,fA)},textAnnotation:function(J,N,Z,K,fA){var IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return IA.Subtype="FreeText",IA.Contents=new String(fA),IA.DA=new String,this.annotate(J,N,Z,K,IA)},fileAnnotation:function(J,N,Z,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},IA=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},At=this.file(fA.src,Object.assign({hidden:!0},fA));return IA.Subtype="FileAttachment",IA.FS=At,IA.Contents?IA.Contents=new String(IA.Contents):At.data.Desc&&(IA.Contents=At.data.Desc),this.annotate(J,N,Z,K,IA)},_convertRect:function(J,N,Z,K){var fA=N;N+=K;var IA=J+Z,At=z(this._ctm,6),nt=At[0],ut=At[1],Qt=At[2],vt=At[3],xt=At[4],Tt=At[5];return[J=nt*J+Qt*N+xt,N=ut*J+vt*N+Tt,IA=nt*IA+Qt*fA+xt,fA=ut*IA+vt*fA+Tt]}},Se=function(){function mA(J,N,Z,K){var fA=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{expanded:!1};f(this,mA),this.document=J,this.options=fA,this.outlineData={},null!==K&&(this.outlineData.Dest=[K.dictionary,"Fit"]),null!==N&&(this.outlineData.Parent=N),null!==Z&&(this.outlineData.Title=new String(Z)),this.dictionary=this.document.ref(this.outlineData),this.children=[]}return w(mA,[{key:"addItem",value:function(N){var K=new mA(this.document,this.dictionary,N,this.document.page,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:!1});return this.children.push(K),K}},{key:"endOutline",value:function(){if(this.children.length>0){this.options.expanded&&(this.outlineData.Count=this.children.length);var Z=this.children[this.children.length-1];this.outlineData.First=this.children[0].dictionary,this.outlineData.Last=Z.dictionary;for(var K=0,fA=this.children.length;K0&&(IA.outlineData.Prev=this.children[K-1].dictionary),K0)return this._root.data.Outlines=this.outline.dictionary,this._root.data.PageMode="UseOutlines"}},Ne=function(){function mA(J,N){f(this,mA),this.refs=[{pageRef:J,mcid:N}]}return w(mA,[{key:"push",value:function(N){var Z=this;N.refs.forEach(function(K){return Z.refs.push(K)})}}]),mA}(),$e=function(){function mA(J,N){var Z=this,K=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},fA=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;f(this,mA),this.document=J,this._attached=!1,this._ended=!1,this._flushed=!1,this.dictionary=J.ref({S:N});var IA=this.dictionary.data;(Array.isArray(K)||this._isValidChild(K))&&(fA=K,K={}),void 0!==K.title&&(IA.T=new String(K.title)),void 0!==K.lang&&(IA.Lang=new String(K.lang)),void 0!==K.alt&&(IA.Alt=new String(K.alt)),void 0!==K.expanded&&(IA.E=new String(K.expanded)),void 0!==K.actual&&(IA.ActualText=new String(K.actual)),this._children=[],fA&&(Array.isArray(fA)||(fA=[fA]),fA.forEach(function(At){return Z.add(At)}),this.end())}return w(mA,[{key:"add",value:function(N){if(this._ended)throw new Error("Cannot add child to already-ended structure element");if(!this._isValidChild(N))throw new Error("Invalid structure element child");return N instanceof mA&&(N.setParent(this.dictionary),this._attached&&N.setAttached()),N instanceof Ne&&this._addContentToParentTree(N),"function"==typeof N&&this._attached&&(N=this._contentForClosure(N)),this._children.push(N),this}},{key:"_addContentToParentTree",value:function(N){var Z=this;N.refs.forEach(function(K){var fA=K.pageRef,IA=K.mcid;Z.document.getStructParentTree().get(fA.data.StructParents)[IA]=Z.dictionary})}},{key:"setParent",value:function(N){if(this.dictionary.data.P)throw new Error("Structure element added to more than one parent");this.dictionary.data.P=N,this._flush()}},{key:"setAttached",value:function(){var N=this;this._attached||(this._children.forEach(function(Z,K){Z instanceof mA&&Z.setAttached(),"function"==typeof Z&&(N._children[K]=N._contentForClosure(Z))}),this._attached=!0,this._flush())}},{key:"end",value:function(){this._ended||(this._children.filter(function(N){return N instanceof mA}).forEach(function(N){return N.end()}),this._ended=!0,this._flush())}},{key:"_isValidChild",value:function(N){return N instanceof mA||N instanceof Ne||"function"==typeof N}},{key:"_contentForClosure",value:function(N){var Z=this.document.markStructureContent(this.dictionary.data.S);return N(),this.document.endMarkedContent(),this._addContentToParentTree(Z),Z}},{key:"_isFlushable",value:function(){return!(!this.dictionary.data.P||!this._ended)&&this._children.every(function(N){return"function"!=typeof N&&(!(N instanceof mA)||N._isFlushable())})}},{key:"_flush",value:function(){var N=this;this._flushed||!this._isFlushable()||(this.dictionary.data.K=[],this._children.forEach(function(Z){return N._flushChild(Z)}),this.dictionary.end(),this._children=[],this.dictionary.data.K=null,this._flushed=!0)}},{key:"_flushChild",value:function(N){var Z=this;N instanceof mA&&this.dictionary.data.K.push(N.dictionary),N instanceof Ne&&N.refs.forEach(function(K){var fA=K.pageRef,IA=K.mcid;Z.dictionary.data.Pg||(Z.dictionary.data.Pg=fA),Z.dictionary.data.K.push(Z.dictionary.data.Pg===fA?IA:{Type:"MCR",Pg:fA,MCID:IA})})}}]),mA}(),yn=function(mA){y(N,mA);var J=F(N);function N(){return f(this,N),J.apply(this,arguments)}return w(N,[{key:"_compareKeys",value:function(K,fA){return parseInt(K)-parseInt(fA)}},{key:"_keysName",value:function(){return"Nums"}},{key:"_dataForKey",value:function(K){return parseInt(K)}}]),N}(_),an={initMarkings:function(J){this.structChildren=[],J.tagged&&(this.getMarkInfoDictionary().data.Marked=!0,this.getStructTreeRoot())},markContent:function(J){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("Artifact"===J||N&&N.mcid){var Z=0;for(this.page.markings.forEach(function(fA){(Z||fA.structContent||"Artifact"===fA.tag)&&Z++});Z--;)this.endMarkedContent()}if(!N)return this.page.markings.push({tag:J}),this.addContent("/".concat(J," BMC")),this;this.page.markings.push({tag:J,options:N});var K={};return void 0!==N.mcid&&(K.MCID=N.mcid),"Artifact"===J&&("string"==typeof N.type&&(K.Type=N.type),Array.isArray(N.bbox)&&(K.BBox=[N.bbox[0],this.page.height-N.bbox[3],N.bbox[2],this.page.height-N.bbox[1]]),Array.isArray(N.attached)&&N.attached.every(function(fA){return"string"==typeof fA})&&(K.Attached=N.attached)),"Span"===J&&(N.lang&&(K.Lang=new String(N.lang)),N.alt&&(K.Alt=new String(N.alt)),N.expanded&&(K.E=new String(N.expanded)),N.actual&&(K.ActualText=new String(N.actual))),this.addContent("/".concat(J," ").concat(bA.convert(K)," BDC")),this},markStructureContent:function(J){var N=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},Z=this.getStructParentTree().get(this.page.structParentTreeKey),K=Z.length;Z.push(null),this.markContent(J,Y(Y({},N),{},{mcid:K}));var fA=new Ne(this.page.dictionary,K);return this.page.markings.slice(-1)[0].structContent=fA,fA},endMarkedContent:function(){return this.page.markings.pop(),this.addContent("EMC"),this},struct:function(J){return new $e(this,J,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},arguments.length>2&&void 0!==arguments[2]?arguments[2]:null)},addStructure:function(J){var N=this.getStructTreeRoot();return J.setParent(N),J.setAttached(),this.structChildren.push(J),N.data.K||(N.data.K=[]),N.data.K.push(J.dictionary),this},initPageMarkings:function(J){var N=this;J.forEach(function(Z){if(Z.structContent){var K=Z.structContent,fA=N.markStructureContent(Z.tag,Z.options);K.push(fA),N.page.markings.slice(-1)[0].structContent=K}else N.markContent(Z.tag,Z.options)})},endPageMarkings:function(J){var N=J.markings;return N.forEach(function(){return J.write("EMC")}),J.markings=[],N},getMarkInfoDictionary:function(){return this._root.data.MarkInfo||(this._root.data.MarkInfo=this.ref({})),this._root.data.MarkInfo},getStructTreeRoot:function(){return this._root.data.StructTreeRoot||(this._root.data.StructTreeRoot=this.ref({Type:"StructTreeRoot",ParentTree:new yn,ParentTreeNextKey:0})),this._root.data.StructTreeRoot},getStructParentTree:function(){return this.getStructTreeRoot().data.ParentTree},createStructParentTreeNextKey:function(){this.getMarkInfoDictionary();var J=this.getStructTreeRoot(),N=J.data.ParentTreeNextKey++;return J.data.ParentTree.add(N,[]),N},endMarkings:function(){var J=this._root.data.StructTreeRoot;J&&(J.end(),this.structChildren.forEach(function(N){return N.end()})),this._root.data.MarkInfo&&this._root.data.MarkInfo.end()}},Mn={readOnly:1,required:2,noExport:4,multiline:4096,password:8192,toggleToOffButton:16384,radioButton:32768,pushButton:65536,combo:131072,edit:262144,sort:524288,multiSelect:2097152,noSpell:4194304},xn={left:0,center:1,right:2},qe={value:"V",defaultValue:"DV"},fn={zip:"0",zipPlus4:"1",zip4:"1",phone:"2",ssn:"3"},cn_number={nDec:0,sepComma:!1,negStyle:"MinusBlack",currency:"",currencyPrepend:!0},cn_percent={nDec:0,sepComma:!1},Xn={initForm:function(){if(!this._font)throw new Error("Must set a font before calling initForm method");this._acroform={fonts:{},defaultFont:this._font.name},this._acroform.fonts[this._font.id]=this._font.ref();var J={Fields:[],NeedAppearances:!0,DA:new String("/".concat(this._font.id," 0 Tf 0 g")),DR:{Font:{}}};J.DR.Font[this._font.id]=this._font.ref();var N=this.ref(J);return this._root.data.AcroForm=N,this},endAcroForm:function(){var J=this;if(this._root.data.AcroForm){if(!Object.keys(this._acroform.fonts).length&&!this._acroform.defaultFont)throw new Error("No fonts specified for PDF form");var N=this._root.data.AcroForm.data.DR.Font;Object.keys(this._acroform.fonts).forEach(function(Z){N[Z]=J._acroform.fonts[Z]}),this._root.data.AcroForm.data.Fields.forEach(function(Z){J._endChild(Z)}),this._root.data.AcroForm.end()}return this},_endChild:function(J){var N=this;return Array.isArray(J.data.Kids)&&(J.data.Kids.forEach(function(Z){N._endChild(Z)}),J.end()),this},formField:function(J){var Z=this._fieldDict(J,null,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),K=this.ref(Z);return this._addToParent(K),K},formAnnotation:function(J,N,Z,K,fA,IA){var nt=this._fieldDict(J,N,arguments.length>6&&void 0!==arguments[6]?arguments[6]:{});return nt.Subtype="Widget",void 0===nt.F&&(nt.F=4),this.annotate(Z,K,fA,IA,nt),this._addToParent(this.page.annotations[this.page.annotations.length-1])},formText:function(J,N,Z,K,fA){return this.formAnnotation(J,"text",N,Z,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formPushButton:function(J,N,Z,K,fA){return this.formAnnotation(J,"pushButton",N,Z,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formCombo:function(J,N,Z,K,fA){return this.formAnnotation(J,"combo",N,Z,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formList:function(J,N,Z,K,fA){return this.formAnnotation(J,"list",N,Z,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formRadioButton:function(J,N,Z,K,fA){return this.formAnnotation(J,"radioButton",N,Z,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},formCheckbox:function(J,N,Z,K,fA){return this.formAnnotation(J,"checkbox",N,Z,K,fA,arguments.length>5&&void 0!==arguments[5]?arguments[5]:{})},_addToParent:function(J){var N=J.data.Parent;return N?(N.data.Kids||(N.data.Kids=[]),N.data.Kids.push(J)):this._root.data.AcroForm.data.Fields.push(J),this},_fieldDict:function(J,N){var Z=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this._acroform)throw new Error("Call document.initForms() method before adding form elements to document");var K=Object.assign({},Z);return null!==N&&(K=this._resolveType(N,Z)),K=this._resolveFlags(K),K=this._resolveJustify(K),K=this._resolveFont(K),K=this._resolveStrings(K),K=this._resolveColors(K),(K=this._resolveFormat(K)).T=new String(J),K.parent&&(K.Parent=K.parent,delete K.parent),K},_resolveType:function(J,N){if("text"===J)N.FT="Tx";else if("pushButton"===J)N.FT="Btn",N.pushButton=!0;else if("radioButton"===J)N.FT="Btn",N.radioButton=!0;else if("checkbox"===J)N.FT="Btn";else if("combo"===J)N.FT="Ch",N.combo=!0;else{if("list"!==J)throw new Error("Invalid form annotation type '".concat(J,"'"));N.FT="Ch"}return N},_resolveFormat:function(J){var N=J.format;if(N&&N.type){var Z,K,fA="";if(void 0!==fn[N.type])Z="AFSpecial_Keystroke",K="AFSpecial_Format",fA=fn[N.type];else{var IA=N.type.charAt(0).toUpperCase()+N.type.slice(1);if(Z="AF".concat(IA,"_Keystroke"),K="AF".concat(IA,"_Format"),"date"===N.type)Z+="Ex",fA=String(N.param);else if("time"===N.type)fA=String(N.param);else if("number"===N.type){var At=Object.assign({},cn_number,N);fA=String([String(At.nDec),At.sepComma?"0":"1",'"'+At.negStyle+'"',"null",'"'+At.currency+'"',String(At.currencyPrepend)].join(","))}else if("percent"===N.type){var nt=Object.assign({},cn_percent,N);fA=String([String(nt.nDec),nt.sepComma?"0":"1"].join(","))}}J.AA=J.AA?J.AA:{},J.AA.K={S:"JavaScript",JS:new String("".concat(Z,"(").concat(fA,");"))},J.AA.F={S:"JavaScript",JS:new String("".concat(K,"(").concat(fA,");"))}}return delete J.format,J},_resolveColors:function(J){var N=this._normalizeColor(J.backgroundColor);return N&&(J.MK||(J.MK={}),J.MK.BG=N),(N=this._normalizeColor(J.borderColor))&&(J.MK||(J.MK={}),J.MK.BC=N),delete J.backgroundColor,delete J.borderColor,J},_resolveFlags:function(J){var N=0;return Object.keys(J).forEach(function(Z){Mn[Z]&&(N|=Mn[Z],delete J[Z])}),0!==N&&(J.Ff=J.Ff?J.Ff:0,J.Ff|=N),J},_resolveJustify:function(J){var N=0;return void 0!==J.align&&("number"==typeof xn[J.align]&&(N=xn[J.align]),delete J.align),0!==N&&(J.Q=N),J},_resolveFont:function(J){if(null===this._acroform.fonts[this._font.id]&&(this._acroform.fonts[this._font.id]=this._font.ref()),this._acroform.defaultFont!==this._font.name){J.DR={Font:{}};var N=J.fontSize||0;J.DR.Font[this._font.id]=this._font.ref(),J.DA=new String("/".concat(this._font.id," ").concat(N," Tf 0 g"))}return J},_resolveStrings:function(J){var N=[];function Z(K){if(Array.isArray(K))for(var fA=0;fA1&&void 0!==arguments[1]?arguments[1]:{};N.name=N.name||J;var K,Z={Type:"EmbeddedFile",Params:{}};if(!J)throw new Error("No src specified");if(i.isBuffer(J))K=J;else if(J instanceof ArrayBuffer)K=i.from(new Uint8Array(J));else{var fA;if(fA=/^data:(.*);base64,(.*)$/.exec(J))fA[1]&&(Z.Subtype=fA[1].replace("/","#2F")),K=i.from(fA[2],"base64");else{if(!(K=e.readFileSync(J)))throw new Error("Could not read contents of file at filepath ".concat(J));var IA=e.statSync(J),nt=IA.ctime;Z.Params.CreationDate=IA.birthtime,Z.Params.ModDate=nt}}N.creationDate instanceof Date&&(Z.Params.CreationDate=N.creationDate),N.modifiedDate instanceof Date&&(Z.Params.ModDate=N.modifiedDate),N.type&&(Z.Subtype=N.type.replace("/","#2F"));var Qt,ut=h.default.MD5(h.default.lib.WordArray.create(new Uint8Array(K)));Z.Params.CheckSum=new String(ut),Z.Params.Size=K.byteLength,this._fileRegistry||(this._fileRegistry={});var vt=this._fileRegistry[N.name];vt&&Tr(Z,vt)?Qt=vt.ref:((Qt=this.ref(Z)).end(K),this._fileRegistry[N.name]=Y(Y({},Z),{},{ref:Qt}));var xt={Type:"Filespec",F:new String(N.name),EF:{F:Qt},UF:new String(N.name)};N.description&&(xt.Desc=new String(N.description));var Tt=this.ref(xt);return Tt.end(),N.hidden||this.addNamedEmbeddedFile(N.name,Tt),Tt}};function Tr(mA,J){return mA.Subtype===J.Subtype&&mA.Params.CheckSum.toString()===J.Params.CheckSum.toString()&&mA.Params.Size===J.Params.Size&&mA.Params.CreationDate===J.Params.CreationDate&&mA.Params.ModDate===J.Params.ModDate}var rr=function(mA){y(N,mA);var J=F(N);function N(){var Z,K=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(f(this,N),(Z=J.call(this,K)).options=K,K.pdfVersion){case"1.4":Z.version=1.4;break;case"1.5":Z.version=1.5;break;case"1.6":Z.version=1.6;break;case"1.7":case"1.7ext3":Z.version=1.7;break;default:Z.version=1.3}Z.compress=null==Z.options.compress||Z.options.compress,Z._pageBuffer=[],Z._pageBufferStart=0,Z._offsets=[],Z._waiting=0,Z._ended=!1,Z._offset=0;var fA=Z.ref({Type:"Pages",Count:0,Kids:[]}),IA=Z.ref({Dests:new W});if(Z._root=Z.ref({Type:"Catalog",Pages:fA,Names:IA}),Z.options.lang&&(Z._root.data.Lang=new String(Z.options.lang)),Z.page=null,Z.initColor(),Z.initVector(),Z.initFonts(K.font),Z.initText(),Z.initImages(),Z.initOutline(),Z.initMarkings(K),Z.info={Producer:"PDFKit",Creator:"PDFKit",CreationDate:new Date},Z.options.info)for(var At in Z.options.info)Z.info[At]=Z.options.info[At];return Z.options.displayTitle&&(Z._root.data.ViewerPreferences=Z.ref({DisplayDocTitle:!0})),Z._id=b.generateFileID(Z.info),Z._security=b.create(P(Z),K),Z._write("%PDF-".concat(Z.version)),Z._write("%\xff\xff\xff\xff"),!1!==Z.options.autoFirstPage&&Z.addPage(),Z}return w(N,[{key:"addPage",value:function(K){null==K&&(K=this.options),this.options.bufferPages||this.flushPages(),this.page=new $(this,K),this._pageBuffer.push(this.page);var fA=this._root.data.Pages.data;return fA.Kids.push(this.page.dictionary),fA.Count++,this.x=this.page.margins.left,this.y=this.page.margins.top,this._ctm=[1,0,0,1,0,0],this.transform(1,0,0,-1,0,this.page.height),this.emit("pageAdded"),this}},{key:"continueOnNewPage",value:function(K){var fA=this.endPageMarkings(this.page);return this.addPage(K),this.initPageMarkings(fA),this}},{key:"bufferedPageRange",value:function(){return{start:this._pageBufferStart,count:this._pageBuffer.length}}},{key:"switchToPage",value:function(K){var fA;if(!(fA=this._pageBuffer[K-this._pageBufferStart]))throw new Error("switchToPage(".concat(K,") out of bounds, current buffer covers pages ").concat(this._pageBufferStart," to ").concat(this._pageBufferStart+this._pageBuffer.length-1));return this.page=fA}},{key:"flushPages",value:function(){var K=this._pageBuffer;this._pageBuffer=[],this._pageBufferStart+=K.length;var IA,fA=yA(K);try{for(fA.s();!(IA=fA.n()).done;){var At=IA.value;this.endPageMarkings(At),At.end()}}catch(nt){fA.e(nt)}finally{fA.f()}}},{key:"addNamedDestination",value:function(K){for(var fA=arguments.length,IA=new Array(fA>1?fA-1:0),At=1;At>z&q]},getCombiningClass:function(vA){var nA=d.get(vA);return y.combiningClasses[nA>>U&BA]},getScript:function(vA){var nA=d.get(vA);return y.scripts[nA>>eA&pA]},getEastAsianWidth:function(vA){var nA=d.get(vA);return y.eaw[nA>>10&lA]},getNumericValue:function(vA){var nA=d.get(vA),EA=1023&nA;if(0===EA)return null;if(EA<=50)return EA-1;if(EA<480)return((EA>>4)-12)/(1+(15&EA));if(EA<768){nA=(EA>>5)-14;for(var st=2+(31&EA);st>0;)nA*=10,st--;return nA}nA=(EA>>2)-191;for(var TA=1+(3&EA);TA>0;)nA*=60,TA--;return nA},isAlphabetic:uA,isDigit:QA,isPunctuation:SA,isLowerCase:bA,isUpperCase:XA,isTitleCase:X,isWhiteSpace:O,isBaseForm:$,isMark:W});I.default=Q},4781:function(T,I,n){"use strict";n(7042),n(6992),n(1539),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(9135);var c=n(311),o=n(1753).swap32LE;T.exports=function(){function v(S){var F="function"==typeof S.readUInt32BE&&"function"==typeof S.slice;if(F||S instanceof Uint8Array){var z;if(F)this.highStart=S.readUInt32LE(0),this.errorValue=S.readUInt32LE(4),z=S.readUInt32LE(8),S=S.slice(12);else{var U=new DataView(S.buffer);this.highStart=U.getUint32(0,!0),this.errorValue=U.getUint32(4,!0),z=U.getUint32(8,!0),S=S.subarray(12)}S=c(S,new Uint8Array(z)),S=c(S,new Uint8Array(z)),o(S),this.data=new Uint32Array(S.buffer)}else{var eA=S;this.data=eA.data,this.highStart=eA.highStart,this.errorValue=eA.errorValue}}return v.prototype.get=function(F){return F<0||F>1114111?this.errorValue:F<55296||F>56319&&F<=65535?this.data[(this.data[F>>5]<<2)+(31&F)]:F<=65535?this.data[(this.data[2048+(F-55296>>5)]<<2)+(31&F)]:F>11)]+(F>>5&63)]<<2)+(31&F)]:this.data[this.data.length-4]},v}()},1753:function(T,I,n){"use strict";n(6992),n(1539),n(2472),n(2990),n(8927),n(3105),n(5035),n(4345),n(7174),n(2846),n(4731),n(7209),n(6319),n(8867),n(7789),n(3739),n(9368),n(4483),n(2056),n(3462),n(678),n(7462),n(3824),n(5021),n(2974),n(5016),n(9135);var c=18===new Uint8Array(new Uint32Array([305419896]).buffer)[0],i=function(a,B,E){var u=a[B];a[B]=a[E],a[E]=u};T.exports={swap32LE:function(a){c&&function(a){for(var B=a.length,E=0;E/)){for(;at=$A();)VA.childNodes.push(at),at.parentNode=VA,VA.textContent+=3===at.nodeType||4===at.nodeType?at.nodeValue:at.textContent;return(LA=tt.match(/^<\/([\w:.-]+)\s*>/,!0))?(LA[1]===VA.nodeName||(re('parseXml: tag not matching, opening "'+VA.nodeName+'" & closing "'+LA[1]+'"'),zA=!0),VA):(re('parseXml: tag not matching, opening "'+VA.nodeName+'" & not closing'),zA=!0,VA)}if(tt.match(/^\/>/))return VA;re('parseXml: tag could not be parsed "'+VA.nodeName+'"'),zA=!0}else{if(LA=tt.match(/^/))return new YA(null,8,LA,zA);if(LA=tt.match(/^<\?[\s\S]*?\?>/))return new YA(null,7,LA,zA);if(LA=tt.match(/^/))return new YA(null,10,LA,zA);if(LA=tt.match(/^/,!0))return new YA("#cdata-section",4,LA[1],zA);if(LA=tt.match(/^([^<]+)/,!0))return new YA("#text",3,q(LA[1]),zA)}};PA=HA();)1!==PA.nodeType||UA?(1===PA.nodeType||3===PA.nodeType&&""!==PA.nodeValue.trim())&&re("parseXml: data after document end has been discarded"):UA=PA;return tt.matchAll()&&re("parseXml: parsing error"),UA}function q(ZA){return ZA.replace(/&(?:#([0-9]+)|#[xX]([0-9A-Fa-f]+)|([0-9A-Za-z]+));/g,function(YA,tt,UA,PA){return tt?String.fromCharCode(parseInt(tt,10)):UA?String.fromCharCode(parseInt(UA,16)):PA&&C[PA]?String.fromCharCode(C[PA]):YA})}function BA(ZA){var YA,tt;return ZA=(ZA||"").trim(),(YA=E[ZA])?tt=[YA.slice(),1]:(YA=ZA.match(/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)$/i))?(YA[1]=parseInt(YA[1]),YA[2]=parseInt(YA[2]),YA[3]=parseInt(YA[3]),YA[4]=parseFloat(YA[4]),YA[1]<256&&YA[2]<256&&YA[3]<256&&YA[4]<=1&&(tt=[YA.slice(1,4),YA[4]])):(YA=ZA.match(/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$/i))?(YA[1]=parseInt(YA[1]),YA[2]=parseInt(YA[2]),YA[3]=parseInt(YA[3]),YA[1]<256&&YA[2]<256&&YA[3]<256&&(tt=[YA.slice(1,4),1])):(YA=ZA.match(/^rgb\(\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/i))?(YA[1]=2.55*parseFloat(YA[1]),YA[2]=2.55*parseFloat(YA[2]),YA[3]=2.55*parseFloat(YA[3]),YA[1]<256&&YA[2]<256&&YA[3]<256&&(tt=[YA.slice(1,4),1])):(YA=ZA.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i))?tt=[[parseInt(YA[1],16),parseInt(YA[2],16),parseInt(YA[3],16)],1]:(YA=ZA.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i))&&(tt=[[17*parseInt(YA[1],16),17*parseInt(YA[2],16),17*parseInt(YA[3],16)],1]),nn?nn(tt,ZA):tt}function pA(ZA,YA,tt){var UA=ZA[0].slice(),PA=ZA[1]*YA;if(tt){for(var zA=0;zA=0;YA--)ZA=lA(Gn[YA].savedMatrix,ZA);return ZA}function yA(){return(new WA).M(0,0).L(o.page.width,0).L(o.page.width,o.page.height).L(0,o.page.height).transform(FA(gA())).getBoundingBox()}function FA(ZA){var YA=ZA[0]*ZA[3]-ZA[1]*ZA[2];return[ZA[3]/YA,-ZA[1]/YA,-ZA[2]/YA,ZA[0]/YA,(ZA[2]*ZA[5]-ZA[3]*ZA[4])/YA,(ZA[1]*ZA[4]-ZA[0]*ZA[5])/YA]}function _(ZA){var YA=bA(ZA[0]),tt=bA(ZA[1]),UA=bA(ZA[2]),PA=bA(ZA[3]),zA=bA(ZA[4]),HA=bA(ZA[5]);if(SA(YA*PA-tt*UA,0))return[YA,tt,UA,PA,zA,HA]}function MA(ZA){var YA=ZA[2]||0,tt=ZA[1]||0,UA=ZA[0]||0;if(QA(YA,0)&&QA(tt,0))return[];if(QA(YA,0))return[-UA/tt];var PA=tt*tt-4*YA*UA;return SA(PA,0)&&PA>0?[(-tt+Math.sqrt(PA))/(2*YA),(-tt-Math.sqrt(PA))/(2*YA)]:QA(PA,0)?[-tt/(2*YA)]:[]}function uA(ZA,YA){return(YA[0]||0)+(YA[1]||0)*ZA+(YA[2]||0)*ZA*ZA+(YA[3]||0)*ZA*ZA*ZA}function QA(ZA,YA){return Math.abs(ZA-YA)<1e-10}function SA(ZA,YA){return Math.abs(ZA-YA)>=1e-10}function bA(ZA){return ZA>-1e21&&ZA<1e21?Math.round(1e6*ZA)/1e6:0}function X(ZA){for(var UA,YA=new It((ZA||"").trim()),tt=[1,0,0,1,0,0];UA=YA.match(/^([A-Za-z]+)\s*[(]([^(]+)[)]/,!0);){for(var PA=UA[1],zA=[],HA=new It(UA[2].trim()),$A=void 0;$A=HA.matchNumber();)zA.push(Number($A)),HA.matchSeparator();if("matrix"===PA&&6===zA.length)tt=lA(tt,[zA[0],zA[1],zA[2],zA[3],zA[4],zA[5]]);else if("translate"===PA&&2===zA.length)tt=lA(tt,[1,0,0,1,zA[0],zA[1]]);else if("translate"===PA&&1===zA.length)tt=lA(tt,[1,0,0,1,zA[0],0]);else if("scale"===PA&&2===zA.length)tt=lA(tt,[zA[0],0,0,zA[1],0,0]);else if("scale"===PA&&1===zA.length)tt=lA(tt,[zA[0],0,0,zA[0],0,0]);else if("rotate"===PA&&3===zA.length){var LA=zA[0]*Math.PI/180;tt=lA(tt,[1,0,0,1,zA[1],zA[2]],[Math.cos(LA),Math.sin(LA),-Math.sin(LA),Math.cos(LA),0,0],[1,0,0,1,-zA[1],-zA[2]])}else if("rotate"===PA&&1===zA.length){var at=zA[0]*Math.PI/180;tt=lA(tt,[Math.cos(at),Math.sin(at),-Math.sin(at),Math.cos(at),0,0])}else if("skewX"===PA&&1===zA.length){var VA=zA[0]*Math.PI/180;tt=lA(tt,[1,0,Math.tan(VA),1,0,0])}else{if("skewY"!==PA||1!==zA.length)return;var dt=zA[0]*Math.PI/180;tt=lA(tt,[1,Math.tan(dt),0,1,0,0])}YA.matchSeparator()}if(!YA.matchAll())return tt}function O(ZA,YA,tt,UA,PA,zA){var HA=(ZA||"").trim().match(/^(none)$|^x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?$/)||[],$A=HA[1]||HA[4]||"meet",VA=YA/UA,dt=tt/PA,St={Min:0,Mid:.5,Max:1}[HA[2]||"Mid"]-(zA||0),Ut={Min:0,Mid:.5,Max:1}[HA[3]||"Mid"]-(zA||0);return"slice"===$A?dt=VA=Math.max(VA,dt):"meet"===$A&&(dt=VA=Math.min(VA,dt)),[VA,0,0,dt,St*(YA-UA*VA),Ut*(tt-PA*dt)]}function $(ZA){var YA=Object.create(null);ZA=(ZA||"").trim().split(/;/);for(var tt=0;ttue&&(Ht=ue,ue=ce,ce=Ht),Zt>ge&&(Ht=ge,ge=Zt,Zt=Ht);for(var ve=MA(St),Ge=0;Ge=0&&ve[Ge]<=1){var Se=uA(ve[Ge],VA);Seue&&(ue=Se)}for(var xe=MA(Ut),Ne=0;Ne=0&&xe[Ne]<=1){var $e=uA(xe[Ne],dt);$ege&&(ge=$e)}return[ce,Zt,ue,ge]},this.getPointAtLength=function(Ht){if(QA(Ht,0))return this.startPoint;if(QA(Ht,this.totalLength))return this.endPoint;if(!(Ht<0||Ht>this.totalLength))for(var ce=1;ce<=at;ce++){var Zt=kt[ce-1],ue=kt[ce];if(Zt<=Ht&&Ht<=ue){var ge=(ce-(ue-Ht)/(ue-Zt))/at,ve=uA(ge,VA),Ge=uA(ge,dt),Se=uA(ge,St),xe=uA(ge,Ut);return[ve,Ge,Math.atan2(xe,Se)]}}}},JA=function(YA,tt,UA,PA){this.totalLength=Math.sqrt((UA-YA)*(UA-YA)+(PA-tt)*(PA-tt)),this.startPoint=[YA,tt,Math.atan2(PA-tt,UA-YA)],this.endPoint=[UA,PA,Math.atan2(PA-tt,UA-YA)],this.getBoundingBox=function(){return[Math.min(this.startPoint[0],this.endPoint[0]),Math.min(this.startPoint[1],this.endPoint[1]),Math.max(this.startPoint[0],this.endPoint[0]),Math.max(this.startPoint[1],this.endPoint[1])]},this.getPointAtLength=function(zA){if(zA>=0&&zA<=this.totalLength){var HA=zA/this.totalLength||0;return[this.startPoint[0]+HA*(this.endPoint[0]-this.startPoint[0]),this.startPoint[1]+HA*(this.endPoint[1]-this.startPoint[1]),this.startPoint[2]]}}},WA=function ZA(){this.pathCommands=[],this.pathSegments=[],this.startPoint=null,this.endPoint=null,this.totalLength=0;var zA,HA,$A,YA=0,tt=0,UA=0,PA=0;this.move=function(LA,at){return YA=UA=LA,tt=PA=at,null},this.line=function(LA,at){var VA=new JA(UA,PA,LA,at);return UA=LA,PA=at,VA},this.curve=function(LA,at,VA,dt,St,Ut){var kt=new ft(UA,PA,LA,at,VA,dt,St,Ut);return UA=St,PA=Ut,kt},this.close=function(){var LA=new JA(UA,PA,YA,tt);return UA=YA,PA=tt,LA},this.addCommand=function(LA){this.pathCommands.push(LA);var at=this[LA[0]].apply(this,LA.slice(3));at&&(at.hasStart=LA[1],at.hasEnd=LA[2],this.startPoint=this.startPoint||at.startPoint,this.endPoint=at.endPoint,this.pathSegments.push(at),this.totalLength+=at.totalLength)},this.M=function(LA,at){return this.addCommand(["move",!0,!0,LA,at]),zA="M",this},this.m=function(LA,at){return this.M(UA+LA,PA+at)},this.Z=this.z=function(){return this.addCommand(["close",!0,!0]),zA="Z",this},this.L=function(LA,at){return this.addCommand(["line",!0,!0,LA,at]),zA="L",this},this.l=function(LA,at){return this.L(UA+LA,PA+at)},this.H=function(LA){return this.L(LA,PA)},this.h=function(LA){return this.L(UA+LA,PA)},this.V=function(LA){return this.L(UA,LA)},this.v=function(LA){return this.L(UA,PA+LA)},this.C=function(LA,at,VA,dt,St,Ut){return this.addCommand(["curve",!0,!0,LA,at,VA,dt,St,Ut]),zA="C",HA=VA,$A=dt,this},this.c=function(LA,at,VA,dt,St,Ut){return this.C(UA+LA,PA+at,UA+VA,PA+dt,UA+St,PA+Ut)},this.S=function(LA,at,VA,dt){return this.C(UA+("C"===zA?UA-HA:0),PA+("C"===zA?PA-$A:0),LA,at,VA,dt)},this.s=function(LA,at,VA,dt){return this.C(UA+("C"===zA?UA-HA:0),PA+("C"===zA?PA-$A:0),UA+LA,PA+at,UA+VA,PA+dt)},this.Q=function(LA,at,VA,dt){return this.addCommand(["curve",!0,!0,UA+.6666666666666666*(LA-UA),PA+2/3*(at-PA),VA+2/3*(LA-VA),dt+2/3*(at-dt),VA,dt]),zA="Q",HA=LA,$A=at,this},this.q=function(LA,at,VA,dt){return this.Q(UA+LA,PA+at,UA+VA,PA+dt)},this.T=function(LA,at){return this.Q(UA+("Q"===zA?UA-HA:0),PA+("Q"===zA?PA-$A:0),LA,at)},this.t=function(LA,at){return this.Q(UA+("Q"===zA?UA-HA:0),PA+("Q"===zA?PA-$A:0),UA+LA,PA+at)},this.A=function(LA,at,VA,dt,St,Ut,kt){if(QA(LA,0)||QA(at,0))this.addCommand(["line",!0,!0,Ut,kt]);else{VA*=Math.PI/180,LA=Math.abs(LA),at=Math.abs(at),dt=1*!!dt,St=1*!!St;var Wt=Math.cos(VA)*(UA-Ut)/2+Math.sin(VA)*(PA-kt)/2,ne=Math.cos(VA)*(PA-kt)/2-Math.sin(VA)*(UA-Ut)/2,wt=Wt*Wt/(LA*LA)+ne*ne/(at*at);wt>1&&(LA*=Math.sqrt(wt),at*=Math.sqrt(wt));var Pt=Math.sqrt(Math.max(0,LA*LA*at*at-LA*LA*ne*ne-at*at*Wt*Wt)/(LA*LA*ne*ne+at*at*Wt*Wt)),jt=(dt===St?-1:1)*Pt*LA*ne/at,Ht=(dt===St?1:-1)*Pt*at*Wt/LA,ce=Math.cos(VA)*jt-Math.sin(VA)*Ht+(UA+Ut)/2,Zt=Math.sin(VA)*jt+Math.cos(VA)*Ht+(PA+kt)/2,ue=Math.atan2((ne-Ht)/at,(Wt-jt)/LA),ge=Math.atan2((-ne-Ht)/at,(-Wt-jt)/LA);0===St&&ge-ue>0?ge-=2*Math.PI:1===St&&ge-ue<0&&(ge+=2*Math.PI);for(var ve=Math.ceil(Math.abs(ge-ue)/(Math.PI/bn)),Ge=0;GeLA[2]&&(LA[2]=dt[2]),dt[1]LA[3]&&(LA[3]=dt[3]);return LA[0]===1/0&&(LA[0]=0),LA[1]===1/0&&(LA[1]=0),LA[2]===-1/0&&(LA[2]=0),LA[3]===-1/0&&(LA[3]=0),LA},this.getPointAtLength=function(LA){if(LA>=0&&LA<=this.totalLength){for(var at,VA=0;VAPA.selector.specificity||(YA[zA]=PA.css[zA],tt[zA]=PA.selector.specificity)}return YA}(YA),this.allowedChildren=[],this.attr=function(zA){if("function"==typeof YA.getAttribute)return YA.getAttribute(zA)},this.resolveUrl=function(zA){var HA=(zA||"").match(/^\s*(?:url\("(.*)#(.*)"\)|url\('(.*)#(.*)'\)|url\((.*)#(.*)\)|(.*)#(.*))\s*$/)||[],$A=HA[1]||HA[3]||HA[5]||HA[7],LA=HA[2]||HA[4]||HA[6]||HA[8];if(LA){if(!$A){var at=l.getElementById(LA);if(at)return-1===this.stack.indexOf(at)?at:void re('SVGtoPDF: loop of circular references for id "'+LA+'"')}if(Xe){var VA=Jt[$A];if(!VA){(function XA(ZA){return"object"==typeof ZA&&null!==ZA&&"number"==typeof ZA.length})(VA=Xe($A))||(VA=[VA]);for(var dt=0;dt=0&&$A[3]>=0?$A:HA},this.getPercent=function(zA,HA){var $A=this.attr(zA),LA=new It(($A||"").trim()),dt=LA.matchNumber();return!dt||(LA.match("%")&&(dt*=.01),LA.matchAll())?HA:Math.max(0,Math.min(1,dt))},this.chooseValue=function(zA){for(var HA=0;HA=0&&(LA=VA);break;case"stroke-miterlimit":null!=(VA=parseFloat($A))&&VA>=1&&(LA=VA);break;case"word-spacing":case"letter-spacing":LA=this.computeLength($A,this.getViewport());break;case"stroke-dashoffset":if(null!=(LA=this.computeLength($A,this.getViewport()))&&LA<0)for(var ne=this.get("stroke-dasharray"),wt=0;wt0?HA:this.ref?this.ref.getChildren():[]},this.getPaint=function(HA,$A,LA,at){var VA="userSpaceOnUse"!==this.attr("patternUnits"),dt="objectBoundingBox"===this.attr("patternContentUnits"),St=this.getLength("x",VA?1:this.getParentVWidth(),0),Ut=this.getLength("y",VA?1:this.getParentVHeight(),0),kt=this.getLength("width",VA?1:this.getParentVWidth(),0),Wt=this.getLength("height",VA?1:this.getParentVHeight(),0);dt&&!VA?(St=(St-HA[0])/(HA[2]-HA[0])||0,Ut=(Ut-HA[1])/(HA[3]-HA[1])||0,kt=kt/(HA[2]-HA[0])||0,Wt=Wt/(HA[3]-HA[1])||0):!dt&&VA&&(St=HA[0]+St*(HA[2]-HA[0]),Ut=HA[1]+Ut*(HA[3]-HA[1]),kt*=HA[2]-HA[0],Wt*=HA[3]-HA[1]);var ne=this.getViewbox("viewBox",[0,0,kt,Wt]),Pt=lA(O((this.attr("preserveAspectRatio")||"").trim(),kt,Wt,ne[2],ne[3],0),[1,0,0,1,-ne[0],-ne[1]]),jt=X(this.attr("patternTransform"));if(dt&&(jt=lA([HA[2]-HA[0],0,0,HA[3]-HA[1],HA[0],HA[1]],jt)),(jt=_(jt=lA(jt,[1,0,0,1,St,Ut])))&&(Pt=_(Pt))&&(kt=bA(kt))&&(Wt=bA(Wt))){var Ht=w([0,0,kt,Wt]);return o.transform.apply(o,Pt),this.drawChildren(LA,at),Q(Ht),[y(Ht,kt,Wt,jt),$A]}return UA?[UA[0],UA[1]*$A]:void 0},this.getVWidth=function(){var HA="userSpaceOnUse"!==this.attr("patternUnits"),$A=this.getLength("width",HA?1:this.getParentVWidth(),0);return this.getViewbox("viewBox",[0,0,$A,0])[2]},this.getVHeight=function(){var HA="userSpaceOnUse"!==this.attr("patternUnits"),$A=this.getLength("height",HA?1:this.getParentVHeight(),0);return this.getViewbox("viewBox",[0,0,0,$A])[3]}},RA=function ZA(YA,tt,UA){rt.call(this,YA,tt),this.allowedChildren=["stop"],this.ref=function(){var HA=this.getUrl("href")||this.getUrl("xlink:href");if(HA&&HA.nodeName===YA.nodeName)return new ZA(HA,tt,UA)}.call(this);var PA=this.attr;this.attr=function(HA){var $A=PA.call(this,HA);return null!=$A||"href"===HA||"xlink:href"===HA?$A:this.ref?this.ref.attr(HA):null};var zA=this.getChildren;this.getChildren=function(){var HA=zA.call(this);return HA.length>0?HA:this.ref?this.ref.getChildren():[]},this.getPaint=function(HA,$A,LA,at){var VA=this.getChildren();if(0!==VA.length){if(1===VA.length){var dt=VA[0],St=dt.get("stop-color");return"none"===St?void 0:pA(St,dt.get("stop-opacity")*$A,at)}var ne,wt,Pt,jt,Ht,ce,Ut="userSpaceOnUse"!==this.attr("gradientUnits"),kt=X(this.attr("gradientTransform")),Wt=this.attr("spreadMethod"),Zt=0,ue=0,ge=1;if(Ut&&(kt=lA([HA[2]-HA[0],0,0,HA[3]-HA[1],HA[0],HA[1]],kt)),kt=_(kt)){if("linearGradient"===this.name)wt=this.getLength("x1",Ut?1:this.getVWidth(),0),Pt=this.getLength("x2",Ut?1:this.getVWidth(),Ut?1:this.getVWidth()),jt=this.getLength("y1",Ut?1:this.getVHeight(),0),Ht=this.getLength("y2",Ut?1:this.getVHeight(),0);else{Pt=this.getLength("cx",Ut?1:this.getVWidth(),Ut?.5:.5*this.getVWidth()),Ht=this.getLength("cy",Ut?1:this.getVHeight(),Ut?.5:.5*this.getVHeight()),ce=this.getLength("r",Ut?1:this.getViewport(),Ut?.5:.5*this.getViewport()),wt=this.getLength("fx",Ut?1:this.getVWidth(),Pt),jt=this.getLength("fy",Ut?1:this.getVHeight(),Ht),ce<0&&re("SvgElemGradient: negative r value");var ve=Math.sqrt(Math.pow(Pt-wt,2)+Math.pow(Ht-jt,2)),Ge=1;ve>ce&&(wt=Pt+(wt-Pt)*(Ge=ce/ve),jt=Ht+(jt-Ht)*Ge),ce=Math.max(ce,ve*Ge*1.000001)}if("reflect"===Wt||"repeat"===Wt){var Se=FA(kt),xe=cA([HA[0],HA[1]],Se),Ne=cA([HA[2],HA[1]],Se),$e=cA([HA[2],HA[3]],Se),yn=cA([HA[0],HA[3]],Se);"linearGradient"===this.name?(Zt=Math.max((xe[0]-Pt)*(Pt-wt)+(xe[1]-Ht)*(Ht-jt),(Ne[0]-Pt)*(Pt-wt)+(Ne[1]-Ht)*(Ht-jt),($e[0]-Pt)*(Pt-wt)+($e[1]-Ht)*(Ht-jt),(yn[0]-Pt)*(Pt-wt)+(yn[1]-Ht)*(Ht-jt))/(Math.pow(Pt-wt,2)+Math.pow(Ht-jt,2)),ue=Math.max((xe[0]-wt)*(wt-Pt)+(xe[1]-jt)*(jt-Ht),(Ne[0]-wt)*(wt-Pt)+(Ne[1]-jt)*(jt-Ht),($e[0]-wt)*(wt-Pt)+($e[1]-jt)*(jt-Ht),(yn[0]-wt)*(wt-Pt)+(yn[1]-jt)*(jt-Ht))/(Math.pow(Pt-wt,2)+Math.pow(Ht-jt,2))):Zt=Math.sqrt(Math.max(Math.pow(xe[0]-Pt,2)+Math.pow(xe[1]-Ht,2),Math.pow(Ne[0]-Pt,2)+Math.pow(Ne[1]-Ht,2),Math.pow($e[0]-Pt,2)+Math.pow($e[1]-Ht,2),Math.pow(yn[0]-Pt,2)+Math.pow(yn[1]-Ht,2)))/ce-1,Zt=Math.ceil(Zt+.5),ge=(ue=Math.ceil(ue+.5))+1+Zt}ne="linearGradient"===this.name?o.linearGradient(wt-ue*(Pt-wt),jt-ue*(Ht-jt),Pt+Zt*(Pt-wt),Ht+Zt*(Ht-jt)):o.radialGradient(wt,jt,0,Pt,Ht,ce+Zt*ce);for(var an=0;an0&&ne.stop((an+0)/ge,cn[0],cn[1]),ne.stop((an+Mn)/(Zt+ue+1),cn[0],cn[1]),qe===VA.length-1&&Mn<1&&ne.stop((an+1)/ge,cn[0],cn[1])}return ne.setTransform.apply(ne,kt),[ne,1]}return UA?[UA[0],UA[1]*$A]:void 0}}},rA=function(YA,tt){xA.call(this,YA,tt),this.dashScale=1,this.getBoundingShape=function(){return this.shape},this.getTransformation=function(){return this.get("transform")},this.drawInDocument=function(UA,PA){if("hidden"!==this.get("visibility")&&this.shape){if(o.save(),this.transform(),this.clip(),UA)this.shape.insertInDocument(),z(u.white),o.fill(this.get("clip-rule"));else{var HA;this.mask()&&(HA=w(yA()));var $A=this.shape.getSubPaths(),LA=this.getFill(UA,PA),at=this.getStroke(UA,PA),VA=this.get("stroke-width"),dt=this.get("stroke-linecap");if(LA||at){if(LA&&z(LA),at){for(var St=0;St<$A.length;St++)if(QA($A[St].totalLength,0)&&("square"===dt||"round"===dt)&&VA>0&&$A[St].startPoint&&$A[St].startPoint.length>1){var Ut=$A[St].startPoint[0],kt=$A[St].startPoint[1];z(at),"square"===dt?o.rect(Ut-.5*VA,kt-.5*VA,VA,VA):"round"===dt&&o.circle(Ut,kt,.5*VA),o.fill()}var Wt=this.get("stroke-dasharray"),ne=this.get("stroke-dashoffset");if(SA(this.dashScale,1)){for(var wt=0;wt0&&$A[Pt].insertInDocument();LA&&at?o.fillAndStroke(this.get("fill-rule")):LA?o.fill(this.get("fill-rule")):at&&o.stroke()}var jt=this.get("marker-start"),Ht=this.get("marker-mid"),ce=this.get("marker-end");if("none"!==jt||"none"!==Ht||"none"!==ce){var Zt=this.shape.getMarkers();if("none"!==jt&&new lt(jt,null).drawMarker(!1,PA,Zt[0],VA),"none"!==Ht)for(var ge=1;ge0&&HA>0?$A&&LA?($A=Math.min($A,.5*zA),LA=Math.min(LA,.5*HA),this.shape=(new WA).M(UA+$A,PA).L(UA+zA-$A,PA).A($A,LA,0,0,1,UA+zA,PA+LA).L(UA+zA,PA+HA-LA).A($A,LA,0,0,1,UA+zA-$A,PA+HA).L(UA+$A,PA+HA).A($A,LA,0,0,1,UA,PA+HA-LA).L(UA,PA+LA).A($A,LA,0,0,1,UA+$A,PA).Z()):this.shape=(new WA).M(UA,PA).L(UA+zA,PA).L(UA+zA,PA+HA).L(UA,PA+HA).Z():this.shape=new WA},Ft=function(YA,tt){rA.call(this,YA,tt);var UA=this.getLength("cx",this.getVWidth(),0),PA=this.getLength("cy",this.getVHeight(),0),zA=this.getLength("r",this.getViewport(),0);this.shape=zA>0?(new WA).M(UA+zA,PA).A(zA,zA,0,0,1,UA-zA,PA).A(zA,zA,0,0,1,UA+zA,PA).Z():new WA},j=function(YA,tt){rA.call(this,YA,tt);var UA=this.getLength("cx",this.getVWidth(),0),PA=this.getLength("cy",this.getVHeight(),0),zA=this.getLength("rx",this.getVWidth(),0),HA=this.getLength("ry",this.getVHeight(),0);this.shape=zA>0&&HA>0?(new WA).M(UA+zA,PA).A(zA,HA,0,0,1,UA-zA,PA).A(zA,HA,0,0,1,UA+zA,PA).Z():new WA},qA=function(YA,tt){rA.call(this,YA,tt);var UA=this.getLength("x1",this.getVWidth(),0),PA=this.getLength("y1",this.getVHeight(),0),zA=this.getLength("x2",this.getVWidth(),0),HA=this.getLength("y2",this.getVHeight(),0);this.shape=(new WA).M(UA,PA).L(zA,HA)},KA=function(YA,tt){rA.call(this,YA,tt);var UA=this.getNumberList("points");this.shape=new WA;for(var PA=0;PA0?UA:void 0,this.dashScale=void 0!==this.pathLength?this.shape.totalLength/this.pathLength:1},lt=function(YA,tt){Mt.call(this,YA,tt);var UA=this.getLength("markerWidth",this.getParentVWidth(),3),PA=this.getLength("markerHeight",this.getParentVHeight(),3),zA=this.getViewbox("viewBox",[0,0,UA,PA]);this.getVWidth=function(){return zA[2]},this.getVHeight=function(){return zA[3]},this.drawMarker=function(HA,$A,LA,at){o.save();var VA=this.attr("orient"),dt=this.attr("markerUnits"),St="auto"===VA?LA[2]:(parseFloat(VA)||0)*Math.PI/180,Ut="userSpaceOnUse"===dt?1:at;o.transform(Math.cos(St)*Ut,Math.sin(St)*Ut,-Math.sin(St)*Ut,Math.cos(St)*Ut,LA[0],LA[1]);var wt,kt=this.getLength("refX",this.getVWidth(),0),Wt=this.getLength("refY",this.getVHeight(),0),ne=O(this.attr("preserveAspectRatio"),UA,PA,zA[2],zA[3],.5);"hidden"===this.get("overflow")&&o.rect(ne[0]*(zA[0]+zA[2]/2-kt)-UA/2,ne[3]*(zA[1]+zA[3]/2-Wt)-PA/2,UA,PA).clip(),o.transform.apply(o,ne),o.translate(-kt,-Wt),this.get("opacity")<1&&!HA&&(wt=w(yA())),this.drawChildren(HA,$A),wt&&(Q(wt),o.fillOpacity(this.get("opacity")),p(wt)),o.restore()}},Lt=function(YA,tt){Mt.call(this,YA,tt),this.useMask=function(UA){var PA=w(yA());o.save(),"objectBoundingBox"===this.attr("clipPathUnits")&&o.transform(UA[2]-UA[0],0,0,UA[3]-UA[1],UA[0],UA[1]),this.clip(),this.drawChildren(!0,!1),o.restore(),Q(PA),Y(PA,!0)}},yt=function(YA,tt){Mt.call(this,YA,tt),this.useMask=function(UA){var zA,HA,$A,LA,PA=w(yA());o.save(),"userSpaceOnUse"===this.attr("maskUnits")?(zA=this.getLength("x",this.getVWidth(),-.1*(UA[2]-UA[0])+UA[0]),HA=this.getLength("y",this.getVHeight(),-.1*(UA[3]-UA[1])+UA[1]),$A=this.getLength("width",this.getVWidth(),1.2*(UA[2]-UA[0])),LA=this.getLength("height",this.getVHeight(),1.2*(UA[3]-UA[1]))):(zA=this.getLength("x",this.getVWidth(),-.1)*(UA[2]-UA[0])+UA[0],HA=this.getLength("y",this.getVHeight(),-.1)*(UA[3]-UA[1])+UA[1],$A=this.getLength("width",this.getVWidth(),1.2)*(UA[2]-UA[0]),LA=this.getLength("height",this.getVHeight(),1.2)*(UA[3]-UA[1])),o.rect(zA,HA,$A,LA).clip(),"objectBoundingBox"===this.attr("maskContentUnits")&&o.transform(UA[2]-UA[0],0,0,UA[3]-UA[1],UA[0],UA[1]),this.clip(),this.drawChildren(!1,!0),o.restore(),Q(PA),Y(PA,!0)}},Rt=function(YA,tt){xA.call(this,YA,tt),this.allowedChildren=["tspan","#text","#cdata-section","a"],this.isText=!0,this.getBoundingShape=function(){for(var UA=new WA,PA=0;PA Tj")}o.addContent("ET")}}}"line-through"===this.get("text-decoration")&&this.decorate(.05*this._font.size,.5*(GA(this._font.font,this._font.size)+et(this._font.font,this._font.size)),UA,PA)},this.decorate=function(UA,PA,zA,HA){var $A=this.getFill(zA,HA),LA=this.getStroke(zA,HA);$A&&z($A),LA&&(U(LA),o.lineWidth(this.get("stroke-width")).miterLimit(this.get("stroke-miterlimit")).lineJoin(this.get("stroke-linejoin")).lineCap(this.get("stroke-linecap")).dash(this.get("stroke-dasharray"),{phase:this.get("stroke-dashoffset")}));for(var at=0,VA=this._pos;at0?HA:this.pathObject.totalLength,this.pathScale=this.pathObject.totalLength/this.pathLength}else if((zA=this.getUrl("href")||this.getUrl("xlink:href"))&&"path"===zA.nodeName){var $A=new jA(zA,this);this.pathObject=$A.shape.clone().transform($A.get("transform")),this.pathLength=this.chooseValue($A.pathLength,this.pathObject.totalLength),this.pathScale=this.pathObject.totalLength/this.pathLength}},te=function(YA,tt){Rt.call(this,YA,tt),this.allowedChildren=["textPath","tspan","#text","#cdata-section","a"],function(UA){var LA,at,PA="",zA=YA.textContent,HA=[],$A=[],VA=0,dt=0;function St(){if($A.length)for(var wt=$A[$A.length-1],Ht={startltr:0,middleltr:.5,endltr:1,startrtl:1,middlertl:.5,endrtl:0}[LA+at]*(wt.x+wt.width-$A[0].x)||0,ce=0;ce<$A.length;ce++)$A[ce].x-=Ht;$A=[]}function Wt(wt){var Pt=wt.pathObject,jt=wt.pathLength,Ht=wt.pathScale;if(Pt)for(var ce=wt.getLength("startOffset",jt,0),Zt=0;Ztjt||ue<0)wt._pos[Zt].hidden=!0;else{var ge=Pt.getPointAtLength(ue*Ht);SA(Ht,1)&&(wt._pos[Zt].scale*=Ht,wt._pos[Zt].width*=Ht),wt._pos[Zt].x=ge[0]-.5*wt._pos[Zt].width*Math.cos(ge[2])-wt._pos[Zt].y*Math.sin(ge[2]),wt._pos[Zt].y=ge[1]-.5*wt._pos[Zt].width*Math.sin(ge[2])+wt._pos[Zt].y*Math.cos(ge[2]),wt._pos[Zt].rotate=ge[2]+wt._pos[Zt].rotate,wt._pos[Zt].continuous=!1}}else for(var ve=0;ve0&&ge<1/0)for(var ve=0;ve=2)for(var Ge=(Pt-(ue-Zt))/(wt.length-1),Se=0;Se0?p-4:p;for(v=0;v>16&255,y[d++]=w>>8&255,y[d++]=255&w;return 2===Y&&(w=c[g.charCodeAt(v)]<<2|c[g.charCodeAt(v+1)]>>4,y[d++]=255&w),1===Y&&(w=c[g.charCodeAt(v)]<<10|c[g.charCodeAt(v+1)]<<4|c[g.charCodeAt(v+2)]>>2,y[d++]=w>>8&255,y[d++]=255&w),y},I.fromByteArray=function f(g){for(var w,Q=g.length,p=Q%3,Y=[],y=16383,d=0,m=Q-p;dm?m:d+y));return 1===p?Y.push(n[(w=g[Q-1])>>2]+n[w<<4&63]+"=="):2===p&&Y.push(n[(w=(g[Q-2]<<8)+g[Q-1])>>10]+n[w>>4&63]+n[w<<2&63]+"="),Y.join("")};for(var n=[],c=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=0,h=o.length;l0)throw new Error("Invalid string. Length must be a multiple of 4");var Q=g.indexOf("=");return-1===Q&&(Q=w),[Q,Q===w?0:4-Q%4]}function C(g){return n[g>>18&63]+n[g>>12&63]+n[g>>6&63]+n[63&g]}function e(g,w,Q){for(var Y=[],y=w;y0},o.prototype.readMoreInput=function(){if(!(this.bit_end_pos_>256))if(this.eos_){if(this.bit_pos_>this.bit_end_pos_)throw new Error("Unexpected end of input "+this.bit_pos_+" "+this.bit_end_pos_)}else{var l=this.buf_ptr_,h=this.input_.read(this.buf_,l,I);if(h<0)throw new Error("Unexpected end of input");if(h=8;)this.val_>>>=8,this.val_|=this.buf_[8191&this.pos_]<<24,++this.pos_,this.bit_pos_=this.bit_pos_-8>>>0,this.bit_end_pos_=this.bit_end_pos_-8>>>0},o.prototype.readBits=function(l){32-this.bit_pos_>>this.bit_pos_&i[l];return this.bit_pos_+=l,h},T.exports=o},7080:function(T,I){I.lookup=new Uint8Array([0,0,0,0,0,0,0,0,0,4,4,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,12,16,12,12,20,12,16,24,28,12,12,32,12,36,12,44,44,44,44,44,44,44,44,44,44,32,32,24,40,28,12,12,48,52,52,52,48,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,48,52,52,52,52,52,24,12,28,12,12,12,56,60,60,60,56,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,56,60,60,60,60,60,24,12,28,12,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,56,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,6,6,6,6,7,7,7,7,8,8,8,8,9,9,9,9,10,10,10,10,11,11,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,22,22,22,22,23,23,23,23,24,24,24,24,25,25,25,25,26,26,26,26,27,27,27,27,28,28,28,28,29,29,29,29,30,30,30,30,31,31,31,31,32,32,32,32,33,33,33,33,34,34,34,34,35,35,35,35,36,36,36,36,37,37,37,37,38,38,38,38,39,39,39,39,40,40,40,40,41,41,41,41,42,42,42,42,43,43,43,43,44,44,44,44,45,45,45,45,46,46,46,46,47,47,47,47,48,48,48,48,49,49,49,49,50,50,50,50,51,51,51,51,52,52,52,52,53,53,53,53,54,54,54,54,55,55,55,55,56,56,56,56,57,57,57,57,58,58,58,58,59,59,59,59,60,60,60,60,61,61,61,61,62,62,62,62,63,63,63,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),I.lookupOffsets=new Uint16Array([1024,1536,1280,1536,0,256,768,512])},6450:function(T,I,n){var i=n(6154).g,o=n(6154).j,l=n(4181),h=n(5139),a=n(966).h,B=n(966).g,E=n(7080),u=n(8435),C=n(2973),m=1080,P=new Uint8Array([1,2,3,4,0,5,17,6,16,7,8,9,10,11,12,13,14,15]),F=new Uint8Array([3,2,1,0,3,3,3,3,3,3,2,2,2,2,2,2]),z=new Int8Array([0,0,0,0,-1,1,-2,2,-3,3,-1,1,-2,2,-3,3]),U=new Uint16Array([256,402,436,468,500,534,566,598,630,662,694,726,758,790,822,854,886,920,952,984,1016,1048,1080]);function eA($){var W;return 0===$.readBits(1)?16:(W=$.readBits(3))>0?17+W:(W=$.readBits(3))>0?8+W:17}function sA($){if($.readBits(1)){var W=$.readBits(3);return 0===W?1:$.readBits(W)+(1<1&&0===EA)throw new Error("Invalid size byte");W.meta_block_length|=EA<<8*nA}}else for(nA=0;nA4&&0===GA)throw new Error("Invalid size nibble");W.meta_block_length|=GA<<4*nA}return++W.meta_block_length,!W.input_end&&!W.is_metadata&&(W.is_uncompressed=$.readBits(1)),W}function pA($,W,hA){var nA;return hA.fillBitWindow(),(nA=$[W+=hA.val_>>>hA.bit_pos_&255].bits-8)>0&&(hA.bit_pos_+=8,W+=$[W].value,W+=hA.val_>>>hA.bit_pos_&(1<>=1,++TA;for(et=0;et0;++et){var Mt,rt=P[et],xA=0;vA.fillBitWindow(),vA.bit_pos_+=WA[xA+=vA.val_>>>vA.bit_pos_&15].bits,It[rt]=Mt=WA[xA].value,0!==Mt&&(ft-=32>>Mt,++JA)}if(1!==JA&&0!==ft)throw new Error("[ReadHuffmanCode] invalid num_codes or space");!function lA($,W,hA,vA){for(var nA=0,EA=8,GA=0,et=0,st=32768,TA=[],it=0;it<32;it++)TA.push(new a(0,0));for(B(TA,0,5,$,18);nA0;){var It,mt=0;if(vA.readMoreInput(),vA.fillBitWindow(),vA.bit_pos_+=TA[mt+=vA.val_>>>vA.bit_pos_&31].bits,(It=255&TA[mt].value)<16)GA=0,hA[nA++]=It,0!==It&&(EA=It,st-=32768>>It);else{var JA,WA,ft=It-14,rt=0;if(16===It&&(rt=EA),et!==rt&&(GA=0,et=rt),JA=GA,GA>0&&(GA-=2,GA<<=ft),nA+(WA=(GA+=vA.readBits(ft)+3)-JA)>W)throw new Error("[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols");for(var xA=0;xA>>5]),this.htrees=new Uint32Array(W)}function uA($,W){var EA,GA,hA={num_htrees:null,context_map:null},nA=0;W.readMoreInput();var et=hA.num_htrees=sA(W)+1,st=hA.context_map=new Uint8Array($);if(et<=1)return hA;for(W.readBits(1)&&(nA=W.readBits(4)+1),EA=[],GA=0;GA=$)throw new Error("[DecodeContextMap] i >= context_map_size");st[GA]=0,++GA}else st[GA]=TA-nA,++GA}return W.readBits(1)&&function _($,W){var vA,hA=new Uint8Array(256);for(vA=0;vA<256;++vA)hA[vA]=vA;for(vA=0;vA=$&&(it-=$),vA[hA]=it,nA[et+(1&EA[st])]=it,++EA[st]}function SA($,W,hA,vA,nA,EA){var TA,GA=nA+1,et=hA&nA,st=EA.pos_&l.IBUF_MASK;if(W<8||EA.bit_pos_+(W<<3)0;)EA.readMoreInput(),vA[et++]=EA.readBits(8),et===GA&&($.write(vA,GA),et=0);else{if(EA.bit_end_pos_<32)throw new Error("[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32");for(;EA.bit_pos_<32;)vA[et]=EA.val_>>>EA.bit_pos_,EA.bit_pos_+=8,++et,--W;if(st+(TA=EA.bit_end_pos_-EA.bit_pos_>>3)>l.IBUF_MASK){for(var it=l.IBUF_MASK+1-st,mt=0;mt=GA)for($.write(vA,GA),et-=GA,mt=0;mt=GA;){if(EA.input_.read(vA,et,TA=GA-et)W.buffer.length){var re=new Uint8Array(vA+H);re.set(W.buffer),W.buffer=re}if(nA=Dn.input_end,k=Dn.is_uncompressed,Dn.is_metadata)for(bA(ht);H>0;--H)ht.readMoreInput(),ht.readBits(8);else if(0!==H){if(k){ht.bit_pos_=ht.bit_pos_+7&-8,SA(W,H,vA,it,TA,ht),vA+=H;continue}for(hA=0;hA<3;++hA)wA[hA]=sA(ht)+1,wA[hA]>=2&&(cA(wA[hA]+2,xA,hA*m,ht),cA(26,Mt,hA*m,ht),b[hA]=gA(Mt,hA*m,ht),rA[hA]=1);for(ht.readMoreInput(),j=(1<<(gt=ht.readBits(2)))-1,qA=(Ft=16+(ht.readBits(4)<0;){var nn,Xe,bn,Gn,Jt,bt,Xt,oe,dn,Fn,Kn,gr;for(ht.readMoreInput(),0===b[1]&&(QA(wA[1],xA,1,CA,RA,rA,ht),b[1]=gA(Mt,m,ht),vn=rt[1].htrees[CA[1]]),--b[1],(Xe=(nn=pA(rt[1].codes,vn,ht))>>6)>=2?(Xe-=2,Xt=-1):Xt=0,Gn=u.kCopyRangeLut[Xe]+(7&nn),Jt=u.kInsertLengthPrefixCode[bn=u.kInsertRangeLut[Xe]+(nn>>3&7)].offset+ht.readBits(u.kInsertLengthPrefixCode[bn].nbits),bt=u.kCopyLengthPrefixCode[Gn].offset+ht.readBits(u.kCopyLengthPrefixCode[Gn].nbits),JA=it[vA-1&TA],WA=it[vA-2&TA],dn=0;dn4?3:bt-2))]],ht))>=Ft&&(gr=(Xt-=Ft)&j,Xt=Ft+((Yn=(2+(1&(Xt>>=gt))<<(Kn=1+(Xt>>1)))-4)+ht.readBits(Kn)<(et=vA=h.minDictionaryWordLength&&bt<=h.maxDictionaryWordLength))throw new Error("Invalid backward reference. pos: "+vA+" distance: "+oe+" len: "+bt+" bytes left: "+H);var Yn=h.offsetsByLength[bt],ZA=oe-et-1,YA=h.sizeBitsByLength[bt],PA=ZA>>YA;if(Yn+=(ZA&(1<=mt){W.write(it,st);for(var HA=0;HA0&&(It[3&ft]=oe,++ft),bt>H)throw new Error("Invalid backward reference. pos: "+vA+" distance: "+oe+" len: "+bt+" bytes left: "+H);for(dn=0;dn>=1;return(h&B-1)+B}function o(h,a,B,E,u){do{h[a+(E-=B)]=new n(u.bits,u.value)}while(E>0)}function l(h,a,B){for(var E=1<0;--P[f])o(h,a+w,Q,d,new n(255&f,65535&v[g++])),w=i(w,f);for(Y=m-1,p=-1,f=B+1,Q=2;f<=c;++f,Q<<=1)for(;P[f]>0;--P[f])(w&Y)!==p&&(a+=d,m+=d=1<<(y=l(P,f,B)),h[C+(p=w&Y)]=new n(y+B&255,a-C-p&65535)),o(h,a+(w>>B),Q,d,new n(f-B&255,65535&v[g++])),w=i(w,f);return m}},8435:function(T,I){function n(c,i){this.offset=c,this.nbits=i}I.kBlockLengthPrefixCode=[new n(1,2),new n(5,2),new n(9,2),new n(13,2),new n(17,3),new n(25,3),new n(33,3),new n(41,3),new n(49,4),new n(65,4),new n(81,4),new n(97,4),new n(113,5),new n(145,5),new n(177,5),new n(209,5),new n(241,6),new n(305,6),new n(369,7),new n(497,8),new n(753,9),new n(1265,10),new n(2289,11),new n(4337,12),new n(8433,13),new n(16625,24)],I.kInsertLengthPrefixCode=[new n(0,0),new n(1,0),new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,1),new n(8,1),new n(10,2),new n(14,2),new n(18,3),new n(26,3),new n(34,4),new n(50,4),new n(66,5),new n(98,5),new n(130,6),new n(194,7),new n(322,8),new n(578,9),new n(1090,10),new n(2114,12),new n(6210,14),new n(22594,24)],I.kCopyLengthPrefixCode=[new n(2,0),new n(3,0),new n(4,0),new n(5,0),new n(6,0),new n(7,0),new n(8,0),new n(9,0),new n(10,1),new n(12,1),new n(14,2),new n(18,2),new n(22,3),new n(30,3),new n(38,4),new n(54,4),new n(70,5),new n(102,5),new n(134,6),new n(198,7),new n(326,8),new n(582,9),new n(1094,10),new n(2118,24)],I.kInsertRangeLut=[0,0,8,8,0,16,8,16,16],I.kCopyRangeLut=[0,8,0,8,16,0,16,8,16]},6154:function(T,I){function n(i){this.buffer=i,this.pos=0}function c(i){this.buffer=i,this.pos=0}n.prototype.read=function(i,o,l){this.pos+l>this.buffer.length&&(l=this.buffer.length-this.pos);for(var h=0;hthis.buffer.length)throw new Error("Output buffer is not large enough");return this.buffer.set(i.subarray(0,o),this.pos),this.pos+=o,o},I.j=c},2973:function(T,I,n){var c=n(5139),f=10,g=11;function S(U,eA,sA){this.prefix=new Uint8Array(U.length),this.transform=eA,this.suffix=new Uint8Array(sA.length);for(var q=0;q'),new S("",0,"\n"),new S("",3,""),new S("",0,"]"),new S("",0," for "),new S("",14,""),new S("",2,""),new S("",0," a "),new S("",0," that "),new S(" ",f,""),new S("",0,". "),new S(".",0,""),new S(" ",0,", "),new S("",15,""),new S("",0," with "),new S("",0,"'"),new S("",0," from "),new S("",0," by "),new S("",16,""),new S("",17,""),new S(" the ",0,""),new S("",4,""),new S("",0,". The "),new S("",g,""),new S("",0," on "),new S("",0," as "),new S("",0," is "),new S("",7,""),new S("",1,"ing "),new S("",0,"\n\t"),new S("",0,":"),new S(" ",0,". "),new S("",0,"ed "),new S("",20,""),new S("",18,""),new S("",6,""),new S("",0,"("),new S("",f,", "),new S("",8,""),new S("",0," at "),new S("",0,"ly "),new S(" the ",0," of "),new S("",5,""),new S("",9,""),new S(" ",f,", "),new S("",f,'"'),new S(".",0,"("),new S("",g," "),new S("",f,'">'),new S("",0,'="'),new S(" ",0,"."),new S(".com/",0,""),new S(" the ",0," of the "),new S("",f,"'"),new S("",0,". This "),new S("",0,","),new S(".",0," "),new S("",f,"("),new S("",f,"."),new S("",0," not "),new S(" ",0,'="'),new S("",0,"er "),new S(" ",g," "),new S("",0,"al "),new S(" ",g,""),new S("",0,"='"),new S("",g,'"'),new S("",f,". "),new S(" ",0,"("),new S("",0,"ful "),new S(" ",f,". "),new S("",0,"ive "),new S("",0,"less "),new S("",g,"'"),new S("",0,"est "),new S(" ",f,"."),new S("",g,'">'),new S(" ",0,"='"),new S("",f,","),new S("",0,"ize "),new S("",g,"."),new S("\xc2\xa0",0,""),new S(" ",0,","),new S("",f,'="'),new S("",g,'="'),new S("",0,"ous "),new S("",g,", "),new S("",f,"='"),new S(" ",f,","),new S(" ",g,'="'),new S(" ",g,", "),new S("",g,","),new S("",g,"("),new S("",g,". "),new S(" ",g,"."),new S("",g,"='"),new S(" ",g,". "),new S(" ",f,'="'),new S(" ",g,"='"),new S(" ",f,"='")];function z(U,eA){return U[eA]<192?(U[eA]>=97&&U[eA]<=122&&(U[eA]^=32),1):U[eA]<224?(U[eA+1]^=32,2):(U[eA+2]^=5,3)}I.kTransforms=F,I.kNumTransforms=F.length,I.transformDictionaryWord=function(U,eA,sA,q,BA){var _,pA=F[BA].prefix,lA=F[BA].suffix,cA=F[BA].transform,gA=cA<12?0:cA-11,yA=0,FA=eA;gA>q&&(gA=q);for(var MA=0;MA0;){var uA=z(U,_);_+=uA,q-=uA}for(var QA=0;QAI.UNZIP)throw new TypeError("Bad argument");this.dictionary=null,this.err=0,this.flush=0,this.init_done=!1,this.level=0,this.memLevel=0,this.mode=f,this.strategy=0,this.windowBits=0,this.write_in_progress=!1,this.pending_close=!1,this.gzip_id_bytes_read=0}e.prototype.close=function(){this.write_in_progress?this.pending_close=!0:(this.pending_close=!1,o(this.init_done,"close before init"),o(this.mode<=I.UNZIP),this.mode===I.DEFLATE||this.mode===I.GZIP||this.mode===I.DEFLATERAW?h.deflateEnd(this.strm):(this.mode===I.INFLATE||this.mode===I.GUNZIP||this.mode===I.INFLATERAW||this.mode===I.UNZIP)&&a.inflateEnd(this.strm),this.mode=I.NONE,this.dictionary=null)},e.prototype.write=function(f,g,w,Q,p,Y,y){return this._write(!0,f,g,w,Q,p,Y,y)},e.prototype.writeSync=function(f,g,w,Q,p,Y,y){return this._write(!1,f,g,w,Q,p,Y,y)},e.prototype._write=function(f,g,w,Q,p,Y,y,d){if(o.equal(arguments.length,8),o(this.init_done,"write before init"),o(this.mode!==I.NONE,"already finalized"),o.equal(!1,this.write_in_progress,"write already in progress"),o.equal(!1,this.pending_close,"close is pending"),this.write_in_progress=!0,o.equal(!1,void 0===g,"must provide flush value"),this.write_in_progress=!0,g!==I.Z_NO_FLUSH&&g!==I.Z_PARTIAL_FLUSH&&g!==I.Z_SYNC_FLUSH&&g!==I.Z_FULL_FLUSH&&g!==I.Z_FINISH&&g!==I.Z_BLOCK)throw new Error("Invalid flush value");if(null==w&&(w=c.alloc(0),p=0,Q=0),this.strm.avail_in=p,this.strm.input=w,this.strm.next_in=Q,this.strm.avail_out=d,this.strm.output=Y,this.strm.next_out=y,this.flush=g,!f)return this._process(),this._checkError()?this._afterSync():void 0;var m=this;return i.nextTick(function(){m._process(),m._after()}),this},e.prototype._afterSync=function(){var f=this.strm.avail_out,g=this.strm.avail_in;return this.write_in_progress=!1,[g,f]},e.prototype._process=function(){var f=null;switch(this.mode){case I.DEFLATE:case I.GZIP:case I.DEFLATERAW:this.err=h.deflate(this.strm,this.flush);break;case I.UNZIP:switch(this.strm.avail_in>0&&(f=this.strm.next_in),this.gzip_id_bytes_read){case 0:if(null===f)break;if(31!==this.strm.input[f]){this.mode=I.INFLATE;break}if(this.gzip_id_bytes_read=1,f++,1===this.strm.avail_in)break;case 1:if(null===f)break;139===this.strm.input[f]?(this.gzip_id_bytes_read=2,this.mode=I.GUNZIP):this.mode=I.INFLATE;break;default:throw new Error("invalid number of gzip magic number bytes read")}case I.INFLATE:case I.GUNZIP:case I.INFLATERAW:for(this.err=a.inflate(this.strm,this.flush),this.err===I.Z_NEED_DICT&&this.dictionary&&(this.err=a.inflateSetDictionary(this.strm,this.dictionary),this.err===I.Z_OK?this.err=a.inflate(this.strm,this.flush):this.err===I.Z_DATA_ERROR&&(this.err=I.Z_NEED_DICT));this.strm.avail_in>0&&this.mode===I.GUNZIP&&this.err===I.Z_STREAM_END&&0!==this.strm.next_in[0];)this.reset(),this.err=a.inflate(this.strm,this.flush);break;default:throw new Error("Unknown mode "+this.mode)}},e.prototype._checkError=function(){switch(this.err){case I.Z_OK:case I.Z_BUF_ERROR:if(0!==this.strm.avail_out&&this.flush===I.Z_FINISH)return this._error("unexpected end of file"),!1;break;case I.Z_STREAM_END:break;case I.Z_NEED_DICT:return this._error(null==this.dictionary?"Missing dictionary":"Bad dictionary"),!1;default:return this._error("Zlib error"),!1}return!0},e.prototype._after=function(){if(this._checkError()){var f=this.strm.avail_out,g=this.strm.avail_in;this.write_in_progress=!1,this.callback(g,f),this.pending_close&&this.close()}},e.prototype._error=function(f){this.strm.msg&&(f=this.strm.msg),this.onerror(f,this.err),this.write_in_progress=!1,this.pending_close&&this.close()},e.prototype.init=function(f,g,w,Q,p){o(4===arguments.length||5===arguments.length,"init(windowBits, level, memLevel, strategy, [dictionary])"),o(f>=8&&f<=15,"invalid windowBits"),o(g>=-1&&g<=9,"invalid compression level"),o(w>=1&&w<=9,"invalid memlevel"),o(Q===I.Z_FILTERED||Q===I.Z_HUFFMAN_ONLY||Q===I.Z_RLE||Q===I.Z_FIXED||Q===I.Z_DEFAULT_STRATEGY,"invalid strategy"),this._init(g,f,w,Q,p),this._setDictionary()},e.prototype.params=function(){throw new Error("deflateParams Not supported")},e.prototype.reset=function(){this._reset(),this._setDictionary()},e.prototype._init=function(f,g,w,Q,p){switch(this.level=f,this.windowBits=g,this.memLevel=w,this.strategy=Q,this.flush=I.Z_NO_FLUSH,this.err=I.Z_OK,(this.mode===I.GZIP||this.mode===I.GUNZIP)&&(this.windowBits+=16),this.mode===I.UNZIP&&(this.windowBits+=32),(this.mode===I.DEFLATERAW||this.mode===I.INFLATERAW)&&(this.windowBits=-1*this.windowBits),this.strm=new l,this.mode){case I.DEFLATE:case I.GZIP:case I.DEFLATERAW:this.err=h.deflateInit2(this.strm,this.level,I.Z_DEFLATED,this.windowBits,this.memLevel,this.strategy);break;case I.INFLATE:case I.GUNZIP:case I.INFLATERAW:case I.UNZIP:this.err=a.inflateInit2(this.strm,this.windowBits);break;default:throw new Error("Unknown mode "+this.mode)}this.err!==I.Z_OK&&this._error("Init error"),this.dictionary=p,this.write_in_progress=!1,this.init_done=!0},e.prototype._setDictionary=function(){if(null!=this.dictionary){switch(this.err=I.Z_OK,this.mode){case I.DEFLATE:case I.DEFLATERAW:this.err=h.deflateSetDictionary(this.strm,this.dictionary)}this.err!==I.Z_OK&&this._error("Failed to set dictionary")}},e.prototype._reset=function(){switch(this.err=I.Z_OK,this.mode){case I.DEFLATE:case I.DEFLATERAW:case I.GZIP:this.err=h.deflateReset(this.strm);break;case I.INFLATE:case I.INFLATERAW:case I.GUNZIP:this.err=a.inflateReset(this.strm)}this.err!==I.Z_OK&&this._error("Failed to reset stream")},I.Zlib=e},2635:function(T,I,n){"use strict";var c=n(4155),i=n(8823).Buffer,o=n(2830).Transform,l=n(4505),h=n(9539),a=n(9282).ok,B=n(8823).kMaxLength,E="Cannot create final Buffer. It would be larger than 0x"+B.toString(16)+" bytes";l.Z_MIN_WINDOWBITS=8,l.Z_MAX_WINDOWBITS=15,l.Z_DEFAULT_WINDOWBITS=15,l.Z_MIN_CHUNK=64,l.Z_MAX_CHUNK=1/0,l.Z_DEFAULT_CHUNK=16384,l.Z_MIN_MEMLEVEL=1,l.Z_MAX_MEMLEVEL=9,l.Z_DEFAULT_MEMLEVEL=8,l.Z_MIN_LEVEL=-1,l.Z_MAX_LEVEL=9,l.Z_DEFAULT_LEVEL=l.Z_DEFAULT_COMPRESSION;for(var u=Object.keys(l),C=0;C=B?MA=new RangeError(E):_=i.concat(lA,cA),lA=[],q.close(),pA(MA,_)}q.on("error",function yA(_){q.removeListener("end",FA),q.removeListener("readable",gA),pA(_)}),q.on("end",FA),q.end(BA),gA()}function Y(q,BA){if("string"==typeof BA&&(BA=i.from(BA)),!i.isBuffer(BA))throw new TypeError("Not a string or buffer");return q._processChunk(BA,q._finishFlushFlag)}function y(q){if(!(this instanceof y))return new y(q);U.call(this,q,l.DEFLATE)}function d(q){if(!(this instanceof d))return new d(q);U.call(this,q,l.INFLATE)}function m(q){if(!(this instanceof m))return new m(q);U.call(this,q,l.GZIP)}function v(q){if(!(this instanceof v))return new v(q);U.call(this,q,l.GUNZIP)}function P(q){if(!(this instanceof P))return new P(q);U.call(this,q,l.DEFLATERAW)}function S(q){if(!(this instanceof S))return new S(q);U.call(this,q,l.INFLATERAW)}function F(q){if(!(this instanceof F))return new F(q);U.call(this,q,l.UNZIP)}function z(q){return q===l.Z_NO_FLUSH||q===l.Z_PARTIAL_FLUSH||q===l.Z_SYNC_FLUSH||q===l.Z_FULL_FLUSH||q===l.Z_FINISH||q===l.Z_BLOCK}function U(q,BA){var pA=this;if(this._opts=q=q||{},this._chunkSize=q.chunkSize||I.Z_DEFAULT_CHUNK,o.call(this,q),q.flush&&!z(q.flush))throw new Error("Invalid flush flag: "+q.flush);if(q.finishFlush&&!z(q.finishFlush))throw new Error("Invalid flush flag: "+q.finishFlush);if(this._flushFlag=q.flush||l.Z_NO_FLUSH,this._finishFlushFlag=void 0!==q.finishFlush?q.finishFlush:l.Z_FINISH,q.chunkSize&&(q.chunkSizeI.Z_MAX_CHUNK))throw new Error("Invalid chunk size: "+q.chunkSize);if(q.windowBits&&(q.windowBitsI.Z_MAX_WINDOWBITS))throw new Error("Invalid windowBits: "+q.windowBits);if(q.level&&(q.levelI.Z_MAX_LEVEL))throw new Error("Invalid compression level: "+q.level);if(q.memLevel&&(q.memLevelI.Z_MAX_MEMLEVEL))throw new Error("Invalid memLevel: "+q.memLevel);if(q.strategy&&q.strategy!=I.Z_FILTERED&&q.strategy!=I.Z_HUFFMAN_ONLY&&q.strategy!=I.Z_RLE&&q.strategy!=I.Z_FIXED&&q.strategy!=I.Z_DEFAULT_STRATEGY)throw new Error("Invalid strategy: "+q.strategy);if(q.dictionary&&!i.isBuffer(q.dictionary))throw new Error("Invalid dictionary: it should be a Buffer instance");this._handle=new l.Zlib(BA);var lA=this;this._hadError=!1,this._handle.onerror=function(yA,FA){eA(lA),lA._hadError=!0;var _=new Error(yA);_.errno=FA,_.code=I.codes[FA],lA.emit("error",_)};var cA=I.Z_DEFAULT_COMPRESSION;"number"==typeof q.level&&(cA=q.level);var gA=I.Z_DEFAULT_STRATEGY;"number"==typeof q.strategy&&(gA=q.strategy),this._handle.init(q.windowBits||I.Z_DEFAULT_WINDOWBITS,cA,q.memLevel||I.Z_DEFAULT_MEMLEVEL,gA,q.dictionary),this._buffer=i.allocUnsafe(this._chunkSize),this._offset=0,this._level=cA,this._strategy=gA,this.once("end",this.close),Object.defineProperty(this,"_closed",{get:function(){return!pA._handle},configurable:!0,enumerable:!0})}function eA(q,BA){BA&&c.nextTick(BA),q._handle&&(q._handle.close(),q._handle=null)}function sA(q){q.emit("close")}Object.defineProperty(I,"codes",{enumerable:!0,value:Object.freeze(f),writable:!1}),I.Deflate=y,I.Inflate=d,I.Gzip=m,I.Gunzip=v,I.DeflateRaw=P,I.InflateRaw=S,I.Unzip=F,I.createDeflate=function(q){return new y(q)},I.createInflate=function(q){return new d(q)},I.createDeflateRaw=function(q){return new P(q)},I.createInflateRaw=function(q){return new S(q)},I.createGzip=function(q){return new m(q)},I.createGunzip=function(q){return new v(q)},I.createUnzip=function(q){return new F(q)},I.deflate=function(q,BA,pA){return"function"==typeof BA&&(pA=BA,BA={}),p(new y(BA),q,pA)},I.deflateSync=function(q,BA){return Y(new y(BA),q)},I.gzip=function(q,BA,pA){return"function"==typeof BA&&(pA=BA,BA={}),p(new m(BA),q,pA)},I.gzipSync=function(q,BA){return Y(new m(BA),q)},I.deflateRaw=function(q,BA,pA){return"function"==typeof BA&&(pA=BA,BA={}),p(new P(BA),q,pA)},I.deflateRawSync=function(q,BA){return Y(new P(BA),q)},I.unzip=function(q,BA,pA){return"function"==typeof BA&&(pA=BA,BA={}),p(new F(BA),q,pA)},I.unzipSync=function(q,BA){return Y(new F(BA),q)},I.inflate=function(q,BA,pA){return"function"==typeof BA&&(pA=BA,BA={}),p(new d(BA),q,pA)},I.inflateSync=function(q,BA){return Y(new d(BA),q)},I.gunzip=function(q,BA,pA){return"function"==typeof BA&&(pA=BA,BA={}),p(new v(BA),q,pA)},I.gunzipSync=function(q,BA){return Y(new v(BA),q)},I.inflateRaw=function(q,BA,pA){return"function"==typeof BA&&(pA=BA,BA={}),p(new S(BA),q,pA)},I.inflateRawSync=function(q,BA){return Y(new S(BA),q)},h.inherits(U,o),U.prototype.params=function(q,BA,pA){if(qI.Z_MAX_LEVEL)throw new RangeError("Invalid compression level: "+q);if(BA!=I.Z_FILTERED&&BA!=I.Z_HUFFMAN_ONLY&&BA!=I.Z_RLE&&BA!=I.Z_FIXED&&BA!=I.Z_DEFAULT_STRATEGY)throw new TypeError("Invalid strategy: "+BA);if(this._level!==q||this._strategy!==BA){var lA=this;this.flush(l.Z_SYNC_FLUSH,function(){a(lA._handle,"zlib binding closed"),lA._handle.params(q,BA),lA._hadError||(lA._level=q,lA._strategy=BA,pA&&pA())})}else c.nextTick(pA)},U.prototype.reset=function(){return a(this._handle,"zlib binding closed"),this._handle.reset()},U.prototype._flush=function(q){this._transform(i.alloc(0),"",q)},U.prototype.flush=function(q,BA){var pA=this,lA=this._writableState;("function"==typeof q||void 0===q&&!BA)&&(BA=q,q=l.Z_FULL_FLUSH),lA.ended?BA&&c.nextTick(BA):lA.ending?BA&&this.once("end",BA):lA.needDrain?BA&&this.once("drain",function(){return pA.flush(q,BA)}):(this._flushFlag=q,this.write(i.alloc(0),"",BA))},U.prototype.close=function(q){eA(this,q),c.nextTick(sA,this)},U.prototype._transform=function(q,BA,pA){var lA,cA=this._writableState,yA=(cA.ending||cA.ended)&&(!q||cA.length===q.length);return null===q||i.isBuffer(q)?this._handle?(yA?lA=this._finishFlushFlag:(lA=this._flushFlag,q.length>=cA.length&&(this._flushFlag=this._opts.flush||l.Z_NO_FLUSH)),void this._processChunk(q,lA,pA)):pA(new Error("zlib binding closed")):pA(new Error("invalid input"))},U.prototype._processChunk=function(q,BA,pA){var lA=q&&q.length,cA=this._chunkSize-this._offset,gA=0,yA=this,FA="function"==typeof pA;if(!FA){var uA,_=[],MA=0;this.on("error",function(X){uA=X}),a(this._handle,"zlib binding closed");do{var QA=this._handle.writeSync(BA,q,gA,lA,this._buffer,this._offset,cA)}while(!this._hadError&&XA(QA[0],QA[1]));if(this._hadError)throw uA;if(MA>=B)throw eA(this),new RangeError(E);var SA=i.concat(_,MA);return eA(this),SA}a(this._handle,"zlib binding closed");var bA=this._handle.write(BA,q,gA,lA,this._buffer,this._offset,cA);function XA(X,O){if(this&&(this.buffer=null,this.callback=null),!yA._hadError){var $=cA-O;if(a($>=0,"have should not go down"),$>0){var W=yA._buffer.slice(yA._offset,yA._offset+$);yA._offset+=$,FA?yA.push(W):(_.push(W),MA+=W.length)}if((0===O||yA._offset>=yA._chunkSize)&&(cA=yA._chunkSize,yA._offset=0,yA._buffer=i.allocUnsafe(yA._chunkSize)),0===O){if(gA+=lA-X,lA=X,!FA)return!0;var hA=yA._handle.write(BA,q,gA,lA,yA._buffer,yA._offset,yA._chunkSize);return hA.callback=XA,void(hA.buffer=q)}if(!FA)return!1;pA()}}bA.buffer=q,bA.callback=XA},h.inherits(y,U),h.inherits(d,U),h.inherits(m,U),h.inherits(v,U),h.inherits(P,U),h.inherits(S,U),h.inherits(F,U)},1924:function(T,I,n){"use strict";var c=n(210),i=n(5559),o=i(c("String.prototype.indexOf"));T.exports=function(h,a){var B=c(h,!!a);return"function"==typeof B&&o(h,".prototype.")>-1?i(B):B}},5559:function(T,I,n){"use strict";var c=n(8612),i=n(210),o=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),h=i("%Reflect.apply%",!0)||c.call(l,o),a=i("%Object.getOwnPropertyDescriptor%",!0),B=i("%Object.defineProperty%",!0),E=i("%Math.max%");if(B)try{B({},"a",{value:1})}catch(C){B=null}T.exports=function(e){var f=h(c,l,arguments);return a&&B&&a(f,"length").configurable&&B(f,"length",{value:1+E(0,e.length-(arguments.length-1))}),f};var u=function(){return h(c,o,arguments)};B?B(T.exports,"apply",{value:u}):T.exports.apply=u},6313:function(T,I,n){var c=n(8823).Buffer,i=function(){"use strict";function o(u,C,e,f){"object"==typeof C&&(e=C.depth,f=C.prototype,C=C.circular);var w=[],Q=[],p=void 0!==c;return void 0===C&&(C=!0),void 0===e&&(e=1/0),function Y(y,d){if(null===y)return null;if(0==d)return y;var m,v;if("object"!=typeof y)return y;if(o.__isArray(y))m=[];else if(o.__isRegExp(y))m=new RegExp(y.source,E(y)),y.lastIndex&&(m.lastIndex=y.lastIndex);else if(o.__isDate(y))m=new Date(y.getTime());else{if(p&&c.isBuffer(y))return m=c.allocUnsafe?c.allocUnsafe(y.length):new c(y.length),y.copy(m),m;void 0===f?(v=Object.getPrototypeOf(y),m=Object.create(v)):(m=Object.create(f),v=f)}if(C){var P=w.indexOf(y);if(-1!=P)return Q[P];w.push(y),Q.push(m)}for(var S in y){var F;v&&(F=Object.getOwnPropertyDescriptor(v,S)),(!F||null!=F.set)&&(m[S]=Y(y[S],d-1))}return m}(u,e)}function l(u){return Object.prototype.toString.call(u)}function E(u){var C="";return u.global&&(C+="g"),u.ignoreCase&&(C+="i"),u.multiline&&(C+="m"),C}return o.clonePrototype=function(C){if(null===C)return null;var e=function(){};return e.prototype=C,new e},o.__objToStr=l,o.__isDate=function h(u){return"object"==typeof u&&"[object Date]"===l(u)},o.__isArray=function a(u){return"object"==typeof u&&"[object Array]"===l(u)},o.__isRegExp=function B(u){return"object"==typeof u&&"[object RegExp]"===l(u)},o.__getRegExpFlags=E,o}();T.exports&&(T.exports=i)},4667:function(T,I,n){n(2479);var c=n(857);T.exports=c.Object.values},7633:function(T,I,n){n(9170),n(6992),n(1539),n(8674),n(7922),n(4668),n(7727),n(8783);var c=n(857);T.exports=c.Promise},3867:function(T,I,n){var c=n(1150);n(8628),n(7314),n(7479),n(6290),T.exports=c},9662:function(T,I,n){var c=n(7854),i=n(614),o=n(6330),l=c.TypeError;T.exports=function(h){if(i(h))return h;throw l(o(h)+" is not a function")}},9483:function(T,I,n){var c=n(7854),i=n(4411),o=n(6330),l=c.TypeError;T.exports=function(h){if(i(h))return h;throw l(o(h)+" is not a constructor")}},6077:function(T,I,n){var c=n(7854),i=n(614),o=c.String,l=c.TypeError;T.exports=function(h){if("object"==typeof h||i(h))return h;throw l("Can't set "+o(h)+" as a prototype")}},1223:function(T,I,n){var c=n(5112),i=n(30),o=n(3070),l=c("unscopables"),h=Array.prototype;null==h[l]&&o.f(h,l,{configurable:!0,value:i(null)}),T.exports=function(a){h[l][a]=!0}},1530:function(T,I,n){"use strict";var c=n(8710).charAt;T.exports=function(i,o,l){return o+(l?c(i,o).length:1)}},5787:function(T,I,n){var c=n(7854),i=n(7976),o=c.TypeError;T.exports=function(l,h){if(i(h,l))return l;throw o("Incorrect invocation")}},9670:function(T,I,n){var c=n(7854),i=n(111),o=c.String,l=c.TypeError;T.exports=function(h){if(i(h))return h;throw l(o(h)+" is not an object")}},1048:function(T,I,n){"use strict";var c=n(7908),i=n(1400),o=n(6244),l=Math.min;T.exports=[].copyWithin||function(a,B){var E=c(this),u=o(E),C=i(a,u),e=i(B,u),f=arguments.length>2?arguments[2]:void 0,g=l((void 0===f?u:i(f,u))-e,u-C),w=1;for(e0;)e in E?E[C]=E[e]:delete E[C],C+=w,e+=w;return E}},1285:function(T,I,n){"use strict";var c=n(7908),i=n(1400),o=n(6244);T.exports=function(h){for(var a=c(this),B=o(a),E=arguments.length,u=i(E>1?arguments[1]:void 0,B),C=E>2?arguments[2]:void 0,e=void 0===C?B:i(C,B);e>u;)a[u++]=h;return a}},8533:function(T,I,n){"use strict";var c=n(2092).forEach,o=n(9341)("forEach");T.exports=o?[].forEach:function(h){return c(this,h,arguments.length>1?arguments[1]:void 0)}},7745:function(T){T.exports=function(I,n){for(var c=0,i=n.length,o=new I(i);i>c;)o[c]=n[c++];return o}},8457:function(T,I,n){"use strict";var c=n(7854),i=n(9974),o=n(6916),l=n(7908),h=n(3411),a=n(7659),B=n(4411),E=n(6244),u=n(6135),C=n(8554),e=n(1246),f=c.Array;T.exports=function(w){var Q=l(w),p=B(this),Y=arguments.length,y=Y>1?arguments[1]:void 0,d=void 0!==y;d&&(y=i(y,Y>2?arguments[2]:void 0));var P,S,F,z,U,eA,m=e(Q),v=0;if(!m||this==f&&a(m))for(P=E(Q),S=p?new this(P):f(P);P>v;v++)eA=d?y(Q[v],v):Q[v],u(S,v,eA);else for(U=(z=C(Q,m)).next,S=p?new this:[];!(F=o(U,z)).done;v++)eA=d?h(z,y,[F.value,v],!0):F.value,u(S,v,eA);return S.length=v,S}},1318:function(T,I,n){var c=n(5656),i=n(1400),o=n(6244),l=function(h){return function(a,B,E){var f,u=c(a),C=o(u),e=i(E,C);if(h&&B!=B){for(;C>e;)if((f=u[e++])!=f)return!0}else for(;C>e;e++)if((h||e in u)&&u[e]===B)return h||e||0;return!h&&-1}};T.exports={includes:l(!0),indexOf:l(!1)}},2092:function(T,I,n){var c=n(9974),i=n(1702),o=n(8361),l=n(7908),h=n(6244),a=n(5417),B=i([].push),E=function(u){var C=1==u,e=2==u,f=3==u,g=4==u,w=6==u,Q=7==u,p=5==u||w;return function(Y,y,d,m){for(var sA,q,v=l(Y),P=o(v),S=c(y,d),F=h(P),z=0,U=m||a,eA=C?U(Y,F):e||Q?U(Y,0):void 0;F>z;z++)if((p||z in P)&&(q=S(sA=P[z],z,v),u))if(C)eA[z]=q;else if(q)switch(u){case 3:return!0;case 5:return sA;case 6:return z;case 2:B(eA,sA)}else switch(u){case 4:return!1;case 7:B(eA,sA)}return w?-1:f||g?g:eA}};T.exports={forEach:E(0),map:E(1),filter:E(2),some:E(3),every:E(4),find:E(5),findIndex:E(6),filterReject:E(7)}},6583:function(T,I,n){"use strict";var c=n(2104),i=n(5656),o=n(9303),l=n(6244),h=n(9341),a=Math.min,B=[].lastIndexOf,E=!!B&&1/[1].lastIndexOf(1,-0)<0,u=h("lastIndexOf");T.exports=E||!u?function(f){if(E)return c(B,this,arguments)||0;var g=i(this),w=l(g),Q=w-1;for(arguments.length>1&&(Q=a(Q,o(arguments[1]))),Q<0&&(Q=w+Q);Q>=0;Q--)if(Q in g&&g[Q]===f)return Q||0;return-1}:B},1194:function(T,I,n){var c=n(7293),i=n(5112),o=n(7392),l=i("species");T.exports=function(h){return o>=51||!c(function(){var a=[];return(a.constructor={})[l]=function(){return{foo:1}},1!==a[h](Boolean).foo})}},9341:function(T,I,n){"use strict";var c=n(7293);T.exports=function(i,o){var l=[][i];return!!l&&c(function(){l.call(null,o||function(){throw 1},1)})}},3671:function(T,I,n){var c=n(7854),i=n(9662),o=n(7908),l=n(8361),h=n(6244),a=c.TypeError,B=function(E){return function(u,C,e,f){i(C);var g=o(u),w=l(g),Q=h(g),p=E?Q-1:0,Y=E?-1:1;if(e<2)for(;;){if(p in w){f=w[p],p+=Y;break}if(p+=Y,E?p<0:Q<=p)throw a("Reduce of empty array with no initial value")}for(;E?p>=0:Q>p;p+=Y)p in w&&(f=C(f,w[p],p,g));return f}};T.exports={left:B(!1),right:B(!0)}},206:function(T,I,n){var c=n(1702);T.exports=c([].slice)},4362:function(T,I,n){var c=n(206),i=Math.floor,o=function(a,B){var E=a.length,u=i(E/2);return E<8?l(a,B):h(a,o(c(a,0,u),B),o(c(a,u),B),B)},l=function(a,B){for(var C,e,E=a.length,u=1;u0;)a[e]=a[--e];e!==u++&&(a[e]=C)}return a},h=function(a,B,E,u){for(var C=B.length,e=E.length,f=0,g=0;f1?arguments[1]:void 0);eA=eA?eA.next:z.first;)for(U(eA.value,eA.key,this);eA&&eA.removed;)eA=eA.previous},has:function(F){return!!P(this,F)}}),o(d,p?{get:function(F){var z=P(this,F);return z&&z.value},set:function(F,z){return v(this,0===F?0:F,z)}}:{add:function(F){return v(this,F=0===F?0:F,F)}}),u&&c(d,"size",{get:function(){return m(this).size}}),y},setStrong:function(w,Q,p){var Y=Q+" Iterator",y=g(Q),d=g(Y);B(w,Q,function(m,v){f(this,{type:Y,target:m,state:y(m),kind:v,last:void 0})},function(){for(var m=d(this),v=m.kind,P=m.last;P&&P.removed;)P=P.previous;return m.target&&(m.last=P=P?P.next:m.state.first)?"keys"==v?{value:P.key,done:!1}:"values"==v?{value:P.value,done:!1}:{value:[P.key,P.value],done:!1}:(m.target=void 0,{value:void 0,done:!0})},p?"entries":"values",!p,!0),E(Q)}}},7710:function(T,I,n){"use strict";var c=n(2109),i=n(7854),o=n(1702),l=n(4705),h=n(1320),a=n(2423),B=n(408),E=n(5787),u=n(614),C=n(111),e=n(7293),f=n(7072),g=n(8003),w=n(9587);T.exports=function(Q,p,Y){var y=-1!==Q.indexOf("Map"),d=-1!==Q.indexOf("Weak"),m=y?"set":"add",v=i[Q],P=v&&v.prototype,S=v,F={},z=function(lA){var cA=o(P[lA]);h(P,lA,"add"==lA?function(yA){return cA(this,0===yA?0:yA),this}:"delete"==lA?function(gA){return!(d&&!C(gA))&&cA(this,0===gA?0:gA)}:"get"==lA?function(yA){return d&&!C(yA)?void 0:cA(this,0===yA?0:yA)}:"has"==lA?function(yA){return!(d&&!C(yA))&&cA(this,0===yA?0:yA)}:function(yA,FA){return cA(this,0===yA?0:yA,FA),this})};if(l(Q,!u(v)||!(d||P.forEach&&!e(function(){(new v).entries().next()}))))S=Y.getConstructor(p,Q,y,m),a.enable();else if(l(Q,!0)){var eA=new S,sA=eA[m](d?{}:-0,1)!=eA,q=e(function(){eA.has(1)}),BA=f(function(lA){new v(lA)}),pA=!d&&e(function(){for(var lA=new v,cA=5;cA--;)lA[m](cA,cA);return!lA.has(-0)});BA||((S=p(function(lA,cA){E(lA,P);var gA=w(new v,lA,S);return null!=cA&&B(cA,gA[m],{that:gA,AS_ENTRIES:y}),gA})).prototype=P,P.constructor=S),(q||pA)&&(z("delete"),z("has"),y&&z("get")),(pA||sA)&&z(m),d&&P.clear&&delete P.clear}return F[Q]=S,c({global:!0,forced:S!=v},F),g(S,Q),d||Y.setStrong(S,Q,y),S}},9920:function(T,I,n){var c=n(2597),i=n(3887),o=n(1236),l=n(3070);T.exports=function(h,a){for(var B=i(a),E=l.f,u=o.f,C=0;C"+C+""}},4994:function(T,I,n){"use strict";var c=n(3383).IteratorPrototype,i=n(30),o=n(9114),l=n(8003),h=n(7497),a=function(){return this};T.exports=function(B,E,u){var C=E+" Iterator";return B.prototype=i(c,{next:o(1,u)}),l(B,C,!1,!0),h[C]=a,B}},8880:function(T,I,n){var c=n(9781),i=n(3070),o=n(9114);T.exports=c?function(l,h,a){return i.f(l,h,o(1,a))}:function(l,h,a){return l[h]=a,l}},9114:function(T){T.exports=function(I,n){return{enumerable:!(1&I),configurable:!(2&I),writable:!(4&I),value:n}}},6135:function(T,I,n){"use strict";var c=n(4948),i=n(3070),o=n(9114);T.exports=function(l,h,a){var B=c(h);B in l?i.f(l,B,o(0,a)):l[B]=a}},8709:function(T,I,n){"use strict";var c=n(7854),i=n(9670),o=n(2140),l=c.TypeError;T.exports=function(h){if(i(this),"string"===h||"default"===h)h="string";else if("number"!==h)throw l("Incorrect hint");return o(this,h)}},654:function(T,I,n){"use strict";var c=n(2109),i=n(6916),o=n(1913),l=n(6530),h=n(614),a=n(4994),B=n(9518),E=n(7674),u=n(8003),C=n(8880),e=n(1320),f=n(5112),g=n(7497),w=n(3383),Q=l.PROPER,p=l.CONFIGURABLE,Y=w.IteratorPrototype,y=w.BUGGY_SAFARI_ITERATORS,d=f("iterator"),m="keys",v="values",P="entries",S=function(){return this};T.exports=function(F,z,U,eA,sA,q,BA){a(U,z,eA);var MA,uA,QA,pA=function(SA){if(SA===sA&&FA)return FA;if(!y&&SA in gA)return gA[SA];switch(SA){case m:case v:case P:return function(){return new U(this,SA)}}return function(){return new U(this)}},lA=z+" Iterator",cA=!1,gA=F.prototype,yA=gA[d]||gA["@@iterator"]||sA&&gA[sA],FA=!y&&yA||pA(sA),_="Array"==z&&gA.entries||yA;if(_&&(MA=B(_.call(new F)))!==Object.prototype&&MA.next&&(!o&&B(MA)!==Y&&(E?E(MA,Y):h(MA[d])||e(MA,d,S)),u(MA,lA,!0,!0),o&&(g[lA]=S)),Q&&sA==v&&yA&&yA.name!==v&&(!o&&p?C(gA,"name",v):(cA=!0,FA=function(){return i(yA,this)})),sA)if(uA={values:pA(v),keys:q?FA:pA(m),entries:pA(P)},BA)for(QA in uA)(y||cA||!(QA in gA))&&e(gA,QA,uA[QA]);else c({target:z,proto:!0,forced:y||cA},uA);return(!o||BA)&&gA[d]!==FA&&e(gA,d,FA,{name:sA}),g[z]=FA,uA}},7235:function(T,I,n){var c=n(857),i=n(2597),o=n(6061),l=n(3070).f;T.exports=function(h){var a=c.Symbol||(c.Symbol={});i(a,h)||l(a,h,{value:o.f(h)})}},9781:function(T,I,n){var c=n(7293);T.exports=!c(function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})},317:function(T,I,n){var c=n(7854),i=n(111),o=c.document,l=i(o)&&i(o.createElement);T.exports=function(h){return l?o.createElement(h):{}}},8324:function(T){T.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},8509:function(T,I,n){var i=n(317)("span").classList,o=i&&i.constructor&&i.constructor.prototype;T.exports=o===Object.prototype?void 0:o},8886:function(T,I,n){var i=n(8113).match(/firefox\/(\d+)/i);T.exports=!!i&&+i[1]},7871:function(T){T.exports="object"==typeof window},256:function(T,I,n){var c=n(8113);T.exports=/MSIE|Trident/.test(c)},1528:function(T,I,n){var c=n(8113),i=n(7854);T.exports=/ipad|iphone|ipod/i.test(c)&&void 0!==i.Pebble},6833:function(T,I,n){var c=n(8113);T.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(c)},5268:function(T,I,n){var c=n(4326),i=n(7854);T.exports="process"==c(i.process)},1036:function(T,I,n){var c=n(8113);T.exports=/web0s(?!.*chrome)/i.test(c)},8113:function(T,I,n){var c=n(5005);T.exports=c("navigator","userAgent")||""},7392:function(T,I,n){var B,E,c=n(7854),i=n(8113),o=c.process,l=c.Deno,h=o&&o.versions||l&&l.version,a=h&&h.v8;a&&(E=(B=a.split("."))[0]>0&&B[0]<4?1:+(B[0]+B[1])),!E&&i&&(!(B=i.match(/Edge\/(\d+)/))||B[1]>=74)&&(B=i.match(/Chrome\/(\d+)/))&&(E=+B[1]),T.exports=E},8008:function(T,I,n){var i=n(8113).match(/AppleWebKit\/(\d+)\./);T.exports=!!i&&+i[1]},748:function(T){T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},2914:function(T,I,n){var c=n(7293),i=n(9114);T.exports=!c(function(){var o=Error("a");return!("stack"in o)||(Object.defineProperty(o,"stack",i(1,7)),7!==o.stack)})},2109:function(T,I,n){var c=n(7854),i=n(1236).f,o=n(8880),l=n(1320),h=n(3505),a=n(9920),B=n(4705);T.exports=function(E,u){var w,Q,p,Y,y,C=E.target,e=E.global,f=E.stat;if(w=e?c:f?c[C]||h(C,{}):(c[C]||{}).prototype)for(Q in u){if(Y=u[Q],p=E.noTargetGet?(y=i(w,Q))&&y.value:w[Q],!B(e?Q:C+(f?".":"#")+Q,E.forced)&&void 0!==p){if(typeof Y==typeof p)continue;a(Y,p)}(E.sham||p&&p.sham)&&o(Y,"sham",!0),l(w,Q,Y,E)}}},7293:function(T){T.exports=function(I){try{return!!I()}catch(n){return!0}}},7007:function(T,I,n){"use strict";n(4916);var c=n(1702),i=n(1320),o=n(2261),l=n(7293),h=n(5112),a=n(8880),B=h("species"),E=RegExp.prototype;T.exports=function(u,C,e,f){var g=h(u),w=!l(function(){var y={};return y[g]=function(){return 7},7!=""[u](y)}),Q=w&&!l(function(){var y=!1,d=/a/;return"split"===u&&((d={}).constructor={},d.constructor[B]=function(){return d},d.flags="",d[g]=/./[g]),d.exec=function(){return y=!0,null},d[g](""),!y});if(!w||!Q||e){var p=c(/./[g]),Y=C(g,""[u],function(y,d,m,v,P){var S=c(y),F=d.exec;return F===o||F===E.exec?w&&!P?{done:!0,value:p(d,m,v)}:{done:!0,value:S(m,d,v)}:{done:!1}});i(String.prototype,u,Y[0]),i(E,g,Y[1])}f&&a(E[g],"sham",!0)}},6677:function(T,I,n){var c=n(7293);T.exports=!c(function(){return Object.isExtensible(Object.preventExtensions({}))})},2104:function(T){var I=Function.prototype,n=I.apply,i=I.call;T.exports="object"==typeof Reflect&&Reflect.apply||(I.bind?i.bind(n):function(){return i.apply(n,arguments)})},9974:function(T,I,n){var c=n(1702),i=n(9662),o=c(c.bind);T.exports=function(l,h){return i(l),void 0===h?l:o?o(l,h):function(){return l.apply(h,arguments)}}},7065:function(T,I,n){"use strict";var c=n(7854),i=n(1702),o=n(9662),l=n(111),h=n(2597),a=n(206),B=c.Function,E=i([].concat),u=i([].join),C={},e=function(f,g,w){if(!h(C,g)){for(var Q=[],p=0;p]*>)/g,E=/\$([$&'`]|\d{1,2})/g;T.exports=function(u,C,e,f,g,w){var Q=e+u.length,p=f.length,Y=E;return void 0!==g&&(g=i(g),Y=B),h(w,Y,function(y,d){var m;switch(l(d,0)){case"$":return"$";case"&":return u;case"`":return a(C,0,e);case"'":return a(C,Q);case"<":m=g[a(d,1,-1)];break;default:var v=+d;if(0===v)return y;if(v>p){var P=o(v/10);return 0===P?y:P<=p?void 0===f[P-1]?l(d,1):f[P-1]+l(d,1):y}m=f[v-1]}return void 0===m?"":m})}},7854:function(T,I,n){var c=function(i){return i&&i.Math==Math&&i};T.exports=c("object"==typeof globalThis&&globalThis)||c("object"==typeof window&&window)||c("object"==typeof self&&self)||c("object"==typeof n.g&&n.g)||function(){return this}()||Function("return this")()},2597:function(T,I,n){var c=n(1702),i=n(7908),o=c({}.hasOwnProperty);T.exports=Object.hasOwn||function(h,a){return o(i(h),a)}},3501:function(T){T.exports={}},842:function(T,I,n){var c=n(7854);T.exports=function(i,o){var l=c.console;l&&l.error&&(1==arguments.length?l.error(i):l.error(i,o))}},490:function(T,I,n){var c=n(5005);T.exports=c("document","documentElement")},4664:function(T,I,n){var c=n(9781),i=n(7293),o=n(317);T.exports=!c&&!i(function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a})},1179:function(T,I,n){var i=n(7854).Array,o=Math.abs,l=Math.pow,h=Math.floor,a=Math.log,B=Math.LN2;T.exports={pack:function(C,e,f){var m,v,P,g=i(f),w=8*f-e-1,Q=(1<>1,Y=23===e?l(2,-24)-l(2,-77):0,y=C<0||0===C&&1/C<0?1:0,d=0;for((C=o(C))!=C||C===1/0?(v=C!=C?1:0,m=Q):(m=h(a(C)/B),C*(P=l(2,-m))<1&&(m--,P*=2),(C+=m+p>=1?Y/P:Y*l(2,1-p))*P>=2&&(m++,P/=2),m+p>=Q?(v=0,m=Q):m+p>=1?(v=(C*P-1)*l(2,e),m+=p):(v=C*l(2,p-1)*l(2,e),m=0));e>=8;g[d++]=255&v,v/=256,e-=8);for(m=m<0;g[d++]=255&m,m/=256,w-=8);return g[--d]|=128*y,g},unpack:function(C,e){var m,f=C.length,g=8*f-e-1,w=(1<>1,p=g-7,Y=f-1,y=C[Y--],d=127&y;for(y>>=7;p>0;d=256*d+C[Y],Y--,p-=8);for(m=d&(1<<-p)-1,d>>=-p,p+=e;p>0;m=256*m+C[Y],Y--,p-=8);if(0===d)d=1-Q;else{if(d===w)return m?NaN:y?-1/0:1/0;m+=l(2,e),d-=Q}return(y?-1:1)*m*l(2,d-e)}}},8361:function(T,I,n){var c=n(7854),i=n(1702),o=n(7293),l=n(4326),h=c.Object,a=i("".split);T.exports=o(function(){return!h("z").propertyIsEnumerable(0)})?function(B){return"String"==l(B)?a(B,""):h(B)}:h},9587:function(T,I,n){var c=n(614),i=n(111),o=n(7674);T.exports=function(l,h,a){var B,E;return o&&c(B=h.constructor)&&B!==a&&i(E=B.prototype)&&E!==a.prototype&&o(l,E),l}},2788:function(T,I,n){var c=n(1702),i=n(614),o=n(5465),l=c(Function.toString);i(o.inspectSource)||(o.inspectSource=function(h){return l(h)}),T.exports=o.inspectSource},8340:function(T,I,n){var c=n(111),i=n(8880);T.exports=function(o,l){c(l)&&"cause"in l&&i(o,"cause",l.cause)}},2423:function(T,I,n){var c=n(2109),i=n(1702),o=n(3501),l=n(111),h=n(2597),a=n(3070).f,B=n(8006),E=n(1156),u=n(9711),C=n(6677),e=!1,f=u("meta"),g=0,w=Object.isExtensible||function(){return!0},Q=function(v){a(v,f,{value:{objectID:"O"+g++,weakData:{}}})},m=T.exports={enable:function(){m.enable=function(){},e=!0;var v=B.f,P=i([].splice),S={};S[f]=1,v(S).length&&(B.f=function(F){for(var z=v(F),U=0,eA=z.length;Uz;z++)if((eA=pA(Q[z]))&&E(w,eA))return eA;return new g(!1)}S=u(Q,F)}for(sA=S.next;!(q=o(sA,S)).done;){try{eA=pA(q.value)}catch(lA){e(S,"throw",lA)}if("object"==typeof eA&&eA&&E(w,eA))return eA}return new g(!1)}},9212:function(T,I,n){var c=n(6916),i=n(9670),o=n(8173);T.exports=function(l,h,a){var B,E;i(l);try{if(!(B=o(l,"return"))){if("throw"===h)throw a;return a}B=c(B,l)}catch(u){E=!0,B=u}if("throw"===h)throw a;if(E)throw B;return i(B),a}},3383:function(T,I,n){"use strict";var C,e,f,c=n(7293),i=n(614),o=n(30),l=n(9518),h=n(1320),a=n(5112),B=n(1913),E=a("iterator"),u=!1;[].keys&&("next"in(f=[].keys())?(e=l(l(f)))!==Object.prototype&&(C=e):u=!0),null==C||c(function(){var w={};return C[E].call(w)!==w})?C={}:B&&(C=o(C)),i(C[E])||h(C,E,function(){return this}),T.exports={IteratorPrototype:C,BUGGY_SAFARI_ITERATORS:u}},7497:function(T){T.exports={}},6244:function(T,I,n){var c=n(7466);T.exports=function(i){return c(i.length)}},5948:function(T,I,n){var Q,p,Y,y,d,m,v,P,c=n(7854),i=n(9974),o=n(1236).f,l=n(261).set,h=n(6833),a=n(1528),B=n(1036),E=n(5268),u=c.MutationObserver||c.WebKitMutationObserver,C=c.document,e=c.process,f=c.Promise,g=o(c,"queueMicrotask"),w=g&&g.value;w||(Q=function(){var S,F;for(E&&(S=e.domain)&&S.exit();p;){F=p.fn,p=p.next;try{F()}catch(z){throw p?y():Y=void 0,z}}Y=void 0,S&&S.enter()},h||E||B||!u||!C?!a&&f&&f.resolve?((v=f.resolve(void 0)).constructor=f,P=i(v.then,v),y=function(){P(Q)}):E?y=function(){e.nextTick(Q)}:(l=i(l,c),y=function(){l(Q)}):(d=!0,m=C.createTextNode(""),new u(Q).observe(m,{characterData:!0}),y=function(){m.data=d=!d})),T.exports=w||function(S){var F={fn:S,next:void 0};Y&&(Y.next=F),p||(p=F,y()),Y=F}},3366:function(T,I,n){var c=n(7854);T.exports=c.Promise},133:function(T,I,n){var c=n(7392),i=n(7293);T.exports=!!Object.getOwnPropertySymbols&&!i(function(){var o=Symbol();return!String(o)||!(Object(o)instanceof Symbol)||!Symbol.sham&&c&&c<41})},8536:function(T,I,n){var c=n(7854),i=n(614),o=n(2788),l=c.WeakMap;T.exports=i(l)&&/native code/.test(o(l))},8523:function(T,I,n){"use strict";var c=n(9662),i=function(o){var l,h;this.promise=new o(function(a,B){if(void 0!==l||void 0!==h)throw TypeError("Bad Promise constructor");l=a,h=B}),this.resolve=c(l),this.reject=c(h)};T.exports.f=function(o){return new i(o)}},6277:function(T,I,n){var c=n(1340);T.exports=function(i,o){return void 0===i?arguments.length<2?"":o:c(i)}},3929:function(T,I,n){var c=n(7854),i=n(7850),o=c.TypeError;T.exports=function(l){if(i(l))throw o("The method doesn't accept regular expressions");return l}},7023:function(T,I,n){var i=n(7854).isFinite;T.exports=Number.isFinite||function(l){return"number"==typeof l&&i(l)}},1574:function(T,I,n){"use strict";var c=n(9781),i=n(1702),o=n(6916),l=n(7293),h=n(1956),a=n(5181),B=n(5296),E=n(7908),u=n(8361),C=Object.assign,e=Object.defineProperty,f=i([].concat);T.exports=!C||l(function(){if(c&&1!==C({b:1},C(e({},"a",{enumerable:!0,get:function(){e(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var g={},w={},Q=Symbol(),p="abcdefghijklmnopqrst";return g[Q]=7,p.split("").forEach(function(Y){w[Y]=Y}),7!=C({},g)[Q]||h(C({},w)).join("")!=p})?function(w,Q){for(var p=E(w),Y=arguments.length,y=1,d=a.f,m=B.f;Y>y;)for(var z,v=u(arguments[y++]),P=d?f(h(v),d(v)):h(v),S=P.length,F=0;S>F;)z=P[F++],(!c||o(m,v,z))&&(p[z]=v[z]);return p}:C},30:function(T,I,n){var Y,c=n(9670),i=n(6048),o=n(748),l=n(3501),h=n(490),a=n(317),B=n(6200),C="prototype",e="script",f=B("IE_PROTO"),g=function(){},w=function(d){return"<"+e+">"+d+""},Q=function(d){d.write(w("")),d.close();var m=d.parentWindow.Object;return d=null,m},y=function(){try{Y=new ActiveXObject("htmlfile")}catch(m){}y="undefined"!=typeof document?document.domain&&Y?Q(Y):function(){var v,d=a("iframe");return d.style.display="none",h.appendChild(d),d.src=String("javascript:"),(v=d.contentWindow.document).open(),v.write(w("document.F=Object")),v.close(),v.F}():Q(Y);for(var d=o.length;d--;)delete y[C][o[d]];return y()};l[f]=!0,T.exports=Object.create||function(m,v){var P;return null!==m?(g[C]=c(m),P=new g,g[C]=null,P[f]=m):P=y(),void 0===v?P:i(P,v)}},6048:function(T,I,n){var c=n(9781),i=n(3070),o=n(9670),l=n(5656),h=n(1956);T.exports=c?Object.defineProperties:function(B,E){o(B);for(var g,u=l(E),C=h(E),e=C.length,f=0;e>f;)i.f(B,g=C[f++],u[g]);return B}},3070:function(T,I,n){var c=n(7854),i=n(9781),o=n(4664),l=n(9670),h=n(4948),a=c.TypeError,B=Object.defineProperty;I.f=i?B:function(u,C,e){if(l(u),C=h(C),l(e),o)try{return B(u,C,e)}catch(f){}if("get"in e||"set"in e)throw a("Accessors not supported");return"value"in e&&(u[C]=e.value),u}},1236:function(T,I,n){var c=n(9781),i=n(6916),o=n(5296),l=n(9114),h=n(5656),a=n(4948),B=n(2597),E=n(4664),u=Object.getOwnPropertyDescriptor;I.f=c?u:function(e,f){if(e=h(e),f=a(f),E)try{return u(e,f)}catch(g){}if(B(e,f))return l(!i(o.f,e,f),e[f])}},1156:function(T,I,n){var c=n(4326),i=n(5656),o=n(8006).f,l=n(206),h="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];T.exports.f=function(E){return h&&"Window"==c(E)?function(B){try{return o(B)}catch(E){return l(h)}}(E):o(i(E))}},8006:function(T,I,n){var c=n(6324),o=n(748).concat("length","prototype");I.f=Object.getOwnPropertyNames||function(h){return c(h,o)}},5181:function(T,I){I.f=Object.getOwnPropertySymbols},9518:function(T,I,n){var c=n(7854),i=n(2597),o=n(614),l=n(7908),h=n(6200),a=n(8544),B=h("IE_PROTO"),E=c.Object,u=E.prototype;T.exports=a?E.getPrototypeOf:function(C){var e=l(C);if(i(e,B))return e[B];var f=e.constructor;return o(f)&&e instanceof f?f.prototype:e instanceof E?u:null}},7976:function(T,I,n){var c=n(1702);T.exports=c({}.isPrototypeOf)},6324:function(T,I,n){var c=n(1702),i=n(2597),o=n(5656),l=n(1318).indexOf,h=n(3501),a=c([].push);T.exports=function(B,E){var f,u=o(B),C=0,e=[];for(f in u)!i(h,f)&&i(u,f)&&a(e,f);for(;E.length>C;)i(u,f=E[C++])&&(~l(e,f)||a(e,f));return e}},1956:function(T,I,n){var c=n(6324),i=n(748);T.exports=Object.keys||function(l){return c(l,i)}},5296:function(T,I){"use strict";var n={}.propertyIsEnumerable,c=Object.getOwnPropertyDescriptor,i=c&&!n.call({1:2},1);I.f=i?function(l){var h=c(this,l);return!!h&&h.enumerable}:n},7674:function(T,I,n){var c=n(1702),i=n(9670),o=n(6077);T.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var a,l=!1,h={};try{(a=c(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(h,[]),l=h instanceof Array}catch(B){}return function(E,u){return i(E),o(u),l?a(E,u):E.__proto__=u,E}}():void 0)},4699:function(T,I,n){var c=n(9781),i=n(1702),o=n(1956),l=n(5656),a=i(n(5296).f),B=i([].push),E=function(u){return function(C){for(var p,e=l(C),f=o(e),g=f.length,w=0,Q=[];g>w;)p=f[w++],(!c||a(e,p))&&B(Q,u?[p,e[p]]:e[p]);return Q}};T.exports={entries:E(!0),values:E(!1)}},288:function(T,I,n){"use strict";var c=n(1694),i=n(648);T.exports=c?{}.toString:function(){return"[object "+i(this)+"]"}},2140:function(T,I,n){var c=n(7854),i=n(6916),o=n(614),l=n(111),h=c.TypeError;T.exports=function(a,B){var E,u;if("string"===B&&o(E=a.toString)&&!l(u=i(E,a))||o(E=a.valueOf)&&!l(u=i(E,a))||"string"!==B&&o(E=a.toString)&&!l(u=i(E,a)))return u;throw h("Can't convert object to primitive value")}},3887:function(T,I,n){var c=n(5005),i=n(1702),o=n(8006),l=n(5181),h=n(9670),a=i([].concat);T.exports=c("Reflect","ownKeys")||function(E){var u=o.f(h(E)),C=l.f;return C?a(u,C(E)):u}},857:function(T,I,n){var c=n(7854);T.exports=c},2534:function(T){T.exports=function(I){try{return{error:!1,value:I()}}catch(n){return{error:!0,value:n}}}},9478:function(T,I,n){var c=n(9670),i=n(111),o=n(8523);T.exports=function(l,h){if(c(l),i(h)&&h.constructor===l)return h;var a=o.f(l);return(0,a.resolve)(h),a.promise}},2248:function(T,I,n){var c=n(1320);T.exports=function(i,o,l){for(var h in o)c(i,h,o[h],l);return i}},1320:function(T,I,n){var c=n(7854),i=n(614),o=n(2597),l=n(8880),h=n(3505),a=n(2788),B=n(9909),E=n(6530).CONFIGURABLE,u=B.get,C=B.enforce,e=String(String).split("String");(T.exports=function(f,g,w,Q){var m,p=!!Q&&!!Q.unsafe,Y=!!Q&&!!Q.enumerable,y=!!Q&&!!Q.noTargetGet,d=Q&&void 0!==Q.name?Q.name:g;i(w)&&("Symbol("===String(d).slice(0,7)&&(d="["+String(d).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!o(w,"name")||E&&w.name!==d)&&l(w,"name",d),(m=C(w)).source||(m.source=e.join("string"==typeof d?d:""))),f!==c?(p?!y&&f[g]&&(Y=!0):delete f[g],Y?f[g]=w:l(f,g,w)):Y?f[g]=w:h(g,w)})(Function.prototype,"toString",function(){return i(this)&&u(this).source||a(this)})},7651:function(T,I,n){var c=n(7854),i=n(6916),o=n(9670),l=n(614),h=n(4326),a=n(2261),B=c.TypeError;T.exports=function(E,u){var C=E.exec;if(l(C)){var e=i(C,E,u);return null!==e&&o(e),e}if("RegExp"===h(E))return i(a,E,u);throw B("RegExp#exec called on incompatible receiver")}},2261:function(T,I,n){"use strict";var P,S,c=n(6916),i=n(1702),o=n(1340),l=n(7066),h=n(2999),a=n(2309),B=n(30),E=n(9909).get,u=n(9441),C=n(7168),e=a("native-string-replace",String.prototype.replace),f=RegExp.prototype.exec,g=f,w=i("".charAt),Q=i("".indexOf),p=i("".replace),Y=i("".slice),y=(S=/b*/g,c(f,P=/a/,"a"),c(f,S,"a"),0!==P.lastIndex||0!==S.lastIndex),d=h.UNSUPPORTED_Y||h.BROKEN_CARET,m=void 0!==/()??/.exec("")[1];(y||m||d||u||C)&&(g=function(S){var sA,q,BA,pA,lA,cA,gA,F=this,z=E(F),U=o(S),eA=z.raw;if(eA)return eA.lastIndex=F.lastIndex,sA=c(g,eA,U),F.lastIndex=eA.lastIndex,sA;var yA=z.groups,FA=d&&F.sticky,_=c(l,F),MA=F.source,uA=0,QA=U;if(FA&&(_=p(_,"y",""),-1===Q(_,"g")&&(_+="g"),QA=Y(U,F.lastIndex),F.lastIndex>0&&(!F.multiline||F.multiline&&"\n"!==w(U,F.lastIndex-1))&&(MA="(?: "+MA+")",QA=" "+QA,uA++),q=new RegExp("^(?:"+MA+")",_)),m&&(q=new RegExp("^"+MA+"$(?!\\s)",_)),y&&(BA=F.lastIndex),pA=c(f,FA?q:F,QA),FA?pA?(pA.input=Y(pA.input,uA),pA[0]=Y(pA[0],uA),pA.index=F.lastIndex,F.lastIndex+=pA[0].length):F.lastIndex=0:y&&pA&&(F.lastIndex=F.global?pA.index+pA[0].length:BA),m&&pA&&pA.length>1&&c(e,pA[0],q,function(){for(lA=1;lAb)","g");return"b"!==l.exec("b").groups.a||"bc"!=="b".replace(l,"$c")})},4488:function(T,I,n){var i=n(7854).TypeError;T.exports=function(o){if(null==o)throw i("Can't call method on "+o);return o}},3505:function(T,I,n){var c=n(7854),i=Object.defineProperty;T.exports=function(o,l){try{i(c,o,{value:l,configurable:!0,writable:!0})}catch(h){c[o]=l}return l}},6340:function(T,I,n){"use strict";var c=n(5005),i=n(3070),o=n(5112),l=n(9781),h=o("species");T.exports=function(a){var B=c(a);l&&B&&!B[h]&&(0,i.f)(B,h,{configurable:!0,get:function(){return this}})}},8003:function(T,I,n){var c=n(3070).f,i=n(2597),l=n(5112)("toStringTag");T.exports=function(h,a,B){h&&!i(h=B?h:h.prototype,l)&&c(h,l,{configurable:!0,value:a})}},6200:function(T,I,n){var c=n(2309),i=n(9711),o=c("keys");T.exports=function(l){return o[l]||(o[l]=i(l))}},5465:function(T,I,n){var c=n(7854),i=n(3505),o="__core-js_shared__",l=c[o]||i(o,{});T.exports=l},2309:function(T,I,n){var c=n(1913),i=n(5465);(T.exports=function(o,l){return i[o]||(i[o]=void 0!==l?l:{})})("versions",[]).push({version:"3.19.0",mode:c?"pure":"global",copyright:"\xa9 2021 Denis Pushkarev (zloirock.ru)"})},6707:function(T,I,n){var c=n(9670),i=n(9483),l=n(5112)("species");T.exports=function(h,a){var E,B=c(h).constructor;return void 0===B||null==(E=c(B)[l])?a:i(E)}},3429:function(T,I,n){var c=n(7293);T.exports=function(i){return c(function(){var o=""[i]('"');return o!==o.toLowerCase()||o.split('"').length>3})}},8710:function(T,I,n){var c=n(1702),i=n(9303),o=n(1340),l=n(4488),h=c("".charAt),a=c("".charCodeAt),B=c("".slice),E=function(u){return function(C,e){var Q,p,f=o(l(C)),g=i(e),w=f.length;return g<0||g>=w?u?"":void 0:(Q=a(f,g))<55296||Q>56319||g+1===w||(p=a(f,g+1))<56320||p>57343?u?h(f,g):Q:u?B(f,g,g+2):p-56320+(Q-55296<<10)+65536}};T.exports={codeAt:E(!1),charAt:E(!0)}},8415:function(T,I,n){"use strict";var c=n(7854),i=n(9303),o=n(1340),l=n(4488),h=c.RangeError;T.exports=function(B){var E=o(l(this)),u="",C=i(B);if(C<0||C==1/0)throw h("Wrong number of repetitions");for(;C>0;(C>>>=1)&&(E+=E))1&C&&(u+=E);return u}},6091:function(T,I,n){var c=n(6530).PROPER,i=n(7293),o=n(1361);T.exports=function(h){return i(function(){return!!o[h]()||"\u200b\x85\u180e"!=="\u200b\x85\u180e"[h]()||c&&o[h].name!==h})}},3111:function(T,I,n){var c=n(1702),i=n(4488),o=n(1340),l=n(1361),h=c("".replace),a="["+l+"]",B=RegExp("^"+a+a+"*"),E=RegExp(a+a+"*$"),u=function(C){return function(e){var f=o(i(e));return 1&C&&(f=h(f,B,"")),2&C&&(f=h(f,E,"")),f}};T.exports={start:u(1),end:u(2),trim:u(3)}},261:function(T,I,n){var P,S,F,z,c=n(7854),i=n(2104),o=n(9974),l=n(614),h=n(2597),a=n(7293),B=n(490),E=n(206),u=n(317),C=n(6833),e=n(5268),f=c.setImmediate,g=c.clearImmediate,w=c.process,Q=c.Dispatch,p=c.Function,Y=c.MessageChannel,y=c.String,d=0,m={},v="onreadystatechange";try{P=c.location}catch(BA){}var U=function(BA){if(h(m,BA)){var pA=m[BA];delete m[BA],pA()}},eA=function(BA){return function(){U(BA)}},sA=function(BA){U(BA.data)},q=function(BA){c.postMessage(y(BA),P.protocol+"//"+P.host)};(!f||!g)&&(f=function(pA){var lA=E(arguments,1);return m[++d]=function(){i(l(pA)?pA:p(pA),void 0,lA)},S(d),d},g=function(pA){delete m[pA]},e?S=function(BA){w.nextTick(eA(BA))}:Q&&Q.now?S=function(BA){Q.now(eA(BA))}:Y&&!C?(z=(F=new Y).port2,F.port1.onmessage=sA,S=o(z.postMessage,z)):c.addEventListener&&l(c.postMessage)&&!c.importScripts&&P&&"file:"!==P.protocol&&!a(q)?(S=q,c.addEventListener("message",sA,!1)):S=v in u("script")?function(BA){B.appendChild(u("script"))[v]=function(){B.removeChild(this),U(BA)}}:function(BA){setTimeout(eA(BA),0)}),T.exports={set:f,clear:g}},863:function(T,I,n){var c=n(1702);T.exports=c(1..valueOf)},1400:function(T,I,n){var c=n(9303),i=Math.max,o=Math.min;T.exports=function(l,h){var a=c(l);return a<0?i(a+h,0):o(a,h)}},7067:function(T,I,n){var c=n(7854),i=n(9303),o=n(7466),l=c.RangeError;T.exports=function(h){if(void 0===h)return 0;var a=i(h),B=o(a);if(a!==B)throw l("Wrong length or index");return B}},5656:function(T,I,n){var c=n(8361),i=n(4488);T.exports=function(o){return c(i(o))}},9303:function(T){var I=Math.ceil,n=Math.floor;T.exports=function(c){var i=+c;return i!=i||0===i?0:(i>0?n:I)(i)}},7466:function(T,I,n){var c=n(9303),i=Math.min;T.exports=function(o){return o>0?i(c(o),9007199254740991):0}},7908:function(T,I,n){var c=n(7854),i=n(4488),o=c.Object;T.exports=function(l){return o(i(l))}},4590:function(T,I,n){var c=n(7854),i=n(3002),o=c.RangeError;T.exports=function(l,h){var a=i(l);if(a%h)throw o("Wrong offset");return a}},3002:function(T,I,n){var c=n(7854),i=n(9303),o=c.RangeError;T.exports=function(l){var h=i(l);if(h<0)throw o("The argument can't be less than 0");return h}},7593:function(T,I,n){var c=n(7854),i=n(6916),o=n(111),l=n(2190),h=n(8173),a=n(2140),B=n(5112),E=c.TypeError,u=B("toPrimitive");T.exports=function(C,e){if(!o(C)||l(C))return C;var g,f=h(C,u);if(f){if(void 0===e&&(e="default"),g=i(f,C,e),!o(g)||l(g))return g;throw E("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(C,e)}},4948:function(T,I,n){var c=n(7593),i=n(2190);T.exports=function(o){var l=c(o,"string");return i(l)?l:l+""}},1694:function(T,I,n){var o={};o[n(5112)("toStringTag")]="z",T.exports="[object z]"===String(o)},1340:function(T,I,n){var c=n(7854),i=n(648),o=c.String;T.exports=function(l){if("Symbol"===i(l))throw TypeError("Cannot convert a Symbol value to a string");return o(l)}},6330:function(T,I,n){var i=n(7854).String;T.exports=function(o){try{return i(o)}catch(l){return"Object"}}},9843:function(T,I,n){"use strict";var c=n(2109),i=n(7854),o=n(6916),l=n(9781),h=n(3832),a=n(2094),B=n(2091),E=n(5787),u=n(9114),C=n(8880),e=n(5988),f=n(7466),g=n(7067),w=n(4590),Q=n(4948),p=n(2597),Y=n(648),y=n(111),d=n(2190),m=n(30),v=n(7976),P=n(7674),S=n(8006).f,F=n(7321),z=n(2092).forEach,U=n(6340),eA=n(3070),sA=n(1236),q=n(9909),BA=n(9587),pA=q.get,lA=q.set,cA=eA.f,gA=sA.f,yA=Math.round,FA=i.RangeError,_=B.ArrayBuffer,MA=_.prototype,uA=B.DataView,QA=a.NATIVE_ARRAY_BUFFER_VIEWS,SA=a.TYPED_ARRAY_CONSTRUCTOR,bA=a.TYPED_ARRAY_TAG,XA=a.TypedArray,X=a.TypedArrayPrototype,O=a.aTypedArrayConstructor,$=a.isTypedArray,W="BYTES_PER_ELEMENT",hA="Wrong length",vA=function(TA,it){O(TA);for(var mt=0,It=it.length,ft=new TA(It);It>mt;)ft[mt]=it[mt++];return ft},nA=function(TA,it){cA(TA,it,{get:function(){return pA(this)[it]}})},EA=function(TA){var it;return v(MA,TA)||"ArrayBuffer"==(it=Y(TA))||"SharedArrayBuffer"==it},GA=function(TA,it){return $(TA)&&!d(it)&&it in TA&&e(+it)&&it>=0},et=function(it,mt){return mt=Q(mt),GA(it,mt)?u(2,it[mt]):gA(it,mt)},st=function(it,mt,It){return mt=Q(mt),!(GA(it,mt)&&y(It)&&p(It,"value"))||p(It,"get")||p(It,"set")||It.configurable||p(It,"writable")&&!It.writable||p(It,"enumerable")&&!It.enumerable?cA(it,mt,It):(it[mt]=It.value,it)};l?(QA||(sA.f=et,eA.f=st,nA(X,"buffer"),nA(X,"byteOffset"),nA(X,"byteLength"),nA(X,"length")),c({target:"Object",stat:!0,forced:!QA},{getOwnPropertyDescriptor:et,defineProperty:st}),T.exports=function(TA,it,mt){var It=TA.match(/\d+$/)[0]/8,ft=TA+(mt?"Clamped":"")+"Array",JA="get"+TA,WA="set"+TA,rt=i[ft],xA=rt,Mt=xA&&xA.prototype,ht={},H=function(k,b){cA(k,b,{get:function(){return function(k,b){var CA=pA(k);return CA.view[JA](b*It+CA.byteOffset,!0)}(this,b)},set:function(CA){return function(k,b,CA){var wA=pA(k);mt&&(CA=(CA=yA(CA))<0?0:CA>255?255:255&CA),wA.view[WA](b*It+wA.byteOffset,CA,!0)}(this,b,CA)},enumerable:!0})};QA?h&&(xA=it(function(k,b,CA,wA){return E(k,Mt),BA(y(b)?EA(b)?void 0!==wA?new rt(b,w(CA,It),wA):void 0!==CA?new rt(b,w(CA,It)):new rt(b):$(b)?vA(xA,b):o(F,xA,b):new rt(g(b)),k,xA)}),P&&P(xA,XA),z(S(rt),function(k){k in xA||C(xA,k,rt[k])}),xA.prototype=Mt):(xA=it(function(k,b,CA,wA){E(k,Mt);var gt,Ft,j,RA=0,rA=0;if(y(b)){if(!EA(b))return $(b)?vA(xA,b):o(F,xA,b);gt=b,rA=w(CA,It);var qA=b.byteLength;if(void 0===wA){if(qA%It||(Ft=qA-rA)<0)throw FA(hA)}else if((Ft=f(wA)*It)+rA>qA)throw FA(hA);j=Ft/It}else j=g(b),gt=new _(Ft=j*It);for(lA(k,{buffer:gt,byteOffset:rA,byteLength:Ft,length:j,view:new uA(gt)});RA1?arguments[1]:void 0,p=void 0!==Q,Y=B(g);if(Y&&!E(Y))for(S=(P=a(g,Y)).next,g=[];!(v=i(S,P)).done;)g.push(v.value);for(p&&w>2&&(Q=c(Q,arguments[2])),d=h(g),m=new(u(f))(d),y=0;d>y;y++)m[y]=p?Q(g[y],y):g[y];return m}},6304:function(T,I,n){var c=n(2094),i=n(6707),o=c.TYPED_ARRAY_CONSTRUCTOR,l=c.aTypedArrayConstructor;T.exports=function(h){return l(i(h,h[o]))}},9711:function(T,I,n){var c=n(1702),i=0,o=Math.random(),l=c(1..toString);T.exports=function(h){return"Symbol("+(void 0===h?"":h)+")_"+l(++i+o,36)}},3307:function(T,I,n){var c=n(133);T.exports=c&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},6061:function(T,I,n){var c=n(5112);I.f=c},5112:function(T,I,n){var c=n(7854),i=n(2309),o=n(2597),l=n(9711),h=n(133),a=n(3307),B=i("wks"),E=c.Symbol,u=E&&E.for,C=a?E:E&&E.withoutSetter||l;T.exports=function(e){if(!o(B,e)||!h&&"string"!=typeof B[e]){var f="Symbol."+e;B[e]=h&&o(E,e)?E[e]:a&&u?u(f):C(f)}return B[e]}},1361:function(T){T.exports="\t\n\v\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},9170:function(T,I,n){"use strict";var c=n(2109),i=n(7854),o=n(7976),l=n(9518),h=n(7674),a=n(9920),B=n(30),E=n(8880),u=n(9114),C=n(7741),e=n(8340),f=n(408),g=n(6277),w=n(2914),Q=i.Error,p=[].push,Y=function(m,v){var P=o(y,this)?this:B(y),S=arguments.length>2?arguments[2]:void 0;h&&(P=h(new Q(void 0),l(P))),E(P,"message",g(v,"")),w&&E(P,"stack",C(P.stack,1)),e(P,S);var F=[];return f(m,p,{that:F}),E(P,"errors",F),P};h?h(Y,Q):a(Y,Q);var y=Y.prototype=B(Q.prototype,{constructor:u(1,Y),message:u(1,""),name:u(1,"AggregateError")});c({global:!0},{AggregateError:Y})},2222:function(T,I,n){"use strict";var c=n(2109),i=n(7854),o=n(7293),l=n(3157),h=n(111),a=n(7908),B=n(6244),E=n(6135),u=n(5417),C=n(1194),e=n(5112),f=n(7392),g=e("isConcatSpreadable"),w=9007199254740991,Q="Maximum allowed index exceeded",p=i.TypeError,Y=f>=51||!o(function(){var v=[];return v[g]=!1,v.concat()[0]!==v}),y=C("concat"),d=function(v){if(!h(v))return!1;var P=v[g];return void 0!==P?!!P:l(v)};c({target:"Array",proto:!0,forced:!Y||!y},{concat:function(P){var U,eA,sA,q,BA,S=a(this),F=u(S,0),z=0;for(U=-1,sA=arguments.length;Uw)throw p(Q);for(eA=0;eA=w)throw p(Q);E(F,z++,BA)}return F.length=z,F}})},545:function(T,I,n){var c=n(2109),i=n(1048),o=n(1223);c({target:"Array",proto:!0},{copyWithin:i}),o("copyWithin")},3290:function(T,I,n){var c=n(2109),i=n(1285),o=n(1223);c({target:"Array",proto:!0},{fill:i}),o("fill")},7327:function(T,I,n){"use strict";var c=n(2109),i=n(2092).filter;c({target:"Array",proto:!0,forced:!n(1194)("filter")},{filter:function(a){return i(this,a,arguments.length>1?arguments[1]:void 0)}})},1038:function(T,I,n){var c=n(2109),i=n(8457);c({target:"Array",stat:!0,forced:!n(7072)(function(h){Array.from(h)})},{from:i})},6699:function(T,I,n){"use strict";var c=n(2109),i=n(1318).includes,o=n(1223);c({target:"Array",proto:!0},{includes:function(h){return i(this,h,arguments.length>1?arguments[1]:void 0)}}),o("includes")},6992:function(T,I,n){"use strict";var c=n(5656),i=n(1223),o=n(7497),l=n(9909),h=n(654),a="Array Iterator",B=l.set,E=l.getterFor(a);T.exports=h(Array,"Array",function(u,C){B(this,{type:a,target:c(u),index:0,kind:C})},function(){var u=E(this),C=u.target,e=u.kind,f=u.index++;return!C||f>=C.length?(u.target=void 0,{value:void 0,done:!0}):"keys"==e?{value:f,done:!1}:"values"==e?{value:C[f],done:!1}:{value:[f,C[f]],done:!1}},"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},9600:function(T,I,n){"use strict";var c=n(2109),i=n(1702),o=n(8361),l=n(5656),h=n(9341),a=i([].join),B=o!=Object,E=h("join",",");c({target:"Array",proto:!0,forced:B||!E},{join:function(C){return a(l(this),void 0===C?",":C)}})},1249:function(T,I,n){"use strict";var c=n(2109),i=n(2092).map;c({target:"Array",proto:!0,forced:!n(1194)("map")},{map:function(a){return i(this,a,arguments.length>1?arguments[1]:void 0)}})},7042:function(T,I,n){"use strict";var c=n(2109),i=n(7854),o=n(3157),l=n(4411),h=n(111),a=n(1400),B=n(6244),E=n(5656),u=n(6135),C=n(5112),e=n(1194),f=n(206),g=e("slice"),w=C("species"),Q=i.Array,p=Math.max;c({target:"Array",proto:!0,forced:!g},{slice:function(y,d){var F,z,U,m=E(this),v=B(m),P=a(y,v),S=a(void 0===d?v:d,v);if(o(m)&&((l(F=m.constructor)&&(F===Q||o(F.prototype))||h(F)&&null===(F=F[w]))&&(F=void 0),F===Q||void 0===F))return f(m,P,S);for(z=new(void 0===F?Q:F)(p(S-P,0)),U=0;P3)){if(e)return!0;if(g)return g<603;var F,z,U,eA,S="";for(F=65;F<76;F++){switch(z=String.fromCharCode(F),F){case 66:case 69:case 70:case 72:U=3;break;case 68:case 71:U=4;break;default:U=2}for(eA=0;eA<47;eA++)w.push({k:z+eA,v:U})}for(w.sort(function(sA,q){return q.v-sA.v}),eA=0;eAa(z)?1:-1}}(F)),sA=U.length,q=0;qw)throw e(Q);for(z=B(d,F),U=0;Um-F+S;U--)delete d[U-1]}else if(S>F)for(U=m-F;U>v;U--)sA=U+S-1,(eA=U+F-1)in d?d[sA]=d[eA]:delete d[sA];for(U=0;U2)if(BA=p(BA),43===(pA=P(BA,0))||45===pA){if(88===(lA=P(BA,2))||120===lA)return NaN}else if(48===pA){switch(P(BA,1)){case 66:case 98:cA=2,gA=49;break;case 79:case 111:cA=8,gA=55;break;default:return+BA}for(FA=(yA=v(BA,2)).length,_=0;_gA)return NaN;return parseInt(yA,cA)}return+BA};if(l(Y,!y(" 0o1")||!y("0b1")||y("+0x1"))){for(var sA,z=function(BA){var pA=arguments.length<1?0:y(S(BA)),lA=this;return E(d,lA)&&e(function(){Q(lA)})?B(Object(pA),lA,z):pA},U=c?f(y):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),eA=0;U.length>eA;eA++)a(y,sA=U[eA])&&!a(z,sA)&&w(z,sA,g(y,sA));z.prototype=d,d.constructor=z,h(i,Y,z)}},3299:function(T,I,n){n(2109)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},5192:function(T,I,n){n(2109)({target:"Number",stat:!0},{isFinite:n(7023)})},3161:function(T,I,n){n(2109)({target:"Number",stat:!0},{isInteger:n(5988)})},6977:function(T,I,n){"use strict";var c=n(2109),i=n(7854),o=n(1702),l=n(9303),h=n(863),a=n(8415),B=n(7293),E=i.RangeError,u=i.String,C=Math.floor,e=o(a),f=o("".slice),g=o(1..toFixed),w=function(m,v,P){return 0===v?P:v%2==1?w(m,v-1,P*m):w(m*m,v/2,P)},p=function(m,v,P){for(var S=-1,F=P;++S<6;)m[S]=(F+=v*m[S])%1e7,F=C(F/1e7)},Y=function(m,v){for(var P=6,S=0;--P>=0;)m[P]=C((S+=m[P])/v),S=S%v*1e7},y=function(m){for(var v=6,P="";--v>=0;)if(""!==P||0===v||0!==m[v]){var S=u(m[v]);P=""===P?S:P+e("0",7-S.length)+S}return P};c({target:"Number",proto:!0,forced:B(function(){return"0.000"!==g(8e-5,3)||"1"!==g(.9,0)||"1.25"!==g(1.255,2)||"1000000000000000128"!==g(0xde0b6b3a7640080,0)})||!B(function(){g({})})},{toFixed:function(v){var eA,sA,q,BA,P=h(this),S=l(v),F=[0,0,0,0,0,0],z="",U="0";if(S<0||S>20)throw E("Incorrect fraction digits");if(P!=P)return"NaN";if(P<=-1e21||P>=1e21)return u(P);if(P<0&&(z="-",P=-P),P>1e-21)if(sA=(eA=function(m){for(var v=0,P=m;P>=4096;)v+=12,P/=4096;for(;P>=2;)v+=1,P/=2;return v}(P*w(2,69,1))-69)<0?P*w(2,-eA,1):P/w(2,eA,1),sA*=4503599627370496,(eA=52-eA)>0){for(p(F,0,sA),q=S;q>=7;)p(F,1e7,0),q-=7;for(p(F,w(10,q,1),0),q=eA-1;q>=23;)Y(F,8388608),q-=23;Y(F,1<0?z+((BA=U.length)<=S?"0."+e("0",S-BA)+U:f(U,0,BA-S)+"."+f(U,BA-S)):z+U}})},9601:function(T,I,n){var c=n(2109),i=n(1574);c({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},3371:function(T,I,n){var c=n(2109),i=n(6677),o=n(7293),l=n(111),h=n(2423).onFreeze,a=Object.freeze;c({target:"Object",stat:!0,forced:o(function(){a(1)}),sham:!i},{freeze:function(u){return a&&l(u)?a(h(u)):u}})},5003:function(T,I,n){var c=n(2109),i=n(7293),o=n(5656),l=n(1236).f,h=n(9781),a=i(function(){l(1)});c({target:"Object",stat:!0,forced:!h||a,sham:!h},{getOwnPropertyDescriptor:function(u,C){return l(o(u),C)}})},9337:function(T,I,n){var c=n(2109),i=n(9781),o=n(3887),l=n(5656),h=n(1236),a=n(6135);c({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(E){for(var w,Q,u=l(E),C=h.f,e=o(u),f={},g=0;e.length>g;)void 0!==(Q=C(u,w=e[g++]))&&a(f,w,Q);return f}})},489:function(T,I,n){var c=n(2109),i=n(7293),o=n(7908),l=n(9518),h=n(8544);c({target:"Object",stat:!0,forced:i(function(){l(1)}),sham:!h},{getPrototypeOf:function(E){return l(o(E))}})},7941:function(T,I,n){var c=n(2109),i=n(7908),o=n(1956);c({target:"Object",stat:!0,forced:n(7293)(function(){o(1)})},{keys:function(B){return o(i(B))}})},1539:function(T,I,n){var c=n(1694),i=n(1320),o=n(288);c||i(Object.prototype,"toString",o,{unsafe:!0})},2479:function(T,I,n){var c=n(2109),i=n(4699).values;c({target:"Object",stat:!0},{values:function(l){return i(l)}})},7922:function(T,I,n){"use strict";var c=n(2109),i=n(6916),o=n(9662),l=n(8523),h=n(2534),a=n(408);c({target:"Promise",stat:!0},{allSettled:function(E){var u=this,C=l.f(u),e=C.resolve,f=C.reject,g=h(function(){var w=o(u.resolve),Q=[],p=0,Y=1;a(E,function(y){var d=p++,m=!1;Y++,i(w,u,y).then(function(v){m||(m=!0,Q[d]={status:"fulfilled",value:v},--Y||e(Q))},function(v){m||(m=!0,Q[d]={status:"rejected",reason:v},--Y||e(Q))})}),--Y||e(Q)});return g.error&&f(g.value),C.promise}})},4668:function(T,I,n){"use strict";var c=n(2109),i=n(9662),o=n(5005),l=n(6916),h=n(8523),a=n(2534),B=n(408),E="No one promise resolved";c({target:"Promise",stat:!0},{any:function(C){var e=this,f=o("AggregateError"),g=h.f(e),w=g.resolve,Q=g.reject,p=a(function(){var Y=i(e.resolve),y=[],d=0,m=1,v=!1;B(C,function(P){var S=d++,F=!1;m++,l(Y,e,P).then(function(z){F||v||(v=!0,w(z))},function(z){F||v||(F=!0,y[S]=z,--m||Q(new f(y,E)))})}),--m||Q(new f(y,E))});return p.error&&Q(p.value),g.promise}})},7727:function(T,I,n){"use strict";var c=n(2109),i=n(1913),o=n(3366),l=n(7293),h=n(5005),a=n(614),B=n(6707),E=n(9478),u=n(1320);if(c({target:"Promise",proto:!0,real:!0,forced:!!o&&l(function(){o.prototype.finally.call({then:function(){}},function(){})})},{finally:function(f){var g=B(this,h("Promise")),w=a(f);return this.then(w?function(Q){return E(g,f()).then(function(){return Q})}:f,w?function(Q){return E(g,f()).then(function(){throw Q})}:f)}}),!i&&a(o)){var e=h("Promise").prototype.finally;o.prototype.finally!==e&&u(o.prototype,"finally",e,{unsafe:!0})}},8674:function(T,I,n){"use strict";var TA,it,mt,It,c=n(2109),i=n(1913),o=n(7854),l=n(5005),h=n(6916),a=n(3366),B=n(1320),E=n(2248),u=n(7674),C=n(8003),e=n(6340),f=n(9662),g=n(614),w=n(111),Q=n(5787),p=n(2788),Y=n(408),y=n(7072),d=n(6707),m=n(261).set,v=n(5948),P=n(9478),S=n(842),F=n(8523),z=n(2534),U=n(9909),eA=n(4705),sA=n(5112),q=n(7871),BA=n(5268),pA=n(7392),lA=sA("species"),cA="Promise",gA=U.get,yA=U.set,FA=U.getterFor(cA),_=a&&a.prototype,MA=a,uA=_,QA=o.TypeError,SA=o.document,bA=o.process,XA=F.f,X=XA,O=!!(SA&&SA.createEvent&&o.dispatchEvent),$=g(o.PromiseRejectionEvent),W="unhandledrejection",st=!1,ft=eA(cA,function(){var b=p(MA),CA=b!==String(MA);if(!CA&&66===pA||i&&!uA.finally)return!0;if(pA>=51&&/native code/.test(b))return!1;var wA=new MA(function(gt){gt(1)}),RA=function(gt){gt(function(){},function(){})};return(wA.constructor={})[lA]=RA,!(st=wA.then(function(){})instanceof RA)||!CA&&q&&!$}),JA=ft||!y(function(b){MA.all(b).catch(function(){})}),WA=function(b){var CA;return!(!w(b)||!g(CA=b.then))&&CA},rt=function(b,CA){if(!b.notified){b.notified=!0;var wA=b.reactions;v(function(){for(var RA=b.value,rA=1==b.state,gt=0;wA.length>gt;){var jA,lt,Lt,Ft=wA[gt++],j=rA?Ft.ok:Ft.fail,qA=Ft.resolve,KA=Ft.reject,DA=Ft.domain;try{j?(rA||(2===b.rejection&&Yt(b),b.rejection=1),!0===j?jA=RA:(DA&&DA.enter(),jA=j(RA),DA&&(DA.exit(),Lt=!0)),jA===Ft.promise?KA(QA("Promise-chain cycle")):(lt=WA(jA))?h(lt,jA,qA,KA):qA(jA)):KA(RA)}catch(yt){DA&&!Lt&&DA.exit(),KA(yt)}}b.reactions=[],b.notified=!1,CA&&!b.rejection&&Mt(b)})}},xA=function(b,CA,wA){var RA,rA;O?((RA=SA.createEvent("Event")).promise=CA,RA.reason=wA,RA.initEvent(b,!1,!0),o.dispatchEvent(RA)):RA={promise:CA,reason:wA},!$&&(rA=o["on"+b])?rA(RA):b===W&&S("Unhandled promise rejection",wA)},Mt=function(b){h(m,o,function(){var rA,CA=b.facade,wA=b.value;if(ht(b)&&(rA=z(function(){BA?bA.emit("unhandledRejection",wA,CA):xA(W,CA,wA)}),b.rejection=BA||ht(b)?2:1,rA.error))throw rA.value})},ht=function(b){return 1!==b.rejection&&!b.parent},Yt=function(b){h(m,o,function(){var CA=b.facade;BA?bA.emit("rejectionHandled",CA):xA("rejectionhandled",CA,b.value)})},OA=function(b,CA,wA){return function(RA){b(CA,RA,wA)}},H=function(b,CA,wA){b.done||(b.done=!0,wA&&(b=wA),b.value=CA,b.state=2,rt(b,!0))},k=function(b,CA,wA){if(!b.done){b.done=!0,wA&&(b=wA);try{if(b.facade===CA)throw QA("Promise can't be resolved itself");var RA=WA(CA);RA?v(function(){var rA={done:!1};try{h(RA,CA,OA(k,rA,b),OA(H,rA,b))}catch(gt){H(rA,gt,b)}}):(b.value=CA,b.state=1,rt(b,!1))}catch(rA){H({done:!1},rA,b)}}};if(ft&&(MA=function(CA){Q(this,uA),f(CA),h(TA,this);var wA=gA(this);try{CA(OA(k,wA),OA(H,wA))}catch(RA){H(wA,RA)}},(TA=function(CA){yA(this,{type:cA,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=E(uA=MA.prototype,{then:function(CA,wA){var RA=FA(this),rA=RA.reactions,gt=XA(d(this,MA));return gt.ok=!g(CA)||CA,gt.fail=g(wA)&&wA,gt.domain=BA?bA.domain:void 0,RA.parent=!0,rA[rA.length]=gt,0!=RA.state&&rt(RA,!1),gt.promise},catch:function(b){return this.then(void 0,b)}}),it=function(){var b=new TA,CA=gA(b);this.promise=b,this.resolve=OA(k,CA),this.reject=OA(H,CA)},F.f=XA=function(b){return b===MA||b===mt?new it(b):X(b)},!i&&g(a)&&_!==Object.prototype)){It=_.then,st||(B(_,"then",function(CA,wA){var RA=this;return new MA(function(rA,gt){h(It,RA,rA,gt)}).then(CA,wA)},{unsafe:!0}),B(_,"catch",uA.catch,{unsafe:!0}));try{delete _.constructor}catch(b){}u&&u(_,uA)}c({global:!0,wrap:!0,forced:ft},{Promise:MA}),C(MA,cA,!1,!0),e(cA),mt=l(cA),c({target:cA,stat:!0,forced:ft},{reject:function(CA){var wA=XA(this);return h(wA.reject,void 0,CA),wA.promise}}),c({target:cA,stat:!0,forced:i||ft},{resolve:function(CA){return P(i&&this===mt?MA:this,CA)}}),c({target:cA,stat:!0,forced:JA},{all:function(CA){var wA=this,RA=XA(wA),rA=RA.resolve,gt=RA.reject,Ft=z(function(){var j=f(wA.resolve),qA=[],KA=0,DA=1;Y(CA,function(jA){var lt=KA++,Lt=!1;DA++,h(j,wA,jA).then(function(yt){Lt||(Lt=!0,qA[lt]=yt,--DA||rA(qA))},gt)}),--DA||rA(qA)});return Ft.error&>(Ft.value),RA.promise},race:function(CA){var wA=this,RA=XA(wA),rA=RA.reject,gt=z(function(){var Ft=f(wA.resolve);Y(CA,function(j){h(Ft,wA,j).then(RA.resolve,rA)})});return gt.error&&rA(gt.value),RA.promise}})},2419:function(T,I,n){var c=n(2109),i=n(5005),o=n(2104),l=n(7065),h=n(9483),a=n(9670),B=n(111),E=n(30),u=n(7293),C=i("Reflect","construct"),e=Object.prototype,f=[].push,g=u(function(){function p(){}return!(C(function(){},[],p)instanceof p)}),w=!u(function(){C(function(){})}),Q=g||w;c({target:"Reflect",stat:!0,forced:Q,sham:Q},{construct:function(Y,y){h(Y),a(y);var d=arguments.length<3?Y:h(arguments[2]);if(w&&!g)return C(Y,y,d);if(Y==d){switch(y.length){case 0:return new Y;case 1:return new Y(y[0]);case 2:return new Y(y[0],y[1]);case 3:return new Y(y[0],y[1],y[2]);case 4:return new Y(y[0],y[1],y[2],y[3])}var m=[null];return o(f,m,y),new(o(l,Y,m))}var v=d.prototype,P=E(B(v)?v:e),S=o(Y,P,y);return B(S)?S:P}})},4916:function(T,I,n){"use strict";var c=n(2109),i=n(2261);c({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},2087:function(T,I,n){var c=n(9781),i=n(3070),o=n(7066),l=n(7293),h=RegExp.prototype;c&&l(function(){return"sy"!==Object.getOwnPropertyDescriptor(h,"flags").get.call({dotAll:!0,sticky:!0})})&&i.f(h,"flags",{configurable:!0,get:o})},9714:function(T,I,n){"use strict";var c=n(1702),i=n(6530).PROPER,o=n(1320),l=n(9670),h=n(7976),a=n(1340),B=n(7293),E=n(7066),u="toString",C=RegExp.prototype,e=C[u],f=c(E);(B(function(){return"/a/b"!=e.call({source:"a",flags:"b"})})||i&&e.name!=u)&&o(RegExp.prototype,u,function(){var p=l(this),Y=a(p.source),y=p.flags;return"/"+Y+"/"+a(void 0===y&&h(C,p)&&!("flags"in C)?f(p):y)},{unsafe:!0})},189:function(T,I,n){"use strict";n(7710)("Set",function(o){return function(){return o(this,arguments.length?arguments[0]:void 0)}},n(5631))},9841:function(T,I,n){"use strict";var c=n(2109),i=n(8710).codeAt;c({target:"String",proto:!0},{codePointAt:function(l){return i(this,l)}})},4953:function(T,I,n){var c=n(2109),i=n(7854),o=n(1702),l=n(1400),h=i.RangeError,a=String.fromCharCode,B=String.fromCodePoint,E=o([].join);c({target:"String",stat:!0,forced:!!B&&1!=B.length},{fromCodePoint:function(e){for(var Q,f=[],g=arguments.length,w=0;g>w;){if(Q=+arguments[w++],l(Q,1114111)!==Q)throw h(Q+" is not a valid code point");f[w]=Q<65536?a(Q):a(55296+((Q-=65536)>>10),Q%1024+56320)}return E(f,"")}})},2023:function(T,I,n){"use strict";var c=n(2109),i=n(1702),o=n(3929),l=n(4488),h=n(1340),a=n(4964),B=i("".indexOf);c({target:"String",proto:!0,forced:!a("includes")},{includes:function(u){return!!~B(h(l(this)),h(o(u)),arguments.length>1?arguments[1]:void 0)}})},8734:function(T,I,n){"use strict";var c=n(2109),i=n(4230);c({target:"String",proto:!0,forced:n(3429)("italics")},{italics:function(){return i(this,"i","","")}})},8783:function(T,I,n){"use strict";var c=n(8710).charAt,i=n(1340),o=n(9909),l=n(654),h="String Iterator",a=o.set,B=o.getterFor(h);l(String,"String",function(E){a(this,{type:h,string:i(E),index:0})},function(){var f,u=B(this),C=u.string,e=u.index;return e>=C.length?{value:void 0,done:!0}:(f=c(C,e),u.index+=f.length,{value:f,done:!1})})},9254:function(T,I,n){"use strict";var c=n(2109),i=n(4230);c({target:"String",proto:!0,forced:n(3429)("link")},{link:function(h){return i(this,"a","href",h)}})},6373:function(T,I,n){"use strict";var c=n(2109),i=n(7854),o=n(6916),l=n(1702),h=n(4994),a=n(4488),B=n(7466),E=n(1340),u=n(9670),C=n(4326),e=n(7976),f=n(7850),g=n(7066),w=n(8173),Q=n(1320),p=n(7293),Y=n(5112),y=n(6707),d=n(1530),m=n(7651),v=n(9909),P=n(1913),S=Y("matchAll"),F="RegExp String",z=F+" Iterator",U=v.set,eA=v.getterFor(z),sA=RegExp.prototype,q=i.TypeError,BA=l(g),pA=l("".indexOf),lA=l("".matchAll),cA=!!lA&&!p(function(){lA("a",/./)}),gA=h(function(_,MA,uA,QA){U(this,{type:z,regexp:_,string:MA,global:uA,unicode:QA,done:!1})},F,function(){var _=eA(this);if(_.done)return{value:void 0,done:!0};var MA=_.regexp,uA=_.string,QA=m(MA,uA);return null===QA?{value:void 0,done:_.done=!0}:_.global?(""===E(QA[0])&&(MA.lastIndex=d(uA,B(MA.lastIndex),_.unicode)),{value:QA,done:!1}):(_.done=!0,{value:QA,done:!1})}),yA=function(FA){var uA,QA,SA,bA,XA,X,_=u(this),MA=E(FA);return uA=y(_,RegExp),void 0===(QA=_.flags)&&e(sA,_)&&!("flags"in sA)&&(QA=BA(_)),SA=void 0===QA?"":E(QA),bA=new uA(uA===RegExp?_.source:_,SA),XA=!!~pA(SA,"g"),X=!!~pA(SA,"u"),bA.lastIndex=B(_.lastIndex),new gA(bA,MA,XA,X)};c({target:"String",proto:!0,forced:cA},{matchAll:function(_){var uA,QA,SA,bA,MA=a(this);if(null!=_){if(f(_)&&(uA=E(a("flags"in sA?_.flags:BA(_))),!~pA(uA,"g")))throw q("`.matchAll` does not allow non-global regexes");if(cA)return lA(MA,_);if(void 0===(SA=w(_,S))&&P&&"RegExp"==C(_)&&(SA=yA),SA)return o(SA,_,MA)}else if(cA)return lA(MA,_);return QA=E(MA),bA=new RegExp(_,"g"),P?o(yA,bA,QA):bA[S](QA)}}),P||S in sA||Q(sA,S,yA)},4723:function(T,I,n){"use strict";var c=n(6916),i=n(7007),o=n(9670),l=n(7466),h=n(1340),a=n(4488),B=n(8173),E=n(1530),u=n(7651);i("match",function(C,e,f){return[function(w){var Q=a(this),p=null==w?void 0:B(w,C);return p?c(p,w,Q):new RegExp(w)[C](h(Q))},function(g){var w=o(this),Q=h(g),p=f(e,w,Q);if(p.done)return p.value;if(!w.global)return u(w,Q);var Y=w.unicode;w.lastIndex=0;for(var m,y=[],d=0;null!==(m=u(w,Q));){var v=h(m[0]);y[d]=v,""===v&&(w.lastIndex=E(Q,l(w.lastIndex),Y)),d++}return 0===d?null:y}]})},2481:function(T,I,n){n(2109)({target:"String",proto:!0},{repeat:n(8415)})},5306:function(T,I,n){"use strict";var c=n(2104),i=n(6916),o=n(1702),l=n(7007),h=n(7293),a=n(9670),B=n(614),E=n(9303),u=n(7466),C=n(1340),e=n(4488),f=n(1530),g=n(8173),w=n(647),Q=n(7651),Y=n(5112)("replace"),y=Math.max,d=Math.min,m=o([].concat),v=o([].push),P=o("".indexOf),S=o("".slice),F=function(sA){return void 0===sA?sA:String(sA)},z="$0"==="a".replace(/./,"$0"),U=!!/./[Y]&&""===/./[Y]("a","$0");l("replace",function(sA,q,BA){var pA=U?"$":"$0";return[function(cA,gA){var yA=e(this),FA=null==cA?void 0:g(cA,Y);return FA?i(FA,cA,yA,gA):i(q,C(yA),cA,gA)},function(lA,cA){var gA=a(this),yA=C(lA);if("string"==typeof cA&&-1===P(cA,pA)&&-1===P(cA,"$<")){var FA=BA(q,gA,yA,cA);if(FA.done)return FA.value}var _=B(cA);_||(cA=C(cA));var MA=gA.global;if(MA){var uA=gA.unicode;gA.lastIndex=0}for(var QA=[];;){var SA=Q(gA,yA);if(null===SA||(v(QA,SA),!MA))break;""===C(SA[0])&&(gA.lastIndex=f(yA,u(gA.lastIndex),uA))}for(var XA="",X=0,O=0;O=X&&(XA+=S(yA,X,W)+GA,X=W+$.length)}return XA+S(yA,X)}]},!!h(function(){var sA=/./;return sA.exec=function(){var q=[];return q.groups={a:"7"},q},"7"!=="".replace(sA,"$")})||!z||U)},3123:function(T,I,n){"use strict";var c=n(2104),i=n(6916),o=n(1702),l=n(7007),h=n(7850),a=n(9670),B=n(4488),E=n(6707),u=n(1530),C=n(7466),e=n(1340),f=n(8173),g=n(206),w=n(7651),Q=n(2261),p=n(2999),Y=n(7293),y=p.UNSUPPORTED_Y,d=4294967295,m=Math.min,v=[].push,P=o(/./.exec),S=o(v),F=o("".slice),z=!Y(function(){var U=/(?:)/,eA=U.exec;U.exec=function(){return eA.apply(this,arguments)};var sA="ab".split(U);return 2!==sA.length||"a"!==sA[0]||"b"!==sA[1]});l("split",function(U,eA,sA){var q;return q="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(BA,pA){var lA=e(B(this)),cA=void 0===pA?d:pA>>>0;if(0===cA)return[];if(void 0===BA)return[lA];if(!h(BA))return i(eA,lA,BA,cA);for(var MA,uA,QA,gA=[],FA=0,_=new RegExp(BA.source,(BA.ignoreCase?"i":"")+(BA.multiline?"m":"")+(BA.unicode?"u":"")+(BA.sticky?"y":"")+"g");(MA=i(Q,_,lA))&&!((uA=_.lastIndex)>FA&&(S(gA,F(lA,FA,MA.index)),MA.length>1&&MA.index=cA));)_.lastIndex===MA.index&&_.lastIndex++;return FA===lA.length?(QA||!P(_,""))&&S(gA,""):S(gA,F(lA,FA)),gA.length>cA?g(gA,0,cA):gA}:"0".split(void 0,0).length?function(BA,pA){return void 0===BA&&0===pA?[]:i(eA,this,BA,pA)}:eA,[function(pA,lA){var cA=B(this),gA=null==pA?void 0:f(pA,U);return gA?i(gA,pA,cA,lA):i(q,e(cA),pA,lA)},function(BA,pA){var lA=a(this),cA=e(BA),gA=sA(q,lA,cA,pA,q!==eA);if(gA.done)return gA.value;var yA=E(lA,RegExp),FA=lA.unicode,MA=new yA(y?"^(?:"+lA.source+")":lA,(lA.ignoreCase?"i":"")+(lA.multiline?"m":"")+(lA.unicode?"u":"")+(y?"g":"y")),uA=void 0===pA?d:pA>>>0;if(0===uA)return[];if(0===cA.length)return null===w(MA,cA)?[cA]:[];for(var QA=0,SA=0,bA=[];SA2?arguments[2]:void 0)})},8927:function(T,I,n){"use strict";var c=n(2094),i=n(2092).every,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("every",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},3105:function(T,I,n){"use strict";var c=n(2094),i=n(6916),o=n(1285),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("fill",function(B){var E=arguments.length;return i(o,l(this),B,E>1?arguments[1]:void 0,E>2?arguments[2]:void 0)})},5035:function(T,I,n){"use strict";var c=n(2094),i=n(2092).filter,o=n(3074),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("filter",function(B){var E=i(l(this),B,arguments.length>1?arguments[1]:void 0);return o(this,E)})},7174:function(T,I,n){"use strict";var c=n(2094),i=n(2092).findIndex,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("findIndex",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},4345:function(T,I,n){"use strict";var c=n(2094),i=n(2092).find,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("find",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},4197:function(T,I,n){n(9843)("Float32",function(i){return function(l,h,a){return i(this,l,h,a)}})},6495:function(T,I,n){n(9843)("Float64",function(i){return function(l,h,a){return i(this,l,h,a)}})},2846:function(T,I,n){"use strict";var c=n(2094),i=n(2092).forEach,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("forEach",function(a){i(o(this),a,arguments.length>1?arguments[1]:void 0)})},8145:function(T,I,n){"use strict";var c=n(3832);(0,n(2094).exportTypedArrayStaticMethod)("from",n(7321),c)},4731:function(T,I,n){"use strict";var c=n(2094),i=n(1318).includes,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("includes",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},7209:function(T,I,n){"use strict";var c=n(2094),i=n(1318).indexOf,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("indexOf",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},5109:function(T,I,n){n(9843)("Int16",function(i){return function(l,h,a){return i(this,l,h,a)}})},5125:function(T,I,n){n(9843)("Int32",function(i){return function(l,h,a){return i(this,l,h,a)}})},7145:function(T,I,n){n(9843)("Int8",function(i){return function(l,h,a){return i(this,l,h,a)}})},6319:function(T,I,n){"use strict";var c=n(7854),i=n(1702),o=n(6530).PROPER,l=n(2094),h=n(6992),B=n(5112)("iterator"),E=c.Uint8Array,u=i(h.values),C=i(h.keys),e=i(h.entries),f=l.aTypedArray,g=l.exportTypedArrayMethod,w=E&&E.prototype[B],Q=!!w&&"values"===w.name,p=function(){return u(f(this))};g("entries",function(){return e(f(this))}),g("keys",function(){return C(f(this))}),g("values",p,o&&!Q),g(B,p,o&&!Q)},8867:function(T,I,n){"use strict";var c=n(2094),i=n(1702),o=c.aTypedArray,l=c.exportTypedArrayMethod,h=i([].join);l("join",function(B){return h(o(this),B)})},7789:function(T,I,n){"use strict";var c=n(2094),i=n(2104),o=n(6583),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("lastIndexOf",function(B){var E=arguments.length;return i(o,l(this),E>1?[B,arguments[1]]:[B])})},3739:function(T,I,n){"use strict";var c=n(2094),i=n(2092).map,o=n(6304),l=c.aTypedArray;(0,c.exportTypedArrayMethod)("map",function(B){return i(l(this),B,arguments.length>1?arguments[1]:void 0,function(E,u){return new(o(E))(u)})})},4483:function(T,I,n){"use strict";var c=n(2094),i=n(3671).right,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("reduceRight",function(a){var B=arguments.length;return i(o(this),a,B,B>1?arguments[1]:void 0)})},9368:function(T,I,n){"use strict";var c=n(2094),i=n(3671).left,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("reduce",function(a){var B=arguments.length;return i(o(this),a,B,B>1?arguments[1]:void 0)})},2056:function(T,I,n){"use strict";var c=n(2094),i=c.aTypedArray,l=Math.floor;(0,c.exportTypedArrayMethod)("reverse",function(){for(var C,a=this,B=i(a).length,E=l(B/2),u=0;u1?arguments[1]:void 0,1),w=this.length,Q=h(f),p=o(Q),Y=0;if(p+g>w)throw B("Wrong length");for(;Yg;)Q[g]=e[g++];return Q},o(function(){new Int8Array(1).slice()}))},7462:function(T,I,n){"use strict";var c=n(2094),i=n(2092).some,o=c.aTypedArray;(0,c.exportTypedArrayMethod)("some",function(a){return i(o(this),a,arguments.length>1?arguments[1]:void 0)})},3824:function(T,I,n){"use strict";var c=n(7854),i=n(1702),o=n(7293),l=n(9662),h=n(4362),a=n(2094),B=n(8886),E=n(256),u=n(7392),C=n(8008),e=c.Array,f=a.aTypedArray,g=a.exportTypedArrayMethod,w=c.Uint16Array,Q=w&&i(w.prototype.sort),p=!(!Q||o(function(){Q(new w(2),null)})&&o(function(){Q(new w(2),{})})),Y=!!Q&&!o(function(){if(u)return u<74;if(B)return B<67;if(E)return!0;if(C)return C<602;var v,P,d=new w(516),m=e(516);for(v=0;v<516;v++)P=v%4,d[v]=515-v,m[v]=v-2*P+3;for(Q(d,function(S,F){return(S/4|0)-(F/4|0)}),v=0;v<516;v++)if(d[v]!==m[v])return!0});g("sort",function(m){return void 0!==m&&l(m),Y?Q(this,m):h(f(this),(d=m,function(m,v){return void 0!==d?+d(m,v)||0:v!=v?-1:m!=m?1:0===m&&0===v?1/m>0&&1/v<0?1:-1:m>v}));var d},!Y||p)},5021:function(T,I,n){"use strict";var c=n(2094),i=n(7466),o=n(1400),l=n(6304),h=c.aTypedArray;(0,c.exportTypedArrayMethod)("subarray",function(E,u){var C=h(this),e=C.length,f=o(E,e);return new(l(C))(C.buffer,C.byteOffset+f*C.BYTES_PER_ELEMENT,i((void 0===u?e:o(u,e))-f))})},2974:function(T,I,n){"use strict";var c=n(7854),i=n(2104),o=n(2094),l=n(7293),h=n(206),a=c.Int8Array,B=o.aTypedArray,E=o.exportTypedArrayMethod,u=[].toLocaleString,C=!!a&&l(function(){u.call(new a(1))});E("toLocaleString",function(){return i(u,C?h(B(this)):B(this),h(arguments))},l(function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()})||!l(function(){a.prototype.toLocaleString.call([1,2])}))},5016:function(T,I,n){"use strict";var c=n(2094).exportTypedArrayMethod,i=n(7293),o=n(7854),l=n(1702),h=o.Uint8Array,a=h&&h.prototype||{},B=[].toString,E=l([].join);i(function(){B.call({})})&&(B=function(){return E(this)}),c("toString",B,a.toString!=B)},8255:function(T,I,n){n(9843)("Uint16",function(i){return function(l,h,a){return i(this,l,h,a)}})},9135:function(T,I,n){n(9843)("Uint32",function(i){return function(l,h,a){return i(this,l,h,a)}})},2472:function(T,I,n){n(9843)("Uint8",function(i){return function(l,h,a){return i(this,l,h,a)}})},9743:function(T,I,n){n(9843)("Uint8",function(i){return function(l,h,a){return i(this,l,h,a)}},!0)},8628:function(T,I,n){n(9170)},5743:function(T,I,n){n(5837)},7314:function(T,I,n){n(7922)},6290:function(T,I,n){n(4668)},7479:function(T,I,n){"use strict";var c=n(2109),i=n(8523),o=n(2534);c({target:"Promise",stat:!0},{try:function(l){var h=i.f(this),a=o(l);return(a.error?h.reject:h.resolve)(a.value),h.promise}})},3728:function(T,I,n){n(6373)},4747:function(T,I,n){var c=n(7854),i=n(8324),o=n(8509),l=n(8533),h=n(8880),a=function(E){if(E&&E.forEach!==l)try{h(E,"forEach",l)}catch(u){E.forEach=l}};for(var B in i)i[B]&&a(c[B]&&c[B].prototype);a(o)},3948:function(T,I,n){var c=n(7854),i=n(8324),o=n(8509),l=n(6992),h=n(8880),a=n(5112),B=a("iterator"),E=a("toStringTag"),u=l.values,C=function(f,g){if(f){if(f[B]!==u)try{h(f,B,u)}catch(Q){f[B]=u}if(f[E]||h(f,E,g),i[g])for(var w in l)if(f[w]!==l[w])try{h(f,w,l[w])}catch(Q){f[w]=l[w]}}};for(var e in i)C(c[e]&&c[e].prototype,e);C(o,"DOMTokenList")},3753:function(T,I,n){"use strict";var c=n(2109),i=n(6916);c({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return i(URL.prototype.toString,this)}})},1150:function(T,I,n){var c=n(7633);n(3948),T.exports=c},251:function(T,I,n){var c=n(2215),i=n(2584),o=n(609),l=n(8420),h=n(2847),a=n(8923),B=Date.prototype.getTime;function E(f,g,w){var Q=w||{};return!!(Q.strict?o(f,g):f===g)||(!f||!g||"object"!=typeof f&&"object"!=typeof g?Q.strict?o(f,g):f==g:function e(f,g,w){var Q,p;if(typeof f!=typeof g||u(f)||u(g)||f.prototype!==g.prototype||i(f)!==i(g))return!1;var Y=l(f),y=l(g);if(Y!==y)return!1;if(Y||y)return f.source===g.source&&h(f)===h(g);if(a(f)&&a(g))return B.call(f)===B.call(g);var d=C(f),m=C(g);if(d!==m)return!1;if(d||m){if(f.length!==g.length)return!1;for(Q=0;Q=0;Q--)if(v[Q]!=P[Q])return!1;for(Q=v.length-1;Q>=0;Q--)if(!E(f[p=v[Q]],g[p],w))return!1;return!0}(f,g,Q))}function u(f){return null==f}function C(f){return!(!f||"object"!=typeof f||"number"!=typeof f.length||"function"!=typeof f.copy||"function"!=typeof f.slice||f.length>0&&"number"!=typeof f[0])}T.exports=E},4289:function(T,I,n){"use strict";var c=n(2215),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,l=Array.prototype.concat,h=Object.defineProperty,E=h&&function(){var e={};try{for(var f in h(e,"x",{enumerable:!1,value:e}),e)return!1;return e.x===e}catch(g){return!1}}(),u=function(e,f,g,w){f in e&&(!function(e){return"function"==typeof e&&"[object Function]"===o.call(e)}(w)||!w())||(E?h(e,f,{configurable:!0,enumerable:!1,value:g,writable:!0}):e[f]=g)},C=function(e,f){var g=arguments.length>2?arguments[2]:{},w=c(f);i&&(w=l.call(w,Object.getOwnPropertySymbols(f)));for(var Q=0;Q0&&z.length>S&&!z.warned){z.warned=!0;var U=new Error("Possible EventEmitter memory leak detected. "+z.length+" "+String(m)+" listeners added. Use emitter.setMaxListeners() to increase limit");U.name="MaxListenersExceededWarning",U.emitter=d,U.type=m,U.count=z.length,function i(d){console&&console.warn&&console.warn(d)}(U)}return d}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function C(d,m,v){var P={fired:!1,wrapFn:void 0,target:d,type:m,listener:v},S=u.bind(P);return S.listener=v,P.wrapFn=S,S}function e(d,m,v){var P=d._events;if(void 0===P)return[];var S=P[m];return void 0===S?[]:"function"==typeof S?v?[S.listener||S]:[S]:v?function Q(d){for(var m=new Array(d.length),v=0;v0&&(z=v[0]),z instanceof Error)throw z;var U=new Error("Unhandled error."+(z?" ("+z.message+")":""));throw U.context=z,U}var eA=F[m];if(void 0===eA)return!1;if("function"==typeof eA)n(eA,this,v);else{var sA=eA.length,q=g(eA,sA);for(P=0;P=0;z--)if(P[z]===v||P[z].listener===v){U=P[z].listener,F=z;break}if(F<0)return this;0===F?P.shift():function w(d,m){for(;m+1=0;S--)this.removeListener(m,v[S]);return this},l.prototype.listeners=function(m){return e(this,m,!0)},l.prototype.rawListeners=function(m){return e(this,m,!1)},l.listenerCount=function(d,m){return"function"==typeof d.listenerCount?d.listenerCount(m):f.call(d,m)},l.prototype.listenerCount=f,l.prototype.eventNames=function(){return this._eventsCount>0?c(this._events):[]}},2536:function(T,I,n){var c=n(4275),i=n(7672);void 0===i.pdfMake&&(i.pdfMake=c),T.exports=c},7672:function(T,I,n){"use strict";T.exports=function(){if("object"==typeof globalThis)return globalThis;var c;try{c=this||new Function("return this")()}catch(i){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return c}()},9804:function(T){var I=Object.prototype.hasOwnProperty,n=Object.prototype.toString;T.exports=function(i,o,l){if("[object Function]"!==n.call(o))throw new TypeError("iterator must be a function");var h=i.length;if(h===+h)for(var a=0;a1&&"boolean"!=typeof sA)throw new l('"allowMissing" argument must be a boolean');var q=F(eA),BA=q.length>0?q[0]:"",pA=z("%"+BA+"%",sA),lA=pA.name,cA=pA.value,gA=!1,yA=pA.alias;yA&&(BA=yA[0],d(q,y([0,1],yA)));for(var FA=1,_=!0;FA=q.length){var SA=a(cA,MA);cA=(_=!!SA)&&"get"in SA&&!("originalValue"in SA.get)?SA.get:cA[MA]}else _=Y(cA,MA),cA=cA[MA];_&&!gA&&(g[lA]=cA)}}return cA}},1405:function(T,I,n){"use strict";var c="undefined"!=typeof Symbol&&Symbol,i=n(5419);T.exports=function(){return"function"==typeof c&&"function"==typeof Symbol&&"symbol"==typeof c("foo")&&"symbol"==typeof Symbol("bar")&&i()}},5419:function(T){"use strict";T.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var n={},c=Symbol("test"),i=Object(c);if("string"==typeof c||"[object Symbol]"!==Object.prototype.toString.call(c)||"[object Symbol]"!==Object.prototype.toString.call(i))return!1;for(c in n[c]=42,n)return!1;if("function"==typeof Object.keys&&0!==Object.keys(n).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(n).length)return!1;var l=Object.getOwnPropertySymbols(n);if(1!==l.length||l[0]!==c||!Object.prototype.propertyIsEnumerable.call(n,c))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var h=Object.getOwnPropertyDescriptor(n,c);if(42!==h.value||!0!==h.enumerable)return!1}return!0}},6410:function(T,I,n){"use strict";var c=n(5419);T.exports=function(){return c()&&!!Symbol.toStringTag}},7642:function(T,I,n){"use strict";var c=n(8612);T.exports=c.call(Function.call,Object.prototype.hasOwnProperty)},688:function(T,I,n){"use strict";var c=n(7103).Buffer;I._dbcs=u;for(var i=-1,l=-10,h=-1e3,a=new Array(256),E=0;E<256;E++)a[E]=i;function u(g,w){if(this.encodingName=g.encodingName,!g)throw new Error("DBCS codec is called without the data.");if(!g.table)throw new Error("Encoding '"+this.encodingName+"' has no data.");var Q=g.table();this.decodeTables=[],this.decodeTables[0]=a.slice(0),this.decodeTableSeq=[];for(var p=0;ph)throw new Error("gb18030 decode tables conflict at byte 2");for(var P=this.decodeTables[h-m[v]],S=129;S<=254;S++){if(P[S]===i)P[S]=h-y;else{if(P[S]===h-y)continue;if(P[S]>h)throw new Error("gb18030 decode tables conflict at byte 3")}for(var F=this.decodeTables[h-P[S]],z=48;z<=57;z++)F[z]===i&&(F[z]=-2)}}}this.defaultCharUnicode=w.defaultCharUnicode,this.encodeTable=[],this.encodeTableSeq=[];var U={};if(g.encodeSkipVals)for(p=0;pw)return-1;for(var Q=0,p=g.length;Q>1);g[Y]<=w?Q=Y:p=Y}return Q}u.prototype.encoder=C,u.prototype.decoder=e,u.prototype._getDecodeTrieNode=function(g){for(var w=[];g>0;g>>>=8)w.push(255&g);0==w.length&&w.push(0);for(var Q=this.decodeTables[0],p=w.length-1;p>0;p--){var Y=Q[w[p]];if(Y==i)Q[w[p]]=h-this.decodeTables.length,this.decodeTables.push(Q=a.slice(0));else{if(!(Y<=h))throw new Error("Overwrite byte in "+this.encodingName+", addr: "+g.toString(16));Q=this.decodeTables[h-Y]}}return Q},u.prototype._addDecodeChunk=function(g){var w=parseInt(g[0],16),Q=this._getDecodeTrieNode(w);w&=255;for(var p=1;p255)throw new Error("Incorrect chunk in "+this.encodingName+" at addr "+g[0]+": too long"+w)},u.prototype._getEncodeBucket=function(g){var w=g>>8;return void 0===this.encodeTable[w]&&(this.encodeTable[w]=a.slice(0)),this.encodeTable[w]},u.prototype._setEncodeChar=function(g,w){var Q=this._getEncodeBucket(g),p=255&g;Q[p]<=l?this.encodeTableSeq[l-Q[p]][-1]=w:Q[p]==i&&(Q[p]=w)},u.prototype._setEncodeSequence=function(g,w){var y,Q=g[0],p=this._getEncodeBucket(Q),Y=255&Q;p[Y]<=l?y=this.encodeTableSeq[l-p[Y]]:(y={},p[Y]!==i&&(y[-1]=p[Y]),p[Y]=l-this.encodeTableSeq.length,this.encodeTableSeq.push(y));for(var d=1;d=0)this._setEncodeChar(m,v),Y=!0;else if(m<=h){var P=h-m;y[P]||(this._fillEncodeTable(P,v<<8>>>0,Q)?Y=!0:y[P]=!0)}else m<=l&&(this._setEncodeSequence(this.decodeTableSeq[l-m],v),Y=!0)}return Y},C.prototype.write=function(g){for(var w=c.alloc(g.length*(this.gb18030?4:3)),Q=this.leadSurrogate,p=this.seqObj,Y=-1,y=0,d=0;;){if(-1===Y){if(y==g.length)break;var m=g.charCodeAt(y++)}else m=Y,Y=-1;if(55296<=m&&m<57344)if(m<56320){if(-1===Q){Q=m;continue}Q=m,m=i}else-1!==Q?(m=65536+1024*(Q-55296)+(m-56320),Q=-1):m=i;else-1!==Q&&(Y=m,m=i,Q=-1);var v=i;if(void 0!==p&&m!=i){var P=p[m];if("object"==typeof P){p=P;continue}"number"==typeof P?v=P:null==P&&void 0!==(P=p[-1])&&(v=P,Y=m),p=void 0}else if(m>=0){var S=this.encodeTable[m>>8];if(void 0!==S&&(v=S[255&m]),v<=l){p=this.encodeTableSeq[l-v];continue}if(v==i&&this.gb18030){var F=f(this.gb18030.uChars,m);if(-1!=F){v=this.gb18030.gbChars[F]+(m-this.gb18030.uChars[F]),w[d++]=129+Math.floor(v/12600),v%=12600,w[d++]=48+Math.floor(v/1260),v%=1260,w[d++]=129+Math.floor(v/10),w[d++]=48+(v%=10);continue}}}v===i&&(v=this.defaultCharSingleByte),v<256?w[d++]=v:v<65536?(w[d++]=v>>8,w[d++]=255&v):v<16777216?(w[d++]=v>>16,w[d++]=v>>8&255,w[d++]=255&v):(w[d++]=v>>>24,w[d++]=v>>>16&255,w[d++]=v>>>8&255,w[d++]=255&v)}return this.seqObj=p,this.leadSurrogate=Q,w.slice(0,d)},C.prototype.end=function(){if(-1!==this.leadSurrogate||void 0!==this.seqObj){var g=c.alloc(10),w=0;if(this.seqObj){var Q=this.seqObj[-1];void 0!==Q&&(Q<256?g[w++]=Q:(g[w++]=Q>>8,g[w++]=255&Q)),this.seqObj=void 0}return-1!==this.leadSurrogate&&(g[w++]=this.defaultCharSingleByte,this.leadSurrogate=-1),g.slice(0,w)}},C.prototype.findIdx=f,e.prototype.write=function(g){for(var w=c.alloc(2*g.length),Q=this.nodeIdx,p=this.prevBytes,Y=this.prevBytes.length,y=-this.prevBytes.length,m=0,v=0;m=0?g[m]:p[m+Y];if(!((d=this.decodeTables[Q][P])>=0))if(d===i)d=this.defaultCharUnicode.charCodeAt(0),m=y;else if(-2===d){if(m>=3)var S=12600*(g[m-3]-129)+1260*(g[m-2]-48)+10*(g[m-1]-129)+(P-48);else S=12600*(p[m-3+Y]-129)+1260*((m-2>=0?g[m-2]:p[m-2+Y])-48)+10*((m-1>=0?g[m-1]:p[m-1+Y])-129)+(P-48);var F=f(this.gb18030.gbChars,S);d=this.gb18030.uChars[F]+S-this.gb18030.gbChars[F]}else{if(d<=h){Q=h-d;continue}if(!(d<=l))throw new Error("iconv-lite internal error: invalid decoding table value "+d+" at "+Q+"/"+P);for(var z=this.decodeTableSeq[l-d],U=0;U>8;d=z[z.length-1]}if(d>=65536){var eA=55296|(d-=65536)>>10;w[v++]=255&eA,w[v++]=eA>>8,d=56320|1023&d}w[v++]=255&d,w[v++]=d>>8,Q=0,y=m+1}return this.nodeIdx=Q,this.prevBytes=y>=0?Array.prototype.slice.call(g,y):p.slice(y+Y).concat(Array.prototype.slice.call(g)),w.slice(0,v).toString("ucs2")},e.prototype.end=function(){for(var g="";this.prevBytes.length>0;){g+=this.defaultCharUnicode;var w=this.prevBytes.slice(1);this.prevBytes=[],this.nodeIdx=0,w.length>0&&(g+=this.write(w))}return this.prevBytes=[],this.nodeIdx=0,g}},5990:function(T,I,n){"use strict";T.exports={shiftjis:{type:"_dbcs",table:function(){return n(7014)},encodeAdd:{"\xa5":92,"\u203e":126},encodeSkipVals:[{from:60736,to:63808}]},csshiftjis:"shiftjis",mskanji:"shiftjis",sjis:"shiftjis",windows31j:"shiftjis",ms31j:"shiftjis",xsjis:"shiftjis",windows932:"shiftjis",ms932:"shiftjis",932:"shiftjis",cp932:"shiftjis",eucjp:{type:"_dbcs",table:function(){return n(5633)},encodeAdd:{"\xa5":92,"\u203e":126}},gb2312:"cp936",gb231280:"cp936",gb23121980:"cp936",csgb2312:"cp936",csiso58gb231280:"cp936",euccn:"cp936",windows936:"cp936",ms936:"cp936",936:"cp936",cp936:{type:"_dbcs",table:function(){return n(3336)}},gbk:{type:"_dbcs",table:function(){return n(3336).concat(n(4346))}},xgbk:"gbk",isoir58:"gbk",gb18030:{type:"_dbcs",table:function(){return n(3336).concat(n(4346))},gb18030:function(){return n(6258)},encodeSkipVals:[128],encodeAdd:{"\u20ac":41699}},chinese:"gb18030",windows949:"cp949",ms949:"cp949",949:"cp949",cp949:{type:"_dbcs",table:function(){return n(7348)}},cseuckr:"cp949",csksc56011987:"cp949",euckr:"cp949",isoir149:"cp949",korean:"cp949",ksc56011987:"cp949",ksc56011989:"cp949",ksc5601:"cp949",windows950:"cp950",ms950:"cp950",950:"cp950",cp950:{type:"_dbcs",table:function(){return n(4284)}},big5:"big5hkscs",big5hkscs:{type:"_dbcs",table:function(){return n(4284).concat(n(3480))},encodeSkipVals:[36457,36463,36478,36523,36532,36557,36560,36695,36713,36718,36811,36862,36973,36986,37060,37084,37105,37311,37551,37552,37553,37554,37585,37959,38090,38361,38652,39285,39798,39800,39803,39878,39902,39916,39926,40002,40019,40034,40040,40043,40055,40124,40125,40144,40279,40282,40388,40431,40443,40617,40687,40701,40800,40907,41079,41180,41183,36812,37576,38468,38637,41636,41637,41639,41638,41676,41678]},cnbig5:"big5hkscs",csbig5:"big5hkscs",xxbig5:"big5hkscs"}},6934:function(T,I,n){"use strict";for(var c=[n(1025),n(7688),n(1279),n(758),n(9068),n(3769),n(7018),n(688),n(5990)],i=0;i>>6),C[e++]=128+(63&g)):(C[e++]=224+(g>>>12),C[e++]=128+(g>>>6&63),C[e++]=128+(63&g))}return C.slice(0,e)},B.prototype.end=function(){},E.prototype.write=function(u){for(var C=this.acc,e=this.contBytes,f=this.accBytes,g="",w=0;w0&&(g+=this.defaultCharUnicode,e=0),Q<128?g+=String.fromCharCode(Q):Q<224?(C=31&Q,e=1,f=1):Q<240?(C=15&Q,e=2,f=1):g+=this.defaultCharUnicode):e>0?(C=C<<6|63&Q,f++,0==--e&&(g+=2===f&&C<128&&C>0||3===f&&C<2048?this.defaultCharUnicode:String.fromCharCode(C))):g+=this.defaultCharUnicode}return this.acc=C,this.contBytes=e,this.accBytes=f,g},E.prototype.end=function(){var u=0;return this.contBytes>0&&(u+=this.defaultCharUnicode),u}},9068:function(T,I,n){"use strict";var c=n(7103).Buffer;function i(h,a){if(!h)throw new Error("SBCS codec is called without the data.");if(!h.chars||128!==h.chars.length&&256!==h.chars.length)throw new Error("Encoding '"+h.type+"' has incorrect 'chars' (must be of len 128 or 256)");if(128===h.chars.length){for(var B="",E=0;E<128;E++)B+=String.fromCharCode(E);h.chars=B+h.chars}this.decodeBuf=c.from(h.chars,"ucs2");var u=c.alloc(65536,a.defaultCharSingleByte.charCodeAt(0));for(E=0;E?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\xb0\xb7\u2219\u221a\u2592\u2500\u2502\u253c\u2524\u252c\u251c\u2534\u2510\u250c\u2514\u2518\u03b2\u221e\u03c6\xb1\xbd\xbc\u2248\xab\xbb\ufef7\ufef8\ufffd\ufffd\ufefb\ufefc\ufffd\xa0\xad\ufe82\xa3\xa4\ufe84\ufffd\ufffd\ufe8e\ufe8f\ufe95\ufe99\u060c\ufe9d\ufea1\ufea5\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\ufed1\u061b\ufeb1\ufeb5\ufeb9\u061f\xa2\ufe80\ufe81\ufe83\ufe85\ufeca\ufe8b\ufe8d\ufe91\ufe93\ufe97\ufe9b\ufe9f\ufea3\ufea7\ufea9\ufeab\ufead\ufeaf\ufeb3\ufeb7\ufebb\ufebf\ufec1\ufec5\ufecb\ufecf\xa6\xac\xf7\xd7\ufec9\u0640\ufed3\ufed7\ufedb\ufedf\ufee3\ufee7\ufeeb\ufeed\ufeef\ufef3\ufebd\ufecc\ufece\ufecd\ufee1\ufe7d\u0651\ufee5\ufee9\ufeec\ufef0\ufef2\ufed0\ufed5\ufef5\ufef6\ufedd\ufed9\ufef1\u25a0\ufffd"},ibm864:"cp864",csibm864:"cp864",cp865:{type:"_sbcs",chars:"\xc7\xfc\xe9\xe2\xe4\xe0\xe5\xe7\xea\xeb\xe8\xef\xee\xec\xc4\xc5\xc9\xe6\xc6\xf4\xf6\xf2\xfb\xf9\xff\xd6\xdc\xf8\xa3\xd8\u20a7\u0192\xe1\xed\xf3\xfa\xf1\xd1\xaa\xba\xbf\u2310\xac\xbd\xbc\xa1\xab\xa4\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0"},ibm865:"cp865",csibm865:"cp865",cp866:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0401\u0451\u0404\u0454\u0407\u0457\u040e\u045e\xb0\u2219\xb7\u221a\u2116\xa4\u25a0\xa0"},ibm866:"cp866",csibm866:"cp866",cp869:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0386\ufffd\xb7\xac\xa6\u2018\u2019\u0388\u2015\u0389\u038a\u03aa\u038c\ufffd\ufffd\u038e\u03ab\xa9\u038f\xb2\xb3\u03ac\xa3\u03ad\u03ae\u03af\u03ca\u0390\u03cc\u03cd\u0391\u0392\u0393\u0394\u0395\u0396\u0397\xbd\u0398\u0399\xab\xbb\u2591\u2592\u2593\u2502\u2524\u039a\u039b\u039c\u039d\u2563\u2551\u2557\u255d\u039e\u039f\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u03a0\u03a1\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u03a3\u03a4\u03a5\u03a6\u03a7\u03a8\u03a9\u03b1\u03b2\u03b3\u2518\u250c\u2588\u2584\u03b4\u03b5\u2580\u03b6\u03b7\u03b8\u03b9\u03ba\u03bb\u03bc\u03bd\u03be\u03bf\u03c0\u03c1\u03c3\u03c2\u03c4\u0384\xad\xb1\u03c5\u03c6\u03c7\xa7\u03c8\u0385\xb0\xa8\u03c9\u03cb\u03b0\u03ce\u25a0\xa0"},ibm869:"cp869",csibm869:"cp869",cp922:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\u203e\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\u0160\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\u017d\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\u0161\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\u017e\xff"},ibm922:"cp922",csibm922:"cp922",cp1046:{type:"_sbcs",chars:"\ufe88\xd7\xf7\uf8f6\uf8f5\uf8f4\uf8f7\ufe71\x88\u25a0\u2502\u2500\u2510\u250c\u2514\u2518\ufe79\ufe7b\ufe7d\ufe7f\ufe77\ufe8a\ufef0\ufef3\ufef2\ufece\ufecf\ufed0\ufef6\ufef8\ufefa\ufefc\xa0\uf8fa\uf8f9\uf8f8\xa4\uf8fb\ufe8b\ufe91\ufe97\ufe9b\ufe9f\ufea3\u060c\xad\ufea7\ufeb3\u0660\u0661\u0662\u0663\u0664\u0665\u0666\u0667\u0668\u0669\ufeb7\u061b\ufebb\ufebf\ufeca\u061f\ufecb\u0621\u0622\u0623\u0624\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\u0636\u0637\ufec7\u0639\u063a\ufecc\ufe82\ufe84\ufe8e\ufed3\u0640\u0641\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064a\u064b\u064c\u064d\u064e\u064f\u0650\u0651\u0652\ufed7\ufedb\ufedf\uf8fc\ufef5\ufef7\ufef9\ufefb\ufee3\ufee7\ufeec\ufee9\ufffd"},ibm1046:"cp1046",csibm1046:"cp1046",cp1124:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0401\u0402\u0490\u0404\u0405\u0406\u0407\u0408\u0409\u040a\u040b\u040c\xad\u040e\u040f\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u2116\u0451\u0452\u0491\u0454\u0455\u0456\u0457\u0458\u0459\u045a\u045b\u045c\xa7\u045e\u045f"},ibm1124:"cp1124",csibm1124:"cp1124",cp1125:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0401\u0451\u0490\u0491\u0404\u0454\u0406\u0456\u0407\u0457\xb7\u221a\u2116\xa4\u25a0\xa0"},ibm1125:"cp1125",csibm1125:"cp1125",cp1129:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\u0153\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\u0178\xb5\xb6\xb7\u0152\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\u0102\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\u0300\xcd\xce\xcf\u0110\xd1\u0309\xd3\xd4\u01a0\xd6\xd7\xd8\xd9\xda\xdb\xdc\u01af\u0303\xdf\xe0\xe1\xe2\u0103\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\u0301\xed\xee\xef\u0111\xf1\u0323\xf3\xf4\u01a1\xf6\xf7\xf8\xf9\xfa\xfb\xfc\u01b0\u20ab\xff"},ibm1129:"cp1129",csibm1129:"cp1129",cp1133:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0e81\u0e82\u0e84\u0e87\u0e88\u0eaa\u0e8a\u0e8d\u0e94\u0e95\u0e96\u0e97\u0e99\u0e9a\u0e9b\u0e9c\u0e9d\u0e9e\u0e9f\u0ea1\u0ea2\u0ea3\u0ea5\u0ea7\u0eab\u0ead\u0eae\ufffd\ufffd\ufffd\u0eaf\u0eb0\u0eb2\u0eb3\u0eb4\u0eb5\u0eb6\u0eb7\u0eb8\u0eb9\u0ebc\u0eb1\u0ebb\u0ebd\ufffd\ufffd\ufffd\u0ec0\u0ec1\u0ec2\u0ec3\u0ec4\u0ec8\u0ec9\u0eca\u0ecb\u0ecc\u0ecd\u0ec6\ufffd\u0edc\u0edd\u20ad\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0ed0\u0ed1\u0ed2\u0ed3\u0ed4\u0ed5\u0ed6\u0ed7\u0ed8\u0ed9\ufffd\ufffd\xa2\xac\xa6\ufffd"},ibm1133:"cp1133",csibm1133:"cp1133",cp1161:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0e48\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\u0e49\u0e4a\u0e4b\u20ac\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\xa2\xac\xa6\xa0"},ibm1161:"cp1161",csibm1161:"cp1161",cp1162:{type:"_sbcs",chars:"\u20ac\x81\x82\x83\x84\u2026\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\u2018\u2019\u201c\u201d\u2022\u2013\u2014\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufffd\ufffd\ufffd\ufffd\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\ufffd\ufffd\ufffd\ufffd"},ibm1162:"cp1162",csibm1162:"cp1162",cp1163:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\u20ac\xa5\xa6\xa7\u0153\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\u0178\xb5\xb6\xb7\u0152\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\u0102\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\u0300\xcd\xce\xcf\u0110\xd1\u0309\xd3\xd4\u01a0\xd6\xd7\xd8\xd9\xda\xdb\xdc\u01af\u0303\xdf\xe0\xe1\xe2\u0103\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\u0301\xed\xee\xef\u0111\xf1\u0323\xf3\xf4\u01a1\xf6\xf7\xf8\xf9\xfa\xfb\xfc\u01b0\u20ab\xff"},ibm1163:"cp1163",csibm1163:"cp1163",maccroatian:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\u0160\u2122\xb4\xa8\u2260\u017d\xd8\u221e\xb1\u2264\u2265\u2206\xb5\u2202\u2211\u220f\u0161\u222b\xaa\xba\u2126\u017e\xf8\xbf\xa1\xac\u221a\u0192\u2248\u0106\xab\u010c\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u0110\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\ufffd\xa9\u2044\xa4\u2039\u203a\xc6\xbb\u2013\xb7\u201a\u201e\u2030\xc2\u0107\xc1\u010d\xc8\xcd\xce\xcf\xcc\xd3\xd4\u0111\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u03c0\xcb\u02da\xb8\xca\xe6\u02c7"},maccyrillic:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\xa2\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u2202\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\xa4"},macgreek:{type:"_sbcs",chars:"\xc4\xb9\xb2\xc9\xb3\xd6\xdc\u0385\xe0\xe2\xe4\u0384\xa8\xe7\xe9\xe8\xea\xeb\xa3\u2122\xee\xef\u2022\xbd\u2030\xf4\xf6\xa6\xad\xf9\xfb\xfc\u2020\u0393\u0394\u0398\u039b\u039e\u03a0\xdf\xae\xa9\u03a3\u03aa\xa7\u2260\xb0\u0387\u0391\xb1\u2264\u2265\xa5\u0392\u0395\u0396\u0397\u0399\u039a\u039c\u03a6\u03ab\u03a8\u03a9\u03ac\u039d\xac\u039f\u03a1\u2248\u03a4\xab\xbb\u2026\xa0\u03a5\u03a7\u0386\u0388\u0153\u2013\u2015\u201c\u201d\u2018\u2019\xf7\u0389\u038a\u038c\u038e\u03ad\u03ae\u03af\u03cc\u038f\u03cd\u03b1\u03b2\u03c8\u03b4\u03b5\u03c6\u03b3\u03b7\u03b9\u03be\u03ba\u03bb\u03bc\u03bd\u03bf\u03c0\u03ce\u03c1\u03c3\u03c4\u03b8\u03c9\u03c2\u03c7\u03c5\u03b6\u03ca\u03cb\u0390\u03b0\ufffd"},maciceland:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\xdd\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\xd0\xf0\xde\xfe\xfd\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macroman:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macromania:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\u0102\u015e\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\u0103\u015f\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\u2039\u203a\u0162\u0163\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macthai:{type:"_sbcs",chars:"\xab\xbb\u2026\uf88c\uf88f\uf892\uf895\uf898\uf88b\uf88e\uf891\uf894\uf897\u201c\u201d\uf899\ufffd\u2022\uf884\uf889\uf885\uf886\uf887\uf888\uf88a\uf88d\uf890\uf893\uf896\u2018\u2019\ufffd\xa0\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufeff\u200b\u2013\u2014\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u2122\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\xae\xa9\ufffd\ufffd\ufffd\ufffd"},macturkish:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u011e\u011f\u0130\u0131\u015e\u015f\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\ufffd\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},macukraine:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u2020\xb0\u0490\xa3\xa7\u2022\xb6\u0406\xae\xa9\u2122\u0402\u0452\u2260\u0403\u0453\u221e\xb1\u2264\u2265\u0456\xb5\u0491\u0408\u0404\u0454\u0407\u0457\u0409\u0459\u040a\u045a\u0458\u0405\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\u040b\u045b\u040c\u045c\u0455\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u201e\u040e\u045e\u040f\u045f\u2116\u0401\u0451\u044f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\xa4"},koi8r:{type:"_sbcs",chars:"\u2500\u2502\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2580\u2584\u2588\u258c\u2590\u2591\u2592\u2593\u2320\u25a0\u2219\u221a\u2248\u2264\u2265\xa0\u2321\xb0\xb2\xb7\xf7\u2550\u2551\u2552\u0451\u2553\u2554\u2555\u2556\u2557\u2558\u2559\u255a\u255b\u255c\u255d\u255e\u255f\u2560\u2561\u0401\u2562\u2563\u2564\u2565\u2566\u2567\u2568\u2569\u256a\u256b\u256c\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},koi8u:{type:"_sbcs",chars:"\u2500\u2502\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2580\u2584\u2588\u258c\u2590\u2591\u2592\u2593\u2320\u25a0\u2219\u221a\u2248\u2264\u2265\xa0\u2321\xb0\xb2\xb7\xf7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255a\u255b\u0491\u255d\u255e\u255f\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256a\u0490\u256c\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},koi8ru:{type:"_sbcs",chars:"\u2500\u2502\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2580\u2584\u2588\u258c\u2590\u2591\u2592\u2593\u2320\u25a0\u2219\u221a\u2248\u2264\u2265\xa0\u2321\xb0\xb2\xb7\xf7\u2550\u2551\u2552\u0451\u0454\u2554\u0456\u0457\u2557\u2558\u2559\u255a\u255b\u0491\u045e\u255e\u255f\u2560\u2561\u0401\u0404\u2563\u0406\u0407\u2566\u2567\u2568\u2569\u256a\u0490\u040e\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},koi8t:{type:"_sbcs",chars:"\u049b\u0493\u201a\u0492\u201e\u2026\u2020\u2021\ufffd\u2030\u04b3\u2039\u04b2\u04b7\u04b6\ufffd\u049a\u2018\u2019\u201c\u201d\u2022\u2013\u2014\ufffd\u2122\ufffd\u203a\ufffd\ufffd\ufffd\ufffd\ufffd\u04ef\u04ee\u0451\xa4\u04e3\xa6\xa7\ufffd\ufffd\ufffd\xab\xac\xad\xae\ufffd\xb0\xb1\xb2\u0401\ufffd\u04e2\xb6\xb7\ufffd\u2116\ufffd\xbb\ufffd\ufffd\ufffd\xa9\u044e\u0430\u0431\u0446\u0434\u0435\u0444\u0433\u0445\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u044f\u0440\u0441\u0442\u0443\u0436\u0432\u044c\u044b\u0437\u0448\u044d\u0449\u0447\u044a\u042e\u0410\u0411\u0426\u0414\u0415\u0424\u0413\u0425\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u042f\u0420\u0421\u0422\u0423\u0416\u0412\u042c\u042b\u0417\u0428\u042d\u0429\u0427\u042a"},armscii8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\ufffd\u0587\u0589)(\xbb\xab\u2014.\u055d,-\u058a\u2026\u055c\u055b\u055e\u0531\u0561\u0532\u0562\u0533\u0563\u0534\u0564\u0535\u0565\u0536\u0566\u0537\u0567\u0538\u0568\u0539\u0569\u053a\u056a\u053b\u056b\u053c\u056c\u053d\u056d\u053e\u056e\u053f\u056f\u0540\u0570\u0541\u0571\u0542\u0572\u0543\u0573\u0544\u0574\u0545\u0575\u0546\u0576\u0547\u0577\u0548\u0578\u0549\u0579\u054a\u057a\u054b\u057b\u054c\u057c\u054d\u057d\u054e\u057e\u054f\u057f\u0550\u0580\u0551\u0581\u0552\u0582\u0553\u0583\u0554\u0584\u0555\u0585\u0556\u0586\u055a\ufffd"},rk1048:{type:"_sbcs",chars:"\u0402\u0403\u201a\u0453\u201e\u2026\u2020\u2021\u20ac\u2030\u0409\u2039\u040a\u049a\u04ba\u040f\u0452\u2018\u2019\u201c\u201d\u2022\u2013\u2014\ufffd\u2122\u0459\u203a\u045a\u049b\u04bb\u045f\xa0\u04b0\u04b1\u04d8\xa4\u04e8\xa6\xa7\u0401\xa9\u0492\xab\xac\xad\xae\u04ae\xb0\xb1\u0406\u0456\u04e9\xb5\xb6\xb7\u0451\u2116\u0493\xbb\u04d9\u04a2\u04a3\u04af\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"},tcvn:{type:"_sbcs",chars:"\0\xda\u1ee4\x03\u1eea\u1eec\u1eee\x07\b\t\n\v\f\r\x0e\x0f\x10\u1ee8\u1ef0\u1ef2\u1ef6\u1ef8\xdd\u1ef4\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\xc0\u1ea2\xc3\xc1\u1ea0\u1eb6\u1eac\xc8\u1eba\u1ebc\xc9\u1eb8\u1ec6\xcc\u1ec8\u0128\xcd\u1eca\xd2\u1ece\xd5\xd3\u1ecc\u1ed8\u1edc\u1ede\u1ee0\u1eda\u1ee2\xd9\u1ee6\u0168\xa0\u0102\xc2\xca\xd4\u01a0\u01af\u0110\u0103\xe2\xea\xf4\u01a1\u01b0\u0111\u1eb0\u0300\u0309\u0303\u0301\u0323\xe0\u1ea3\xe3\xe1\u1ea1\u1eb2\u1eb1\u1eb3\u1eb5\u1eaf\u1eb4\u1eae\u1ea6\u1ea8\u1eaa\u1ea4\u1ec0\u1eb7\u1ea7\u1ea9\u1eab\u1ea5\u1ead\xe8\u1ec2\u1ebb\u1ebd\xe9\u1eb9\u1ec1\u1ec3\u1ec5\u1ebf\u1ec7\xec\u1ec9\u1ec4\u1ebe\u1ed2\u0129\xed\u1ecb\xf2\u1ed4\u1ecf\xf5\xf3\u1ecd\u1ed3\u1ed5\u1ed7\u1ed1\u1ed9\u1edd\u1edf\u1ee1\u1edb\u1ee3\xf9\u1ed6\u1ee7\u0169\xfa\u1ee5\u1eeb\u1eed\u1eef\u1ee9\u1ef1\u1ef3\u1ef7\u1ef9\xfd\u1ef5\u1ed0"},georgianacademy:{type:"_sbcs",chars:"\x80\x81\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\x8d\x8e\x8f\x90\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\x9d\x9e\u0178\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\u10d0\u10d1\u10d2\u10d3\u10d4\u10d5\u10d6\u10d7\u10d8\u10d9\u10da\u10db\u10dc\u10dd\u10de\u10df\u10e0\u10e1\u10e2\u10e3\u10e4\u10e5\u10e6\u10e7\u10e8\u10e9\u10ea\u10eb\u10ec\u10ed\u10ee\u10ef\u10f0\u10f1\u10f2\u10f3\u10f4\u10f5\u10f6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"},georgianps:{type:"_sbcs",chars:"\x80\x81\u201a\u0192\u201e\u2026\u2020\u2021\u02c6\u2030\u0160\u2039\u0152\x8d\x8e\x8f\x90\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u02dc\u2122\u0161\u203a\u0153\x9d\x9e\u0178\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\u10d0\u10d1\u10d2\u10d3\u10d4\u10d5\u10d6\u10f1\u10d7\u10d8\u10d9\u10da\u10db\u10dc\u10f2\u10dd\u10de\u10df\u10e0\u10e1\u10e2\u10f3\u10e3\u10e4\u10e5\u10e6\u10e7\u10e8\u10e9\u10ea\u10eb\u10ec\u10ed\u10ee\u10f4\u10ef\u10f0\u10f5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"},pt154:{type:"_sbcs",chars:"\u0496\u0492\u04ee\u0493\u201e\u2026\u04b6\u04ae\u04b2\u04af\u04a0\u04e2\u04a2\u049a\u04ba\u04b8\u0497\u2018\u2019\u201c\u201d\u2022\u2013\u2014\u04b3\u04b7\u04a1\u04e3\u04a3\u049b\u04bb\u04b9\xa0\u040e\u045e\u0408\u04e8\u0498\u04b0\xa7\u0401\xa9\u04d8\xab\xac\u04ef\xae\u049c\xb0\u04b1\u0406\u0456\u0499\u04e9\xb6\xb7\u0451\u2116\u04d9\xbb\u0458\u04aa\u04ab\u049d\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f"},viscii:{type:"_sbcs",chars:"\0\x01\u1eb2\x03\x04\u1eb4\u1eaa\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\u1ef6\x15\x16\x17\x18\u1ef8\x1a\x1b\x1c\x1d\u1ef4\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\u1ea0\u1eae\u1eb0\u1eb6\u1ea4\u1ea6\u1ea8\u1eac\u1ebc\u1eb8\u1ebe\u1ec0\u1ec2\u1ec4\u1ec6\u1ed0\u1ed2\u1ed4\u1ed6\u1ed8\u1ee2\u1eda\u1edc\u1ede\u1eca\u1ece\u1ecc\u1ec8\u1ee6\u0168\u1ee4\u1ef2\xd5\u1eaf\u1eb1\u1eb7\u1ea5\u1ea7\u1ea9\u1ead\u1ebd\u1eb9\u1ebf\u1ec1\u1ec3\u1ec5\u1ec7\u1ed1\u1ed3\u1ed5\u1ed7\u1ee0\u01a0\u1ed9\u1edd\u1edf\u1ecb\u1ef0\u1ee8\u1eea\u1eec\u01a1\u1edb\u01af\xc0\xc1\xc2\xc3\u1ea2\u0102\u1eb3\u1eb5\xc8\xc9\xca\u1eba\xcc\xcd\u0128\u1ef3\u0110\u1ee9\xd2\xd3\xd4\u1ea1\u1ef7\u1eeb\u1eed\xd9\xda\u1ef9\u1ef5\xdd\u1ee1\u01b0\xe0\xe1\xe2\xe3\u1ea3\u0103\u1eef\u1eab\xe8\xe9\xea\u1ebb\xec\xed\u0129\u1ec9\u0111\u1ef1\xf2\xf3\xf4\xf5\u1ecf\u1ecd\u1ee5\xf9\xfa\u0169\u1ee7\xfd\u1ee3\u1eee"},iso646cn:{type:"_sbcs",chars:"\0\x01\x02\x03\x04\x05\x06\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#\xa5%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}\u203e\x7f\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"},iso646jp:{type:"_sbcs",chars:"\0\x01\x02\x03\x04\x05\x06\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\xa5]^_`abcdefghijklmnopqrstuvwxyz{|}\u203e\x7f\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"},hproman8:{type:"_sbcs",chars:"\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xc0\xc2\xc8\xca\xcb\xce\xcf\xb4\u02cb\u02c6\xa8\u02dc\xd9\xdb\u20a4\xaf\xdd\xfd\xb0\xc7\xe7\xd1\xf1\xa1\xbf\xa4\xa3\xa5\xa7\u0192\xa2\xe2\xea\xf4\xfb\xe1\xe9\xf3\xfa\xe0\xe8\xf2\xf9\xe4\xeb\xf6\xfc\xc5\xee\xd8\xc6\xe5\xed\xf8\xe6\xc4\xec\xd6\xdc\xc9\xef\xdf\xd4\xc1\xc3\xe3\xd0\xf0\xcd\xcc\xd3\xd2\xd5\xf5\u0160\u0161\xda\u0178\xff\xde\xfe\xb7\xb5\xb6\xbe\u2014\xbc\xbd\xaa\xba\xab\u25a0\xbb\xb1\ufffd"},macintosh:{type:"_sbcs",chars:"\xc4\xc5\xc7\xc9\xd1\xd6\xdc\xe1\xe0\xe2\xe4\xe3\xe5\xe7\xe9\xe8\xea\xeb\xed\xec\xee\xef\xf1\xf3\xf2\xf4\xf6\xf5\xfa\xf9\xfb\xfc\u2020\xb0\xa2\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\xb4\xa8\u2260\xc6\xd8\u221e\xb1\u2264\u2265\xa5\xb5\u2202\u2211\u220f\u03c0\u222b\xaa\xba\u2126\xe6\xf8\xbf\xa1\xac\u221a\u0192\u2248\u2206\xab\xbb\u2026\xa0\xc0\xc3\xd5\u0152\u0153\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\xff\u0178\u2044\xa4\u2039\u203a\ufb01\ufb02\u2021\xb7\u201a\u201e\u2030\xc2\xca\xc1\xcb\xc8\xcd\xce\xcf\xcc\xd3\xd4\ufffd\xd2\xda\xdb\xd9\u0131\u02c6\u02dc\xaf\u02d8\u02d9\u02da\xb8\u02dd\u02db\u02c7"},ascii:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd"},tis620:{type:"_sbcs",chars:"\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\u0e01\u0e02\u0e03\u0e04\u0e05\u0e06\u0e07\u0e08\u0e09\u0e0a\u0e0b\u0e0c\u0e0d\u0e0e\u0e0f\u0e10\u0e11\u0e12\u0e13\u0e14\u0e15\u0e16\u0e17\u0e18\u0e19\u0e1a\u0e1b\u0e1c\u0e1d\u0e1e\u0e1f\u0e20\u0e21\u0e22\u0e23\u0e24\u0e25\u0e26\u0e27\u0e28\u0e29\u0e2a\u0e2b\u0e2c\u0e2d\u0e2e\u0e2f\u0e30\u0e31\u0e32\u0e33\u0e34\u0e35\u0e36\u0e37\u0e38\u0e39\u0e3a\ufffd\ufffd\ufffd\ufffd\u0e3f\u0e40\u0e41\u0e42\u0e43\u0e44\u0e45\u0e46\u0e47\u0e48\u0e49\u0e4a\u0e4b\u0e4c\u0e4d\u0e4e\u0e4f\u0e50\u0e51\u0e52\u0e53\u0e54\u0e55\u0e56\u0e57\u0e58\u0e59\u0e5a\u0e5b\ufffd\ufffd\ufffd\ufffd"}}},3769:function(T){"use strict";T.exports={10029:"maccenteuro",maccenteuro:{type:"_sbcs",chars:"\xc4\u0100\u0101\xc9\u0104\xd6\xdc\xe1\u0105\u010c\xe4\u010d\u0106\u0107\xe9\u0179\u017a\u010e\xed\u010f\u0112\u0113\u0116\xf3\u0117\xf4\xf6\xf5\xfa\u011a\u011b\xfc\u2020\xb0\u0118\xa3\xa7\u2022\xb6\xdf\xae\xa9\u2122\u0119\xa8\u2260\u0123\u012e\u012f\u012a\u2264\u2265\u012b\u0136\u2202\u2211\u0142\u013b\u013c\u013d\u013e\u0139\u013a\u0145\u0146\u0143\xac\u221a\u0144\u0147\u2206\xab\xbb\u2026\xa0\u0148\u0150\xd5\u0151\u014c\u2013\u2014\u201c\u201d\u2018\u2019\xf7\u25ca\u014d\u0154\u0155\u0158\u2039\u203a\u0159\u0156\u0157\u0160\u201a\u201e\u0161\u015a\u015b\xc1\u0164\u0165\xcd\u017d\u017e\u016a\xd3\xd4\u016b\u016e\xda\u016f\u0170\u0171\u0172\u0173\xdd\xfd\u0137\u017b\u0141\u017c\u0122\u02c7"},808:"cp808",ibm808:"cp808",cp808:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u0401\u0451\u0404\u0454\u0407\u0457\u040e\u045e\xb0\u2219\xb7\u221a\u2116\u20ac\u25a0\xa0"},mik:{type:"_sbcs",chars:"\u0410\u0411\u0412\u0413\u0414\u0415\u0416\u0417\u0418\u0419\u041a\u041b\u041c\u041d\u041e\u041f\u0420\u0421\u0422\u0423\u0424\u0425\u0426\u0427\u0428\u0429\u042a\u042b\u042c\u042d\u042e\u042f\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043a\u043b\u043c\u043d\u043e\u043f\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044a\u044b\u044c\u044d\u044e\u044f\u2514\u2534\u252c\u251c\u2500\u253c\u2563\u2551\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2510\u2591\u2592\u2593\u2502\u2524\u2116\xa7\u2557\u255d\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u03b1\xdf\u0393\u03c0\u03a3\u03c3\xb5\u03c4\u03a6\u0398\u03a9\u03b4\u221e\u03c6\u03b5\u2229\u2261\xb1\u2265\u2264\u2320\u2321\xf7\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0"},cp720:{type:"_sbcs",chars:"\x80\x81\xe9\xe2\x84\xe0\x86\xe7\xea\xeb\xe8\xef\xee\x8d\x8e\x8f\x90\u0651\u0652\xf4\xa4\u0640\xfb\xf9\u0621\u0622\u0623\u0624\xa3\u0625\u0626\u0627\u0628\u0629\u062a\u062b\u062c\u062d\u062e\u062f\u0630\u0631\u0632\u0633\u0634\u0635\xab\xbb\u2591\u2592\u2593\u2502\u2524\u2561\u2562\u2556\u2555\u2563\u2551\u2557\u255d\u255c\u255b\u2510\u2514\u2534\u252c\u251c\u2500\u253c\u255e\u255f\u255a\u2554\u2569\u2566\u2560\u2550\u256c\u2567\u2568\u2564\u2565\u2559\u2558\u2552\u2553\u256b\u256a\u2518\u250c\u2588\u2584\u258c\u2590\u2580\u0636\u0637\u0638\u0639\u063a\u0641\xb5\u0642\u0643\u0644\u0645\u0646\u0647\u0648\u0649\u064a\u2261\u064b\u064c\u064d\u064e\u064f\u0650\u2248\xb0\u2219\xb7\u221a\u207f\xb2\u25a0\xa0"},ascii8bit:"ascii",usascii:"ascii",ansix34:"ascii",ansix341968:"ascii",ansix341986:"ascii",csascii:"ascii",cp367:"ascii",ibm367:"ascii",isoir6:"ascii",iso646us:"ascii",iso646irv:"ascii",us:"ascii",latin1:"iso88591",latin2:"iso88592",latin3:"iso88593",latin4:"iso88594",latin5:"iso88599",latin6:"iso885910",latin7:"iso885913",latin8:"iso885914",latin9:"iso885915",latin10:"iso885916",csisolatin1:"iso88591",csisolatin2:"iso88592",csisolatin3:"iso88593",csisolatin4:"iso88594",csisolatincyrillic:"iso88595",csisolatinarabic:"iso88596",csisolatingreek:"iso88597",csisolatinhebrew:"iso88598",csisolatin5:"iso88599",csisolatin6:"iso885910",l1:"iso88591",l2:"iso88592",l3:"iso88593",l4:"iso88594",l5:"iso88599",l6:"iso885910",l7:"iso885913",l8:"iso885914",l9:"iso885915",l10:"iso885916",isoir14:"iso646jp",isoir57:"iso646cn",isoir100:"iso88591",isoir101:"iso88592",isoir109:"iso88593",isoir110:"iso88594",isoir144:"iso88595",isoir127:"iso88596",isoir126:"iso88597",isoir138:"iso88598",isoir148:"iso88599",isoir157:"iso885910",isoir166:"tis620",isoir179:"iso885913",isoir199:"iso885914",isoir203:"iso885915",isoir226:"iso885916",cp819:"iso88591",ibm819:"iso88591",cyrillic:"iso88595",arabic:"iso88596",arabic8:"iso88596",ecma114:"iso88596",asmo708:"iso88596",greek:"iso88597",greek8:"iso88597",ecma118:"iso88597",elot928:"iso88597",hebrew:"iso88598",hebrew8:"iso88598",turkish:"iso88599",turkish8:"iso88599",thai:"iso885911",thai8:"iso885911",celtic:"iso885914",celtic8:"iso885914",isoceltic:"iso885914",tis6200:"tis620",tis62025291:"tis620",tis62025330:"tis620",1e4:"macroman",10006:"macgreek",10007:"maccyrillic",10079:"maciceland",10081:"macturkish",cspc8codepage437:"cp437",cspc775baltic:"cp775",cspc850multilingual:"cp850",cspcp852:"cp852",cspc862latinhebrew:"cp862",cpgr:"cp869",msee:"cp1250",mscyrl:"cp1251",msansi:"cp1252",msgreek:"cp1253",msturk:"cp1254",mshebr:"cp1255",msarab:"cp1256",winbaltrim:"cp1257",cp20866:"koi8r",20866:"koi8r",ibm878:"koi8r",cskoi8r:"koi8r",cp21866:"koi8u",21866:"koi8u",ibm1168:"koi8u",strk10482002:"rk1048",tcvn5712:"tcvn",tcvn57121:"tcvn",gb198880:"iso646cn",cn:"iso646cn",csiso14jisc6220ro:"iso646jp",jisc62201969ro:"iso646jp",jp:"iso646jp",cshproman8:"hproman8",r8:"hproman8",roman8:"hproman8",xroman8:"hproman8",ibm1051:"hproman8",mac:"macintosh",csmacintosh:"macintosh"}},1279:function(T,I,n){"use strict";var c=n(7103).Buffer;function i(){}function o(){}function l(){this.overflowByte=-1}function h(u,C){this.iconv=C}function a(u,C){void 0===(u=u||{}).addBOM&&(u.addBOM=!0),this.encoder=C.iconv.getEncoder("utf-16le",u)}function B(u,C){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=u||{},this.iconv=C.iconv}function E(u,C){var e=[],f=0,g=0,w=0;A:for(var Q=0;Q=100)break A}return w>g?"utf-16be":w1114111)&&(f=g),f>=65536){var w=55296|(f-=65536)>>10;C[e++]=255&w,C[e++]=w>>8,f=56320|1023&f}return C[e++]=255&f,C[e++]=f>>8,e}function a(C,e){this.iconv=e}function B(C,e){void 0===(C=C||{}).addBOM&&(C.addBOM=!0),this.encoder=e.iconv.getEncoder(C.defaultEncoding||"utf-32le",C)}function E(C,e){this.decoder=null,this.initialBufs=[],this.initialBufsLen=0,this.options=C||{},this.iconv=e.iconv}function u(C,e){var f=[],g=0,w=0,Q=0,p=0,Y=0;A:for(var y=0;y16)&&Q++,(0!==f[3]||f[2]>16)&&w++,0===f[0]&&0===f[1]&&(0!==f[2]||0!==f[3])&&Y++,(0!==f[0]||0!==f[1])&&0===f[2]&&0===f[3]&&p++,f.length=0,++g>=100)break A}return Y-Q>p-w?"utf-32be":Y-Q0){for(;e0&&(p=this.iconv.decode(c.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",p},I.utf7imap=f,f.prototype.encoder=g,f.prototype.decoder=w,f.prototype.bomAware=!0,g.prototype.write=function(p){for(var Y=this.inBase64,y=this.base64Accum,d=this.base64AccumIdx,m=c.alloc(5*p.length+10),v=0,P=0;P0&&(v+=m.write(y.slice(0,d).toString("base64").replace(/\//g,",").replace(/=+$/,""),v),d=0),m[v++]=C,Y=!1),Y||(m[v++]=S,S===e&&(m[v++]=C))):(Y||(m[v++]=e,Y=!0),Y&&(y[d++]=S>>8,y[d++]=255&S,d==y.length&&(v+=m.write(y.toString("base64").replace(/\//g,","),v),d=0)))}return this.inBase64=Y,this.base64AccumIdx=d,m.slice(0,v)},g.prototype.end=function(){var p=c.alloc(10),Y=0;return this.inBase64&&(this.base64AccumIdx>0&&(Y+=p.write(this.base64Accum.slice(0,this.base64AccumIdx).toString("base64").replace(/\//g,",").replace(/=+$/,""),Y),this.base64AccumIdx=0),p[Y++]=C,this.inBase64=!1),p.slice(0,Y)};var Q=B.slice();Q[",".charCodeAt(0)]=!0,w.prototype.write=function(p){for(var Y="",y=0,d=this.inBase64,m=this.base64Accum,v=0;v0&&(p=this.iconv.decode(c.from(this.base64Accum,"base64"),"utf16-be")),this.inBase64=!1,this.base64Accum="",p}},5395:function(T,I){"use strict";function c(o,l){this.encoder=o,this.addBOM=!0}function i(o,l){this.decoder=o,this.pass=!1,this.options=l||{}}I.PrependBOM=c,c.prototype.write=function(o){return this.addBOM&&(o="\ufeff"+o,this.addBOM=!1),this.encoder.write(o)},c.prototype.end=function(){return this.encoder.end()},I.StripBOM=i,i.prototype.write=function(o){var l=this.decoder.write(o);return this.pass||!l||("\ufeff"===l[0]&&(l=l.slice(1),"function"==typeof this.options.stripBOM&&this.options.stripBOM()),this.pass=!0),l},i.prototype.end=function(){return this.decoder.end()}},4914:function(T,I,n){"use strict";var l,c=n(7103).Buffer,i=n(5395),o=T.exports;o.encodings=null,o.defaultCharUnicode="\ufffd",o.defaultCharSingleByte="?",o.encode=function(a,B,E){a=""+(a||"");var u=o.getEncoder(B,E),C=u.write(a),e=u.end();return e&&e.length>0?c.concat([C,e]):C},o.decode=function(a,B,E){"string"==typeof a&&(o.skipDecodeWarning||(console.error("Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding"),o.skipDecodeWarning=!0),a=c.from(""+(a||""),"binary"));var u=o.getDecoder(B,E),C=u.write(a),e=u.end();return e?C+e:C},o.encodingExists=function(a){try{return o.getCodec(a),!0}catch(B){return!1}},o.toEncoding=o.encode,o.fromEncoding=o.decode,o._codecDataCache={},o.getCodec=function(a){o.encodings||(o.encodings=n(6934));for(var B=o._canonicalizeEncoding(a),E={};;){var u=o._codecDataCache[B];if(u)return u;var C=o.encodings[B];switch(typeof C){case"string":B=C;break;case"object":for(var e in C)E[e]=C[e];E.encodingName||(E.encodingName=B),B=C.type;break;case"function":return E.encodingName||(E.encodingName=B),u=new C(E,o),o._codecDataCache[E.encodingName]=u,u;default:throw new Error("Encoding not recognized: '"+a+"' (searched as: '"+B+"')")}}},o._canonicalizeEncoding=function(h){return(""+h).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g,"")},o.getEncoder=function(a,B){var E=o.getCodec(a),u=new E.encoder(B,E);return E.bomAware&&B&&B.addBOM&&(u=new i.PrependBOM(u,B)),u},o.getDecoder=function(a,B){var E=o.getCodec(a),u=new E.decoder(B,E);return E.bomAware&&!(B&&!1===B.stripBOM)&&(u=new i.StripBOM(u,B)),u},o.enableStreamingAPI=function(a){if(!o.supportsStreams){var B=n(8044)(a);o.IconvLiteEncoderStream=B.IconvLiteEncoderStream,o.IconvLiteDecoderStream=B.IconvLiteDecoderStream,o.encodeStream=function(u,C){return new o.IconvLiteEncoderStream(o.getEncoder(u,C),C)},o.decodeStream=function(u,C){return new o.IconvLiteDecoderStream(o.getDecoder(u,C),C)},o.supportsStreams=!0}};try{l=n(5832)}catch(h){}l&&l.Transform?o.enableStreamingAPI(l):o.encodeStream=o.decodeStream=function(){throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.")}},8044:function(T,I,n){"use strict";var c=n(7103).Buffer;T.exports=function(i){var o=i.Transform;function l(a,B){this.conv=a,(B=B||{}).decodeStrings=!1,o.call(this,B)}function h(a,B){this.conv=a,(B=B||{}).encoding=this.encoding="utf8",o.call(this,B)}return(l.prototype=Object.create(o.prototype,{constructor:{value:l}}))._transform=function(a,B,E){if("string"!=typeof a)return E(new Error("Iconv encoding stream needs strings as its input."));try{var u=this.conv.write(a);u&&u.length&&this.push(u),E()}catch(C){E(C)}},l.prototype._flush=function(a){try{var B=this.conv.end();B&&B.length&&this.push(B),a()}catch(E){a(E)}},l.prototype.collect=function(a){var B=[];return this.on("error",a),this.on("data",function(E){B.push(E)}),this.on("end",function(){a(null,c.concat(B))}),this},(h.prototype=Object.create(o.prototype,{constructor:{value:h}}))._transform=function(a,B,E){if(!(c.isBuffer(a)||a instanceof Uint8Array))return E(new Error("Iconv decoding stream needs buffers as its input."));try{var u=this.conv.write(a);u&&u.length&&this.push(u,this.encoding),E()}catch(C){E(C)}},h.prototype._flush=function(a){try{var B=this.conv.end();B&&B.length&&this.push(B,this.encoding),a()}catch(E){a(E)}},h.prototype.collect=function(a){var B="";return this.on("error",a),this.on("data",function(E){B+=E}),this.on("end",function(){a(null,B)}),this},{IconvLiteEncoderStream:l,IconvLiteDecoderStream:h}}},645:function(T,I){I.read=function(n,c,i,o,l){var h,a,B=8*l-o-1,E=(1<>1,C=-7,e=i?l-1:0,f=i?-1:1,g=n[c+e];for(e+=f,h=g&(1<<-C)-1,g>>=-C,C+=B;C>0;h=256*h+n[c+e],e+=f,C-=8);for(a=h&(1<<-C)-1,h>>=-C,C+=o;C>0;a=256*a+n[c+e],e+=f,C-=8);if(0===h)h=1-u;else{if(h===E)return a?NaN:1/0*(g?-1:1);a+=Math.pow(2,o),h-=u}return(g?-1:1)*a*Math.pow(2,h-o)},I.write=function(n,c,i,o,l,h){var a,B,E,u=8*h-l-1,C=(1<>1,f=23===l?Math.pow(2,-24)-Math.pow(2,-77):0,g=o?0:h-1,w=o?1:-1,Q=c<0||0===c&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(B=isNaN(c)?1:0,a=C):(a=Math.floor(Math.log(c)/Math.LN2),c*(E=Math.pow(2,-a))<1&&(a--,E*=2),(c+=a+e>=1?f/E:f*Math.pow(2,1-e))*E>=2&&(a++,E/=2),a+e>=C?(B=0,a=C):a+e>=1?(B=(c*E-1)*Math.pow(2,l),a+=e):(B=c*Math.pow(2,e-1)*Math.pow(2,l),a=0));l>=8;n[i+g]=255&B,g+=w,B/=256,l-=8);for(a=a<0;n[i+g]=255&a,g+=w,a/=256,u-=8);n[i+g-w]|=128*Q}},5717:function(T){T.exports="function"==typeof Object.create?function(n,c){c&&(n.super_=c,n.prototype=Object.create(c.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}))}:function(n,c){if(c){n.super_=c;var i=function(){};i.prototype=c.prototype,n.prototype=new i,n.prototype.constructor=n}}},2584:function(T,I,n){"use strict";var c=n(6410)(),o=n(1924)("Object.prototype.toString"),l=function(E){return!(c&&E&&"object"==typeof E&&Symbol.toStringTag in E)&&"[object Arguments]"===o(E)},h=function(E){return!!l(E)||null!==E&&"object"==typeof E&&"number"==typeof E.length&&E.length>=0&&"[object Array]"!==o(E)&&"[object Function]"===o(E.callee)},a=function(){return l(arguments)}();l.isLegacyArguments=h,T.exports=a?l:h},8923:function(T,I,n){"use strict";var c=Date.prototype.getDay,o=Object.prototype.toString,h=n(6410)();T.exports=function(B){return"object"==typeof B&&null!==B&&(h?function(B){try{return c.call(B),!0}catch(E){return!1}}(B):"[object Date]"===o.call(B))}},8662:function(T,I,n){"use strict";var B,c=Object.prototype.toString,i=Function.prototype.toString,o=/^\s*(?:function)?\*/,l=n(6410)(),h=Object.getPrototypeOf;T.exports=function(u){if("function"!=typeof u)return!1;if(o.test(i.call(u)))return!0;if(!l)return"[object GeneratorFunction]"===c.call(u);if(!h)return!1;if(void 0===B){var e=function(){if(!l)return!1;try{return Function("return function*() {}")()}catch(E){}}();B=!!e&&h(e)}return h(u)===B}},8611:function(T){"use strict";T.exports=function(n){return n!=n}},360:function(T,I,n){"use strict";var c=n(5559),i=n(4289),o=n(8611),l=n(9415),h=n(6743),a=c(l(),Number);i(a,{getPolyfill:l,implementation:o,shim:h}),T.exports=a},9415:function(T,I,n){"use strict";var c=n(8611);T.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:c}},6743:function(T,I,n){"use strict";var c=n(4289),i=n(9415);T.exports=function(){var l=i();return c(Number,{isNaN:l},{isNaN:function(){return Number.isNaN!==l}}),l}},8420:function(T,I,n){"use strict";var o,l,h,a,c=n(1924),i=n(6410)();if(i){o=c("Object.prototype.hasOwnProperty"),l=c("RegExp.prototype.exec"),h={};var B=function(){throw h};a={toString:B,valueOf:B},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=B)}var E=c("Object.prototype.toString"),u=Object.getOwnPropertyDescriptor;T.exports=i?function(f){if(!f||"object"!=typeof f)return!1;var g=u(f,"lastIndex");if(!g||!o(g,"value"))return!1;try{l(f,a)}catch(Q){return Q===h}}:function(f){return!(!f||"object"!=typeof f&&"function"!=typeof f)&&"[object RegExp]"===E(f)}},5692:function(T,I,n){"use strict";var c=n(9804),i=n(3083),o=n(1924),l=o("Object.prototype.toString"),h=n(6410)(),a="undefined"==typeof globalThis?n.g:globalThis,B=i(),E=o("Array.prototype.indexOf",!0)||function(Q,p){for(var Y=0;Y-1}return!!e&&function(Q){var p=!1;return c(C,function(Y,y){if(!p)try{p=Y.call(Q)===y}catch(d){}}),p}(Q)}},4244:function(T){"use strict";var I=function(n){return n!=n};T.exports=function(c,i){return 0===c&&0===i?1/c==1/i:!!(c===i||I(c)&&I(i))}},609:function(T,I,n){"use strict";var c=n(4289),i=n(5559),o=n(4244),l=n(5624),h=n(2281),a=i(l(),Object);c(a,{getPolyfill:l,implementation:o,shim:h}),T.exports=a},5624:function(T,I,n){"use strict";var c=n(4244);T.exports=function(){return"function"==typeof Object.is?Object.is:c}},2281:function(T,I,n){"use strict";var c=n(5624),i=n(4289);T.exports=function(){var l=c();return i(Object,{is:l},{is:function(){return Object.is!==l}}),l}},8987:function(T,I,n){"use strict";var c;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,l=n(1414),h=Object.prototype.propertyIsEnumerable,a=!h.call({toString:null},"toString"),B=h.call(function(){},"prototype"),E=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(g){var w=g.constructor;return w&&w.prototype===g},C={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},e=function(){if("undefined"==typeof window)return!1;for(var g in window)try{if(!C["$"+g]&&i.call(window,g)&&null!==window[g]&&"object"==typeof window[g])try{u(window[g])}catch(w){return!0}}catch(w){return!0}return!1}();c=function(w){var Q=null!==w&&"object"==typeof w,p="[object Function]"===o.call(w),Y=l(w),y=Q&&"[object String]"===o.call(w),d=[];if(!Q&&!p&&!Y)throw new TypeError("Object.keys called on a non-object");var m=B&&p;if(y&&w.length>0&&!i.call(w,0))for(var v=0;v0)for(var P=0;P=0&&"[object Function]"===I.call(c.callee)),o}},4236:function(T,I){"use strict";var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function c(l,h){return Object.prototype.hasOwnProperty.call(l,h)}I.assign=function(l){for(var h=Array.prototype.slice.call(arguments,1);h.length;){var a=h.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(var B in a)c(a,B)&&(l[B]=a[B])}}return l},I.shrinkBuf=function(l,h){return l.length===h?l:l.subarray?l.subarray(0,h):(l.length=h,l)};var i={arraySet:function(l,h,a,B,E){if(h.subarray&&l.subarray)l.set(h.subarray(a,a+B),E);else for(var u=0;u>>16&65535|0,a=0;0!==i;){i-=a=i>2e3?2e3:i;do{h=h+(l=l+c[o++]|0)|0}while(--a);l%=65521,h%=65521}return l|h<<16|0}},1619:function(T){"use strict";T.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},2869:function(T){"use strict";var n=function I(){for(var i,o=[],l=0;l<256;l++){i=l;for(var h=0;h<8;h++)i=1&i?3988292384^i>>>1:i>>>1;o[l]=i}return o}();T.exports=function c(i,o,l,h){var a=n,B=h+l;i^=-1;for(var E=h;E>>8^a[255&(i^o[E])];return-1^i}},405:function(T,I,n){"use strict";var Yt,c=n(4236),i=n(342),o=n(6069),l=n(2869),h=n(8898),g=-2,yA=258,FA=262,X=666;function nA(j,qA){return j.msg=h[qA],qA}function EA(j){return(j<<1)-(j>4?9:0)}function GA(j){for(var qA=j.length;--qA>=0;)j[qA]=0}function et(j){var qA=j.state,KA=qA.pending;KA>j.avail_out&&(KA=j.avail_out),0!==KA&&(c.arraySet(j.output,qA.pending_buf,qA.pending_out,KA,j.next_out),j.next_out+=KA,qA.pending_out+=KA,j.total_out+=KA,j.avail_out-=KA,qA.pending-=KA,0===qA.pending&&(qA.pending_out=0))}function st(j,qA){i._tr_flush_block(j,j.block_start>=0?j.block_start:-1,j.strstart-j.block_start,qA),j.block_start=j.strstart,et(j.strm)}function TA(j,qA){j.pending_buf[j.pending++]=qA}function it(j,qA){j.pending_buf[j.pending++]=qA>>>8&255,j.pending_buf[j.pending++]=255&qA}function mt(j,qA,KA,DA){var jA=j.avail_in;return jA>DA&&(jA=DA),0===jA?0:(j.avail_in-=jA,c.arraySet(qA,j.input,j.next_in,jA,KA),1===j.state.wrap?j.adler=o(j.adler,qA,jA,KA):2===j.state.wrap&&(j.adler=l(j.adler,qA,jA,KA)),j.next_in+=jA,j.total_in+=jA,jA)}function It(j,qA){var jA,lt,KA=j.max_chain_length,DA=j.strstart,Lt=j.prev_length,yt=j.nice_match,Rt=j.strstart>j.w_size-FA?j.strstart-(j.w_size-FA):0,Vt=j.window,Le=j.w_mask,ie=j.prev,te=j.strstart+yA,ye=Vt[DA+Lt-1],be=Vt[DA+Lt];j.prev_length>=j.good_match&&(KA>>=2),yt>j.lookahead&&(yt=j.lookahead);do{if(Vt[(jA=qA)+Lt]===be&&Vt[jA+Lt-1]===ye&&Vt[jA]===Vt[DA]&&Vt[++jA]===Vt[DA+1]){DA+=2,jA++;do{}while(Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&Vt[++DA]===Vt[++jA]&&DALt){if(j.match_start=qA,Lt=lt,lt>=yt)break;ye=Vt[DA+Lt-1],be=Vt[DA+Lt]}}}while((qA=ie[qA&Le])>Rt&&0!=--KA);return Lt<=j.lookahead?Lt:j.lookahead}function ft(j){var KA,DA,jA,lt,Lt,qA=j.w_size;do{if(lt=j.window_size-j.lookahead-j.strstart,j.strstart>=qA+(qA-FA)){c.arraySet(j.window,j.window,qA,qA,0),j.match_start-=qA,j.strstart-=qA,j.block_start-=qA,KA=DA=j.hash_size;do{jA=j.head[--KA],j.head[KA]=jA>=qA?jA-qA:0}while(--DA);KA=DA=qA;do{jA=j.prev[--KA],j.prev[KA]=jA>=qA?jA-qA:0}while(--DA);lt+=qA}if(0===j.strm.avail_in)break;if(DA=mt(j.strm,j.window,j.strstart+j.lookahead,lt),j.lookahead+=DA,j.lookahead+j.insert>=3)for(j.ins_h=j.window[Lt=j.strstart-j.insert],j.ins_h=(j.ins_h<=3&&(j.ins_h=(j.ins_h<=3)if(DA=i._tr_tally(j,j.strstart-j.match_start,j.match_length-3),j.lookahead-=j.match_length,j.match_length<=j.max_lazy_match&&j.lookahead>=3){j.match_length--;do{j.strstart++,j.ins_h=(j.ins_h<=3&&(j.ins_h=(j.ins_h<4096)&&(j.match_length=2)),j.prev_length>=3&&j.match_length<=j.prev_length){jA=j.strstart+j.lookahead-3,DA=i._tr_tally(j,j.strstart-1-j.prev_match,j.prev_length-3),j.lookahead-=j.prev_length-1,j.prev_length-=2;do{++j.strstart<=jA&&(j.ins_h=(j.ins_h<15&&(Lt=2,DA-=16),jA<1||jA>9||8!==KA||DA<8||DA>15||qA<0||qA>9||lt<0||lt>4)return nA(j,g);8===DA&&(DA=9);var yt=new H;return j.state=yt,yt.strm=j,yt.wrap=Lt,yt.gzhead=null,yt.w_bits=DA,yt.w_size=1<j.pending_buf_size-5&&(KA=j.pending_buf_size-5);;){if(j.lookahead<=1){if(ft(j),0===j.lookahead&&0===qA)return 1;if(0===j.lookahead)break}j.strstart+=j.lookahead,j.lookahead=0;var DA=j.block_start+KA;if((0===j.strstart||j.strstart>=DA)&&(j.lookahead=j.strstart-DA,j.strstart=DA,st(j,!1),0===j.strm.avail_out)||j.strstart-j.block_start>=j.w_size-FA&&(st(j,!1),0===j.strm.avail_out))return 1}return j.insert=0,4===qA?(st(j,!0),0===j.strm.avail_out?3:4):(j.strstart>j.block_start&&st(j,!1),1)}),new ht(4,4,8,4,WA),new ht(4,5,16,8,WA),new ht(4,6,32,32,WA),new ht(4,4,16,16,rt),new ht(8,16,32,32,rt),new ht(8,16,128,128,rt),new ht(8,32,128,256,rt),new ht(32,128,258,1024,rt),new ht(32,258,258,4096,rt)],I.deflateInit=function RA(j,qA){return wA(j,qA,8,15,8,0)},I.deflateInit2=wA,I.deflateReset=b,I.deflateResetKeep=k,I.deflateSetHeader=function CA(j,qA){return j&&j.state&&2===j.state.wrap?(j.state.gzhead=qA,0):g},I.deflate=function rA(j,qA){var KA,DA,jA,lt;if(!j||!j.state||qA>5||qA<0)return j?nA(j,g):g;if(DA=j.state,!j.output||!j.input&&0!==j.avail_in||DA.status===X&&4!==qA)return nA(j,0===j.avail_out?-5:g);if(DA.strm=j,KA=DA.last_flush,DA.last_flush=qA,42===DA.status)if(2===DA.wrap)j.adler=0,TA(DA,31),TA(DA,139),TA(DA,8),DA.gzhead?(TA(DA,(DA.gzhead.text?1:0)+(DA.gzhead.hcrc?2:0)+(DA.gzhead.extra?4:0)+(DA.gzhead.name?8:0)+(DA.gzhead.comment?16:0)),TA(DA,255&DA.gzhead.time),TA(DA,DA.gzhead.time>>8&255),TA(DA,DA.gzhead.time>>16&255),TA(DA,DA.gzhead.time>>24&255),TA(DA,9===DA.level?2:DA.strategy>=2||DA.level<2?4:0),TA(DA,255&DA.gzhead.os),DA.gzhead.extra&&DA.gzhead.extra.length&&(TA(DA,255&DA.gzhead.extra.length),TA(DA,DA.gzhead.extra.length>>8&255)),DA.gzhead.hcrc&&(j.adler=l(j.adler,DA.pending_buf,DA.pending,0)),DA.gzindex=0,DA.status=69):(TA(DA,0),TA(DA,0),TA(DA,0),TA(DA,0),TA(DA,0),TA(DA,9===DA.level?2:DA.strategy>=2||DA.level<2?4:0),TA(DA,3),DA.status=113);else{var Lt=8+(DA.w_bits-8<<4)<<8;Lt|=(DA.strategy>=2||DA.level<2?0:DA.level<6?1:6===DA.level?2:3)<<6,0!==DA.strstart&&(Lt|=32),Lt+=31-Lt%31,DA.status=113,it(DA,Lt),0!==DA.strstart&&(it(DA,j.adler>>>16),it(DA,65535&j.adler)),j.adler=1}if(69===DA.status)if(DA.gzhead.extra){for(jA=DA.pending;DA.gzindex<(65535&DA.gzhead.extra.length)&&(DA.pending!==DA.pending_buf_size||(DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),et(j),jA=DA.pending,DA.pending!==DA.pending_buf_size));)TA(DA,255&DA.gzhead.extra[DA.gzindex]),DA.gzindex++;DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),DA.gzindex===DA.gzhead.extra.length&&(DA.gzindex=0,DA.status=73)}else DA.status=73;if(73===DA.status)if(DA.gzhead.name){jA=DA.pending;do{if(DA.pending===DA.pending_buf_size&&(DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),et(j),jA=DA.pending,DA.pending===DA.pending_buf_size)){lt=1;break}lt=DA.gzindexjA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),0===lt&&(DA.gzindex=0,DA.status=91)}else DA.status=91;if(91===DA.status)if(DA.gzhead.comment){jA=DA.pending;do{if(DA.pending===DA.pending_buf_size&&(DA.gzhead.hcrc&&DA.pending>jA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),et(j),jA=DA.pending,DA.pending===DA.pending_buf_size)){lt=1;break}lt=DA.gzindexjA&&(j.adler=l(j.adler,DA.pending_buf,DA.pending-jA,jA)),0===lt&&(DA.status=103)}else DA.status=103;if(103===DA.status&&(DA.gzhead.hcrc?(DA.pending+2>DA.pending_buf_size&&et(j),DA.pending+2<=DA.pending_buf_size&&(TA(DA,255&j.adler),TA(DA,j.adler>>8&255),j.adler=0,DA.status=113)):DA.status=113),0!==DA.pending){if(et(j),0===j.avail_out)return DA.last_flush=-1,0}else if(0===j.avail_in&&EA(qA)<=EA(KA)&&4!==qA)return nA(j,-5);if(DA.status===X&&0!==j.avail_in)return nA(j,-5);if(0!==j.avail_in||0!==DA.lookahead||0!==qA&&DA.status!==X){var Rt=2===DA.strategy?function Mt(j,qA){for(var KA;;){if(0===j.lookahead&&(ft(j),0===j.lookahead)){if(0===qA)return 1;break}if(j.match_length=0,KA=i._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++,KA&&(st(j,!1),0===j.strm.avail_out))return 1}return j.insert=0,4===qA?(st(j,!0),0===j.strm.avail_out?3:4):j.last_lit&&(st(j,!1),0===j.strm.avail_out)?1:2}(DA,qA):3===DA.strategy?function xA(j,qA){for(var KA,DA,jA,lt,Lt=j.window;;){if(j.lookahead<=yA){if(ft(j),j.lookahead<=yA&&0===qA)return 1;if(0===j.lookahead)break}if(j.match_length=0,j.lookahead>=3&&j.strstart>0&&(DA=Lt[jA=j.strstart-1])===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]){lt=j.strstart+yA;do{}while(DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&DA===Lt[++jA]&&jAj.lookahead&&(j.match_length=j.lookahead)}if(j.match_length>=3?(KA=i._tr_tally(j,1,j.match_length-3),j.lookahead-=j.match_length,j.strstart+=j.match_length,j.match_length=0):(KA=i._tr_tally(j,0,j.window[j.strstart]),j.lookahead--,j.strstart++),KA&&(st(j,!1),0===j.strm.avail_out))return 1}return j.insert=0,4===qA?(st(j,!0),0===j.strm.avail_out?3:4):j.last_lit&&(st(j,!1),0===j.strm.avail_out)?1:2}(DA,qA):Yt[DA.level].func(DA,qA);if((3===Rt||4===Rt)&&(DA.status=X),1===Rt||3===Rt)return 0===j.avail_out&&(DA.last_flush=-1),0;if(2===Rt&&(1===qA?i._tr_align(DA):5!==qA&&(i._tr_stored_block(DA,0,0,!1),3===qA&&(GA(DA.head),0===DA.lookahead&&(DA.strstart=0,DA.block_start=0,DA.insert=0))),et(j),0===j.avail_out))return DA.last_flush=-1,0}return 4!==qA?0:DA.wrap<=0?1:(2===DA.wrap?(TA(DA,255&j.adler),TA(DA,j.adler>>8&255),TA(DA,j.adler>>16&255),TA(DA,j.adler>>24&255),TA(DA,255&j.total_in),TA(DA,j.total_in>>8&255),TA(DA,j.total_in>>16&255),TA(DA,j.total_in>>24&255)):(it(DA,j.adler>>>16),it(DA,65535&j.adler)),et(j),DA.wrap>0&&(DA.wrap=-DA.wrap),0!==DA.pending?0:1)},I.deflateEnd=function gt(j){var qA;return j&&j.state?42!==(qA=j.state.status)&&69!==qA&&73!==qA&&91!==qA&&103!==qA&&113!==qA&&qA!==X?nA(j,g):(j.state=null,113===qA?nA(j,-3):0):g},I.deflateSetDictionary=function Ft(j,qA){var DA,jA,lt,Lt,yt,Rt,Vt,Le,KA=qA.length;if(!j||!j.state||2===(Lt=(DA=j.state).wrap)||1===Lt&&42!==DA.status||DA.lookahead)return g;for(1===Lt&&(j.adler=o(j.adler,qA,KA,0)),DA.wrap=0,KA>=DA.w_size&&(0===Lt&&(GA(DA.head),DA.strstart=0,DA.block_start=0,DA.insert=0),Le=new c.Buf8(DA.w_size),c.arraySet(Le,qA,KA-DA.w_size,DA.w_size,0),qA=Le,KA=DA.w_size),yt=j.avail_in,Rt=j.next_in,Vt=j.input,j.avail_in=KA,j.next_in=0,j.input=qA,ft(DA);DA.lookahead>=3;){jA=DA.strstart,lt=DA.lookahead-2;do{DA.ins_h=(DA.ins_h<>>=P=v>>>24,p-=P,0==(P=v>>>16&255))sA[B++]=65535&v;else{if(!(16&P)){if(0==(64&P)){v=Y[(65535&v)+(Q&(1<>>=P,p-=P),p<15&&(Q+=eA[h++]<>>=P=v>>>24,p-=P,!(16&(P=v>>>16&255))){if(0==(64&P)){v=y[(65535&v)+(Q&(1<C){i.msg="invalid distance too far back",l.mode=30;break A}if(Q>>>=P,p-=P,F>(P=B-E)){if((P=F-P)>f&&l.sane){i.msg="invalid distance too far back",l.mode=30;break A}if(z=0,U=w,0===g){if(z+=e-P,P2;)sA[B++]=U[z++],sA[B++]=U[z++],sA[B++]=U[z++],S-=3;S&&(sA[B++]=U[z++],S>1&&(sA[B++]=U[z++]))}else{z=B-F;do{sA[B++]=sA[z++],sA[B++]=sA[z++],sA[B++]=sA[z++],S-=3}while(S>2);S&&(sA[B++]=sA[z++],S>1&&(sA[B++]=sA[z++]))}break}}break}}while(h>3)<<3))-1,i.next_in=h-=S,i.next_out=B,i.avail_in=h>>24&255)+(wA>>>8&65280)+((65280&wA)<<8)+((255&wA)<<24)}function mt(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new c.Buf16(320),this.work=new c.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function It(wA){var RA;return wA&&wA.state?(wA.total_in=wA.total_out=(RA=wA.state).total=0,wA.msg="",RA.wrap&&(wA.adler=1&RA.wrap),RA.mode=1,RA.last=0,RA.havedict=0,RA.dmax=32768,RA.head=null,RA.hold=0,RA.bits=0,RA.lencode=RA.lendyn=new c.Buf32(852),RA.distcode=RA.distdyn=new c.Buf32(592),RA.sane=1,RA.back=-1,0):Q}function ft(wA){var RA;return wA&&wA.state?((RA=wA.state).wsize=0,RA.whave=0,RA.wnext=0,It(wA)):Q}function JA(wA,RA){var rA,gt;return!wA||!wA.state||(gt=wA.state,RA<0?(rA=0,RA=-RA):(rA=1+(RA>>4),RA<48&&(RA&=15)),RA&&(RA<8||RA>15))?Q:(null!==gt.window&>.wbits!==RA&&(gt.window=null),gt.wrap=rA,gt.wbits=RA,ft(wA))}function WA(wA,RA){var rA,gt;return wA?(gt=new mt,wA.state=gt,gt.window=null,0!==(rA=JA(wA,RA))&&(wA.state=null),rA):Q}var Mt,ht,xA=!0;function Yt(wA){if(xA){var RA;for(Mt=new c.Buf32(512),ht=new c.Buf32(32),RA=0;RA<144;)wA.lens[RA++]=8;for(;RA<256;)wA.lens[RA++]=9;for(;RA<280;)wA.lens[RA++]=7;for(;RA<288;)wA.lens[RA++]=8;for(h(1,wA.lens,0,288,Mt,0,wA.work,{bits:9}),RA=0;RA<32;)wA.lens[RA++]=5;h(2,wA.lens,0,32,ht,0,wA.work,{bits:5}),xA=!1}wA.lencode=Mt,wA.lenbits=9,wA.distcode=ht,wA.distbits=5}function OA(wA,RA,rA,gt){var Ft,j=wA.state;return null===j.window&&(j.wsize=1<=j.wsize?(c.arraySet(j.window,RA,rA-j.wsize,j.wsize,0),j.wnext=0,j.whave=j.wsize):((Ft=j.wsize-j.wnext)>gt&&(Ft=gt),c.arraySet(j.window,RA,rA-gt,Ft,j.wnext),(gt-=Ft)?(c.arraySet(j.window,RA,rA-gt,gt,0),j.wnext=gt,j.whave=j.wsize):(j.wnext+=Ft,j.wnext===j.wsize&&(j.wnext=0),j.whave>>8&255,rA.check=o(rA.check,Te,2,0),jA=0,lt=0,rA.mode=2;break}if(rA.flags=0,rA.head&&(rA.head.done=!1),!(1&rA.wrap)||(((255&jA)<<8)+(jA>>8))%31){wA.msg="incorrect header check",rA.mode=30;break}if(8!=(15&jA)){wA.msg="unknown compression method",rA.mode=30;break}if(lt-=4,re=8+(15&(jA>>>=4)),0===rA.wbits)rA.wbits=re;else if(re>rA.wbits){wA.msg="invalid window size",rA.mode=30;break}rA.dmax=1<>8&1),512&rA.flags&&(Te[0]=255&jA,Te[1]=jA>>>8&255,rA.check=o(rA.check,Te,2,0)),jA=0,lt=0,rA.mode=3;case 3:for(;lt<32;){if(0===KA)break A;KA--,jA+=gt[j++]<>>8&255,Te[2]=jA>>>16&255,Te[3]=jA>>>24&255,rA.check=o(rA.check,Te,4,0)),jA=0,lt=0,rA.mode=4;case 4:for(;lt<16;){if(0===KA)break A;KA--,jA+=gt[j++]<>8),512&rA.flags&&(Te[0]=255&jA,Te[1]=jA>>>8&255,rA.check=o(rA.check,Te,2,0)),jA=0,lt=0,rA.mode=5;case 5:if(1024&rA.flags){for(;lt<16;){if(0===KA)break A;KA--,jA+=gt[j++]<>>8&255,rA.check=o(rA.check,Te,2,0)),jA=0,lt=0}else rA.head&&(rA.head.extra=null);rA.mode=6;case 6:if(1024&rA.flags&&((Rt=rA.length)>KA&&(Rt=KA),Rt&&(rA.head&&(re=rA.head.extra_len-rA.length,rA.head.extra||(rA.head.extra=new Array(rA.head.extra_len)),c.arraySet(rA.head.extra,gt,j,Rt,re)),512&rA.flags&&(rA.check=o(rA.check,gt,Rt,j)),KA-=Rt,j+=Rt,rA.length-=Rt),rA.length))break A;rA.length=0,rA.mode=7;case 7:if(2048&rA.flags){if(0===KA)break A;Rt=0;do{re=gt[j+Rt++],rA.head&&re&&rA.length<65536&&(rA.head.name+=String.fromCharCode(re))}while(re&&Rt>9&1,rA.head.done=!0),wA.adler=rA.check=0,rA.mode=12;break;case 10:for(;lt<32;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=7<,lt-=7<,rA.mode=27;break}for(;lt<3;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=1)){case 0:rA.mode=14;break;case 1:if(Yt(rA),rA.mode=20,6===RA){jA>>>=2,lt-=2;break A}break;case 2:rA.mode=17;break;case 3:wA.msg="invalid block type",rA.mode=30}jA>>>=2,lt-=2;break;case 14:for(jA>>>=7<,lt-=7<lt<32;){if(0===KA)break A;KA--,jA+=gt[j++]<>>16^65535)){wA.msg="invalid stored block lengths",rA.mode=30;break}if(rA.length=65535&jA,jA=0,lt=0,rA.mode=15,6===RA)break A;case 15:rA.mode=16;case 16:if(Rt=rA.length){if(Rt>KA&&(Rt=KA),Rt>DA&&(Rt=DA),0===Rt)break A;c.arraySet(Ft,gt,j,Rt,qA),KA-=Rt,j+=Rt,DA-=Rt,qA+=Rt,rA.length-=Rt;break}rA.mode=12;break;case 17:for(;lt<14;){if(0===KA)break A;KA--,jA+=gt[j++]<>>=5)),lt-=5,rA.ncode=4+(15&(jA>>>=5)),jA>>>=4,lt-=4,rA.nlen>286||rA.ndist>30){wA.msg="too many length or distance symbols",rA.mode=30;break}rA.have=0,rA.mode=18;case 18:for(;rA.have>>=3,lt-=3}for(;rA.have<19;)rA.lens[bn[rA.have++]]=0;if(rA.lencode=rA.lendyn,rA.lenbits=7,en=h(0,rA.lens,0,19,rA.lencode,0,rA.work,nn={bits:rA.lenbits}),rA.lenbits=nn.bits,en){wA.msg="invalid code lengths set",rA.mode=30;break}rA.have=0,rA.mode=19;case 19:for(;rA.have>>16&255,be=65535&ie,!((te=ie>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>>=te,lt-=te,rA.lens[rA.have++]=be;else{if(16===be){for(Xe=te+2;lt>>=te,lt-=te,0===rA.have){wA.msg="invalid bit length repeat",rA.mode=30;break}re=rA.lens[rA.have-1],Rt=3+(3&jA),jA>>>=2,lt-=2}else if(17===be){for(Xe=te+3;lt>>=te)),jA>>>=3,lt-=3}else{for(Xe=te+7;lt>>=te)),jA>>>=7,lt-=7}if(rA.have+Rt>rA.nlen+rA.ndist){wA.msg="invalid bit length repeat",rA.mode=30;break}for(;Rt--;)rA.lens[rA.have++]=re}}if(30===rA.mode)break;if(0===rA.lens[256]){wA.msg="invalid code -- missing end-of-block",rA.mode=30;break}if(rA.lenbits=9,en=h(1,rA.lens,0,rA.nlen,rA.lencode,0,rA.work,nn={bits:rA.lenbits}),rA.lenbits=nn.bits,en){wA.msg="invalid literal/lengths set",rA.mode=30;break}if(rA.distbits=6,rA.distcode=rA.distdyn,en=h(2,rA.lens,rA.nlen,rA.ndist,rA.distcode,0,rA.work,nn={bits:rA.distbits}),rA.distbits=nn.bits,en){wA.msg="invalid distances set",rA.mode=30;break}if(rA.mode=20,6===RA)break A;case 20:rA.mode=21;case 21:if(KA>=6&&DA>=258){wA.next_out=qA,wA.avail_out=DA,wA.next_in=j,wA.avail_in=KA,rA.hold=jA,rA.bits=lt,l(wA,yt),qA=wA.next_out,Ft=wA.output,DA=wA.avail_out,j=wA.next_in,gt=wA.input,KA=wA.avail_in,jA=rA.hold,lt=rA.bits,12===rA.mode&&(rA.back=-1);break}for(rA.back=0;ye=(ie=rA.lencode[jA&(1<>>16&255,be=65535&ie,!((te=ie>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>Re)])>>>16&255,be=65535&ie,!(Re+(te=ie>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>>=Re,lt-=Re,rA.back+=Re}if(jA>>>=te,lt-=te,rA.back+=te,rA.length=be,0===ye){rA.mode=26;break}if(32&ye){rA.back=-1,rA.mode=12;break}if(64&ye){wA.msg="invalid literal/length code",rA.mode=30;break}rA.extra=15&ye,rA.mode=22;case 22:if(rA.extra){for(Xe=rA.extra;lt>>=rA.extra,lt-=rA.extra,rA.back+=rA.extra}rA.was=rA.length,rA.mode=23;case 23:for(;ye=(ie=rA.distcode[jA&(1<>>16&255,be=65535&ie,!((te=ie>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>Re)])>>>16&255,be=65535&ie,!(Re+(te=ie>>>24)<=lt);){if(0===KA)break A;KA--,jA+=gt[j++]<>>=Re,lt-=Re,rA.back+=Re}if(jA>>>=te,lt-=te,rA.back+=te,64&ye){wA.msg="invalid distance code",rA.mode=30;break}rA.offset=be,rA.extra=15&ye,rA.mode=24;case 24:if(rA.extra){for(Xe=rA.extra;lt>>=rA.extra,lt-=rA.extra,rA.back+=rA.extra}if(rA.offset>rA.dmax){wA.msg="invalid distance too far back",rA.mode=30;break}rA.mode=25;case 25:if(0===DA)break A;if(rA.offset>(Rt=yt-DA)){if((Rt=rA.offset-Rt)>rA.whave&&rA.sane){wA.msg="invalid distance too far back",rA.mode=30;break}Vt=Rt>rA.wnext?rA.wsize-(Rt-=rA.wnext):rA.wnext-Rt,Rt>rA.length&&(Rt=rA.length),Le=rA.window}else Le=Ft,Vt=qA-rA.offset,Rt=rA.length;Rt>DA&&(Rt=DA),DA-=Rt,rA.length-=Rt;do{Ft[qA++]=Le[Vt++]}while(--Rt);0===rA.length&&(rA.mode=21);break;case 26:if(0===DA)break A;Ft[qA++]=rA.length,DA--,rA.mode=21;break;case 27:if(rA.wrap){for(;lt<32;){if(0===KA)break A;KA--,jA|=gt[j++]<=1&&0===QA[z];z--);if(U>z&&(U=z),0===z)return Y[y++]=20971520,Y[y++]=20971520,m.bits=1,0;for(F=1;F0&&(0===g||1!==z))return-1;for(SA[1]=0,P=1;P852||2===g&&BA>592)return 1;for(;;){X=P-sA,d[S]uA?(O=bA[XA+d[S]],$=_[MA+d[S]]):(O=96,$=0),lA=1<>sA)+(cA-=lA)]=X<<24|O<<16|$|0}while(0!==cA);for(lA=1<>=1;if(0!==lA?(pA&=lA-1,pA+=lA):pA=0,S++,0==--QA[P]){if(P===z)break;P=w[Q+d[S]]}if(P>U&&(pA&yA)!==gA){for(0===sA&&(sA=U),FA+=F,q=1<<(eA=P-sA);eA+sA852||2===g&&BA>592)return 1;Y[gA=pA&yA]=U<<24|eA<<16|FA-y|0}}return 0!==pA&&(Y[FA+pA]=4194304|P-sA<<24),m.bits=U,0}},8898:function(T){"use strict";T.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},342:function(T,I,n){"use strict";var c=n(4236);function a(H){for(var k=H.length;--k>=0;)H[k]=0}var g=256,w=286,Q=30,y=15,z=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],U=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],eA=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],sA=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],BA=new Array(576);a(BA);var pA=new Array(60);a(pA);var lA=new Array(512);a(lA);var cA=new Array(256);a(cA);var gA=new Array(29);a(gA);var _,MA,uA,yA=new Array(Q);function FA(H,k,b,CA,wA){this.static_tree=H,this.extra_bits=k,this.extra_base=b,this.elems=CA,this.max_length=wA,this.has_stree=H&&H.length}function QA(H,k){this.dyn_tree=H,this.max_code=0,this.stat_desc=k}function SA(H){return H<256?lA[H]:lA[256+(H>>>7)]}function bA(H,k){H.pending_buf[H.pending++]=255&k,H.pending_buf[H.pending++]=k>>>8&255}function XA(H,k,b){H.bi_valid>16-b?(H.bi_buf|=k<>16-H.bi_valid,H.bi_valid+=b-16):(H.bi_buf|=k<>>=1,b<<=1}while(--k>0);return b>>>1}function hA(H,k,b){var RA,rA,CA=new Array(16),wA=0;for(RA=1;RA<=y;RA++)CA[RA]=wA=wA+b[RA-1]<<1;for(rA=0;rA<=k;rA++){var gt=H[2*rA+1];0!==gt&&(H[2*rA]=O(CA[gt]++,gt))}}function nA(H){var k;for(k=0;k8?bA(H,H.bi_buf):H.bi_valid>0&&(H.pending_buf[H.pending++]=H.bi_buf),H.bi_buf=0,H.bi_valid=0}function et(H,k,b,CA){var wA=2*k,RA=2*b;return H[wA]>1;rA>=1;rA--)st(H,b,rA);j=RA;do{rA=H.heap[1],H.heap[1]=H.heap[H.heap_len--],st(H,b,1),gt=H.heap[1],H.heap[--H.heap_max]=rA,H.heap[--H.heap_max]=gt,b[2*j]=b[2*rA]+b[2*gt],H.depth[j]=(H.depth[rA]>=H.depth[gt]?H.depth[rA]:H.depth[gt])+1,b[2*rA+1]=b[2*gt+1]=j,H.heap[1]=j++,st(H,b,1)}while(H.heap_len>=2);H.heap[--H.heap_max]=H.heap[1],function W(H,k){var j,qA,KA,DA,jA,lt,b=k.dyn_tree,CA=k.max_code,wA=k.stat_desc.static_tree,RA=k.stat_desc.has_stree,rA=k.stat_desc.extra_bits,gt=k.stat_desc.extra_base,Ft=k.stat_desc.max_length,Lt=0;for(DA=0;DA<=y;DA++)H.bl_count[DA]=0;for(b[2*H.heap[H.heap_max]+1]=0,j=H.heap_max+1;j<573;j++)(DA=b[2*b[2*(qA=H.heap[j])+1]+1]+1)>Ft&&(DA=Ft,Lt++),b[2*qA+1]=DA,!(qA>CA)&&(H.bl_count[DA]++,jA=0,qA>=gt&&(jA=rA[qA-gt]),H.opt_len+=(lt=b[2*qA])*(DA+jA),RA&&(H.static_len+=lt*(wA[2*qA+1]+jA)));if(0!==Lt){do{for(DA=Ft-1;0===H.bl_count[DA];)DA--;H.bl_count[DA]--,H.bl_count[DA+1]+=2,H.bl_count[Ft]--,Lt-=2}while(Lt>0);for(DA=Ft;0!==DA;DA--)for(qA=H.bl_count[DA];0!==qA;)!((KA=H.heap[--j])>CA)&&(b[2*KA+1]!==DA&&(H.opt_len+=(DA-b[2*KA+1])*b[2*KA],b[2*KA+1]=DA),qA--)}}(H,k),hA(b,Ft,H.bl_count)}function mt(H,k,b){var CA,RA,wA=-1,rA=k[1],gt=0,Ft=7,j=4;for(0===rA&&(Ft=138,j=3),k[2*(b+1)+1]=65535,CA=0;CA<=b;CA++)RA=rA,rA=k[2*(CA+1)+1],!(++gt>=7;CA0?(2===H.strm.data_type&&(H.strm.data_type=function WA(H){var b,k=4093624447;for(b=0;b<=31;b++,k>>>=1)if(1&k&&0!==H.dyn_ltree[2*b])return 0;if(0!==H.dyn_ltree[18]||0!==H.dyn_ltree[20]||0!==H.dyn_ltree[26])return 1;for(b=32;b=3&&0===H.bl_tree[2*sA[k]+1];k--);return H.opt_len+=3*(k+1)+5+5+4,k}(H),(RA=H.static_len+3+7>>>3)<=(wA=H.opt_len+3+7>>>3)&&(wA=RA)):wA=RA=b+5,b+4<=wA&&-1!==k?Mt(H,k,b,CA):4===H.strategy||RA===wA?(XA(H,2+(CA?1:0),3),TA(H,BA,pA)):(XA(H,4+(CA?1:0),3),function JA(H,k,b,CA){var wA;for(XA(H,k-257,5),XA(H,b-1,5),XA(H,CA-4,4),wA=0;wA>>8&255,H.pending_buf[H.d_buf+2*H.last_lit+1]=255&k,H.pending_buf[H.l_buf+H.last_lit]=255&b,H.last_lit++,0===k?H.dyn_ltree[2*b]++:(H.matches++,k--,H.dyn_ltree[2*(cA[b]+g+1)]++,H.dyn_dtree[2*SA(k)]++),H.last_lit===H.lit_bufsize-1},I._tr_align=function ht(H){XA(H,2,3),X(H,256,BA),function $(H){16===H.bi_valid?(bA(H,H.bi_buf),H.bi_buf=0,H.bi_valid=0):H.bi_valid>=8&&(H.pending_buf[H.pending++]=255&H.bi_buf,H.bi_buf>>=8,H.bi_valid-=8)}(H)}},2292:function(T){"use strict";T.exports=function I(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},4155:function(T){var n,c,I=T.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function l(w){if(n===setTimeout)return setTimeout(w,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(w,0);try{return n(w,0)}catch(Q){try{return n.call(null,w,0)}catch(p){return n.call(this,w,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(w){n=i}try{c="function"==typeof clearTimeout?clearTimeout:o}catch(w){c=o}}();var E,a=[],B=!1,u=-1;function C(){!B||!E||(B=!1,E.length?a=E.concat(a):u=-1,a.length&&e())}function e(){if(!B){var w=l(C);B=!0;for(var Q=a.length;Q;){for(E=a,a=[];++u1)for(var p=1;p=0;--yA){var FA=this.tryEntries[yA],_=FA.completion;if("root"===FA.tryLoc)return gA("end");if(FA.tryLoc<=this.prev){var MA=i.call(FA,"catchLoc"),uA=i.call(FA,"finallyLoc");if(MA&&uA){if(this.prev=0;--gA){var yA=this.tryEntries[gA];if(yA.tryLoc<=this.prev&&i.call(yA,"finallyLoc")&&this.prev=0;--cA){var gA=this.tryEntries[cA];if(gA.finallyLoc===lA)return this.complete(gA.completion,gA.afterLoc),sA(gA),Q}},catch:function(lA){for(var cA=this.tryEntries.length-1;cA>=0;--cA){var gA=this.tryEntries[cA];if(gA.tryLoc===lA){var yA=gA.completion;if("throw"===yA.type){var FA=yA.arg;sA(gA)}return FA}}throw new Error("illegal catch attempt")},delegateYield:function(lA,cA,gA){return this.delegate={iterator:BA(lA),resultName:cA,nextLoc:gA},"next"===this.method&&(this.arg=o),Q}},n}(T.exports);try{regeneratorRuntime=I}catch(n){"object"==typeof globalThis?globalThis.regeneratorRuntime=I:Function("r","regeneratorRuntime = r")(I)}},3697:function(T){"use strict";var I=Object,n=TypeError;T.exports=function(){if(null!=this&&this!==I(this))throw new n("RegExp.prototype.flags getter called on non-object");var i="";return this.hasIndices&&(i+="d"),this.global&&(i+="g"),this.ignoreCase&&(i+="i"),this.multiline&&(i+="m"),this.dotAll&&(i+="s"),this.unicode&&(i+="u"),this.sticky&&(i+="y"),i}},2847:function(T,I,n){"use strict";var c=n(4289),i=n(5559),o=n(3697),l=n(1721),h=n(2753),a=i(l());c(a,{getPolyfill:l,implementation:o,shim:h}),T.exports=a},1721:function(T,I,n){"use strict";var c=n(3697),i=n(4289).supportsDescriptors,o=Object.getOwnPropertyDescriptor;T.exports=function(){if(i&&"gim"===/a/gim.flags){var h=o(RegExp.prototype,"flags");if(h&&"function"==typeof h.get&&"boolean"==typeof/a/.dotAll)return h.get}return c}},2753:function(T,I,n){"use strict";var c=n(4289).supportsDescriptors,i=n(1721),o=Object.getOwnPropertyDescriptor,l=Object.defineProperty,h=TypeError,a=Object.getPrototypeOf,B=/a/;T.exports=function(){if(!c||!a)throw new h("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");var u=i(),C=a(B),e=o(C,"flags");return(!e||e.get!==u)&&l(C,"flags",{configurable:!0,enumerable:!1,get:u}),u}},6099:function(T,I,n){var c=n(8823).Buffer;!function(i){i.parser=function(X,O){return new l(X,O)},i.SAXParser=l,i.SAXStream=e,i.createStream=function C(X,O){return new e(X,O)},i.MAX_BUFFER_LENGTH=65536;var E,o=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];function l(X,O){if(!(this instanceof l))return new l(X,O);var $=this;(function a(X){for(var O=0,$=o.length;O<$;O++)X[o[O]]=""})($),$.q=$.c="",$.bufferCheckPosition=i.MAX_BUFFER_LENGTH,$.opt=O||{},$.opt.lowercase=$.opt.lowercase||$.opt.lowercasetags,$.looseCase=$.opt.lowercase?"toLowerCase":"toUpperCase",$.tags=[],$.closed=$.closedRoot=$.sawRoot=!1,$.tag=$.error=null,$.strict=!!X,$.noscript=!(!X&&!$.opt.noscript),$.state=U.BEGIN,$.strictEntities=$.opt.strictEntities,$.ENTITIES=Object.create($.strictEntities?i.XML_ENTITIES:i.ENTITIES),$.attribList=[],$.opt.xmlns&&($.ns=Object.create(p)),$.trackPosition=!1!==$.opt.position,$.trackPosition&&($.position=$.line=$.column=0),sA($,"onready")}i.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],Object.create||(Object.create=function(X){function O(){}return O.prototype=X,new O}),Object.keys||(Object.keys=function(X){var O=[];for(var $ in X)X.hasOwnProperty($)&&O.push($);return O}),l.prototype={end:function(){cA(this)},write:function XA(X){var O=this;if(this.error)throw this.error;if(O.closed)return lA(O,"Cannot write after close. Assign an onready handler.");if(null===X)return cA(O);"object"==typeof X&&(X=X.toString());for(var $=0,W="";W=bA(X,$++),O.c=W,W;)switch(O.trackPosition&&(O.position++,"\n"===W?(O.line++,O.column=0):O.column++),O.state){case U.BEGIN:if(O.state=U.BEGIN_WHITESPACE,"\ufeff"===W)continue;SA(O,W);continue;case U.BEGIN_WHITESPACE:SA(O,W);continue;case U.TEXT:if(O.sawRoot&&!O.closedRoot){for(var hA=$-1;W&&"<"!==W&&"&"!==W;)(W=bA(X,$++))&&O.trackPosition&&(O.position++,"\n"===W?(O.line++,O.column=0):O.column++);O.textNode+=X.substring(hA,$-1)}"<"!==W||O.sawRoot&&O.closedRoot&&!O.strict?(!v(W)&&(!O.sawRoot||O.closedRoot)&&gA(O,"Text data outside of root node."),"&"===W?O.state=U.TEXT_ENTITY:O.textNode+=W):(O.state=U.OPEN_WAKA,O.startTagPosition=O.position);continue;case U.SCRIPT:"<"===W?O.state=U.SCRIPT_ENDING:O.script+=W;continue;case U.SCRIPT_ENDING:"/"===W?O.state=U.CLOSE_TAG:(O.script+="<"+W,O.state=U.SCRIPT);continue;case U.OPEN_WAKA:"!"===W?(O.state=U.SGML_DECL,O.sgmlDecl=""):v(W)||(F(Y,W)?(O.state=U.OPEN_TAG,O.tagName=W):"/"===W?(O.state=U.CLOSE_TAG,O.tagName=""):"?"===W?(O.state=U.PROC_INST,O.procInstName=O.procInstBody=""):(gA(O,"Unencoded <"),O.startTagPosition+1"===W?(q(O,"onsgmldeclaration",O.sgmlDecl),O.sgmlDecl="",O.state=U.TEXT):(P(W)&&(O.state=U.SGML_DECL_QUOTED),O.sgmlDecl+=W);continue;case U.SGML_DECL_QUOTED:W===O.q&&(O.state=U.SGML_DECL,O.q=""),O.sgmlDecl+=W;continue;case U.DOCTYPE:">"===W?(O.state=U.TEXT,q(O,"ondoctype",O.doctype),O.doctype=!0):(O.doctype+=W,"["===W?O.state=U.DOCTYPE_DTD:P(W)&&(O.state=U.DOCTYPE_QUOTED,O.q=W));continue;case U.DOCTYPE_QUOTED:O.doctype+=W,W===O.q&&(O.q="",O.state=U.DOCTYPE);continue;case U.DOCTYPE_DTD:O.doctype+=W,"]"===W?O.state=U.DOCTYPE:P(W)&&(O.state=U.DOCTYPE_DTD_QUOTED,O.q=W);continue;case U.DOCTYPE_DTD_QUOTED:O.doctype+=W,W===O.q&&(O.state=U.DOCTYPE_DTD,O.q="");continue;case U.COMMENT:"-"===W?O.state=U.COMMENT_ENDING:O.comment+=W;continue;case U.COMMENT_ENDING:"-"===W?(O.state=U.COMMENT_ENDED,O.comment=pA(O.opt,O.comment),O.comment&&q(O,"oncomment",O.comment),O.comment=""):(O.comment+="-"+W,O.state=U.COMMENT);continue;case U.COMMENT_ENDED:">"!==W?(gA(O,"Malformed comment"),O.comment+="--"+W,O.state=U.COMMENT):O.state=U.TEXT;continue;case U.CDATA:"]"===W?O.state=U.CDATA_ENDING:O.cdata+=W;continue;case U.CDATA_ENDING:"]"===W?O.state=U.CDATA_ENDING_2:(O.cdata+="]"+W,O.state=U.CDATA);continue;case U.CDATA_ENDING_2:">"===W?(O.cdata&&q(O,"oncdata",O.cdata),q(O,"onclosecdata"),O.cdata="",O.state=U.TEXT):"]"===W?O.cdata+="]":(O.cdata+="]]"+W,O.state=U.CDATA);continue;case U.PROC_INST:"?"===W?O.state=U.PROC_INST_ENDING:v(W)?O.state=U.PROC_INST_BODY:O.procInstName+=W;continue;case U.PROC_INST_BODY:if(!O.procInstBody&&v(W))continue;"?"===W?O.state=U.PROC_INST_ENDING:O.procInstBody+=W;continue;case U.PROC_INST_ENDING:">"===W?(q(O,"onprocessinginstruction",{name:O.procInstName,body:O.procInstBody}),O.procInstName=O.procInstBody="",O.state=U.TEXT):(O.procInstBody+="?"+W,O.state=U.PROC_INST_BODY);continue;case U.OPEN_TAG:F(y,W)?O.tagName+=W:(yA(O),">"===W?MA(O):"/"===W?O.state=U.OPEN_TAG_SLASH:(v(W)||gA(O,"Invalid character in tag name"),O.state=U.ATTRIB));continue;case U.OPEN_TAG_SLASH:">"===W?(MA(O,!0),uA(O)):(gA(O,"Forward-slash in opening tag not followed by >"),O.state=U.ATTRIB);continue;case U.ATTRIB:if(v(W))continue;">"===W?MA(O):"/"===W?O.state=U.OPEN_TAG_SLASH:F(Y,W)?(O.attribName=W,O.attribValue="",O.state=U.ATTRIB_NAME):gA(O,"Invalid attribute name");continue;case U.ATTRIB_NAME:"="===W?O.state=U.ATTRIB_VALUE:">"===W?(gA(O,"Attribute without value"),O.attribValue=O.attribName,_(O),MA(O)):v(W)?O.state=U.ATTRIB_NAME_SAW_WHITE:F(y,W)?O.attribName+=W:gA(O,"Invalid attribute name");continue;case U.ATTRIB_NAME_SAW_WHITE:if("="===W)O.state=U.ATTRIB_VALUE;else{if(v(W))continue;gA(O,"Attribute without value"),O.tag.attributes[O.attribName]="",O.attribValue="",q(O,"onattribute",{name:O.attribName,value:""}),O.attribName="",">"===W?MA(O):F(Y,W)?(O.attribName=W,O.state=U.ATTRIB_NAME):(gA(O,"Invalid attribute name"),O.state=U.ATTRIB)}continue;case U.ATTRIB_VALUE:if(v(W))continue;P(W)?(O.q=W,O.state=U.ATTRIB_VALUE_QUOTED):(gA(O,"Unquoted attribute value"),O.state=U.ATTRIB_VALUE_UNQUOTED,O.attribValue=W);continue;case U.ATTRIB_VALUE_QUOTED:if(W!==O.q){"&"===W?O.state=U.ATTRIB_VALUE_ENTITY_Q:O.attribValue+=W;continue}_(O),O.q="",O.state=U.ATTRIB_VALUE_CLOSED;continue;case U.ATTRIB_VALUE_CLOSED:v(W)?O.state=U.ATTRIB:">"===W?MA(O):"/"===W?O.state=U.OPEN_TAG_SLASH:F(Y,W)?(gA(O,"No whitespace between attributes"),O.attribName=W,O.attribValue="",O.state=U.ATTRIB_NAME):gA(O,"Invalid attribute name");continue;case U.ATTRIB_VALUE_UNQUOTED:if(!S(W)){"&"===W?O.state=U.ATTRIB_VALUE_ENTITY_U:O.attribValue+=W;continue}_(O),">"===W?MA(O):O.state=U.ATTRIB;continue;case U.CLOSE_TAG:if(O.tagName)">"===W?uA(O):F(y,W)?O.tagName+=W:O.script?(O.script+=""===W?uA(O):gA(O,"Invalid characters in closing tag");continue;case U.TEXT_ENTITY:case U.ATTRIB_VALUE_ENTITY_Q:case U.ATTRIB_VALUE_ENTITY_U:var nA,EA;switch(O.state){case U.TEXT_ENTITY:nA=U.TEXT,EA="textNode";break;case U.ATTRIB_VALUE_ENTITY_Q:nA=U.ATTRIB_VALUE_QUOTED,EA="attribValue";break;case U.ATTRIB_VALUE_ENTITY_U:nA=U.ATTRIB_VALUE_UNQUOTED,EA="attribValue"}";"===W?(O[EA]+=QA(O),O.entity="",O.state=nA):F(O.entity.length?m:d,W)?O.entity+=W:(gA(O,"Invalid character in entity name"),O[EA]+="&"+O.entity+W,O.entity="",O.state=nA);continue;default:throw new Error(O,"Unknown state: "+O.state)}return O.position>=O.bufferCheckPosition&&function h(X){for(var O=Math.max(i.MAX_BUFFER_LENGTH,10),$=0,W=0,hA=o.length;WO)switch(o[W]){case"textNode":BA(X);break;case"cdata":q(X,"oncdata",X.cdata),X.cdata="";break;case"script":q(X,"onscript",X.script),X.script="";break;default:lA(X,"Max buffer length exceeded: "+o[W])}$=Math.max($,vA)}X.bufferCheckPosition=i.MAX_BUFFER_LENGTH-$+X.position}(O),O},resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){!function B(X){BA(X),""!==X.cdata&&(q(X,"oncdata",X.cdata),X.cdata=""),""!==X.script&&(q(X,"onscript",X.script),X.script="")}(this)}};try{E=n(2830).Stream}catch(X){E=function(){}}var u=i.EVENTS.filter(function(X){return"error"!==X&&"end"!==X});function e(X,O){if(!(this instanceof e))return new e(X,O);E.apply(this),this._parser=new l(X,O),this.writable=!0,this.readable=!0;var $=this;this._parser.onend=function(){$.emit("end")},this._parser.onerror=function(W){$.emit("error",W),$._parser.error=null},this._decoder=null,u.forEach(function(W){Object.defineProperty($,"on"+W,{get:function(){return $._parser["on"+W]},set:function(hA){if(!hA)return $.removeAllListeners(W),$._parser["on"+W]=hA,hA;$.on(W,hA)},enumerable:!0,configurable:!1})})}(e.prototype=Object.create(E.prototype,{constructor:{value:e}})).write=function(X){if("function"==typeof c&&"function"==typeof c.isBuffer&&c.isBuffer(X)){if(!this._decoder){var O=n(2553).s;this._decoder=new O("utf8")}X=this._decoder.write(X)}return this._parser.write(X.toString()),this.emit("data",X),!0},e.prototype.end=function(X){return X&&X.length&&this.write(X),this._parser.end(),!0},e.prototype.on=function(X,O){var $=this;return!$._parser["on"+X]&&-1!==u.indexOf(X)&&($._parser["on"+X]=function(){var W=1===arguments.length?[arguments[0]]:Array.apply(null,arguments);W.splice(0,0,X),$.emit.apply($,W)}),E.prototype.on.call($,X,O)};var w="http://www.w3.org/XML/1998/namespace",Q="http://www.w3.org/2000/xmlns/",p={xml:w,xmlns:Q},Y=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,y=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,d=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,m=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/;function v(X){return" "===X||"\n"===X||"\r"===X||"\t"===X}function P(X){return'"'===X||"'"===X}function S(X){return">"===X||v(X)}function F(X,O){return X.test(O)}function z(X,O){return!F(X,O)}var X,O,$,U=0;for(var eA in i.STATE={BEGIN:U++,BEGIN_WHITESPACE:U++,TEXT:U++,TEXT_ENTITY:U++,OPEN_WAKA:U++,SGML_DECL:U++,SGML_DECL_QUOTED:U++,DOCTYPE:U++,DOCTYPE_QUOTED:U++,DOCTYPE_DTD:U++,DOCTYPE_DTD_QUOTED:U++,COMMENT_STARTING:U++,COMMENT:U++,COMMENT_ENDING:U++,COMMENT_ENDED:U++,CDATA:U++,CDATA_ENDING:U++,CDATA_ENDING_2:U++,PROC_INST:U++,PROC_INST_BODY:U++,PROC_INST_ENDING:U++,OPEN_TAG:U++,OPEN_TAG_SLASH:U++,ATTRIB:U++,ATTRIB_NAME:U++,ATTRIB_NAME_SAW_WHITE:U++,ATTRIB_VALUE:U++,ATTRIB_VALUE_QUOTED:U++,ATTRIB_VALUE_CLOSED:U++,ATTRIB_VALUE_UNQUOTED:U++,ATTRIB_VALUE_ENTITY_Q:U++,ATTRIB_VALUE_ENTITY_U:U++,CLOSE_TAG:U++,CLOSE_TAG_SAW_WHITE:U++,SCRIPT:U++,SCRIPT_ENDING:U++},i.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},i.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(i.ENTITIES).forEach(function(X){var O=i.ENTITIES[X],$="number"==typeof O?String.fromCharCode(O):O;i.ENTITIES[X]=$}),i.STATE)i.STATE[i.STATE[eA]]=eA;function sA(X,O,$){X[O]&&X[O]($)}function q(X,O,$){X.textNode&&BA(X),sA(X,O,$)}function BA(X){X.textNode=pA(X.opt,X.textNode),X.textNode&&sA(X,"ontext",X.textNode),X.textNode=""}function pA(X,O){return X.trim&&(O=O.trim()),X.normalize&&(O=O.replace(/\s+/g," ")),O}function lA(X,O){return BA(X),X.trackPosition&&(O+="\nLine: "+X.line+"\nColumn: "+X.column+"\nChar: "+X.c),O=new Error(O),X.error=O,sA(X,"onerror",O),X}function cA(X){return X.sawRoot&&!X.closedRoot&&gA(X,"Unclosed root tag"),X.state!==U.BEGIN&&X.state!==U.BEGIN_WHITESPACE&&X.state!==U.TEXT&&lA(X,"Unexpected end"),BA(X),X.c="",X.closed=!0,sA(X,"onend"),l.call(X,X.strict,X.opt),X}function gA(X,O){if("object"!=typeof X||!(X instanceof l))throw new Error("bad call to strictFail");X.strict&&lA(X,O)}function yA(X){X.strict||(X.tagName=X.tagName[X.looseCase]());var O=X.tags[X.tags.length-1]||X,$=X.tag={name:X.tagName,attributes:{}};X.opt.xmlns&&($.ns=O.ns),X.attribList.length=0,q(X,"onopentagstart",$)}function FA(X,O){var W=X.indexOf(":")<0?["",X]:X.split(":"),hA=W[0],vA=W[1];return O&&"xmlns"===X&&(hA="xmlns",vA=""),{prefix:hA,local:vA}}function _(X){if(X.strict||(X.attribName=X.attribName[X.looseCase]()),-1!==X.attribList.indexOf(X.attribName)||X.tag.attributes.hasOwnProperty(X.attribName))X.attribName=X.attribValue="";else{if(X.opt.xmlns){var O=FA(X.attribName,!0),W=O.local;if("xmlns"===O.prefix)if("xml"===W&&X.attribValue!==w)gA(X,"xml: prefix must be bound to "+w+"\nActual: "+X.attribValue);else if("xmlns"===W&&X.attribValue!==Q)gA(X,"xmlns: prefix must be bound to "+Q+"\nActual: "+X.attribValue);else{var hA=X.tag,vA=X.tags[X.tags.length-1]||X;hA.ns===vA.ns&&(hA.ns=Object.create(vA.ns)),hA.ns[W]=X.attribValue}X.attribList.push([X.attribName,X.attribValue])}else X.tag.attributes[X.attribName]=X.attribValue,q(X,"onattribute",{name:X.attribName,value:X.attribValue});X.attribName=X.attribValue=""}}function MA(X,O){if(X.opt.xmlns){var $=X.tag,W=FA(X.tagName);$.prefix=W.prefix,$.local=W.local,$.uri=$.ns[W.prefix]||"",$.prefix&&!$.uri&&(gA(X,"Unbound namespace prefix: "+JSON.stringify(X.tagName)),$.uri=W.prefix),$.ns&&(X.tags[X.tags.length-1]||X).ns!==$.ns&&Object.keys($.ns).forEach(function(ft){q(X,"onopennamespace",{prefix:ft,uri:$.ns[ft]})});for(var vA=0,nA=X.attribList.length;vA",X.tagName="",void(X.state=U.SCRIPT);q(X,"onscript",X.script),X.script=""}var O=X.tags.length,$=X.tagName;X.strict||($=$[X.looseCase]());for(var W=$;O--&&X.tags[O].name!==W;)gA(X,"Unexpected close tag");if(O<0)return gA(X,"Unmatched closing tag: "+X.tagName),X.textNode+="",void(X.state=U.TEXT);X.tagName=$;for(var vA=X.tags.length;vA-- >O;){var nA=X.tag=X.tags.pop();X.tagName=X.tag.name,q(X,"onclosetag",X.tagName);var EA={};for(var GA in nA.ns)EA[GA]=nA.ns[GA];X.opt.xmlns&&nA.ns!==(X.tags[X.tags.length-1]||X).ns&&Object.keys(nA.ns).forEach(function(st){q(X,"onclosenamespace",{prefix:st,uri:nA.ns[st]})})}0===O&&(X.closedRoot=!0),X.tagName=X.attribValue=X.attribName="",X.attribList.length=0,X.state=U.TEXT}function QA(X){var W,O=X.entity,$=O.toLowerCase(),hA="";return X.ENTITIES[O]?X.ENTITIES[O]:X.ENTITIES[$]?X.ENTITIES[$]:("#"===(O=$).charAt(0)&&("x"===O.charAt(1)?(O=O.slice(2),hA=(W=parseInt(O,16)).toString(16)):(O=O.slice(1),hA=(W=parseInt(O,10)).toString(10))),O=O.replace(/^0+/,""),isNaN(W)||hA.toLowerCase()!==O?(gA(X,"Invalid character entity"),"&"+X.entity+";"):String.fromCodePoint(W))}function SA(X,O){"<"===O?(X.state=U.OPEN_WAKA,X.startTagPosition=X.position):v(O)||(gA(X,"Non-whitespace before first tag."),X.textNode=O,X.state=U.TEXT)}function bA(X,O){var $="";return O1114111||O(st)!==st)throw RangeError("Invalid code point: "+st);st<=65535?hA.push(st):hA.push(55296+((st-=65536)>>10),st%1024+56320),(EA+1===GA||hA.length>W)&&(et+=X.apply(null,hA),hA.length=0)}return et},Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:$,configurable:!0,writable:!0}):String.fromCodePoint=$)}(I)},2830:function(T,I,n){T.exports=o;var c=n(7187).EventEmitter;function o(){c.call(this)}n(5717)(o,c),o.Readable=n(6577),o.Writable=n(323),o.Duplex=n(8656),o.Transform=n(4473),o.PassThrough=n(2366),o.finished=n(1086),o.pipeline=n(6472),o.Stream=o,o.prototype.pipe=function(l,h){var a=this;function B(w){l.writable&&!1===l.write(w)&&a.pause&&a.pause()}function E(){a.readable&&a.resume&&a.resume()}a.on("data",B),l.on("drain",E),!l._isStdio&&(!h||!1!==h.end)&&(a.on("end",C),a.on("close",e));var u=!1;function C(){u||(u=!0,l.end())}function e(){u||(u=!0,"function"==typeof l.destroy&&l.destroy())}function f(w){if(g(),0===c.listenerCount(this,"error"))throw w}function g(){a.removeListener("data",B),l.removeListener("drain",E),a.removeListener("end",C),a.removeListener("close",e),a.removeListener("error",f),l.removeListener("error",f),a.removeListener("end",g),a.removeListener("close",g),l.removeListener("close",g)}return a.on("error",f),l.on("error",f),a.on("end",g),a.on("close",g),l.on("close",g),l.emit("pipe",a),l}},8106:function(T){"use strict";var n={};function c(a,B,E){E||(E=Error);var C=function(e){function f(g,w,Q){return e.call(this,function u(e,f,g){return"string"==typeof B?B:B(e,f,g)}(g,w,Q))||this}return function I(a,B){a.prototype=Object.create(B.prototype),a.prototype.constructor=a,a.__proto__=B}(f,e),f}(E);C.prototype.name=E.name,C.prototype.code=a,n[a]=C}function i(a,B){if(Array.isArray(a)){var E=a.length;return a=a.map(function(u){return String(u)}),E>2?"one of ".concat(B," ").concat(a.slice(0,E-1).join(", "),", or ")+a[E-1]:2===E?"one of ".concat(B," ").concat(a[0]," or ").concat(a[1]):"of ".concat(B," ").concat(a[0])}return"of ".concat(B," ").concat(String(a))}c("ERR_INVALID_OPT_VALUE",function(a,B){return'The value "'+B+'" is invalid for option "'+a+'"'},TypeError),c("ERR_INVALID_ARG_TYPE",function(a,B,E){var u,C;if("string"==typeof B&&function o(a,B,E){return a.substr(!E||E<0?0:+E,B.length)===B}(B,"not ")?(u="must not be",B=B.replace(/^not /,"")):u="must be",function l(a,B,E){return(void 0===E||E>a.length)&&(E=a.length),a.substring(E-B.length,E)===B}(a," argument"))C="The ".concat(a," ").concat(u," ").concat(i(B,"type"));else{var e=function h(a,B,E){return"number"!=typeof E&&(E=0),!(E+B.length>a.length)&&-1!==a.indexOf(B,E)}(a,".")?"property":"argument";C='The "'.concat(a,'" ').concat(e," ").concat(u," ").concat(i(B,"type"))}return C+". Received type ".concat(typeof E)},TypeError),c("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),c("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),c("ERR_STREAM_PREMATURE_CLOSE","Premature close"),c("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),c("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),c("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),c("ERR_STREAM_WRITE_AFTER_END","write after end"),c("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),c("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),c("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),T.exports.q=n},8656:function(T,I,n){"use strict";var c=n(4155),i=Object.keys||function(e){var f=[];for(var g in e)f.push(g);return f};T.exports=E;var o=n(6577),l=n(323);n(5717)(E,o);for(var h=i(l.prototype),a=0;a0)if("string"!=typeof EA&&!TA.objectMode&&Object.getPrototypeOf(EA)!==a.prototype&&(EA=function E(nA){return a.from(nA)}(EA)),et)TA.endEmitted?F(nA,new m):BA(nA,TA,EA,!0);else if(TA.ended)F(nA,new y);else{if(TA.destroyed)return!1;TA.reading=!1,TA.decoder&&!GA?(EA=TA.decoder.write(EA),TA.objectMode||0!==EA.length?BA(nA,TA,EA,!1):MA(nA,TA)):BA(nA,TA,EA,!1)}else et||(TA.reading=!1,MA(nA,TA));return!TA.ended&&(TA.lengthEA.highWaterMark&&(EA.highWaterMark=function cA(nA){return nA>=lA?nA=lA:(nA--,nA|=nA>>>1,nA|=nA>>>2,nA|=nA>>>4,nA|=nA>>>8,nA|=nA>>>16,nA++),nA}(nA)),nA<=EA.length?nA:EA.ended?EA.length:(EA.needReadable=!0,0))}function FA(nA){var EA=nA._readableState;e("emitReadable",EA.needReadable,EA.emittedReadable),EA.needReadable=!1,EA.emittedReadable||(e("emitReadable",EA.flowing),EA.emittedReadable=!0,c.nextTick(_,nA))}function _(nA){var EA=nA._readableState;e("emitReadable_",EA.destroyed,EA.length,EA.ended),!EA.destroyed&&(EA.length||EA.ended)&&(nA.emit("readable"),EA.emittedReadable=!1),EA.needReadable=!EA.flowing&&!EA.ended&&EA.length<=EA.highWaterMark,O(nA)}function MA(nA,EA){EA.readingMore||(EA.readingMore=!0,c.nextTick(uA,nA,EA))}function uA(nA,EA){for(;!EA.reading&&!EA.ended&&(EA.length0,EA.resumeScheduled&&!EA.paused?EA.flowing=!0:nA.listenerCount("data")>0&&nA.resume()}function bA(nA){e("readable nexttick read 0"),nA.read(0)}function X(nA,EA){e("resume",EA.reading),EA.reading||nA.read(0),EA.resumeScheduled=!1,nA.emit("resume"),O(nA),EA.flowing&&!EA.reading&&nA.read(0)}function O(nA){var EA=nA._readableState;for(e("flow",EA.flowing);EA.flowing&&null!==nA.read(););}function $(nA,EA){return 0===EA.length?null:(EA.objectMode?GA=EA.buffer.shift():!nA||nA>=EA.length?(GA=EA.decoder?EA.buffer.join(""):1===EA.buffer.length?EA.buffer.first():EA.buffer.concat(EA.length),EA.buffer.clear()):GA=EA.buffer.consume(nA,EA.decoder),GA);var GA}function W(nA){var EA=nA._readableState;e("endReadable",EA.endEmitted),EA.endEmitted||(EA.ended=!0,c.nextTick(hA,EA,nA))}function hA(nA,EA){if(e("endReadableNT",nA.endEmitted,nA.length),!nA.endEmitted&&0===nA.length&&(nA.endEmitted=!0,EA.readable=!1,EA.emit("end"),nA.autoDestroy)){var GA=EA._writableState;(!GA||GA.autoDestroy&&GA.finished)&&EA.destroy()}}function vA(nA,EA){for(var GA=0,et=nA.length;GA=EA.highWaterMark:EA.length>0)||EA.ended))return e("read: emitReadable",EA.length,EA.ended),0===EA.length&&EA.ended?W(this):FA(this),null;if(0===(nA=gA(nA,EA))&&EA.ended)return 0===EA.length&&W(this),null;var st,et=EA.needReadable;return e("need readable",et),(0===EA.length||EA.length-nA0?$(nA,EA):null)?(EA.needReadable=EA.length<=EA.highWaterMark,nA=0):(EA.length-=nA,EA.awaitDrain=0),0===EA.length&&(EA.ended||(EA.needReadable=!0),GA!==nA&&EA.ended&&W(this)),null!==st&&this.emit("data",st),st},sA.prototype._read=function(nA){F(this,new d("_read()"))},sA.prototype.pipe=function(nA,EA){var GA=this,et=this._readableState;switch(et.pipesCount){case 0:et.pipes=nA;break;case 1:et.pipes=[et.pipes,nA];break;default:et.pipes.push(nA)}et.pipesCount+=1,e("pipe count=%d opts=%j",et.pipesCount,EA);var TA=EA&&!1===EA.end||nA===c.stdout||nA===c.stderr?ht:mt;function it(Yt,OA){e("onunpipe"),Yt===GA&&OA&&!1===OA.hasUnpiped&&(OA.hasUnpiped=!0,function JA(){e("cleanup"),nA.removeListener("close",xA),nA.removeListener("finish",Mt),nA.removeListener("drain",It),nA.removeListener("error",rt),nA.removeListener("unpipe",it),GA.removeListener("end",mt),GA.removeListener("end",ht),GA.removeListener("data",WA),ft=!0,et.awaitDrain&&(!nA._writableState||nA._writableState.needDrain)&&It()}())}function mt(){e("onend"),nA.end()}et.endEmitted?c.nextTick(TA):GA.once("end",TA),nA.on("unpipe",it);var It=function QA(nA){return function(){var GA=nA._readableState;e("pipeOnDrain",GA.awaitDrain),GA.awaitDrain&&GA.awaitDrain--,0===GA.awaitDrain&&l(nA,"data")&&(GA.flowing=!0,O(nA))}}(GA);nA.on("drain",It);var ft=!1;function WA(Yt){e("ondata");var OA=nA.write(Yt);e("dest.write",OA),!1===OA&&((1===et.pipesCount&&et.pipes===nA||et.pipesCount>1&&-1!==vA(et.pipes,nA))&&!ft&&(e("false write response, pause",et.awaitDrain),et.awaitDrain++),GA.pause())}function rt(Yt){e("onerror",Yt),ht(),nA.removeListener("error",rt),0===l(nA,"error")&&F(nA,Yt)}function xA(){nA.removeListener("finish",Mt),ht()}function Mt(){e("onfinish"),nA.removeListener("close",xA),ht()}function ht(){e("unpipe"),GA.unpipe(nA)}return GA.on("data",WA),function U(nA,EA,GA){if("function"==typeof nA.prependListener)return nA.prependListener(EA,GA);nA._events&&nA._events[EA]?Array.isArray(nA._events[EA])?nA._events[EA].unshift(GA):nA._events[EA]=[GA,nA._events[EA]]:nA.on(EA,GA)}(nA,"error",rt),nA.once("close",xA),nA.once("finish",Mt),nA.emit("pipe",GA),et.flowing||(e("pipe resume"),GA.resume()),nA},sA.prototype.unpipe=function(nA){var EA=this._readableState,GA={hasUnpiped:!1};if(0===EA.pipesCount)return this;if(1===EA.pipesCount)return nA&&nA!==EA.pipes||(nA||(nA=EA.pipes),EA.pipes=null,EA.pipesCount=0,EA.flowing=!1,nA&&nA.emit("unpipe",this,GA)),this;if(!nA){var et=EA.pipes,st=EA.pipesCount;EA.pipes=null,EA.pipesCount=0,EA.flowing=!1;for(var TA=0;TA0,!1!==et.flowing&&this.resume()):"readable"===nA&&!et.endEmitted&&!et.readableListening&&(et.readableListening=et.needReadable=!0,et.flowing=!1,et.emittedReadable=!1,e("on readable",et.length,et.reading),et.length?FA(this):et.reading||c.nextTick(bA,this)),GA},sA.prototype.removeListener=function(nA,EA){var GA=h.prototype.removeListener.call(this,nA,EA);return"readable"===nA&&c.nextTick(SA,this),GA},sA.prototype.removeAllListeners=function(nA){var EA=h.prototype.removeAllListeners.apply(this,arguments);return("readable"===nA||void 0===nA)&&c.nextTick(SA,this),EA},sA.prototype.resume=function(){var nA=this._readableState;return nA.flowing||(e("resume"),nA.flowing=!nA.readableListening,function XA(nA,EA){EA.resumeScheduled||(EA.resumeScheduled=!0,c.nextTick(X,nA,EA))}(this,nA)),nA.paused=!1,this},sA.prototype.pause=function(){return e("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(e("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},sA.prototype.wrap=function(nA){var EA=this,GA=this._readableState,et=!1;for(var st in nA.on("end",function(){if(e("wrapped end"),GA.decoder&&!GA.ended){var it=GA.decoder.end();it&&it.length&&EA.push(it)}EA.push(null)}),nA.on("data",function(it){e("wrapped data"),GA.decoder&&(it=GA.decoder.write(it)),GA.objectMode&&null==it||!(GA.objectMode||it&&it.length)||EA.push(it)||(et=!0,nA.pause())}),nA)void 0===this[st]&&"function"==typeof nA[st]&&(this[st]=function(mt){return function(){return nA[mt].apply(nA,arguments)}}(st));for(var TA=0;TA-1))throw new P($);return this._writableState.defaultEncoding=$,this},Object.defineProperty(eA.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(eA.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),eA.prototype._write=function(O,$,W){W(new p("_write()"))},eA.prototype._writev=null,eA.prototype.end=function(O,$,W){var hA=this._writableState;return"function"==typeof O?(W=O,O=null,$=null):"function"==typeof $&&(W=$,$=null),null!=O&&this.write(O,$),hA.corked&&(hA.corked=1,this.uncork()),hA.ending||function XA(O,$,W){$.ending=!0,bA(O,$),W&&($.finished?c.nextTick(W):O.once("finish",W)),$.ended=!0,O.writable=!1}(this,hA,W),this},Object.defineProperty(eA.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(eA.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function($){!this._writableState||(this._writableState.destroyed=$)}}),eA.prototype.destroy=e.destroy,eA.prototype._undestroy=e.undestroy,eA.prototype._destroy=function(O,$){$(O)}},828:function(T,I,n){"use strict";var i,c=n(4155);function o(d,m,v){return m in d?Object.defineProperty(d,m,{value:v,enumerable:!0,configurable:!0,writable:!0}):d[m]=v,d}var l=n(1086),h=Symbol("lastResolve"),a=Symbol("lastReject"),B=Symbol("error"),E=Symbol("ended"),u=Symbol("lastPromise"),C=Symbol("handlePromise"),e=Symbol("stream");function f(d,m){return{value:d,done:m}}function g(d){var m=d[h];if(null!==m){var v=d[e].read();null!==v&&(d[u]=null,d[h]=null,d[a]=null,m(f(v,!1)))}}function w(d){c.nextTick(g,d)}var p=Object.getPrototypeOf(function(){}),Y=Object.setPrototypeOf((o(i={get stream(){return this[e]},next:function(){var m=this,v=this[B];if(null!==v)return Promise.reject(v);if(this[E])return Promise.resolve(f(void 0,!0));if(this[e].destroyed)return new Promise(function(z,U){c.nextTick(function(){m[B]?U(m[B]):z(f(void 0,!0))})});var S,P=this[u];if(P)S=new Promise(function Q(d,m){return function(v,P){d.then(function(){m[E]?v(f(void 0,!0)):m[C](v,P)},P)}}(P,this));else{var F=this[e].read();if(null!==F)return Promise.resolve(f(F,!1));S=new Promise(this[C])}return this[u]=S,S}},Symbol.asyncIterator,function(){return this}),o(i,"return",function(){var m=this;return new Promise(function(v,P){m[e].destroy(null,function(S){S?P(S):v(f(void 0,!0))})})}),i),p);T.exports=function(m){var v,P=Object.create(Y,(o(v={},e,{value:m,writable:!0}),o(v,h,{value:null,writable:!0}),o(v,a,{value:null,writable:!0}),o(v,B,{value:null,writable:!0}),o(v,E,{value:m._readableState.endEmitted,writable:!0}),o(v,C,{value:function(F,z){var U=P[e].read();U?(P[u]=null,P[h]=null,P[a]=null,F(f(U,!1))):(P[h]=F,P[a]=z)},writable:!0}),v));return P[u]=null,l(m,function(S){if(S&&"ERR_STREAM_PREMATURE_CLOSE"!==S.code){var F=P[a];return null!==F&&(P[u]=null,P[h]=null,P[a]=null,F(S)),void(P[B]=S)}var z=P[h];null!==z&&(P[u]=null,P[h]=null,P[a]=null,z(f(void 0,!0))),P[E]=!0}),m.on("readable",w.bind(null,P)),P}},1029:function(T,I,n){"use strict";var c=n(4155);function o(E,u){a(E,u),l(E)}function l(E){E._writableState&&!E._writableState.emitClose||E._readableState&&!E._readableState.emitClose||E.emit("close")}function a(E,u){E.emit("error",u)}T.exports={destroy:function i(E,u){var C=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(u?u(E):E&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,c.nextTick(a,this,E)):c.nextTick(a,this,E)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(E||null,function(g){!u&&g?C._writableState?C._writableState.errorEmitted?c.nextTick(l,C):(C._writableState.errorEmitted=!0,c.nextTick(o,C,g)):c.nextTick(o,C,g):u?(c.nextTick(l,C),u(g)):c.nextTick(l,C)}),this)},undestroy:function h(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function B(E,u){var C=E._readableState,e=E._writableState;C&&C.autoDestroy||e&&e.autoDestroy?E.destroy(u):E.emit("error",u)}}},1086:function(T,I,n){"use strict";var c=n(8106).q.ERR_STREAM_PREMATURE_CLOSE;function o(){}T.exports=function h(a,B,E){if("function"==typeof B)return h(a,null,B);B||(B={}),E=function i(a){var B=!1;return function(){if(!B){B=!0;for(var E=arguments.length,u=new Array(E),C=0;C0,function(S){Y||(Y=S),S&&y.forEach(u),!v&&(y.forEach(u),p(Y))})});return w.reduce(C)}},94:function(T,I,n){"use strict";var c=n(8106).q.ERR_INVALID_OPT_VALUE;T.exports={getHighWaterMark:function o(l,h,a,B){var E=function i(l,h,a){return null!=l.highWaterMark?l.highWaterMark:h?l[a]:null}(h,B,a);if(null!=E){if(!isFinite(E)||Math.floor(E)!==E||E<0)throw new c(B?a:"highWaterMark",E);return Math.floor(E)}return l.objectMode?16:16384}}},3194:function(T,I,n){T.exports=n(7187).EventEmitter},1818:function(T,I,n){var c,o;void 0!==(o="function"==typeof(c=function(){"use strict";function h(e,f,g){var w=new XMLHttpRequest;w.open("GET",e),w.responseType="blob",w.onload=function(){C(w.response,f,g)},w.onerror=function(){console.error("could not download file")},w.send()}function a(e){var f=new XMLHttpRequest;f.open("HEAD",e,!1);try{f.send()}catch(g){}return 200<=f.status&&299>=f.status}function B(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(g){var f=document.createEvent("MouseEvents");f.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(f)}}var E="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n.g&&n.g.global===n.g?n.g:void 0,u=E.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),C=E.saveAs||("object"!=typeof window||window!==E?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype&&!u?function(e,f,g){var w=E.URL||E.webkitURL,Q=document.createElement("a");Q.download=f=f||e.name||"download",Q.rel="noopener","string"==typeof e?(Q.href=e,Q.origin===location.origin?B(Q):a(Q.href)?h(e,f,g):B(Q,Q.target="_blank")):(Q.href=w.createObjectURL(e),setTimeout(function(){w.revokeObjectURL(Q.href)},4e4),setTimeout(function(){B(Q)},0))}:"msSaveOrOpenBlob"in navigator?function(e,f,g){if(f=f||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function l(e,f){return void 0===f?f={autoBom:!1}:"object"!=typeof f&&(console.warn("Deprecated: Expected third argument to be a object"),f={autoBom:!f}),f.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,g),f);else if(a(e))h(e,f,g);else{var w=document.createElement("a");w.href=e,w.target="_blank",setTimeout(function(){B(w)})}}:function(e,f,g,w){if((w=w||open("","_blank"))&&(w.document.title=w.document.body.innerText="downloading..."),"string"==typeof e)return h(e,f,g);var Q="application/octet-stream"===e.type,p=/constructor/i.test(E.HTMLElement)||E.safari,Y=/CriOS\/[\d]+/.test(navigator.userAgent);if((Y||Q&&p||u)&&"undefined"!=typeof FileReader){var y=new FileReader;y.onloadend=function(){var v=y.result;v=Y?v:v.replace(/^data:[^;]*;/,"data:attachment/file;"),w?w.location.href=v:location=v,w=null},y.readAsDataURL(e)}else{var d=E.URL||E.webkitURL,m=d.createObjectURL(e);w?w.location=m:location.href=m,w=null,setTimeout(function(){d.revokeObjectURL(m)},4e4)}});E.saveAs=C.saveAs=C,T.exports=C})?c.apply(I,[]):c)&&(T.exports=o)},2553:function(T,I,n){"use strict";var c=n(1750).Buffer,i=c.isEncoding||function(y){switch((y=""+y)&&y.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function h(y){var d;switch(this.encoding=function l(y){var d=function o(y){if(!y)return"utf8";for(var d;;)switch(y){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return y;default:if(d)return;y=(""+y).toLowerCase(),d=!0}}(y);if("string"!=typeof d&&(c.isEncoding===i||!i(y)))throw new Error("Unknown encoding: "+y);return d||y}(y),this.encoding){case"utf16le":this.text=f,this.end=g,d=4;break;case"utf8":this.fillLast=u,d=4;break;case"base64":this.text=w,this.end=Q,d=3;break;default:return this.write=p,void(this.end=Y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=c.allocUnsafe(d)}function a(y){return y<=127?0:y>>5==6?2:y>>4==14?3:y>>3==30?4:y>>6==2?-1:-2}function u(y){var d=this.lastTotal-this.lastNeed,m=function E(y,d,m){if(128!=(192&d[0]))return y.lastNeed=0,"\ufffd";if(y.lastNeed>1&&d.length>1){if(128!=(192&d[1]))return y.lastNeed=1,"\ufffd";if(y.lastNeed>2&&d.length>2&&128!=(192&d[2]))return y.lastNeed=2,"\ufffd"}}(this,y);return void 0!==m?m:this.lastNeed<=y.length?(y.copy(this.lastChar,d,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(y.copy(this.lastChar,d,0,y.length),void(this.lastNeed-=y.length))}function f(y,d){if((y.length-d)%2==0){var m=y.toString("utf16le",d);if(m){var v=m.charCodeAt(m.length-1);if(v>=55296&&v<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],m.slice(0,-1)}return m}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",d,y.length-1)}function g(y){var d=y&&y.length?this.write(y):"";return this.lastNeed?d+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):d}function w(y,d){var m=(y.length-d)%3;return 0===m?y.toString("base64",d):(this.lastNeed=3-m,this.lastTotal=3,1===m?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",d,y.length-m))}function Q(y){var d=y&&y.length?this.write(y):"";return this.lastNeed?d+this.lastChar.toString("base64",0,3-this.lastNeed):d}function p(y){return y.toString(this.encoding)}function Y(y){return y&&y.length?this.write(y):""}I.s=h,h.prototype.write=function(y){if(0===y.length)return"";var d,m;if(this.lastNeed){if(void 0===(d=this.fillLast(y)))return"";m=this.lastNeed,this.lastNeed=0}else m=0;return m=0?(P>0&&(y.lastNeed=P-1),P):--v=0?(P>0&&(y.lastNeed=P-2),P):--v=0?(P>0&&(2===P?P=0:y.lastNeed=P-3),P):0}(this,y,d);if(!this.lastNeed)return y.toString("utf8",d);this.lastTotal=m;var v=y.length-(m-this.lastNeed);return y.copy(this.lastChar,0,v),y.toString("utf8",d,v)},h.prototype.fillLast=function(y){if(this.lastNeed<=y.length)return y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,this.lastTotal-this.lastNeed,0,y.length),this.lastNeed-=y.length}},311:function(T){function c(){this.table=new Uint16Array(16),this.trans=new Uint16Array(288)}function i(S,F){this.source=S,this.sourceIndex=0,this.tag=0,this.bitcount=0,this.dest=F,this.destLen=0,this.ltree=new c,this.dtree=new c}var o=new c,l=new c,h=new Uint8Array(30),a=new Uint16Array(30),B=new Uint8Array(30),E=new Uint16Array(30),u=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),C=new c,e=new Uint8Array(320);function f(S,F,z,U){var eA,sA;for(eA=0;eA>>=1,F}function Y(S,F,z){if(!F)return z;for(;S.bitcount<24;)S.tag|=S.source[S.sourceIndex++]<>>16-F;return S.tag>>>=F,S.bitcount-=F,U+z}function y(S,F){for(;S.bitcount<24;)S.tag|=S.source[S.sourceIndex++]<>>=1,++eA,z+=F.table[eA],U-=F.table[eA]}while(U>=0);return S.tag=sA,S.bitcount-=eA,F.trans[z+U]}function d(S,F,z){var U,eA,sA,q,BA,pA;for(U=Y(S,5,257),eA=Y(S,5,1),sA=Y(S,4,4),q=0;q<19;++q)e[q]=0;for(q=0;q8;)S.sourceIndex--,S.bitcount-=8;if((F=256*(F=S.source[S.sourceIndex+1])+S.source[S.sourceIndex])!==(65535&~(256*S.source[S.sourceIndex+3]+S.source[S.sourceIndex+2])))return-3;for(S.sourceIndex+=4,U=F;U;--U)S.dest[S.destLen++]=S.source[S.sourceIndex++];return S.bitcount=0,0}(function g(S,F){var z;for(z=0;z<7;++z)S.table[z]=0;for(S.table[7]=24,S.table[8]=152,S.table[9]=112,z=0;z<24;++z)S.trans[z]=256+z;for(z=0;z<144;++z)S.trans[24+z]=z;for(z=0;z<8;++z)S.trans[168+z]=280+z;for(z=0;z<112;++z)S.trans[176+z]=144+z;for(z=0;z<5;++z)F.table[z]=0;for(F.table[5]=32,z=0;z<32;++z)F.trans[z]=z})(o,l),f(h,a,4,3),f(B,E,2,1),h[28]=0,a[28]=258,T.exports=function P(S,F){var U,sA,z=new i(S,F);do{switch(U=p(z),Y(z,2,0)){case 0:sA=v(z);break;case 1:sA=m(z,o,l);break;case 2:d(z,z.ltree,z.dtree),sA=m(z,z.ltree,z.dtree);break;default:sA=-3}if(0!==sA)throw new Error("Data error")}while(!U);return z.destLen=tA.length?{done:!0}:{done:!1,value:tA[M++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function u(tA,G){(null==G||G>tA.length)&&(G=tA.length);for(var V=0,M=new Array(G);V0?iA[0]:"value";if(AA.has(kA))return AA.get(kA);var ct=x.apply(this,iA);return AA.set(kA,ct),ct}return Object.defineProperty(this,G,{value:aA}),aA}}}}v.registerFormat=function(tA){P.push(tA)},v.openSync=function(tA,G){var V=m.readFileSync(tA);return v.create(V,G)},v.open=function(tA,G,V){"function"==typeof G&&(V=G,G=null),m.readFile(tA,function(M,x){if(M)return V(M);try{var R=v.create(x,G)}catch(AA){return V(AA)}return V(null,R)})},v.create=function(tA,G){for(var V=0;V>1},searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16,endCode:new e.LazyArray(e.uint16,"segCount"),reservedPad:new e.Reserved(e.uint16),startCode:new e.LazyArray(e.uint16,"segCount"),idDelta:new e.LazyArray(e.int16,"segCount"),idRangeOffset:new e.LazyArray(e.uint16,"segCount"),glyphIndexArray:new e.LazyArray(e.uint16,function(tA){return(tA.length-tA._currentOffset)/2})},6:{length:e.uint16,language:e.uint16,firstCode:e.uint16,entryCount:e.uint16,glyphIndices:new e.LazyArray(e.uint16,"entryCount")},8:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint16,is32:new e.LazyArray(e.uint8,8192),nGroups:e.uint32,groups:new e.LazyArray(eA,"nGroups")},10:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint32,firstCode:e.uint32,entryCount:e.uint32,glyphIndices:new e.LazyArray(e.uint16,"numChars")},12:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint32,nGroups:e.uint32,groups:new e.LazyArray(eA,"nGroups")},13:{reserved:new e.Reserved(e.uint16),length:e.uint32,language:e.uint32,nGroups:e.uint32,groups:new e.LazyArray(eA,"nGroups")},14:{length:e.uint32,numRecords:e.uint32,varSelectors:new e.LazyArray(lA,"numRecords")}}),gA=new e.Struct({platformID:e.uint16,encodingID:e.uint16,table:new e.Pointer(e.uint32,cA,{type:"parent",lazy:!0})}),yA=new e.Struct({version:e.uint16,numSubtables:e.uint16,tables:new e.Array(gA,"numSubtables")}),FA=new e.Struct({version:e.int32,revision:e.int32,checkSumAdjustment:e.uint32,magicNumber:e.uint32,flags:e.uint16,unitsPerEm:e.uint16,created:new e.Array(e.int32,2),modified:new e.Array(e.int32,2),xMin:e.int16,yMin:e.int16,xMax:e.int16,yMax:e.int16,macStyle:new e.Bitfield(e.uint16,["bold","italic","underline","outline","shadow","condensed","extended"]),lowestRecPPEM:e.uint16,fontDirectionHint:e.int16,indexToLocFormat:e.int16,glyphDataFormat:e.int16}),_=new e.Struct({version:e.int32,ascent:e.int16,descent:e.int16,lineGap:e.int16,advanceWidthMax:e.uint16,minLeftSideBearing:e.int16,minRightSideBearing:e.int16,xMaxExtent:e.int16,caretSlopeRise:e.int16,caretSlopeRun:e.int16,caretOffset:e.int16,reserved:new e.Reserved(e.int16,4),metricDataFormat:e.int16,numberOfMetrics:e.uint16}),MA=new e.Struct({advance:e.uint16,bearing:e.int16}),uA=new e.Struct({metrics:new e.LazyArray(MA,function(tA){return tA.parent.hhea.numberOfMetrics}),bearings:new e.LazyArray(e.int16,function(tA){return tA.parent.maxp.numGlyphs-tA.parent.hhea.numberOfMetrics})}),QA=new e.Struct({version:e.int32,numGlyphs:e.uint16,maxPoints:e.uint16,maxContours:e.uint16,maxComponentPoints:e.uint16,maxComponentContours:e.uint16,maxZones:e.uint16,maxTwilightPoints:e.uint16,maxStorage:e.uint16,maxFunctionDefs:e.uint16,maxInstructionDefs:e.uint16,maxStackElements:e.uint16,maxSizeOfInstructions:e.uint16,maxComponentElements:e.uint16,maxComponentDepth:e.uint16});function SA(tA,G,V){return void 0===V&&(V=0),1===tA&&XA[V]?XA[V]:bA[tA][G]}var bA=[["utf16be","utf16be","utf16be","utf16be","utf16be","utf16be"],["macroman","shift-jis","big5","euc-kr","iso-8859-6","iso-8859-8","macgreek","maccyrillic","symbol","Devanagari","Gurmukhi","Gujarati","Oriya","Bengali","Tamil","Telugu","Kannada","Malayalam","Sinhalese","Burmese","Khmer","macthai","Laotian","Georgian","Armenian","gb-2312-80","Tibetan","Mongolian","Geez","maccenteuro","Vietnamese","Sindhi"],["ascii"],["symbol","utf16be","shift-jis","gb18030","big5","wansung","johab",null,null,null,"utf16be"]],XA={15:"maciceland",17:"macturkish",18:"maccroatian",24:"maccenteuro",25:"maccenteuro",26:"maccenteuro",27:"maccenteuro",28:"maccenteuro",30:"maciceland",37:"macromania",38:"maccenteuro",39:"maccenteuro",40:"maccenteuro",143:"macinuit",146:"macgaelic"},X=[[],{0:"en",30:"fo",60:"ks",90:"rw",1:"fr",31:"fa",61:"ku",91:"rn",2:"de",32:"ru",62:"sd",92:"ny",3:"it",33:"zh",63:"bo",93:"mg",4:"nl",34:"nl-BE",64:"ne",94:"eo",5:"sv",35:"ga",65:"sa",128:"cy",6:"es",36:"sq",66:"mr",129:"eu",7:"da",37:"ro",67:"bn",130:"ca",8:"pt",38:"cz",68:"as",131:"la",9:"no",39:"sk",69:"gu",132:"qu",10:"he",40:"si",70:"pa",133:"gn",11:"ja",41:"yi",71:"or",134:"ay",12:"ar",42:"sr",72:"ml",135:"tt",13:"fi",43:"mk",73:"kn",136:"ug",14:"el",44:"bg",74:"ta",137:"dz",15:"is",45:"uk",75:"te",138:"jv",16:"mt",46:"be",76:"si",139:"su",17:"tr",47:"uz",77:"my",140:"gl",18:"hr",48:"kk",78:"km",141:"af",19:"zh-Hant",49:"az-Cyrl",79:"lo",142:"br",20:"ur",50:"az-Arab",80:"vi",143:"iu",21:"hi",51:"hy",81:"id",144:"gd",22:"th",52:"ka",82:"tl",145:"gv",23:"ko",53:"mo",83:"ms",146:"ga",24:"lt",54:"ky",84:"ms-Arab",147:"to",25:"pl",55:"tg",85:"am",148:"el-polyton",26:"hu",56:"tk",86:"ti",149:"kl",27:"es",57:"mn-CN",87:"om",150:"az",28:"lv",58:"mn",88:"so",151:"nn",29:"se",59:"ps",89:"sw"},[],{1078:"af",16393:"en-IN",1159:"rw",1074:"tn",1052:"sq",6153:"en-IE",1089:"sw",1115:"si",1156:"gsw",8201:"en-JM",1111:"kok",1051:"sk",1118:"am",17417:"en-MY",1042:"ko",1060:"sl",5121:"ar-DZ",5129:"en-NZ",1088:"ky",11274:"es-AR",15361:"ar-BH",13321:"en-PH",1108:"lo",16394:"es-BO",3073:"ar",18441:"en-SG",1062:"lv",13322:"es-CL",2049:"ar-IQ",7177:"en-ZA",1063:"lt",9226:"es-CO",11265:"ar-JO",11273:"en-TT",2094:"dsb",5130:"es-CR",13313:"ar-KW",2057:"en-GB",1134:"lb",7178:"es-DO",12289:"ar-LB",1033:"en",1071:"mk",12298:"es-EC",4097:"ar-LY",12297:"en-ZW",2110:"ms-BN",17418:"es-SV",6145:"ary",1061:"et",1086:"ms",4106:"es-GT",8193:"ar-OM",1080:"fo",1100:"ml",18442:"es-HN",16385:"ar-QA",1124:"fil",1082:"mt",2058:"es-MX",1025:"ar-SA",1035:"fi",1153:"mi",19466:"es-NI",10241:"ar-SY",2060:"fr-BE",1146:"arn",6154:"es-PA",7169:"aeb",3084:"fr-CA",1102:"mr",15370:"es-PY",14337:"ar-AE",1036:"fr",1148:"moh",10250:"es-PE",9217:"ar-YE",5132:"fr-LU",1104:"mn",20490:"es-PR",1067:"hy",6156:"fr-MC",2128:"mn-CN",3082:"es",1101:"as",4108:"fr-CH",1121:"ne",1034:"es",2092:"az-Cyrl",1122:"fy",1044:"nb",21514:"es-US",1068:"az",1110:"gl",2068:"nn",14346:"es-UY",1133:"ba",1079:"ka",1154:"oc",8202:"es-VE",1069:"eu",3079:"de-AT",1096:"or",2077:"sv-FI",1059:"be",1031:"de",1123:"ps",1053:"sv",2117:"bn",5127:"de-LI",1045:"pl",1114:"syr",1093:"bn-IN",4103:"de-LU",1046:"pt",1064:"tg",8218:"bs-Cyrl",2055:"de-CH",2070:"pt-PT",2143:"tzm",5146:"bs",1032:"el",1094:"pa",1097:"ta",1150:"br",1135:"kl",1131:"qu-BO",1092:"tt",1026:"bg",1095:"gu",2155:"qu-EC",1098:"te",1027:"ca",1128:"ha",3179:"qu",1054:"th",3076:"zh-HK",1037:"he",1048:"ro",1105:"bo",5124:"zh-MO",1081:"hi",1047:"rm",1055:"tr",2052:"zh",1038:"hu",1049:"ru",1090:"tk",4100:"zh-SG",1039:"is",9275:"smn",1152:"ug",1028:"zh-TW",1136:"ig",4155:"smj-NO",1058:"uk",1155:"co",1057:"id",5179:"smj",1070:"hsb",1050:"hr",1117:"iu",3131:"se-FI",1056:"ur",4122:"hr-BA",2141:"iu-Latn",1083:"se",2115:"uz-Cyrl",1029:"cs",2108:"ga",2107:"se-SE",1091:"uz",1030:"da",1076:"xh",8251:"sms",1066:"vi",1164:"prs",1077:"zu",6203:"sma-NO",1106:"cy",1125:"dv",1040:"it",7227:"sms",1160:"wo",2067:"nl-BE",2064:"it-CH",1103:"sa",1157:"sah",1043:"nl",1041:"ja",7194:"sr-Cyrl-BA",1144:"ii",3081:"en-AU",1099:"kn",3098:"sr",1130:"yo",10249:"en-BZ",1087:"kk",6170:"sr-Latn-BA",4105:"en-CA",1107:"km",2074:"sr-Latn",9225:"en-029",1158:"quc",1132:"nso"}],O=new e.Struct({platformID:e.uint16,encodingID:e.uint16,languageID:e.uint16,nameID:e.uint16,length:e.uint16,string:new e.Pointer(e.uint16,new e.String("length",function(tA){return SA(tA.platformID,tA.encodingID,tA.languageID)}),{type:"parent",relativeTo:function(G){return G.parent.stringOffset},allowNull:!1})}),$=new e.Struct({length:e.uint16,tag:new e.Pointer(e.uint16,new e.String("length","utf16be"),{type:"parent",relativeTo:function(G){return G.stringOffset}})}),W=new e.VersionedStruct(e.uint16,{0:{count:e.uint16,stringOffset:e.uint16,records:new e.Array(O,"count")},1:{count:e.uint16,stringOffset:e.uint16,records:new e.Array(O,"count"),langTagCount:e.uint16,langTags:new e.Array($,"langTagCount")}}),hA=["copyright","fontFamily","fontSubfamily","uniqueSubfamily","fullName","version","postscriptName","trademark","manufacturer","designer","description","vendorURL","designerURL","license","licenseURL",null,"preferredFamily","preferredSubfamily","compatibleFull","sampleText","postscriptCIDFontName","wwsFamilyName","wwsSubfamilyName"];W.process=function(tA){for(var M,G={},V=B(this.records);!(M=V()).done;){var x=M.value,R=X[x.platformID][x.languageID];null==R&&null!=this.langTags&&x.languageID>=32768&&(R=this.langTags[x.languageID-32768].tag),null==R&&(R=x.platformID+"-"+x.languageID);var AA=x.nameID>=256?"fontFeatures":hA[x.nameID]||x.nameID;null==G[AA]&&(G[AA]={});var aA=G[AA];x.nameID>=256&&(aA=aA[x.nameID]||(aA[x.nameID]={})),("string"==typeof x.string||"string"!=typeof aA[R])&&(aA[R]=x.string)}this.records=G},W.preEncode=function(){if(!Array.isArray(this.records)){this.version=0;var tA=[];for(var G in this.records){var V=this.records[G];"fontFeatures"!==G&&(tA.push({platformID:3,encodingID:1,languageID:1033,nameID:hA.indexOf(G),length:c.byteLength(V.en,"utf16le"),string:V.en}),"postscriptName"===G&&tA.push({platformID:1,encodingID:0,languageID:0,nameID:hA.indexOf(G),length:V.en.length,string:V.en}))}this.records=tA,this.count=tA.length,this.stringOffset=W.size(this,null,!1)}};var vA=new e.VersionedStruct(e.uint16,{header:{xAvgCharWidth:e.int16,usWeightClass:e.uint16,usWidthClass:e.uint16,fsType:new e.Bitfield(e.uint16,[null,"noEmbedding","viewOnly","editable",null,null,null,null,"noSubsetting","bitmapOnly"]),ySubscriptXSize:e.int16,ySubscriptYSize:e.int16,ySubscriptXOffset:e.int16,ySubscriptYOffset:e.int16,ySuperscriptXSize:e.int16,ySuperscriptYSize:e.int16,ySuperscriptXOffset:e.int16,ySuperscriptYOffset:e.int16,yStrikeoutSize:e.int16,yStrikeoutPosition:e.int16,sFamilyClass:e.int16,panose:new e.Array(e.uint8,10),ulCharRange:new e.Array(e.uint32,4),vendorID:new e.String(4),fsSelection:new e.Bitfield(e.uint16,["italic","underscore","negative","outlined","strikeout","bold","regular","useTypoMetrics","wws","oblique"]),usFirstCharIndex:e.uint16,usLastCharIndex:e.uint16},0:{},1:{typoAscender:e.int16,typoDescender:e.int16,typoLineGap:e.int16,winAscent:e.uint16,winDescent:e.uint16,codePageRange:new e.Array(e.uint32,2)},2:{typoAscender:e.int16,typoDescender:e.int16,typoLineGap:e.int16,winAscent:e.uint16,winDescent:e.uint16,codePageRange:new e.Array(e.uint32,2),xHeight:e.int16,capHeight:e.int16,defaultChar:e.uint16,breakChar:e.uint16,maxContent:e.uint16},5:{typoAscender:e.int16,typoDescender:e.int16,typoLineGap:e.int16,winAscent:e.uint16,winDescent:e.uint16,codePageRange:new e.Array(e.uint32,2),xHeight:e.int16,capHeight:e.int16,defaultChar:e.uint16,breakChar:e.uint16,maxContent:e.uint16,usLowerOpticalPointSize:e.uint16,usUpperOpticalPointSize:e.uint16}}),nA=vA.versions;nA[3]=nA[4]=nA[2];var EA=new e.VersionedStruct(e.fixed32,{header:{italicAngle:e.fixed32,underlinePosition:e.int16,underlineThickness:e.int16,isFixedPitch:e.uint32,minMemType42:e.uint32,maxMemType42:e.uint32,minMemType1:e.uint32,maxMemType1:e.uint32},1:{},2:{numberOfGlyphs:e.uint16,glyphNameIndex:new e.Array(e.uint16,"numberOfGlyphs"),names:new e.Array(new e.String(e.uint8))},2.5:{numberOfGlyphs:e.uint16,offsets:new e.Array(e.uint8,"numberOfGlyphs")},3:{},4:{map:new e.Array(e.uint32,function(tA){return tA.parent.maxp.numGlyphs})}}),GA=new e.Struct({controlValues:new e.Array(e.int16)}),et=new e.Struct({instructions:new e.Array(e.uint8)}),st=new e.VersionedStruct("head.indexToLocFormat",{0:{offsets:new e.Array(e.uint16)},1:{offsets:new e.Array(e.uint32)}});st.process=function(){if(0===this.version)for(var tA=0;tA>>=1};var TA=new e.Struct({controlValueProgram:new e.Array(e.uint8)}),it=new e.Array(new e.Buffer),mt=function(){function tA(V){this.type=V}var G=tA.prototype;return G.getCFFVersion=function(M){for(;M&&!M.hdrSize;)M=M.parent;return M?M.version:-1},G.decode=function(M,x){var AA=this.getCFFVersion(x)>=2?M.readUInt32BE():M.readUInt16BE();if(0===AA)return[];var oA,aA=M.readUInt8();if(1===aA)oA=e.uint8;else if(2===aA)oA=e.uint16;else if(3===aA)oA=e.uint24;else{if(4!==aA)throw new Error("Bad offset size in CFFIndex: ".concat(aA," ").concat(M.pos));oA=e.uint32}for(var iA=[],NA=M.pos+(AA+1)*aA-1,kA=oA.decode(M),ct=0;ct>4;if(15===AA)break;x+=ft[AA];var aA=15&R;if(15===aA)break;x+=ft[aA]}return parseFloat(x)}return null},tA.size=function(V){return V.forceLarge&&(V=32768),(0|V)!==V?1+Math.ceil(((""+V).length+1)/2):-107<=V&&V<=107?1:108<=V&&V<=1131||-1131<=V&&V<=-108?2:-32768<=V&&V<=32767?3:5},tA.encode=function(V,M){var x=Number(M);if(M.forceLarge)return V.writeUInt8(29),V.writeInt32BE(x);if((0|x)===x)return-107<=x&&x<=107?V.writeUInt8(x+139):108<=x&&x<=1131?(V.writeUInt8(247+((x-=108)>>8)),V.writeUInt8(255&x)):-1131<=x&&x<=-108?(V.writeUInt8(251+((x=-x-108)>>8)),V.writeUInt8(255&x)):-32768<=x&&x<=32767?(V.writeUInt8(28),V.writeInt16BE(x)):(V.writeUInt8(29),V.writeInt32BE(x));V.writeUInt8(30);for(var R=""+x,AA=0;AAR;)x.pop()},tA}(),null],[19,"Subrs",new xA(new mt,{type:"local"}),null]]),OA=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],H=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ordfeminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls"],b=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],RA=new e.Struct({reserved:new e.Reserved(e.uint16),reqFeatureIndex:e.uint16,featureCount:e.uint16,featureIndexes:new e.Array(e.uint16,"featureCount")}),rA=new e.Struct({tag:new e.String(4),langSys:new e.Pointer(e.uint16,RA,{type:"parent"})}),gt=new e.Struct({defaultLangSys:new e.Pointer(e.uint16,RA),count:e.uint16,langSysRecords:new e.Array(rA,"count")}),Ft=new e.Struct({tag:new e.String(4),script:new e.Pointer(e.uint16,gt,{type:"parent"})}),j=new e.Array(Ft,e.uint16),qA=new e.Struct({featureParams:e.uint16,lookupCount:e.uint16,lookupListIndexes:new e.Array(e.uint16,"lookupCount")}),KA=new e.Struct({tag:new e.String(4),feature:new e.Pointer(e.uint16,qA,{type:"parent"})}),DA=new e.Array(KA,e.uint16),jA=new e.Struct({markAttachmentType:e.uint8,flags:new e.Bitfield(e.uint8,["rightToLeft","ignoreBaseGlyphs","ignoreLigatures","ignoreMarks","useMarkFilteringSet"])});function lt(tA){var G=new e.Struct({lookupType:e.uint16,flags:jA,subTableCount:e.uint16,subTables:new e.Array(new e.Pointer(e.uint16,tA),"subTableCount"),markFilteringSet:new e.Optional(e.uint16,function(V){return V.flags.flags.useMarkFilteringSet})});return new e.LazyArray(new e.Pointer(e.uint16,G),e.uint16)}var Lt=new e.Struct({start:e.uint16,end:e.uint16,startCoverageIndex:e.uint16}),yt=new e.VersionedStruct(e.uint16,{1:{glyphCount:e.uint16,glyphs:new e.Array(e.uint16,"glyphCount")},2:{rangeCount:e.uint16,rangeRecords:new e.Array(Lt,"rangeCount")}}),Rt=new e.Struct({start:e.uint16,end:e.uint16,class:e.uint16}),Vt=new e.VersionedStruct(e.uint16,{1:{startGlyph:e.uint16,glyphCount:e.uint16,classValueArray:new e.Array(e.uint16,"glyphCount")},2:{classRangeCount:e.uint16,classRangeRecord:new e.Array(Rt,"classRangeCount")}}),Le=new e.Struct({a:e.uint16,b:e.uint16,deltaFormat:e.uint16}),ie=new e.Struct({sequenceIndex:e.uint16,lookupListIndex:e.uint16}),te=new e.Struct({glyphCount:e.uint16,lookupCount:e.uint16,input:new e.Array(e.uint16,function(tA){return tA.glyphCount-1}),lookupRecords:new e.Array(ie,"lookupCount")}),ye=new e.Array(new e.Pointer(e.uint16,te),e.uint16),be=new e.Struct({glyphCount:e.uint16,lookupCount:e.uint16,classes:new e.Array(e.uint16,function(tA){return tA.glyphCount-1}),lookupRecords:new e.Array(ie,"lookupCount")}),Re=new e.Array(new e.Pointer(e.uint16,be),e.uint16),vn=new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,yt),ruleSetCount:e.uint16,ruleSets:new e.Array(new e.Pointer(e.uint16,ye),"ruleSetCount")},2:{coverage:new e.Pointer(e.uint16,yt),classDef:new e.Pointer(e.uint16,Vt),classSetCnt:e.uint16,classSet:new e.Array(new e.Pointer(e.uint16,Re),"classSetCnt")},3:{glyphCount:e.uint16,lookupCount:e.uint16,coverages:new e.Array(new e.Pointer(e.uint16,yt),"glyphCount"),lookupRecords:new e.Array(ie,"lookupCount")}}),Dn=new e.Struct({backtrackGlyphCount:e.uint16,backtrack:new e.Array(e.uint16,"backtrackGlyphCount"),inputGlyphCount:e.uint16,input:new e.Array(e.uint16,function(tA){return tA.inputGlyphCount-1}),lookaheadGlyphCount:e.uint16,lookahead:new e.Array(e.uint16,"lookaheadGlyphCount"),lookupCount:e.uint16,lookupRecords:new e.Array(ie,"lookupCount")}),re=new e.Array(new e.Pointer(e.uint16,Dn),e.uint16),en=new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,yt),chainCount:e.uint16,chainRuleSets:new e.Array(new e.Pointer(e.uint16,re),"chainCount")},2:{coverage:new e.Pointer(e.uint16,yt),backtrackClassDef:new e.Pointer(e.uint16,Vt),inputClassDef:new e.Pointer(e.uint16,Vt),lookaheadClassDef:new e.Pointer(e.uint16,Vt),chainCount:e.uint16,chainClassSet:new e.Array(new e.Pointer(e.uint16,re),"chainCount")},3:{backtrackGlyphCount:e.uint16,backtrackCoverage:new e.Array(new e.Pointer(e.uint16,yt),"backtrackGlyphCount"),inputGlyphCount:e.uint16,inputCoverage:new e.Array(new e.Pointer(e.uint16,yt),"inputGlyphCount"),lookaheadGlyphCount:e.uint16,lookaheadCoverage:new e.Array(new e.Pointer(e.uint16,yt),"lookaheadGlyphCount"),lookupCount:e.uint16,lookupRecords:new e.Array(ie,"lookupCount")}}),Te=new e.Fixed(16,"BE",14),nn=new e.Struct({startCoord:Te,peakCoord:Te,endCoord:Te}),Xe=new e.Struct({axisCount:e.uint16,regionCount:e.uint16,variationRegions:new e.Array(new e.Array(nn,"axisCount"),"regionCount")}),bn=new e.Struct({shortDeltas:new e.Array(e.int16,function(tA){return tA.parent.shortDeltaCount}),regionDeltas:new e.Array(e.int8,function(tA){return tA.parent.regionIndexCount-tA.parent.shortDeltaCount}),deltas:function(G){return G.shortDeltas.concat(G.regionDeltas)}}),Gn=new e.Struct({itemCount:e.uint16,shortDeltaCount:e.uint16,regionIndexCount:e.uint16,regionIndexes:new e.Array(e.uint16,"regionIndexCount"),deltaSets:new e.Array(bn,"itemCount")}),Jt=new e.Struct({format:e.uint16,variationRegionList:new e.Pointer(e.uint32,Xe),variationDataCount:e.uint16,itemVariationData:new e.Array(new e.Pointer(e.uint32,Gn),"variationDataCount")}),bt=new e.VersionedStruct(e.uint16,{1:(i={axisIndex:e.uint16},i.axisIndex=e.uint16,i.filterRangeMinValue=Te,i.filterRangeMaxValue=Te,i)}),Xt=new e.Struct({conditionCount:e.uint16,conditionTable:new e.Array(new e.Pointer(e.uint32,bt),"conditionCount")}),oe=new e.Struct({featureIndex:e.uint16,alternateFeatureTable:new e.Pointer(e.uint32,qA,{type:"parent"})}),In=new e.Struct({version:e.fixed32,substitutionCount:e.uint16,substitutions:new e.Array(oe,"substitutionCount")}),dn=new e.Struct({conditionSet:new e.Pointer(e.uint32,Xt,{type:"parent"}),featureTableSubstitution:new e.Pointer(e.uint32,In,{type:"parent"})}),Fn=new e.Struct({majorVersion:e.uint16,minorVersion:e.uint16,featureVariationRecordCount:e.uint32,featureVariationRecords:new e.Array(dn,"featureVariationRecordCount")}),Kn=function(){function tA(V,M){this.predefinedOps=V,this.type=M}var G=tA.prototype;return G.decode=function(M,x,R){return this.predefinedOps[R[0]]?this.predefinedOps[R[0]]:this.type.decode(M,x,R)},G.size=function(M,x){return this.type.size(M,x)},G.encode=function(M,x,R){var AA=this.predefinedOps.indexOf(x);return-1!==AA?AA:this.type.encode(M,x,R)},tA}(),gr=function(tA){function G(){return tA.call(this,"UInt8")||this}return h(G,tA),G.prototype.decode=function(x){return 127&e.uint8.decode(x)},G}(e.Number),Yn=new e.Struct({first:e.uint16,nLeft:e.uint8}),ZA=new e.Struct({first:e.uint16,nLeft:e.uint16}),tt=new Kn([H,["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ringsmall","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"]],new xA(new e.VersionedStruct(new gr,{0:{nCodes:e.uint8,codes:new e.Array(e.uint8,"nCodes")},1:{nRanges:e.uint8,ranges:new e.Array(Yn,"nRanges")}}),{lazy:!0})),UA=function(tA){function G(){return tA.apply(this,arguments)||this}return h(G,tA),G.prototype.decode=function(x,R){for(var AA=f.resolveLength(this.length,x,R),aA=0,oA=[];aA=2?null:M=2||this.isCIDFont)return null;var x=this.topDict.charset;if(Array.isArray(x))return x[M];if(0===M)return".notdef";switch(M-=1,x.version){case 0:return this.string(x.glyphs[M]);case 1:case 2:for(var R=0;R>1;if(M=x[aA+1].first))return x[aA].fd;R=aA+1}}default:throw new Error("Unknown FDSelect version: ".concat(this.topDict.FDSelect.version))}},G.privateDictForGlyph=function(M){if(this.topDict.FDSelect){var x=this.fdForGlyph(M);return this.topDict.FDArray[x]?this.topDict.FDArray[x].Private:null}return this.version<2?this.topDict.Private:this.topDict.FDArray[0].Private},l(tA,[{key:"postscriptName",get:function(){return this.version<2?this.nameIndex[0]:null}},{key:"fullName",get:function(){return this.string(this.topDict.FullName)}},{key:"familyName",get:function(){return this.string(this.topDict.FamilyName)}}]),tA}(),wt=new e.Struct({glyphIndex:e.uint16,vertOriginY:e.int16}),Pt=new e.Struct({majorVersion:e.uint16,minorVersion:e.uint16,defaultVertOriginY:e.int16,numVertOriginYMetrics:e.uint16,metrics:new e.Array(wt,"numVertOriginYMetrics")}),jt=new e.Struct({height:e.uint8,width:e.uint8,horiBearingX:e.int8,horiBearingY:e.int8,horiAdvance:e.uint8,vertBearingX:e.int8,vertBearingY:e.int8,vertAdvance:e.uint8}),Ht=new e.Struct({height:e.uint8,width:e.uint8,bearingX:e.int8,bearingY:e.int8,advance:e.uint8}),ce=new e.Struct({glyph:e.uint16,xOffset:e.int8,yOffset:e.int8}),Zt=function(){},ue=function(){},ve=(new e.VersionedStruct("version",{1:{metrics:Ht,data:Zt},2:{metrics:Ht,data:ue},5:{data:ue},6:{metrics:jt,data:Zt},7:{metrics:jt,data:ue},8:{metrics:Ht,pad:new e.Reserved(e.uint8),numComponents:e.uint16,components:new e.Array(ce,"numComponents")},9:{metrics:jt,pad:new e.Reserved(e.uint8),numComponents:e.uint16,components:new e.Array(ce,"numComponents")},17:{metrics:Ht,dataLen:e.uint32,data:new e.Buffer("dataLen")},18:{metrics:jt,dataLen:e.uint32,data:new e.Buffer("dataLen")},19:{dataLen:e.uint32,data:new e.Buffer("dataLen")}}),new e.Struct({ascender:e.int8,descender:e.int8,widthMax:e.uint8,caretSlopeNumerator:e.int8,caretSlopeDenominator:e.int8,caretOffset:e.int8,minOriginSB:e.int8,minAdvanceSB:e.int8,maxBeforeBL:e.int8,minAfterBL:e.int8,pad:new e.Reserved(e.int8,2)})),Ge=new e.Struct({glyphCode:e.uint16,offset:e.uint16}),Se=new e.VersionedStruct(e.uint16,{header:{imageFormat:e.uint16,imageDataOffset:e.uint32},1:{offsetArray:new e.Array(e.uint32,function(tA){return tA.parent.lastGlyphIndex-tA.parent.firstGlyphIndex+1})},2:{imageSize:e.uint32,bigMetrics:jt},3:{offsetArray:new e.Array(e.uint16,function(tA){return tA.parent.lastGlyphIndex-tA.parent.firstGlyphIndex+1})},4:{numGlyphs:e.uint32,glyphArray:new e.Array(Ge,function(tA){return tA.numGlyphs+1})},5:{imageSize:e.uint32,bigMetrics:jt,numGlyphs:e.uint32,glyphCodeArray:new e.Array(e.uint16,"numGlyphs")}}),xe=new e.Struct({firstGlyphIndex:e.uint16,lastGlyphIndex:e.uint16,subtable:new e.Pointer(e.uint32,Se)}),Ne=new e.Struct({indexSubTableArray:new e.Pointer(e.uint32,new e.Array(xe,1),{type:"parent"}),indexTablesSize:e.uint32,numberOfIndexSubTables:e.uint32,colorRef:e.uint32,hori:ve,vert:ve,startGlyphIndex:e.uint16,endGlyphIndex:e.uint16,ppemX:e.uint8,ppemY:e.uint8,bitDepth:e.uint8,flags:new e.Bitfield(e.uint8,["horizontal","vertical"])}),$e=new e.Struct({version:e.uint32,numSizes:e.uint32,sizes:new e.Array(Ne,"numSizes")}),yn=new e.Struct({ppem:e.uint16,resolution:e.uint16,imageOffsets:new e.Array(new e.Pointer(e.uint32,"void"),function(tA){return tA.parent.parent.maxp.numGlyphs+1})}),an=new e.Struct({version:e.uint16,flags:new e.Bitfield(e.uint16,["renderOutlines"]),numImgTables:e.uint32,imageTables:new e.Array(new e.Pointer(e.uint32,yn),"numImgTables")}),Mn=new e.Struct({gid:e.uint16,paletteIndex:e.uint16}),xn=new e.Struct({gid:e.uint16,firstLayerIndex:e.uint16,numLayers:e.uint16}),qe=new e.Struct({version:e.uint16,numBaseGlyphRecords:e.uint16,baseGlyphRecord:new e.Pointer(e.uint32,new e.Array(xn,"numBaseGlyphRecords")),layerRecords:new e.Pointer(e.uint32,new e.Array(Mn,"numLayerRecords"),{lazy:!0}),numLayerRecords:e.uint16}),fn=new e.Struct({blue:e.uint8,green:e.uint8,red:e.uint8,alpha:e.uint8}),cn=new e.VersionedStruct(e.uint16,{header:{numPaletteEntries:e.uint16,numPalettes:e.uint16,numColorRecords:e.uint16,colorRecords:new e.Pointer(e.uint32,new e.Array(fn,"numColorRecords")),colorRecordIndices:new e.Array(e.uint16,"numPalettes")},0:{},1:{offsetPaletteTypeArray:new e.Pointer(e.uint32,new e.Array(e.uint32,"numPalettes")),offsetPaletteLabelArray:new e.Pointer(e.uint32,new e.Array(e.uint16,"numPalettes")),offsetPaletteEntryLabelArray:new e.Pointer(e.uint32,new e.Array(e.uint16,"numPaletteEntries"))}}),Xn=new e.VersionedStruct(e.uint16,{1:{coordinate:e.int16},2:{coordinate:e.int16,referenceGlyph:e.uint16,baseCoordPoint:e.uint16},3:{coordinate:e.int16,deviceTable:new e.Pointer(e.uint16,Le)}}),Yr=new e.Struct({defaultIndex:e.uint16,baseCoordCount:e.uint16,baseCoords:new e.Array(new e.Pointer(e.uint16,Xn),"baseCoordCount")}),Tr=new e.Struct({tag:new e.String(4),minCoord:new e.Pointer(e.uint16,Xn,{type:"parent"}),maxCoord:new e.Pointer(e.uint16,Xn,{type:"parent"})}),rr=new e.Struct({minCoord:new e.Pointer(e.uint16,Xn),maxCoord:new e.Pointer(e.uint16,Xn),featMinMaxCount:e.uint16,featMinMaxRecords:new e.Array(Tr,"featMinMaxCount")}),Tn=new e.Struct({tag:new e.String(4),minMax:new e.Pointer(e.uint16,rr,{type:"parent"})}),Sn=new e.Struct({baseValues:new e.Pointer(e.uint16,Yr),defaultMinMax:new e.Pointer(e.uint16,rr),baseLangSysCount:e.uint16,baseLangSysRecords:new e.Array(Tn,"baseLangSysCount")}),mA=new e.Struct({tag:new e.String(4),script:new e.Pointer(e.uint16,Sn,{type:"parent"})}),J=new e.Array(mA,e.uint16),N=new e.Array(new e.String(4),e.uint16),Z=new e.Struct({baseTagList:new e.Pointer(e.uint16,N),baseScriptList:new e.Pointer(e.uint16,J)}),K=new e.VersionedStruct(e.uint32,{header:{horizAxis:new e.Pointer(e.uint16,Z),vertAxis:new e.Pointer(e.uint16,Z)},65536:{},65537:{itemVariationStore:new e.Pointer(e.uint32,Jt)}}),fA=new e.Array(e.uint16,e.uint16),IA=new e.Struct({coverage:new e.Pointer(e.uint16,yt),glyphCount:e.uint16,attachPoints:new e.Array(new e.Pointer(e.uint16,fA),"glyphCount")}),At=new e.VersionedStruct(e.uint16,{1:{coordinate:e.int16},2:{caretValuePoint:e.uint16},3:{coordinate:e.int16,deviceTable:new e.Pointer(e.uint16,Le)}}),nt=new e.Array(new e.Pointer(e.uint16,At),e.uint16),ut=new e.Struct({coverage:new e.Pointer(e.uint16,yt),ligGlyphCount:e.uint16,ligGlyphs:new e.Array(new e.Pointer(e.uint16,nt),"ligGlyphCount")}),Qt=new e.Struct({markSetTableFormat:e.uint16,markSetCount:e.uint16,coverage:new e.Array(new e.Pointer(e.uint32,yt),"markSetCount")}),vt=new e.VersionedStruct(e.uint32,{header:{glyphClassDef:new e.Pointer(e.uint16,Vt),attachList:new e.Pointer(e.uint16,IA),ligCaretList:new e.Pointer(e.uint16,ut),markAttachClassDef:new e.Pointer(e.uint16,Vt)},65536:{},65538:{markGlyphSetsDef:new e.Pointer(e.uint16,Qt)},65539:{markGlyphSetsDef:new e.Pointer(e.uint16,Qt),itemVariationStore:new e.Pointer(e.uint32,Jt)}}),xt=new e.Bitfield(e.uint16,["xPlacement","yPlacement","xAdvance","yAdvance","xPlaDevice","yPlaDevice","xAdvDevice","yAdvDevice"]),Tt={xPlacement:e.int16,yPlacement:e.int16,xAdvance:e.int16,yAdvance:e.int16,xPlaDevice:new e.Pointer(e.uint16,Le,{type:"global",relativeTo:function(G){return G.rel}}),yPlaDevice:new e.Pointer(e.uint16,Le,{type:"global",relativeTo:function(G){return G.rel}}),xAdvDevice:new e.Pointer(e.uint16,Le,{type:"global",relativeTo:function(G){return G.rel}}),yAdvDevice:new e.Pointer(e.uint16,Le,{type:"global",relativeTo:function(G){return G.rel}})},Ot=function(){function tA(V){void 0===V&&(V="valueFormat"),this.key=V}var G=tA.prototype;return G.buildStruct=function(M){for(var x=M;!x[this.key]&&x.parent;)x=x.parent;if(x[this.key]){var R={rel:function(){return x._startOffset}},AA=x[this.key];for(var aA in AA)AA[aA]&&(R[aA]=Tt[aA]);return new e.Struct(R)}},G.size=function(M,x){return this.buildStruct(x).size(M,x)},G.decode=function(M,x){var R=this.buildStruct(x).decode(M,x);return delete R.rel,R},tA}(),Kt=new e.Struct({secondGlyph:e.uint16,value1:new Ot("valueFormat1"),value2:new Ot("valueFormat2")}),fe=new e.Array(Kt,e.uint16),Ee=new e.Struct({value1:new Ot("valueFormat1"),value2:new Ot("valueFormat2")}),pe=new e.VersionedStruct(e.uint16,{1:{xCoordinate:e.int16,yCoordinate:e.int16},2:{xCoordinate:e.int16,yCoordinate:e.int16,anchorPoint:e.uint16},3:{xCoordinate:e.int16,yCoordinate:e.int16,xDeviceTable:new e.Pointer(e.uint16,Le),yDeviceTable:new e.Pointer(e.uint16,Le)}}),rn=new e.Struct({entryAnchor:new e.Pointer(e.uint16,pe,{type:"parent"}),exitAnchor:new e.Pointer(e.uint16,pe,{type:"parent"})}),Me=new e.Struct({class:e.uint16,markAnchor:new e.Pointer(e.uint16,pe,{type:"parent"})}),je=new e.Array(Me,e.uint16),wn=new e.Array(new e.Pointer(e.uint16,pe),function(tA){return tA.parent.classCount}),Ke=new e.Array(wn,e.uint16),Cn=new e.Array(new e.Pointer(e.uint16,pe),function(tA){return tA.parent.parent.classCount}),Vn=new e.Array(Cn,e.uint16),qn=new e.Array(new e.Pointer(e.uint16,Vn),e.uint16),Nn=new e.VersionedStruct("lookupType",{1:new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,yt),valueFormat:xt,value:new Ot},2:{coverage:new e.Pointer(e.uint16,yt),valueFormat:xt,valueCount:e.uint16,values:new e.LazyArray(new Ot,"valueCount")}}),2:new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,yt),valueFormat1:xt,valueFormat2:xt,pairSetCount:e.uint16,pairSets:new e.LazyArray(new e.Pointer(e.uint16,fe),"pairSetCount")},2:{coverage:new e.Pointer(e.uint16,yt),valueFormat1:xt,valueFormat2:xt,classDef1:new e.Pointer(e.uint16,Vt),classDef2:new e.Pointer(e.uint16,Vt),class1Count:e.uint16,class2Count:e.uint16,classRecords:new e.LazyArray(new e.LazyArray(Ee,"class2Count"),"class1Count")}}),3:{format:e.uint16,coverage:new e.Pointer(e.uint16,yt),entryExitCount:e.uint16,entryExitRecords:new e.Array(rn,"entryExitCount")},4:{format:e.uint16,markCoverage:new e.Pointer(e.uint16,yt),baseCoverage:new e.Pointer(e.uint16,yt),classCount:e.uint16,markArray:new e.Pointer(e.uint16,je),baseArray:new e.Pointer(e.uint16,Ke)},5:{format:e.uint16,markCoverage:new e.Pointer(e.uint16,yt),ligatureCoverage:new e.Pointer(e.uint16,yt),classCount:e.uint16,markArray:new e.Pointer(e.uint16,je),ligatureArray:new e.Pointer(e.uint16,qn)},6:{format:e.uint16,mark1Coverage:new e.Pointer(e.uint16,yt),mark2Coverage:new e.Pointer(e.uint16,yt),classCount:e.uint16,mark1Array:new e.Pointer(e.uint16,je),mark2Array:new e.Pointer(e.uint16,Ke)},7:vn,8:en,9:{posFormat:e.uint16,lookupType:e.uint16,extension:new e.Pointer(e.uint32,Nn)}});Nn.versions[9].extension.type=Nn;var zr=new e.VersionedStruct(e.uint32,{header:{scriptList:new e.Pointer(e.uint16,j),featureList:new e.Pointer(e.uint16,DA),lookupList:new e.Pointer(e.uint16,new lt(Nn))},65536:{},65537:{featureVariations:new e.Pointer(e.uint32,Fn)}}),Jn=new e.Array(e.uint16,e.uint16),ir=Jn,dr=new e.Struct({glyph:e.uint16,compCount:e.uint16,components:new e.Array(e.uint16,function(tA){return tA.compCount-1})}),_n=new e.Array(new e.Pointer(e.uint16,dr),e.uint16),Br=new e.VersionedStruct("lookupType",{1:new e.VersionedStruct(e.uint16,{1:{coverage:new e.Pointer(e.uint16,yt),deltaGlyphID:e.int16},2:{coverage:new e.Pointer(e.uint16,yt),glyphCount:e.uint16,substitute:new e.LazyArray(e.uint16,"glyphCount")}}),2:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,yt),count:e.uint16,sequences:new e.LazyArray(new e.Pointer(e.uint16,Jn),"count")},3:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,yt),count:e.uint16,alternateSet:new e.LazyArray(new e.Pointer(e.uint16,ir),"count")},4:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,yt),count:e.uint16,ligatureSets:new e.LazyArray(new e.Pointer(e.uint16,_n),"count")},5:vn,6:en,7:{substFormat:e.uint16,lookupType:e.uint16,extension:new e.Pointer(e.uint32,Br)},8:{substFormat:e.uint16,coverage:new e.Pointer(e.uint16,yt),backtrackCoverage:new e.Array(new e.Pointer(e.uint16,yt),"backtrackGlyphCount"),lookaheadGlyphCount:e.uint16,lookaheadCoverage:new e.Array(new e.Pointer(e.uint16,yt),"lookaheadGlyphCount"),glyphCount:e.uint16,substitutes:new e.Array(e.uint16,"glyphCount")}});Br.versions[7].extension.type=Br;var Lr=new e.VersionedStruct(e.uint32,{header:{scriptList:new e.Pointer(e.uint16,j),featureList:new e.Pointer(e.uint16,DA),lookupList:new e.Pointer(e.uint16,new lt(Br))},65536:{},65537:{featureVariations:new e.Pointer(e.uint32,Fn)}}),Wn=new e.Array(e.uint16,e.uint16),br=new e.Struct({shrinkageEnableGSUB:new e.Pointer(e.uint16,Wn),shrinkageDisableGSUB:new e.Pointer(e.uint16,Wn),shrinkageEnableGPOS:new e.Pointer(e.uint16,Wn),shrinkageDisableGPOS:new e.Pointer(e.uint16,Wn),shrinkageJstfMax:new e.Pointer(e.uint16,new lt(Nn)),extensionEnableGSUB:new e.Pointer(e.uint16,Wn),extensionDisableGSUB:new e.Pointer(e.uint16,Wn),extensionEnableGPOS:new e.Pointer(e.uint16,Wn),extensionDisableGPOS:new e.Pointer(e.uint16,Wn),extensionJstfMax:new e.Pointer(e.uint16,new lt(Nn))}),Mr=new e.Array(new e.Pointer(e.uint16,br),e.uint16),Gr=new e.Struct({tag:new e.String(4),jstfLangSys:new e.Pointer(e.uint16,Mr)}),Hr=new e.Struct({extenderGlyphs:new e.Pointer(e.uint16,new e.Array(e.uint16,e.uint16)),defaultLangSys:new e.Pointer(e.uint16,Mr),langSysCount:e.uint16,langSysRecords:new e.Array(Gr,"langSysCount")}),si=new e.Struct({tag:new e.String(4),script:new e.Pointer(e.uint16,Hr,{type:"parent"})}),Jr=new e.Struct({version:e.uint32,scriptCount:e.uint16,scriptList:new e.Array(si,"scriptCount")}),Or=new e.Struct({entry:new(function(){function tA(V){this._size=V}var G=tA.prototype;return G.decode=function(M,x){switch(this.size(0,x)){case 1:return M.readUInt8();case 2:return M.readUInt16BE();case 3:return M.readUInt24BE();case 4:return M.readUInt32BE()}},G.size=function(M,x){return f.resolveLength(this._size,null,x)},tA}())(function(tA){return 1+((48&tA.parent.entryFormat)>>4)}),outerIndex:function(G){return G.entry>>1+(15&G.parent.entryFormat)},innerIndex:function(G){return G.entry&(1<<1+(15&G.parent.entryFormat))-1}}),Zn=new e.Struct({entryFormat:e.uint16,mapCount:e.uint16,mapData:new e.Array(Or,"mapCount")}),Li=new e.Struct({majorVersion:e.uint16,minorVersion:e.uint16,itemVariationStore:new e.Pointer(e.uint32,Jt),advanceWidthMapping:new e.Pointer(e.uint32,Zn),LSBMapping:new e.Pointer(e.uint32,Zn),RSBMapping:new e.Pointer(e.uint32,Zn)}),bi=new e.Struct({format:e.uint32,length:e.uint32,offset:e.uint32}),oo=new e.Struct({reserved:new e.Reserved(e.uint16,2),cbSignature:e.uint32,signature:new e.Buffer("cbSignature")}),aa=new e.Struct({ulVersion:e.uint32,usNumSigs:e.uint16,usFlag:e.uint16,signatures:new e.Array(bi,"usNumSigs"),signatureBlocks:new e.Array(oo,"usNumSigs")}),so=new e.Struct({rangeMaxPPEM:e.uint16,rangeGaspBehavior:new e.Bitfield(e.uint16,["grayscale","gridfit","symmetricSmoothing","symmetricGridfit"])}),lo=new e.Struct({version:e.uint16,numRanges:e.uint16,gaspRanges:new e.Array(so,"numRanges")}),co=new e.Struct({pixelSize:e.uint8,maximumWidth:e.uint8,widths:new e.Array(e.uint8,function(tA){return tA.parent.parent.maxp.numGlyphs})}),go=new e.Struct({version:e.uint16,numRecords:e.int16,sizeDeviceRecord:e.int32,records:new e.Array(co,"numRecords")}),Bo=new e.Struct({left:e.uint16,right:e.uint16,value:e.int16}),oa=new e.Struct({firstGlyph:e.uint16,nGlyphs:e.uint16,offsets:new e.Array(e.uint16,"nGlyphs"),max:function(G){return G.offsets.length&&Math.max.apply(Math,G.offsets)}}),uo=new e.Struct({off:function(G){return G._startOffset-G.parent.parent._startOffset},len:function(G){return G.parent.rowWidth/2*((G.parent.leftTable.max-G.off)/G.parent.rowWidth+1)},values:new e.LazyArray(e.int16,"len")}),sa=new e.VersionedStruct("format",{0:{nPairs:e.uint16,searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16,pairs:new e.Array(Bo,"nPairs")},2:{rowWidth:e.uint16,leftTable:new e.Pointer(e.uint16,oa,{type:"parent"}),rightTable:new e.Pointer(e.uint16,oa,{type:"parent"}),array:new e.Pointer(e.uint16,uo,{type:"parent"})},3:{glyphCount:e.uint16,kernValueCount:e.uint8,leftClassCount:e.uint8,rightClassCount:e.uint8,flags:e.uint8,kernValue:new e.Array(e.int16,"kernValueCount"),leftClass:new e.Array(e.uint8,"glyphCount"),rightClass:new e.Array(e.uint8,"glyphCount"),kernIndex:new e.Array(e.uint8,function(tA){return tA.leftClassCount*tA.rightClassCount})}}),la=new e.VersionedStruct("version",{0:{subVersion:e.uint16,length:e.uint16,format:e.uint8,coverage:new e.Bitfield(e.uint8,["horizontal","minimum","crossStream","override"]),subtable:sa,padding:new e.Reserved(e.uint8,function(tA){return tA.length-tA._currentOffset})},1:{length:e.uint32,coverage:new e.Bitfield(e.uint8,[null,null,null,null,null,"variation","crossStream","vertical"]),format:e.uint8,tupleIndex:e.uint16,subtable:sa,padding:new e.Reserved(e.uint8,function(tA){return tA.length-tA._currentOffset})}}),fo=new e.VersionedStruct(e.uint16,{0:{nTables:e.uint16,tables:new e.Array(la,"nTables")},1:{reserved:new e.Reserved(e.uint16),nTables:e.uint32,tables:new e.Array(la,"nTables")}}),ca=new e.Struct({version:e.uint16,numGlyphs:e.uint16,yPels:new e.Array(e.uint8,"numGlyphs")}),ho=new e.Struct({version:e.uint16,fontNumber:e.uint32,pitch:e.uint16,xHeight:e.uint16,style:e.uint16,typeFamily:e.uint16,capHeight:e.uint16,symbolSet:e.uint16,typeface:new e.String(16),characterComplement:new e.String(8),fileName:new e.String(6),strokeWeight:new e.String(1),widthType:new e.String(1),serifStyle:e.uint8,reserved:new e.Reserved(e.uint8)}),Eo=new e.Struct({bCharSet:e.uint8,xRatio:e.uint8,yStartRatio:e.uint8,yEndRatio:e.uint8}),wo=new e.Struct({yPelHeight:e.uint16,yMax:e.int16,yMin:e.int16}),Co=new e.Struct({recs:e.uint16,startsz:e.uint8,endsz:e.uint8,entries:new e.Array(wo,"recs")}),Qo=new e.Struct({version:e.uint16,numRecs:e.uint16,numRatios:e.uint16,ratioRanges:new e.Array(Eo,"numRatios"),offsets:new e.Array(e.uint16,"numRatios"),groups:new e.Array(Co,"numRecs")}),Mo=new e.Struct({version:e.uint16,ascent:e.int16,descent:e.int16,lineGap:e.int16,advanceHeightMax:e.int16,minTopSideBearing:e.int16,minBottomSideBearing:e.int16,yMaxExtent:e.int16,caretSlopeRise:e.int16,caretSlopeRun:e.int16,caretOffset:e.int16,reserved:new e.Reserved(e.int16,4),metricDataFormat:e.int16,numberOfMetrics:e.uint16}),po=new e.Struct({advance:e.uint16,bearing:e.int16}),Io=new e.Struct({metrics:new e.LazyArray(po,function(tA){return tA.parent.vhea.numberOfMetrics}),bearings:new e.LazyArray(e.int16,function(tA){return tA.parent.maxp.numGlyphs-tA.parent.vhea.numberOfMetrics})}),ga=new e.Fixed(16,"BE",14),mo=new e.Struct({fromCoord:ga,toCoord:ga}),vo=new e.Struct({pairCount:e.uint16,correspondence:new e.Array(mo,"pairCount")}),Do=new e.Struct({version:e.fixed32,axisCount:e.uint32,segment:new e.Array(vo,"axisCount")}),yo=function(){function tA(V,M,x){this.type=V,this.stream=M,this.parent=x,this.base=this.stream.pos,this._items=[]}var G=tA.prototype;return G.getItem=function(M){if(null==this._items[M]){var x=this.stream.pos;this.stream.pos=this.base+this.type.size(null,this.parent)*M,this._items[M]=this.type.decode(this.stream,this.parent),this.stream.pos=x}return this._items[M]},G.inspect=function(){return"[UnboundedArray ".concat(this.type.constructor.name,"]")},tA}(),$n=function(tA){function G(M){return tA.call(this,M,0)||this}return h(G,tA),G.prototype.decode=function(x,R){return new yo(this.type,x,R)},G}(e.Array),ur=function(G){void 0===G&&(G=e.uint16),G=new(function(){function aA(iA){this.type=iA}var oA=aA.prototype;return oA.decode=function(NA,kA){return this.type.decode(NA,kA=kA.parent.parent)},oA.size=function(NA,kA){return this.type.size(NA,kA=kA.parent.parent)},oA.encode=function(NA,kA,ct){return this.type.encode(NA,kA,ct=ct.parent.parent)},aA}())(G);var M=new e.Struct({unitSize:e.uint16,nUnits:e.uint16,searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16}),x=new e.Struct({lastGlyph:e.uint16,firstGlyph:e.uint16,value:G}),R=new e.Struct({lastGlyph:e.uint16,firstGlyph:e.uint16,values:new e.Pointer(e.uint16,new e.Array(G,function(aA){return aA.lastGlyph-aA.firstGlyph+1}),{type:"parent"})}),AA=new e.Struct({glyph:e.uint16,value:G});return new e.VersionedStruct(e.uint16,{0:{values:new $n(G)},2:{binarySearchHeader:M,segments:new e.Array(x,function(aA){return aA.binarySearchHeader.nUnits})},4:{binarySearchHeader:M,segments:new e.Array(R,function(aA){return aA.binarySearchHeader.nUnits})},6:{binarySearchHeader:M,segments:new e.Array(AA,function(aA){return aA.binarySearchHeader.nUnits})},8:{firstGlyph:e.uint16,count:e.uint16,values:new e.Array(G,"count")}})};function li(tA,G){void 0===tA&&(tA={}),void 0===G&&(G=e.uint16);var V=Object.assign({newState:e.uint16,flags:e.uint16},tA),M=new e.Struct(V),x=new $n(new e.Array(e.uint16,function(AA){return AA.nClasses}));return new e.Struct({nClasses:e.uint32,classTable:new e.Pointer(e.uint32,new ur(G)),stateArray:new e.Pointer(e.uint32,x),entryTable:new e.Pointer(e.uint32,new $n(M))})}var Fo=new e.VersionedStruct("format",{0:{deltas:new e.Array(e.int16,32)},1:{deltas:new e.Array(e.int16,32),mappingData:new ur(e.uint16)},2:{standardGlyph:e.uint16,controlPoints:new e.Array(e.uint16,32)},3:{standardGlyph:e.uint16,controlPoints:new e.Array(e.uint16,32),mappingData:new ur(e.uint16)}}),Ba=new e.Struct({version:e.fixed32,format:e.uint16,defaultBaseline:e.uint16,subtable:Fo}),Yo=new e.Struct({setting:e.uint16,nameIndex:e.int16,name:function(G){return G.parent.parent.parent.name.records.fontFeatures[G.nameIndex]}}),ua=new e.Struct({feature:e.uint16,nSettings:e.uint16,settingTable:new e.Pointer(e.uint32,new e.Array(Yo,"nSettings"),{type:"parent"}),featureFlags:new e.Bitfield(e.uint8,[null,null,null,null,null,null,"hasDefault","exclusive"]),defaultSetting:e.uint8,nameIndex:e.int16,name:function(G){return G.parent.parent.name.records.fontFeatures[G.nameIndex]}}),Sr=new e.Struct({version:e.fixed32,featureNameCount:e.uint16,reserved1:new e.Reserved(e.uint16),reserved2:new e.Reserved(e.uint32),featureNames:new e.Array(ua,"featureNameCount")}),or=new e.Struct({axisTag:new e.String(4),minValue:e.fixed32,defaultValue:e.fixed32,maxValue:e.fixed32,flags:e.uint16,nameID:e.uint16,name:function(G){return G.parent.parent.name.records.fontFeatures[G.nameID]}}),pr=new e.Struct({nameID:e.uint16,name:function(G){return G.parent.parent.name.records.fontFeatures[G.nameID]},flags:e.uint16,coord:new e.Array(e.fixed32,function(tA){return tA.parent.axisCount}),postscriptNameID:new e.Optional(e.uint16,function(tA){return tA.parent.instanceSize-tA._currentOffset>0})}),To=new e.Struct({version:e.fixed32,offsetToData:e.uint16,countSizePairs:e.uint16,axisCount:e.uint16,axisSize:e.uint16,instanceCount:e.uint16,instanceSize:e.uint16,axis:new e.Array(or,"axisCount"),instance:new e.Array(pr,"instanceCount")}),So=new e.Fixed(16,"BE",14),No=function(){function tA(){}return tA.decode=function(V,M){return M.flags?V.readUInt32BE():2*V.readUInt16BE()},tA}(),Uo=new e.Struct({version:e.uint16,reserved:new e.Reserved(e.uint16),axisCount:e.uint16,globalCoordCount:e.uint16,globalCoords:new e.Pointer(e.uint32,new e.Array(new e.Array(So,"axisCount"),"globalCoordCount")),glyphCount:e.uint16,flags:e.uint16,offsetToData:e.uint32,offsets:new e.Array(new e.Pointer(No,"void",{relativeTo:function(G){return G.offsetToData},allowNull:!1}),function(tA){return tA.glyphCount+1})}),Po=new e.Struct({length:e.uint16,coverage:e.uint16,subFeatureFlags:e.uint32,stateTable:new function xo(tA,G){void 0===tA&&(tA={}),void 0===G&&(G=e.uint16);var V=new e.Struct({version:function(){return 8},firstGlyph:e.uint16,values:new e.Array(e.uint8,e.uint16)}),M=Object.assign({newStateOffset:e.uint16,newState:function(oA){return(oA.newStateOffset-(oA.parent.stateArray.base-oA.parent._startOffset))/oA.parent.nClasses},flags:e.uint16},tA),x=new e.Struct(M),R=new $n(new e.Array(e.uint8,function(aA){return aA.nClasses}));return new e.Struct({nClasses:e.uint16,classTable:new e.Pointer(e.uint16,V),stateArray:new e.Pointer(e.uint16,R),entryTable:new e.Pointer(e.uint16,new $n(x))})}}),Ro=new e.Struct({justClass:e.uint32,beforeGrowLimit:e.fixed32,beforeShrinkLimit:e.fixed32,afterGrowLimit:e.fixed32,afterShrinkLimit:e.fixed32,growFlags:e.uint16,shrinkFlags:e.uint16}),zo=new e.Array(Ro,e.uint32),Lo=new e.VersionedStruct("actionType",{0:{lowerLimit:e.fixed32,upperLimit:e.fixed32,order:e.uint16,glyphs:new e.Array(e.uint16,e.uint16)},1:{addGlyph:e.uint16},2:{substThreshold:e.fixed32,addGlyph:e.uint16,substGlyph:e.uint16},3:{},4:{variationAxis:e.uint32,minimumLimit:e.fixed32,noStretchValue:e.fixed32,maximumLimit:e.fixed32},5:{flags:e.uint16,glyph:e.uint16}}),bo=new e.Struct({actionClass:e.uint16,actionType:e.uint16,actionLength:e.uint32,actionData:Lo,padding:new e.Reserved(e.uint8,function(tA){return tA.actionLength-tA._currentOffset})}),Go=new e.Array(bo,e.uint32),Ho=new e.Struct({lookupTable:new ur(new e.Pointer(e.uint16,Go))}),fa=new e.Struct({classTable:new e.Pointer(e.uint16,Po,{type:"parent"}),wdcOffset:e.uint16,postCompensationTable:new e.Pointer(e.uint16,Ho,{type:"parent"}),widthDeltaClusters:new ur(new e.Pointer(e.uint16,zo,{type:"parent",relativeTo:function(G){return G.wdcOffset}}))}),Jo=new e.Struct({version:e.uint32,format:e.uint16,horizontal:new e.Pointer(e.uint16,fa),vertical:new e.Pointer(e.uint16,fa)}),Oo={action:e.uint16},ko={markIndex:e.uint16,currentIndex:e.uint16},ha={currentInsertIndex:e.uint16,markedInsertIndex:e.uint16},jo=new e.Struct({items:new $n(new e.Pointer(e.uint32,new ur))}),Ko=new e.VersionedStruct("type",{0:{stateTable:new li},1:{stateTable:new li(ko),substitutionTable:new e.Pointer(e.uint32,jo)},2:{stateTable:new li(Oo),ligatureActions:new e.Pointer(e.uint32,new $n(e.uint32)),components:new e.Pointer(e.uint32,new $n(e.uint16)),ligatureList:new e.Pointer(e.uint32,new $n(e.uint16))},4:{lookupTable:new ur},5:{stateTable:new li(ha),insertionActions:new e.Pointer(e.uint32,new $n(e.uint16))}}),Vo=new e.Struct({length:e.uint32,coverage:e.uint24,type:e.uint8,subFeatureFlags:e.uint32,table:Ko,padding:new e.Reserved(e.uint8,function(tA){return tA.length-tA._currentOffset})}),Wo=new e.Struct({featureType:e.uint16,featureSetting:e.uint16,enableFlags:e.uint32,disableFlags:e.uint32}),Zo=new e.Struct({defaultFlags:e.uint32,chainLength:e.uint32,nFeatureEntries:e.uint32,nSubtables:e.uint32,features:new e.Array(Wo,"nFeatureEntries"),subtables:new e.Array(Vo,"nSubtables")}),Xo=new e.Struct({version:e.uint16,unused:new e.Reserved(e.uint16),nChains:e.uint32,chains:new e.Array(Zo,"nChains")}),qo=new e.Struct({left:e.int16,top:e.int16,right:e.int16,bottom:e.int16}),_o=new e.Struct({version:e.fixed32,format:e.uint16,lookupTable:new ur(qo)}),se={};se.cmap=yA,se.head=FA,se.hhea=_,se.hmtx=uA,se.maxp=QA,se.name=W,se["OS/2"]=vA,se.post=EA,se.fpgm=et,se.loca=st,se.prep=TA,se["cvt "]=GA,se.glyf=it,se["CFF "]=ne,se.CFF2=ne,se.VORG=Pt,se.EBLC=$e,se.CBLC=se.EBLC,se.sbix=an,se.COLR=qe,se.CPAL=cn,se.BASE=K,se.GDEF=vt,se.GPOS=zr,se.GSUB=Lr,se.JSTF=Jr,se.HVAR=Li,se.DSIG=aa,se.gasp=lo,se.hdmx=go,se.kern=fo,se.LTSH=ca,se.PCLT=ho,se.VDMX=Qo,se.vhea=Mo,se.vmtx=Io,se.avar=Do,se.bsln=Ba,se.feat=Sr,se.fvar=To,se.gvar=Uo,se.just=Jo,se.morx=Xo,se.opbd=_o;var fr,$o=new e.Struct({tag:new e.String(4),checkSum:e.uint32,offset:new e.Pointer(e.uint32,"void",{type:"global"}),length:e.uint32}),ci=new e.Struct({tag:new e.String(4),numTables:e.uint16,searchRange:e.uint16,entrySelector:e.uint16,rangeShift:e.uint16,tables:new e.Array($o,"numTables")});function gi(tA,G){for(var V=0,M=tA.length-1;V<=M;){var x=V+M>>1,R=G(tA[x]);if(R<0)M=x-1;else{if(!(R>0))return x;V=x+1}}return-1}function Nr(tA,G){for(var V=[];tA>1;if(MoA.endCode.get(kA))){var ct=oA.idRangeOffset.get(kA),_A=void 0;if(0===ct)_A=M+oA.idDelta.get(kA);else{var Bt=ct/2+(M-oA.startCode.get(kA))-(oA.segCount-kA);0!==(_A=oA.glyphIndexArray.get(Bt)||0)&&(_A+=oA.idDelta.get(kA))}return 65535&_A}iA=kA+1}}return 0;case 8:throw new Error("TODO: cmap format 8");case 6:case 10:return oA.glyphIndices.get(M-oA.firstCode)||0;case 12:case 13:for(var pt=0,Dt=oA.nGroups-1;pt<=Dt;){var Gt=pt+Dt>>1,$t=oA.groups.get(Gt);if(M<$t.startCharCode)Dt=Gt-1;else{if(!(M>$t.endCharCode))return 12===oA.version?$t.glyphID+(M-$t.startCharCode):$t.glyphID;pt=Gt+1}}return 0;case 14:throw new Error("TODO: cmap format 14");default:throw new Error("Unknown cmap format ".concat(oA.version))}},G.getVariationSelector=function(M,x){if(!this.uvs)return 0;var R=this.uvs.varSelectors.toArray(),AA=gi(R,function(oA){return x-oA.varSelector}),aA=R[AA];return-1!==AA&&aA.defaultUVS&&(AA=gi(aA.defaultUVS,function(oA){return MoA.startUnicodeValue+oA.additionalCount?1:0})),-1!==AA&&aA.nonDefaultUVS&&-1!==(AA=gi(aA.nonDefaultUVS,function(oA){return M-oA.unicodeValue}))?aA.nonDefaultUVS[AA].glyphID:0},G.getCharacterSet=function(){var M=this.cmap;switch(M.version){case 0:return Nr(0,M.codeMap.length);case 4:for(var x=[],R=M.endCode.toArray(),AA=0;AA=_t.glyphID&&M<=_t.glyphID+(_t.endCharCode-_t.startCharCode)&&Dt.push(_t.startCharCode+(M-_t.glyphID))}return Dt;case 13:for(var we,ae=[],Be=B(x.groups.toArray());!(we=Be()).done;){var Ce=we.value;M===Ce.glyphID&&ae.push.apply(ae,Nr(Ce.startCharCode,Ce.endCharCode+1))}return ae;default:throw new Error("Unknown cmap format ".concat(x.version))}},tA}()).prototype,"getCharacterSet",[z],Object.getOwnPropertyDescriptor(fr.prototype,"getCharacterSet"),fr.prototype),F(fr.prototype,"codePointsForGlyph",[z],Object.getOwnPropertyDescriptor(fr.prototype,"codePointsForGlyph"),fr.prototype),fr),ui=function(){function tA(V){this.kern=V.kern}var G=tA.prototype;return G.process=function(M,x){for(var R=0;R=0&&(iA=NA.pairs[kA].value);break;case 2:var _A=0;x>=NA.rightTable.firstGlyph&&x=NA.leftTable.firstGlyph&&M=NA.glyphCount||x>=NA.glyphCount)return 0;iA=NA.kernValue[NA.kernIndex[NA.leftClass[M]*NA.rightClassCount+NA.rightClass[x]]];break;default:throw new Error("Unsupported kerning sub-table format ".concat(oA.format))}oA.coverage.override?R=iA:R+=iA}}return R},tA}(),As=function(){function tA(V){this.font=V}var G=tA.prototype;return G.positionGlyphs=function(M,x){for(var R=0,AA=0,aA=0;aA1&&(oA.minX+=(aA.codePoints.length-1)*oA.width/aA.codePoints.length);for(var iA=-x[R].xAdvance,NA=0,kA=this.font.unitsPerEm/16,ct=R+1;ct<=AA;ct++){var _A=M[ct],Bt=_A.cbox,pt=x[ct],Dt=this.getCombiningClass(_A.codePoints[0]);if("Not_Reordered"!==Dt){switch(pt.xOffset=pt.yOffset=0,Dt){case"Double_Above":case"Double_Below":pt.xOffset+=oA.minX-Bt.width/2-Bt.minX;break;case"Attached_Below_Left":case"Below_Left":case"Above_Left":pt.xOffset+=oA.minX-Bt.minX;break;case"Attached_Above_Right":case"Below_Right":case"Above_Right":pt.xOffset+=oA.maxX-Bt.width-Bt.minX;break;default:pt.xOffset+=oA.minX+(oA.width-Bt.width)/2-Bt.minX}switch(Dt){case"Double_Below":case"Below_Left":case"Below":case"Below_Right":case"Attached_Below_Left":case"Attached_Below":("Attached_Below_Left"===Dt||"Attached_Below"===Dt)&&(oA.minY+=kA),pt.yOffset=-oA.minY-Bt.maxY,oA.minY+=Bt.height;break;case"Double_Above":case"Above_Left":case"Above":case"Above_Right":case"Attached_Above":case"Attached_Above_Right":("Attached_Above"===Dt||"Attached_Above_Right"===Dt)&&(oA.maxY+=kA),pt.yOffset=oA.maxY-Bt.minY,oA.maxY+=Bt.height}pt.xAdvance=pt.yAdvance=0,pt.xOffset+=iA,pt.yOffset+=NA}else iA-=pt.xAdvance,NA-=pt.yAdvance}},G.getCombiningClass=function(M){var x=w.getCombiningClass(M);if(3584==(-256&M))if("Not_Reordered"===x)switch(M){case 3633:case 3636:case 3637:case 3638:case 3639:case 3655:case 3660:case 3645:case 3662:return"Above_Right";case 3761:case 3764:case 3765:case 3766:case 3767:case 3771:case 3788:case 3789:return"Above";case 3772:return"Below"}else if(3642===M)return"Below_Right";switch(x){case"CCC10":case"CCC11":case"CCC12":case"CCC13":case"CCC14":case"CCC15":case"CCC16":case"CCC17":case"CCC18":case"CCC20":case"CCC22":case"CCC29":case"CCC32":case"CCC118":case"CCC129":case"CCC132":return"Below";case"CCC23":return"Attached_Above";case"CCC24":case"CCC107":return"Above_Right";case"CCC25":case"CCC19":return"Above_Left";case"CCC26":case"CCC27":case"CCC28":case"CCC30":case"CCC31":case"CCC33":case"CCC34":case"CCC35":case"CCC36":case"CCC122":case"CCC130":return"Above";case"CCC21":break;case"CCC103":return"Below_Right"}return x},tA}(),Ur=function(){function tA(V,M,x,R){void 0===V&&(V=1/0),void 0===M&&(M=1/0),void 0===x&&(x=-1/0),void 0===R&&(R=-1/0),this.minX=V,this.minY=M,this.maxX=x,this.maxY=R}var G=tA.prototype;return G.addPoint=function(M,x){Math.abs(M)!==1/0&&(Mthis.maxX&&(this.maxX=M)),Math.abs(x)!==1/0&&(xthis.maxY&&(this.maxY=x))},G.copy=function(){return new tA(this.minX,this.minY,this.maxX,this.maxY)},l(tA,[{key:"width",get:function(){return this.maxX-this.minX}},{key:"height",get:function(){return this.maxY-this.minY}}]),tA}(),Pr={Caucasian_Albanian:"aghb",Arabic:"arab",Imperial_Aramaic:"armi",Armenian:"armn",Avestan:"avst",Balinese:"bali",Bamum:"bamu",Bassa_Vah:"bass",Batak:"batk",Bengali:["bng2","beng"],Bopomofo:"bopo",Brahmi:"brah",Braille:"brai",Buginese:"bugi",Buhid:"buhd",Chakma:"cakm",Canadian_Aboriginal:"cans",Carian:"cari",Cham:"cham",Cherokee:"cher",Coptic:"copt",Cypriot:"cprt",Cyrillic:"cyrl",Devanagari:["dev2","deva"],Deseret:"dsrt",Duployan:"dupl",Egyptian_Hieroglyphs:"egyp",Elbasan:"elba",Ethiopic:"ethi",Georgian:"geor",Glagolitic:"glag",Gothic:"goth",Grantha:"gran",Greek:"grek",Gujarati:["gjr2","gujr"],Gurmukhi:["gur2","guru"],Hangul:"hang",Han:"hani",Hanunoo:"hano",Hebrew:"hebr",Hiragana:"hira",Pahawh_Hmong:"hmng",Katakana_Or_Hiragana:"hrkt",Old_Italic:"ital",Javanese:"java",Kayah_Li:"kali",Katakana:"kana",Kharoshthi:"khar",Khmer:"khmr",Khojki:"khoj",Kannada:["knd2","knda"],Kaithi:"kthi",Tai_Tham:"lana",Lao:"lao ",Latin:"latn",Lepcha:"lepc",Limbu:"limb",Linear_A:"lina",Linear_B:"linb",Lisu:"lisu",Lycian:"lyci",Lydian:"lydi",Mahajani:"mahj",Mandaic:"mand",Manichaean:"mani",Mende_Kikakui:"mend",Meroitic_Cursive:"merc",Meroitic_Hieroglyphs:"mero",Malayalam:["mlm2","mlym"],Modi:"modi",Mongolian:"mong",Mro:"mroo",Meetei_Mayek:"mtei",Myanmar:["mym2","mymr"],Old_North_Arabian:"narb",Nabataean:"nbat",Nko:"nko ",Ogham:"ogam",Ol_Chiki:"olck",Old_Turkic:"orkh",Oriya:["ory2","orya"],Osmanya:"osma",Palmyrene:"palm",Pau_Cin_Hau:"pauc",Old_Permic:"perm",Phags_Pa:"phag",Inscriptional_Pahlavi:"phli",Psalter_Pahlavi:"phlp",Phoenician:"phnx",Miao:"plrd",Inscriptional_Parthian:"prti",Rejang:"rjng",Runic:"runr",Samaritan:"samr",Old_South_Arabian:"sarb",Saurashtra:"saur",Shavian:"shaw",Sharada:"shrd",Siddham:"sidd",Khudawadi:"sind",Sinhala:"sinh",Sora_Sompeng:"sora",Sundanese:"sund",Syloti_Nagri:"sylo",Syriac:"syrc",Tagbanwa:"tagb",Takri:"takr",Tai_Le:"tale",New_Tai_Lue:"talu",Tamil:["tml2","taml"],Tai_Viet:"tavt",Telugu:["tel2","telu"],Tifinagh:"tfng",Tagalog:"tglg",Thaana:"thaa",Thai:"thai",Tibetan:"tibt",Tirhuta:"tirh",Ugaritic:"ugar",Vai:"vai ",Warang_Citi:"wara",Old_Persian:"xpeo",Cuneiform:"xsux",Yi:"yi ",Inherited:"zinh",Common:"zyyy",Unknown:"zzzz"},Hi={};for(var Ji in Pr){var Oi=Pr[Ji];if(Array.isArray(Oi))for(var Ea,ts=B(Oi);!(Ea=ts()).done;)Hi[Ea.value]=Ji;else Hi[Oi]=Ji}var as={arab:!0,hebr:!0,syrc:!0,thaa:!0,cprt:!0,khar:!0,phnx:!0,"nko ":!0,lydi:!0,avst:!0,armi:!0,phli:!0,prti:!0,sarb:!0,orkh:!0,samr:!0,mand:!0,merc:!0,mero:!0,mani:!0,mend:!0,nbat:!0,narb:!0,palm:!0,phlp:!0};function wa(tA){return as[tA]?"rtl":"ltr"}for(var os=function(){function tA(G,V,M,x,R){if(this.glyphs=G,this.positions=null,this.script=M,this.language=x||null,this.direction=R||wa(M),this.features={},Array.isArray(V))for(var aA,AA=B(V);!(aA=AA()).done;)this.features[aA.value]=!0;else"object"==typeof V&&(this.features=V)}return l(tA,[{key:"advanceWidth",get:function(){for(var x,V=0,M=B(this.positions);!(x=M()).done;)V+=x.value.xAdvance;return V}},{key:"advanceHeight",get:function(){for(var x,V=0,M=B(this.positions);!(x=M()).done;)V+=x.value.yAdvance;return V}},{key:"bbox",get:function(){for(var V=new Ur,M=0,x=0,R=0;R>1]).firstGlyph)return null;if(MaA.lastGlyph))return 2===this.table.version?aA.value:aA.values[M-aA.firstGlyph];x=AA+1}}return null;case 6:for(var oA=0,iA=this.table.binarySearchHeader.nUnits-1;oA<=iA;){var AA,aA;if(65535===(aA=this.table.segments[AA=oA+iA>>1]).glyph)return null;if(MaA.glyph))return aA.value;oA=AA+1}}return null;case 8:return this.table.values[M-this.table.firstGlyph];default:throw new Error("Unknown lookup table format: ".concat(this.table.version))}},G.glyphsForValue=function(M){var x=[];switch(this.table.version){case 2:case 4:for(var AA,R=B(this.table.segments);!(AA=R()).done;){var aA=AA.value;if(2===this.table.version&&aA.value===M)x.push.apply(x,Nr(aA.firstGlyph,aA.lastGlyph+1));else for(var oA=0;oA=-1;){var iA=null,NA=1,kA=!0;aA===M.length||-1===aA?NA=0:65535===(iA=M[aA]).id?NA=2:null==(NA=this.lookupTable.lookup(iA.id))&&(NA=1);var ct=this.stateTable.stateArray.getItem(AA),Bt=this.stateTable.entryTable.getItem(ct[NA]);0!==NA&&2!==NA&&(R(iA,Bt,aA),kA=!(16384&Bt.flags)),AA=Bt.newState,kA&&(aA+=oA)}return M},G.traverse=function(M,x,R){if(void 0===x&&(x=0),void 0===R&&(R=new Set),!R.has(x)){R.add(x);for(var AA=this.stateTable,aA=AA.nClasses,iA=AA.entryTable,NA=AA.stateArray.getItem(x),kA=4;kA=0;)65535===M[Dt].id&&M.splice(Dt,1),Dt--;return M},G.processSubtable=function(M,x){if(this.subtable=M,this.glyphs=x,4!==this.subtable.type){this.ligatureStack=[],this.markedGlyph=null,this.firstGlyph=null,this.lastGlyph=null,this.markedIndex=null;var R=this.getStateMachine(M),AA=this.getProcessor();return R.process(this.glyphs,!!(4194304&this.subtable.coverage),AA)}this.processNoncontextualSubstitutions(this.subtable,this.glyphs)},G.getStateMachine=function(M){return new us(M.table.stateTable)},G.getProcessor=function(){switch(this.subtable.type){case 0:return this.processIndicRearragement;case 1:return this.processContextualSubstitution;case 2:return this.processLigature;case 4:return this.processNoncontextualSubstitutions;case 5:return this.processGlyphInsertion;default:throw new Error("Invalid morx subtable type: ".concat(this.subtable.type))}},G.processIndicRearragement=function(M,x,R){32768&x.flags&&(this.firstGlyph=R),8192&x.flags&&(this.lastGlyph=R),function Ds(tA,G,V,M){switch(G){case 0:return tA;case 1:return Un(tA,[V,1],[M,0]);case 2:return Un(tA,[V,0],[M,1]);case 3:return Un(tA,[V,1],[M,1]);case 4:return Un(tA,[V,2],[M,0]);case 5:return Un(tA,[V,2],[M,0],!0,!1);case 6:return Un(tA,[V,0],[M,2]);case 7:return Un(tA,[V,0],[M,2],!1,!0);case 8:return Un(tA,[V,1],[M,2]);case 9:return Un(tA,[V,1],[M,2],!1,!0);case 10:return Un(tA,[V,2],[M,1]);case 11:return Un(tA,[V,2],[M,1],!0,!1);case 12:return Un(tA,[V,2],[M,2]);case 13:return Un(tA,[V,2],[M,2],!0,!1);case 14:return Un(tA,[V,2],[M,2],!1,!0);case 15:return Un(tA,[V,2],[M,2],!0,!0);default:throw new Error("Unknown verb: ".concat(G))}}(this.glyphs,15&x.flags,this.firstGlyph,this.lastGlyph)},G.processContextualSubstitution=function(M,x,R){var AA=this.subtable.table.substitutionTable.items;if(65535!==x.markIndex){var aA=AA.getItem(x.markIndex);(iA=new wi(aA).lookup((M=this.glyphs[this.markedGlyph]).id))&&(this.glyphs[this.markedGlyph]=this.font.getGlyph(iA,M.codePoints))}if(65535!==x.currentIndex){var iA,NA=AA.getItem(x.currentIndex);(iA=new wi(NA).lookup((M=this.glyphs[R]).id))&&(this.glyphs[R]=this.font.getGlyph(iA,M.codePoints))}32768&x.flags&&(this.markedGlyph=R)},G.processLigature=function(M,x,R){if(32768&x.flags&&this.ligatureStack.push(R),8192&x.flags){for(var AA,aA=this.subtable.table.ligatureActions,oA=this.subtable.table.components,iA=this.subtable.table.ligatureList,NA=x.action,kA=!1,ct=0,_A=[],Bt=[];!kA;){var pt,Dt=this.ligatureStack.pop();(pt=_A).unshift.apply(pt,this.glyphs[Dt].codePoints);var Gt=aA.getItem(NA++);kA=!!(2147483648&Gt);var $t=!!(1073741824&Gt),_t=(1073741823&Gt)<<2>>2;if(ct+=oA.getItem(_t+=this.glyphs[Dt].id),kA||$t){var Be=iA.getItem(ct);this.glyphs[Dt]=this.font.getGlyph(Be,_A),Bt.push(Dt),ct=0,_A=[]}else this.glyphs[Dt]=this.font.getGlyph(65535)}(AA=this.ligatureStack).push.apply(AA,Bt)}},G.processNoncontextualSubstitutions=function(M,x,R){var AA=new wi(M.table.lookupTable);for(R=0;R>>5,!!(1024&x.flags)),65535!==x.currentInsertIndex&&this._insertGlyphs(R,x.currentInsertIndex,(992&x.flags)>>>5,!!(2048&x.flags))},G.getSupportedFeatures=function(){for(var R,M=[],x=B(this.morx.chains);!(R=x()).done;)for(var oA,aA=B(R.value.features);!(oA=aA()).done;){var iA=oA.value;M.push([iA.featureType,iA.featureSetting])}return M},G.generateInputs=function(M){return this.inputCache||this.generateInputCache(),this.inputCache[M]||[]},G.generateInputCache=function(){this.inputCache={};for(var x,M=B(this.morx.chains);!(x=M()).done;)for(var oA,R=x.value,AA=R.defaultFlags,aA=B(R.subtables);!(oA=aA()).done;){var iA=oA.value;iA.subFeatureFlags&AA&&this.generateInputsForSubtable(iA)}},G.generateInputsForSubtable=function(M){var x=this;if(2===M.type){if(4194304&M.coverage)throw new Error("Reverse subtable, not supported.");this.subtable=M,this.ligatureStack=[];var AA=this.getStateMachine(M),aA=this.getProcessor(),oA=[],iA=[];this.glyphs=[],AA.traverse({enter:function(kA,ct){var _A=x.glyphs;iA.push({glyphs:_A.slice(),ligatureStack:x.ligatureStack.slice()});var Bt=x.font.getGlyph(kA);oA.push(Bt),_A.push(oA[oA.length-1]),aA(_A[_A.length-1],ct,_A.length-1);for(var pt=0,Dt=0,Gt=0;Gt<_A.length&&pt<=1;Gt++)65535!==_A[Gt].id&&(pt++,Dt=_A[Gt].id);if(1===pt){var $t=oA.map(function(ae){return ae.id}),_t=x.inputCache[Dt];_t?_t.push($t):x.inputCache[Dt]=[$t]}},exit:function(){var kA=iA.pop();x.glyphs=kA.glyphs,x.ligatureStack=kA.ligatureStack,oA.pop()}})}},tA}()).prototype,"getStateMachine",[z],Object.getOwnPropertyDescriptor(jr.prototype,"getStateMachine"),jr.prototype),jr);function Un(tA,G,V,M,x){void 0===M&&(M=!1),void 0===x&&(x=!1);var R=tA.splice(V[0]-(V[1]-1),V[1]);x&&R.reverse();var AA=tA.splice.apply(tA,[G[0],G[1]].concat(R));return M&&AA.reverse(),tA.splice.apply(tA,[V[0]-(G[1]-1),0].concat(AA)),tA}var ys=function(){function tA(V){this.font=V,this.morxProcessor=new vs(V),this.fallbackPosition=!1}var G=tA.prototype;return G.substitute=function(M){"rtl"===M.direction&&M.glyphs.reverse(),this.morxProcessor.process(M.glyphs,function ls(tA){var G={};for(var V in tA){var M;(M=fi[V])&&(null==G[M[0]]&&(G[M[0]]={}),G[M[0]][M[1]]=tA[V])}return G}(M.features))},G.getAvailableFeatures=function(M,x){return function cs(tA){var G={};if(Array.isArray(tA))for(var V=0;V0&&M.applyFeatures(oA,x,R)}},tA}(),Fs=["rvrn"],Ys=["ccmp","locl","rlig","mark","mkmk"],Ts=["frac","numr","dnom"],Ss=["calt","clig","liga","rclt","curs","kern"],Ns={ltr:["ltra","ltrm"],rtl:["rtla","rtlm"]},hr=function(){function tA(){}return tA.plan=function(V,M,x){this.planPreprocessing(V),this.planFeatures(V),this.planPostprocessing(V,x),V.assignGlobalFeatures(M),this.assignFeatures(V,M)},tA.planPreprocessing=function(V){V.add({global:[].concat(Fs,Ns[V.direction]),local:Ts})},tA.planFeatures=function(V){},tA.planPostprocessing=function(V,M){V.add([].concat(Ys,Ss)),V.setFeatureOverrides(M)},tA.assignFeatures=function(V,M){for(var x=0;x0&&w.isDigit(M[AA-1].codePoints[0]);)M[AA-1].features.numr=!0,M[AA-1].features.frac=!0,AA--;for(;aAthis.index||this.index>=this.glyphs.length?null:this.glyphs[this.index]},G.next=function(){return this.move(1)},G.prev=function(){return this.move(-1)},G.peek=function(M){void 0===M&&(M=1);var x=this.index,R=this.increment(M);return this.index=x,R},G.peekIndex=function(M){void 0===M&&(M=1);var x=this.index;this.increment(M);var R=this.index;return this.index=x,R},G.increment=function(M){void 0===M&&(M=1);var x=M<0?-1:1;for(M=Math.abs(M);M--;)this.move(x);return this.glyphs[this.index]},l(tA,[{key:"cur",get:function(){return this.glyphs[this.index]||null}}]),tA}(),bs=["DFLT","dflt","latn"],Cr=function(){function tA(V,M){this.font=V,this.table=M,this.script=null,this.scriptTag=null,this.language=null,this.languageTag=null,this.features={},this.lookups={},this.variationsIndex=V._variationProcessor?this.findVariationsIndex(V._variationProcessor.normalizedCoords):-1,this.selectScript(),this.glyphs=[],this.positions=[],this.ligatureID=1,this.currentFeature=null}var G=tA.prototype;return G.findScript=function(M){if(null==this.table.scriptList)return null;Array.isArray(M)||(M=[M]);for(var R,x=B(M);!(R=x()).done;)for(var oA,AA=R.value,aA=B(this.table.scriptList);!(oA=aA()).done;){var iA=oA.value;if(iA.tag===AA)return iA}return null},G.selectScript=function(M,x,R){var aA,AA=!1;if(!this.script||M!==this.scriptTag){if((aA=this.findScript(M))||(aA=this.findScript(bs)),!aA)return this.scriptTag;this.scriptTag=aA.tag,this.script=aA.script,this.language=null,this.languageTag=null,AA=!0}if((!R||R!==this.direction)&&(this.direction=R||wa(M)),x&&x.length<4&&(x+=" ".repeat(4-x.length)),!x||x!==this.languageTag){this.language=null;for(var iA,oA=B(this.script.langSysRecords);!(iA=oA()).done;){var NA=iA.value;if(NA.tag===x){this.language=NA.langSys,this.languageTag=NA.tag;break}}this.language||(this.language=this.script.defaultLangSys,this.languageTag=null),AA=!0}if(AA&&(this.features={},this.language))for(var ct,kA=B(this.language.featureIndexes);!(ct=kA()).done;){var _A=ct.value,Bt=this.table.featureList[_A],pt=this.substituteFeatureForVariations(_A);this.features[Bt.tag]=pt||Bt.feature}return this.scriptTag},G.lookupsForFeatures=function(M,x){void 0===M&&(M=[]);for(var aA,R=[],AA=B(M);!(aA=AA()).done;){var oA=aA.value,iA=this.features[oA];if(iA)for(var kA,NA=B(iA.lookupListIndexes);!(kA=NA()).done;){var ct=kA.value;x&&-1!==x.indexOf(ct)||R.push({feature:oA,index:ct,lookup:this.table.lookupList.get(ct)})}}return R.sort(function(_A,Bt){return _A.index-Bt.index}),R},G.substituteFeatureForVariations=function(M){if(-1===this.variationsIndex)return null;for(var aA,AA=B(this.table.featureVariations.featureVariationRecords[this.variationsIndex].featureTableSubstitution.substitutions);!(aA=AA()).done;){var oA=aA.value;if(oA.featureIndex===M)return oA.alternateFeatureTable}return null},G.findVariationsIndex=function(M){var x=this.table.featureVariations;if(!x)return-1;for(var R=x.featureVariationRecords,AA=0;AA=0})},G.getClassID=function(M,x){switch(x.version){case 1:var R=M-x.startGlyph;if(R>=0&&R0&&this.codePoints.every(w.isMark),this.isBase=!this.isMark,this.isLigature=this.codePoints.length>1,this.markAttachmentType=0}}]),tA}(),Da=function(tA){function G(){return tA.apply(this,arguments)||this}return h(G,tA),G.planFeatures=function(M){M.add(["ljmo","vjmo","tjmo"],!1)},G.assignFeatures=function(M,x){for(var R=0,AA=0;AAvr){var ct=Zr(V,AA,M.features);ct.features.tjmo=!0,kA.push(ct)}return tA.splice.apply(tA,[G,1].concat(kA)),G+kA.length-1}function n0(tA,G,V){var oA,iA,NA,kA,M=tA[G],R=Wr(tA[G].codePoints[0]),AA=tA[G-1].codePoints[0],aA=Wr(AA);if(4===aA&&3===R)oA=AA,kA=M;else{2===R?(iA=tA[G-1],NA=M):(iA=tA[G-2],NA=tA[G-1],kA=M);var ct=iA.codePoints[0],_A=NA.codePoints[0];(function(G){return 4352<=G&&G<=4370})(ct)&&function(G){return 4449<=G&&G<=4469}(_A)&&(oA=Rr+28*(21*(ct-4352)+(_A-4449)))}var Bt=kA&&kA.codePoints[0]||vr;if(null!=oA&&(Bt===vr||function(G){return 1<=G&&G<=4546}(Bt))){var pt=oA+(Bt-vr);if(V.hasGlyphForCodePoint(pt)){var Dt=2===aA?3:2;return tA.splice(G-Dt+1,Dt,Zr(V,pt,M.features)),G-Dt+1}}return iA&&(iA.features.ljmo=!0),NA&&(NA.features.vjmo=!0),kA&&(kA.features.tjmo=!0),4===aA?(Ta(tA,G-1,V),G+1):G}function i0(tA,G,V){var M=tA[G];if(0!==V.glyphForCodePoint(tA[G].codePoints[0]).advanceWidth){var AA=function r0(tA){switch(Wr(tA)){case 4:case 5:return 1;case 2:return 2;case 3:return 3}}(tA[G-1].codePoints[0]);return tA.splice(G,1),tA.splice(G-AA,0,M)}}function a0(tA,G,V){var M=tA[G],x=tA[G].codePoints[0];if(V.hasGlyphForCodePoint(9676)){var R=Zr(V,9676,M.features),AA=0===V.glyphForCodePoint(x).advanceWidth?G:G+1;tA.splice(AA,0,R),G++}return G}var xi={categories:["O","IND","S","GB","B","FM","CGJ","VMAbv","VMPst","VAbv","VPst","CMBlw","VPre","VBlw","H","VMBlw","CMAbv","MBlw","CS","R","SUB","MPst","MPre","FAbv","FPst","FBlw","null","SMAbv","SMBlw","VMPre","ZWNJ","ZWJ","WJ","M","VS","N","HN","MAbv"],decompositions:{2507:[2503,2494],2508:[2503,2519],2888:[2887,2902],2891:[2887,2878],2892:[2887,2903],3018:[3014,3006],3019:[3015,3006],3020:[3014,3031],3144:[3142,3158],3264:[3263,3285],3271:[3270,3285],3272:[3270,3286],3274:[3270,3266],3275:[3270,3266,3285],3402:[3398,3390],3403:[3399,3390],3404:[3398,3415],3546:[3545,3530],3548:[3545,3535],3549:[3545,3535,3530],3550:[3545,3551],3635:[3661,3634],3763:[3789,3762],3955:[3953,3954],3957:[3953,3956],3958:[4018,3968],3959:[4018,3953,3968],3960:[4019,3968],3961:[4019,3953,3968],3969:[3953,3968],6971:[6970,6965],6973:[6972,6965],6976:[6974,6965],6977:[6975,6965],6979:[6978,6965],69934:[69937,69927],69935:[69938,69927],70475:[70471,70462],70476:[70471,70487],70843:[70841,70842],70844:[70841,70832],70846:[70841,70845],71098:[71096,71087],71099:[71097,71087]},stateTable:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,18,11,19,20,21,22,0,0,0,23,0,0,2,0,0,24,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,27,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,39,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,49,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,20,21,22,0,0,0,23,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,33,0,0,36,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,41,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,34,35,36,37,38,39,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,0,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,53,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,43,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,45,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,0,0,0,0,0,0,38,0,0,0,0,0,0,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,29,0,30,31,32,33,0,35,36,0,38,0,40,0,0,0,35,0,43,44,45,0,0,0,46,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,0,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,5,0,6,7,8,9,48,11,12,13,14,48,16,0,0,18,11,19,20,21,22,0,0,0,23,0,0,0,0,0,0,0,25],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,0,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,29,0,30,31,32,33,52,35,36,37,38,52,40,0,0,41,35,42,43,44,45,0,0,0,46,0,0,0,0,0,0,0,47],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,50,0,51,0]],accepting:[!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0],tags:[[],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["symbol_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["virama_terminated_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["number_joiner_terminated_cluster"],["standard_cluster"],["standard_cluster"],["numeral_cluster"]]},Ie_X=1,Ie_N=8,Ie_H=16,Ie_ZWNJ=32,Ie_ZWJ=64,Ie_M=128,Ie_RS=8192,Ie_Repha=32768,Ie_Ra=65536,Ie_CM=1<<17,ee={Start:1,Ra_To_Become_Reph:2,Pre_M:4,Pre_C:8,Base_C:16,After_Main:32,Above_C:64,Before_Sub:128,Below_C:256,After_Sub:512,Before_Post:1024,Post_C:2048,After_Post:4096,Final_C:8192,SMVD:16384,End:32768},E0=2|Ie_Ra|Ie_CM|4|2048|4096,Sa=Ie_ZWJ|Ie_ZWNJ,Xr=Ie_H|16384,Na={Default:{hasOldSpec:!1,virama:0,basePos:"Last",rephPos:ee.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Devanagari:{hasOldSpec:!0,virama:2381,basePos:"Last",rephPos:ee.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Bengali:{hasOldSpec:!0,virama:2509,basePos:"Last",rephPos:ee.After_Sub,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Gurmukhi:{hasOldSpec:!0,virama:2637,basePos:"Last",rephPos:ee.Before_Sub,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Gujarati:{hasOldSpec:!0,virama:2765,basePos:"Last",rephPos:ee.Before_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Oriya:{hasOldSpec:!0,virama:2893,basePos:"Last",rephPos:ee.After_Main,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Tamil:{hasOldSpec:!0,virama:3021,basePos:"Last",rephPos:ee.After_Post,rephMode:"Implicit",blwfMode:"Pre_And_Post"},Telugu:{hasOldSpec:!0,virama:3149,basePos:"Last",rephPos:ee.After_Post,rephMode:"Explicit",blwfMode:"Post_Only"},Kannada:{hasOldSpec:!0,virama:3277,basePos:"Last",rephPos:ee.After_Post,rephMode:"Implicit",blwfMode:"Post_Only"},Malayalam:{hasOldSpec:!0,virama:3405,basePos:"Last",rephPos:ee.After_Main,rephMode:"Log_Repha",blwfMode:"Pre_And_Post"},Khmer:{hasOldSpec:!1,virama:6098,basePos:"First",rephPos:ee.Ra_To_Become_Reph,rephMode:"Vis_Repha",blwfMode:"Pre_And_Post"}},w0={6078:[6081,6078],6079:[6081,6079],6080:[6081,6080],6084:[6081,6084],6085:[6081,6085]},C0=xi.decompositions,Ua=new Q(c("AAARAAAAAABg2AAAAWYPmfDtnXuMXFUdx+/uzs7M7szudAtECGJRIMRQbUAithQWkGAKiVhNpFVRRAmIQVCDkDYICGotIA9BTCz8IeUviv7BQ2PBtBIRLBBQIWAUsKg1BKxRAqIgfs/cc+aeOXPej3tnZX7JJ/dxzj3nd36/8753Z5fUsuxgsAwcAU4Gp4BPgM+Cd4P3RjieDs4GXwLrHJ5bDy4DG8A14LvgZrAZbAF3gns0z18ALgY/B78C94NHwBPgabAE/AX8DbwM5sF/QX0yD5vFcU/wVnAgWAoOAyvAceBE8CGwBpwGzgJfAF8BXwXfAFeC68EmsBlsAXeCreA+8CB4DDwF/gh2gd3gFfAGmKxn2QzYC+wHDgRLweFgJTgWrKrnuq/GcQ04jV6fheN54EJwEbgcXAG+Q8O/j+Mt4DZwB9haz8t9Hz3a8iCN/xiOvwRP0evH6fE68AzOH+Ke2eWYhw3PcGnuxvkr4A3QaGRZB7wFLAEHg2XgiEZ/fHKcp/ceBh/A+cngFPCpRm6vM3E8l8a5gN67GMdvgqsbeX2ap9yI601gM7gN3AG20mfuo8cdOP6GpvdUg9oKxz839GV90RDO2/glxN1B790NXsN1rZll7WYRdw+c70uvTwIHNAfTO0RyL5TDmnnbc3lmRQI9UnM0dD5eovfz4FpJ/BNpXNYWV+N6Lfg0hY97JK1vn+Pur9DoQur2F7m436bHDUK8C5t5/8vruo4+97WmXG+GLmzEiBF+PDwEOowYMWLEiBEjRoxYeBw5BDqIPEfXut9yWN+vVNxfrnnmWqR/PdgENoMt4E5wD9gOHgCPgifBs2BXM99b2o3jP8F/wMRUlrXAHNgHvH0q3895J46HguXgWHAGLctmLv9VuL96qnp7jxgxYsSbCbJvuRZ97/tqxT59VVRtixEjRsThBG7OSt5zzoPT0M+cBc4T5noXOs79TqLHeZrHUeCSqeJ96gacXy2kecNU8V6Hh7yXuQlhtw7B/PO1RTkr52Aj8JNFZjYg3gOKuC/g/v6Ls2wNuAY8urg//PcIb+6RZXuDNeCS6SzbBrJWlh0DLiFHco8ed9IjzzvaWfa9sZzTcf6D9mCcnbg3PlNcH4fzS8F2MDaLdQG4dLZIJxbbaZqv4ri8k58f3+mPs66T6/TTzqDeI0aMGDGiHP5dcR8ce/xxYcWi6vOfr725uRzcjnngXVOD61Hync+9uL+Nmyfej/NHpvL56A5Jeuz7uyfo+pqcPz2Vf1NH0ttJ03pekt8SmuY/EPYy9zzbN319ym/9TL6ZIt9MHCXRdxJtoAkWTRdz472n87D9cTwYLJvuz++I6WIePo/zE8AHp4v8WLyP0nufnM6/+zoDx8+DL08P6r9+urheRtO+jD6/cdrsx3mqu8w+xH4PScKIXa5D2jeCm8Et4DbwI/BjcC/4BXgI/Bb8DuwEu8Bu8Ap4A9RaRZptnO8J9gUHgEPAoWA5OLY1qMO90GEV7q+mYWtxPBWcIYnL4p+DsPNbxfVFOP86uAr8DNc34HgTDb8Vx9sVaRFI/LtagzYjnCqpb908EX87eBA8Bh4Hf2jle/9/wvGFVv787rrZZy8h7qtgDOuFOmiBuXYRvg/O9wMHgXeB97SLspk4sq0OI/q9v13+ek+sh3zYSRp9jrYorw9ll1/GRzR+KotYZSHf8laVP2lvpA/8OGdPMk59hqtXZ+L8nHbxvWwqO65ryu+fT3VZz+l4dET7L0R072ljsMyzTpaJqQxsbL8M9WajY789DO85XMp/Dcp3Qztdn+9qf/a97ZWK8PXc3G+TpC/nv8Mncy7ZvICF302P5O+aNiOtLdTXd+D4Q7DVwfcvWvx9zTEJ/o5iG3R8YAjGNFseha5PGuZKz7b7xxXbOrXMcu5eJSo//rXdH/73Enz6L1q/X+fyIu8wZGtNBmkjkzNZNgP2AvuBg2bysKUzduXn/66JtNeN4PCZvO0/x7Ujdn4VnYOvRJzjZ/I+9sQZeftX2Tc1RPcPz/Tf4/si0g+t5Mq+kfZjZL34Mc5ul3PPnE7TOxvHK2qDaZ+L++db2HyYqMo/qVnb/P8uH8/rmnFxR0k6DCu/rjj/RxT7KGUSWgbd+LMQuEgYB1zsk2qtvJD8v5AhdfdttbEunSxbcJD9Zf7chqp1Hlbe7FK1/aPVTfp7FgtC1yGGiSncFK/DhZvi+epZta0WWjlsfDZMyPRdSPrryqSSKnXx1bkq/Ye9TlRpk7Lrjq1UrfdC9X+MtKqwP6+3a/4pJFUZF0pZZpv91MYjMBaRRXbxpho5zQmUY3F+Pt4o7rvQrBXPdm00TaE24uMadaM2meLSI7iu071t3er3b6ZLi8JEde3qw+6zGv+ycF5kaRBh/m1T/7Yl/mMyTuMwadP4xL9ifjJpNwbvDZRJ8G8vnqV/Wf12aa/kyOdl69+BspTsXzGueE6E+JfZnvmXIfNPW+FfXkjb1YmqPNpnLP3b61fHCj/X5tzGANf2y3yqvC7Jv7btV4TVbdammI9l/g0dS5lNxLrk2j9r8xjjxhBQnygg0lgg/bOrfyct+udJi/Yrk0lFnxC7f+5kRbsNmcexfrubt0X/rGvLqrGSnYv3ZPHEe8r7lvMvUfi2LOu/2dg8LrRtQt2yfcv8r5IU70VkIs6nbebUXf0M/o7Znl39Sdoz+X1oEb5N8ffF67qhPfPP6eoUbxf+GRf/6sRnvaSdmw+Bf1VxmbD+2sa//DU7t/Gv2PfKpKdrBP92Ojk+IvqX16ks/2qxbL8EZnc2HqsgYuqPuzZV+I3RbujbDm+T0PmWCVO/5jqftp1zy+wSA6s0JWtp2z5e1oZV+yMsjB3ZXolsv0Ulrv01v3/iKrF94Qtbt9siCnmeb6fjjf59KnLk1xaEbvtvFnFirGvEOqmycQrbm/IMsXd3P28uh4nM3swXRER717OiX8kc7K2qqyn2p3maFGU/aruP5VCv+PraoTYU8yUmmbDwcYo6pusnM486xdoga4dkPCb1pK7Sfc6ebvkd4qeAtQcd/N63bB3lU3dlUnUf38VyvqCqK7JxlNSd7lydrDlm+/uqHiRvl30Nrp/n9zpkZRjoJ3V1diyP05rIYXHYs+w+D5+WMS8b5gZtKcuX0KT5d/WwtB97VnyvY6rjMukI56HI0rFJPwt8PjT/1OXzSbcMeEmdh294qvKK4rNu7j4n3LNZg8TKXwafv025U+XvKjHsT8Q7/7LGaJt9lAh7Asz3uv0XEX6t0duDoWN/93wmh92XpUHmCKb9GALbG+rZP3AfNbQPKKv/jpF/bP0JXfuW1QYk7dhljcyvk5mw+933Hpo1g26PQ2ZP6zVmTJt47P25jncD9vPwGS+q9QS/V6RaY8j8K8LmvUr9HfYCpH5OWL9lZY+Sv6pesHCJHbtrf9k6etZvf0G1L0ja4cAe1UT/s3zdCe3/Q5/n372wMc97/E1Qh0Tbmfwh3m/V9On72tNnrCF1sJkVe1EyXMdBa7+lHMsk44zMF6St9e2djNnbm8ybpHkq+gbbemMaH0UZmD8obKGrk7r+nt+3bE7o83YZp/vqOKdv6PzJNN6mTJsI/51XR7i2ZrGA5B6zFwnjzxmqPjaGfW3tZNrz1eljq29mOOqeCfF/irRt87PNw0uXSVAvrmOMNT569MptsYaV0sic/wbY13e8hPrb9K2ySUJ0j6G/Lu0U4qpTrR23jMp6m5hU+YTaWCeh9aIsm/rqUHV4bFv42kgnZdfH1PUj1D7DVH9d8khRN1zFRl/+/TW//qxL1uH83+mk3H+SvRtS2TDU90nX2TpM6/1xzZpZtoYdK763dqlz0f6uNeFehcs+H/nbGP77MpX06n/ofpzP+tVmTUvRtVuX/cjS67OE5kRBrxyJ+w/dPo7r+9cO1160e3gqu0S2uW7PjN/L6ns/UfMf10Lai87frJ+3KndAfc8yTf1M3T4s6qm4/yh7/2GSkG8UMw//DvRLgbYZSEOxr0LCWvRdjfh9XGzfqN4NivfZd7rsmFp08zmbssrKJEuTfVMZopdpbuwSrhNv3/N2s+0PDG3KNB6RMrFvJHv6B85HXObAoWsd3zm3i+6uZYytv+5+pohbpo6+tpZJFfmGlrcMf4c8b1Pe2OUIsaXJrinCTfaxtZOt+NYnU3hIfQlN20Z/1+dt7JaqLsbIzycNWZmrlNg2Dc2/LJ1T+T6WrrYSml4Ku7ik7yIx2opJD51vU9UfVRmrqL8u/olZj0PyCLV5irxcdKoi/6rKb8qTrHsnhW9jyZH/nSpeWDzxd9769uQ016lgUuf2pAfKPhu2FpfZL2Yb9snLNl/fNIepXaUsj4vNXCXUZ75px8ojNP8UPvAta2g6fb+F1ckZuneshv1vGXXDeyRRrN/bBPS1Jul+l+7zW86R7Wv63WXyDpt/RxraRjvC+TC3O61/Sqj/prag8x372yQivn+XwudrI2X2E2KdtJEov52e0L+uv4FO3p/rvssgsL8F4d/z9PzlWS94m8fqS3361Fi+6qaVYHwi9Yz4iH2fobIj+45cpz/TUaarr/4+z+vaWtVtyAX2d1LG8W9C3f+F1mnf36/k4w3YPrLv+XBVXCJs3cr+n4MKJuLv/fN9GhNdXVP5pJMN9vFi3rpv3/r8Ywg3SYp66zNOsO8QGcxPpnmRS/1mvmJjju3v7absI2xspQrvs1dNbjOj/wP7h1RlZyKGy8occ408UL8En4v6xfC/K3z52XzJd62T8vuZGGsxo/6O46ntmNqqFb/jps2/hHV4rPKH0svT4pstU7t2tZ9u/ZdqbJL1MwP6O86Fyt4jYaIrGz9mjEt8lFL4PtVE6votG2P6fpdf/GZRse7s3bf4BtSl/DIbKMctx++Z+8o6K6z9FPOwKsRmXiaNl7C+6NYRpjlbqG1j72f49qsuY4brd/amb4ZVc8TQ+sSH985LrEe8iPWJnfPrJRbWbb+dwn4x6o+r/aS2S7w3qWt//LnYz2ntE0vH1uDcyKatx1rH+EiMPEN1SZG/iz6+9o01Rob6O7Q+xLZ1jHobK61U+pWVvo2EpuWqzzD6Poa+pvhli0wn8Zq/72Mzm2d90o5VN1x9ZKuzbTgvqWwUIin8FSpl1CXXvFRxU0iozVPYJDRtF3uFphn6XAyJUUdD7SjTJ8v6n9fVbVObkKWp001lc9VRlqdOf5v0ZM+bymdbfp1NfG0bq27Y5JMyfxeJkU6o/inKH8O2Zfgidb6h/g3VJ7QcVbWL0Pxt6rlrPqa4KfQ25a2zl4/E8GdM/4fK/wA=","base64")),Q0=new p({stateTable:[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,14,15,16,17],[0,0,0,18,19,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,28,29,30,31,32,33,0,34,0,0,35,36,0,0,37,0],[0,0,0,38,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,39,0,0,0,40,41,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,12,43,0,0,0,0],[0,0,0,0,43,44,44,8,9,0,0,0,0,0,43,0,0,0,0],[0,0,0,45,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,50,0,0,51,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,52,0,0,0,0,0,0,0,0],[0,0,0,53,54,55,56,57,58,0,59,0,0,60,61,0,0,62,0],[0,0,0,4,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,63,64,0,0,40,41,0,9,0,10,0,0,0,42,0,63,0,0],[0,2,3,4,5,6,7,8,9,0,10,11,11,12,13,0,2,16,0],[0,0,0,18,65,20,21,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,0,0],[0,0,0,69,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,73,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,75,0,0,0,76,77,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,25,79,0,0,0,0],[0,0,0,18,19,20,74,22,23,0,24,0,0,25,26,0,0,27,0],[0,0,0,81,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,86,0,0,87,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0],[0,0,0,18,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,89,90,0,0,76,77,0,23,0,24,0,0,0,78,0,89,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,0,0],[0,0,0,94,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,96,0,0,0,97,98,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,35,100,0,0,0,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,102,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,107,0,0,108,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,109,0,0,0,0,0,0,0,0],[0,0,0,28,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,110,111,0,0,97,98,0,33,0,34,0,0,0,99,0,110,0,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,0,0],[0,0,0,0,5,7,7,8,9,0,10,0,0,0,13,0,0,16,0],[0,0,0,115,116,117,118,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,39,0,122,0,123,123,8,9,0,10,0,0,0,42,0,39,0,0],[0,124,64,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0],[0,39,0,0,0,121,125,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,126,126,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,46,47,48,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,47,47,49,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,128,127,127,49,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,129,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,50,0,0,0,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,134,0,0,0,0,0,0,0,0],[0,0,0,135,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,136,0,0,0,137,138,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,60,140,0,0,0,0],[0,0,0,0,140,141,141,57,58,0,0,0,0,0,140,0,0,0,0],[0,0,0,142,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,147,0,0,148,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0],[0,0,0,53,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,150,151,0,0,137,138,0,58,0,59,0,0,0,139,0,150,0,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,0,0],[0,0,0,155,116,156,157,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,0,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,75,3,4,5,159,160,8,161,0,162,0,11,12,163,0,75,16,0],[0,0,0,0,0,40,164,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,0,165,0,0,0,0],[0,124,64,0,0,40,164,0,9,0,10,0,0,0,42,0,124,0,0],[0,0,0,0,0,70,70,0,71,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,167,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,168,0,0,0,0,0,0,0,0],[0,0,0,0,19,74,74,22,23,0,24,0,0,0,26,0,0,27,0],[0,0,0,0,79,80,80,22,23,0,0,0,0,0,79,0,0,0,0],[0,0,0,169,170,171,172,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,75,0,176,0,177,177,22,23,0,24,0,0,0,78,0,75,0,0],[0,178,90,0,0,0,0,0,0,0,0,0,0,0,0,0,178,0,0],[0,75,0,0,0,175,179,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,180,180,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,82,83,84,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,83,83,85,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,182,181,181,85,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,183,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,86,0,0,0,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,188,0,0,0,0,0,0,0,0],[0,0,0,189,170,190,191,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,0,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,76,193,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,0,194,0,0,0,0],[0,178,90,0,0,76,193,0,23,0,24,0,0,0,78,0,178,0,0],[0,0,0,0,29,95,31,32,33,0,34,0,0,0,36,0,0,37,0],[0,0,0,0,100,101,101,32,33,0,0,0,0,0,100,0,0,0,0],[0,0,0,195,196,197,198,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,96,0,202,0,203,203,32,33,0,34,0,0,0,99,0,96,0,0],[0,204,111,0,0,0,0,0,0,0,0,0,0,0,0,0,204,0,0],[0,96,0,0,0,201,205,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,206,206,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,103,104,105,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,104,104,106,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,208,207,207,106,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,209,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,107,0,0,0,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,214,0,0,0,0,0,0,0,0],[0,0,0,215,196,216,217,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,0,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,97,219,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,0,220,0,0,0,0],[0,204,111,0,0,97,219,0,33,0,34,0,0,0,99,0,204,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,223,0,0,0,40,224,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,119,225,0,0,0,0],[0,0,0,115,116,117,222,8,9,0,10,0,0,119,120,0,0,16,0],[0,0,0,115,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,226,64,0,0,40,224,0,9,0,10,0,0,0,42,0,226,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,39,0,0,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,44,44,8,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,227,0,228,229,0,9,0,10,0,0,230,0,0,0,0,0],[0,39,0,122,0,121,121,0,9,0,10,0,0,0,42,0,39,0,0],[0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,231,231,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,232,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,130,131,132,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,131,131,133,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,234,233,233,133,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,235,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,54,56,56,57,58,0,59,0,0,0,61,0,0,62,0],[0,0,0,240,241,242,243,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,136,0,247,0,248,248,57,58,0,59,0,0,0,139,0,136,0,0],[0,249,151,0,0,0,0,0,0,0,0,0,0,0,0,0,249,0,0],[0,136,0,0,0,246,250,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,251,251,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,143,144,145,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,144,144,146,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,253,252,252,146,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,254,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,147,0,0,0,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,259,0,0,0,0,0,0,0,0],[0,0,0,260,241,261,262,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,0,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,137,264,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,0,265,0,0,0,0],[0,249,151,0,0,137,264,0,58,0,59,0,0,0,139,0,249,0,0],[0,0,0,221,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,158,225,0,0,0,0],[0,0,0,155,116,156,222,8,9,0,10,0,0,158,120,0,0,16,0],[0,0,0,155,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,43,266,266,8,161,0,24,0,0,12,267,0,0,0,0],[0,75,0,176,43,268,268,269,161,0,24,0,0,0,267,0,75,0,0],[0,0,0,0,0,270,0,0,271,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,272,0,0,0,0,0,0,0,0],[0,273,274,0,0,40,41,0,9,0,10,0,0,0,42,0,273,0,0],[0,0,0,40,0,123,123,8,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,121,275,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,166,0,0,0,0,72,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,276,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,279,0,0,0,76,280,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,173,281,0,0,0,0],[0,0,0,169,170,171,278,22,23,0,24,0,0,173,174,0,0,27,0],[0,0,0,169,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,282,90,0,0,76,280,0,23,0,24,0,0,0,78,0,282,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,75,0,0,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,80,80,22,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,283,0,284,285,0,23,0,24,0,0,286,0,0,0,0,0],[0,75,0,176,0,175,175,0,23,0,24,0,0,0,78,0,75,0,0],[0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,287,287,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,288,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,184,185,186,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,185,185,187,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,290,289,289,187,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,291,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,277,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,192,281,0,0,0,0],[0,0,0,189,170,190,278,22,23,0,24,0,0,192,174,0,0,27,0],[0,0,0,189,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,76,0,177,177,22,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,175,296,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,299,0,0,0,97,300,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,199,301,0,0,0,0],[0,0,0,195,196,197,298,32,33,0,34,0,0,199,200,0,0,37,0],[0,0,0,195,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,302,111,0,0,97,300,0,33,0,34,0,0,0,99,0,302,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,96,0,0,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,101,101,32,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,303,0,304,305,0,33,0,34,0,0,306,0,0,0,0,0],[0,96,0,202,0,201,201,0,33,0,34,0,0,0,99,0,96,0,0],[0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,307,307,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,308,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,210,211,212,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,211,211,213,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,310,309,309,213,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,311,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,297,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,218,301,0,0,0,0],[0,0,0,215,196,216,298,32,33,0,34,0,0,218,200,0,0,37,0],[0,0,0,215,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,97,0,203,203,32,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,201,316,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,116,222,222,8,9,0,10,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,9,0,0,0,0,0,225,0,0,0,0],[0,0,0,317,318,319,320,8,9,0,10,0,0,321,322,0,0,16,0],[0,223,0,323,0,123,123,8,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,0,0,121,324,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,325,318,326,327,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,64,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,9,0,0,0,0,230,0,0,0,0,0],[0,0,0,227,0,228,121,0,9,0,10,0,0,230,0,0,0,0,0],[0,0,0,227,0,121,121,0,9,0,10,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0],[0,0,0,0,0,329,329,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,330,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,236,237,238,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,237,237,239,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,332,331,331,239,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,333,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,337,0,0,0,137,338,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,244,339,0,0,0,0],[0,0,0,240,241,242,336,57,58,0,59,0,0,244,245,0,0,62,0],[0,0,0,240,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,340,151,0,0,137,338,0,58,0,59,0,0,0,139,0,340,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,136,0,0,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,141,141,57,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,341,0,342,343,0,58,0,59,0,0,344,0,0,0,0,0],[0,136,0,247,0,246,246,0,58,0,59,0,0,0,139,0,136,0,0],[0,0,0,0,0,0,0,57,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,345,345,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,346,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,255,256,257,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,256,256,258,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,348,347,347,258,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,349,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,335,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,263,339,0,0,0,0],[0,0,0,260,241,261,336,57,58,0,59,0,0,263,245,0,0,62,0],[0,0,0,260,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,137,0,248,248,57,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,246,354,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,126,126,8,23,0,0,0,0,0,0,0,0,0,0],[0,355,90,0,0,121,125,0,9,0,10,0,0,0,42,0,355,0,0],[0,0,0,0,0,356,356,269,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,357,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,270,0,0,0,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,363,0,0,0,0,0,0,0,0],[0,0,0,364,116,365,366,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,40,0,121,121,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,170,278,278,22,23,0,24,0,0,0,174,0,0,27,0],[0,0,0,0,281,80,80,22,23,0,0,0,0,0,281,0,0,0,0],[0,0,0,369,370,371,372,22,23,0,24,0,0,373,374,0,0,27,0],[0,279,0,375,0,177,177,22,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,0,0,175,376,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,377,370,378,379,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,90,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,23,0,0,0,0,286,0,0,0,0,0],[0,0,0,283,0,284,175,0,23,0,24,0,0,286,0,0,0,0,0],[0,0,0,283,0,175,175,0,23,0,24,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0],[0,0,0,0,0,381,381,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,382,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,292,293,294,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,293,293,295,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,0,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,384,383,383,295,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,385,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,76,0,175,175,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,196,298,298,32,33,0,34,0,0,0,200,0,0,37,0],[0,0,0,0,301,101,101,32,33,0,0,0,0,0,301,0,0,0,0],[0,0,0,387,388,389,390,32,33,0,34,0,0,391,392,0,0,37,0],[0,299,0,393,0,203,203,32,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,0,0,201,394,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,395,388,396,397,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,111,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,33,0,0,0,0,306,0,0,0,0,0],[0,0,0,303,0,304,201,0,33,0,34,0,0,306,0,0,0,0,0],[0,0,0,303,0,201,201,0,33,0,34,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,103,0,0],[0,0,0,0,0,399,399,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,400,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,312,313,314,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,313,313,315,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,0,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,402,401,401,315,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,403,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,97,0,201,201,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,407,0,0,0,40,408,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,321,409,0,0,0,0],[0,0,0,317,318,319,406,8,9,0,10,0,0,321,322,0,0,16,0],[0,0,0,317,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,410,64,0,0,40,408,0,9,0,10,0,0,0,42,0,410,0,0],[0,223,0,0,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,223,0,323,0,121,121,0,9,0,10,0,0,0,42,0,223,0,0],[0,0,0,405,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,328,409,0,0,0,0],[0,0,0,325,318,326,406,8,9,0,10,0,0,328,322,0,0,16,0],[0,0,0,325,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,0,0,0,133,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,130,0,0],[0,0,0,0,0,411,411,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,412,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,40,121,334,0,9,0,10,0,0,0,42,0,0,0,0],[0,0,0,0,413,0,0,0,9,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,241,336,336,57,58,0,59,0,0,0,245,0,0,62,0],[0,0,0,0,339,141,141,57,58,0,0,0,0,0,339,0,0,0,0],[0,0,0,414,415,416,417,57,58,0,59,0,0,418,419,0,0,62,0],[0,337,0,420,0,248,248,57,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,0,0,246,421,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,422,415,423,424,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,151,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,58,0,0,0,0,344,0,0,0,0,0],[0,0,0,341,0,342,246,0,58,0,59,0,0,344,0,0,0,0,0],[0,0,0,341,0,246,246,0,58,0,59,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,146,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,143,0,0],[0,0,0,0,0,426,426,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,427,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,350,351,352,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,351,351,353,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,0,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,429,428,428,353,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,430,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,137,0,246,246,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,432,116,433,434,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,0,0,180,180,269,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,358,359,360,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,359,359,361,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,437,436,436,361,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,438,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,443,274,0,0,0,0,0,0,0,0,0,0,0,0,0,443,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,367,225,0,0,0,0],[0,0,0,364,116,365,445,8,161,0,162,0,0,367,120,0,0,16,0],[0,0,0,364,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,448,0,0,0,76,449,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,373,450,0,0,0,0],[0,0,0,369,370,371,447,22,23,0,24,0,0,373,374,0,0,27,0],[0,0,0,369,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,451,90,0,0,76,449,0,23,0,24,0,0,0,78,0,451,0,0],[0,279,0,0,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,279,0,375,0,175,175,0,23,0,24,0,0,0,78,0,279,0,0],[0,0,0,446,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,380,450,0,0,0,0],[0,0,0,377,370,378,447,22,23,0,24,0,0,380,374,0,0,27,0],[0,0,0,377,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,0,0,0,187,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,0,0],[0,0,0,0,0,452,452,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,453,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,76,175,386,0,23,0,24,0,0,0,78,0,0,0,0],[0,0,0,0,454,0,0,0,23,0,0,0,0,0,0,0,0,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,457,0,0,0,97,458,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,391,459,0,0,0,0],[0,0,0,387,388,389,456,32,33,0,34,0,0,391,392,0,0,37,0],[0,0,0,387,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,460,111,0,0,97,458,0,33,0,34,0,0,0,99,0,460,0,0],[0,299,0,0,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,299,0,393,0,201,201,0,33,0,34,0,0,0,99,0,299,0,0],[0,0,0,455,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,398,459,0,0,0,0],[0,0,0,395,388,396,456,32,33,0,34,0,0,398,392,0,0,37,0],[0,0,0,395,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,0,0,0,213,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,210,0,0],[0,0,0,0,0,461,461,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,97,201,404,0,33,0,34,0,0,0,99,0,0,0,0],[0,0,0,0,463,0,0,0,33,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,318,406,406,8,9,0,10,0,0,0,322,0,0,16,0],[0,0,0,0,409,44,44,8,9,0,0,0,0,0,409,0,0,0,0],[0,0,0,464,465,466,467,8,9,0,10,0,0,468,469,0,0,16,0],[0,407,0,470,0,123,123,8,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,0,0,121,471,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,472,465,473,474,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,0,0,0,0,239,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,236,0,0],[0,0,0,0,0,0,476,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,479,0,0,0,137,480,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,418,481,0,0,0,0],[0,0,0,414,415,416,478,57,58,0,59,0,0,418,419,0,0,62,0],[0,0,0,414,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,482,151,0,0,137,480,0,58,0,59,0,0,0,139,0,482,0,0],[0,337,0,0,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,337,0,420,0,246,246,0,58,0,59,0,0,0,139,0,337,0,0],[0,0,0,477,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,425,481,0,0,0,0],[0,0,0,422,415,423,478,57,58,0,59,0,0,425,419,0,0,62,0],[0,0,0,422,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,0,0,0,258,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,0],[0,0,0,0,0,483,483,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,484,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,137,246,431,0,58,0,59,0,0,0,139,0,0,0,0],[0,0,0,0,485,0,0,0,58,0,0,0,0,0,0,0,0,0,0],[0,0,0,444,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,435,225,0,0,0,0],[0,0,0,432,116,433,445,8,161,0,162,0,0,435,120,0,0,16,0],[0,0,0,432,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,0,486,486,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,487,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,439,440,441,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,440,440,442,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,489,488,488,442,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,490,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,495,0,496,497,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,0,116,445,445,8,161,0,162,0,0,0,120,0,0,16,0],[0,0,0,0,225,44,44,8,161,0,0,0,0,0,225,0,0,0,0],[0,0,0,0,370,447,447,22,23,0,24,0,0,0,374,0,0,27,0],[0,0,0,0,450,80,80,22,23,0,0,0,0,0,450,0,0,0,0],[0,0,0,499,500,501,502,22,23,0,24,0,0,503,504,0,0,27,0],[0,448,0,505,0,177,177,22,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,0,0,175,506,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,507,500,508,509,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,0,0,0,0,295,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,292,0,0],[0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,388,456,456,32,33,0,34,0,0,0,392,0,0,37,0],[0,0,0,0,459,101,101,32,33,0,0,0,0,0,459,0,0,0,0],[0,0,0,512,513,514,515,32,33,0,34,0,0,516,517,0,0,37,0],[0,457,0,518,0,203,203,32,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,0,0,201,519,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,520,513,521,522,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,0,0,0,0,315,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,312,0,0],[0,0,0,0,0,0,524,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,527,0,0,0,40,528,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,468,529,0,0,0,0],[0,0,0,464,465,466,526,8,9,0,10,0,0,468,469,0,0,16,0],[0,0,0,464,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,530,64,0,0,40,528,0,9,0,10,0,0,0,42,0,530,0,0],[0,407,0,0,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,407,0,470,0,121,121,0,9,0,10,0,0,0,42,0,407,0,0],[0,0,0,525,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,475,529,0,0,0,0],[0,0,0,472,465,473,526,8,9,0,10,0,0,475,469,0,0,16,0],[0,0,0,472,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0],[0,0,0,0,415,478,478,57,58,0,59,0,0,0,419,0,0,62,0],[0,0,0,0,481,141,141,57,58,0,0,0,0,0,481,0,0,0,0],[0,0,0,531,532,533,534,57,58,0,59,0,0,535,536,0,0,62,0],[0,479,0,537,0,248,248,57,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,0,0,246,538,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,539,532,540,541,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,0,0,0,0,353,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,350,0,0],[0,0,0,0,0,0,543,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,361,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,358,0,0],[0,0,0,0,0,544,544,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,545,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,491,492,493,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,492,492,494,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,547,546,546,494,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,548,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,274,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,161,0,0,0,0,498,0,0,0,0,0],[0,0,0,495,0,496,368,0,161,0,162,0,0,498,0,0,0,0,0],[0,0,0,495,0,368,368,0,161,0,162,0,0,0,0,0,0,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,553,0,0,0,76,554,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,503,555,0,0,0,0],[0,0,0,499,500,501,552,22,23,0,24,0,0,503,504,0,0,27,0],[0,0,0,499,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,556,90,0,0,76,554,0,23,0,24,0,0,0,78,0,556,0,0],[0,448,0,0,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,448,0,505,0,175,175,0,23,0,24,0,0,0,78,0,448,0,0],[0,0,0,551,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,510,555,0,0,0,0],[0,0,0,507,500,508,552,22,23,0,24,0,0,510,504,0,0,27,0],[0,0,0,507,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,76,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,559,0,0,0,97,560,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,516,561,0,0,0,0],[0,0,0,512,513,514,558,32,33,0,34,0,0,516,517,0,0,37,0],[0,0,0,512,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,562,111,0,0,97,560,0,33,0,34,0,0,0,99,0,562,0,0],[0,457,0,0,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,457,0,518,0,201,201,0,33,0,34,0,0,0,99,0,457,0,0],[0,0,0,557,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,523,561,0,0,0,0],[0,0,0,520,513,521,558,32,33,0,34,0,0,523,517,0,0,37,0],[0,0,0,520,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,97,0,0],[0,0,0,0,465,526,526,8,9,0,10,0,0,0,469,0,0,16,0],[0,0,0,0,529,44,44,8,9,0,0,0,0,0,529,0,0,0,0],[0,0,0,563,66,564,565,8,9,0,10,0,0,566,68,0,0,16,0],[0,527,0,567,0,123,123,8,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,0,0,121,568,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,569,66,570,571,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,575,0,0,0,137,576,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,535,577,0,0,0,0],[0,0,0,531,532,533,574,57,58,0,59,0,0,535,536,0,0,62,0],[0,0,0,531,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,578,151,0,0,137,576,0,58,0,59,0,0,0,139,0,578,0,0],[0,479,0,0,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,479,0,537,0,246,246,0,58,0,59,0,0,0,139,0,479,0,0],[0,0,0,573,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,542,577,0,0,0,0],[0,0,0,539,532,540,574,57,58,0,59,0,0,542,536,0,0,62,0],[0,0,0,539,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,137,0,0],[0,0,0,0,0,0,0,442,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,439,0,0],[0,0,0,0,0,579,579,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,580,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,549,368,550,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,0,368,368,0,161,0,162,0,0,0,362,0,0,0,0],[0,0,0,0,581,0,0,0,161,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,500,552,552,22,23,0,24,0,0,0,504,0,0,27,0],[0,0,0,0,555,80,80,22,23,0,0,0,0,0,555,0,0,0,0],[0,0,0,582,91,583,584,22,23,0,24,0,0,585,93,0,0,27,0],[0,553,0,586,0,177,177,22,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,0,0,175,587,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,588,91,589,590,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,0,513,558,558,32,33,0,34,0,0,0,517,0,0,37,0],[0,0,0,0,561,101,101,32,33,0,0,0,0,0,561,0,0,0,0],[0,0,0,592,112,593,594,32,33,0,34,0,0,595,114,0,0,37,0],[0,559,0,596,0,203,203,32,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,0,0,201,597,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,598,112,599,600,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,566,165,0,0,0,0],[0,0,0,563,66,564,67,8,9,0,10,0,0,566,68,0,0,16,0],[0,0,0,563,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,527,0,0,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,527,0,567,0,121,121,0,9,0,10,0,0,0,42,0,527,0,0],[0,0,0,602,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,165,44,44,8,9,0,0,0,0,572,165,0,0,0,0],[0,0,0,569,66,570,67,8,9,0,10,0,0,572,68,0,0,16,0],[0,0,0,569,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,0,532,574,574,57,58,0,59,0,0,0,536,0,0,62,0],[0,0,0,0,577,141,141,57,58,0,0,0,0,0,577,0,0,0,0],[0,0,0,603,152,604,605,57,58,0,59,0,0,606,154,0,0,62,0],[0,575,0,607,0,248,248,57,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,0,0,246,608,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,609,152,610,611,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,0,0,0,0,494,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,491,0,0],[0,0,0,0,0,0,613,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,585,194,0,0,0,0],[0,0,0,582,91,583,92,22,23,0,24,0,0,585,93,0,0,27,0],[0,0,0,582,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,553,0,0,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,553,0,586,0,175,175,0,23,0,24,0,0,0,78,0,553,0,0],[0,0,0,614,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,194,80,80,22,23,0,0,0,0,591,194,0,0,0,0],[0,0,0,588,91,589,92,22,23,0,24,0,0,591,93,0,0,27,0],[0,0,0,588,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,595,220,0,0,0,0],[0,0,0,592,112,593,113,32,33,0,34,0,0,595,114,0,0,37,0],[0,0,0,592,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,559,0,0,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,559,0,596,0,201,201,0,33,0,34,0,0,0,99,0,559,0,0],[0,0,0,615,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,220,101,101,32,33,0,0,0,0,601,220,0,0,0,0],[0,0,0,598,112,599,113,32,33,0,34,0,0,601,114,0,0,37,0],[0,0,0,598,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,66,67,67,8,9,0,10,0,0,0,68,0,0,16,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,606,265,0,0,0,0],[0,0,0,603,152,604,153,57,58,0,59,0,0,606,154,0,0,62,0],[0,0,0,603,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,575,0,0,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,575,0,607,0,246,246,0,58,0,59,0,0,0,139,0,575,0,0],[0,0,0,616,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,265,141,141,57,58,0,0,0,0,612,265,0,0,0,0],[0,0,0,609,152,610,153,57,58,0,59,0,0,612,154,0,0,62,0],[0,0,0,609,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,549,0,0],[0,0,0,0,91,92,92,22,23,0,24,0,0,0,93,0,0,27,0],[0,0,0,0,112,113,113,32,33,0,34,0,0,0,114,0,0,37,0],[0,0,0,0,152,153,153,57,58,0,59,0,0,0,154,0,0,62,0]],accepting:[!1,!0,!0,!0,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!1,!0,!1,!0,!0,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!1,!0,!1,!0,!0,!0,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!0,!1,!1,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!0,!1,!0,!1,!0,!0,!1,!1,!0,!0,!1,!1,!0,!0,!0,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!1,!0,!0,!0,!0,!1,!1,!1,!1,!1,!1,!1,!0,!0,!1,!1,!0,!0,!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!0,!1,!0,!0,!1,!1,!1,!1,!1,!0,!0,!1,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!0,!1,!1,!1,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!0,!0,!1,!0,!0,!0,!0,!0,!1,!0,!0,!1,!0,!0,!0],tags:[[],["broken_cluster"],["consonant_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["broken_cluster"],["broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],[],["broken_cluster"],["symbol_cluster"],[],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["symbol_cluster"],["symbol_cluster"],["symbol_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],["broken_cluster"],[],[],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["broken_cluster"],["symbol_cluster"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],["consonant_syllable"],[],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],["vowel_syllable"],[],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],[],[],[],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],["standalone_cluster"],[],[],["standalone_cluster"],["standalone_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],[],[],[],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],[],[],[],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],[],[],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],["standalone_cluster"],[],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],[],[],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],[],[],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],[],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],[],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],[],[],[],[],["consonant_syllable","broken_cluster"],["consonant_syllable","broken_cluster"],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],[],[],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],["consonant_syllable"],[],["consonant_syllable"],["consonant_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],["vowel_syllable"],[],["vowel_syllable"],["vowel_syllable"],["broken_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],["standalone_cluster"],[],["standalone_cluster"],["standalone_cluster"],[],["consonant_syllable"],["vowel_syllable"],["standalone_cluster"]]}),hn=function(tA){function G(){return tA.apply(this,arguments)||this}return h(G,tA),G.planFeatures=function(M){M.addStage(d0),M.addStage(["locl","ccmp"]),M.addStage(p0),M.addStage("nukt"),M.addStage("akhn"),M.addStage("rphf",!1),M.addStage("rkrf"),M.addStage("pref",!1),M.addStage("blwf",!1),M.addStage("abvf",!1),M.addStage("half",!1),M.addStage("pstf",!1),M.addStage("vatu"),M.addStage("cjct"),M.addStage("cfar",!1),M.addStage(I0),M.addStage({local:["init"],global:["pres","abvs","blws","psts","haln","dist","abvm","blwm","calt","clig"]}),M.unicodeScript=function ns(tA){return Hi[tA]}(M.script),M.indicConfig=Na[M.unicodeScript]||Na.Default,M.isOldSpec=M.indicConfig.hasOldSpec&&"2"!==M.script[M.script.length-1]},G.assignFeatures=function(M,x){for(var R=function(oA){var iA=x[oA].codePoints[0],NA=w0[iA]||C0[iA];if(NA){var kA=NA.map(function(ct){var _A=M.font.glyphForCodePoint(ct);return new sr(M.font,_A.id,[ct],x[oA].features)});x.splice.apply(x,[oA,1].concat(kA))}},AA=x.length-1;AA>=0;AA--)R(AA)},G}(hr);function Wi(tA){return Ua.get(tA.codePoints[0])>>8}function Zi(tA){return 1<<(255&Ua.get(tA.codePoints[0]))}S(hn,"zeroMarkWidths","NONE");var Fi=function(G,V,M,x){this.category=G,this.position=V,this.syllableType=M,this.syllable=x};function d0(tA,G){for(var R,V=0,M=0,x=B(Q0.match(G.map(Wi)));!(R=x()).done;){var AA=R.value,aA=AA[0],oA=AA[1],iA=AA[2];if(aA>M){++V;for(var NA=M;NAGt);break;case"First":for(var Ce=(Dt=iA)+1;CeWe&&!(Dr(G[Oe])||ln&&G[Oe].shaperInfo.category===Ie_H);Oe--);if(G[Oe].shaperInfo.category!==Ie_H&&Oe>We){var he=G[We];G.splice.apply(G,[We,0].concat(G.splice(We+1,Oe-We))),G[Oe]=he}break}for(var _e=ee.Start,Ue=iA;UeiA;An--)if(G[An-1].shaperInfo.position!==ee.Pre_M){Fe.position=G[An-1].shaperInfo.position;break}}else Fe.position!==ee.SMVD&&(_e=Fe.position)}for(var zn=Dt,gn=Dt+1;gniA&&!Dr(G[Ln]))}}}}function I0(tA,G,V){for(var M=V.indicConfig,x=tA._layoutEngine.engine.GSUBProcessor.features,R=0,AA=Yi(G,0);R=ee.Base_C){if(aA&&oA+1ee.Base_C&&oA--;break}if(oA===AA&&RR&&!(G[kA].shaperInfo.category&(Ie_M|Xr));)kA--;er(G[kA])&&G[kA].shaperInfo.position!==ee.Pre_M?kA+1R;ct--)if(G[ct-1].shaperInfo.position===ee.Pre_M){var _A=ct-1;_AR&&G[pt].shaperInfo.position===ee.SMVD;)pt--;if(er(G[pt]))for(var $t=oA+1;$tR&&!(G[Be-1].shaperInfo.category&(Ie_M|Xr));)Be--;if(Be>R&&G[Be-1].shaperInfo.category===Ie_M)for(var we=ae,Ce=oA+1;CeR&&er(G[Be-1])&&Be=tA.length)return G;for(var V=tA[G].shaperInfo.syllable;++G=0;AA--)R(AA)},G}(hr);function Ra(tA){return v0.get(tA.codePoints[0])}S(de,"zeroMarkWidths","BEFORE_GPOS");var y0=function(G,V,M){this.category=G,this.syllableType=V,this.syllable=M};function x0(tA,G){for(var x,V=0,M=B(D0.match(G.map(Ra)));!(x=M()).done;){var R=x.value,AA=R[0],aA=R[1],oA=R[2];++V;for(var iA=AA;iA<=aA;iA++)G[iA].shaperInfo=new y0(m0[Ra(G[iA])],oA[0],V);for(var NA="R"===G[AA].shaperInfo.category?1:Math.min(3,aA-AA),kA=AA;kA1)for(R=M+1;R=tA.length)return G;for(var V=tA[G].shaperInfo.syllable;++G=0;Hn--)this.glyphs.splice(Be[Hn],1);return this.glyphs[this.glyphIterator.index]=le,!0}}return!1;case 5:return this.applyContext(R);case 6:return this.applyChainingContext(R);case 7:return this.applyLookup(R.lookupType,R.extension);default:throw new Error("GSUB lookupType ".concat(x," is not supported"))}},G}(Cr),P0=function(tA){function G(){return tA.apply(this,arguments)||this}h(G,tA);var V=G.prototype;return V.applyPositionValue=function(x,R){var AA=this.positions[this.glyphIterator.peekIndex(x)];null!=R.xAdvance&&(AA.xAdvance+=R.xAdvance),null!=R.yAdvance&&(AA.yAdvance+=R.yAdvance),null!=R.xPlacement&&(AA.xOffset+=R.xPlacement),null!=R.yPlacement&&(AA.yOffset+=R.yPlacement);var aA=this.font._variationProcessor,oA=this.font.GDEF&&this.font.GDEF.itemVariationStore;aA&&oA&&(R.xPlaDevice&&(AA.xOffset+=aA.getDelta(oA,R.xPlaDevice.a,R.xPlaDevice.b)),R.yPlaDevice&&(AA.yOffset+=aA.getDelta(oA,R.yPlaDevice.a,R.yPlaDevice.b)),R.xAdvDevice&&(AA.xAdvance+=aA.getDelta(oA,R.xAdvDevice.a,R.xAdvDevice.b)),R.yAdvDevice&&(AA.yAdvance+=aA.getDelta(oA,R.yAdvDevice.a,R.yAdvDevice.b)))},V.applyLookup=function(x,R){switch(x){case 1:var AA=this.coverageIndex(R.coverage);if(-1===AA)return!1;switch(R.version){case 1:this.applyPositionValue(0,R.value);break;case 2:this.applyPositionValue(0,R.values.get(AA))}return!0;case 2:var aA=this.glyphIterator.peek();if(!aA)return!1;var oA=this.coverageIndex(R.coverage);if(-1===oA)return!1;switch(R.version){case 1:for(var kA,NA=B(R.pairSets.get(oA));!(kA=NA()).done;){var ct=kA.value;if(ct.secondGlyph===aA.id)return this.applyPositionValue(0,ct.value1),this.applyPositionValue(1,ct.value2),!0}return!1;case 2:var _A=this.getClassID(this.glyphIterator.cur.id,R.classDef1),Bt=this.getClassID(aA.id,R.classDef2);if(-1===_A||-1===Bt)return!1;var pt=R.classRecords.get(_A).get(Bt);return this.applyPositionValue(0,pt.value1),this.applyPositionValue(1,pt.value2),!0}case 3:var Dt=this.glyphIterator.peekIndex(),Gt=this.glyphs[Dt];if(!Gt)return!1;var $t=R.entryExitRecords[this.coverageIndex(R.coverage)];if(!$t||!$t.exitAnchor)return!1;var _t=R.entryExitRecords[this.coverageIndex(R.coverage,Gt.id)];if(!_t||!_t.entryAnchor)return!1;var ae=this.getAnchor(_t.entryAnchor),Be=this.getAnchor($t.exitAnchor),we=this.positions[this.glyphIterator.index],Ce=this.positions[Dt];switch(this.direction){case"ltr":we.xAdvance=Be.x+we.xOffset;var He=ae.x+Ce.xOffset;Ce.xAdvance-=He,Ce.xOffset-=He;break;case"rtl":we.xAdvance-=He=Be.x+we.xOffset,we.xOffset-=He,Ce.xAdvance=ae.x+Ce.xOffset}return this.glyphIterator.flags.rightToLeft?(this.glyphIterator.cur.cursiveAttachment=Dt,we.yOffset=ae.y-Be.y):(Gt.cursiveAttachment=this.glyphIterator.index,we.yOffset=Be.y-ae.y),!0;case 4:var sn=this.coverageIndex(R.markCoverage);if(-1===sn)return!1;for(var Je=this.glyphIterator.index;--Je>=0&&(this.glyphs[Je].isMark||this.glyphs[Je].ligatureComponent>0););if(Je<0)return!1;var le=this.coverageIndex(R.baseCoverage,this.glyphs[Je].id);if(-1===le)return!1;var ln=R.markArray[sn];return this.applyAnchor(ln,R.baseArray[le][ln.class],Je),!0;case 5:var Oe=this.coverageIndex(R.markCoverage);if(-1===Oe)return!1;for(var he=this.glyphIterator.index;--he>=0&&this.glyphs[he].isMark;);if(he<0)return!1;var _e=this.coverageIndex(R.ligatureCoverage,this.glyphs[he].id);if(-1===_e)return!1;var Ue=R.ligatureArray[_e],Fe=this.glyphIterator.cur,An=this.glyphs[he],zn=An.ligatureID&&An.ligatureID===Fe.ligatureID&&Fe.ligatureComponent>0?Math.min(Fe.ligatureComponent,An.codePoints.length)-1:An.codePoints.length-1,gn=R.markArray[Oe];return this.applyAnchor(gn,Ue[zn][gn.class],he),!0;case 6:var Hn=this.coverageIndex(R.mark1Coverage);if(-1===Hn)return!1;var On=this.glyphIterator.peekIndex(-1),mn=this.glyphs[On];if(!mn||!mn.isMark)return!1;var Qn=this.glyphIterator.cur,kn=!1;if(Qn.ligatureID===mn.ligatureID?Qn.ligatureID?Qn.ligatureComponent===mn.ligatureComponent&&(kn=!0):kn=!0:(Qn.ligatureID&&!Qn.ligatureComponent||mn.ligatureID&&!mn.ligatureComponent)&&(kn=!0),!kn)return!1;var jn=this.coverageIndex(R.mark2Coverage,mn.id);if(-1===jn)return!1;var me=R.mark1Array[Hn];return this.applyAnchor(me,R.mark2Array[jn][me.class],On),!0;case 7:return this.applyContext(R);case 8:return this.applyChainingContext(R);case 9:return this.applyLookup(R.lookupType,R.extension);default:throw new Error("Unsupported GPOS table: ".concat(x))}},V.applyAnchor=function(x,R,AA){var aA=this.getAnchor(R),oA=this.getAnchor(x.markAnchor),NA=this.positions[this.glyphIterator.index];NA.xOffset=aA.x-oA.x,NA.yOffset=aA.y-oA.y,this.glyphIterator.cur.markAttachment=AA},V.getAnchor=function(x){var R=x.xCoordinate,AA=x.yCoordinate,aA=this.font._variationProcessor,oA=this.font.GDEF&&this.font.GDEF.itemVariationStore;return aA&&oA&&(x.xDeviceTable&&(R+=aA.getDelta(oA,x.xDeviceTable.a,x.xDeviceTable.b)),x.yDeviceTable&&(AA+=aA.getDelta(oA,x.yDeviceTable.a,x.yDeviceTable.b))),{x:R,y:AA}},V.applyFeatures=function(x,R,AA){tA.prototype.applyFeatures.call(this,x,R,AA);for(var aA=0;aA>16;if(0===x)switch(M>>8){case 0:return 173===M;case 3:return 847===M;case 6:return 1564===M;case 23:return 6068<=M&&M<=6069;case 24:return 6155<=M&&M<=6158;case 32:return 8203<=M&&M<=8207||8234<=M&&M<=8238||8288<=M&&M<=8303;case 254:return 65024<=M&&M<=65039||65279===M;case 255:return 65520<=M&&M<=65528;default:return!1}else switch(x){case 1:return 113824<=M&&M<=113827||119155<=M&&M<=119162;case 14:return 917504<=M&&M<=921599;default:return!1}},G.getAvailableFeatures=function(M,x){var R=[];return this.engine&&R.push.apply(R,this.engine.getAvailableFeatures(M,x)),this.font.kern&&-1===R.indexOf("kern")&&R.push("kern"),R},G.stringsForGlyph=function(M){for(var aA,x=new Set,AA=B(this.font._cmapProcessor.codePointsForGlyph(M));!(aA=AA()).done;)x.add(String.fromCodePoint(aA.value));if(this.engine&&this.engine.stringsForGlyph)for(var NA,iA=B(this.engine.stringsForGlyph(M));!(NA=iA()).done;)x.add(NA.value);return Array.from(x)},tA}(),L0={moveTo:"M",lineTo:"L",quadraticCurveTo:"Q",bezierCurveTo:"C",closePath:"Z"},Si=function(){function tA(){this.commands=[],this._bbox=null,this._cbox=null}var G=tA.prototype;return G.toFunction=function(){var M=this;return function(x){M.commands.forEach(function(R){return x[R.command].apply(x,R.args)})}},G.toSVG=function(){return this.commands.map(function(x){var R=x.args.map(function(AA){return Math.round(100*AA)/100});return"".concat(L0[x.command]).concat(R.join(" "))}).join("")},G.mapPoints=function(M){for(var AA,x=new tA,R=B(this.commands);!(AA=R()).done;){for(var aA=AA.value,oA=[],iA=0;iA0&&this.codePoints.every(w.isMark),this.isLigature=this.codePoints.length>1}var G=tA.prototype;return G._getPath=function(){return new Si},G._getCBox=function(){return this.path.cbox},G._getBBox=function(){return this.path.bbox},G._getTableMetrics=function(M){if(this.id0)oA=Math.abs(NA.typoAscender-NA.typoDescender),iA=NA.typoAscender-M.maxY;else{var kA=this._font.hhea;oA=Math.abs(kA.ascent-kA.descent),iA=kA.ascent-M.maxY}return this._font._variationProcessor&&this._font.HVAR&&(R+=this._font._variationProcessor.getAdvanceAdjustment(this.id,this._font.HVAR)),this._metrics={advanceWidth:R,advanceHeight:oA,leftBearing:AA,topBearing:iA}},G.getScaledPath=function(M){return this.path.scale(1/this._font.unitsPerEm*M)},G._getName=function(){var M=this._font.post;if(!M)return null;switch(M.version){case 1:return qr[this.id];case 2:var x=M.glyphNameIndex[this.id];return x0?this._decodeSimple(oA,AA):oA.numberOfContours<0&&this._decodeComposite(oA,AA,aA),oA},V._decodeSimple=function(x,R){x.points=[];var AA=new e.Array(e.uint16,x.numberOfContours).decode(R);x.instructions=new e.Array(e.uint8,e.uint16).decode(R);for(var aA=[],oA=AA[AA.length-1]+1;aA.length=0,0,0);x.points.push(_A)}var Bt=0;for(ct=0;ct>1,iA.length=0}function ln(Oe,he){Gt&&oA.closePath(),oA.moveTo(Oe,he),Gt=!0}return function Oe(){for(;R.pos1&&Je(),Bt+=iA.shift(),ln(_A,Bt);break;case 5:for(;iA.length>=2;)_A+=iA.shift(),Bt+=iA.shift(),oA.lineTo(_A,Bt);break;case 6:case 7:for(var _e=6===he;iA.length>=1;)_e?_A+=iA.shift():Bt+=iA.shift(),oA.lineTo(_A,Bt),_e=!_e;break;case 8:for(;iA.length>0;){var me=_A+iA.shift(),Pe=Bt+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift();_A=Ye+iA.shift(),Bt=Ze+iA.shift(),oA.bezierCurveTo(me,Pe,Ye,Ze,_A,Bt)}break;case 10:var Ue=iA.pop()+we,Fe=Be[Ue];if(Fe){Dt[Ue]=!0;var An=R.pos,zn=aA;R.pos=Fe.offset,aA=Fe.offset+Fe.length,Oe(),R.pos=An,aA=zn}break;case 11:if(x.version>=2)break;return;case 14:if(x.version>=2)break;iA.length>0&&Je(),Gt&&(oA.closePath(),Gt=!1);break;case 15:if(x.version<2)throw new Error("vsindex operator not supported in CFF v1");He=iA.pop();break;case 16:if(x.version<2)throw new Error("blend operator not supported in CFF v1");if(!sn)throw new Error("blend operator in non-variation font");for(var gn=sn.getBlendVector(Ce,He),pn=iA.pop(),Hn=pn*gn.length,On=iA.length-Hn,mn=On-pn,Qn=0;Qn>3;break;case 21:iA.length>2&&Je(),_A+=iA.shift(),Bt+=iA.shift(),ln(_A,Bt);break;case 22:iA.length>1&&Je(),ln(_A+=iA.shift(),Bt);break;case 24:for(;iA.length>=8;)me=_A+iA.shift(),Pe=Bt+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye+iA.shift(),Bt=Ze+iA.shift(),oA.bezierCurveTo(me,Pe,Ye,Ze,_A,Bt);_A+=iA.shift(),Bt+=iA.shift(),oA.lineTo(_A,Bt);break;case 25:for(;iA.length>=8;)_A+=iA.shift(),Bt+=iA.shift(),oA.lineTo(_A,Bt);me=_A+iA.shift(),Pe=Bt+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye+iA.shift(),Bt=Ze+iA.shift(),oA.bezierCurveTo(me,Pe,Ye,Ze,_A,Bt);break;case 26:for(iA.length%2&&(_A+=iA.shift());iA.length>=4;)me=_A,Pe=Bt+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye,Bt=Ze+iA.shift(),oA.bezierCurveTo(me,Pe,Ye,Ze,_A,Bt);break;case 27:for(iA.length%2&&(Bt+=iA.shift());iA.length>=4;)me=_A+iA.shift(),Pe=Bt,Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye+iA.shift(),oA.bezierCurveTo(me,Pe,Ye,Ze,_A,Bt=Ze);break;case 28:iA.push(R.readInt16BE());break;case 29:Ue=iA.pop()+_t,(Fe=$t[Ue])&&(pt[Ue]=!0,An=R.pos,zn=aA,R.pos=Fe.offset,aA=Fe.offset+Fe.length,Oe(),R.pos=An,aA=zn);break;case 30:case 31:for(_e=31===he;iA.length>=4;)_e?(me=_A+iA.shift(),Pe=Bt,Ye=me+iA.shift(),Ze=Pe+iA.shift(),Bt=Ze+iA.shift(),_A=Ye+(1===iA.length?iA.shift():0)):(me=_A,Pe=Bt+iA.shift(),Ye=me+iA.shift(),Ze=Pe+iA.shift(),_A=Ye+iA.shift(),Bt=Ze+(1===iA.length?iA.shift():0)),oA.bezierCurveTo(me,Pe,Ye,Ze,_A,Bt),_e=!_e;break;case 12:switch(he=R.readUInt8()){case 3:var ke=iA.pop(),Bn=iA.pop();iA.push(ke&&Bn?1:0);break;case 4:ke=iA.pop(),Bn=iA.pop(),iA.push(ke||Bn?1:0);break;case 5:ke=iA.pop(),iA.push(ke?0:1);break;case 9:ke=iA.pop(),iA.push(Math.abs(ke));break;case 10:ke=iA.pop(),Bn=iA.pop(),iA.push(ke+Bn);break;case 11:ke=iA.pop(),Bn=iA.pop(),iA.push(ke-Bn);break;case 12:ke=iA.pop(),Bn=iA.pop(),iA.push(ke/Bn);break;case 14:ke=iA.pop(),iA.push(-ke);break;case 15:ke=iA.pop(),Bn=iA.pop(),iA.push(ke===Bn?1:0);break;case 18:iA.pop();break;case 20:var $i=iA.pop(),Ln=iA.pop();NA[Ln]=$i;break;case 21:Ln=iA.pop(),iA.push(NA[Ln]||0);break;case 22:var Aa=iA.pop(),ta=iA.pop(),Ll=iA.pop(),bl=iA.pop();iA.push(Ll<=bl?Aa:ta);break;case 23:iA.push(Math.random());break;case 24:ke=iA.pop(),Bn=iA.pop(),iA.push(ke*Bn);break;case 26:ke=iA.pop(),iA.push(Math.sqrt(ke));break;case 27:ke=iA.pop(),iA.push(ke,ke);break;case 28:ke=iA.pop(),Bn=iA.pop(),iA.push(Bn,ke);break;case 29:(Ln=iA.pop())<0?Ln=0:Ln>iA.length-1&&(Ln=iA.length-1),iA.push(iA[Ln]);break;case 30:var Pi=iA.pop(),_r=iA.pop();if(_r>=0)for(;_r>0;){for(var ea=iA[Pi-1],Ri=Pi-2;Ri>=0;Ri--)iA[Ri+1]=iA[Ri];iA[0]=ea,_r--}else for(;_r<0;){ea=iA[0];for(var zi=0;zi<=Pi;zi++)iA[zi]=iA[zi+1];iA[Pi-1]=ea,_r++}break;case 34:me=_A+iA.shift(),Pe=Bt,Ye=me+iA.shift(),Ze=Pe+iA.shift();var $r=Ye+iA.shift(),Ai=Ze,ti=$r+iA.shift(),ei=Ai,ni=ti+iA.shift(),ri=ei,ii=ni+iA.shift(),ai=ri;_A=ii,Bt=ai,oA.bezierCurveTo(me,Pe,Ye,Ze,$r,Ai),oA.bezierCurveTo(ti,ei,ni,ri,ii,ai);break;case 35:for(var Qr=[],no=0;no<=5;no++)_A+=iA.shift(),Bt+=iA.shift(),Qr.push(_A,Bt);oA.bezierCurveTo.apply(oA,Qr.slice(0,6)),oA.bezierCurveTo.apply(oA,Qr.slice(6)),iA.shift();break;case 36:me=_A+iA.shift(),Pe=Bt+iA.shift(),Ye=me+iA.shift(),ei=Ai=Ze=Pe+iA.shift(),ni=(ti=($r=Ye+iA.shift())+iA.shift())+iA.shift(),ri=ei+iA.shift(),ii=ni+iA.shift(),_A=ii,Bt=ai=ri,oA.bezierCurveTo(me,Pe,Ye,Ze,$r,Ai),oA.bezierCurveTo(ti,ei,ni,ri,ii,ai);break;case 37:var na=_A,ro=Bt;Qr=[];for(var io=0;io<=4;io++)_A+=iA.shift(),Bt+=iA.shift(),Qr.push(_A,Bt);Math.abs(_A-na)>Math.abs(Bt-ro)?(_A+=iA.shift(),Bt=ro):(_A=na,Bt+=iA.shift()),Qr.push(_A,Bt),oA.bezierCurveTo.apply(oA,Qr.slice(0,6)),oA.bezierCurveTo.apply(oA,Qr.slice(6));break;default:throw new Error("Unknown op: 12 ".concat(he))}break;default:throw new Error("Unknown op: ".concat(he))}else if(he<247)iA.push(he-139);else if(he<251){var ra=R.readUInt8();iA.push(256*(he-247)+ra+108)}else he<255?(ra=R.readUInt8(),iA.push(256*-(he-251)-ra-108)):iA.push(R.readInt32BE()/65536)}}(),Gt&&oA.closePath(),oA},G}(Ni),Al=new e.Struct({originX:e.uint16,originY:e.uint16,type:new e.String(4),data:new e.Buffer(function(tA){return tA.parent.buflen-tA._currentOffset})}),tl=function(tA){function G(){return tA.apply(this,arguments)||this}h(G,tA);var V=G.prototype;return V.getImageForSize=function(x){for(var R=0;R=x)break}var aA=AA.imageOffsets,oA=aA[this.id],iA=aA[this.id+1];return oA===iA?null:(this._font.stream.pos=oA,Al.decode(this._font.stream,{buflen:iA-oA}))},V.render=function(x,R){var AA=this.getImageForSize(R);null!=AA&&x.image(AA.data,{height:R,x:AA.originX,y:R/this._font.unitsPerEm*(this.bbox.minY-AA.originY)}),this._font.sbix.flags.renderOutlines&&tA.prototype.render.call(this,x,R)},G}(Ui),Oa=function(G,V){this.glyph=G,this.color=V},el=function(tA){function G(){return tA.apply(this,arguments)||this}h(G,tA);var V=G.prototype;return V._getBBox=function(){for(var x=new Ur,R=0;R>1;if(this.id<(iA=R.baseGlyphRecord[oA]).gid)aA=oA-1;else{if(!(this.id>iA.gid)){var NA=iA;break}AA=oA+1}}if(null==NA){var kA=this._font._getBaseGlyph(this.id);return[new Oa(kA,ct={red:0,green:0,blue:0,alpha:255})]}for(var _A=[],Bt=NA.firstLayerIndex;Bt=1&&x[R]=R.glyphCount)){var AA=R.offsets[M];if(AA!==R.offsets[M+1]){var aA=this.font.stream;if(aA.pos=AA,!(aA.pos>=aA.length)){var oA=aA.readUInt16BE(),iA=AA+aA.readUInt16BE();if(32768&oA){var NA=aA.pos;aA.pos=iA;var kA=this.decodePoints();iA=aA.pos,aA.pos=NA}var ct=x.map(function(gn){return gn.copy()});oA&=4095;for(var _A=0;_A=R.globalCoordCount)throw new Error("Invalid gvar table");Dt=R.globalCoords[4095&pt]}if(16384&pt){for(var $t=[],_t=0;_tMath.max(0,x[NA]))return 0;iA=(iA*aA[NA]+Number.EPSILON)/(x[NA]+Number.EPSILON)}else{if(aA[NA]AA[NA])return 0;iA=aA[NA]oA)){var NA=AA,kA=AA;for(AA++;AA<=oA;)R[AA]&&(this.deltaInterpolate(kA+1,AA-1,kA,AA,x,M),kA=AA),AA++;kA===NA?this.deltaShift(aA,oA,kA,x,M):(this.deltaInterpolate(kA+1,oA,kA,NA,x,M),NA>0&&this.deltaInterpolate(aA,NA-1,kA,NA,x,M)),AA=oA+1}}},G.deltaInterpolate=function(M,x,R,AA,aA,oA){if(!(M>x))for(var iA=["x","y"],NA=0;NAaA[AA][kA]){var ct=R;R=AA,AA=ct}var _A=aA[R][kA],Bt=aA[AA][kA],pt=oA[R][kA],Dt=oA[AA][kA];if(_A!==Bt||pt===Dt)for(var Gt=_A===Bt?0:(Dt-pt)/(Bt-_A),$t=M;$t<=x;$t++){var _t=aA[$t][kA];_t<=_A?_t+=pt-_A:_t>=Bt?_t+=Dt-Bt:_t=pt+(_t-_A)*Gt,oA[$t][kA]=_t}}},G.deltaShift=function(M,x,R,AA,aA){var oA=aA[R].x-AA[R].x,iA=aA[R].y-AA[R].y;if(0!==oA||0!==iA)for(var NA=M;NA<=x;NA++)NA!==R&&(aA[NA].x+=oA,aA[NA].y+=iA)},G.getAdvanceAdjustment=function(M,x){var R,AA;if(x.advanceWidthMapping){var aA=M;aA>=x.advanceWidthMapping.mapCount&&(aA=x.advanceWidthMapping.mapCount-1);var iA=x.advanceWidthMapping.mapData[aA];R=iA.outerIndex,AA=iA.innerIndex}else R=0,AA=M;return this.getDelta(x.itemVariationStore,R,AA)},G.getDelta=function(M,x,R){if(x>=M.itemVariationData.length)return 0;var AA=M.itemVariationData[x];if(R>=AA.deltaSets.length)return 0;for(var aA=AA.deltaSets[R],oA=this.getBlendVector(M,x),iA=0,NA=0;NA_A.peakCoord||_A.peakCoord>_A.endCoord||_A.startCoord<0&&_A.endCoord>0&&0!==_A.peakCoord||0===_A.peakCoord?1:AA[ct]<_A.startCoord||AA[ct]>_A.endCoord?0:AA[ct]===_A.peakCoord?1:AA[ct]<_A.peakCoord?(AA[ct]-_A.startCoord+Number.EPSILON)/(_A.peakCoord-_A.startCoord+Number.EPSILON):(_A.endCoord-AA[ct]+Number.EPSILON)/(_A.endCoord-_A.peakCoord+Number.EPSILON)}aA[oA]=iA}return this.blendVectors.set(R,aA),aA},tA}(),gl=Promise.resolve(),Wa=function(){function tA(V){this.font=V,this.glyphs=[],this.mapping={},this.includeGlyph(0)}var G=tA.prototype;return G.includeGlyph=function(M){return"object"==typeof M&&(M=M.id),null==this.mapping[M]&&(this.glyphs.push(M),this.mapping[M]=this.glyphs.length-1),this.mapping[M]},G.encodeStream=function(){var M=this,x=new e.EncodeStream;return gl.then(function(){return M.encode(x),x.end()}),x},tA}(),Za=function(){function tA(){}return tA.size=function(V){return V>=0&&V<=255?1:2},tA.encode=function(V,M){M>=0&&M<=255?V.writeUInt8(M):V.writeInt16BE(M)},tA}(),Xa=new e.Struct({numberOfContours:e.int16,xMin:e.int16,yMin:e.int16,xMax:e.int16,yMax:e.int16,endPtsOfContours:new e.Array(e.uint16,"numberOfContours"),instructions:new e.Array(e.uint8,e.uint16),flags:new e.Array(e.uint8,0),xPoints:new e.Array(Za,0),yPoints:new e.Array(Za,0)}),Cl=function(){function tA(){}var G=tA.prototype;return G.encodeSimple=function(M,x){void 0===x&&(x=[]);for(var R=[],AA=[],aA=[],oA=[],iA=0,NA=0,kA=0,ct=0,_A=0,Bt=0;Bt0&&(oA.push(iA),iA=0),oA.push(_t),ct=_t),NA=Gt,kA=$t,_A++}"closePath"===pt.command&&R.push(_A-1)}M.commands.length>1&&"closePath"!==M.commands[M.commands.length-1].command&&R.push(_A-1);var Ce=M.bbox,He={numberOfContours:R.length,xMin:Ce.minX,yMin:Ce.minY,xMax:Ce.maxX,yMax:Ce.maxY,endPtsOfContours:R,instructions:x,flags:oA,xPoints:AA,yPoints:aA},sn=Xa.size(He),Je=4-sn%4,le=new e.EncodeStream(sn+Je);return Xa.encode(le,He),0!==Je&&le.fill(0,Je),le.buffer},G._encodePoint=function(M,x,R,AA,aA,oA){var iA=M-x;return M===x?AA|=oA:(-255<=iA&&iA<=255&&(AA|=aA,iA<0?iA=-iA:AA|=oA),R.push(iA)),AA},tA}(),Ql=function(tA){function G(M){var x;return(x=tA.call(this,M)||this).glyphEncoder=new Cl,x}h(G,tA);var V=G.prototype;return V._addGlyph=function(x){var R=this.font.getGlyph(x),AA=R._decode(),aA=this.font.loca.offsets[x],oA=this.font.loca.offsets[x+1],iA=this.font._getTableStream("glyf");iA.pos+=aA;var NA=iA.readBuffer(oA-aA);if(AA&&AA.numberOfContours<0){NA=c.from(NA);for(var ct,kA=B(AA.components);!(ct=kA()).done;){var _A=ct.value;x=this.includeGlyph(_A.glyphID),NA.writeUInt16BE(x,_A.pos)}}else AA&&this.font._variationProcessor&&(NA=this.glyphEncoder.encodeSimple(R.path,AA.instructions));return this.glyf.push(NA),this.loca.offsets.push(this.offset),this.hmtx.metrics.push({advance:R.advanceWidth,bearing:R._getMetrics().leftBearing}),this.offset+=NA.length,this.glyf.length-1},V.encode=function(x){this.glyf=[],this.offset=0,this.loca={offsets:[],version:this.font.loca.version},this.hmtx={metrics:[],bearings:[]};for(var R=0;R255?2:1,ranges:[{first:1,nLeft:this.charstrings.length-2}]},AA=Object.assign({},this.cff.topDict);AA.Private=null,AA.charset=R,AA.Encoding=null,AA.CharStrings=this.charstrings;for(var aA=0,oA=["version","Notice","Copyright","FullName","FamilyName","Weight","PostScript","BaseFontName","FontName"];aA0&&Object.defineProperty(this,x,{get:this._getTable.bind(this,R)})}}tA.probe=function(M){var x=M.toString("ascii",0,4);return"true"===x||"OTTO"===x||x===String.fromCharCode(0,1,0,0)};var G=tA.prototype;return G.setDefaultLanguage=function(M){void 0===M&&(M=null),this.defaultLanguage=M},G._getTable=function(M){if(!(M.tag in this._tables))try{this._tables[M.tag]=this._decodeTable(M)}catch(x){v.logErrors&&(console.error("Error decoding table ".concat(M.tag)),console.error(x.stack))}return this._tables[M.tag]},G._getTableStream=function(M){var x=this.directory.tables[M];return x?(this.stream.pos=x.offset,this.stream):null},G._decodeDirectory=function(){return this.directory=ci.decode(this.stream,{_startOffset:0})},G._decodeTable=function(M){var x=this.stream.pos,R=this._getTableStream(M.tag),AA=se[M.tag].decode(R,this,M.length);return this.stream.pos=x,AA},G.getName=function(M,x){void 0===x&&(x=this.defaultLanguage||v.defaultLanguage);var R=this.name&&this.name.records[M];return R&&(R[x]||R[this.defaultLanguage]||R[v.defaultLanguage]||R.en||R[Object.keys(R)[0]])||null},G.hasGlyphForCodePoint=function(M){return!!this._cmapProcessor.lookup(M)},G.glyphForCodePoint=function(M){return this.getGlyph(this._cmapProcessor.lookup(M),[M])},G.glyphsForString=function(M){for(var x=[],R=M.length,AA=0,aA=-1,oA=-1;AA<=R;){var iA=0,NA=0;if(AA>>6&3},transformed:function(G){return"glyf"===G.tag||"loca"===G.tag?0===G.transformVersion:0!==G.transformVersion},transformLength:new e.Optional(_a,function(tA){return tA.transformed})}),$a=new e.Struct({tag:new e.String(4),flavor:e.uint32,length:e.uint32,numTables:e.uint16,reserved:new e.Reserved(e.uint16),totalSfntSize:e.uint32,totalCompressedSize:e.uint32,majorVersion:e.uint16,minorVersion:e.uint16,metaOffset:e.uint32,metaLength:e.uint32,metaOrigLength:e.uint32,privOffset:e.uint32,privLength:e.uint32,tables:new e.Array(vl,"numTables")});$a.process=function(){for(var tA={},G=0;G0){for(var iA=[],NA=0,kA=0;kA>7);if((iA&=127)<10)aA=0,oA=nr(iA,((14&iA)<<7)+G.readUInt8());else if(iA<20)aA=nr(iA,((iA-10&14)<<7)+G.readUInt8()),oA=0;else if(iA<84)aA=nr(iA,1+(48&(kA=iA-20))+((ct=G.readUInt8())>>4)),oA=nr(iA>>1,1+((12&kA)<<2)+(15&ct));else if(iA<120){var kA;aA=nr(iA,1+((kA=iA-84)/12<<8)+G.readUInt8()),oA=nr(iA>>1,1+(kA%12>>2<<8)+G.readUInt8())}else if(iA<124){var ct=G.readUInt8(),_A=G.readUInt8();aA=nr(iA,(ct<<4)+(_A>>4)),oA=nr(iA>>1,((15&_A)<<8)+G.readUInt8())}else aA=nr(iA,G.readUInt16BE()),oA=nr(iA>>1,G.readUInt16BE());R.push(new cr(NA,!1,x+=aA,M+=oA))}return R}var Yl=new e.VersionedStruct(e.uint32,{65536:{numFonts:e.uint32,offsets:new e.Array(e.uint32,"numFonts")},131072:{numFonts:e.uint32,offsets:new e.Array(e.uint32,"numFonts"),dsigTag:e.uint32,dsigLength:e.uint32,dsigOffset:e.uint32}}),Tl=function(){function tA(V){if(this.stream=V,"ttcf"!==V.readString(4))throw new Error("Not a TrueType collection");this.header=Yl.decode(V)}return tA.probe=function(M){return"ttcf"===M.toString("ascii",0,4)},tA.prototype.getFont=function(M){for(var R,x=B(this.header.offsets);!(R=x()).done;){var AA=R.value,aA=new e.DecodeStream(this.stream.buffer);aA.pos=AA;var oA=new yr(aA);if(oA.postscriptName===M)return oA}return null},l(tA,[{key:"fonts",get:function(){for(var R,M=[],x=B(this.header.offsets);!(R=x()).done;){var AA=R.value,aA=new e.DecodeStream(this.stream.buffer);aA.pos=AA,M.push(new yr(aA))}return M}}]),tA}(),Sl=new e.String(e.uint8),Nl=(new e.Struct({len:e.uint32,buf:new e.Buffer("len")}),new e.Struct({id:e.uint16,nameOffset:e.int16,attr:e.uint8,dataOffset:e.uint24,handle:e.uint32})),Ul=new e.Struct({name:new e.String(4),maxTypeIndex:e.uint16,refList:new e.Pointer(e.uint16,new e.Array(Nl,function(tA){return tA.maxTypeIndex+1}),{type:"parent"})}),Pl=new e.Struct({length:e.uint16,types:new e.Array(Ul,function(tA){return tA.length+1})}),Rl=new e.Struct({reserved:new e.Reserved(e.uint8,24),typeList:new e.Pointer(e.uint16,Pl),nameListOffset:new e.Pointer(e.uint16,"void")}),eo=new e.Struct({dataOffset:e.uint32,map:new e.Pointer(e.uint32,Rl),dataLength:e.uint32,mapLength:e.uint32}),zl=function(){function tA(V){this.stream=V,this.header=eo.decode(this.stream);for(var x,M=B(this.header.map.typeList.types);!(x=M()).done;){for(var aA,R=x.value,AA=B(R.refList);!(aA=AA()).done;){var oA=aA.value;oA.nameOffset>=0?(this.stream.pos=oA.nameOffset+this.header.map.nameListOffset,oA.name=Sl.decode(this.stream)):oA.name=null}"sfnt"===R.name&&(this.sfnt=R)}}return tA.probe=function(M){var x=new e.DecodeStream(M);try{var R=eo.decode(x)}catch(iA){return!1}for(var aA,AA=B(R.map.typeList.types);!(aA=AA()).done;)if("sfnt"===aA.value.name)return!0;return!1},tA.prototype.getFont=function(M){if(!this.sfnt)return null;for(var R,x=B(this.sfnt.refList);!(R=x()).done;){var oA=new e.DecodeStream(this.stream.buffer.slice(this.header.dataOffset+R.value.dataOffset+4)),iA=new yr(oA);if(iA.postscriptName===M)return iA}return null},l(tA,[{key:"fonts",get:function(){for(var R,M=[],x=B(this.sfnt.refList);!(R=x()).done;){var oA=new e.DecodeStream(this.stream.buffer.slice(this.header.dataOffset+R.value.dataOffset+4));M.push(new yr(oA))}return M}}]),tA}();v.registerFormat(yr),v.registerFormat(pl),v.registerFormat(Ao),v.registerFormat(Tl),v.registerFormat(zl),T.exports=v},7337:function(T,I,n){"use strict";var c=n(4781),i=n(9742),o=n(2055),l=o.BK,h=o.CR,a=o.LF,B=o.NL,E=o.SG,u=o.WJ,C=o.SP,e=o.ZWJ,f=o.BA,g=o.HY,w=o.NS,Q=o.AI,p=o.AL,Y=o.CJ,y=o.HL,d=o.RI,m=o.SA,v=o.XX,P=n(8383),S=P.DI_BRK,F=P.IN_BRK,z=P.CI_BRK,U=P.CP_BRK,sA=P.pairTable,BA=new c(i.toByteArray("AAgOAAAAAACA3QAAAe0OEvHtnXuMXUUdx+d2d2/33r237V3YSoFC11r6IGgbRFBEfFF5KCVCMYKFaKn8AYqmwUeqECFabUGQipUiNCkgSRElUkKwJRWtwSpJrZpCI4E2NQqiBsFGwWL8Tu6Md3Z23o9zbund5JM5c+b1m9/85nnOuXtTHyFrwXpwL9gBngTPgj+Dv4H9Ae4B0N9PSAMcDqaB0X57urmIs8AQ72SEnQ4+ABaBxWAJWAquENJ9BtdfANeCleBGcCv4NvgeuBv8AGwCm8FWlpbzOPw7wC7wFNgDngMvgpfAq2DCACF10ACHgaPAzIF2+PFwT2Th1P8OuO8FZ4MPggvAxWAp+A6VHe5ysILFvx7u6oF2+Wvg3g7uYvlT+TbC/TH4CdgCtoGtfW3/E2An8++Gu5eleR7uP8B+8BoLf4LFH6i23Vp1rB5a1Q7TGMeCUYYY18RcxF0gxT8H5b3dIw8X3iPkdxauPwQWgyVgWbVT30/h+mrwZan8r8L/FcEWVsJ/E1grpKXcwdLdI9y/H9cPgUerbbun0PadCHcbjQd+D55mafcx9y9wXwKvCLJUJiLdRH09ef4xupqE/KeCY8Bx4M3gbeBdYCE4G3wYXASWgGXgSibTcuaugHs9WA3WgNvBBha2Ee4D4GFNPTYL9x/D9XaJXwnXvwW7wDPgTzQd2A9eAwODhDTBCJgOZoETwEngtEFmF3DPAouY/0K4Swb9dbaMpbkS7nKP9CsCyrpOSrNK8K9kNnYL7q0DGwbb/XnjoDv3gQfBZvBz8GvwO/AHdr3Pkv4F4fplj3J79OgRBx8HypajR48ePXr06NGjx8HFv7pABhX/HRx7HqKjr9Y+y6PXg7X2WRoPm1Kzpz8CcWaweLPhHt/fPq95C65PZnmfDnchOLfWPo/7OLgQ15ewdJ+E++na2PMhyudw72bDGc01CP8aWAm+Dr4BVoHV4IZeWC+sF9YL64UlD1sD1oE7au0z0zK5p1YuZde/R49uJnYdez/62EPgkVr4c7pHkfYXivTbcW8n2A32gOekOH+F/5/gAOivE9IArXpbrmlwR+vljz9bJrV552RCvgQ2GXgRzJ9CyGVTxofdLd17Gv6jW4RcAG5ote/9FO4B8NZhQs4DN4O9kOFY6OFSsB48C/qGCFkAyERCzh9q+0WuA2sqHX4m+Smv4t6RjXYelItwvQ7sBtOahHwU3NYcn+5Q4pFmRz89evTocajxStM898/FfLSgrg8/sT5+zcLDTkXY+6S0C+E/l907SXO+Rt/Lujrxe1kmztPU70JDvSmXILwJWS9TxLuC3VtuycPGCoV+VfD41yvKW6W4d1O9/S5YtZ+Qtbi+k/m/D/eHYBPzb4G7DfyS+enZ42/qnXPFp+pjZdgD/yX0XcV6+93DF+H+G5AhtcxPIs/BoY5cg0g7RRGXx/8Ewo8Y6vhp/Bnwz2F5zId7CgunZ6Dv1uTF0585pNY7P9NdhPCPDI1Ncyn8l4OrwHKwguVB12WrNPnpoPW5BWluA3eCuxRl3cfyfFCom43NBjkeQ9h2Tzlzs7PL5CmD3UwHew26+KMm7AVHu8hJaL1fTtj29L3E/wi6oPvWvkY7bAjucKOYtpymKWdGo/3e5KxGR8YTGvmfZ4XW46RGmnMIG6excs6Ae46nPuh7pGXbvm/fOB91vLhRXvkmlkKuK8BnFTb8xYL6TyqugbzXJZCZ9tlVrO9+C+53G5134A8G1htsjdbvXoT/KEBPmwq04dS2v6UxNnxbAXV5gul4Z6J+tMtBZtv4+Qzy2Ndof+fwPHP/zsbg/QFz02tIM4B9ZRO0mp379NxxBpgD5gv3T8H16eAMcCZYxMIWw/2YEG8pri9n/qvgfr45fm67VtjPzmbpVrJ7NzL3VrjvF/Jdh+sN3M/cB+A+LOV/bVNdX13b0G9KtmrSHCo8jvqfGjFu7WiWP37E8s2+yv8ZwVbYRgvMAm9kvMkhjStzAZbIBGIR+ngAy2NSZ9f0Hv2bIIShCckU5k5sb+OdGGQ0BKqSPzeE1WFCgWXK5dO2rDD/COn9zTvEUfXJ4zT3c9DP2oH2+ZoAtc9RBr/mY0SLdGyap+Nxh6W0In2Sn5C8/W00c/7dXn63we1DtAHud9WZbFNimmFL2iIoqt8eDPQHptERIkNoO8prFVvblm13OaG6oGM+n7P4/RrRz2HdTktotxHFdZW5tvm72UWEtm9dQF6n++hU1FmVFL++L2Nsdt3/1IVrWaacda4Se91t+pHDVXF5HFd9pG7X14NNyePr6wkfPTRI+H6qDPvLqRM5DR2beZ8W95Divq0IWXXyy/d18Yq09ZhyY/fyPjafY37yta8ybD9l3W15+crXYhQ5rsj2Wkb7iDadon1c+tKI4p5NR6HjPl/vqvLm92uK8lTjWNntkwJTu9hkiJmHVf3S1V5UOii6PWL1nVqOkP5QI/b2L2o+Kqr/h9i0bHNl9HudnKn0btKBbZzItQ7n47Drmutg6P+ubZK7/5va0PU8XZS56DP4Isci07gUo3/fscdlfMyp6xR6dy0vt/275K1bJ8qkHI99bdK3v4vt4Gtzs7sEWa5aZH4NDz3yfWG368bXLlQ6GZYQ7/UL1y3mryroZ+nkZwK28SD1vlt+7sNd+lcR3Ji1RKq1WcvhftFzousYxftH7Ngu2pZubcGfD8eMizp5Y/uha/m69NNK5siSOapkcq2lTOOGvE4y9aPclFl20eXTvwoZO374ymob90Jx3Zfk2h/I849q7VNE+WXsj+ZFlJ96Xcd1PyD4ue2J69/Q9V+u9uPrQC7/sHRftjE+n+eQP2Ztl5Kc+0TX/WND8vP2iF23xO7lfO3XtKfLhUm/PE6Ze78RD/3Fknr8i907yWsoUx+M3S+0SNjcHyu7qg6+aYvqF671TLXfTzU+2uaTnOOzbFc+7yHoZE59npIL175kay/ZxlKMH6a+NSJdl90XKXytpbMpTr/kP5zJfqxQDzneYWTstxh9pPPdYJ/CL8alTBag+fFvHFXtQMutWxBloOUMMHS6GWSyVYS4pvgmexXtVjc/TFWk9ZnnZLt3+caI10/8Xkb+hsYlfeh+QOyPNQN1S7hv2nqivEVSj/Ex+1lu73Ib1olbu4jpfN4ddbWbHN+/mcpWfUem+g7RhK4833SuepHbN0d5PjKF1kUll3xPFc5d+btTW9uqdCHXwaQ7kw252ENIW9vKTdEfTLox+VPYT6r8XXUWq7tYuXyZnEAG+ic+pwyVdRLDp8wcOp0kEZNXzLyqw3f+yEkjMI1sFznk8ulDKcoKlcFVlz75qPyu9+U8YuvnqnfXNDn6t6neNr3xfHj4JEU500ma8SSkjjodptBlTLurbI7rTxUnhcxF6d9W76KRbd6G3DdVNj2qia/qD3KY2O90elLJocpHJc90Q7kqVLqaLlGUjYj+Pg00jD8Xk+Wnf5UAN8c8HGrvXKYi+4irnsoo09ctU29Fll2UraSyaxnTOar8DFw+w60St+cRNlzfm9E9y9CNUTZM5/7iOTWR6imOgaKf/pn6hJw/f8dDdS6u0tNhDN1ZOlGUoauTrqyQNvCd21Mjy8N/T7AixBkQrm3tRKS0tngDwrWYzobuLFwXV3WfP5uR9TGTXdvc3BRVjq18l3rbwmaS8c9QByR4m3Sb/lPVX2V/M4naDkV79GFmJDad2NaLOdpBpxsbvs+/YubgVPO5bn3h+75BahnEOU/EVb+yTL7vQeTQp04GH/twfTYaCv9ehe8XXdZ0Ic+IY94Hcik/9h0Zk35c7MdWXo737HM/y6dllPENj9zeuvq7vMMYam88fZnfU7nOHznf6/AdP+W8ffXv2q6uelDlE1N/Wx+Prb/MG8ARBVJ0eb7rz5Tf6sl5l/G9nizDnJLJudZoaNqU/hbsCPH73dhu+03aWPiZhW9/yLHf8IGvT1OtzwZJ56yG/7YvX5sSdn+yof6x5av2ebxcV1dOZ9pDVgSXys/36uLzG1s5Nvj7pKo9axm2zsueylxeT1lWlQ4rkuuzx5f3+VXPPGIhgbLnKp/rtiJdcz2lOtMpAtMZV27E/kRttyaF83dFbf3NdYwXx6sZpH0uVkZ/VslmOrspa24V1+O56u3TdmXpQdaJy36wLPm4LZVR7jyp/CLOmULtzeWZoqstuLS9rhzTmqwIe3LVia0f2OSP3c/71Ec8V0itv6JtONbOXdb3Oc5YdcTaQVFzRWg7+z6HydnHy+qPoWO+j1yq8anofifWl7ri97chNiq/z6KyM37t8333sJR/SF/3bUvd+z+8nV3KNPWfIvt3mfNZijFAZT8xfXSekLfOtl3rHCuPzxrEdT7U9UvRjn3HKV5/XTuo2i3n+E3L5L+3yN+TkH+z07ZGDlkviuXLcX3aL7b+8m+duhCzJonp/yF9wabPItZhJmJ/N8pVfvn31Fok7PeiYsalFON4bPnyuOO7Ru2G+S52fqB5DAt55bJtXf2LtJdQParCVevHlqcufduvKJuQ5yxxvA/Zw6W0l5D3+nz7a4wdieXxd+FS2SjPN7Z9XXDRp62/dMv4GTM22uwx1/iTe7zTUSfjf1Mqld36EHv2xvPoprMnGfGvIiDHk+/x+EQTP7fMOjl928f0/855OTnaJ5XeQsevVHNojO5147ePXLH681mDqOBhqef/Ivp+7PMF1Vxs02kMITLK30zp/k+FbX1RdP/w1b2OMt9hiR1bKLHfZ+XWT+4+ahqzVM8iUug81r5tfTf3+JB6DPFpk1zllLUu9523cpPLdlR6zTVP+bShGFd1lh/Td33rVdT44WqTtjqktOtc87osc8x5hM9vyLrK49v+Pvmp7De0/vyvLJvk1C3+1OOyLyG/aSSud1L/TlLq/BoZ5M2xNj66IFRlT9fcT4GqDYosQ3df/G0zlR5U4UVzjAJZPpW8NlLI5lOejzwq+eS4rnWZbsjTx7ZUrq4sXdrQPmAa82Pb0HVuyZl3rrrZ7Nal/ULzdy0zBUXrMaQcU18v6ncmxd9eM/1fkdQ24Tvu+paZ2q5S6z13+anlTyVfrv4aWz/desfFfn3WEj727rNGKHJdlqsM1VompjzT+shXv7F75dj3J3K3qY7QM7DcZ2L/Aw==")),pA=function(FA){switch(FA){case Q:case m:case E:case v:return p;case Y:return w;default:return FA}},lA=function(FA){switch(FA){case a:case B:return l;case C:return u;default:return FA}},cA=function(FA,_){void 0===_&&(_=!1),this.position=FA,this.required=_};T.exports=function(){function yA(_){this.string=_,this.pos=0,this.lastPos=0,this.curClass=null,this.nextClass=null,this.LB8a=!1,this.LB21a=!1,this.LB30a=0}var FA=yA.prototype;return FA.nextCodePoint=function(){var MA=this.string.charCodeAt(this.pos++),uA=this.string.charCodeAt(this.pos);return 55296<=MA&&MA<=56319&&56320<=uA&&uA<=57343?(this.pos++,1024*(MA-55296)+(uA-56320)+65536):MA},FA.nextCharClass=function(){return pA(BA.get(this.nextCodePoint()))},FA.getSimpleBreak=function(){switch(this.nextClass){case C:return!1;case l:case a:case B:return this.curClass=l,!1;case h:return this.curClass=h,!1}return null},FA.getPairTableBreak=function(MA){var uA=!1;switch(sA[this.curClass][this.nextClass]){case S:uA=!0;break;case F:uA=MA===C;break;case z:if(!(uA=MA===C))return!1;break;case U:if(MA!==C)return uA}return this.LB8a&&(uA=!1),!this.LB21a||this.curClass!==g&&this.curClass!==f?this.LB21a=this.curClass===y:(uA=!1,this.LB21a=!1),this.curClass===d?(this.LB30a++,2==this.LB30a&&this.nextClass===d&&(uA=!0,this.LB30a=0)):this.LB30a=0,this.curClass=this.nextClass,uA},FA.nextBreak=function(){if(null==this.curClass){var MA=this.nextCharClass();this.curClass=lA(MA),this.nextClass=MA,this.LB8a=MA===e,this.LB30a=0}for(;this.pos=XA)return $;switch($){case"%s":return String(bA[SA++]);case"%d":return Number(bA[SA++]);case"%j":try{return JSON.stringify(bA[SA++])}catch(W){return"[Circular]"}default:return $}}),O=bA[SA];SA=3&&(SA.depth=arguments[2]),arguments.length>=4&&(SA.colors=arguments[3]),y(QA)?SA.showHidden=QA:QA&&I._extend(SA,QA),F(SA.showHidden)&&(SA.showHidden=!1),F(SA.depth)&&(SA.depth=2),F(SA.colors)&&(SA.colors=!1),F(SA.customInspect)&&(SA.customInspect=!0),SA.colors&&(SA.stylize=E),e(SA,uA,SA.depth)}function E(uA,QA){var SA=B.styles[QA];return SA?"\x1b["+B.colors[SA][0]+"m"+uA+"\x1b["+B.colors[SA][1]+"m":uA}function u(uA,QA){return uA}function e(uA,QA,SA){if(uA.customInspect&&QA&&q(QA.inspect)&&QA.inspect!==I.inspect&&(!QA.constructor||QA.constructor.prototype!==QA)){var bA=QA.inspect(SA,uA);return P(bA)||(bA=e(uA,bA,SA)),bA}var XA=function f(uA,QA){if(F(QA))return uA.stylize("undefined","undefined");if(P(QA)){var SA="'"+JSON.stringify(QA).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return uA.stylize(SA,"string")}return v(QA)?uA.stylize(""+QA,"number"):y(QA)?uA.stylize(""+QA,"boolean"):d(QA)?uA.stylize("null","null"):void 0}(uA,QA);if(XA)return XA;var X=Object.keys(QA),O=function C(uA){var QA={};return uA.forEach(function(SA,bA){QA[SA]=!0}),QA}(X);if(uA.showHidden&&(X=Object.getOwnPropertyNames(QA)),sA(QA)&&(X.indexOf("message")>=0||X.indexOf("description")>=0))return g(QA);if(0===X.length){if(q(QA))return uA.stylize("[Function"+(QA.name?": "+QA.name:"")+"]","special");if(z(QA))return uA.stylize(RegExp.prototype.toString.call(QA),"regexp");if(eA(QA))return uA.stylize(Date.prototype.toString.call(QA),"date");if(sA(QA))return g(QA)}var EA,W="",hA=!1,vA=["{","}"];return Y(QA)&&(hA=!0,vA=["[","]"]),q(QA)&&(W=" [Function"+(QA.name?": "+QA.name:"")+"]"),z(QA)&&(W=" "+RegExp.prototype.toString.call(QA)),eA(QA)&&(W=" "+Date.prototype.toUTCString.call(QA)),sA(QA)&&(W=" "+g(QA)),0!==X.length||hA&&0!=QA.length?SA<0?z(QA)?uA.stylize(RegExp.prototype.toString.call(QA),"regexp"):uA.stylize("[Object]","special"):(uA.seen.push(QA),EA=hA?function w(uA,QA,SA,bA,XA){for(var X=[],O=0,$=QA.length;O<$;++O)yA(QA,String(O))?X.push(Q(uA,QA,SA,bA,String(O),!0)):X.push("");return XA.forEach(function(W){W.match(/^\d+$/)||X.push(Q(uA,QA,SA,bA,W,!0))}),X}(uA,QA,SA,O,X):X.map(function(GA){return Q(uA,QA,SA,O,GA,hA)}),uA.seen.pop(),function p(uA,QA,SA){return uA.reduce(function(X,O){return O.indexOf("\n"),X+O.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?SA[0]+(""===QA?"":QA+"\n ")+" "+uA.join(",\n ")+" "+SA[1]:SA[0]+QA+" "+uA.join(", ")+" "+SA[1]}(EA,W,vA)):vA[0]+W+vA[1]}function g(uA){return"["+Error.prototype.toString.call(uA)+"]"}function Q(uA,QA,SA,bA,XA,X){var O,$,W;if((W=Object.getOwnPropertyDescriptor(QA,XA)||{value:QA[XA]}).get?$=uA.stylize(W.set?"[Getter/Setter]":"[Getter]","special"):W.set&&($=uA.stylize("[Setter]","special")),yA(bA,XA)||(O="["+XA+"]"),$||(uA.seen.indexOf(W.value)<0?($=d(SA)?e(uA,W.value,null):e(uA,W.value,SA-1)).indexOf("\n")>-1&&($=X?$.split("\n").map(function(hA){return" "+hA}).join("\n").substr(2):"\n"+$.split("\n").map(function(hA){return" "+hA}).join("\n")):$=uA.stylize("[Circular]","special")),F(O)){if(X&&XA.match(/^\d+$/))return $;(O=JSON.stringify(""+XA)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(O=O.substr(1,O.length-2),O=uA.stylize(O,"name")):(O=O.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),O=uA.stylize(O,"string"))}return O+": "+$}function Y(uA){return Array.isArray(uA)}function y(uA){return"boolean"==typeof uA}function d(uA){return null===uA}function v(uA){return"number"==typeof uA}function P(uA){return"string"==typeof uA}function F(uA){return void 0===uA}function z(uA){return U(uA)&&"[object RegExp]"===pA(uA)}function U(uA){return"object"==typeof uA&&null!==uA}function eA(uA){return U(uA)&&"[object Date]"===pA(uA)}function sA(uA){return U(uA)&&("[object Error]"===pA(uA)||uA instanceof Error)}function q(uA){return"function"==typeof uA}function pA(uA){return Object.prototype.toString.call(uA)}function lA(uA){return uA<10?"0"+uA.toString(10):uA.toString(10)}I.debuglog=function(uA){if(uA=uA.toUpperCase(),!l[uA])if(h.test(uA)){var QA=c.pid;l[uA]=function(){var SA=I.format.apply(I,arguments);console.error("%s %d: %s",uA,QA,SA)}}else l[uA]=function(){};return l[uA]},I.inspect=B,B.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},B.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},I.types=n(5955),I.isArray=Y,I.isBoolean=y,I.isNull=d,I.isNullOrUndefined=function m(uA){return null==uA},I.isNumber=v,I.isString=P,I.isSymbol=function S(uA){return"symbol"==typeof uA},I.isUndefined=F,I.isRegExp=z,I.types.isRegExp=z,I.isObject=U,I.isDate=eA,I.types.isDate=eA,I.isError=sA,I.types.isNativeError=sA,I.isFunction=q,I.isPrimitive=function BA(uA){return null===uA||"boolean"==typeof uA||"number"==typeof uA||"string"==typeof uA||"symbol"==typeof uA||void 0===uA},I.isBuffer=n(384);var cA=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function gA(){var uA=new Date,QA=[lA(uA.getHours()),lA(uA.getMinutes()),lA(uA.getSeconds())].join(":");return[uA.getDate(),cA[uA.getMonth()],QA].join(" ")}function yA(uA,QA){return Object.prototype.hasOwnProperty.call(uA,QA)}I.log=function(){console.log("%s - %s",gA(),I.format.apply(I,arguments))},I.inherits=n(5717),I._extend=function(uA,QA){if(!QA||!U(QA))return uA;for(var SA=Object.keys(QA),bA=SA.length;bA--;)uA[SA[bA]]=QA[SA[bA]];return uA};var FA="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function _(uA,QA){if(!uA){var SA=new Error("Promise was rejected with a falsy value");SA.reason=uA,uA=SA}return QA(uA)}I.promisify=function(QA){if("function"!=typeof QA)throw new TypeError('The "original" argument must be of type Function');if(FA&&QA[FA]){var SA;if("function"!=typeof(SA=QA[FA]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(SA,FA,{value:SA,enumerable:!1,writable:!1,configurable:!0}),SA}function SA(){for(var bA,XA,X=new Promise(function(W,hA){bA=W,XA=hA}),O=[],$=0;$1?v.attr[m[1]]:v.val},i.prototype.toString=function(d){return this.toStringWithIndent("",d)},i.prototype.toStringWithIndent=function(d,m){var v=d+"<"+this.name,P=m&&m.compressed?"":"\n";for(var F in this.attr)Object.prototype.hasOwnProperty.call(this.attr,F)&&(v+=" "+F+'="'+Y(this.attr[F])+'"');if(1===this.children.length&&"element"!==this.children[0].type)v+=">"+this.children[0].toString(m)+"";else if(this.children.length){v+=">"+P;for(var z=d+(m&&m.compressed?"":" "),U=0,eA=this.children.length;U"}else m&&m.html?-1!==["area","base","br","col","embed","frame","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"].indexOf(this.name)?v+="/>":v+=">":v+="/>";return v},o.prototype.toString=function(d){return y(Y(this.text),d)},o.prototype.toStringWithIndent=function(d,m){return d+this.toString(m)},l.prototype.toString=function(d){return""},l.prototype.toStringWithIndent=function(d,m){return d+this.toString(m)},h.prototype.toString=function(d){return"\x3c!--"+y(Y(this.comment),d)+"--\x3e"},h.prototype.toStringWithIndent=function(d,m){return d+this.toString(m)},i.prototype.type="element",o.prototype.type="text",l.prototype.type="cdata",h.prototype.type="comment",function p(d,m){for(var v in m)m.hasOwnProperty(v)&&(d[v]=m[v])}(a.prototype,i.prototype),a.prototype._opentag=function(d){void 0===this.children?i.call(this,d):i.prototype._opentag.apply(this,arguments)},a.prototype._doctype=function(d){this.doctype+=d};var B=null;function u(){B[0]&&B[0]._opentag.apply(B[0],arguments)}function C(){B[0]&&B[0]._closetag.apply(B[0],arguments)}function e(){B[0]&&B[0]._text.apply(B[0],arguments)}function f(){B[0]&&B[0]._cdata.apply(B[0],arguments)}function g(){B[0]&&B[0]._comment.apply(B[0],arguments)}function w(){B[0]&&B[0]._doctype.apply(B[0],arguments)}function Q(){B[0]&&B[0]._error.apply(B[0],arguments)}function Y(d){return d.toString().replace(/&/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")}function y(d,m){var v=d;return m&&m.trimmed&&d.length>25&&(v=v.substring(0,25).trim()+"\u2026"),m&&m.preserveWhitespace||(v=v.trim()),v}T.exports&&!n.g.xmldocAssumeBrowser?T.exports.XmlDocument=a:this.XmlDocument=a}()},6255:function(T,I,n){"use strict";"undefined"!=typeof window&&!window.Promise&&n(3867),n(4667);function i(o){this.fs=o,this.resolving={}}i.prototype.resolve=function(o,l){if(!this.resolving[o]){var h=this;this.resolving[o]=new Promise(function(a,B){0===o.toLowerCase().indexOf("https://")||0===o.toLowerCase().indexOf("http://")?function(o,l){return new Promise(function(h,a){var B=new XMLHttpRequest;for(var E in B.open("GET",o,!0),l)B.setRequestHeader(E,l[E]);B.responseType="arraybuffer",B.onreadystatechange=function(){4===B.readyState&&(B.status>=200&&B.status<300||setTimeout(function(){a(new TypeError('Failed to fetch (url: "'+o+'")'))},0))},B.onload=function(){B.status>=200&&B.status<300&&h(B.response)},B.onerror=function(){setTimeout(function(){a(new TypeError('Network request failed (url: "'+o+'")'))},0)},B.ontimeout=function(){setTimeout(function(){a(new TypeError('Network request failed (url: "'+o+'")'))},0)},B.send()})}(o,l).then(function(E){h.fs.writeFileSync(o,E),a()},function(E){B(E)}):a()})}return this.resolving[o]},i.prototype.resolved=function(){var o=this;return new Promise(function(l,h){Promise.all(Object.values(o.resolving)).then(function(){l()},function(a){h(a)})})},T.exports=i},4275:function(T,I,n){"use strict";var c=n(8823).Buffer,i=n(6225).isFunction,o=n(6225).isUndefined,a=(n(6225),n(1818).saveAs),B={Roboto:{normal:"Roboto-Regular.ttf",bold:"Roboto-Medium.ttf",italics:"Roboto-Italic.ttf",bolditalics:"Roboto-MediumItalic.ttf"}};function E(C,e,f,g){this.docDefinition=C,this.tableLayouts=e||null,this.fonts=f||B,this.vfs=g}E.prototype._createDoc=function(C,e){var f=function(P){return"object"==typeof P?{url:P.url,headers:P.headers}:{url:P,headers:{}}};C=C||{},this.tableLayouts&&(C.tableLayouts=this.tableLayouts);var w=new(n(8617))(this.fonts);if(n(3857).bindFS(this.vfs),!i(e))return w.createPdfKitDocument(this.docDefinition,C);var Y=new(n(6255))(n(3857));for(var y in this.fonts)if(this.fonts.hasOwnProperty(y)){if(this.fonts[y].normal){var d=f(this.fonts[y].normal);Y.resolve(d.url,d.headers),this.fonts[y].normal=d.url}this.fonts[y].bold&&(d=f(this.fonts[y].bold),Y.resolve(d.url,d.headers),this.fonts[y].bold=d.url),this.fonts[y].italics&&(d=f(this.fonts[y].italics),Y.resolve(d.url,d.headers),this.fonts[y].italics=d.url),this.fonts[y].bolditalics&&(d=f(this.fonts[y].bolditalics),Y.resolve(d.url,d.headers),this.fonts[y].bolditalics=d.url)}if(this.docDefinition.images)for(var m in this.docDefinition.images)this.docDefinition.images.hasOwnProperty(m)&&(d=f(this.docDefinition.images[m]),Y.resolve(d.url,d.headers),this.docDefinition.images[m]=d.url);var v=this;Y.resolved().then(function(){var P=w.createPdfKitDocument(v.docDefinition,C);e(P)},function(P){throw P})},E.prototype._flushDoc=function(C,e){var g,f=[];C.on("readable",function(){for(var w;null!==(w=C.read(9007199254740991));)f.push(w)}),C.on("end",function(){g=c.concat(f),e(g,C._pdfMakePages)}),C.end()},E.prototype._getPages=function(C,e){if(!e)throw"_getPages is an async method and needs a callback argument";var f=this;this._createDoc(C,function(g){f._flushDoc(g,function(w,Q){e(Q)})})},E.prototype._bufferToBlob=function(C){var e;try{e=new Blob([C],{type:"application/pdf"})}catch(g){if("InvalidStateError"===g.name){var f=new Uint8Array(C);e=new Blob([f.buffer],{type:"application/pdf"})}}if(!e)throw"Could not generate blob";return e},E.prototype._openWindow=function(){var C=window.open("","_blank");if(null===C)throw"Open PDF in new window blocked by browser";return C},E.prototype._openPdf=function(C,e){e||(e=this._openWindow());try{this.getBlob(function(f){var w=(window.URL||window.webkitURL).createObjectURL(f);e.location.href=w},C)}catch(f){throw e.close(),f}},E.prototype.open=function(C,e){(C=C||{}).autoPrint=!1,this._openPdf(C,e=e||null)},E.prototype.print=function(C,e){(C=C||{}).autoPrint=!0,this._openPdf(C,e=e||null)},E.prototype.download=function(C,e,f){i(C)&&(o(e)||(f=e),e=C,C=null),C=C||"file.pdf",this.getBlob(function(g){a(g,C),i(e)&&e()},f)},E.prototype.getBase64=function(C,e){if(!C)throw"getBase64 is an async method and needs a callback argument";this.getBuffer(function(f){C(f.toString("base64"))},e)},E.prototype.getDataUrl=function(C,e){if(!C)throw"getDataUrl is an async method and needs a callback argument";this.getBuffer(function(f){C("data:application/pdf;base64,"+f.toString("base64"))},e)},E.prototype.getBlob=function(C,e){if(!C)throw"getBlob is an async method and needs a callback argument";var f=this;this.getBuffer(function(g){var w=f._bufferToBlob(g);C(w)},e)},E.prototype.getBuffer=function(C,e){if(!C)throw"getBuffer is an async method and needs a callback argument";var f=this;this._createDoc(e,function(g){f._flushDoc(g,function(w){C(w)})})},E.prototype.getStream=function(C,e){if(!i(e))return this._createDoc(C);this._createDoc(C,function(g){e(g)})},T.exports={createPdf:function(C,e,f,g){if(!function u(){try{var C=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(C,e),42===C.foo()}catch(f){return!1}}())throw"Your browser does not provide the level of support needed";return new E(C,e||n.g.pdfMake.tableLayouts,f||n.g.pdfMake.fonts,g||n.g.pdfMake.vfs)}}},3857:function(T,I,n){"use strict";var i=n(8823).Buffer;function o(){this.fileSystem={},this.dataSystem={}}function l(h){return 0===h.indexOf("/")&&(h=h.substring("/".length)),0===h.indexOf("/")&&(h=h.substring(1)),h}o.prototype.existsSync=function(h){return h=l(h),void 0!==this.fileSystem[h]||void 0!==this.dataSystem[h]},o.prototype.readFileSync=function(h,a){h=l(h);var B=this.dataSystem[h];if("string"==typeof B&&"utf8"===a)return B;if(B)return new i(B,"string"==typeof B?"base64":void 0);var E=this.fileSystem[h];if(E)return E;throw"File '"+h+"' not found in virtual file system"},o.prototype.writeFileSync=function(h,a){this.fileSystem[l(h)]=a},o.prototype.bindFS=function(h){this.dataSystem=h||{}},T.exports=new o},4498:function(T,I,n){"use strict";var c=n(6225).isString;function o(a){return"auto"===a.width}function l(a){return null==a.width||"*"===a.width||"star"===a.width}T.exports={buildColumnWidths:function i(a,B){var E=[],u=0,C=0,e=[],f=0,g=0,w=[],Q=B;a.forEach(function(v){o(v)?(E.push(v),u+=v._minWidth,C+=v._maxWidth):l(v)?(e.push(v),f=Math.max(f,v._minWidth),g=Math.max(g,v._maxWidth)):w.push(v)}),w.forEach(function(v){c(v.width)&&/\d+%/.test(v.width)&&(v.width=parseFloat(v.width)*Q/100),v._calcWidth=v.width=B)E.forEach(function(v){v._calcWidth=v._minWidth}),e.forEach(function(v){v._calcWidth=f});else{if(Y0){var m=B/e.length;e.forEach(function(v){v._calcWidth=m})}}},measureMinMax:function h(a){for(var B={min:0,max:0},E={min:0,max:0},u=0,C=0,e=a.length;C=0;z--){var eA=w.styleStack.styleDictionary[S[z]];for(var sA in eA)eA.hasOwnProperty(sA)&&(F[sA]=eA[sA])}return F}function d(S){return h(S)?S=[S,S,S,S]:B(S)&&2===S.length&&(S=[S[0],S[1],S[0],S[1]]),S}var m=[void 0,void 0,void 0,void 0];if(g.style){var P=y(B(g.style)?g.style:[g.style]);P&&(m=Y(P,m)),P.margin&&(m=d(P.margin))}return m=Y(g,m),g.margin&&(m=d(g.margin)),void 0===m[0]&&void 0===m[1]&&void 0===m[2]&&void 0===m[3]?null:m}(),g.columns)return Q(w.measureColumns(g));if(g.stack)return Q(w.measureVerticalContainer(g));if(g.ul)return Q(w.measureUnorderedList(g));if(g.ol)return Q(w.measureOrderedList(g));if(g.table)return Q(w.measureTable(g));if(void 0!==g.text)return Q(w.measureLeaf(g));if(g.toc)return Q(w.measureToc(g));if(g.image)return Q(w.measureImage(g));if(g.svg)return Q(w.measureSVG(g));if(g.canvas)return Q(w.measureCanvas(g));if(g.qr)return Q(w.measureQr(g));throw"Unrecognized document structure: "+JSON.stringify(g,E)});function Q(Y){var y=Y._margin;return y&&(Y._minWidth+=y[0]+y[2],Y._maxWidth+=y[0]+y[2]),Y}},f.prototype.convertIfBase64Image=function(g){if(/^data:image\/(jpeg|jpg|png);base64,/.test(g.image)){var w="$$pdfmake$$"+this.autoImageIndex++;this.images[w]=g.image,g.image=w}},f.prototype.measureImageWithDimensions=function(g,w){if(g.fit){var Q=w.width/w.height>g.fit[0]/g.fit[1]?g.fit[0]/w.width:g.fit[1]/w.height;g._width=g._minWidth=g._maxWidth=w.width*Q,g._height=w.height*Q}else g._width=g._minWidth=g._maxWidth=g.width||w.width,g._height=g.height||w.height*g._width/w.width,h(g.maxWidth)&&g.maxWidthg._width&&(g._width=g._minWidth=g._maxWidth=g.minWidth,g._height=g._width*w.height/w.width),h(g.minHeight)&&g.minHeight>g._height&&(g._height=g.minHeight,g._width=g._minWidth=g._maxWidth=g._height*w.width/w.height);g._alignment=this.styleStack.getProperty("alignment")},f.prototype.measureImage=function(g){this.images&&this.convertIfBase64Image(g);var w=this.imageMeasure.measureImage(g.image);return this.measureImageWithDimensions(g,w),g},f.prototype.measureSVG=function(g){var w=this.svgMeasure.measureSVG(g.svg);return this.measureImageWithDimensions(g,w),g.font=this.styleStack.getProperty("font"),g.svg=this.svgMeasure.writeDimensions(g.svg,{width:g._width,height:g._height}),g},f.prototype.measureLeaf=function(g){g._textRef&&g._textRef._textNodeRef.text&&(g.text=g._textRef._textNodeRef.text);var w=this.styleStack.clone();w.push(g);var Q=this.textTools.buildInlines(g.text,w);return g._inlines=Q.items,g._minWidth=Q.minWidth,g._maxWidth=Q.maxWidth,g},f.prototype.measureToc=function(g){if(g.toc.title&&(g.toc.title=this.measureNode(g.toc.title)),g.toc._items.length>0){for(var w=[],Q=g.toc.textStyle||{},p=g.toc.numberStyle||Q,Y=g.toc.textMargin||[0,0,0,0],y=0,d=g.toc._items.length;y=26?F((z/26>>0)-1):"")+"abcdefghijklmnopqrstuvwxyz"[z%26>>0]}(S-1)}function y(S){if(S<1||S>4999)return S.toString();var eA,F=S,z={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1},U="";for(eA in z)for(;F>=z[eA];)U+=eA,F-=z[eA];return U}var m;switch(Q){case"none":m=null;break;case"upper-alpha":m=Y(g).toUpperCase();break;case"lower-alpha":m=Y(g);break;case"upper-roman":m=y(g);break;case"lower-roman":m=y(g).toLowerCase();break;default:m=function d(S){return S.toString()}(g)}if(null===m)return{};p&&(B(p)?(p[0]&&(m=p[0]+m),p[1]&&(m+=p[1]),m+=" "):m+=p+" ");var v={text:m},P=w.getProperty("markerColor");return P&&(v.color=P),{_inlines:this.textTools.buildInlines(v,w).items}},f.prototype.measureUnorderedList=function(g){var w=this.styleStack.clone(),Q=g.ul;g.type=g.type||"disc",g._gapSize=this.gapSizeForList(),g._minWidth=0,g._maxWidth=0;for(var p=0,Y=Q.length;p0?w.length-1:0;return g._minWidth=Y.min+g._gap*y,g._maxWidth=Y.max+g._gap*y,g},f.prototype.measureTable=function(g){(function BA(pA){if(pA.table.widths||(pA.table.widths="auto"),l(pA.table.widths))for(pA.table.widths=[pA.table.widths];pA.table.widths.length1?(sA(m,Q,v.colSpan),w.push({col:Q,span:v.colSpan,minWidth:v._minWidth,maxWidth:v._maxWidth})):(d._minWidth=Math.max(d._minWidth,v._minWidth),d._maxWidth=Math.max(d._maxWidth,v._maxWidth))),v.rowSpan&&v.rowSpan>1&&q(g.table,p,Q,v.rowSpan)}}!function U(){for(var pA,lA,cA=0,gA=w.length;cA0)for(pA=_/yA.span,lA=0;lA0)for(pA=MA/yA.span,lA=0;lAE.page?B:E.page>B.page?E:B.y>E.y?B:E).page,x:u.x,y:u.y,availableHeight:u.availableHeight,availableWidth:u.availableWidth}}(this,B.bottomMost)},o.prototype.markEnding=function(B){this.page=B._columnEndingContext.page,this.x=B._columnEndingContext.x,this.y=B._columnEndingContext.y,this.availableWidth=B._columnEndingContext.availableWidth,this.availableHeight=B._columnEndingContext.availableHeight,this.lastColumnWidth=B._columnEndingContext.lastColumnWidth},o.prototype.saveContextInEndingCell=function(B){B._columnEndingContext={page:this.page,x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,lastColumnWidth:this.lastColumnWidth}},o.prototype.completeColumnGroup=function(B){var E=this.snapshots.pop();this.calculateBottomMost(E),this.endingCell=null,this.x=E.x;var u=E.bottomMost.y;B&&(E.page===E.bottomMost.page?E.y+B>u&&(u=E.y+B):u+=B),this.y=u,this.page=E.bottomMost.page,this.availableWidth=E.availableWidth,this.availableHeight=E.bottomMost.availableHeight,B&&(this.availableHeight-=u-E.bottomMost.y),this.lastColumnWidth=E.lastColumnWidth},o.prototype.addMargin=function(B,E){this.x+=B,this.availableWidth-=B+(E||0)},o.prototype.moveDown=function(B){return this.y+=B,this.availableHeight-=B,this.availableHeight>0},o.prototype.initializePage=function(){this.y=this.pageMargins.top,this.availableHeight=this.getCurrentPage().pageSize.height-this.pageMargins.top-this.pageMargins.bottom,this.pageSnapshot().availableWidth=this.getCurrentPage().pageSize.width-this.pageMargins.left-this.pageMargins.right},o.prototype.pageSnapshot=function(){return this.snapshots[0]?this.snapshots[0]:this},o.prototype.moveTo=function(B,E){null!=B&&(this.x=B,this.availableWidth=this.getCurrentPage().pageSize.width-this.x-this.pageMargins.right),null!=E&&(this.y=E,this.availableHeight=this.getCurrentPage().pageSize.height-this.y-this.pageMargins.bottom)},o.prototype.moveToRelative=function(B,E){null!=B&&(this.x=this.x+B),null!=E&&(this.y=this.y+E)},o.prototype.beginDetachedBlock=function(){this.snapshots.push({x:this.x,y:this.y,availableHeight:this.availableHeight,availableWidth:this.availableWidth,page:this.page,endingCell:this.endingCell,lastColumnWidth:this.lastColumnWidth})},o.prototype.endDetachedBlock=function(){var B=this.snapshots.pop();this.x=B.x,this.y=B.y,this.availableWidth=B.availableWidth,this.availableHeight=B.availableHeight,this.page=B.page,this.endingCell=B.endingCell,this.lastColumnWidth=B.lastColumnWidth};var h=function(B,E){return(E=function l(B,E){return void 0===B?E:i(B)&&"landscape"===B.toLowerCase()?"landscape":"portrait"}(E,B.pageSize.orientation))!==B.pageSize.orientation?{orientation:E,width:B.pageSize.height,height:B.pageSize.width}:{orientation:B.pageSize.orientation,width:B.pageSize.width,height:B.pageSize.height}};o.prototype.moveToNextPage=function(B){var E=this.page+1,u=this.page,C=this.y,e=E>=this.pages.length;if(e){var f=this.availableWidth,g=this.getCurrentPage().pageSize.orientation,w=h(this.getCurrentPage(),B);this.addPage(w),g===w.orientation&&(this.availableWidth=f)}else this.page=E,this.initializePage();return{newPageCreated:e,prevPage:u,prevY:C,y:this.y}},o.prototype.addPage=function(B){var E={items:[],pageSize:B};return this.pages.push(E),this.backgroundLength.push(0),this.page=this.pages.length-1,this.initializePage(),this.tracker.emit("pageAdded"),E},o.prototype.getCurrentPage=function(){return this.page<0||this.page>=this.pages.length?null:this.pages[this.page]},o.prototype.getCurrentPosition=function(){var B=this.getCurrentPage().pageSize,E=B.height-this.pageMargins.top-this.pageMargins.bottom,u=B.width-this.pageMargins.left-this.pageMargins.right;return{pageNumber:this.page+1,pageOrientation:B.orientation,pageInnerHeight:E,pageInnerWidth:u,left:this.x,top:this.y,verticalRatio:(this.y-this.pageMargins.top)/E,horizontalRatio:(this.x-this.pageMargins.left)/u}},T.exports=o},1196:function(T,I,n){"use strict";var c=n(4775),i=n(6225).isNumber,o=n(6225).pack,l=n(6225).offsetVector,h=n(3858);function a(u,C){this.context=u,this.contextStack=[],this.tracker=C}function B(u,C,e){null==e||e<0||e>u.items.length?u.items.push(C):u.items.splice(e,0,C)}a.prototype.addLine=function(u,C,e){var f=u.getHeight(),g=this.context,w=g.getCurrentPage(),Q=this.getCurrentPositionOnPage();return!(g.availableHeight0&&u.inlines[0].alignment,g=0;switch(f){case"right":g=C-e;break;case"center":g=(C-e)/2}if(g&&(u.x=(u.x||0)+g),"justify"===f&&!u.newLineForced&&!u.lastLineInParagraph&&u.inlines.length>1)for(var w=(C-e)/(u.inlines.length-1),Q=1,p=u.inlines.length;Q0)&&(void 0===u._x&&(u._x=u.x||0),u.x=f.x+u._x,u.y=f.y,this.alignImage(u),B(g,{type:e||"image",item:u},C),f.moveDown(u._height),w)},a.prototype.addSVG=function(u,C){return this.addImage(u,C,"svg")},a.prototype.addQr=function(u,C){var e=this.context,f=e.getCurrentPage(),g=this.getCurrentPositionOnPage();if(!f||void 0===u.absolutePosition&&e.availableHeightg.availableHeight||(u.items.forEach(function(Q){switch(Q.type){case"line":var p=function E(u){var C=new c(u.maxWidth);for(var e in u)u.hasOwnProperty(e)&&(C[e]=u[e]);return C}(Q.item);p._node&&(p._node.positions[0].pageNumber=g.page+1),p.x=(p.x||0)+(C?u.xOffset||0:g.x),p.y=(p.y||0)+(e?u.yOffset||0:g.y),w.items.push({type:"line",item:p});break;case"vector":var Y=o(Q.item);l(Y,C?u.xOffset||0:g.x,e?u.yOffset||0:g.y),w.items.push({type:"vector",item:Y});break;case"image":case"svg":var y=o(Q.item);y.x=(y.x||0)+(C?u.xOffset||0:g.x),y.y=(y.y||0)+(e?u.yOffset||0:g.y),w.items.push({type:Q.type,item:y})}}),f||g.moveDown(u.height),0))},a.prototype.pushContext=function(u,C){void 0===u&&(C=this.context.getCurrentPage().height-this.context.pageMargins.top-this.context.pageMargins.bottom,u=this.context.availableWidth),i(u)&&(u=new h({width:u,height:C},{left:0,right:0,top:0,bottom:0})),this.contextStack.push(this.context),this.context=u},a.prototype.popContext=function(){this.context=this.contextStack.pop()},a.prototype.getCurrentPositionOnPage=function(){return(this.contextStack[0]||this.context).getCurrentPosition()},T.exports=a},2249:function(T,I,n){"use strict";var c=n(6225).isArray;function o(l,h){for(var a in this.fonts={},this.pdfKitDoc=h,this.fontCache={},l)if(l.hasOwnProperty(a)){var B=l[a];this.fonts[a]={normal:B.normal,bold:B.bold,italics:B.italics,bolditalics:B.bolditalics}}}o.prototype.getFontType=function(l,h){return function i(l,h){var a="normal";return l&&h?a="bolditalics":l?a="bold":h&&(a="italics"),a}(l,h)},o.prototype.getFontFile=function(l,h,a){var B=this.getFontType(h,a);return this.fonts[l]&&this.fonts[l][B]?this.fonts[l][B]:null},o.prototype.provideFont=function(l,h,a){var B=this.getFontType(h,a);if(null===this.getFontFile(l,h,a))throw new Error("Font '"+l+"' in style '"+B+"' is not defined in the font section of the document definition.");if(this.fontCache[l]=this.fontCache[l]||{},!this.fontCache[l][B]){var E=this.fonts[l][B];c(E)||(E=[E]),this.fontCache[l][B]=this.pdfKitDoc.font.apply(this.pdfKitDoc,E)._font}return this.fontCache[l][B]},T.exports=o},6225:function(T){"use strict";function i(g){return Array.isArray(g)}T.exports={isString:function I(g){return"string"==typeof g||g instanceof String},isNumber:function n(g){return"number"==typeof g||g instanceof Number},isBoolean:function c(g){return"boolean"==typeof g},isArray:i,isFunction:function o(g){return"function"==typeof g},isObject:function l(g){return null!==g&&"object"==typeof g},isNull:function h(g){return null===g},isUndefined:function a(g){return void 0===g},pack:function B(){for(var g={},w=0,Q=arguments.length;w0})).forEach(function(W){var hA={};["id","text","ul","ol","table","image","qr","canvas","svg","columns","headlineLevel","style","pageBreak","pageOrientation","width","height"].forEach(function(vA){void 0!==W[vA]&&(hA[vA]=W[vA])}),hA.startPosition=W.positions[0],hA.pageNumbers=Array.from(new Set(W.positions.map(function(vA){return vA.pageNumber}))),hA.pages=MA.length,hA.stack=C(W.stack),W.nodeInfo=hA});for(var uA=0;uA<_.length;uA++){var QA=_[uA];if("before"!==QA.pageBreak&&!QA.pageBreakCalculated){QA.pageBreakCalculated=!0;var SA=QA.nodeInfo.pageNumbers[0],bA=[],XA=[],X=[];if(cA.length>1)for(var O=uA+1,$=_.length;O<$;O++)_[O].nodeInfo.pageNumbers.indexOf(SA)>-1&&bA.push(_[O].nodeInfo),cA.length>2&&_[O].nodeInfo.pageNumbers.indexOf(SA+1)>-1&&XA.push(_[O].nodeInfo);if(cA.length>3)for(O=0;O-1&&X.push(_[O].nodeInfo);if(cA(QA.nodeInfo,bA,XA,X))return QA.pageBreak="before",!0}}return!1}this.docPreprocessor=new i,this.docMeasure=new o(z,U,eA,this.imageMeasure,this.svgMeasure,this.tableLayouts,pA);for(var FA=this.tryLayoutDocument(F,z,U,eA,sA,q,BA,pA,lA);gA(FA.linearNodeList,FA.pages);)FA.linearNodeList.forEach(function(MA){MA.resetXY()}),FA=this.tryLayoutDocument(F,z,U,eA,sA,q,BA,pA,lA);return FA.pages},P.prototype.tryLayoutDocument=function(F,z,U,eA,sA,q,BA,pA,lA,cA){this.linearNodeList=[],F=this.docPreprocessor.preprocessDocument(F),F=this.docMeasure.measureDocument(F),this.writer=new h(new l(this.pageSize,this.pageMargins),this.tracker);var gA=this;return this.writer.context().tracker.startTracking("pageAdded",function(){gA.addBackground(sA)}),this.addBackground(sA),this.processNode(F),this.addHeadersAndFooters(q,BA),null!=lA&&this.addWatermark(lA,z,eA),{pages:this.writer.context().pages,linearNodeList:this.linearNodeList}},P.prototype.addBackground=function(F){var z=Y(F)?F:function(){return F},U=this.writer.context(),eA=U.getCurrentPage().pageSize,sA=z(U.page+1,eA);sA&&(this.writer.beginUnbreakableBlock(eA.width,eA.height),sA=this.docPreprocessor.preprocessDocument(sA),this.processNode(this.docMeasure.measureDocument(sA)),this.writer.commitUnbreakableBlock(0,0),U.backgroundLength[U.page]+=sA.positions.length)},P.prototype.addStaticRepeatable=function(F,z){this.addDynamicRepeatable(function(){return JSON.parse(JSON.stringify(F))},z)},P.prototype.addDynamicRepeatable=function(F,z){for(var eA=0,sA=this.writer.context().pages.length;eA1;)_.push({fontSize:SA}),(MA=FA.sizeOfRotatedText(gA.text,gA.angle,_)).width>cA.width?SA=(uA+(QA=SA))/2:MA.widthcA.height?(uA+(QA=SA))/2:((uA=SA)+QA)/2),_.pop();return SA}(this.pageSize,F,z));var eA={text:F.text,font:z.provideFont(F.font,F.bold,F.italics),fontSize:F.fontSize,color:F.color,opacity:F.opacity,angle:F.angle};eA._size=function pA(cA,gA){var yA=new y(gA),FA=new d(null,{font:cA.font,bold:cA.bold,italics:cA.italics});return FA.push({fontSize:cA.fontSize}),{size:yA.sizeOfString(cA.text,FA),rotatedSize:yA.sizeOfRotatedText(cA.text,cA.angle,FA)}}(F,z);for(var sA=this.writer.context().pages,q=0,BA=sA.length;q0;lA--)pA.push(BA);return pA}(F._gap);eA&&(U-=(eA.length-1)*F._gap),a.buildColumnWidths(z,U);var sA=this.processRow(z,z,eA);v(F.positions,sA.positions)},P.prototype.processRow=function(F,z,U,eA,sA,q){var BA=this,pA=[],lA=[];return this.tracker.auto("pageChanged",function cA(FA){for(var _,MA=0,uA=pA.length;MA1)for(var SA=1;SAFA?U[FA]:0}function yA(FA,_){if(FA.rowSpan&&FA.rowSpan>1){var MA=sA+FA.rowSpan-1;if(MA>=eA.length)throw"Row span for column "+_+" (with indexes starting from 0) exceeded row count";return eA[MA][_]}return null}},P.prototype.processList=function(F,z){var q,U=this,eA=F?z.ol:z.ul,sA=z._gapSize;this.writer.context().addMargin(sA.width),this.tracker.auto("lineAdded",function BA(pA){if(q){var lA=q;if(q=null,lA.canvas){var cA=lA.canvas[0];w(cA,-lA._minWidth,0),U.writer.addVector(cA)}else if(lA._inlines){var gA=new E(U.pageSize.width);gA.addInline(lA._inlines[0]),gA.x=-lA._minWidth,gA.y=pA.getAscenderHeight()-gA.getAscenderHeight(),U.writer.addLine(gA,!0)}}},function(){eA.forEach(function(pA){q=pA.listMarker,U.processNode(pA),v(z.positions,pA.positions)})}),this.writer.context().addMargin(-sA.width)},P.prototype.processTable=function(F){var z=new B(F);z.beginTable(this.writer);for(var U=F.table.heights,eA=0,sA=F.table.body.length;eA0&&(U.hasEnoughSpaceForInline(F._inlines[0],F._inlines.slice(1))||sA);){var q=!1,BA=F._inlines.shift();if(sA=!1,!BA.noWrap&&BA.text.length>1&&BA.width>U.getAvailableWidth()){var pA=BA.width/BA.text.length,lA=Math.floor(U.getAvailableWidth()/pA);if(lA<1&&(lA=1),lA0){var u=B.pages[0];if(u.xOffset=h,u.yOffset=a,E>1)if(void 0!==h||void 0!==a)u.height=B.getCurrentPage().pageSize.height-B.pageMargins.top-B.pageMargins.bottom;else{u.height=this.writer.context.getCurrentPage().pageSize.height-this.writer.context.pageMargins.top-this.writer.context.pageMargins.bottom;for(var C=0,e=this.repeatables.length;CXA.item.y2?XA.item.y1:XA.item.y2:0}(XA)}var SA=S(MA||40),bA=SA.top;return _.forEach(function(XA){XA.items.forEach(function(X){var O=QA(X);O>bA&&(bA=O)})}),bA+=SA.bottom}function P(_,MA){_&&"auto"===_.height&&(_.height=1/0);var QA=function z(_){if(C(_)){var MA=l[_.toUpperCase()];if(!MA)throw"Page size "+_+" not recognized";return{width:MA[0],height:MA[1]}}return _}(_||"A4");return function uA(SA){return!!C(SA)&&("portrait"===(SA=SA.toLowerCase())&&QA.width>QA.height||"landscape"===SA&&QA.widthQA.height?"landscape":"portrait",QA}function S(_){if(e(_))_={left:_,right:_,top:_,bottom:_};else if(g(_))if(2===_.length)_={left:_[0],top:_[1],right:_[0],bottom:_[1]};else{if(4!==_.length)throw"Invalid pageMargins definition";_={left:_[0],top:_[1],right:_[2],bottom:_[3]}}return _}function U(_,MA){_.pageSize.orientation!==(MA.options.size[0]>MA.options.size[1]?"landscape":"portrait")&&(MA.options.size=[MA.options.size[1],MA.options.size[0]])}function sA(_,MA){var uA=_;return MA.sup&&(uA-=.75*MA.fontSize),MA.sub&&(uA+=.35*MA.fontSize),uA}function q(_,MA,uA,QA,SA){function bA(st,TA){var it,mt,It=new E(null);if(w(st.positions))throw"Page reference id not found";var ft=st.positions[0].pageNumber.toString();switch(TA.text=ft,it=It.widthOfString(TA.text,TA.font,TA.fontSize,TA.characterSpacing,TA.fontFeatures),mt=TA.width-it,TA.width=it,TA.alignment){case"right":TA.x+=mt;break;case"center":TA.x+=mt/2}}_._pageNodeRef&&bA(_._pageNodeRef,_.inlines[0]),MA=MA||0,uA=uA||0;var XA=_.getHeight(),O=XA-_.getAscenderHeight();B.drawBackground(_,MA,uA,QA,SA);for(var $=0,W=_.inlines.length;$1){var XA=_.points[0],X=_.points[_.points.length-1];(_.closePath||XA.x===X.x&&XA.y===X.y)&&uA.closePath()}break;case"path":uA.path(_.d)}if(_.linearGradient&&QA){var O=1/(_.linearGradient.length-1);for(SA=0;SA<_.linearGradient.length;SA++)QA.stop(SA*O,_.linearGradient[SA]);_.color=QA}Q(_.color)&&(_.color=p(_.color,MA));var $=e(_.fillOpacity)?_.fillOpacity:1,W=e(_.strokeOpacity)?_.strokeOpacity:1;_.color&&_.lineColor?(uA.fillColor(_.color,$),uA.strokeColor(_.lineColor,W),uA.fillAndStroke()):_.color?(uA.fillColor(_.color,$),uA.fill()):(uA.strokeColor(_.lineColor||"black",W),uA.stroke())}function lA(_,MA,uA,QA){var SA=e(_.opacity)?_.opacity:1;if(QA.opacity(SA),_.cover){var bA=_.cover.align||"center",XA=_.cover.valign||"center",X=_.cover.width?_.cover.width:_.width,O=_.cover.height?_.cover.height:_.height;QA.save(),QA.rect(_.x,_.y,X,O).clip(),QA.image(_.image,_.x,_.y,{cover:[X,O],align:bA,valign:XA}),QA.restore()}else QA.image(_.image,_.x,_.y,{width:_._width,height:_._height});_.link&&QA.link(_.x,_.y,_._width,_._height,_.link),_.linkToPage&&(QA.ref({Type:"Action",S:"GoTo",D:[_.linkToPage,0,0]}).end(),QA.annotate(_.x,_.y,_._width,_._height,{Subtype:"Link",Dest:[_.linkToPage-1,"XYZ",null,null,null]})),_.linkToDestination&&QA.goTo(_.x,_.y,_._width,_._height,_.linkToDestination)}function cA(_,MA,uA,QA,SA){var bA=Object.assign({width:_._width,height:_._height,assumePt:!0},_.options);bA.fontCallback=function(XA,X,O){var $=XA.split(",").map(function(nA){return nA.trim().replace(/('|")/g,"")}),W=function(_,MA,uA){for(var QA=0;QA-1&&(bA=bA.slice(0,XA)),uA.height===1/0){var X=v(bA,_.pageMargins);this.pdfKitDoc.options.size=[uA.width,X]}var O=function FA(_,MA){var uA={};return Object.keys(_).forEach(function(QA){var SA=_[QA];uA[QA]=MA.pattern(SA.boundingBox,SA.xStep,SA.yStep,SA.pattern,SA.colored)}),uA}(_.patterns||{},this.pdfKitDoc);if(function eA(_,MA,uA,QA,SA){uA._pdfMakePages=_,uA.addPage();var bA=0;SA&&_.forEach(function(vA){bA+=vA.items.length});var XA=0;SA=SA||function(){};for(var X=0;X<_.length;X++){X>0&&(U(_[X],uA),uA.addPage(uA.options));for(var O=_[X],$=0,W=O.items.length;$=128?285:0);var p=[[]];for(w=0;w<30;++w){for(var Y=p[w],y=[],d=0;d<=w;++d)y.push(g[(d6},eA=function(X,O){var $=-8&function(X){var O=I[X],$=16*X*X+128*X+64;return F(X)&&($-=36),O[2].length&&($-=25*O[2].length*O[2].length-10*O[2].length-55),$}(X),W=I[X];return $-8*W[0][O]*W[1][O]},sA=function(X,O){switch(O){case 1:return X<10?10:X<27?12:14;case 2:return X<10?9:X<27?11:13;case 4:return X<10?8:16;case 8:return X<10?8:X<27?10:12}},q=function(X,O,$){var W=eA(X,$)-4-sA(X,O);switch(O){case 1:return 3*(W/10|0)+(W%10<4?0:W%10<7?1:2);case 2:return 2*(W/11|0)+(W%11<6?0:1);case 4:return W/8|0;case 8:return W/13|0}},lA=function(X,O){for(var $=X.slice(0),W=X.length,hA=O.length,vA=0;vA=0)for(var EA=0;EA=0;--vA)hA>>W+vA&1&&(hA^=$<>nA&1;return X},uA=function(X){for(var vA=function(JA){for(var WA=0,rt=0;rt=5&&(WA+=JA[rt]-5+3);for(rt=5;rt=4*xA||JA[rt+1]>=4*xA)&&(WA+=40)}return WA},nA=X.length,EA=0,GA=0,et=0;et=nA){for(hA.push(vA|TA>>(it-=nA));it>=8;)hA.push(TA>>(it-=8)&255);vA=0,nA=8}it>0&&(vA|=(TA&(1<>3);nA=function(X,O,$){for(var W=[],hA=X.length/O|0,vA=0,nA=O-X.length%O,EA=0;EA>Mt&1,hA[It+xA][ft+Mt]=1};for(nA(0,0,9,9,[127,65,93,93,93,65,383,0,64]),nA($-8,0,8,9,[256,127,65,93,93,93,65,127]),nA(0,$-8,9,8,[254,130,186,186,186,130,254,0,0]),vA=9;vA<$-8;++vA)W[6][vA]=W[vA][6]=1&~vA,hA[6][vA]=hA[vA][6]=1;var EA=O[2],GA=EA.length;for(vA=0;vA>mt++&1,hA[vA][$-11+TA]=hA[$-11+TA][vA]=1}return{matrix:W,reserved:hA}}(O),GA=EA.matrix,et=EA.reserved;if(function(X,O,$){for(var W=X.length,hA=0,vA=-1,nA=W-1;nA>=0;nA-=2){6==nA&&--nA;for(var EA=vA<0?W-1:0,GA=0;GAnA-2;--et)O[EA][et]||(X[EA][et]=$[hA>>3]>>(7&~hA)&1,++hA);EA+=vA}vA=-vA}}(GA,et,nA),hA<0){_(GA,et,0),MA(GA,0,W,0);var st=0,TA=uA(GA);for(_(GA,et,0),hA=1;hA<8;++hA){_(GA,et,hA),MA(GA,0,W,hA);var it=uA(GA);TA>it&&(TA=it,st=hA),_(GA,et,hA)}hA=st}return _(GA,et,hA),MA(GA,0,W,hA),GA};function SA(X,O){var $={numeric:1,alphanumeric:2,octet:4},hA=(O=O||{}).version||-1,vA={L:1,M:0,Q:3,H:2}[(O.eccLevel||"L").toUpperCase()],nA=O.mode?$[O.mode.toLowerCase()]:-1,EA="mask"in O?O.mask:-1;if(nA<0)nA="string"==typeof X?X.match(h)?1:X.match(B)?2:4:4;else if(1!=nA&&2!=nA&&4!=nA)throw"invalid or unsupported mode";if(null===(X=function(X,O){switch(X){case 1:return O.match(h)?O:null;case 2:return O.match(a)?O.toUpperCase():null;case 4:if("string"==typeof O){for(var $=[],W=0;W>6,128|63&hA):hA<65536?$.push(224|hA>>12,128|hA>>6&63,128|63&hA):$.push(240|hA>>18,128|hA>>12&63,128|hA>>6&63,128|63&hA)}return $}return O}}(nA,X)))throw"invalid data format";if(vA<0||vA>3)throw"invalid ECC level";if(hA<0){for(hA=1;hA<=40&&!(X.length<=q(hA,nA,vA));++hA);if(hA>40)throw"too large data for the Qr format"}else if(hA<1||hA>40)throw"invalid Qr version! should be between 1 and 40";if(-1!=EA&&(EA<0||EA>8))throw"invalid mask";return QA(X,hA,nA,vA,EA)}T.exports={measure:function XA(X){var O=function bA(X,O){var $=[],W=O.background||"#fff",hA=O.foreground||"#000",vA=SA(X,O),nA=vA.length,EA=Math.floor(O.fit?O.fit/nA:5),GA=nA*EA;$.push({type:"rect",x:0,y:0,w:GA,h:GA,lineWidth:0,color:W});for(var et=0;et0;)this.styleOverrides.pop()},h.prototype.autopush=function(a){if(c(a))return 0;var B=[];a.style&&(B=i(a.style)?a.style:[a.style]);for(var E=0,u=B.length;E0&&this.pop(E),u},h.prototype.getProperty=function(a){if(this.styleOverrides)for(var B=this.styleOverrides.length-1;B>=0;B--){var E=this.styleOverrides[B];if(c(E)){var u=this.styleDictionary[E];if(u&&!o(u[a])&&!l(u[a]))return u[a]}else if(!o(E[a])&&!l(E[a]))return E[a]}return this.defaultStyle&&this.defaultStyle[a]},T.exports=h},7601:function(T,I,n){"use strict";var c=n(6513);function i(h){var a=parseFloat(h);if("number"==typeof a&&!isNaN(a))return a}function o(h){var a;try{a=new c.XmlDocument(h)}catch(B){throw new Error("SVGMeasure: "+B)}if("svg"!==a.name)throw new Error("SVGMeasure: expected document");return a}function l(){}l.prototype.measureSVG=function(h){var a=o(h),B=i(a.attr.width),E=i(a.attr.height);if((null==B||null==E)&&"string"==typeof a.attr.viewBox){var u=a.attr.viewBox.split(/[,\s]+/);if(4!==u.length)throw new Error("Unexpected svg viewbox format, should have 4 entries but found: '"+a.attr.viewBox+"'");null==B&&(B=i(u[2])),null==E&&(E=i(u[3]))}return{width:B,height:E}},l.prototype.writeDimensions=function(h,a){var B=o(h);return B.attr.width=""+a.width,B.attr.height=""+a.height,B.toString()},T.exports=l},9342:function(T,I,n){"use strict";var c=n(4498),i=n(6225).isFunction,o=n(6225).isNumber;function l(h){this.tableNode=h}l.prototype.beginTable=function(h){var a,B,E=this;this.offsets=(a=this.tableNode)._offsets,this.layout=a._layout,B=h.context().availableWidth-this.offsets.total,c.buildColumnWidths(a.table.widths,B),this.tableWidth=a._offsets.total+function u(){var f=0;return a.table.widths.forEach(function(g){f+=g._calcWidth}),f}(),this.rowSpanData=function C(){var f=[],g=0,w=0;f.push({left:0,rowSpan:0});for(var Q=0,p=E.tableNode.table.body[0].length;Q0&&v(g+d,Q,0,p.border[0]),void 0!==p.border[2]&&v(g+d,Q+y-1,2,p.border[2]);for(var m=0;m0&&v(g,Q+m,1,p.border[1]),void 0!==p.border[3]&&v(g+Y-1,Q+m,3,p.border[3])}}function v(P,S,F,z){var U=f[P][S];U.border=U.border||{},U.border[F]=z}}(this.tableNode.table.body),this.drawHorizontalLine(0,h)},l.prototype.onRowBreak=function(h,a){var B=this;return function(){var E=B.rowPaddingTop+(B.headerRows?0:B.topLineWidth);a.context().availableHeight-=B.reservedAtBottom,a.context().moveDown(E)}},l.prototype.beginRow=function(h,a){this.topLineWidth=this.layout.hLineWidth(h,this.tableNode),this.rowPaddingTop=this.layout.paddingTop(h,this.tableNode),this.bottomLineWidth=this.layout.hLineWidth(h+1,this.tableNode),this.rowPaddingBottom=this.layout.paddingBottom(h,this.tableNode),this.rowCallback=this.onRowBreak(h,a),a.tracker.startTracking("pageChanged",this.rowCallback),this.dontBreakRows&&a.beginUnbreakableBlock(),this.rowTopY=a.context().y,this.reservedAtBottom=this.bottomLineWidth+this.rowPaddingBottom,a.context().availableHeight-=this.reservedAtBottom,a.context().moveDown(this.rowPaddingTop)},l.prototype.drawHorizontalLine=function(h,a,B){var E=this.layout.hLineWidth(h,this.tableNode);if(E){var C,u=this.layout.hLineStyle(h,this.tableNode);u&&u.dash&&(C=u.dash);for(var w,Q,p,e=E/2,f=null,g=this.tableNode.table.body,Y=0,y=this.rowSpanData.length;Y0&&(S=(w=g[h-1][Y]).border?w.border[3]:this.layout.defaultBorder)&&w.borderColor&&(v=w.borderColor[3]),hz;)f.width+=this.rowSpanData[Y+z++].width||0;Y+=z-1}else if(w&&w.colSpan&&S){for(;w.colSpan>z;)f.width+=this.rowSpanData[Y+z++].width||0;Y+=z-1}else if(Q&&Q.colSpan&&P){for(;Q.colSpan>z;)f.width+=this.rowSpanData[Y+z++].width||0;Y+=z-1}else f.width+=this.rowSpanData[Y].width||0}var U=(B||0)+e;m&&f&&f.width&&(a.addVector({type:"line",x1:f.left,x2:f.left+f.width,y1:U,y2:U,lineWidth:E,dash:C,lineColor:v},!1,B),f=null,v=null,w=null,Q=null,p=null)}a.context().moveDown(E)}},l.prototype.drawVerticalLine=function(h,a,B,E,u,C,e){var f=this.layout.vLineWidth(E,this.tableNode);if(0!==f){var w,g=this.layout.vLineStyle(E,this.tableNode);g&&g.dash&&(w=g.dash);var p,Y,y,Q=this.tableNode.table.body;if(E>0&&(p=Q[C][e])&&p.borderColor&&(p.border?p.border[2]:this.layout.defaultBorder)&&(y=p.borderColor[2]),null==y&&E0&&$--}return O.push({x:C.rowSpanData[C.rowSpanData.length-1].left,index:C.rowSpanData.length-1}),O}(),w=[],Q=B&&B.length>0,p=this.tableNode.table.body;if(w.push({y0:this.rowTopY,page:Q?B[0].prevPage:e}),Q)for(u=0,E=B.length;u0&&!this.headerRows,S=P?0:this.topLineWidth,F=w[d].y0,z=w[d].y1;for(v&&(z+=this.rowPaddingBottom),a.context().page!=w[d].page&&(a.context().page=w[d].page,this.reservedAtBottom=0),u=0,E=g.length;u0&&!U&&(U=(q=p[h][sA-1]).border?q.border[2]:this.layout.defaultBorder),sA+11)for(var XA=1;XA1)for(XA=1;XA0&&this.rowSpanData[u].rowSpan--}this.drawHorizontalLine(h+1,a),this.headerRows&&h===this.headerRows-1&&(this.headerRepeatable=a.currentBlockToRepeatable()),this.dontBreakRows&&a.tracker.auto("pageChanged",function(){!C.headerRows&&!1!==C.layout.hLineWhenBroken&&C.drawHorizontalLine(h,a)},function(){a.commitUnbreakableBlock()}),this.headerRepeatable&&(h===this.rowsWithoutPageBreak-1||h===this.tableNode.table.body.length-1)&&(a.commitUnbreakableBlock(),a.pushToRepeatables(this.headerRepeatable),this.cleanUpRepeatables=!0,this.headerRepeatable=null)},T.exports=l},3497:function(T,I,n){"use strict";var c=n(6225).isArray,i=n(6225).isPattern,o=n(6225).getPattern;function h(E,u,C,e){var w=E.inlines[0],Q=function f(){for(var gA=0,yA=0,FA=E.inlines.length;yAgA?yA:gA;return E.inlines[gA]}(),p=function g(){for(var gA=0,yA=0,FA=E.inlines.length;yA=0&&i.splice(o,1)}},I.prototype.emit=function(n){var c=Array.prototype.slice.call(arguments,1),i=this.events[n];!i||i.forEach(function(o){o.apply(this,c)})},I.prototype.auto=function(n,c,i){this.startTracking(n,c),i(),this.stopTracking(n,c)},T.exports=I},2480:function(){},5832:function(){},9862:function(){},964:function(){},3083:function(T,I,n){"use strict";var c=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?n.g:globalThis;T.exports=function(){for(var l=[],h=0;h{var Fr=function(Nt){"use strict";var Pn,Et=Object.prototype,qt=Et.hasOwnProperty,A="function"==typeof Symbol?Symbol:{},Ct=A.iterator||"@@iterator",T=A.asyncIterator||"@@asyncIterator",I=A.toStringTag||"@@toStringTag";function n(F,z,U){return Object.defineProperty(F,z,{value:U,enumerable:!0,configurable:!0,writable:!0}),F[z]}try{n({},"")}catch(F){n=function(z,U,eA){return z[U]=eA}}function c(F,z,U,eA){var q=Object.create((z&&z.prototype instanceof E?z:E).prototype),BA=new v(eA||[]);return q._invoke=function Y(F,z,U){var eA=o;return function(q,BA){if(eA===h)throw new Error("Generator is already running");if(eA===a){if("throw"===q)throw BA;return S()}for(U.method=q,U.arg=BA;;){var pA=U.delegate;if(pA){var lA=y(pA,U);if(lA){if(lA===B)continue;return lA}}if("next"===U.method)U.sent=U._sent=U.arg;else if("throw"===U.method){if(eA===o)throw eA=a,U.arg;U.dispatchException(U.arg)}else"return"===U.method&&U.abrupt("return",U.arg);eA=h;var cA=i(F,z,U);if("normal"===cA.type){if(eA=U.done?a:l,cA.arg===B)continue;return{value:cA.arg,done:U.done}}"throw"===cA.type&&(eA=a,U.method="throw",U.arg=cA.arg)}}}(F,U,BA),q}function i(F,z,U){try{return{type:"normal",arg:F.call(z,U)}}catch(eA){return{type:"throw",arg:eA}}}Nt.wrap=c;var o="suspendedStart",l="suspendedYield",h="executing",a="completed",B={};function E(){}function u(){}function C(){}var e={};n(e,Ct,function(){return this});var f=Object.getPrototypeOf,g=f&&f(f(P([])));g&&g!==Et&&qt.call(g,Ct)&&(e=g);var w=C.prototype=E.prototype=Object.create(e);function Q(F){["next","throw","return"].forEach(function(z){n(F,z,function(U){return this._invoke(z,U)})})}function p(F,z){function U(q,BA,pA,lA){var cA=i(F[q],F,BA);if("throw"!==cA.type){var gA=cA.arg,yA=gA.value;return yA&&"object"==typeof yA&&qt.call(yA,"__await")?z.resolve(yA.__await).then(function(FA){U("next",FA,pA,lA)},function(FA){U("throw",FA,pA,lA)}):z.resolve(yA).then(function(FA){gA.value=FA,pA(gA)},function(FA){return U("throw",FA,pA,lA)})}lA(cA.arg)}var eA;this._invoke=function sA(q,BA){function pA(){return new z(function(lA,cA){U(q,BA,lA,cA)})}return eA=eA?eA.then(pA,pA):pA()}}function y(F,z){var U=F.iterator[z.method];if(U===Pn){if(z.delegate=null,"throw"===z.method){if(F.iterator.return&&(z.method="return",z.arg=Pn,y(F,z),"throw"===z.method))return B;z.method="throw",z.arg=new TypeError("The iterator does not provide a 'throw' method")}return B}var eA=i(U,F.iterator,z.arg);if("throw"===eA.type)return z.method="throw",z.arg=eA.arg,z.delegate=null,B;var sA=eA.arg;return sA?sA.done?(z[F.resultName]=sA.value,z.next=F.nextLoc,"return"!==z.method&&(z.method="next",z.arg=Pn),z.delegate=null,B):sA:(z.method="throw",z.arg=new TypeError("iterator result is not an object"),z.delegate=null,B)}function d(F){var z={tryLoc:F[0]};1 in F&&(z.catchLoc=F[1]),2 in F&&(z.finallyLoc=F[2],z.afterLoc=F[3]),this.tryEntries.push(z)}function m(F){var z=F.completion||{};z.type="normal",delete z.arg,F.completion=z}function v(F){this.tryEntries=[{tryLoc:"root"}],F.forEach(d,this),this.reset(!0)}function P(F){if(F){var z=F[Ct];if(z)return z.call(F);if("function"==typeof F.next)return F;if(!isNaN(F.length)){var U=-1,eA=function sA(){for(;++U=0;--eA){var sA=this.tryEntries[eA],q=sA.completion;if("root"===sA.tryLoc)return U("end");if(sA.tryLoc<=this.prev){var BA=qt.call(sA,"catchLoc"),pA=qt.call(sA,"finallyLoc");if(BA&&pA){if(this.prev=0;--U){var eA=this.tryEntries[U];if(eA.tryLoc<=this.prev&&qt.call(eA,"finallyLoc")&&this.prev=0;--z){var U=this.tryEntries[z];if(U.finallyLoc===F)return this.complete(U.completion,U.afterLoc),m(U),B}},catch:function(F){for(var z=this.tryEntries.length-1;z>=0;--z){var U=this.tryEntries[z];if(U.tryLoc===F){var eA=U.completion;if("throw"===eA.type){var sA=eA.arg;m(U)}return sA}}throw new Error("illegal catch attempt")},delegateYield:function(F,z,U){return this.delegate={iterator:P(F),resultName:z,nextLoc:U},"next"===this.method&&(this.arg=Pn),B}},Nt}(oi.exports);try{regeneratorRuntime=Fr}catch(Nt){"object"==typeof globalThis?globalThis.regeneratorRuntime=Fr:Function("r","regeneratorRuntime = r")(Fr)}},7757:(oi,Fr,Nt)=>{oi.exports=Nt(4979)}}]); \ No newline at end of file diff --git a/frontend/636.2179ed55de2143bc.js b/frontend/636.2179ed55de2143bc.js deleted file mode 100644 index 1c967257..00000000 --- a/frontend/636.2179ed55de2143bc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[636],{1636:(vg,Se,h)=>{h.r(Se),h.d(Se,{LNDModule:()=>bg});var p=h(9808),T=h(1402),tt=h(8878),e=h(5e3),d=h(7093),P=h(5899);function nt(n,i){1&n&&e._UZ(0,"mat-progress-bar",3)}let Le=(()=>{class n{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(a=>{switch(!0){case a instanceof T.OD:this.loading=!0;break;case a instanceof T.m2:case a instanceof T.gk:case a instanceof T.Q3:this.loading=!1}})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lnd-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,nt,1,0,"mat-progress-bar",1),e._UZ(2,"router-outlet",null,2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",a.loading))},directives:[d.xw,d.yH,d.Wh,p.O5,P.pW,T.lC],styles:[""],data:{animation:[tt.g]}}),n})();var m=h(7579),_=h(2722),E=h(9300),ke=h(534),y=h(801),l=h(7731),C=h(6529),N=h(5043),A=h(5620),G=h(6642),O=h(62),M=h(9444),ce=h(3954),b=h(9224),k=h(7423),he=h(2181),K=h(5245),S=h(3322);const Fe=function(n){return{backgroundColor:n}};function at(n,i){if(1&n&&e._UZ(0,"span",6),2&n){const t=e.oxw();e.Q6J("ngStyle",e.VKq(1,Fe,null==t.information?null:t.information.color))}}function it(n,i){if(1&n&&(e.TgZ(0,"div")(1,"h4",1),e._uU(2,"Color"),e.qZA(),e.TgZ(3,"div",2),e._UZ(4,"span",7),e._uU(5),e.ALo(6,"uppercase"),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.Q6J("ngStyle",e.VKq(4,Fe,null==t.information?null:t.information.color)),e.xp6(1),e.hij(" ",e.lcZ(6,2,null==t.information?null:t.information.color)," ")}}function ot(n,i){if(1&n&&(e.TgZ(0,"span",2),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}let Ne=(()=>{class n{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.information&&this.information.chains&&this.information.chains.length>0&&(this.chains=[""],this.information.chains.forEach(t=>{this.chains.push(this.commonService.titleCase(t.chain)+" "+this.commonService.titleCase(t.network))}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[e.TTD],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h4",1),e._uU(3,"Alias"),e.qZA(),e.TgZ(4,"div",2),e._uU(5),e.YNc(6,at,1,3,"span",3),e.qZA()(),e.YNc(7,it,7,6,"div",4),e.TgZ(8,"div")(9,"h4",1),e._uU(10,"Implementation"),e.qZA(),e.TgZ(11,"div",2),e._uU(12),e.qZA()(),e.TgZ(13,"div")(14,"h4",1),e._uU(15,"Chain"),e.qZA(),e.YNc(16,ot,2,1,"span",5),e.qZA()()),2&t&&(e.xp6(5),e.hij(" ",null==a.information?null:a.information.alias," "),e.xp6(1),e.Q6J("ngIf",!a.showColorFieldSeparately),e.xp6(1),e.Q6J("ngIf",a.showColorFieldSeparately),e.xp6(5),e.Oqu(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):""),e.xp6(4),e.Q6J("ngForOf",a.chains))},directives:[d.xw,d.yH,d.Wh,p.O5,p.PC,S.Zl,p.sg],pipes:[p.gd],styles:[""]}),n})();function st(n,i){if(1&n&&(e.TgZ(0,"div",2)(1,"div")(2,"h4",3),e._uU(3,"Lightning"),e.qZA(),e.TgZ(4,"div",4),e._uU(5),e.ALo(6,"number"),e.qZA(),e._UZ(7,"mat-progress-bar",5),e.qZA(),e.TgZ(8,"div")(9,"h4",3),e._uU(10,"On-chain"),e.qZA(),e.TgZ(11,"div",4),e._uU(12),e.ALo(13,"number"),e.qZA(),e._UZ(14,"mat-progress-bar",5),e.qZA(),e.TgZ(15,"div")(16,"h4",3),e._uU(17,"Total"),e.qZA(),e.TgZ(18,"div",4),e._uU(19),e.ALo(20,"number"),e.qZA()()()),2&n){const t=e.oxw();e.xp6(5),e.hij("",e.lcZ(6,5,null==t.balances?null:t.balances.lightning)," Sats"),e.xp6(2),e.s9C("value",(null==t.balances?null:t.balances.lightning)/(null==t.balances?null:t.balances.total)*100),e.xp6(5),e.hij("",e.lcZ(13,7,null==t.balances?null:t.balances.onchain)," Sats"),e.xp6(2),e.s9C("value",(null==t.balances?null:t.balances.onchain)/(null==t.balances?null:t.balances.total)*100),e.xp6(5),e.hij("",e.lcZ(20,9,null==t.balances?null:t.balances.total)," Sats")}}function lt(n,i){if(1&n&&(e.TgZ(0,"div",6)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let rt=(()=>{class n{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(t,a){if(1&t&&(e.YNc(0,st,21,11,"div",0),e.YNc(1,lt,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf"," "===a.errorMessage)("ngIfElse",o)}},directives:[p.O5,d.xw,d.yH,d.Wh,P.pW],pipes:[p.JJ],styles:[""]}),n})();var f=h(7322),X=h(7238),z=h(4834),Q=h(8129);const ct=function(){return["../connections/channels/open"]},ut=function(n){return{filter:n}};function pt(n,i){if(1&n&&(e.TgZ(0,"div",19)(1,"a",20),e._uU(2),e.ALo(3,"slice"),e.qZA(),e.TgZ(4,"div",6)(5,"mat-hint",21)(6,"strong",8),e._uU(7,"Local:"),e.qZA(),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"mat-hint",22),e._UZ(11,"fa-icon",23),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"mat-hint",24)(15,"strong",8),e._uU(16,"Remote:"),e.qZA(),e._uU(17),e.ALo(18,"number"),e.qZA()(),e._UZ(19,"mat-progress-bar",25),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(3);e.xp6(1),e.s9C("matTooltip",t.remote_alias||t.remote_pubkey),e.s9C("matTooltipDisabled",(t.remote_alias||t.remote_pubkey).length<26),e.Q6J("routerLink",e.DdM(21,ct))("state",e.VKq(22,ut,t.chan_id)),e.xp6(1),e.AsE(" ",e.Dn7(3,11,t.remote_alias||t.remote_pubkey,0,24),"",(t.remote_alias||t.remote_pubkey).length>25?"...":""," "),e.xp6(6),e.hij("",e.lcZ(9,15,t.local_balance||0)," Sats"),e.xp6(3),e.Q6J("icon",a.faBalanceScale),e.xp6(1),e.hij(" (",e.lcZ(13,17,t.balancedness||0),") "),e.xp6(5),e.hij("",e.lcZ(18,19,t.remote_balance||0)," Sats"),e.xp6(2),e.s9C("value",t.local_balance&&t.local_balance>0?+t.local_balance/(+t.local_balance+ +t.remote_balance)*100:0)}}function mt(n,i){if(1&n&&(e.TgZ(0,"div",17),e.YNc(1,pt,20,24,"div",18),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.allChannels)}}function dt(n,i){if(1&n&&(e.TgZ(0,"div",3)(1,"div",4)(2,"span",5),e._uU(3,"Total Capacity"),e.qZA(),e.TgZ(4,"div",6)(5,"mat-hint",7)(6,"strong",8),e._uU(7,"Local:"),e.qZA(),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"mat-hint",9),e._UZ(11,"fa-icon",10),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"mat-hint",11)(15,"strong",8),e._uU(16,"Remote:"),e.qZA(),e._uU(17),e.ALo(18,"number"),e.qZA()(),e._UZ(19,"mat-progress-bar",12),e.qZA(),e.TgZ(20,"div",13),e._UZ(21,"mat-divider",14),e.qZA(),e.TgZ(22,"div",15),e.YNc(23,mt,2,1,"div",16),e.qZA()()),2&n){const t=e.oxw(),a=e.MAs(2);e.xp6(8),e.hij("",e.lcZ(9,7,(null==t.channelBalances?null:t.channelBalances.localBalance)||0)," Sats"),e.xp6(3),e.Q6J("icon",t.faBalanceScale),e.xp6(1),e.hij(" (",e.lcZ(13,9,(null==t.channelBalances?null:t.channelBalances.balancedness)||0),") "),e.xp6(5),e.hij("",e.lcZ(18,11,(null==t.channelBalances?null:t.channelBalances.remoteBalance)||0)," Sats"),e.xp6(2),e.s9C("value",null!=t.channelBalances&&t.channelBalances.localBalance&&(null==t.channelBalances?null:t.channelBalances.localBalance)>0?+(null==t.channelBalances?null:t.channelBalances.localBalance)/(+(null==t.channelBalances?null:t.channelBalances.localBalance)+ +(null==t.channelBalances?null:t.channelBalances.remoteBalance))*100:0),e.xp6(4),e.Q6J("ngIf",t.allChannels&&t.allChannels.length>0)("ngIfElse",a)}}function _t(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",26),e._uU(1," No channels available. "),e.TgZ(2,"button",27),e.NdJ("click",function(){return e.CHM(t),e.oxw().goToChannels()}),e._uU(3,"Open Channel"),e.qZA()()}}function ht(n,i){if(1&n&&(e.TgZ(0,"div",28)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let gt=(()=>{class n{constructor(t){this.router=t,this.faBalanceScale=y.DL8,this.faDumbbell=y.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/lnd/connections")}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["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(t,a){if(1&t&&(e.YNc(0,dt,24,13,"div",0),e.YNc(1,_t,4,0,"ng-template",null,1,e.W1O),e.YNc(3,ht,3,1,"ng-template",null,2,e.W1O)),2&t){const o=e.MAs(4);e.Q6J("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",o)}},directives:[p.O5,d.xw,d.Wh,d.yH,f.bx,M.BN,X.gM,P.pW,z.d,Q.$V,p.sg,T.yS,k.lW],pipes:[p.JJ,p.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),n})();function ft(n,i){if(1&n&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),e._uU(4,"Daily"),e.qZA(),e.TgZ(5,"div",5),e._uU(6),e.ALo(7,"number"),e.qZA()(),e.TgZ(8,"div")(9,"h4",4),e._uU(10,"Weekly"),e.qZA(),e.TgZ(11,"div",5),e._uU(12),e.ALo(13,"number"),e.qZA()(),e.TgZ(14,"div")(15,"h4",4),e._uU(16,"Monthly"),e.qZA(),e.TgZ(17,"div",5),e._uU(18),e.ALo(19,"number"),e.qZA()(),e.TgZ(20,"div",6),e._UZ(21,"h4",7)(22,"span",5),e.qZA()(),e.TgZ(23,"div",3)(24,"div")(25,"h4",4),e._uU(26,"Transactions"),e.qZA(),e.TgZ(27,"div",5),e._uU(28),e.ALo(29,"number"),e.qZA()(),e.TgZ(30,"div")(31,"h4",4),e._uU(32,"Transactions"),e.qZA(),e.TgZ(33,"div",5),e._uU(34),e.ALo(35,"number"),e.qZA()(),e.TgZ(36,"div")(37,"h4",4),e._uU(38,"Transactions"),e.qZA(),e.TgZ(39,"div",5),e._uU(40),e.ALo(41,"number"),e.qZA()(),e.TgZ(42,"div",6),e._UZ(43,"h4",7)(44,"span",5),e.qZA()()()),2&n){const t=e.oxw();e.xp6(6),e.hij("",e.lcZ(7,6,null==t.fees?null:t.fees.day_fee_sum)," Sats"),e.xp6(6),e.hij("",e.lcZ(13,8,null==t.fees?null:t.fees.week_fee_sum)," Sats"),e.xp6(6),e.hij("",e.lcZ(19,10,null==t.fees?null:t.fees.month_fee_sum)," Sats"),e.xp6(10),e.Oqu(e.lcZ(29,12,null==t.fees?null:t.fees.daily_tx_count)),e.xp6(6),e.Oqu(e.lcZ(35,14,null==t.fees?null:t.fees.weekly_tx_count)),e.xp6(6),e.Oqu(e.lcZ(41,16,null==t.fees?null:t.fees.monthly_tx_count))}}function Ct(n,i){if(1&n&&(e.TgZ(0,"div",8)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let qe=(()=>{class n{constructor(){this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100}ngOnChanges(){if(this.fees.month_fee_sum){this.totalFees=[{name:"Monthly",value:this.fees.month_fee_sum},{name:"Weekly",value:this.fees.week_fee_sum},{name:"Daily ",value:this.fees.day_fee_sum}];const t=Math.ceil(Math.log(this.fees.month_fee_sum+1)/Math.LN10),a=Math.pow(10,t-1);this.maxFeeValue=Math.ceil(this.fees.month_fee_sum/a)*a/5||100,Object.assign(this,this.totalFees)}else this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100,Object.assign(this,this.totalFees)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},features:[e.TTD],decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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"],["fxFlex","20"],[1,"dashboard-info-title"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,a){if(1&t&&(e.YNc(0,ft,45,18,"div",0),e.YNc(1,Ct,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",o)}},directives:[p.O5,d.xw,d.yH,d.Wh],pipes:[p.JJ],styles:[""]}),n})();function xt(n,i){if(1&n&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),e._uU(4,"Active"),e.qZA(),e.TgZ(5,"div",5),e._UZ(6,"span",6),e._uU(7),e.ALo(8,"number"),e.qZA()(),e.TgZ(9,"div")(10,"h4",4),e._uU(11,"Pending"),e.qZA(),e.TgZ(12,"div",5),e._UZ(13,"span",7),e._uU(14),e.ALo(15,"number"),e.qZA()(),e.TgZ(16,"div")(17,"h4",4),e._uU(18,"Inactive"),e.qZA(),e.TgZ(19,"div",5),e._UZ(20,"span",8),e._uU(21),e.ALo(22,"number"),e.qZA()(),e.TgZ(23,"div")(24,"h4",4),e._uU(25,"Closing"),e.qZA(),e.TgZ(26,"div",5),e._UZ(27,"span",9),e._uU(28),e.ALo(29,"number"),e.qZA()()(),e.TgZ(30,"div",3)(31,"div")(32,"h4",4),e._uU(33,"Capacity"),e.qZA(),e.TgZ(34,"div",5),e._uU(35),e.ALo(36,"number"),e.qZA()(),e.TgZ(37,"div")(38,"h4",4),e._uU(39,"Capacity"),e.qZA(),e.TgZ(40,"div",5),e._uU(41),e.ALo(42,"number"),e.qZA()(),e.TgZ(43,"div")(44,"h4",4),e._uU(45,"Capacity"),e.qZA(),e.TgZ(46,"div",5),e._uU(47),e.ALo(48,"number"),e.qZA()(),e.TgZ(49,"div")(50,"h4",4),e._uU(51,"Capacity"),e.qZA(),e.TgZ(52,"div",5),e._uU(53),e.ALo(54,"number"),e.qZA()()()()),2&n){const t=e.oxw();e.xp6(7),e.Oqu(e.lcZ(8,8,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.num_channels)||0)),e.xp6(7),e.Oqu(e.lcZ(15,10,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.num_channels)||0)),e.xp6(7),e.Oqu(e.lcZ(22,12,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.num_channels)||0)),e.xp6(7),e.Oqu(e.lcZ(29,14,(null==t.channelsStatus||null==t.channelsStatus.closing?null:t.channelsStatus.closing.num_channels)||0)),e.xp6(7),e.hij("",e.lcZ(36,16,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(42,18,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(48,20,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(54,22,(null==t.channelsStatus||null==t.channelsStatus.closing?null:t.channelsStatus.closing.capacity)||0)," Sats")}}function yt(n,i){if(1&n&&(e.TgZ(0,"div",10)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let Ue=(()=>{class n{constructor(){this.channelsStatus={}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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"],[1,"dot","tiny-dot","red"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,a){if(1&t&&(e.YNc(0,xt,55,24,"div",0),e.YNc(1,yt,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf"," "===a.errorMessage)("ngIfElse",o)}},directives:[p.O5,d.xw,d.yH,d.Wh],pipes:[p.JJ],styles:[""]}),n})();var Oe=h(8213),w=h(7861),Re=h(9107);function Tt(n,i){if(1&n&&(e.TgZ(0,"mat-hint",19)(1,"strong",20),e._uU(2,"Capacity: "),e.qZA(),e._uU(3),e.ALo(4,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(3),e.hij("",e.lcZ(4,1,t.remote_balance||0)," Sats")}}function bt(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).$implicit;return e.oxw(3).onLoopOut(o)}),e._uU(1,"Loop Out"),e.qZA()}}function vt(n,i){if(1&n&&(e.TgZ(0,"div",21)(1,"mat-hint",22)(2,"strong",20),e._uU(3,"Capacity: "),e.qZA(),e._uU(4),e.ALo(5,"number"),e.qZA(),e.YNc(6,bt,2,0,"button",23),e.qZA()),2&n){const t=e.oxw().$implicit,a=e.oxw(3);e.xp6(4),e.hij("",e.lcZ(5,2,t.local_balance||0)," Sats"),e.xp6(2),e.Q6J("ngIf",a.showLoop)}}function Zt(n,i){if(1&n&&e._UZ(0,"mat-progress-bar",25),2&n){const t=e.oxw().$implicit,a=e.oxw(3);e.s9C("value",a.totalLiquidity>0?(+t.remote_balance||0)/a.totalLiquidity*100:0)}}function wt(n,i){if(1&n&&e._UZ(0,"mat-progress-bar",25),2&n){const t=e.oxw().$implicit,a=e.oxw(3);e.s9C("value",a.totalLiquidity>0?(+t.local_balance||0)/a.totalLiquidity*100:0)}}const At=function(){return["../connections/channels/open"]},St=function(n){return{filter:n}};function Lt(n,i){if(1&n&&(e.TgZ(0,"div",13)(1,"a",14),e._uU(2),e.ALo(3,"slice"),e.qZA(),e.TgZ(4,"div",15),e.YNc(5,Tt,5,3,"mat-hint",16),e.YNc(6,vt,7,4,"div",17),e.qZA(),e.YNc(7,Zt,1,1,"mat-progress-bar",18),e.YNc(8,wt,1,1,"mat-progress-bar",18),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(3);e.xp6(1),e.s9C("matTooltip",t.remote_alias||t.remote_pubkey),e.s9C("matTooltipDisabled",(t.remote_alias||t.remote_pubkey).length<26),e.Q6J("routerLink",e.DdM(14,At))("state",e.VKq(15,St,t.chan_id)),e.xp6(1),e.AsE(" ",e.Dn7(3,10,t.remote_alias||t.remote_pubkey,0,24),"",(t.remote_alias||t.remote_pubkey).length>25?"...":""," "),e.xp6(3),e.Q6J("ngIf","In"===a.direction),e.xp6(1),e.Q6J("ngIf","Out"===a.direction),e.xp6(1),e.Q6J("ngIf","In"===a.direction),e.xp6(1),e.Q6J("ngIf","Out"===a.direction)}}function kt(n,i){if(1&n&&(e.TgZ(0,"div",11),e.YNc(1,Lt,9,17,"div",12),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.allChannels)}}const Ft=function(n,i,t){return{"mb-4":n,"mb-2":i,"mb-1":t}};function Nt(n,i){if(1&n&&(e.TgZ(0,"div",3)(1,"div",4)(2,"span",5),e._uU(3,"Total Capacity"),e.qZA(),e.TgZ(4,"mat-hint",6),e._uU(5),e.ALo(6,"number"),e.qZA(),e._UZ(7,"mat-progress-bar",7),e.qZA(),e.TgZ(8,"div",8),e._UZ(9,"mat-divider",9),e.qZA(),e.YNc(10,kt,2,1,"div",10),e.qZA()),2&n){const t=e.oxw(),a=e.MAs(2);e.Q6J("ngClass",e.kEZ(6,Ft,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD,t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),e.xp6(5),e.hij("",e.lcZ(6,4,t.totalLiquidity)," Sats"),e.xp6(5),e.Q6J("ngIf",t.allChannels&&t.allChannels.length>0)("ngIfElse",a)}}function qt(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",28),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).goToChannels()}),e._uU(1,"Open Channel"),e.qZA()}}function Ut(n,i){if(1&n&&(e.TgZ(0,"div",26),e._uU(1," No channels available. "),e.YNc(2,qt,2,0,"button",27),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngIf","Out"===t.direction)}}function Ot(n,i){if(1&n&&(e.TgZ(0,"div",29)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let Rt=(()=>{class n{constructor(t,a,o,s){this.router=t,this.loopService=a,this.commonService=o,this.store=s,this.targetConf=6,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.showLoop=!(!t.swapServerUrl||""===t.swapServerUrl.trim())})}goToChannels(){this.router.navigateByUrl("/lnd/connections")}onLoopOut(t){this.loopService.getLoopOutTermsAndQuotes(this.targetConf).pipe((0,_.R)(this.unSubs[1])).subscribe(a=>{this.store.dispatch((0,w.qR)({payload:{minHeight:"56rem",data:{channel:t,minQuote:a[0],maxQuote:a[1],direction:l.$I.LOOP_OUT,component:Oe.a}}}))})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0),e.Y36(Re.W),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[3,"perfectScrollbar",4,"ngIf","ngIfElse"],[3,"perfectScrollbar"],["fxLayout","column",4,"ngFor","ngForOf"],["fxLayout","column"],[1,"dashboard-capacity-header","mt-2",3,"routerLink","state","matTooltip","matTooltipDisabled"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start"],["class","font-size-90 color-primary",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",4,"ngIf"],["class","dashboard-progress-bar","mode","determinate",3,"value",4,"ngIf"],[1,"font-size-90","color-primary"],[1,"font-weight-900","mr-5px"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxFlex","85","fxLayoutAlign","start start",1,"font-size-90","color-primary"],["fxFlex","15","fxLayoutAlign","end start","class","button-link-dashboard","color","primary","mat-button","","aria-label","Loop Out",3,"click",4,"ngIf"],["fxFlex","15","fxLayoutAlign","end start","color","primary","mat-button","","aria-label","Loop Out",1,"button-link-dashboard",3,"click"],["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(t,a){if(1&t&&(e.YNc(0,Nt,11,10,"div",0),e.YNc(1,Ut,3,1,"ng-template",null,1,e.W1O),e.YNc(3,Ot,3,1,"ng-template",null,2,e.W1O)),2&t){const o=e.MAs(4);e.Q6J("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",o)}},directives:[p.O5,d.xw,d.Wh,d.yH,p.mk,S.oO,f.bx,P.pW,z.d,Q.$V,p.sg,T.yS,X.gM,k.lW],pipes:[p.JJ,p.OU],styles:[""]}),n})();var D=h(3251),L=h(6087),Z=h(4847),r=h(2075),J=h(8966),v=h(6523),c=h(3075),I=h(7531),W=h(3390),$=h(6534),R=h(4107),Y=h(508),ue=h(2368);function It(n,i){if(1&n&&(e.TgZ(0,"mat-option",25),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(e.lcZ(2,2,t))}}function Mt(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.invoiceError)}}function Dt(n,i){if(1&n&&(e.TgZ(0,"div",26),e._UZ(1,"fa-icon",27),e.YNc(2,Mt,2,1,"span",28),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.invoiceError)}}let Pt=(()=>{class n{constructor(t,a,o,s,u,g){this.dialogRef=t,this.data=a,this.store=o,this.decimalPipe=s,this.commonService=u,this.actions=g,this.faExclamationTriangle=y.eHv,this.selNode={},this.memo="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=l.IV,this.timeUnitEnum=l.Qk,this.timeUnits=l.LO,this.selTimeUnit=l.Qk.SECS,this.invoiceError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.actions.pipe((0,_.R)(this.unSubs[2]),(0,E.h)(t=>t.type===l.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(t=>{t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&"SaveNewInvoice"===t.payload.action&&(this.invoiceError=t.payload.message,t.payload.status===l.Bn.ERROR&&(this.invoiceError=t.payload.message),t.payload.status===l.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(t){this.invoiceError="";let a=this.expiry?this.expiry:3600;this.selTimeUnit!==l.Qk.SECS&&(a=this.commonService.convertTime(this.expiry,this.selTimeUnit,l.Qk.SECS)),this.store.dispatch((0,v.Rd)({payload:{uiMessage:l.m6.ADD_INVOICE,memo:this.memo,invoiceValue:this.invoiceValue,private:this.private,expiry:a,pageSize:this.pageSize,openModal:!0}}))}resetData(){this.memo="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=l.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,_.R)(this.unSubs[3])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,l.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onTimeUnitChange(t){this.expiry&&this.selTimeUnit!==t.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,t.value)),this.selTimeUnit=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(A.yh),e.Y36(p.JJ),e.Y36(O.v),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-create-invoices"]],decls:38,vars:16,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","end start"],["matInput","","autoFocus","","placeholder","Memo","tabindex","1","name","memo",3,"ngModel","ngModelChange"],["fxFlex","50","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","2","name","invoiceValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","24","fxLayoutAlign","start end"],["matInput","","placeholder","Expiry","type","number","tabindex","3","name","expiry",3,"ngModel","step","min","ngModelChange"],["tabindex","4","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"mt-1"],["tabindex","4","color","primary","name","private",3,"ngModel","ngModelChange"],["matTooltip","Include routing hints for private channels","matTooltipPosition","above",1,"info-icon"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","5","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","6",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,a){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Create Invoice"),e.qZA()(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),e.NdJ("ngModelChange",function(u){return a.memo=u}),e.qZA()(),e.TgZ(13,"mat-form-field",11)(14,"input",12),e.NdJ("ngModelChange",function(u){return a.invoiceValue=u})("keyup",function(){return a.onInvoiceValueChange()}),e.qZA(),e.TgZ(15,"span",13),e._uU(16," Sats "),e.qZA(),e.TgZ(17,"mat-hint"),e._uU(18),e.qZA()(),e.TgZ(19,"mat-form-field",14)(20,"input",15),e.NdJ("ngModelChange",function(u){return a.expiry=u}),e.qZA(),e.TgZ(21,"span",13),e._uU(22),e.ALo(23,"titlecase"),e.qZA()(),e.TgZ(24,"mat-form-field",14)(25,"mat-select",16),e.NdJ("selectionChange",function(u){return a.onTimeUnitChange(u)}),e.YNc(26,It,3,4,"mat-option",17),e.qZA()(),e.TgZ(27,"div",18)(28,"mat-slide-toggle",19),e.NdJ("ngModelChange",function(u){return a.private=u}),e._uU(29,"Private Routing Hints"),e.qZA(),e.TgZ(30,"mat-icon",20),e._uU(31,"info_outline"),e.qZA()(),e.YNc(32,Dt,3,2,"div",21),e.TgZ(33,"div",22)(34,"button",23),e.NdJ("click",function(){return a.resetData()}),e._uU(35,"Clear Field"),e.qZA(),e.TgZ(36,"button",24),e.NdJ("click",function(){e.CHM(o);const u=e.MAs(10);return a.onAddInvoice(u)}),e._uU(37,"Create Invoice"),e.qZA()()()()()()}2&t&&(e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",a.memo),e.xp6(2),e.Q6J("ngModel",a.invoiceValue)("step",100)("min",1),e.xp6(4),e.Oqu(a.invoiceValueHint),e.xp6(2),e.Q6J("ngModel",a.expiry)("step",a.selTimeUnit===a.timeUnitEnum.SECS?300:a.selTimeUnit===a.timeUnitEnum.MINS?10:a.selTimeUnit===a.timeUnitEnum.HOURS?2:1)("min",1),e.xp6(2),e.hij(" ",e.lcZ(23,14,a.selTimeUnit)," "),e.xp6(3),e.Q6J("value",a.selTimeUnit),e.xp6(1),e.Q6J("ngForOf",a.timeUnits),e.xp6(2),e.Q6J("ngModel",a.private),e.xp6(4),e.Q6J("ngIf",""!==a.invoiceError))},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,J.ZT,b.dn,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.JJ,c.On,c.wV,c.qQ,$.q,f.R9,f.bx,R.gD,p.sg,Y.ey,ue.Rr,K.Hw,X.gM,p.O5,M.BN],pipes:[p.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var Jt=h(8627);function Et(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"input",7),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().memo=o}),e.qZA()(),e.TgZ(4,"mat-form-field",8)(5,"input",9),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().invoiceValue=o})("keyup",function(){return e.CHM(t),e.oxw().onInvoiceValueChange()}),e.qZA(),e.TgZ(6,"span",10),e._uU(7," Sats "),e.qZA(),e.TgZ(8,"mat-hint"),e._uU(9),e.qZA()(),e.TgZ(10,"div",11)(11,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(12,"Clear Field"),e.qZA(),e.TgZ(13,"button",13),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(1);return e.oxw().onAddInvoice(o)}),e._uU(14,"Create Invoice"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.memo),e.xp6(2),e.Q6J("ngModel",t.invoiceValue)("step",100)("min",1),e.xp6(4),e.Oqu(t.invoiceValueHint)}}function Qt(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",14)(1,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw().openCreateInvoiceModal()}),e._uU(2,"Create Invoice"),e.qZA()()}}function Yt(n,i){1&n&&e._UZ(0,"mat-progress-bar",46)}function Ht(n,i){1&n&&(e.TgZ(0,"th",47),e._uU(1," Date Created "),e.qZA())}const pe=function(n){return{"mr-0":n}};function Bt(n,i){if(1&n&&e._UZ(0,"span",53),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,pe,t.screenSize===t.screenSizeEnum.XS))}}function Vt(n,i){if(1&n&&e._UZ(0,"span",54),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,pe,t.screenSize===t.screenSizeEnum.XS))}}function Gt(n,i){if(1&n&&e._UZ(0,"span",55),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,pe,t.screenSize===t.screenSizeEnum.XS))}}function zt(n,i){if(1&n&&e._UZ(0,"span",56),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,pe,t.screenSize===t.screenSizeEnum.XS))}}function Wt(n,i){if(1&n&&(e.TgZ(0,"td",48),e.YNc(1,Bt,1,3,"span",49),e.YNc(2,Vt,1,3,"span",50),e.YNc(3,Gt,1,3,"span",51),e.YNc(4,zt,1,3,"span",52),e._uU(5),e.ALo(6,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf","OPEN"===(null==t?null:t.state)),e.xp6(1),e.Q6J("ngIf","SETTLED"===(null==t?null:t.state)),e.xp6(1),e.Q6J("ngIf","ACCEPTED"===(null==t?null:t.state)),e.xp6(1),e.Q6J("ngIf","CANCELED"===(null==t?null:t.state)),e.xp6(1),e.hij(" ",e.xi3(6,5,1e3*(null==t?null:t.creation_date),"dd/MMM/y HH:mm"),"")}}function Xt(n,i){1&n&&(e.TgZ(0,"th",57),e._uU(1," Date Settled "),e.qZA())}function $t(n,i){if(1&n&&(e.TgZ(0,"td",58),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(0!=+(null==t?null:t.settle_date)?e.xi3(2,1,1e3*+(null==t?null:t.settle_date),"dd/MMM/y HH:mm"):"-")}}function jt(n,i){1&n&&(e.TgZ(0,"th",47),e._uU(1," Memo "),e.qZA())}const Kt=function(n){return{"max-width":n}};function en(n,i){if(1&n&&(e.TgZ(0,"td",48)(1,"div",59)(2,"span",60),e._uU(3),e.qZA()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngStyle",e.VKq(2,Kt,a.screenSize===a.screenSizeEnum.XS?"10rem":"22rem")),e.xp6(2),e.Oqu(null==t?null:t.memo)}}function tn(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1," Amount (Sats) "),e.qZA())}function nn(n,i){if(1&n&&(e.TgZ(0,"td",48)(1,"span",62),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.value)," ")}}function an(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1," Amount Settled (Sats) "),e.qZA())}function on(n,i){if(1&n&&(e.TgZ(0,"td",48)(1,"span",62),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.amt_paid_sat)," ")}}function sn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",63)(1,"div",64)(2,"mat-select",65),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",66),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}const ln=function(n){return{"pl-3":n}};function rn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",67)(1,"div",68)(2,"mat-select",69),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",66),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).onInvoiceClick(s)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",66),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).onRefreshInvoice(s)}),e._uU(7,"Refresh"),e.qZA()()()()}if(2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,ln,t.screenSize!==t.screenSizeEnum.XS))}}function cn(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No invoice available."),e.qZA())}function un(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting invoices..."),e.qZA())}function pn(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function mn(n,i){if(1&n&&(e.TgZ(0,"td",70),e.YNc(1,cn,2,0,"p",71),e.YNc(2,un,2,0,"p",71),e.YNc(3,pn,2,1,"p",71),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const dn=function(n){return{"display-none":n}};function _n(n,i){if(1&n&&e._UZ(0,"tr",72),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,dn,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function hn(n,i){1&n&&e._UZ(0,"tr",73)}function gn(n,i){1&n&&e._UZ(0,"tr",74)}const fn=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Cn=function(){return["no_invoice"]};function xn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",16)(1,"div",17)(2,"div",18),e._UZ(3,"fa-icon",19),e.TgZ(4,"span",20),e._uU(5,"Invoices History"),e.qZA()(),e.TgZ(6,"mat-form-field",21)(7,"input",22),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA()()(),e.TgZ(8,"div",23),e.YNc(9,Yt,1,0,"mat-progress-bar",24),e.TgZ(10,"table",25,26),e.ynx(12,27),e.YNc(13,Ht,2,0,"th",28),e.YNc(14,Wt,7,8,"td",29),e.BQk(),e.ynx(15,30),e.YNc(16,Xt,2,0,"th",31),e.YNc(17,$t,3,4,"td",32),e.BQk(),e.ynx(18,33),e.YNc(19,jt,2,0,"th",28),e.YNc(20,en,4,4,"td",29),e.BQk(),e.ynx(21,34),e.YNc(22,tn,2,0,"th",35),e.YNc(23,nn,4,3,"td",29),e.BQk(),e.ynx(24,36),e.YNc(25,an,2,0,"th",35),e.YNc(26,on,4,3,"td",29),e.BQk(),e.ynx(27,37),e.YNc(28,sn,6,0,"th",38),e.YNc(29,rn,8,3,"td",39),e.BQk(),e.ynx(30,40),e.YNc(31,mn,4,3,"td",41),e.BQk(),e.YNc(32,_n,1,3,"tr",42),e.YNc(33,hn,1,0,"tr",43),e.YNc(34,gn,1,0,"tr",44),e.qZA(),e.TgZ(35,"mat-paginator",45),e.NdJ("page",function(o){return e.CHM(t),e.oxw().onPageChange(o)}),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("icon",t.faHistory),e.xp6(4),e.Q6J("ngModel",t.selFilter),e.xp6(2),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.invoices)("ngClass",e.VKq(13,fn,""!==t.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(15,Cn)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("length",t.totalInvoices)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Ie=(()=>{class n{constructor(t,a,o,s,u,g){this.logger=t,this.store=a,this.decimalPipe=o,this.commonService=s,this.datePipe=u,this.actions=g,this.calledFrom="transactions",this.faHistory=y.qO$,this.selNode={},this.newlyAddedInvoiceMemo=null,this.newlyAddedInvoiceValue=null,this.memo="",this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoicesData=[],this.information={},this.flgSticky=!1,this.selFilter="",this.private=!1,this.expiryStep=100,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.firstOffset=-1,this.lastOffset=-1,this.totalInvoices=0,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["creation_date","value","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["creation_date","settle_date","value","amt_paid_sat","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["creation_date","settle_date","memo","value","actions"]):(this.flgSticky=!0,this.displayedColumns=["creation_date","settle_date","memo","value","amt_paid_sat","actions"])}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(C.Ef).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.totalInvoices=t.listInvoices.total_invoices,this.firstOffset=+t.listInvoices.first_index_offset,this.lastOffset=+t.listInvoices.last_index_offset,this.invoicesData=t.listInvoices.invoices||[],this.invoicesData.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoicesData),this.logger.info(t)}),this.actions.pipe((0,_.R)(this.unSubs[3]),(0,E.h)(t=>t.type===l.uR.SET_LOOKUP_LND||t.type===l.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(t=>{t.type===l.uR.SET_LOOKUP_LND&&this.invoicesData.length>0&&this.sort&&this.paginator&&t.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(t.payload))),this.loadInvoicesTable(this.invoicesData))})}ngAfterViewInit(){this.invoicesData.length>0&&this.loadInvoicesTable(this.invoicesData)}onAddInvoice(t){const a=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo=this.memo,this.newlyAddedInvoiceValue=this.invoiceValue,this.store.dispatch((0,v.Rd)({payload:{uiMessage:l.m6.ADD_INVOICE,memo:this.memo,invoiceValue:this.invoiceValue,private:this.private,expiry:a,pageSize:this.pageSize,openModal:!0}})),this.resetData()}onInvoiceClick(t){this.store.dispatch((0,w.qR)({payload:{data:{invoice:t,newlyAdded:!1,component:Jt.v}}}))}onRefreshInvoice(t){this.store.dispatch((0,v.n7)({payload:{openSnackBar:!0,paymentHash:Buffer.from(t.r_hash.trim(),"hex").toString("base64").replace(/\+/g,"-").replace(/[/]/g,"_")}}))}updateInvoicesData(t){this.invoicesData=this.invoicesData.map(a=>a.r_hash===t.r_hash?t:a)}loadInvoicesTable(t){this.invoices=new r.by(t?[...t]:[]),this.invoices.sort=this.sort,this.invoices.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.invoices.filterPredicate=(a,o)=>((a.creation_date?this.datePipe.transform(new Date(1e3*a.creation_date),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(a.settle_date?this.datePipe.transform(new Date(1e3*a.settle_date),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(a).toLowerCase()).includes(o),this.applyFilter(),this.logger.info(this.invoices)}resetData(){this.memo="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onPageChange(t){let a=!0,o=this.lastOffset;this.pageSize=t.pageSize,0===t.pageIndex?(a=!0,o=0):t.pageIndext.previousPageIndex&&t.length>(t.pageIndex+1)*t.pageSize?(a=!0,o=this.firstOffset):t.length<=(t.pageIndex+1)*t.pageSize&&(a=!1,o=0),this.store.dispatch((0,v.WM)({payload:{num_max_invoices:t.pageSize,index_offset:o,reversed:a}}))}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,_.R)(this.unSubs[4])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,l.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}openCreateInvoiceModal(){this.store.dispatch((0,w.qR)({payload:{data:{pageSize:this.pageSize,component:Pt}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(p.JJ),e.Y36(O.v),e.Y36(p.uU),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lightning-invoices"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","end start"],["matInput","","placeholder","Memo","tabindex","1","name","memo",3,"ngModel","ngModelChange"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","2","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4",3,"click"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","5",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","tabindex","6","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","creation_date"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","settle_date"],["mat-header-cell","","mat-sort-header","","class","pl-4",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","memo"],["matColumnDef","value"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amt_paid_sat"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot grey","matTooltip","Open","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot green","matTooltip","Settled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Accepted","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Cancelled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Open","matTooltipPosition","right",1,"dot","grey",3,"ngClass"],["matTooltip","Settled","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Accepted","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Cancelled","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Et,15,5,"form",1),e.YNc(2,Qt,3,0,"div",2),e.YNc(3,xn,36,16,"div",3),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf","home"===a.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===a.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===a.calledFrom))},directives:[d.xw,d.yH,d.Wh,p.O5,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,c.JJ,c.On,c.wV,c.qQ,$.q,f.R9,f.bx,k.lW,M.BN,Q.$V,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,X.gM,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.uU,p.JJ],styles:[".mat-column-memo[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-memo[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var V=h(5698),j=h(8104),H=h(1125),ne=h(1079);const yn=["paymentReq"];function Tn(n,i){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function bn(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment request is required."),e.qZA())}function vn(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function Zn(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment amount is required."),e.qZA())}function wn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1)(1,"input",29,30),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().paymentAmount=o})("change",function(o){return e.CHM(t),e.oxw().onAmountChange(o)}),e.qZA(),e.TgZ(3,"mat-hint"),e._uU(4,"It is a zero amount invoice, enter amount to be paid."),e.qZA(),e.YNc(5,Zn,2,0,"mat-error",11),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.paymentAmount),e.xp6(4),e.Q6J("ngIf",!t.paymentAmount)}}function An(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",null==t?null:t.name," ")}}function Sn(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("",null==t.selFeeLimitType?null:t.selFeeLimitType.placeholder," is required.")}}function Ln(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu((null==t?null:t.remote_alias)||(null==t?null:t.chan_id))}}function kn(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Channel not found in the list."),e.qZA())}function Fn(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentError)}}function Nn(n,i){if(1&n&&(e.TgZ(0,"div",32),e._UZ(1,"fa-icon",33),e.YNc(2,Fn,2,1,"span",11),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.paymentError)}}let qn=(()=>{class n{constructor(t,a,o,s,u,g,U){this.dialogRef=t,this.store=a,this.logger=o,this.commonService=s,this.decimalPipe=u,this.actions=g,this.dataService=U,this.faExclamationTriangle=y.eHv,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.showAdvanced=!1,this.activeChannels=[],this.filteredMinAmtActvChannels=[],this.selectedChannelCtrl=new c.NI,this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.feeLimitTypes=l.Vc,this.advancedTitle="Advanced Options",this.paymentError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(o=>{this.selNode=o}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[1])).subscribe(o=>{this.activeChannels=o.channels.filter(s=>s.active),this.filteredMinAmtActvChannels=this.activeChannels,this.filteredMinAmtActvChannels.length&&this.filteredMinAmtActvChannels.length>0?this.selectedChannelCtrl.enable():this.selectedChannelCtrl.disable(),this.logger.info(o)}),this.actions.pipe((0,_.R)(this.unSubs[2]),(0,E.h)(o=>o.type===l.uR.UPDATE_API_CALL_STATUS_LND||o.type===l.uR.SEND_PAYMENT_STATUS_LND)).subscribe(o=>{o.type===l.uR.SEND_PAYMENT_STATUS_LND&&this.dialogRef.close(),o.type===l.uR.UPDATE_API_CALL_STATUS_LND&&o.payload.status===l.Bn.ERROR&&"SendPayment"===o.payload.action&&(delete this.paymentDecoded.num_satoshis,this.paymentError=o.payload.message)});let t="",a="";this.activeChannels=this.activeChannels.sort((o,s)=>(t=o.remote_alias?o.remote_alias.toLowerCase():o.chan_id?o.chan_id.toLowerCase():"",a=s.remote_alias?s.remote_alias.toLowerCase():s.chan_id?s.chan_id.toLowerCase():"",ta?1:0)),this.selectedChannelCtrl.valueChanges.pipe((0,_.R)(this.unSubs[3])).subscribe(o=>{"string"==typeof o&&(this.filteredMinAmtActvChannels=this.filterChannels())})}filterChannels(){return this.activeChannels.filter(t=>0===(t.remote_alias?t.remote_alias.toLowerCase():t.chan_id?t.chan_id.toLowerCase():"").indexOf(this.selectedChannelCtrl.value?this.selectedChannelCtrl.value.toLowerCase():"")&&t.local_balance>=+(this.paymentDecoded.num_satoshis?this.paymentDecoded.num_satoshis:0))}displayFn(t){return t&&t.remote_alias?t.remote_alias:t&&t.chan_id?t.chan_id:""}onSelectedChannelChanged(){if(this.selectedChannelCtrl.value&&this.selectedChannelCtrl.value.length>0&&"string"==typeof this.selectedChannelCtrl.value){const t=this.activeChannels.filter(a=>{const o=a.remote_alias?a.remote_alias.toLowerCase():a.chan_id?a.chan_id.toLowerCase():"";return o.length===this.selectedChannelCtrl.value.length&&0===o.indexOf(this.selectedChannelCtrl.value?this.selectedChannelCtrl.value.toLowerCase():"")});t&&t.length>0?(this.selectedChannelCtrl.setValue(t[0]),this.selectedChannelCtrl.setErrors(null)):this.selectedChannelCtrl.setErrors({notfound:!0})}}onSendPayment(){if(this.selectedChannelCtrl.value&&"string"==typeof this.selectedChannelCtrl.value&&this.onSelectedChannelChanged(),!this.paymentRequest||this.zeroAmtInvoice&&(!this.paymentAmount||this.paymentAmount<=0)||"string"==typeof this.selectedChannelCtrl.value)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.onPaymentRequestEntry(this.paymentRequest)}sendPayment(){if(this.selFeeLimitType!==this.feeLimitTypes[0]&&!this.feeLimit)return!0;this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis&&(this.paymentDecoded.num_satoshis=(+this.paymentDecoded.num_msat/1e3).toString()),this.paymentDecoded.num_satoshis&&""!==this.paymentDecoded.num_satoshis&&"0"!==this.paymentDecoded.num_satoshis?(this.zeroAmtInvoice=!1,this.store.dispatch((0,v.oV)({payload:{uiMessage:l.m6.SEND_PAYMENT,paymentReq:this.paymentRequest,outgoingChannel:this.selectedChannelCtrl.value,feeLimitType:this.selFeeLimitType.id,feeLimit:this.feeLimit,fromDialog:!0}}))):(this.zeroAmtInvoice=!0,this.paymentDecoded.num_satoshis=this.paymentAmount,this.store.dispatch((0,v.oV)({payload:{uiMessage:l.m6.SEND_PAYMENT,paymentReq:this.paymentRequest,paymentAmount:this.paymentAmount,outgoingChannel:this.selectedChannelCtrl.value,feeLimitType:this.selFeeLimitType.id,feeLimit:this.feeLimit,fromDialog:!0}})))}onAmountChange(t){delete this.paymentDecoded.num_satoshis}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentAmount=null,this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentRequest&&this.paymentRequest.length>100&&(this.paymentReq.control.setErrors(null),this.zeroAmtInvoice=!1,this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,V.q)(1)).subscribe({next:a=>{this.paymentDecoded=a,this.selectedChannelCtrl.setValue(null),this.onAdvancedPanelToggle(!0,!0),this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis&&(this.paymentDecoded.num_satoshis=(+this.paymentDecoded.num_msat/1e3).toString()),this.paymentDecoded.num_satoshis&&""!==this.paymentDecoded.num_satoshis&&"0"!==this.paymentDecoded.num_satoshis?(this.filteredMinAmtActvChannels=this.filterChannels(),this.filteredMinAmtActvChannels.length&&this.filteredMinAmtActvChannels.length>0?this.selectedChannelCtrl.enable():this.selectedChannelCtrl.disable(),this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.num_satoshis,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,_.R)(this.unSubs[4])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis)+" Sats ("+o.symbol+" "+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+(this.paymentDecoded.description?this.paymentDecoded.description:"None")},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis)+" Sats | Memo: "+(this.paymentDecoded.description?this.paymentDecoded.description:"None")+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis)+" Sats | Memo: "+(this.paymentDecoded.description?this.paymentDecoded.description:"None")):(this.zeroAmtInvoice=!0,this.filteredMinAmtActvChannels=this.activeChannels,this.filteredMinAmtActvChannels.length&&this.filteredMinAmtActvChannels.length>0?this.selectedChannelCtrl.enable():this.selectedChannelCtrl.disable(),this.paymentDecodedHint="Memo: "+(this.paymentDecoded.description?this.paymentDecoded.description:"None"))},error:a=>{this.logger.error(a),this.paymentDecodedHint="ERROR: "+a.message,this.paymentReq.control.setErrors({decodeError:!0})}}))}onAdvancedPanelToggle(t,a){if(t&&!a){const o=this.selectedChannelCtrl.value&&this.selectedChannelCtrl.value.remote_alias?this.selectedChannelCtrl.value.remote_alias:this.selectedChannelCtrl.value&&this.selectedChannelCtrl.value.chan_id?this.selectedChannelCtrl.value.chan_id:"";this.advancedTitle="Advanced Options | "+this.selFeeLimitType.name+("none"===this.selFeeLimitType.id?"":": "+this.feeLimit)+(""!==o?" | First Outgoing Channel: "+o:"")}else this.advancedTitle="Advanced Options"}resetData(){this.paymentDecoded={},this.paymentRequest="",this.selectedChannelCtrl.setValue(null),this.filteredMinAmtActvChannels=this.activeChannels,this.filteredMinAmtActvChannels.length&&this.filteredMinAmtActvChannels.length>0?this.selectedChannelCtrl.enable():this.selectedChannelCtrl.disable(),this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.advancedTitle="Advanced Options",this.zeroAmtInvoice=!1,this.paymentReq.control.setErrors(null),this.paymentError="",this.paymentDecodedHint=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(A.yh),e.Y36(N.mQ),e.Y36(O.v),e.Y36(p.JJ),e.Y36(G.eX),e.Y36(j.D))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lightning-send-payments"]],viewQuery:function(t,a){if(1&t&&e.Gf(yn,5),2&t){let o;e.iGM(o=e.CRH())&&(a.paymentReq=o.first)}},decls:43,vars:21,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","rows","4","tabindex","1","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxFlex","100",4,"ngIf"],["fxFlex","100","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxFlex","100","fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["fxFlex","30","fxLayoutAlign","start end"],["tabindex","5","Placeholder","Fee Limits",3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","26"],["matInput","","type","number","name","feeLmt","required","","tabindex","6",3,"ngModel","placeholder","step","min","disabled","ngModelChange"],["fLmt","ngModel"],["fxFlex","40","fxLayoutAlign","start end"],["type","text","placeholder","First Outgoing Channel","aria-label","First Outgoing Channel","matInput","","tabindex","7",3,"formControl","matAutocomplete"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],["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","","id","sendBtn","color","primary","tabindex","3",3,"click"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Send Payment"),e.qZA()(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",1)(12,"textarea",9,10),e.NdJ("ngModelChange",function(s){return a.onPaymentRequestEntry(s)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(14,Tn,2,1,"mat-hint",11),e.YNc(15,bn,2,0,"mat-error",11),e.YNc(16,vn,2,1,"mat-error",11),e.qZA(),e.YNc(17,wn,6,2,"mat-form-field",12),e.TgZ(18,"mat-expansion-panel",13),e.NdJ("closed",function(){return a.onAdvancedPanelToggle(!0,!1)})("opened",function(){return a.onAdvancedPanelToggle(!1,!1)}),e.TgZ(19,"mat-expansion-panel-header")(20,"mat-panel-title")(21,"span"),e._uU(22),e.qZA()()(),e.TgZ(23,"div",14)(24,"mat-form-field",15)(25,"mat-select",16),e.NdJ("valueChange",function(s){return a.selFeeLimitType=s}),e.YNc(26,An,2,2,"mat-option",17),e.qZA()(),e.TgZ(27,"mat-form-field",18)(28,"input",19,20),e.NdJ("ngModelChange",function(s){return a.feeLimit=s}),e.qZA(),e.YNc(30,Sn,2,1,"mat-error",11),e.qZA(),e.TgZ(31,"mat-form-field",21),e._UZ(32,"input",22),e.TgZ(33,"mat-autocomplete",23,24),e.NdJ("optionSelected",function(){return a.onSelectedChannelChanged()}),e.YNc(35,Ln,2,2,"mat-option",17),e.qZA(),e.YNc(36,kn,2,0,"mat-error",11),e.qZA()()(),e.YNc(37,Nn,3,2,"div",25),e.TgZ(38,"div",26)(39,"button",27),e.NdJ("click",function(){return a.resetData()}),e._uU(40,"Clear Fields"),e.qZA(),e.TgZ(41,"button",28),e.NdJ("click",function(){return a.onSendPayment()}),e._uU(42,"Send Payment"),e.qZA()()()()()()),2&t){const o=e.MAs(13),s=e.MAs(34);e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",a.paymentRequest),e.xp6(2),e.Q6J("ngIf",a.paymentRequest&&""!==a.paymentDecodedHint),e.xp6(1),e.Q6J("ngIf",!a.paymentRequest),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.decodeError),e.xp6(1),e.Q6J("ngIf",a.zeroAmtInvoice),e.xp6(5),e.Oqu(a.advancedTitle),e.xp6(3),e.Q6J("value",a.selFeeLimitType),e.xp6(1),e.Q6J("ngForOf",a.feeLimitTypes),e.xp6(2),e.Q6J("ngModel",a.feeLimit)("placeholder",null==a.selFeeLimitType?null:a.selFeeLimitType.placeholder)("step",1)("min",0)("disabled",a.selFeeLimitType===a.feeLimitTypes[0]),e.xp6(2),e.Q6J("ngIf",a.selFeeLimitType!==a.feeLimitTypes[0]&&!a.feeLimit),e.xp6(2),e.Q6J("formControl",a.selectedChannelCtrl)("matAutocomplete",s),e.xp6(1),e.Q6J("displayWith",a.displayFn),e.xp6(2),e.Q6J("ngForOf",a.filteredMinAmtActvChannels),e.xp6(1),e.Q6J("ngIf",null==a.selectedChannelCtrl.errors?null:a.selectedChannelCtrl.errors.notfound),e.xp6(1),e.Q6J("ngIf",""!==a.paymentError)}},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,J.ZT,b.dn,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,p.O5,f.bx,f.TO,H.ib,H.yz,H.yK,R.gD,p.sg,Y.ey,c.wV,c.qQ,$.q,ne.ZL,c.oH,ne.XC,M.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();var oe=h(3093),ee=h(711);const Un=["sendPaymentForm"];function On(n,i){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function Rn(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment request is required."),e.qZA())}function In(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"textarea",7,8),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(5,On,2,1,"mat-hint",9),e.YNc(6,Rn,2,0,"mat-error",9),e.qZA(),e.TgZ(7,"div",10)(8,"button",11),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(9,"Clear Field"),e.qZA(),e.TgZ(10,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSendPayment()}),e._uU(11,"Send Payment"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.paymentRequest),e.xp6(2),e.Q6J("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),e.xp6(1),e.Q6J("ngIf",!t.paymentRequest)}}function Mn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",13)(1,"button",14),e.NdJ("click",function(){return e.CHM(t),e.oxw().openSendPaymentModal()}),e._uU(2,"Send Payment"),e.qZA()()}}function Dn(n,i){1&n&&e._UZ(0,"mat-progress-bar",52)}function Pn(n,i){1&n&&(e.TgZ(0,"th",53),e._uU(1,"Creation Date"),e.qZA())}const ae=function(n){return{"mr-0":n}};function Jn(n,i){if(1&n&&e._UZ(0,"span",57),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function En(n,i){if(1&n&&e._UZ(0,"span",58),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function Qn(n,i){if(1&n&&(e.TgZ(0,"td",54),e.YNc(1,Jn,1,3,"span",55),e.YNc(2,En,1,3,"span",56),e._uU(3),e.ALo(4,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf","SUCCEEDED"===(null==t?null:t.status)),e.xp6(1),e.Q6J("ngIf","SUCCEEDED"!==(null==t?null:t.status)),e.xp6(1),e.hij(" ",e.xi3(4,3,1e3*(null==t?null:t.creation_date),"dd/MMM/y HH:mm")," ")}}function Yn(n,i){1&n&&(e.TgZ(0,"th",53),e._uU(1,"Payment Hash"),e.qZA())}const Me=function(n){return{"max-width":n}};function Hn(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",59)(2,"span",60),e._uU(3),e.qZA()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngStyle",e.VKq(2,Me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(2),e.Oqu(null==t?null:t.payment_hash)}}function Bn(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1,"Fee (Sats)"),e.qZA())}function Vn(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",62),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,null==t?null:t.fee))}}function Gn(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1,"Value (Sats)"),e.qZA())}function zn(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",62),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,null==t?null:t.value))}}function Wn(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1,"#Hops"),e.qZA())}function Xn(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",62),e._uU(2),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu((null==t||null==t.htlcs[0]||null==t.htlcs[0].route||null==t.htlcs[0].route.hops?null:t.htlcs[0].route.hops.length)||0)}}function $n(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",63)(1,"div",64)(2,"mat-select",65),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",66),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function jn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",67)(1,"button",68),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).onPaymentClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function Kn(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No payment available."),e.qZA())}function ea(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting payments..."),e.qZA())}function ta(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function na(n,i){if(1&n&&(e.TgZ(0,"td",69),e.YNc(1,Kn,2,0,"p",9),e.YNc(2,ea,2,0,"p",9),e.YNc(3,ta,2,1,"p",9),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}function aa(n,i){if(1&n&&e._UZ(0,"span",57),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function ia(n,i){if(1&n&&e._UZ(0,"span",58),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function oa(n,i){if(1&n&&e._UZ(0,"span",57),2&n){const t=e.oxw(5);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function sa(n,i){if(1&n&&e._UZ(0,"span",58),2&n){const t=e.oxw(5);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function la(n,i){if(1&n&&(e.TgZ(0,"span",72),e.YNc(1,oa,1,3,"span",55),e.YNc(2,sa,1,3,"span",56),e._uU(3),e.ALo(4,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf","SUCCEEDED"===t.status),e.xp6(1),e.Q6J("ngIf","SUCCEEDED"!==t.status),e.xp6(1),e.hij(" ",e.xi3(4,3,1e3*t.attempt_time,"dd/MMM/y HH:mm")," ")}}function ra(n,i){if(1&n&&(e.ynx(0),e.YNc(1,la,5,6,"span",71),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function ca(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",70),e.YNc(2,aa,1,3,"span",55),e.YNc(3,ia,1,3,"span",56),e._uU(4),e.qZA(),e.YNc(5,ra,2,1,"ng-container",9),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Q6J("ngIf","SUCCEEDED"===(null==t?null:t.status)),e.xp6(1),e.Q6J("ngIf","SUCCEEDED"!==(null==t?null:t.status)),e.xp6(1),e.hij(" Total Attempts: ",null==t||null==t.htlcs?null:t.htlcs.length," "),e.xp6(1),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function ua(n,i){if(1&n&&(e.TgZ(0,"span",70),e._uU(1),e.qZA()),2&n){const t=i.index;e.xp6(1),e.hij(" HTLC ",t+1," ")}}function pa(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,ua,2,1,"span",73),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function ma(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",59)(2,"span",60),e._uU(3),e.qZA()(),e.YNc(4,pa,2,1,"span",9),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngStyle",e.VKq(3,Me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(2),e.Oqu(null==t?null:t.payment_hash),e.xp6(1),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function da(n,i){if(1&n&&(e.TgZ(0,"span",74),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,null==t.route?null:t.route.total_fees,"1.0-0")," ")}}function _a(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,da,3,4,"span",75),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function ha(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",74),e._uU(2),e.ALo(3,"number"),e.qZA(),e.YNc(4,_a,2,1,"span",9),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.xi3(3,2,null==t?null:t.fee,"1.0-0")),e.xp6(2),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function ga(n,i){if(1&n&&(e.TgZ(0,"span",74),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,null==t.route?null:t.route.total_amt,"1.0-0")," ")}}function fa(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,ga,3,4,"span",75),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function Ca(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",74),e._uU(2),e.ALo(3,"number"),e.qZA(),e.YNc(4,fa,2,1,"span",9),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.xi3(3,2,null==t?null:t.value,"1.0-0")),e.xp6(2),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function xa(n,i){if(1&n&&(e.TgZ(0,"span",74),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,(null==t.route||null==t.route.hops?null:t.route.hops.length)||0,"1.0-0")," ")}}function ya(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,xa,3,4,"span",75),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function Ta(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",74),e._uU(2,"-"),e.qZA(),e.YNc(3,ya,2,1,"span",9),e.qZA()),2&n){const t=i.$implicit;e.xp6(3),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function ba(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",62)(1,"button",79),e.NdJ("click",function(){const s=e.CHM(t).$implicit,u=e.oxw(2).$implicit;return e.oxw(2).onHTLCClick(s,u)}),e._uU(2),e.qZA()()}if(2&n){const t=i.index;e.xp6(2),e.hij("View ",t+1,"")}}function va(n,i){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,ba,3,1,"div",78),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function Za(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",76)(1,"span",62)(2,"button",77),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return s.is_expanded=!(null!=s&&s.is_expanded)}),e._uU(3),e.qZA()(),e.YNc(4,va,2,1,"div",9),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(3),e.Oqu(null!=t&&t.is_expanded?"Hide":"Show"),e.xp6(1),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function wa(n,i){1&n&&e._UZ(0,"tr",80)}const Aa=function(n){return{"display-none":n}};function Sa(n,i){if(1&n&&e._UZ(0,"tr",81),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Aa,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function La(n,i){1&n&&e._UZ(0,"tr",82)}function ka(n,i){1&n&&e._UZ(0,"tr",80)}const Fa=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Na=function(){return["no_payment"]};function qa(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",15)(1,"div",16)(2,"div",17),e._UZ(3,"fa-icon",18),e.TgZ(4,"span",19),e._uU(5,"Payments History"),e.qZA()(),e.TgZ(6,"mat-form-field",20)(7,"input",21),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA()()(),e.TgZ(8,"div",22)(9,"div",23),e.YNc(10,Dn,1,0,"mat-progress-bar",24),e.TgZ(11,"table",25,26),e.ynx(13,27),e.YNc(14,Pn,2,0,"th",28),e.YNc(15,Qn,5,6,"td",29),e.BQk(),e.ynx(16,30),e.YNc(17,Yn,2,0,"th",28),e.YNc(18,Hn,4,4,"td",29),e.BQk(),e.ynx(19,31),e.YNc(20,Bn,2,0,"th",32),e.YNc(21,Vn,4,3,"td",29),e.BQk(),e.ynx(22,33),e.YNc(23,Gn,2,0,"th",32),e.YNc(24,zn,4,3,"td",29),e.BQk(),e.ynx(25,34),e.YNc(26,Wn,2,0,"th",32),e.YNc(27,Xn,3,1,"td",29),e.BQk(),e.ynx(28,35),e.YNc(29,$n,6,0,"th",36),e.YNc(30,jn,3,0,"td",37),e.BQk(),e.ynx(31,38),e.YNc(32,na,4,3,"td",39),e.BQk(),e.ynx(33,40),e.YNc(34,ca,6,4,"td",29),e.BQk(),e.ynx(35,41),e.YNc(36,ma,5,5,"td",29),e.BQk(),e.ynx(37,42),e.YNc(38,ha,5,5,"td",29),e.BQk(),e.ynx(39,43),e.YNc(40,Ca,5,5,"td",29),e.BQk(),e.ynx(41,44),e.YNc(42,Ta,4,1,"td",29),e.BQk(),e.ynx(43,45),e.YNc(44,Za,5,2,"td",46),e.BQk(),e.YNc(45,wa,1,0,"tr",47),e.YNc(46,Sa,1,3,"tr",48),e.YNc(47,La,1,0,"tr",49),e.YNc(48,ka,1,0,"tr",50),e.qZA(),e.TgZ(49,"mat-paginator",51),e.NdJ("page",function(o){return e.CHM(t),e.oxw().onPageChange(o)}),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("icon",t.faHistory),e.xp6(4),e.Q6J("ngModel",t.selFilter),e.xp6(3),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.payments)("ngClass",e.VKq(15,Fa,""!==t.errorMessage)),e.xp6(34),e.Q6J("matRowDefColumns",t.htlcColumns)("matRowDefWhen",t.is_group),e.xp6(1),e.Q6J("matFooterRowDef",e.DdM(17,Na)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("length",t.totalPayments)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let De=(()=>{class n{constructor(t,a,o,s,u,g,U,x){this.logger=t,this.commonService=a,this.dataService=o,this.store=s,this.rtlEffects=u,this.lndEffects=g,this.decimalPipe=U,this.datePipe=x,this.calledFrom="transactions",this.faHistory=y.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.peers=[],this.totalPayments=100,this.paymentJSONArr=[],this.displayedColumns=[],this.htlcColumns=[],this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.firstOffset=-1,this.lastOffset=-1,this.selFilter="",this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["creation_date","fee","actions"],this.htlcColumns=["groupTotal","groupFee","groupAction"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["creation_date","fee","value","hops","actions"],this.htlcColumns=["groupTotal","groupFee","groupValue","groupHops","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["creation_date","payment_hash","fee","value","hops","actions"],this.htlcColumns=["groupTotal","groupHash","groupFee","groupValue","groupHops","groupAction"])}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.peers=t.peers}),this.store.select(C.PP).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.paymentJSONArr=t.listPayments.payments||[],this.totalPayments=this.paymentJSONArr.length,this.firstOffset=+t.listPayments.first_index_offset,this.lastOffset=+t.listPayments.last_index_offset,this.paymentJSONArr&&this.paymentJSONArr.length>0&&this.sort&&this.paginator&&this.loadPaymentsTable(this.paymentJSONArr.slice(0,this.pageSize)),this.logger.info(t)})}ngAfterViewInit(){this.paymentJSONArr&&this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr.slice(0,this.pageSize))}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,V.q)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.timestamp?(this.paymentDecoded.num_satoshis=this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis?(+this.paymentDecoded.num_msat/1e3).toString():"0",this.sendPayment()):this.resetData()})}sendPayment(){this.newlyAddedPayment=this.paymentDecoded.payment_hash,this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis&&(this.paymentDecoded.num_satoshis=(+this.paymentDecoded.num_msat/1e3).toString()),this.paymentDecoded.num_satoshis&&""!==this.paymentDecoded.num_satoshis&&"0"!==this.paymentDecoded.num_satoshis?(this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"destination",value:this.paymentDecoded.destination,title:"Destination",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.Gi.DATE_TIME},{key:"num_satoshis",value:this.paymentDecoded.num_satoshis,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:l.Gi.NUMBER},{key:"cltv_expiry",value:this.paymentDecoded.cltv_expiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,V.q)(1)).subscribe(a=>{a&&(this.store.dispatch((0,v.oV)({payload:{uiMessage:l.m6.SEND_PAYMENT,paymentReq:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"destination",value:this.paymentDecoded.destination,title:"Destination",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.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:l.Gi.NUMBER},{key:"cltv_expiry",value:this.paymentDecoded.cltv_expiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,getInputs:[{placeholder:"Amount (Sats)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,V.q)(1)).subscribe(o=>{o&&(this.paymentDecoded.num_satoshis=o[0].inputValue,this.store.dispatch((0,v.oV)({payload:{uiMessage:l.m6.SEND_PAYMENT,paymentReq:this.paymentRequest,paymentAmount:o[0].inputValue,fromDialog:!1}})),this.resetData())}))}openSendPaymentModal(){this.store.dispatch((0,w.qR)({payload:{data:{component:qn}}}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,V.q)(1)).subscribe(a=>{this.paymentDecoded=a,this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis&&(this.paymentDecoded.num_satoshis=(+this.paymentDecoded.num_msat/1e3).toString()),this.paymentDecoded.num_satoshis?this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.num_satoshis,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,_.R)(this.unSubs[5])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis?this.paymentDecoded.num_satoshis:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis?this.paymentDecoded.num_satoshis:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis?this.paymentDecoded.num_satoshis:0)+" Sats | Memo: "+this.paymentDecoded.description:this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description})}onPageChange(t){let a=!0,o=this.lastOffset;this.pageSize=t.pageSize,0===t.pageIndex?(a=!0,o=0):t.pageIndext.previousPageIndex&&t.length>(t.pageIndex+1)*t.pageSize?(a=!0,o=this.firstOffset):t.length<=(t.pageIndex+1)*t.pageSize&&(a=!1,o=0);const s=t.pageIndex*this.pageSize;this.loadPaymentsTable(this.paymentJSONArr.slice(s,s+this.pageSize))}is_group(t,a){return a.htlcs&&a.htlcs.length>1}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}getHopDetails(t){const a=this;return t.reduce((o,s)=>{const u=a.peers.find(g=>g.pub_key===s.pub_key);return u&&u.alias?o.push("
Channel: "+u.alias.padEnd(20)+"			Amount (Sats): "+a.decimalPipe.transform(s.amt_to_forward)+"
"):a.dataService.getAliasesFromPubkeys(s.pub_key,!1).pipe((0,_.R)(a.unSubs[6])).subscribe(g=>{o.push("
Channel: "+(g.node&&g.node.alias?g.node.alias.padEnd(20):s.pub_key.substring(0,17)+"...")+"			Amount (Sats): "+a.decimalPipe.transform(s.amt_to_forward)+"
")}),o},[])}onHTLCClick(t,a){a.payment_request&&""!==a.payment_request.trim()?this.dataService.decodePayment(a.payment_request,!1).pipe((0,V.q)(1)).subscribe({next:o=>{setTimeout(()=>{this.showHTLCView(t,a,o)},0)},error:o=>{this.showHTLCView(t,a,null)}}):this.showHTLCView(t,a,null)}showHTLCView(t,a,o){const s=[[{key:"payment_hash",value:a.payment_hash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"preimage",value:t.preimage,title:"Preimage",width:100,type:l.Gi.STRING}],[{key:"payment_request",value:a.payment_request,title:"Payment Request",width:100,type:l.Gi.STRING}],[{key:"status",value:t.status,title:"Status",width:33,type:l.Gi.STRING},{key:"attempt_time_ns",value:+t.attempt_time_ns/1e9,title:"Attempt Time",width:33,type:l.Gi.DATE_TIME},{key:"resolve_time_ns",value:+t.resolve_time_ns/1e9,title:"Resolve Time",width:34,type:l.Gi.DATE_TIME}],[{key:"total_amt",value:t.route.total_amt,title:"Amount (Sats)",width:33,type:l.Gi.NUMBER},{key:"total_fees",value:t.route.total_fees,title:"Fee (Sats)",width:33,type:l.Gi.NUMBER},{key:"total_time_lock",value:t.route.total_time_lock,title:"Total Time Lock",width:34,type:l.Gi.NUMBER}],[{key:"hops",value:this.getHopDetails(t.route.hops),title:"Hops",width:100,type:l.Gi.ARRAY}]];o&&o.description&&""!==o.description&&s.splice(3,0,[{key:"description",value:o.description,title:"Description",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"HTLC Information",message:s,scrollable:t.route&&t.route.hops&&t.route.hops.length>1}}}))}onPaymentClick(t){if(t.htlcs&&t.htlcs[0]&&t.htlcs[0].route&&t.htlcs[0].route.hops&&t.htlcs[0].route.hops.length>0){const a=t.htlcs[0].route.hops.reduce((o,s)=>""===o?s.pub_key:o+","+s.pub_key,"");this.dataService.getAliasesFromPubkeys(a,!0).pipe((0,_.R)(this.unSubs[7])).subscribe(o=>{this.showPaymentView(t,o.reduce((s,u)=>""===s?u:s+"\n"+u,""))})}else this.showPaymentView(t,"")}showPaymentView(t,a){const o=[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"payment_preimage",value:t.payment_preimage,title:"Payment Preimage",width:100,type:l.Gi.STRING}],[{key:"payment_request",value:t.payment_request,title:"Payment Request",width:100,type:l.Gi.STRING}],[{key:"status",value:t.status,title:"Status",width:50,type:l.Gi.STRING},{key:"creation_date",value:t.creation_date,title:"Creation Date",width:50,type:l.Gi.DATE_TIME}],[{key:"value_msat",value:t.value_msat,title:"Value (mSats)",width:50,type:l.Gi.NUMBER},{key:"fee_msat",value:t.fee_msat,title:"Fee (mSats)",width:50,type:l.Gi.NUMBER}],[{key:"path",value:a,title:"Path",width:100,type:l.Gi.STRING}]];t.payment_request&&""!==t.payment_request.trim()?this.dataService.decodePayment(t.payment_request,!1).pipe((0,V.q)(1)).subscribe(s=>{s&&s.description&&""!==s.description&&o.splice(3,0,[{key:"description",value:s.description,title:"Description",width:100,type:l.Gi.STRING}]),setTimeout(()=>{this.openPaymentAlert(o,t.htlcs&&t.htlcs[0]&&t.htlcs[0].route&&t.htlcs[0].route.hops&&t.htlcs[0].route.hops.length>1)},0)}):this.openPaymentAlert(o,!1)}openPaymentAlert(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Payment Information",message:t,scrollable:a}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}loadPaymentsTable(t){this.payments=new r.by(t?[...t]:[]),this.payments.sortingDataAccessor=(a,o)=>"hops"===o?a.htlcs.length&&a.htlcs[0]&&a.htlcs[0].route&&a.htlcs[0].route.hops&&a.htlcs[0].route.hops.length?a.htlcs[0].route.hops.length:0:a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.payments.sort=this.sort,this.payments.filterPredicate=(a,o)=>((a.creation_date?this.datePipe.transform(new Date(1e3*a.creation_date),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(a).toLowerCase()).includes(o),this.applyFilter()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const t=JSON.parse(JSON.stringify(this.payments.data)),a=t.reduce((o,s)=>(s.payment_request&&""!==s.payment_request.trim()&&(o=""===o?s.payment_request:o+","+s.payment_request),o),"");this.dataService.decodePayments(a).pipe((0,_.R)(this.unSubs[8])).subscribe(o=>{let s=0;o.forEach((g,U)=>{if(g){for(;t[U+s].payment_hash!==g.payment_hash;)s+=1;t[U+s].description=g.description}});const u=t.reduce((g,U)=>g.concat(U),[]);this.commonService.downloadFile(u,"Payments")})}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(j.D),e.Y36(A.yh),e.Y36(oe.V),e.Y36(ee.l),e.Y36(p.JJ),e.Y36(p.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lightning-payments"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Un,5),e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first),e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayoutAlign","space-between stretch","fxLayout","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayoutAlign","space-between stretch","fxLayout","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","4",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource","ngClass"],["table",""],["matColumnDef","creation_date"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","payment_hash"],["matColumnDef","fee"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","value"],["matColumnDef","hops"],["matColumnDef","actions"],["mat-header-cell","","class","px-2",4,"matHeaderCellDef"],["mat-cell","","class","px-2","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","groupTotal"],["matColumnDef","groupHash"],["matColumnDef","groupFee"],["matColumnDef","groupValue"],["matColumnDef","groupHops"],["matColumnDef","groupAction"],["mat-cell","","class","px-2",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Succeeded","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Succeeded","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Failed","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-2"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-2"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"htlc-row-span"],["fxLayoutAlign","start center","class","htlc-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"htlc-row-span","pl-3"],["fxLayoutAlign","start center","class","htlc-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"htlc-row-span"],["fxLayoutAlign","end center","class","htlc-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-2"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-htlc-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-htlc-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,In,12,3,"form",1),e.YNc(2,Mn,3,0,"div",2),e.YNc(3,qa,50,18,"div",3),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf","home"===a.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===a.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===a.calledFrom))},directives:[d.xw,d.yH,d.Wh,p.O5,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,c.Q7,Q.$V,c.JJ,c.On,f.bx,f.TO,k.lW,M.BN,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,X.gM,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,p.sg,r.nj,r.Gk,r.Ke,r.Q2,r.as,r.XQ,L.NW],pipes:[p.uU,p.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}.mat-column-payment_hash[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-htlc-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-htlc-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.htlc-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:17rem}"]}),n})();function Ua(n,i){if(1&n&&(e.TgZ(0,"button",26)(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA()()),2&n){e.oxw();const t=e.MAs(11);e.Q6J("matMenuTriggerFor",t)}}function Oa(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){const s=e.CHM(t).index,u=e.oxw().$implicit;return e.oxw(2).onNavigateTo(u.links[s])}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function Ra(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).onsortChannelsBy()}),e._uU(1),e.qZA()}if(2&n){const t=e.oxw(3);e.xp6(1),e.hij("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}function Ia(n,i){1&n&&e._UZ(0,"mat-progress-bar",28)}function Ma(n,i){if(1&n&&e._UZ(0,"rtl-node-info",29),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Da(n,i){if(1&n&&e._UZ(0,"rtl-balances-info",30),2&n){const t=e.oxw(3);e.Q6J("balances",t.balances)("errorMessage",t.errorMessages[3]+" "+t.errorMessages[2])}}function Pa(n,i){if(1&n&&e._UZ(0,"rtl-channel-capacity-info",31),2&n){const t=e.oxw(3);e.Q6J("sortBy",t.sortField)("channelBalances",t.channelBalances)("allChannels",t.allChannelsCapacity)("errorMessage",t.errorMessages[3])}}function Ja(n,i){if(1&n&&e._UZ(0,"rtl-fee-info",32),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1])}}function Ea(n,i){if(1&n&&e._UZ(0,"rtl-channel-status-info",33),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[3]+" "+t.errorMessages[4])}}function Qa(n,i){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find information!"),e.qZA())}const Pe=function(n){return{"dashboard-card-content":!0,"error-border":n}};function Ya(n,i){if(1&n&&(e.TgZ(0,"mat-grid-tile",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-title",10)(4,"div"),e._UZ(5,"fa-icon",11),e.TgZ(6,"span"),e._uU(7),e.qZA()(),e.TgZ(8,"div"),e.YNc(9,Ua,3,1,"button",12),e.TgZ(10,"mat-menu",13,14),e.YNc(12,Oa,2,1,"button",15),e.YNc(13,Ra,2,1,"button",16),e.qZA()()()(),e.TgZ(14,"mat-card-content",17),e.YNc(15,Ia,1,0,"mat-progress-bar",18),e.TgZ(16,"div",19),e.YNc(17,Ma,1,2,"rtl-node-info",20),e.YNc(18,Da,1,2,"rtl-balances-info",21),e.YNc(19,Pa,1,4,"rtl-channel-capacity-info",22),e.YNc(20,Ja,1,2,"rtl-fee-info",23),e.YNc(21,Ea,1,2,"rtl-channel-status-info",24),e.YNc(22,Qa,2,0,"h3",25),e.qZA()()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(5),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Q6J("ngIf",t.links[0]),e.xp6(3),e.Q6J("ngForOf",t.goToOptions),e.xp6(1),e.Q6J("ngIf","capacity"===t.id),e.xp6(1),e.s9C("fxFlex","node"===t.id||"balance"===t.id?70:"fee"===t.id||"status"===t.id?78:90),e.Q6J("ngClass",e.VKq(16,Pe,"node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.ERROR||"balance"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||a.apiCallStatusBlockchainBalance.status===a.apiCallStatusEnum.ERROR)||"capacity"===t.id&&a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||"fee"===t.id&&a.apiCallStatusFees.status===a.apiCallStatusEnum.ERROR||"status"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||a.apiCallStatusPendingChannels.status===a.apiCallStatusEnum.ERROR))),e.xp6(1),e.Q6J("ngIf","node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.INITIATED||"balance"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||a.apiCallStatusBlockchainBalance.status===a.apiCallStatusEnum.INITIATED)||"capacity"===t.id&&a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||"fee"===t.id&&a.apiCallStatusFees.status===a.apiCallStatusEnum.INITIATED||"status"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||a.apiCallStatusPendingChannels.status===a.apiCallStatusEnum.INITIATED)),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","balance"),e.xp6(1),e.Q6J("ngSwitchCase","capacity"),e.xp6(1),e.Q6J("ngSwitchCase","fee"),e.xp6(1),e.Q6J("ngSwitchCase","status")}}function Ha(n,i){if(1&n&&(e.TgZ(0,"div",2)(1,"div",3),e._UZ(2,"fa-icon",4),e.TgZ(3,"span",5),e._uU(4),e.qZA()(),e.TgZ(5,"mat-grid-list",6),e.YNc(6,Ya,23,18,"mat-grid-tile",7),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Q6J("icon",t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.ERROR?t.faFrown:t.faSmile),e.xp6(2),e.Oqu(t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.COMPLETED?"Welcome "+t.information.alias+"! Your node is up and running.":t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),e.xp6(1),e.Q6J("rowHeight",t.operatorCardHeight),e.xp6(1),e.Q6J("ngForOf",t.operatorCards)}}function Ba(n,i){if(1&n&&(e.TgZ(0,"button",26)(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA()()),2&n){e.oxw();const t=e.MAs(9);e.Q6J("matMenuTriggerFor",t)}}function Va(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){const s=e.CHM(t).index,u=e.oxw(2).$implicit;return e.oxw(2).onNavigateTo(u.links[s])}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function Ga(n,i){if(1&n&&(e.TgZ(0,"mat-card-header")(1,"mat-card-title",10)(2,"div"),e._UZ(3,"fa-icon",11),e.TgZ(4,"span"),e._uU(5),e.qZA()(),e.TgZ(6,"div"),e.YNc(7,Ba,3,1,"button",12),e.TgZ(8,"mat-menu",13,43),e.YNc(10,Va,2,1,"button",15),e.qZA()()()()),2&n){const t=e.oxw().$implicit;e.xp6(3),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Q6J("ngIf",t.links[0]),e.xp6(3),e.Q6J("ngForOf",t.goToOptions)}}function za(n,i){1&n&&e._UZ(0,"mat-progress-bar",28)}function Wa(n,i){if(1&n&&e._UZ(0,"rtl-node-info",44),2&n){const t=e.oxw(3);e.Q6J("information",t.information)}}function Xa(n,i){if(1&n&&e._UZ(0,"rtl-balances-info",30),2&n){const t=e.oxw(3);e.Q6J("balances",t.balances)("errorMessage",t.errorMessages[3]+" "+t.errorMessages[2])}}function $a(n,i){if(1&n&&e._UZ(0,"rtl-channel-liquidity-info",45),2&n){const t=e.oxw(3);e.Q6J("direction","In")("totalLiquidity",t.totalInboundLiquidity)("allChannels",t.allInboundChannels)("errorMessage",t.errorMessages[3])}}function ja(n,i){if(1&n&&e._UZ(0,"rtl-channel-liquidity-info",45),2&n){const t=e.oxw(3);e.Q6J("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("allChannels",t.allOutboundChannels)("errorMessage",t.errorMessages[3])}}function Ka(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){const s=e.CHM(t).index,u=e.oxw(3).$implicit;return e.oxw(2).onNavigateTo(u.links[s])}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function ei(n,i){if(1&n&&(e.TgZ(0,"button",26)(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA()(),e.TgZ(3,"mat-menu",13,53),e.YNc(5,Ka,2,1,"button",15),e.qZA()),2&n){const t=e.MAs(4),a=e.oxw(2).$implicit;e.Q6J("matMenuTriggerFor",t),e.xp6(5),e.Q6J("ngForOf",a.goToOptions)}}function ti(n,i){1&n&&(e.TgZ(0,"span",46)(1,"mat-tab-group",47)(2,"mat-tab",48),e._UZ(3,"rtl-lightning-invoices",49),e.qZA(),e.TgZ(4,"mat-tab",50),e._UZ(5,"rtl-lightning-payments",49),e.qZA(),e.TgZ(6,"mat-tab",51),e.YNc(7,ei,6,2,"ng-template",52),e.qZA()()()),2&n&&(e.xp6(3),e.Q6J("calledFrom","home"),e.xp6(2),e.Q6J("calledFrom","home"),e.xp6(1),e.Q6J("disabled",!0))}function ni(n,i){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find information!"),e.qZA())}const ai=function(n){return{"p-0":n}};function ii(n,i){if(1&n&&(e.TgZ(0,"mat-grid-tile",8)(1,"mat-card",36),e.YNc(2,Ga,11,4,"mat-card-header",37),e.TgZ(3,"mat-card-content",38),e.YNc(4,za,1,0,"mat-progress-bar",18),e.TgZ(5,"div",39),e.YNc(6,Wa,1,1,"rtl-node-info",40),e.YNc(7,Xa,1,2,"rtl-balances-info",21),e.YNc(8,$a,1,4,"rtl-channel-liquidity-info",41),e.YNc(9,ja,1,4,"rtl-channel-liquidity-info",41),e.YNc(10,ti,8,3,"span",42),e.YNc(11,ni,2,0,"h3",25),e.qZA()()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(1),e.Q6J("ngClass",e.VKq(13,ai,"transactions"===t.id)),e.xp6(1),e.Q6J("ngIf","transactions"!==t.id),e.xp6(1),e.s9C("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),e.Q6J("ngClass",e.VKq(15,Pe,"node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.ERROR||"balance"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||a.apiCallStatusBlockchainBalance.status===a.apiCallStatusEnum.ERROR)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.INITIATED||"balance"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||a.apiCallStatusBlockchainBalance.status===a.apiCallStatusEnum.INITIATED)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","balance"),e.xp6(1),e.Q6J("ngSwitchCase","inboundLiq"),e.xp6(1),e.Q6J("ngSwitchCase","outboundLiq"),e.xp6(1),e.Q6J("ngSwitchCase","transactions")}}function oi(n,i){if(1&n&&(e.TgZ(0,"div",34),e._UZ(1,"fa-icon",4),e.TgZ(2,"span",5),e._uU(3),e.qZA()(),e.TgZ(4,"mat-grid-list",35),e.YNc(5,ii,12,17,"mat-grid-tile",7),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faSmile),e.xp6(2),e.hij("Welcome ",t.information.alias,"! Your node is up and running."),e.xp6(1),e.Q6J("rowHeight",t.merchantCardHeight),e.xp6(1),e.Q6J("ngForOf",t.merchantCards)}}let si=(()=>{class n{constructor(t,a,o,s,u){switch(this.logger=t,this.store=a,this.actions=o,this.commonService=s,this.router=u,this.faSmile=ke.ctA,this.faFrown=ke.KfU,this.faAngleDoubleDown=y.Sbq,this.faAngleDoubleUp=y.Vfw,this.faChartPie=y.OS1,this.faBolt=y.BDt,this.faServer=y.xf3,this.faNetworkWired=y.kXW,this.flgChildInfoUpdated=!1,this.userPersonaEnum=l.ol,this.activeChannels=0,this.inactiveChannels=0,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.balances={onchain:-1,lightning:-1,total:0},this.allChannels=[],this.channelsStatus={},this.allChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="330px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.screenSizeEnum=l.cu,this.errorMessages=["","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusFees=null,this.apiCallStatusBlockchainBalance=null,this.apiCallStatusChannels=null,this.apiCallStatusPendingChannels=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize){case l.cu.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","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:6},{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}];break;case l.cu.SM:case l.cu.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","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}];break;default: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","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(C.bx).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=t.apiCallStatus,this.apiCallStatusNodeInfo.status===l.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.selNode=t.nodeSettings,this.information=t.information}),this.store.select(C.JG).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===l.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[2]="",this.apiCallStatusBlockchainBalance=t.apiCallStatus,this.apiCallStatusBlockchainBalance.status===l.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusBlockchainBalance.message?JSON.stringify(this.apiCallStatusBlockchainBalance.message):this.apiCallStatusBlockchainBalance.message),this.balances.onchain=+t.blockchainBalance.total_balance>=0?+t.blockchainBalance.total_balance:0,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances)}),this.store.select(C.ni).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusPendingChannels=t.apiCallStatus,this.apiCallStatusPendingChannels.status===l.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusPendingChannels.message?JSON.stringify(this.apiCallStatusPendingChannels.message):this.apiCallStatusPendingChannels.message),this.channelsStatus.pending={num_channels:t.pendingChannelsSummary.open.num_channels,capacity:t.pendingChannelsSummary.open.limbo_balance},this.channelsStatus.closing={num_channels:t.pendingChannelsSummary.closing.num_channels+t.pendingChannelsSummary.force_closing.num_channels+t.pendingChannelsSummary.waiting_close.num_channels,capacity:t.pendingChannelsSummary.total_limbo_balance}}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.errorMessages[3]="",this.apiCallStatusChannels=t.apiCallStatus,this.apiCallStatusChannels.status===l.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message);const a=t.lightningBalance&&t.lightningBalance.local?+t.lightningBalance.local:0,o=t.lightningBalance&&t.lightningBalance.remote?+t.lightningBalance.remote:0;this.channelBalances={localBalance:a,remoteBalance:o,balancedness:+(1-Math.abs((a-o)/(a+o))).toFixed(3)},this.balances.lightning=t.lightningBalance.local,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances),this.activeChannels=t.channelsSummary.active.num_channels,this.inactiveChannels=t.channelsSummary.inactive.num_channels,this.channelsStatus.active=t.channelsSummary.active,this.channelsStatus.inactive=t.channelsSummary.inactive,this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.allChannels=t.channels.filter(u=>!0===u.active),this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels,"balancedness"))),this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels.filter(u=>u.remote_balance>0),"remote_balance"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels.filter(u=>u.local_balance>0),"local_balance"))),this.allChannels.forEach(u=>{this.totalInboundLiquidity=this.totalInboundLiquidity+ +u.remote_balance,this.totalOutboundLiquidity=this.totalOutboundLiquidity+ +u.local_balance}),this.flgChildInfoUpdated=this.balances.lightning>=0&&this.balances.onchain>=0&&this.fees.month_fee_sum>=0,this.logger.info(t)}),this.actions.pipe((0,_.R)(this.unSubs[5]),(0,E.h)(t=>t.type===l.uR.FETCH_FEES_LND||t.type===l.uR.SET_FEES_LND)).subscribe(t=>{t.type===l.uR.FETCH_FEES_LND&&(this.flgChildInfoUpdated=!1),t.type===l.uR.SET_FEES_LND&&(this.flgChildInfoUpdated=!0)})}onNavigateTo(t){"inactive"===t?this.router.navigateByUrl("/lnd/connections",{state:{filter:t}}):this.router.navigateByUrl("/lnd/"+t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.allChannelsCapacity=this.allChannels.sort((t,a)=>{const o=+t.local_balance+ +t.remote_balance,s=+a.local_balance+ +a.remote_balance;return o>s?-1:o{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(G.eX),e.Y36(O.v),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-0"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10",3,"rowHeight"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click",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-0"],["cols","6",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",3,"fxFlex","ngClass"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",3,"ngSwitch"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",3,"perfectScrollbar",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",1,"w-100","dashboard-tabs-group"],["label","Receive"],[3,"calledFrom"],["label","Pay"],[3,"disabled"],["mat-tab-label",""],["menuTransactions","matMenu"]],template:function(t,a){if(1&t&&(e.YNc(0,Ha,7,4,"div",0),e.YNc(1,oi,6,4,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",(null==a.selNode?null:a.selNode.userPersona)===a.userPersonaEnum.OPERATOR)("ngIfElse",o)}},directives:[p.O5,d.xw,d.Wh,M.BN,ce.Il,p.sg,ce.DX,b.a8,d.yH,b.dk,b.n5,k.lW,he.p6,K.Hw,he.VK,he.OP,b.dn,p.mk,S.oO,P.pW,p.RF,p.n9,Ne,rt,gt,qe,Ue,p.ED,Rt,Q.$V,D.SP,D.uX,Ie,De,D.uD],styles:[""]}),n})();var ge=h(1203),fe=h(7544);function li(n,i){if(1&n&&(e.TgZ(0,"span",10),e._uU(1,"Channels"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.activeChannels)}}function ri(n,i){if(1&n&&(e.TgZ(0,"span",10),e._uU(1,"Peers"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.activePeers)}}let ci=(()=>{class n{constructor(t,a,o){this.store=t,this.logger=a,this.router=o,this.selNode={},this.activePeers=0,this.activeChannels=0,this.faUsers=y.FVb,this.faChartPie=y.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t instanceof T.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(a=>a.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.$k).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.selNode=t}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.logger.info(t)}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.activeChannels=t.channelsSummary.active.num_channels,this.logger.info(t)}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.balances=[{title:"Total Balance",dataValue:t.blockchainBalance.total_balance||0},{title:"Confirmed",dataValue:t.blockchainBalance.confirmed_balance},{title:"Unconfirmed",dataValue:t.blockchainBalance.unconfirmed_balance}],this.logger.info(t)})}onSelectedTabChange(t){this.router.navigateByUrl("/lnd/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(N.mQ),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-connections"]],decls:22,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"On-chain Balance"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA()()(),e.TgZ(8,"div",0),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"Connections"),e.qZA()(),e.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"mat-tab-group",7),e.NdJ("selectedIndexChange",function(s){return a.activeLink=s})("selectedTabChange",function(s){return a.onSelectedTabChange(s)}),e.TgZ(16,"mat-tab"),e.YNc(17,li,2,1,"ng-template",8),e.qZA(),e.TgZ(18,"mat-tab"),e.YNc(19,ri,2,1,"ng-template",8),e.qZA()(),e.TgZ(20,"div",9),e._UZ(21,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faChartPie),e.xp6(6),e.Q6J("values",a.balances),e.xp6(2),e.Q6J("icon",a.faUsers),e.xp6(6),e.Q6J("selectedIndex",a.activeLink))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,ge.D,D.SP,D.uX,D.uD,fe.k,d.yH,T.lC],styles:[""]}),n})();var Ce=h(8675),Je=h(4004),Ee=h(9843);const ui=["form"];function pi(n,i){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t.alias?t.alias:t.pub_key?t.pub_key:"")}}function mi(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Peer alias is required."),e.qZA())}function di(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Peer not found in the list."),e.qZA())}function _i(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",34),e._UZ(1,"input",35),e.TgZ(2,"mat-autocomplete",36,37),e.NdJ("optionSelected",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.YNc(4,pi,2,2,"mat-option",24),e.ALo(5,"async"),e.qZA(),e.YNc(6,mi,2,0,"mat-error",17),e.YNc(7,di,2,0,"mat-error",17),e.qZA()}if(2&n){const t=e.MAs(3),a=e.oxw();e.xp6(1),e.Q6J("formControl",a.selectedPeer)("matAutocomplete",t),e.xp6(1),e.Q6J("displayWith",a.displayFn),e.xp6(2),e.Q6J("ngForOf",e.lcZ(5,6,a.filteredPeers)),e.xp6(2),e.Q6J("ngIf",null==a.selectedPeer.errors?null:a.selectedPeer.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.selectedPeer.errors?null:a.selectedPeer.errors.notfound)}}function hi(n,i){1&n&&e.GkF(0)}function gi(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function fi(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function Ci(n,i){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function xi(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("","1"===t.selTransType?"Target Confirmation Blocks":"Fee"," is required.")}}function yi(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.channelConnectionError)}}function Ti(n,i){if(1&n&&(e.TgZ(0,"div",39),e._UZ(1,"fa-icon",40),e.YNc(2,yi,2,1,"span",17),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.channelConnectionError)}}function bi(n,i){if(1&n&&(e.TgZ(0,"mat-expansion-panel",42)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),e._uU(4,"Peer: \xa0"),e.qZA(),e.TgZ(5,"strong",43),e._uU(6),e.qZA()()(),e.TgZ(7,"div",9)(8,"div",44)(9,"div",34)(10,"h4",45),e._uU(11,"Pubkey"),e.qZA(),e.TgZ(12,"span",46),e._uU(13),e.qZA()()(),e._UZ(14,"mat-divider",47),e.TgZ(15,"div",44)(16,"div",48)(17,"h4",45),e._uU(18,"Address"),e.qZA(),e.TgZ(19,"span",49),e._uU(20),e.qZA()(),e.TgZ(21,"div",48)(22,"h4",45),e._uU(23,"Inbound"),e.qZA(),e.TgZ(24,"span",49),e._uU(25),e.qZA()()()()()),2&n){const t=e.oxw(2);e.xp6(6),e.Oqu((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.address)),e.xp6(7),e.Oqu(t.peer.pub_key),e.xp6(7),e.Oqu(null==t.peer?null:t.peer.address),e.xp6(5),e.Oqu(null!=t.peer&&t.peer.inbound?"True":"False")}}function vi(n,i){if(1&n&&e.YNc(0,bi,26,4,"mat-expansion-panel",41),2&n){const t=e.oxw();e.Q6J("ngIf",t.peer)}}let Qe=(()=>{class n{constructor(t,a,o,s){this.dialogRef=t,this.data=a,this.store=o,this.actions=s,this.selectedPeer=new c.NI,this.amount=new c.NI,this.faExclamationTriangle=y.eHv,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.selectedPubkey="",this.isPrivate=!1,this.selTransType="0",this.spendUnconfirmed=!1,this.transTypeValue="",this.transTypes=l.Dr,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(o=>o.type===l.uR.UPDATE_API_CALL_STATUS_LND||o.type===l.uR.FETCH_CHANNELS_LND)).subscribe(o=>{o.type===l.uR.UPDATE_API_CALL_STATUS_LND&&o.payload.status===l.Bn.ERROR&&"SaveNewChannel"===o.payload.action&&(this.channelConnectionError=o.payload.message),o.type===l.uR.FETCH_CHANNELS_LND&&this.dialogRef.close()});let t="",a="";this.sortedPeers=this.peers.sort((o,s)=>(t=o.alias?o.alias.toLowerCase():o.pub_key?o.pub_key.toLowerCase():"",a=s.alias?s.alias.toLowerCase():o.pub_key.toLowerCase(),ta?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,_.R)(this.unSubs[1]),(0,Ce.O)(""),(0,Je.U)(o=>"string"==typeof o?o:o.alias?o.alias:o.pub_key),(0,Je.U)(o=>o?this.filterPeers(o):this.sortedPeers.slice()))}filterPeers(t){return this.sortedPeers.filter(a=>0===a.alias.toLowerCase().indexOf(t?t.toLowerCase():""))}displayFn(t){return t&&t.alias?t.alias:t&&t.pub_key?t.pub_key:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.pub_key?this.selectedPeer.value.pub_key:null,"string"==typeof this.selectedPeer.value){const t=this.peers.filter(a=>a.alias.length===this.selectedPeer.value.length&&0===a.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===t.length&&t[0].pub_key&&(this.selectedPubkey=t[0].pub_key)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.spendUnconfirmed=!1,this.selTransType="0",this.transTypeValue="",this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||("1"===this.selTransType||"2"===this.selTransType)&&!this.transTypeValue)return!0;this.store.dispatch((0,v.YX)({payload:{selectedPeerPubkey:this.peer&&this.peer.pub_key?this.peer.pub_key:this.selectedPubkey,fundingAmount:this.fundingAmount,private:this.isPrivate,transType:this.selTransType,transTypeValue:this.transTypeValue,spendUnconfirmed:this.spendUnconfirmed}}))}onAdvancedPanelToggle(t){this.advancedTitle=t?"Advanced Options | "+("1"===this.selTransType?"Target Confirmation Blocks: ":"2"===this.selTransType?"Fee (Sats/vByte): ":"Default")+("1"===this.selTransType||"2"===this.selTransType?this.transTypeValue:"")+" | Spend Unconfirmed Output: "+(this.spendUnconfirmed?"Yes":"No"):"Advanced Options"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(A.yh),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-open-channel"]],viewQuery:function(t,a){if(1&t&&e.Gf(ui,7),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first)}},decls:55,vars:25,consts:[["fxLayout","row","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amnt",3,"ngModel","step","min","max","ngModelChange"],["amt","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","49"],["tabindex","3",3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","number","tabindex","4","name","transTpValue",3,"ngModel","required","disabled","placeholder","step","min","ngModelChange"],["transTypeVal","ngModel"],["fxFlex","50","fxLayoutAlign","start center"],["tabindex","6","color","primary","name","spendUnconfirmed",3,"ngModel","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["fxFlex","100"],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayout","row"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return a.onClose()}),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7,8),e.NdJ("submit",function(){return a.onOpenChannel()})("reset",function(){return a.resetData()}),e.TgZ(11,"div",9),e.YNc(12,_i,8,8,"mat-form-field",10),e.qZA(),e.YNc(13,hi,1,0,"ng-container",11),e.TgZ(14,"div",9)(15,"div",12)(16,"mat-form-field",13)(17,"input",14,15),e.NdJ("ngModelChange",function(s){return a.fundingAmount=s}),e.qZA(),e.TgZ(19,"mat-hint"),e._uU(20),e.ALo(21,"number"),e.qZA(),e.TgZ(22,"span",16),e._uU(23," Sats "),e.qZA(),e.YNc(24,gi,2,0,"mat-error",17),e.YNc(25,fi,2,1,"mat-error",17),e.qZA(),e.TgZ(26,"div",18)(27,"mat-slide-toggle",19),e.NdJ("ngModelChange",function(s){return a.isPrivate=s}),e._uU(28,"Private Channel"),e.qZA()()(),e.TgZ(29,"mat-expansion-panel",20),e.NdJ("closed",function(){return a.onAdvancedPanelToggle(!0)})("opened",function(){return a.onAdvancedPanelToggle(!1)}),e.TgZ(30,"mat-expansion-panel-header")(31,"mat-panel-title")(32,"span"),e._uU(33),e.qZA()()(),e.TgZ(34,"div",21)(35,"div",12)(36,"mat-form-field",22)(37,"mat-select",23),e.NdJ("valueChange",function(s){return a.selTransType=s}),e.YNc(38,Ci,2,2,"mat-option",24),e.qZA()(),e.TgZ(39,"mat-form-field",22)(40,"input",25,26),e.NdJ("ngModelChange",function(s){return a.transTypeValue=s}),e.qZA(),e.YNc(42,xi,2,1,"mat-error",17),e.qZA()(),e.TgZ(43,"div",12)(44,"div",27)(45,"mat-slide-toggle",28),e.NdJ("ngModelChange",function(s){return a.spendUnconfirmed=s}),e._uU(46,"Spend Unconfirmed Output"),e.qZA()()()()()(),e.YNc(47,Ti,3,2,"div",29),e.TgZ(48,"div",30)(49,"button",31),e._uU(50,"Clear Fields"),e.qZA(),e.TgZ(51,"button",32),e._uU(52,"Open Channel"),e.qZA()()()()()(),e.YNc(53,vi,1,1,"ng-template",null,33,e.W1O)),2&t){const o=e.MAs(54);e.xp6(5),e.Oqu(a.alertTitle),e.xp6(7),e.Q6J("ngIf",!a.peer&&a.peers&&a.peers.length>0),e.xp6(1),e.Q6J("ngTemplateOutlet",o),e.xp6(4),e.Q6J("ngModel",a.fundingAmount)("step",1e3)("min",1)("max",a.totalBalance),e.xp6(3),e.hij("(Remaining Bal: ",e.lcZ(21,23,a.totalBalance-(a.fundingAmount?a.fundingAmount:0)),")"),e.xp6(4),e.Q6J("ngIf",null==a.amount.errors?null:a.amount.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.amount.errors?null:a.amount.errors.max),e.xp6(2),e.Q6J("ngModel",a.isPrivate),e.xp6(6),e.Oqu(a.advancedTitle),e.xp6(4),e.Q6J("value",a.selTransType),e.xp6(1),e.Q6J("ngForOf",a.transTypes),e.xp6(2),e.Q6J("ngModel",a.transTypeValue)("required","0"!==a.selTransType)("disabled","0"===a.selTransType)("placeholder","0"===a.selTransType?"Default":"1"===a.selTransType?"Target Confirmation Blocks":"Fee (Sats/vByte)")("step",1)("min",0),e.xp6(2),e.Q6J("ngIf","0"!==a.selTransType&&!a.transTypeValue),e.xp6(3),e.Q6J("ngModel",a.spendUnconfirmed),e.xp6(2),e.Q6J("ngIf",""!==a.channelConnectionError)}},directives:[d.xw,d.Wh,d.yH,b.dk,k.lW,b.dn,c._Y,c.JL,c.F,p.O5,f.KE,I.Nt,c.Fj,ne.ZL,c.Q7,c.JJ,c.oH,ne.XC,p.sg,Y.ey,f.TO,p.tP,c.wV,c.qQ,c.Fd,$.q,Ee.F,c.On,f.bx,f.R9,ue.Rr,H.ib,H.yz,H.yK,R.gD,M.BN,W.h,z.d],pipes:[p.Ov,p.JJ],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),n})();var B=h(5615);const Zi=["peersForm"],wi=["stepper"];function Ai(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw();e.Oqu(t.peerFormLabel)}}function Si(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Address is required."),e.qZA())}function Li(n,i){if(1&n&&(e.TgZ(0,"div",37),e._UZ(1,"fa-icon",38),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.peerConnectionError)}}function ki(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw();e.Oqu(t.channelFormLabel)}}function Fi(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function Ni(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount must be a positive number."),e.qZA())}function qi(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function Ui(n,i){if(1&n&&(e.TgZ(0,"mat-option",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function Oi(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("","0"===t.channelFormGroup.controls.selTransType.value?"Default":"1"===t.channelFormGroup.controls.selTransType.value?"Target Confirmation Blocks":"Fee (Sats/vByte)"," is required.")}}function Ri(n,i){if(1&n&&(e.TgZ(0,"div",37),e._UZ(1,"fa-icon",38),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.channelConnectionError)}}let Ii=(()=>{class n{constructor(t,a,o,s,u,g,U){this.dialogRef=t,this.data=a,this.store=o,this.lndEffects=s,this.formBuilder=u,this.actions=g,this.logger=U,this.faExclamationTriangle=y.eHv,this.peerAddress="",this.totalBalance=0,this.transTypes=l.Dr,this.flgChannelOpened=!1,this.channelOpenStatus=null,this.newlyAddedPeer=null,this.flgEditable=!0,this.peerConnectionError="",this.channelConnectionError="",this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)",this.unSubs=[new m.x,new m.x]}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[c.kI.required]],peerAddress:["",[c.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[c.kI.required,c.kI.min(1),c.kI.max(this.totalBalance)]],isPrivate:[!1],selTransType:[l.Dr[0].id],transTypeValue:[{value:"",disabled:!0}],spendUnconfirmed:[!1],hiddenAmount:["",[c.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.channelFormGroup.controls.selTransType.valueChanges.pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{t===l.Dr[0].id?(this.channelFormGroup.controls.transTypeValue.setValue(""),this.channelFormGroup.controls.transTypeValue.disable(),this.channelFormGroup.controls.transTypeValue.setValidators(null),this.channelFormGroup.controls.transTypeValue.setErrors(null)):(this.channelFormGroup.controls.transTypeValue.setValue(""),this.channelFormGroup.controls.transTypeValue.enable(),this.channelFormGroup.controls.transTypeValue.setValidators([c.kI.required]))}),this.actions.pipe((0,_.R)(this.unSubs[1]),(0,E.h)(t=>t.type===l.uR.NEWLY_ADDED_PEER_LND||t.type===l.uR.FETCH_PENDING_CHANNELS_LND||t.type===l.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(t=>{t.type===l.uR.NEWLY_ADDED_PEER_LND&&(this.logger.info(t.payload),this.flgEditable=!1,this.newlyAddedPeer=t.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),t.type===l.uR.FETCH_PENDING_CHANNELS_LND&&this.dialogRef.close(),t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&t.payload.status===l.Bn.ERROR&&("SaveNewPeer"===t.payload.action||"FetchGraphNode"===t.payload.action?this.peerConnectionError=t.payload.message:"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="";const t=this.peerFormGroup.controls.peerAddress.value.search("@");let a="",o="";t>-1?(a=this.peerFormGroup.controls.peerAddress.value.substring(0,t),o=this.peerFormGroup.controls.peerAddress.value.substring(t+1),this.connectPeerWithParams(a,o)):(this.store.dispatch((0,v.dV)({payload:{pubkey:this.peerFormGroup.controls.peerAddress.value}})),this.lndEffects.setGraphNode.pipe((0,V.q)(1)).subscribe(s=>{setTimeout(()=>{o=s.node.addresses&&s.node.addresses.length&&s.node.addresses.length>0&&s.node.addresses[0].addr?s.node.addresses[0].addr:"",this.connectPeerWithParams(this.peerFormGroup.controls.peerAddress.value,o)},0)}))}connectPeerWithParams(t,a){this.store.dispatch((0,v.El)({payload:{pubkey:t,host:a,perm:!1}}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||"1"===this.channelFormGroup.controls.selTransType.value&&!this.channelFormGroup.controls.transTypeValue.value||"2"===this.channelFormGroup.controls.selTransType.value&&!this.channelFormGroup.controls.transTypeValue.value)return!0;this.channelConnectionError="",this.store.dispatch((0,v.YX)({payload:{selectedPeerPubkey:this.newlyAddedPeer.pub_key,fundingAmount:this.channelFormGroup.controls.fundingAmount.value,private:this.channelFormGroup.controls.isPrivate.value,transType:this.channelFormGroup.controls.selTransType.value,transTypeValue:this.channelFormGroup.controls.transTypeValue.value,spendUnconfirmed:this.channelFormGroup.controls.spendUnconfirmed.value}}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(t){switch(t.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:"Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 2:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+this.newlyAddedPeer.alias:"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)"}t.selectedIndex{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(A.yh),e.Y36(ee.l),e.Y36(c.qu),e.Y36(G.eX),e.Y36(N.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-connect-peer"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Zi,5),e.Gf(wi,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first),e.iGM(o=e.CRH())&&(a.stepper=o.first)}},decls:56,vars:24,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","button",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mb-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["fxFlex","30","fxLayoutAlign","start end"],["tabindex","3","formControlName","selTransType","placeholder","Transaction Type"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","30"],["matInput","","formControlName","transTypeValue","type","number","name","transTypeValue","tabindex","4",3,"placeholder","step","required"],["tabindex","6","color","primary","formControlName","spendUnconfirmed","name","spendUnconfirmed"],["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,"mat-dialog-close"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Connect to a new peer"),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return a.onClose()}),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"div",7)(10,"mat-vertical-stepper",8,9),e.NdJ("selectionChange",function(s){return a.stepSelectionChanged(s)}),e.TgZ(12,"mat-step",10)(13,"form",11),e.YNc(14,Ai,1,1,"ng-template",12),e.TgZ(15,"mat-form-field",1),e._UZ(16,"input",13),e.YNc(17,Si,2,0,"mat-error",14),e.qZA(),e.YNc(18,Li,4,2,"div",15),e.TgZ(19,"div",16)(20,"button",17),e.NdJ("click",function(){return a.onConnectPeer()}),e._uU(21),e.qZA()()()(),e.TgZ(22,"mat-step",10)(23,"form",18),e.YNc(24,ki,1,1,"ng-template",19),e.TgZ(25,"div",20)(26,"div",21)(27,"mat-form-field",22),e._UZ(28,"input",23),e.TgZ(29,"mat-hint"),e._uU(30),e.qZA(),e.TgZ(31,"span",24),e._uU(32," Sats "),e.qZA(),e.YNc(33,Fi,2,0,"mat-error",14),e.YNc(34,Ni,2,0,"mat-error",14),e.YNc(35,qi,2,1,"mat-error",14),e.qZA(),e.TgZ(36,"div",25)(37,"mat-slide-toggle",26),e._uU(38,"Private Channel"),e.qZA()()(),e.TgZ(39,"div",27)(40,"mat-form-field",28)(41,"mat-select",29),e.YNc(42,Ui,2,2,"mat-option",30),e.qZA()(),e.TgZ(43,"mat-form-field",31),e._UZ(44,"input",32),e.YNc(45,Oi,2,1,"mat-error",14),e.qZA(),e.TgZ(46,"div",25)(47,"mat-slide-toggle",33),e._uU(48,"Spend Unconfirmed Output"),e.qZA()()()(),e.YNc(49,Ri,4,2,"div",15),e.TgZ(50,"div",16)(51,"button",34),e.NdJ("click",function(){return a.onOpenChannel()}),e._uU(52),e.qZA()()()()(),e.TgZ(53,"div",35)(54,"button",36),e._uU(55),e.qZA()()()()()()),2&t&&(e.xp6(10),e.Q6J("linear",!0),e.xp6(2),e.Q6J("stepControl",a.peerFormGroup)("editable",a.flgEditable),e.xp6(1),e.Q6J("formGroup",a.peerFormGroup),e.xp6(4),e.Q6J("ngIf",null==a.peerFormGroup.controls.peerAddress.errors?null:a.peerFormGroup.controls.peerAddress.errors.required),e.xp6(1),e.Q6J("ngIf",""!==a.peerConnectionError),e.xp6(3),e.Oqu(""!==a.peerConnectionError?"Retry":"Add Peer"),e.xp6(1),e.Q6J("stepControl",a.channelFormGroup)("editable",a.flgEditable),e.xp6(1),e.Q6J("formGroup",a.channelFormGroup),e.xp6(5),e.Q6J("step",1e3),e.xp6(2),e.hij("Remaining Bal: ",a.totalBalance-(a.channelFormGroup.controls.fundingAmount.value?a.channelFormGroup.controls.fundingAmount.value:0),""),e.xp6(3),e.Q6J("ngIf",null==a.channelFormGroup.controls.fundingAmount.errors?null:a.channelFormGroup.controls.fundingAmount.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.channelFormGroup.controls.fundingAmount.errors?null:a.channelFormGroup.controls.fundingAmount.errors.min),e.xp6(1),e.Q6J("ngIf",null==a.channelFormGroup.controls.fundingAmount.errors?null:a.channelFormGroup.controls.fundingAmount.errors.max),e.xp6(7),e.Q6J("ngForOf",a.transTypes),e.xp6(2),e.Q6J("placeholder","0"===a.channelFormGroup.controls.selTransType.value?"Default":"1"===a.channelFormGroup.controls.selTransType.value?"Target Confirmation Blocks":"Fee (Sats/vByte)")("step",1)("required","0"!==a.channelFormGroup.controls.selTransType.value),e.xp6(1),e.Q6J("ngIf",null==a.channelFormGroup.controls.transTypeValue.errors?null:a.channelFormGroup.controls.transTypeValue.errors.required),e.xp6(4),e.Q6J("ngIf",""!==a.channelConnectionError),e.xp6(3),e.Oqu(""!==a.channelConnectionError?"Retry":"Open Channel"),e.xp6(2),e.Q6J("mat-dialog-close",!1),e.xp6(1),e.Oqu(null!=a.newlyAddedPeer&&a.newlyAddedPeer.pub_key?"Do It Later":"Close"))},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,b.dn,B.Vq,B.C0,c._Y,c.JL,c.sg,B.VY,f.KE,I.Nt,c.Fj,W.h,c.JJ,c.u,c.Q7,p.O5,f.TO,M.BN,c.wV,f.bx,f.R9,ue.Rr,R.gD,p.sg,Y.ey,J.ZT],styles:[""]}),n})();function Mi(n,i){1&n&&e._UZ(0,"mat-progress-bar",32)}function Di(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Alias "),e.qZA())}const Ye=function(n){return{"max-width":n}};function Pi(n,i){if(1&n&&(e.TgZ(0,"td",34),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,Ye,a.screenSize===a.screenSizeEnum.XS?"12rem":"25rem")),e.xp6(1),e.hij(" ",null==t?null:t.alias," ")}}function Ji(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Public Key "),e.qZA())}function Ei(n,i){if(1&n&&(e.TgZ(0,"td",34),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,Ye,a.screenSize===a.screenSizeEnum.XS?"5rem":"35rem")),e.xp6(1),e.hij(" ",null==t?null:t.pub_key," ")}}function Qi(n,i){1&n&&(e.TgZ(0,"th",35),e._uU(1," Sats Sent "),e.qZA())}function Yi(n,i){if(1&n&&(e.TgZ(0,"td",36)(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.sat_sent)," ")}}function Hi(n,i){1&n&&(e.TgZ(0,"th",35),e._uU(1," Sats Received "),e.qZA())}function Bi(n,i){if(1&n&&(e.TgZ(0,"td",36)(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.sat_recv)," ")}}function Vi(n,i){1&n&&(e.TgZ(0,"th",35),e._uU(1," Ping "),e.qZA())}function Gi(n,i){if(1&n&&(e.TgZ(0,"td",36)(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.ping_time)," ")}}function zi(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",38)(1,"div",39)(2,"mat-select",40),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",41),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function Wi(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",42)(1,"div",39)(2,"mat-select",40),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",41),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onPeerClick(u,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",41),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onOpenChannel(s)}),e._uU(7,"Open Channel"),e.qZA(),e.TgZ(8,"mat-option",41),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onPeerDetach(s)}),e._uU(9,"Disconnect"),e.qZA()()()()}}function Xi(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No connected peer."),e.qZA())}function $i(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting peers..."),e.qZA())}function ji(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Ki(n,i){if(1&n&&(e.TgZ(0,"td",43),e.YNc(1,Xi,2,0,"p",44),e.YNc(2,$i,2,0,"p",44),e.YNc(3,ji,2,1,"p",44),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const eo=function(n){return{"display-none":n}};function to(n,i){if(1&n&&e._UZ(0,"tr",45),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,eo,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function no(n,i){1&n&&e._UZ(0,"tr",46)}function ao(n,i){1&n&&e._UZ(0,"tr",47)}const io=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},oo=function(){return["no_peer"]};let so=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.store=a,this.rtlEffects=o,this.commonService=s,this.availableBalance=0,this.faUsers=y.FVb,this.displayedColumns=[],this.peersData=[],this.information={},this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","sat_sent","sat_recv","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","sat_sent","sat_recv","ping_time","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","pub_key","sat_sent","sat_recv","ping_time","actions"])}ngOnInit(){this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.information=t}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.availableBalance=t.blockchainBalance.total_balance||0}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.peersData=t.peers,this.peersData.length>0&&this.loadPeersTable(this.peersData),this.logger.info(t)})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.pub_key,message:[[{key:"pub_key",value:t.pub_key,title:"Public Key",width:100}],[{key:"address",value:t.address,title:"Address",width:100}],[{key:"alias",value:t.alias,title:"Alias",width:40},{key:"inbound",value:t.inbound?"True":"False",title:"Inbound",width:30},{key:"ping_time",value:t.ping_time,title:"Ping Time",width:30,type:l.Gi.NUMBER}],[{key:"sat_sent",value:t.sat_sent,title:"Satoshis Sent",width:50,type:l.Gi.NUMBER},{key:"sat_recv",value:t.sat_recv,title:"Satoshis Received",width:50,type:l.Gi.NUMBER}],[{key:"bytes_sent",value:t.bytes_sent,title:"Bytes Sent",width:50,type:l.Gi.NUMBER},{key:"bytes_recv",value:t.bytes_recv,title:"Bytes Received",width:50,type:l.Gi.NUMBER}]]}}}))}onConnectPeer(){this.store.dispatch((0,w.qR)({payload:{data:{message:{peer:null,information:this.information,balance:this.availableBalance},component:Ii}}}))}onOpenChannel(t){this.store.dispatch((0,w.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},component:Qe}}}))}onPeerDetach(t){this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.pub_key),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,_.R)(this.unSubs[3])).subscribe(o=>{o&&this.store.dispatch((0,v.z)({payload:{pubkey:t.pub_key}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(t){this.peers=new r.by(t?[...t]:[]),this.peers.sort=this.sort,this.peers.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.peers.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.peers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(oe.V),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-peers"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Peers")}])],decls:40,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","pub_key"],["matColumnDef","sat_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","sat_recv"],["matColumnDef","ping_time"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"button",2),e.NdJ("click",function(){return a.onConnectPeer()}),e._uU(3,"Add Peer"),e.qZA()(),e.TgZ(4,"div",3)(5,"div",4)(6,"div",5),e._UZ(7,"fa-icon",6),e.TgZ(8,"span",7),e._uU(9,"Connected Peers"),e.qZA()(),e.TgZ(10,"mat-form-field",8)(11,"input",9),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(12,"div",10),e.YNc(13,Mi,1,0,"mat-progress-bar",11),e.TgZ(14,"table",12,13),e.ynx(16,14),e.YNc(17,Di,2,0,"th",15),e.YNc(18,Pi,2,4,"td",16),e.BQk(),e.ynx(19,17),e.YNc(20,Ji,2,0,"th",15),e.YNc(21,Ei,2,4,"td",16),e.BQk(),e.ynx(22,18),e.YNc(23,Qi,2,0,"th",19),e.YNc(24,Yi,4,3,"td",20),e.BQk(),e.ynx(25,21),e.YNc(26,Hi,2,0,"th",19),e.YNc(27,Bi,4,3,"td",20),e.BQk(),e.ynx(28,22),e.YNc(29,Vi,2,0,"th",19),e.YNc(30,Gi,4,3,"td",20),e.BQk(),e.ynx(31,23),e.YNc(32,zi,6,0,"th",24),e.YNc(33,Wi,10,0,"td",25),e.BQk(),e.ynx(34,26),e.YNc(35,Ki,4,3,"td",27),e.BQk(),e.YNc(36,to,1,3,"tr",28),e.YNc(37,no,1,0,"tr",29),e.YNc(38,ao,1,0,"tr",30),e.qZA()(),e._UZ(39,"mat-paginator",31),e.qZA()()),2&t&&(e.xp6(7),e.Q6J("icon",a.faUsers),e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.peers)("ngClass",e.VKq(12,io,""!==a.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(14,oo)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.yH,d.Wh,k.lW,M.BN,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-pub_key[_ngcontent-%COMP%]{flex:1 1 35%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:2rem}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem;flex:1 1 10%}.mat-column-sat_sent[_ngcontent-%COMP%], .mat-column-sat_recv[_ngcontent-%COMP%], .mat-column-ping_time[_ngcontent-%COMP%]{flex:1 1 13%;width:13%}"]}),n})();function lo(n,i){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Open"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numOpenChannels)}}function ro(n,i){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Pending"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numPendingChannels)}}function co(n,i){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Closed"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numClosedChannels)}}function uo(n,i){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Active HTLCs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numActiveHTLCs)}}let po=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.router=o,this.numOpenChannels=0,this.numPendingChannels=0,this.numClosedChannels=0,this.numActiveHTLCs=0,this.peers=[],this.information={},this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending"},{link:"closed",name:"Closed"},{link:"activehtlcs",name:"Active HTLCs"}],this.activeLink=0,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t instanceof T.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(a=>a.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.numOpenChannels=t.channels&&t.channels.length?t.channels.length:0,this.numActiveHTLCs=t.channels.reduce((a,o)=>a+(o.pending_htlcs&&o.pending_htlcs.length>0?o.pending_htlcs.length:0),0),this.logger.info(t)}),this.store.select(C.ni).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.numPendingChannels=t.pendingChannelsSummary.total_channels?t.pendingChannelsSummary.total_channels:0}),this.store.select(C.P2).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.numClosedChannels=t.closedChannels&&t.closedChannels.length?t.closedChannels.length:0}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[5])).subscribe(t=>{this.totalBalance=+t.blockchainBalance.total_balance}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[6])).subscribe(t=>{this.peers=t.peers,this.peers.forEach(a=>{(!a.alias||""===a.alias)&&(a.alias=a.pub_key.substring(0,15)+"...")}),this.logger.info(t)})}onOpenChannel(){this.store.dispatch((0,w.qR)({payload:{data:{alertTitle:"Open Channel",message:{peers:this.peers,information:this.information,balance:this.totalBalance},component:Qe}}}))}onSelectedTabChange(t){this.router.navigateByUrl("/lnd/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channels-tables"]],decls:16,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"button",2),e.NdJ("click",function(){return a.onOpenChannel()}),e._uU(3,"Open Channel"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-tab-group",4),e.NdJ("selectedIndexChange",function(s){return a.activeLink=s})("selectedTabChange",function(s){return a.onSelectedTabChange(s)}),e.TgZ(6,"mat-tab"),e.YNc(7,lo,2,1,"ng-template",5),e.qZA(),e.TgZ(8,"mat-tab"),e.YNc(9,ro,2,1,"ng-template",5),e.qZA(),e.TgZ(10,"mat-tab"),e.YNc(11,co,2,1,"ng-template",5),e.qZA(),e.TgZ(12,"mat-tab"),e.YNc(13,uo,2,1,"ng-template",5),e.qZA()(),e.TgZ(14,"div",6),e._UZ(15,"router-outlet"),e.qZA()()()),2&t&&(e.xp6(5),e.Q6J("selectedIndex",a.activeLink))},directives:[d.xw,d.yH,d.Wh,k.lW,D.SP,D.uX,D.uD,fe.k,T.lC],styles:[""]}),n})();var te=h(7261),se=h(6895);function mo(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",9)(2,"div",14)(3,"h4",11),e._uU(4,"Commit Fee"),e.qZA(),e.TgZ(5,"span",15),e._uU(6),e.ALo(7,"number"),e.qZA()(),e.TgZ(8,"div",14)(9,"h4",11),e._uU(10,"Commit Weight"),e.qZA(),e.TgZ(11,"span",15),e._uU(12),e.ALo(13,"number"),e.qZA()(),e.TgZ(14,"div",14)(15,"h4",11),e._uU(16,"Fee/KW"),e.qZA(),e.TgZ(17,"span",15),e._uU(18),e.ALo(19,"number"),e.qZA()(),e.TgZ(20,"div",14)(21,"h4",11),e._uU(22,"Static Remote Key"),e.qZA(),e.TgZ(23,"span",15),e._uU(24),e.qZA()()(),e._UZ(25,"mat-divider",13),e.TgZ(26,"div",9)(27,"div",14)(28,"h4",11),e._uU(29),e.qZA(),e.TgZ(30,"span",15),e._uU(31),e.ALo(32,"number"),e.qZA()(),e.TgZ(33,"div",14)(34,"h4",11),e._uU(35),e.qZA(),e.TgZ(36,"span",15),e._uU(37),e.ALo(38,"number"),e.qZA()(),e.TgZ(39,"div",14)(40,"h4",11),e._uU(41,"Unsettled Balance"),e.qZA(),e.TgZ(42,"span",15),e._uU(43),e.ALo(44,"number"),e.qZA()(),e.TgZ(45,"div",14)(46,"h4",11),e._uU(47,"CSV Delay"),e.qZA(),e.TgZ(48,"span",15),e._uU(49),e.ALo(50,"number"),e.qZA()()(),e._UZ(51,"mat-divider",13),e.TgZ(52,"div",9)(53,"div",14)(54,"h4",11),e._uU(55,"Local Reserve (Sats)"),e.qZA(),e.TgZ(56,"span",15),e._uU(57),e.ALo(58,"number"),e.qZA()(),e.TgZ(59,"div",14)(60,"h4",11),e._uU(61,"Remote Reserve (Sats)"),e.qZA(),e.TgZ(62,"span",15),e._uU(63),e.ALo(64,"number"),e.qZA()(),e.TgZ(65,"div",14)(66,"h4",11),e._uU(67,"Lifetime (Seconds)"),e.qZA(),e.TgZ(68,"span",15),e._uU(69),e.ALo(70,"number"),e.qZA()(),e.TgZ(71,"div",14)(72,"h4",11),e._uU(73,"Pending HTLCs"),e.qZA(),e.TgZ(74,"span",15),e._uU(75),e.ALo(76,"number"),e.qZA()()(),e._UZ(77,"mat-divider",13),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(e.lcZ(7,17,t.channel.commit_fee)),e.xp6(6),e.Oqu(e.lcZ(13,19,t.channel.commit_weight)),e.xp6(6),e.Oqu(e.lcZ(19,21,t.channel.fee_per_kw)),e.xp6(6),e.Oqu(t.channel.static_remote_key?"Yes":"No"),e.xp6(1),e.Q6J("inset",!0),e.xp6(4),e.Oqu(t.screenSize===t.screenSizeEnum.XS?"Total Sats Sent":"Total Satoshis Sent"),e.xp6(2),e.Oqu(e.lcZ(32,23,t.channel.total_satoshis_sent)),e.xp6(4),e.Oqu(t.screenSize===t.screenSizeEnum.XS?"Total Sats Recv":"Total Satoshis Received"),e.xp6(2),e.Oqu(e.lcZ(38,25,t.channel.total_satoshis_received)),e.xp6(6),e.Oqu(e.lcZ(44,27,t.channel.unsettled_balance)),e.xp6(6),e.Oqu(e.lcZ(50,29,t.channel.csv_delay)),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(58,31,t.channel.local_chan_reserve_sat)),e.xp6(6),e.Oqu(e.lcZ(64,33,t.channel.remote_chan_reserve_sat)),e.xp6(6),e.Oqu(e.lcZ(70,35,t.channel.lifetime)),e.xp6(6),e.Oqu(e.lcZ(76,37,null==t.channel||null==t.channel.pending_htlcs?null:t.channel.pending_htlcs.length)),e.xp6(2),e.Q6J("inset",!0)}}function _o(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Show Advanced"),e.qZA())}function ho(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Hide Advanced"),e.qZA())}function go(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",23),e.NdJ("copied",function(o){return e.CHM(t),e.oxw().onCopyChanID(o)}),e._uU(1,"Copy Channel ID"),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("payload",t.channel.chan_id)}}function fo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){return e.CHM(t),e.oxw().onClose()}),e._uU(1,"OK"),e.qZA()}}const Co=function(n){return{"xs-scroll-y":n}};let xe=(()=>{class n{constructor(t,a,o,s,u){this.dialogRef=t,this.data=a,this.logger=o,this.commonService=s,this.snackBar=u,this.faReceipt=y.dLy,this.showAdvanced=!1,this.showCopy=!0,this.showCopyField=null,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.channel=this.data.channel,this.showCopy=this.data.showCopy,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("Channel ID "+t+" copied."),this.logger.info("Copied Text: "+t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(N.mQ),e.Y36(O.v),e.Y36(te.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-information"]],decls:94,vars:36,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","25"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",1,"mt-1"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span",5),e._uU(6,"Channel Information"),e.qZA()(),e.TgZ(7,"button",6),e.NdJ("click",function(){return a.onClose()}),e._uU(8,"X"),e.qZA()(),e.TgZ(9,"mat-card-content",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h4",11),e._uU(14,"Channel ID"),e.qZA(),e.TgZ(15,"span",12),e._uU(16),e.qZA()(),e.TgZ(17,"div",10)(18,"h4",11),e._uU(19,"Peer Alias"),e.qZA(),e.TgZ(20,"span",12),e._uU(21),e.qZA()()(),e._UZ(22,"mat-divider",13),e.TgZ(23,"div",9)(24,"div",1)(25,"h4",11),e._uU(26,"Channel Point"),e.qZA(),e.TgZ(27,"span",12),e._uU(28),e.qZA()()(),e._UZ(29,"mat-divider",13),e.TgZ(30,"div",9)(31,"div",1)(32,"h4",11),e._uU(33,"Peer Public Key"),e.qZA(),e.TgZ(34,"span",12),e._uU(35),e.qZA()()(),e._UZ(36,"mat-divider",13),e.TgZ(37,"div",9)(38,"div",14)(39,"h4",11),e._uU(40,"Local Balance"),e.qZA(),e.TgZ(41,"span",15),e._uU(42),e.ALo(43,"number"),e.qZA()(),e.TgZ(44,"div",14)(45,"h4",11),e._uU(46,"Remote Balance"),e.qZA(),e.TgZ(47,"span",15),e._uU(48),e.ALo(49,"number"),e.qZA()(),e.TgZ(50,"div",14)(51,"h4",11),e._uU(52,"Capacity"),e.qZA(),e.TgZ(53,"span",15),e._uU(54),e.ALo(55,"number"),e.qZA()(),e.TgZ(56,"div",14)(57,"h4",11),e._uU(58,"Uptime (Seconds)"),e.qZA(),e.TgZ(59,"span",15),e._uU(60),e.ALo(61,"number"),e.qZA()()(),e._UZ(62,"mat-divider",13),e.TgZ(63,"div",9)(64,"div",14)(65,"h4",11),e._uU(66,"Active"),e.qZA(),e.TgZ(67,"span",15),e._uU(68),e.qZA()(),e.TgZ(69,"div",14)(70,"h4",11),e._uU(71,"Private"),e.qZA(),e.TgZ(72,"span",15),e._uU(73),e.qZA()(),e.TgZ(74,"div",14)(75,"h4",11),e._uU(76,"Initiator"),e.qZA(),e.TgZ(77,"span",15),e._uU(78),e.qZA()(),e.TgZ(79,"div",14)(80,"h4",11),e._uU(81,"Number of Updates"),e.qZA(),e.TgZ(82,"span",15),e._uU(83),e.ALo(84,"number"),e.qZA()()(),e._UZ(85,"mat-divider",13),e.YNc(86,mo,78,39,"div",16),e.TgZ(87,"div",17)(88,"button",18),e.NdJ("click",function(){return a.onShowAdvanced()}),e.YNc(89,_o,2,0,"p",19),e.YNc(90,ho,2,0,"ng-template",null,20,e.W1O),e.qZA(),e.YNc(92,go,2,1,"button",21),e.YNc(93,fo,2,0,"button",22),e.qZA()()()()()),2&t){const o=e.MAs(91);e.xp6(4),e.Q6J("icon",a.faReceipt),e.xp6(5),e.Q6J("ngClass",e.VKq(34,Co,a.screenSize===a.screenSizeEnum.XS)),e.xp6(7),e.Oqu(a.channel.chan_id),e.xp6(5),e.Oqu(a.channel.remote_alias),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(a.channel.channel_point),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(a.channel.remote_pubkey),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(43,24,a.channel.local_balance)),e.xp6(6),e.Oqu(e.lcZ(49,26,a.channel.remote_balance)),e.xp6(6),e.Oqu(e.lcZ(55,28,a.channel.capacity)),e.xp6(6),e.Oqu(e.lcZ(61,30,a.channel.uptime)),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(a.channel.active?"Yes":"No"),e.xp6(5),e.Oqu(a.channel.private?"Yes":"No"),e.xp6(5),e.Oqu(a.channel.initiator?"Yes":"No"),e.xp6(5),e.Oqu(e.lcZ(84,32,a.channel.num_updates)),e.xp6(2),e.Q6J("inset",!0),e.xp6(1),e.Q6J("ngIf",a.showAdvanced),e.xp6(3),e.Q6J("ngIf",!a.showAdvanced)("ngIfElse",o),e.xp6(3),e.Q6J("ngIf",a.showCopy),e.xp6(1),e.Q6J("ngIf",!a.showCopy)}},directives:[d.xw,d.Wh,d.yH,b.dk,M.BN,k.lW,b.dn,p.mk,S.oO,z.d,p.O5,W.h,se.y],pipes:[p.JJ],styles:[""]}),n})();var ye=h(9646),Te=h(7772),xo=h(113);function yo(n,i){1&n&&e.GkF(0)}const le=function(n,i){return{"small-svg":n,"large-svg":i}};function To(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",7),e._UZ(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),e.qZA(),e.kcU(),e.TgZ(41,"div",47)(42,"mat-card-title"),e._uU(43,"Circular rebalancing explained."),e.qZA()(),e.TgZ(44,"div",48)(45,"mat-card-subtitle",49),e._uU(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. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}function bo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",50),e._UZ(2,"path",51)(3,"path",52)(4,"path",53)(5,"path",54)(6,"path",55)(7,"path",56)(8,"path",57)(9,"path",58)(10,"path",59)(11,"path",60)(12,"path",61)(13,"path",62)(14,"path",63)(15,"path",64)(16,"path",65)(17,"path",66)(18,"path",67)(19,"path",68)(20,"path",69)(21,"path",70)(22,"path",71)(23,"path",72)(24,"path",73)(25,"path",74)(26,"path",75)(27,"path",76)(28,"path",77)(29,"path",78)(30,"path",79)(31,"path",80)(32,"path",81)(33,"path",51)(34,"path",52)(35,"path",53)(36,"path",54)(37,"path",55)(38,"path",56)(39,"path",57)(40,"path",58)(41,"path",59)(42,"path",82)(43,"path",83)(44,"path",62)(45,"path",84)(46,"path",85)(47,"path",86)(48,"path",66)(49,"path",67)(50,"path",68)(51,"path",69)(52,"path",70)(53,"path",71)(54,"path",72)(55,"path",73)(56,"path",74)(57,"path",75)(58,"path",76)(59,"path",77)(60,"path",78)(61,"path",79)(62,"path",87)(63,"path",81)(64,"path",88),e.TgZ(65,"defs")(66,"linearGradient",89),e._UZ(67,"stop",90)(68,"stop",91)(69,"stop",92),e.qZA(),e.TgZ(70,"linearGradient",93),e._UZ(71,"stop",90)(72,"stop",91)(73,"stop",92),e.qZA(),e.TgZ(74,"linearGradient",94),e._UZ(75,"stop",90)(76,"stop",91)(77,"stop",92),e.qZA(),e.TgZ(78,"linearGradient",95),e._UZ(79,"stop",90)(80,"stop",91)(81,"stop",92),e.qZA(),e.TgZ(82,"linearGradient",96),e._UZ(83,"stop",90)(84,"stop",91)(85,"stop",92),e.qZA(),e.TgZ(86,"linearGradient",97),e._UZ(87,"stop",90)(88,"stop",91)(89,"stop",92),e.qZA()()(),e.kcU(),e.TgZ(90,"div",47)(91,"mat-card-title"),e._uU(92,"Step 1: Unbalanced channel"),e.qZA()(),e.TgZ(93,"div",48)(94,"mat-card-subtitle",49),e._uU(95," It starts with an unbalanced channel, that needs to be rebalanced in order to continue to route payments. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}function vo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",98),e._UZ(2,"path",99)(3,"path",100)(4,"path",101)(5,"path",102)(6,"path",103)(7,"path",104)(8,"path",105)(9,"path",106)(10,"path",107)(11,"path",108)(12,"path",109)(13,"path",110)(14,"path",111)(15,"path",112)(16,"path",113)(17,"path",51)(18,"path",114)(19,"path",115)(20,"path",116)(21,"path",117)(22,"path",118)(23,"path",119)(24,"path",120)(25,"path",121)(26,"path",82)(27,"path",83)(28,"path",122)(29,"path",123)(30,"path",124)(31,"path",125)(32,"path",66)(33,"path",126)(34,"path",127)(35,"path",128)(36,"path",129)(37,"path",130)(38,"path",131)(39,"path",73)(40,"path",74)(41,"path",132)(42,"path",76)(43,"path",77)(44,"path",78)(45,"path",79)(46,"path",133)(47,"path",134)(48,"path",135),e.TgZ(49,"defs")(50,"linearGradient",136),e._UZ(51,"stop",90)(52,"stop",91)(53,"stop",92),e.qZA(),e.TgZ(54,"linearGradient",137),e._UZ(55,"stop",90)(56,"stop",91)(57,"stop",92),e.qZA(),e.TgZ(58,"linearGradient",138),e._UZ(59,"stop",90)(60,"stop",91)(61,"stop",92),e.qZA()()(),e.kcU(),e.TgZ(62,"div",47)(63,"mat-card-title"),e._uU(64,"Step 2: Invoice/Payment"),e.qZA()(),e.TgZ(65,"div",48)(66,"mat-card-subtitle",49),e._uU(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. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}function Zo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",139),e._UZ(2,"path",140)(3,"path",141)(4,"path",142)(5,"path",143)(6,"path",144)(7,"path",145)(8,"path",146)(9,"path",147)(10,"path",148)(11,"path",149)(12,"path",150)(13,"path",151)(14,"path",152)(15,"path",153)(16,"path",154)(17,"path",155)(18,"path",156)(19,"path",157)(20,"path",158)(21,"path",159)(22,"path",160)(23,"path",161)(24,"path",162)(25,"path",163)(26,"path",162)(27,"path",164)(28,"path",165)(29,"path",166)(30,"path",167)(31,"path",168)(32,"path",169)(33,"path",170)(34,"path",171)(35,"path",172)(36,"path",173)(37,"path",174)(38,"path",175)(39,"path",176)(40,"path",177)(41,"path",178),e.TgZ(42,"defs")(43,"linearGradient",179),e._UZ(44,"stop",90)(45,"stop",91)(46,"stop",92),e.qZA()()(),e.kcU(),e.TgZ(47,"div",47)(48,"mat-card-title"),e._uU(49,"Step 3: Rebalance amount"),e.qZA()(),e.TgZ(50,"div",48)(51,"mat-card-subtitle",49),e._uU(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. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}function wo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",139),e._UZ(2,"path",180)(3,"path",142)(4,"path",181)(5,"path",144)(6,"path",145)(7,"path",182)(8,"path",147)(9,"path",183)(10,"path",184)(11,"path",185)(12,"path",186)(13,"path",187)(14,"path",188)(15,"path",189)(16,"path",190)(17,"path",191)(18,"path",157)(19,"path",192)(20,"path",193)(21,"path",178)(22,"path",159)(23,"path",160)(24,"path",194)(25,"path",162)(26,"path",163)(27,"path",162)(28,"path",164)(29,"path",165)(30,"path",166)(31,"path",167)(32,"path",195)(33,"path",169)(34,"path",196)(35,"path",171)(36,"path",172)(37,"path",173)(38,"path",174)(39,"path",175)(40,"path",197),e.TgZ(41,"defs")(42,"linearGradient",198),e._UZ(43,"stop",90)(44,"stop",91)(45,"stop",92),e.qZA()()(),e.kcU(),e.TgZ(46,"div",47)(47,"mat-card-title"),e._uU(48,"Rebalance successful!"),e.qZA()(),e.TgZ(49,"div",48)(50,"mat-card-subtitle",49),e._uU(51," Your channel is successfully rebalanced and is able to continue to route payments. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}let Ao=(()=>{class n{constructor(t){this.commonService=t,this.animationDirection="forward",this.stepNumber=1,this.stepNumberChange=new e.vpe,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}onSwipe(t){2===t.direction&&this.stepNumber<5?(this.stepNumber++,this.animationDirection="forward",this.stepNumberChange.emit(this.stepNumber)):4===t.direction&&this.stepNumber>1&&(this.stepNumber--,this.animationDirection="backward",this.stepNumberChange.emit(this.stepNumber))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-rebalance-infographics"]],inputs:{animationDirection:"animationDirection",stepNumber:"stepNumber"},outputs:{stepNumberChange:"stepNumberChange"},decls:11,vars:1,consts:[[4,"ngTemplateOutlet"],["infoStepBlock1",""],["infoStepBlock2",""],["infoStepBlock3",""],["infoStepBlock4",""],["infoStepBlock5",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","fill","#444053"],["d","M127.4 137.844L128.262 144L129 137.6L127.4 137.844Z","fill","#D0D2D5"],["d","M100.2 134.349V138.226L101 141.6H101.571L102.258 137.976L102.6 133.6L100.2 134.349Z","fill","#3F3D56"],["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","fill","#D0D2D5"],["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","fill","#D0D2D5"],["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","#444053"],["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","fill","#444053"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","fill","#5E4EA5","stroke","white","stroke-width","1.6"],["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","fill","#5E4EA5","stroke","white","stroke-width","1.6"],["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","fill","#5E4EA5","stroke","white","stroke-width","1.6"],["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","fill","#5E4EA5","stroke","white","stroke-width","1.6"],["fxFlex","20","fxLayoutAlign","center end"],["fxFlex","40"],[1,"font-size-120"],["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","fill","#E6E6E6"],["d","M88.6575 67.1775H1.48926V98.4248H88.6575V67.1775Z","fill","white"],["d","M59.844 74.5891H8.64404V90.6009H59.844V74.5891Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M88.6575 34.7129H1.48926V65.9602H88.6575V34.7129Z","fill","white"],["d","M59.844 42.1244H8.64404V58.1363H59.844V42.1244Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M88.6575 2.24823H1.48926V33.4955H88.6575V2.24823Z","fill","white"],["d","M59.844 9.66199H8.64404V25.6739H59.844V9.66199Z","fill","#C4B7FF"],["d","M32.644 74.5891H8.64404V90.6009H32.644V74.5891Z","fill","#5E4EA5"],["d","M45.444 42.1244H8.64404V58.1363H45.444V42.1244Z","fill","#5E4EA5"],["d","M59.644 9.66199H8.64404V25.662H59.644V9.66199Z","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#4A4A4A"],["d","M192.266 42.8538H69.9434V111.856H192.266V42.8538Z","fill","#CBCBCB"],["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","fill","#F2F2F2"],["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","fill","#3F3D56"],["d","M170.967 80.0673H159.541V82.4548H170.967V80.0673Z","fill","#4A4A4A"],["d","M184.781 61.4783H145.727V62.5015H184.781V61.4783Z","fill","#4A4A4A"],["d","M184.781 64.7186H145.727V65.7418H184.781V64.7186Z","fill","#4A4A4A"],["d","M184.781 67.9589H145.727V68.9821H184.781V67.9589Z","fill","#4A4A4A"],["d","M184.781 71.1991H145.727V72.2224H184.781V71.1991Z","fill","#4A4A4A"],["d","M184.781 74.4394H145.727V75.4626H184.781V74.4394Z","fill","#4A4A4A"],["d","M184.781 44.2537H180.006V49.0288H184.781V44.2537Z","fill","#F2F2F2"],["d","M186.998 51.2458H181.2V45.4474H186.998V51.2458ZM181.452 50.9937H186.746V45.6996H181.452V50.9937Z","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#5B5B5B"],["d","M42 75H9V91H42V75Z","fill","#5E4EA5"],["d","M42 42H9V58H42V42Z","fill","#5E4EA5"],["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","fill","#4A4A4A"],["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","fill","#F1F1F1"],["d","M115.068 85.6077H349.8V86.5722H113L115.068 85.6077Z","fill","#4A4A4A"],["d","M236.776 84.376H226.024V91.544H236.776V84.376Z","fill","#D0CDE1"],["d","M218.856 87.96H233.192V79H218.856V87.96ZM232.569 87.5704H219.479V79.3896H232.569V87.5704Z","fill","#4A4A4A"],["d","M265 57.3624H357.392V120.307H265V57.3624Z","fill","#CBCBCB"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#F2F2F2"],["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","fill","#4A4A4A"],["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","fill","#5B5B5B"],["d","M88.6576 67.1775H1.48938V98.4248H88.6576V67.1775Z","fill","white"],["d","M59.8442 74.589H8.64417V90.6009H59.8442V74.589Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M88.6576 34.7129H1.48938V65.9602H88.6576V34.7129Z","fill","white"],["d","M59.8442 42.1244H8.64417V58.1363H59.8442V42.1244Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M88.6576 2.24824H1.48938V33.4955H88.6576V2.24824Z","fill","white"],["d","M59.8442 9.66196H8.64417V25.6738H59.8442V9.66196Z","fill","#C4B7FF"],["d","M59.8442 9.66196H8.64417V25.6738H59.8442V9.66196Z","fill","#5E4EA5"],["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","fill","#4A4A4A"],["d","M192.265 42.8538H69.9432V111.856H192.265V42.8538Z","fill","#CBCBCB"],["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","fill","#F2F2F2"],["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","fill","#3F3D56"],["d","M170.967 80.0672H159.541V82.4548H170.967V80.0672Z","fill","#4A4A4A"],["d","M184.781 67.9588H145.727V68.9821H184.781V67.9588Z","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#5B5B5B"],["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","#C4B7FF","stroke-width","2","stroke-linecap","round","stroke-dasharray","7 7"],["d","M76.25 191C114.91 191 146.25 158.541 146.25 118.5C146.25 78.4594 114.91 46 76.25 46","stroke","#5E4EA5","stroke-width","2","stroke-linecap","round","stroke-dasharray","7 7"],["d","M122.399 37H32.25V137.616H122.399V37Z","fill","#E6E6E6"],["d","M120.908 104.178H33.7394V135.425H120.908V104.178Z","fill","white"],["d","M92.0943 111.589H40.8943V127.601H92.0943V111.589Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M120.908 71.7129H33.7394V102.96H120.908V71.7129Z","fill","white"],["d","M92.0943 79.1244H40.8943V95.1363H92.0943V79.1244Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M120.908 39.2482H33.7394V70.4955H120.908V39.2482Z","fill","white"],["d","M92.0943 46.662H40.8943V62.6738H92.0943V46.662Z","fill","#C4B7FF"],["d","M74.5 112H40.5V128H74.5V112Z","fill","#5E4EA5"],["d","M74.5 79H40.5V95H74.5V79Z","fill","#5E4EA5"],["d","M91.8943 46.662H40.8943V62.662H91.8943V46.662Z","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#C4B7FF"],["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","fill","#C4B7FF"],["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","fill","#F2F2F2"],["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","fill","#5B5B5B"],["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","fill","#F2F2F2"],["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","fill","#CBCBCB"],["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","fill","#595959"],["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","fill","#F2F2F2"],["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","fill","#CBCBCB"],["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","fill","#595959"],["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","fill","#595959"],["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","fill","#CBCBCB"],["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","fill","#CBCBCB"],["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","fill","#CBCBCB"],["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","fill","#595959"],["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","fill","#5E4EA5"],["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","#5E4EA5","stroke-width","2","stroke-linecap","round","stroke-dasharray","7 7"],["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","fill","#6C63FF"],["d","M120.908 39.2482H33.7393V70.4955H120.908V39.2482Z","fill","white"],["d","M92.0943 46.662H40.8943V62.6739H92.0943V46.662Z","fill","#C4B7FF"],["d","M76 112H41V128H76V112Z","fill","#5E4EA5"],["d","M70 79H41V95H70V79Z","fill","#5E4EA5"],["d","M70 47H41V63H70V47Z","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#CBCBCB"],["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","fill","#595959"],["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(t,a){if(1&t&&(e.YNc(0,yo,1,0,"ng-container",0),e.YNc(1,To,47,5,"ng-template",null,1,e.W1O),e.YNc(3,bo,96,5,"ng-template",null,2,e.W1O),e.YNc(5,vo,68,5,"ng-template",null,3,e.W1O),e.YNc(7,Zo,53,5,"ng-template",null,4,e.W1O),e.YNc(9,wo,52,5,"ng-template",null,5,e.W1O)),2&t){const o=e.MAs(2),s=e.MAs(4),u=e.MAs(6),g=e.MAs(8),U=e.MAs(10);e.Q6J("ngTemplateOutlet",1===a.stepNumber?o:2===a.stepNumber?s:3===a.stepNumber?u:4===a.stepNumber?g:U)}},directives:[p.tP,d.xw,d.yH,d.Wh,p.mk,S.oO,b.n5,b.$j],styles:["svg.small-svg[_ngcontent-%COMP%]{height:50%;min-height:50%;max-width:100%}svg.large-svg[_ngcontent-%COMP%]{height:60%;min-height:60%;max-width:100%}"],data:{animation:[xo.l]}}),n})();const So=["stepper"];function Lo(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.inputFormLabel)}}function ko(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function Fo(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount must be a positive number."),e.qZA())}function No(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("Amount must be less than or equal to ",null==t.selChannel?null:t.selChannel.local_balance,".")}}function qo(n,i){if(1&n&&(e.TgZ(0,"mat-option",55),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.AsE("",t.remote_alias," - ",t.chan_id,"")}}function Uo(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Receive from Peer is required."),e.qZA())}function Oo(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Receive from Peer not found in the list."),e.qZA())}function Ro(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.feeFormLabel)}}function Io(n,i){if(1&n&&(e.TgZ(0,"mat-option",55),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function Mo(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("",t.feeFormGroup.controls.selFeeLimitType.value?t.feeFormGroup.controls.selFeeLimitType.value.placeholder:t.feeLimitTypes[0].placeholder," is required.")}}function Do(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("",t.feeFormGroup.controls.selFeeLimitType.value?t.feeFormGroup.controls.selFeeLimitType.value.placeholder:t.feeLimitTypes[0].placeholder," must be a positive number.")}}function Po(n,i){1&n&&e._uU(0,"Invoice/Payment")}function Jo(n,i){1&n&&(e.TgZ(0,"mat-icon",56),e._uU(1,"check"),e.qZA())}function Eo(n,i){1&n&&e._UZ(0,"mat-progress-bar",57)}function Qo(n,i){if(1&n&&(e.TgZ(0,"mat-icon",56),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(null!=t.paymentStatus&&t.paymentStatus.error?"close":"check")}}function Yo(n,i){1&n&&e._UZ(0,"div",14)}function Ho(n,i){1&n&&e._UZ(0,"mat-progress-bar",57)}function Bo(n,i){if(1&n&&(e.TgZ(0,"h4",58),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentStatus&&t.paymentStatus.payment_hash?"Rebalance Successful.":"Rebalance Failed.")}}function Vo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",59),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onRestart()}),e._uU(1,"Start Again"),e.qZA()}}function Go(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",6)(2,"mat-card-header",7)(3,"div",8)(4,"span",9),e._uU(5),e.qZA()(),e.TgZ(6,"div",10)(7,"button",11),e.NdJ("click",function(){return e.CHM(t),e.oxw().showInfo()}),e._uU(8,"?"),e.qZA(),e.TgZ(9,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().onClose()}),e._uU(10,"X"),e.qZA()()(),e.TgZ(11,"mat-card-content",13)(12,"div",14)(13,"div",15)(14,"div",16),e._UZ(15,"fa-icon",17),e.TgZ(16,"span"),e._uU(17,"Circular Rebalance is a payment you make to *yourselves* 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."),e.qZA()()(),e.TgZ(18,"div",18)(19,"p",19)(20,"strong"),e._uU(21,"Channel Peer:\xa0"),e.qZA(),e._uU(22),e.ALo(23,"titlecase"),e.qZA(),e.TgZ(24,"p",19)(25,"strong"),e._uU(26,"Channel ID:\xa0"),e.qZA(),e._uU(27),e.qZA()(),e.TgZ(28,"mat-vertical-stepper",20,21),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().stepSelectionChanged(o)}),e.TgZ(30,"mat-step",22)(31,"form",23),e.YNc(32,Lo,1,1,"ng-template",24),e.TgZ(33,"div",25)(34,"mat-form-field",26),e._UZ(35,"input",27),e.TgZ(36,"mat-hint"),e._uU(37),e.qZA(),e.TgZ(38,"span",28),e._uU(39,"Sats"),e.qZA(),e.YNc(40,ko,2,0,"mat-error",29),e.YNc(41,Fo,2,0,"mat-error",29),e.YNc(42,No,2,1,"mat-error",29),e.qZA(),e.TgZ(43,"mat-form-field",30)(44,"input",31),e.NdJ("change",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.qZA(),e.TgZ(45,"mat-autocomplete",32,33),e.NdJ("optionSelected",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.YNc(47,qo,2,3,"mat-option",34),e.ALo(48,"async"),e.qZA(),e.YNc(49,Uo,2,0,"mat-error",29),e.YNc(50,Oo,2,0,"mat-error",29),e.qZA()(),e.TgZ(51,"div",35)(52,"button",36),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSelectFee()}),e._uU(53,"Select Fee"),e.qZA()()()(),e.TgZ(54,"mat-step",22)(55,"form",23),e.YNc(56,Ro,1,1,"ng-template",37),e.TgZ(57,"div",25)(58,"div",25)(59,"mat-form-field",30)(60,"mat-select",38),e.YNc(61,Io,2,2,"mat-option",34),e.qZA()(),e.TgZ(62,"mat-form-field",26),e._UZ(63,"input",39),e.YNc(64,Mo,2,1,"mat-error",29),e.YNc(65,Do,2,1,"mat-error",29),e.qZA()()(),e.TgZ(66,"div",35)(67,"button",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().onRebalance()}),e._uU(68,"Rebalance"),e.qZA()()()(),e.TgZ(69,"mat-step",41)(70,"form",23),e.YNc(71,Po,1,0,"ng-template",24),e.TgZ(72,"div",42)(73,"mat-expansion-panel",43)(74,"mat-expansion-panel-header")(75,"mat-panel-title")(76,"span",44),e._uU(77),e.YNc(78,Jo,2,0,"mat-icon",45),e.qZA()()(),e.TgZ(79,"div",14)(80,"span",46),e._uU(81),e.qZA()()(),e.YNc(82,Eo,1,0,"mat-progress-bar",47),e.TgZ(83,"mat-expansion-panel",48)(84,"mat-expansion-panel-header")(85,"mat-panel-title")(86,"span",44),e._uU(87),e.YNc(88,Qo,2,1,"mat-icon",45),e.qZA()()(),e.YNc(89,Yo,1,0,"div",49),e.qZA(),e.YNc(90,Ho,1,0,"mat-progress-bar",47),e.qZA(),e.YNc(91,Bo,2,1,"h4",50),e.TgZ(92,"div",51),e.YNc(93,Vo,2,0,"button",52),e.qZA()()()(),e.TgZ(94,"div",53)(95,"button",54),e._uU(96,"Close"),e.qZA()()()()()()}if(2&n){const t=e.MAs(46),a=e.oxw(),o=e.MAs(2);e.Q6J("@opacityAnimation",void 0),e.xp6(3),e.Q6J("fxFlex",a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM?"83":"91"),e.xp6(2),e.Oqu(a.channel?"Channel "+a.loopDirectionCaption:a.loopDirectionCaption),e.xp6(1),e.Q6J("fxFlex",a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM?"17":"9"),e.xp6(9),e.Q6J("icon",a.faInfoCircle),e.xp6(7),e.Oqu(e.lcZ(23,45,a.selChannel.remote_alias)),e.xp6(5),e.Oqu(a.selChannel.chan_id),e.xp6(1),e.Q6J("linear",!0),e.xp6(2),e.Q6J("stepControl",a.inputFormGroup)("editable",a.flgEditable),e.xp6(1),e.Q6J("formGroup",a.inputFormGroup),e.xp6(4),e.Q6J("step",100),e.xp6(2),e.AsE("(Local Bal: ",null==a.selChannel?null:a.selChannel.local_balance,", Remaining: ",(null==a.selChannel?null:a.selChannel.local_balance)-(a.inputFormGroup.controls.rebalanceAmount.value?a.inputFormGroup.controls.rebalanceAmount.value:0),")"),e.xp6(3),e.Q6J("ngIf",null==a.inputFormGroup.controls.rebalanceAmount.errors?null:a.inputFormGroup.controls.rebalanceAmount.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.inputFormGroup.controls.rebalanceAmount.errors?null:a.inputFormGroup.controls.rebalanceAmount.errors.min),e.xp6(1),e.Q6J("ngIf",null==a.inputFormGroup.controls.rebalanceAmount.errors?null:a.inputFormGroup.controls.rebalanceAmount.errors.max),e.xp6(2),e.Q6J("matAutocomplete",t),e.xp6(1),e.Q6J("displayWith",a.displayFn),e.xp6(2),e.Q6J("ngForOf",e.lcZ(48,47,a.filteredActiveChannels)),e.xp6(2),e.Q6J("ngIf",null==a.inputFormGroup.controls.selRebalancePeer.errors?null:a.inputFormGroup.controls.selRebalancePeer.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.inputFormGroup.controls.selRebalancePeer.errors?null:a.inputFormGroup.controls.selRebalancePeer.errors.notfound),e.xp6(4),e.Q6J("stepControl",a.feeFormGroup)("editable",a.flgEditable),e.xp6(1),e.Q6J("formGroup",a.feeFormGroup),e.xp6(6),e.Q6J("ngForOf",a.feeLimitTypes),e.xp6(2),e.s9C("placeholder",a.feeFormGroup.controls.selFeeLimitType.value?a.feeFormGroup.controls.selFeeLimitType.value.placeholder:a.feeLimitTypes[0].placeholder),e.Q6J("step",1),e.xp6(1),e.Q6J("ngIf",null==a.feeFormGroup.controls.feeLimit.errors?null:a.feeFormGroup.controls.feeLimit.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.feeFormGroup.controls.feeLimit.errors?null:a.feeFormGroup.controls.feeLimit.errors.min),e.xp6(4),e.Q6J("stepControl",a.statusFormGroup),e.xp6(1),e.Q6J("formGroup",a.statusFormGroup),e.xp6(7),e.Oqu(a.flgInvoiceGenerated?a.flgReusingInvoice?"Invoice re-used":"Invoice generated":"Generating invoice..."),e.xp6(1),e.Q6J("ngIf",a.flgInvoiceGenerated),e.xp6(3),e.Oqu(a.paymentRequest),e.xp6(1),e.Q6J("ngIf",!a.flgInvoiceGenerated),e.xp6(1),e.Q6J("expanded",(a.flgInvoiceGenerated||a.flgReusingInvoice)&&a.flgPaymentSent),e.xp6(4),e.Oqu(a.flgInvoiceGenerated||a.flgPaymentSent?a.flgPaymentSent?null!=a.paymentStatus&&a.paymentStatus.error?"Payment failed":"Payment successful":"Processing payment...":"Payment waiting for Invoice"),e.xp6(1),e.Q6J("ngIf",a.flgPaymentSent),e.xp6(1),e.Q6J("ngIf",!a.paymentStatus)("ngIfElse",o),e.xp6(1),e.Q6J("ngIf",a.flgInvoiceGenerated&&!a.flgPaymentSent),e.xp6(1),e.Q6J("ngIf",a.flgInvoiceGenerated&&a.flgPaymentSent),e.xp6(2),e.Q6J("ngIf",a.paymentStatus&&a.paymentStatus.error),e.xp6(2),e.Q6J("mat-dialog-close",!1)}}function zo(n,i){1&n&&e.GkF(0)}function Wo(n,i){if(1&n&&e.YNc(0,zo,1,0,"ng-container",60),2&n){const t=e.oxw(),a=e.MAs(4),o=e.MAs(6);e.Q6J("ngTemplateOutlet",t.paymentStatus.error?a:o)}}function Xo(n,i){if(1&n&&(e.TgZ(0,"div",14)(1,"span",46),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.hij("Error: ",t.paymentStatus.error,"")}}function $o(n,i){if(1&n&&(e.TgZ(0,"div",14)(1,"div",61)(2,"div",6)(3,"h4",62),e._uU(4,"Payment Hash"),e.qZA(),e.TgZ(5,"span",46),e._uU(6),e.qZA()()(),e._UZ(7,"mat-divider",63),e.TgZ(8,"div",61)(9,"div",64)(10,"h4",62),e._uU(11),e.qZA(),e.TgZ(12,"span",46),e._uU(13),e.qZA()(),e.TgZ(14,"div",64)(15,"h4",62),e._uU(16,"Number of Hops"),e.qZA(),e.TgZ(17,"span",46),e._uU(18),e.qZA()()()()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(t.paymentStatus.payment_hash),e.xp6(5),e.hij("Total Fees (",t.paymentStatus.payment_route.total_fees_msat?"mSats":"Sats",")"),e.xp6(2),e.Oqu(t.paymentStatus.payment_route.total_fees_msat?t.paymentStatus.payment_route.total_fees_msat:t.paymentStatus.payment_route.total_fees?t.paymentStatus.payment_route.total_fees:0),e.xp6(5),e.Oqu(t.paymentStatus&&t.paymentStatus.payment_route&&t.paymentStatus.payment_route.hops&&t.paymentStatus.payment_route.hops.length?t.paymentStatus.payment_route.hops.length:0)}}const jo=function(n,i){return{"dot-primary":n,"dot-primary-lighter":i}};function Ko(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"span",81),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).onStepChanged(s)}),e._UZ(1,"p",82),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.WLB(1,jo,a.stepNumber===t,a.stepNumber!==t))}}function es(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",83),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onStepChanged(4)}),e._uU(1,"Back"),e.qZA()}}function ts(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",84),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.flgShowInfo=!1,o.stepNumber=1}),e._uU(1,"Close"),e.qZA()}}function ns(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",85),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.flgShowInfo=!1,o.stepNumber=1}),e._uU(1,"Close"),e.qZA()}}function as(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",86),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.onStepChanged(o.stepNumber-1)}),e._uU(1,"Back"),e.qZA()}}function is(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",87),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.onStepChanged(o.stepNumber+1)}),e._uU(1,"Next"),e.qZA()}}const os=function(){return[1,2,3,4,5]};function ss(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",65)(1,"div",66)(2,"mat-card-header",67)(3,"div",68),e._UZ(4,"span",9),e.qZA(),e.TgZ(5,"div",69)(6,"button",70),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.flgShowInfo=!1,o.stepNumber=1}),e._uU(7,"X"),e.qZA()()(),e.TgZ(8,"mat-card-content",71)(9,"rtl-channel-rebalance-infographics",72),e.NdJ("stepNumberChange",function(o){return e.CHM(t),e.oxw().stepNumber=o}),e.qZA()(),e.TgZ(10,"div",73),e.YNc(11,Ko,2,4,"span",74),e.qZA(),e.TgZ(12,"div",75),e.YNc(13,es,2,0,"button",76),e.YNc(14,ts,2,0,"button",77),e.YNc(15,ns,2,0,"button",78),e.YNc(16,as,2,0,"button",79),e.YNc(17,is,2,0,"button",80),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@opacityAnimation",void 0),e.xp6(9),e.Q6J("stepNumber",t.stepNumber)("animationDirection",t.animationDirection),e.xp6(2),e.Q6J("ngForOf",e.DdM(9,os)),e.xp6(2),e.Q6J("ngIf",5===t.stepNumber),e.xp6(1),e.Q6J("ngIf",5===t.stepNumber),e.xp6(1),e.Q6J("ngIf",t.stepNumber<5),e.xp6(1),e.Q6J("ngIf",t.stepNumber>1&&t.stepNumber<5),e.xp6(1),e.Q6J("ngIf",t.stepNumber<5)}}let ls=(()=>{class n{constructor(t,a,o,s,u,g,U,x){this.dialogRef=t,this.data=a,this.logger=o,this.store=s,this.actions=u,this.formBuilder=g,this.decimalPipe=U,this.commonService=x,this.faInfoCircle=y.sqG,this.invoices={},this.selChannel={},this.activeChannels=[],this.feeLimitTypes=[],this.queryRoute={},this.paymentRequest="",this.paymentStatus=null,this.flgReusingInvoice=!1,this.flgInvoiceGenerated=!1,this.flgPaymentSent=!1,this.inputFormLabel="Amount to rebalance",this.feeFormLabel="Select rebalance fee",this.flgEditable=!0,this.flgShowInfo=!1,this.stepNumber=1,this.screenSize="",this.screenSizeEnum=l.cu,this.animationDirection="forward",this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize();let t="",a="";this.selChannel=this.data.message.selChannel,this.activeChannels=this.data.message.channels.filter(o=>o.active&&o.chan_id!==this.selChannel.chan_id&&o.remote_balance>0),this.activeChannels=this.activeChannels.sort((o,s)=>(t=o.remote_alias?o.remote_alias.toLowerCase():o.chan_id?o.chan_id.toLowerCase():"",a=s.remote_alias?s.remote_alias.toLowerCase():o.chan_id.toLowerCase(),ta?1:0)),l.Vc.forEach((o,s)=>{s>0&&this.feeLimitTypes.push(o)}),this.inputFormGroup=this.formBuilder.group({hiddenAmount:["",[c.kI.required]],rebalanceAmount:["",[c.kI.required,c.kI.min(1),c.kI.max(this.selChannel.local_balance)]],selRebalancePeer:[null,c.kI.required]}),this.feeFormGroup=this.formBuilder.group({selFeeLimitType:[this.feeLimitTypes[0],c.kI.required],feeLimit:["",[c.kI.required,c.kI.min(0)]],hiddenFeeLimit:["",[c.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.store.select(C.Ef).pipe((0,_.R)(this.unSubs[0])).subscribe(o=>{this.invoices=o.listInvoices,this.logger.info(o)}),this.actions.pipe((0,_.R)(this.unSubs[1]),(0,E.h)(o=>o.type===l.uR.SET_QUERY_ROUTES_LND||o.type===l.uR.SEND_PAYMENT_STATUS_LND||o.type===l.uR.NEWLY_SAVED_INVOICE_LND)).subscribe(o=>{o.type===l.uR.SET_QUERY_ROUTES_LND&&(this.queryRoute=o.payload),o.type===l.uR.SEND_PAYMENT_STATUS_LND&&(this.logger.info(o.payload),this.flgPaymentSent=!0,this.paymentStatus=o.payload,this.flgEditable=!0),o.type===l.uR.NEWLY_SAVED_INVOICE_LND&&(this.logger.info(o.payload),this.flgInvoiceGenerated=!0,this.sendPayment(o.payload.paymentRequest))}),this.inputFormGroup.get("rebalanceAmount").valueChanges.pipe((0,_.R)(this.unSubs[2]),(0,Ce.O)(0)).subscribe(o=>{this.inputFormGroup.controls.selRebalancePeer.setValue(""),this.inputFormGroup.controls.selRebalancePeer.setErrors(null),this.filteredActiveChannels=(0,ye.of)(o?this.filterActiveChannels():this.activeChannels.slice())}),this.inputFormGroup.get("selRebalancePeer").valueChanges.pipe((0,_.R)(this.unSubs[3]),(0,Ce.O)("")).subscribe(o=>{"string"==typeof o&&(this.filteredActiveChannels=(0,ye.of)(this.filterActiveChannels()))})}onSelectFee(){return this.inputFormGroup.controls.selRebalancePeer.value&&"string"==typeof this.inputFormGroup.controls.selRebalancePeer.value&&this.onSelectedPeerChanged(),this.inputFormGroup.controls.selRebalancePeer.value&&"string"!=typeof this.inputFormGroup.controls.selRebalancePeer.value?!this.inputFormGroup.controls.rebalanceAmount.value||(0===this.stepper.selectedIndex&&(this.inputFormGroup.controls.hiddenAmount.setValue(this.inputFormGroup.controls.rebalanceAmount.value),this.stepper.next()),this.queryRoute=null,this.feeFormGroup.reset(),void this.feeFormGroup.controls.selFeeLimitType.setValue(this.feeLimitTypes[0])):(this.inputFormGroup.controls.selRebalancePeer.setErrors({required:!0}),!0)}stepSelectionChanged(t){switch(t.selectedIndex){case 0:default:this.inputFormLabel="Amount to rebalance",this.feeFormLabel="Select rebalance fee";break;case 1:this.inputFormLabel=this.inputFormGroup.controls.rebalanceAmount.value||this.inputFormGroup.controls.selRebalancePeer.value.remote_alias?"Rebalancing Amount: "+this.decimalPipe.transform(this.inputFormGroup.controls.rebalanceAmount.value?this.inputFormGroup.controls.rebalanceAmount.value:0)+" Sats | Peer: "+(this.inputFormGroup.controls.selRebalancePeer.value.remote_alias?this.inputFormGroup.controls.selRebalancePeer.value.remote_alias:this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey.substring(0,15)+"..."):"Amount to rebalance",this.feeFormLabel="Select rebalance fee";break;case 2:this.inputFormLabel=this.inputFormGroup.controls.rebalanceAmount.value||this.inputFormGroup.controls.selRebalancePeer.value.remote_alias?"Rebalancing Amount: "+this.decimalPipe.transform(this.inputFormGroup.controls.rebalanceAmount.value?this.inputFormGroup.controls.rebalanceAmount.value:0)+" Sats | Peer: "+(this.inputFormGroup.controls.selRebalancePeer.value.remote_alias?this.inputFormGroup.controls.selRebalancePeer.value.remote_alias:this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey.substring(0,15)+"..."):"Amount to rebalance",this.feeFormLabel=this.queryRoute&&this.queryRoute.routes&&this.queryRoute.routes.length>0&&(this.queryRoute.routes[0].total_fees_msat||this.queryRoute.routes[0].hops&&this.queryRoute.routes[0].hops.length)?this.feeFormGroup.controls.selFeeLimitType.value.placeholder+": "+this.decimalPipe.transform(this.feeFormGroup.controls.feeLimit.value?this.feeFormGroup.controls.feeLimit.value:0)+" | Hops: "+this.queryRoute.routes[0].hops.length:"Select rebalance fee"}t.selectedIndex+this.selChannel.local_balance||!this.feeFormGroup.controls.feeLimit.value||this.feeFormGroup.controls.feeLimit.value<0||!this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey)return!0;this.feeFormGroup.controls.hiddenFeeLimit.setValue(this.feeFormGroup.controls.feeLimit.value),this.stepper.next(),this.flgEditable=!1,this.paymentRequest="",this.paymentStatus=null,this.flgReusingInvoice=!1,this.flgInvoiceGenerated=!1,this.flgPaymentSent=!1;const t=this.findUnsettledInvoice();t?(this.flgReusingInvoice=!0,this.sendPayment(t.payment_request)):this.store.dispatch((0,v.Rd)({payload:{uiMessage:l.m6.NO_SPINNER,memo:"Local-Rebalance-"+this.inputFormGroup.controls.rebalanceAmount.value+"-Sats",invoiceValue:this.inputFormGroup.controls.rebalanceAmount.value,private:!1,expiry:3600,pageSize:l.IV,openModal:!1}}))}findUnsettledInvoice(){return this.invoices.invoices.find(t=>(0==+t.settle_date||!t.settle_date)&&t.memo==="Local-Rebalance-"+this.inputFormGroup.controls.rebalanceAmount.value+"-Sats"&&"CANCELED"!==t.state)}sendPayment(t){this.flgInvoiceGenerated=!0,this.paymentRequest=t,this.store.dispatch((0,v.oV)("percent"===this.feeFormGroup.controls.selFeeLimitType.value.id&&+this.feeFormGroup.controls.feeLimit.value%1!=0?{payload:{uiMessage:l.m6.NO_SPINNER,paymentReq:t,outgoingChannel:this.selChannel,feeLimitType:"fixed",feeLimit:Math.ceil(+this.feeFormGroup.controls.feeLimit.value*+this.inputFormGroup.controls.rebalanceAmount.value/100),allowSelfPayment:!0,lastHopPubkey:this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey,fromDialog:!0}}:{payload:{uiMessage:l.m6.NO_SPINNER,paymentReq:t,outgoingChannel:this.selChannel,feeLimitType:this.feeFormGroup.controls.selFeeLimitType.value.id,feeLimit:this.feeFormGroup.controls.feeLimit.value,allowSelfPayment:!0,lastHopPubkey:this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey,fromDialog:!0}}))}filterActiveChannels(){return this.activeChannels.filter(t=>t.remote_balance>=this.inputFormGroup.controls.rebalanceAmount.value&&t.chan_id!==this.selChannel.chan_id&&(0===t.remote_alias.toLowerCase().indexOf(this.inputFormGroup.controls.selRebalancePeer.value?this.inputFormGroup.controls.selRebalancePeer.value.toLowerCase():"")||0===t.chan_id.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 t=this.activeChannels.filter(a=>a.remote_alias.length===this.inputFormGroup.controls.selRebalancePeer.value.length&&0===a.remote_alias.toLowerCase().indexOf(this.inputFormGroup.controls.selRebalancePeer.value?this.inputFormGroup.controls.selRebalancePeer.value.toLowerCase():""));t&&t.length>0?(this.inputFormGroup.controls.selRebalancePeer.setValue(t[0]),this.inputFormGroup.controls.selRebalancePeer.setErrors(null)):this.inputFormGroup.controls.selRebalancePeer.setErrors({notfound:!0})}}displayFn(t){return t&&t.remote_alias?t.remote_alias:t&&t.chan_id?t.chan_id:""}showInfo(){this.flgShowInfo=!0}onStepChanged(t){this.animationDirection=t{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(N.mQ),e.Y36(A.yh),e.Y36(G.eX),e.Y36(c.qu),e.Y36(p.JJ),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-rebalance"]],viewQuery:function(t,a){if(1&t&&e.Gf(So,5),2&t){let o;e.iGM(o=e.CRH())&&(a.stepper=o.first)}},decls:8,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf"],["paymentStatusBlock",""],["paymentFailedBlock",""],["paymentSuccessfulBlock",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch","class","info-graphics-container",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxLayoutAlign","start start",3,"fxFlex"],[1,"page-title"],["fxLayoutAlign","space-between end",3,"fxFlex"],["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","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","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","48"],["autoFocus","","matInput","","placeholder","Amount","type","number","tabindex","1","formControlName","rebalanceAmount","required","",3,"step"],["matSuffix",""],[4,"ngIf"],["fxFlex","48","fxLayoutAlign","start end"],["type","text","placeholder","Receive from Peer","aria-label","Receive from Peer","matInput","","formControlName","selRebalancePeer","tabindex","2","required","",3,"matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","submit",3,"click"],["matStepLabel","","disabled","true"],["tabindex","6","formControlName","selFeeLimitType","Placeholder","Fee Limits","required",""],["matInput","","formControlName","feeLimit","type","number","tabindex","7","required","",3,"placeholder","step"],["mat-button","","color","primary","tabindex","8","type","submit",3,"click"],[3,"stepControl"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["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","color","primary","mode","indeterminate",4,"ngIf"],["fxFlex","100",1,"flat-expansion-panel",3,"expanded"],["fxLayout","column",4,"ngIf","ngIfElse"],["fxLayoutAlign","start","class","font-bold-500 mt-1",4,"ngIf"],["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"],[1,"ml-1","icon-small"],["fxFlex","100","color","primary","mode","indeterminate"],["fxLayoutAlign","start",1,"font-bold-500","mt-1"],["mat-button","","color","primary","tabindex","11","type","button",3,"click"],[4,"ngTemplateOutlet"],["fxLayout","row"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"w-100","my-1"],["fxFlex","50"],["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"],["tabindex","19","mat-button","",1,"btn-close-x","p-0",3,"click"],["fxLayout","column","fxFlex","70","fxLayoutAlign","space-between center",1,"padding-gap-x-large"],["fxFlex","100",3,"stepNumber","animationDirection","stepNumberChange"],["fxLayout","row","fxFlex","10","fxLayoutAlign","center end",1,"padding-gap-x-large","padding-gap-bottom-large"],["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"],["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(t,a){1&t&&(e.YNc(0,Go,97,49,"div",0),e.YNc(1,Wo,1,1,"ng-template",null,1,e.W1O),e.YNc(3,Xo,3,1,"ng-template",null,2,e.W1O),e.YNc(5,$o,19,4,"ng-template",null,3,e.W1O),e.YNc(7,ss,18,10,"div",4)),2&t&&(e.Q6J("ngIf",!a.flgShowInfo),e.xp6(7),e.Q6J("ngIf",a.flgShowInfo))},directives:[p.O5,d.xw,d.yH,d.Wh,b.dk,k.lW,b.dn,M.BN,B.Vq,B.C0,c._Y,c.JL,c.sg,B.VY,f.KE,I.Nt,c.wV,c.Fj,W.h,c.JJ,c.u,c.Q7,f.bx,f.R9,f.TO,ne.ZL,ne.XC,p.sg,Y.ey,R.gD,H.ib,H.yz,H.yK,K.Hw,P.pW,J.ZT,p.tP,z.d,Ao,p.mk,S.oO],pipes:[p.rS,p.Ov],styles:[".dots-stepper-block[_ngcontent-%COMP%]{width:3rem}.info-graphics-container[_ngcontent-%COMP%]{max-height:60rem;min-height:60rem}"],data:{animation:[Te._]}}),n})();function rs(n,i){if(1&n&&(e.TgZ(0,"div",16)(1,"p",17)(2,"mat-icon",18),e._uU(3,"close"),e.qZA(),e._uU(4),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.Oqu(t.errorMsg)}}function cs(n,i){if(1&n&&(e.TgZ(0,"div",27),e._UZ(1,"fa-icon",28),e.TgZ(2,"span"),e._uU(3,"Priority/Fee for force closing inactive channels cannot be modified."),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faInfoCircle)}}function us(n,i){if(1&n&&(e.TgZ(0,"mat-option",29),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function ps(n,i){1&n&&(e.TgZ(0,"mat-form-field",30),e._UZ(1,"input",31),e.qZA())}function ms(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Number of blocks is required."),e.qZA())}function ds(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",32)(1,"input",33,34),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).blocks=o}),e.qZA(),e.YNc(3,ms,2,0,"mat-error",35),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.blocks)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.blocks)}}function _s(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function hs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",32)(1,"input",36,37),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).fees=o}),e.qZA(),e.YNc(3,_s,2,0,"mat-error",35),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.fees)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.fees)}}function gs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",19),e.YNc(1,cs,4,1,"div",20),e.TgZ(2,"div",21)(3,"mat-form-field",22)(4,"mat-select",23),e.NdJ("valueChange",function(o){return e.CHM(t),e.oxw().selTransType=o}),e.YNc(5,us,2,2,"mat-option",24),e.qZA()(),e.YNc(6,ps,2,0,"mat-form-field",25),e.YNc(7,ds,4,4,"mat-form-field",26),e.YNc(8,hs,4,4,"mat-form-field",26),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.channelToClose.active),e.xp6(3),e.Q6J("value",t.selTransType)("disabled",!t.channelToClose.active),e.xp6(1),e.Q6J("ngForOf",t.transTypes),e.xp6(1),e.Q6J("ngIf","0"===t.selTransType),e.xp6(1),e.Q6J("ngIf","1"===t.selTransType),e.xp6(1),e.Q6J("ngIf","2"===t.selTransType)}}function fs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",38),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(1,"Clear"),e.qZA()}}function Cs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",39),e.NdJ("click",function(){return e.CHM(t),e.oxw().onCloseChannel()}),e._uU(1),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.channelToClose.active?"Close Channel":"Force Close")}}function xs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().onClose()}),e._uU(1,"Ok"),e.qZA()}}let ys=(()=>{class n{constructor(t,a,o,s,u){this.dialogRef=t,this.data=a,this.store=o,this.actions=s,this.logger=u,this.transTypes=l.Dr,this.selTransType="0",this.blocks=null,this.fees=null,this.faExclamationTriangle=y.eHv,this.faInfoCircle=y.sqG,this.flgPendingHtlcs=!1,this.errorMsg="Please wait for pending HTLCs to settle before attempting channel closure.",this.unSubs=[new m.x,new m.x]}ngOnInit(){this.channelToClose=this.data.channel,this.actions.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t.type===l.uR.UPDATE_API_CALL_STATUS_LND||t.type===l.uR.SET_CHANNELS_LND)).subscribe(t=>{if(t.type===l.uR.SET_CHANNELS_LND){const a=t.payload.find(o=>o.chan_id===this.data.channel.chan_id);a&&a.pending_htlcs&&a.pending_htlcs.length&&a.pending_htlcs.length>0&&(this.flgPendingHtlcs=!0)}t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&t.payload.status===l.Bn.ERROR&&"FetchAllChannels"===t.payload.action&&this.logger.error("Fetching latest channel information failed!\n"+t.payload.message)})}onCloseChannel(){if("1"===this.selTransType&&(!this.blocks||0===this.blocks)||"2"===this.selTransType&&(!this.fees||0===this.fees))return!0;const t={channelPoint:this.channelToClose.channel_point,forcibly:!this.channelToClose.active};this.blocks&&(t.targetConf=this.blocks),this.fees&&(t.satPerByte=this.fees),this.store.dispatch((0,v.BL)({payload:t})),this.dialogRef.close(!1)}resetData(){this.selTransType="0",this.blocks=null,this.fees=null}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(A.yh),e.Y36(G.eX),e.Y36(N.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-close-channel"]],decls:19,vars:7,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxLayout","column",1,"bordered-box","mb-1","p-2"],["fxLayoutAlign","start center",1,"pb-1","word-break"],["fxLayoutAlign","start center",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center"],["mat-button","","color","primary","type","reset","class","mr-1","tabindex","3","default","",3,"click",4,"ngIf"],["mat-button","","color","primary","type","submit","tabindex","4",3,"click",4,"ngIf"],["mat-button","","color","primary","type","submit","tabindex","5",3,"click",4,"ngIf"],["fxLayoutAlign","start center"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100","class","alert alert-info",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex.gt-sm","48"],["tabindex","1",3,"value","disabled","valueChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48",4,"ngIf"],["fxFlex.gt-sm","48","fxLayoutAlign","start end",4,"ngIf"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"],["fxFlex","48"],["matInput","","placeholder","Default","disabled",""],["fxFlex.gt-sm","48","fxLayoutAlign","start end"],["matInput","","placeholder","Number of Blocks","type","number","name","blocks","required","","tabindex","2",3,"ngModel","step","min","ngModelChange"],["blcks","ngModel"],[4,"ngIf"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","ccfees","required","","tabindex","3",3,"ngModel","step","min","ngModelChange"],["clchfee","ngModel"],["mat-button","","color","primary","type","reset","tabindex","3","default","",1,"mr-1",3,"click"],["mat-button","","color","primary","type","submit","tabindex","4",3,"click"],["mat-button","","color","primary","type","submit","tabindex","5",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return a.onClose()}),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7)(10,"div",8)(11,"p",9),e._uU(12),e.qZA(),e.YNc(13,rs,5,1,"div",10),e.YNc(14,gs,9,7,"div",11),e.qZA(),e.TgZ(15,"div",12),e.YNc(16,fs,2,0,"button",13),e.YNc(17,Cs,2,1,"button",14),e.YNc(18,xs,2,0,"button",15),e.qZA()()()()()),2&t&&(e.xp6(5),e.Oqu(a.channelToClose.active?"Close Channel":"Force Close Channel"),e.xp6(7),e.hij("",a.channelToClose.active?"Closing channel: "+(a.channelToClose.remote_alias||a.channelToClose.chan_id?a.channelToClose.remote_alias&&a.channelToClose.chan_id?a.channelToClose.remote_alias+" ("+a.channelToClose.chan_id+")":a.channelToClose.remote_alias?a.channelToClose.remote_alias:a.channelToClose.chan_id:a.channelToClose.channel_point):"Force closing channel: "+(a.channelToClose.remote_alias||a.channelToClose.chan_id?a.channelToClose.remote_alias&&a.channelToClose.chan_id?a.channelToClose.remote_alias+" ("+a.channelToClose.chan_id+")":a.channelToClose.remote_alias?a.channelToClose.remote_alias:a.channelToClose.chan_id:a.channelToClose.channel_point)," "),e.xp6(1),e.Q6J("ngIf",a.flgPendingHtlcs),e.xp6(1),e.Q6J("ngIf",!a.flgPendingHtlcs),e.xp6(2),e.Q6J("ngIf",a.channelToClose.active&&!a.flgPendingHtlcs),e.xp6(1),e.Q6J("ngIf",!a.flgPendingHtlcs),e.xp6(1),e.Q6J("ngIf",a.flgPendingHtlcs))},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,b.dn,c._Y,c.JL,c.F,p.O5,K.Hw,M.BN,f.KE,R.gD,p.sg,Y.ey,I.Nt,c.wV,c.qQ,c.Fj,$.q,c.Q7,c.JJ,c.On,f.TO],styles:[""]}),n})();function Ts(n,i){1&n&&e._UZ(0,"mat-progress-bar",30)}function bs(n,i){1&n&&(e.TgZ(0,"th",31),e._uU(1," Peer "),e.qZA())}function vs(n,i){1&n&&e._UZ(0,"span",39)}function Zs(n,i){1&n&&e._UZ(0,"span",40)}function ws(n,i){if(1&n&&(e.TgZ(0,"span",41),e._UZ(1,"fa-icon",42),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faEyeSlash)}}function As(n,i){if(1&n&&(e.TgZ(0,"span",43),e._UZ(1,"fa-icon",42),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faEye)}}const Ss=function(n){return{"max-width":n}};function Ls(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"div",33),e.YNc(2,vs,1,0,"span",34),e.YNc(3,Zs,1,0,"span",35),e.YNc(4,ws,2,1,"span",36),e.YNc(5,As,2,1,"span",37),e.TgZ(6,"span",38),e._uU(7),e.qZA()()()),2&n){const t=i.$implicit,a=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(6,Ss,a.screenSize===a.screenSizeEnum.XS?"10rem":a.screenSize===a.screenSizeEnum.MD?"15rem":"22rem")),e.xp6(1),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",!t.active),e.xp6(1),e.Q6J("ngIf",t.private),e.xp6(1),e.Q6J("ngIf",!t.private),e.xp6(2),e.Oqu(t.remote_alias||t.remote_pubkey)}}function ks(n,i){if(1&n&&(e.TgZ(0,"th",44),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Uptime (",t.timeUnit,")")}}function Fs(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",t.uptime_str," ")}}function Ns(n,i){1&n&&(e.TgZ(0,"th",44),e._uU(1,"Sats Sent "),e.qZA())}function qs(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",e.lcZ(3,1,t.total_satoshis_sent)," ")}}function Us(n,i){1&n&&(e.TgZ(0,"th",44),e._uU(1,"Sats Received "),e.qZA())}function Os(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",e.lcZ(3,1,t.total_satoshis_received)," ")}}function Rs(n,i){1&n&&(e.TgZ(0,"th",44),e._uU(1,"Local Balance (Sats) "),e.qZA())}function Is(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",e.lcZ(3,1,t.local_balance)," ")}}function Ms(n,i){1&n&&(e.TgZ(0,"th",44),e._uU(1,"Remote Balance (Sats) "),e.qZA())}function Ds(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",e.lcZ(3,1,t.remote_balance)," ")}}function Ps(n,i){1&n&&(e.TgZ(0,"th",46),e._uU(1,"Balance Score "),e.qZA())}function Js(n,i){if(1&n&&(e.TgZ(0,"td",47)(1,"div",48)(2,"mat-hint",49),e._uU(3),e.ALo(4,"number"),e.qZA()(),e._UZ(5,"mat-progress-bar",50),e.qZA()),2&n){const t=i.$implicit;e.xp6(3),e.Oqu(e.lcZ(4,2,t.balancedness||0)),e.xp6(2),e.s9C("value",t.local_balance&&t.local_balance>0?+t.local_balance/(+t.local_balance+ +t.remote_balance)*100:0)}}function Es(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",51)(1,"div",52)(2,"mat-select",53),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",54),e.NdJ("click",function(){return e.CHM(t),e.oxw().onChannelUpdate("all")}),e._uU(5,"Update Fee Policy"),e.qZA(),e.TgZ(6,"mat-option",54),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(7,"Download CSV"),e.qZA()()()()}}function Qs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onCircularRebalance(o)}),e._uU(1,"Circular Rebalance"),e.qZA()}}function Ys(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onLoopOut(o)}),e._uU(1,"Loop Out"),e.qZA()}}function Hs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",55)(1,"div",52)(2,"mat-select",56),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",54),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onChannelClick(u,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",54),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onViewRemotePolicy(s)}),e._uU(7,"View Remote Fee "),e.qZA(),e.TgZ(8,"mat-option",54),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onChannelUpdate(s)}),e._uU(9,"Update Fee Policy"),e.qZA(),e.YNc(10,Qs,2,0,"mat-option",57),e.YNc(11,Ys,2,0,"mat-option",57),e.TgZ(12,"mat-option",54),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onChannelClose(s)}),e._uU(13,"Close Channel"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(10),e.Q6J("ngIf",+t.versionsArr[0]>0||+t.versionsArr[1]>=9),e.xp6(1),e.Q6J("ngIf",t.selNode.swapServerUrl)}}function Bs(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No peers connected. Add a peer in order to open a channel."),e.qZA())}function Vs(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No channel available."),e.qZA())}function Gs(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting channels..."),e.qZA())}function zs(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Ws(n,i){if(1&n&&(e.TgZ(0,"td",58),e.YNc(1,Bs,2,0,"p",59),e.YNc(2,Vs,2,0,"p",59),e.YNc(3,Gs,2,0,"p",59),e.YNc(4,zs,2,1,"p",59),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const Xs=function(n){return{"display-none":n}};function $s(n,i){if(1&n&&e._UZ(0,"tr",60),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Xs,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function js(n,i){1&n&&e._UZ(0,"tr",61)}function Ks(n,i){1&n&&e._UZ(0,"tr",62)}const el=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},tl=function(){return["no_channel"]};let nl=(()=>{class n{constructor(t,a,o,s,u,g,U,x){var q,re,we,Ae;this.logger=t,this.store=a,this.lndEffects=o,this.commonService=s,this.rtlEffects=u,this.decimalPipe=g,this.loopService=U,this.router=x,this.timeUnit="mins:secs",this.userPersonaEnum=l.ol,this.selNode={},this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.versionsArr=[],this.faEye=y.Mdf,this.faEyeSlash=y.Aq,this.targetConf=6,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["remote_alias","local_balance","remote_balance","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["remote_alias","local_balance","remote_balance","balancedness","actions"]):(this.flgSticky=!0,this.displayedColumns=["remote_alias","uptime","total_satoshis_sent","total_satoshis_received","local_balance","remote_balance","balancedness","actions"]),this.selFilter=(null===(re=null===(q=this.router.getCurrentNavigation().extras)||void 0===q?void 0:q.state)||void 0===re?void 0:re.filter)?null===(Ae=null===(we=this.router.getCurrentNavigation().extras)||void 0===we?void 0:we.state)||void 0===Ae?void 0:Ae.filter:""}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t,this.information&&this.information.version&&(this.versionsArr=this.information.version.split("."))}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.numPeers=t.peers&&t.peers.length?t.peers.length:0}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.totalBalance=+t.blockchainBalance.total_balance}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.channelsData=this.calculateUptime(t.channels),this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}onViewRemotePolicy(t){this.store.dispatch((0,v.$A)({payload:{uiMessage:l.m6.GET_REMOTE_POLICY,channelID:t.chan_id.toString()+"/"+this.information.identity_pubkey}})),this.lndEffects.setLookup.pipe((0,V.q)(1)).subscribe(a=>{if(!a.fee_base_msat&&!a.fee_rate_milli_msat&&!a.time_lock_delta)return!1;const o=[[{key:"fee_base_msat",value:a.fee_base_msat,title:"Base Fees (mSats)",width:25,type:l.Gi.NUMBER},{key:"fee_rate_milli_msat",value:a.fee_rate_milli_msat,title:"Fee Rate (milli mSats)",width:25,type:l.Gi.NUMBER},{key:"fee_rate_milli_msat",value:a.fee_rate_milli_msat/1e4,title:"Fee Rate (%)",width:25,type:l.Gi.NUMBER,digitsInfo:"1.0-8"},{key:"time_lock_delta",value:a.time_lock_delta,title:"Time Lock Delta",width:25,type:l.Gi.NUMBER}]],s="Remote policy for Channel: "+(t.remote_alias||t.chan_id?t.remote_alias&&t.chan_id?t.remote_alias+" ("+t.chan_id+")":t.remote_alias?t.remote_alias:t.chan_id:t.channel_point);setTimeout(()=>{this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Remote Channel Policy",titleMessage:s,message:o}}}))},0)})}onCircularRebalance(t){this.store.dispatch((0,w.qR)({payload:{data:{message:{channels:this.channelsData,selChannel:t},component:ls}}}))}onChannelUpdate(t){"all"===t?(this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update All Channels",message:[],titleMessage:"Update fee policy for all channels",flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSat)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:1e3,width:32},{placeholder:"Fee Rate (mili mSat)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:1,min:1,width:32,hintFunction:this.percentHintFunction},{placeholder:"Time Lock Delta",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:40,width:32}]}}})),this.rtlEffects.closeConfirm.pipe((0,_.R)(this.unSubs[5])).subscribe(o=>{o&&this.store.dispatch((0,v.pW)({payload:{baseFeeMsat:o[0].inputValue,feeRate:o[1].inputValue,timeLockDelta:o[2].inputValue,chanPoint:"all"}}))})):(this.myChanPolicy={fee_base_msat:0,fee_rate_milli_msat:0,time_lock_delta:0},this.store.dispatch((0,v.$A)({payload:{uiMessage:l.m6.GET_CHAN_POLICY,channelID:t.chan_id.toString()}})),this.lndEffects.setLookup.pipe((0,V.q)(1)).subscribe(a=>{this.myChanPolicy=a.node1_pub===this.information.identity_pubkey?a.node1_policy:a.node2_pub===this.information.identity_pubkey?a.node2_policy:{fee_base_msat:0,fee_rate_milli_msat:0,time_lock_delta:0},this.logger.info(this.myChanPolicy);const o="Update fee policy for Channel: "+(t.remote_alias||t.chan_id?t.remote_alias&&t.chan_id?t.remote_alias+" ("+t.chan_id+")":t.remote_alias?t.remote_alias:t.chan_id:t.channel_point),s=[];setTimeout(()=>{this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Update Fee Policy",titleMessage:o,noBtnText:"Cancel",yesBtnText:"Update Channel",message:s,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSat)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:""===this.myChanPolicy.fee_base_msat?0:this.myChanPolicy.fee_base_msat,width:32},{placeholder:"Fee Rate (mili mSat)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:this.myChanPolicy.fee_rate_milli_msat,min:1,width:32,hintFunction:this.percentHintFunction},{placeholder:"Time Lock Delta",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:this.myChanPolicy.time_lock_delta,width:32}]}}}))},0)}),this.rtlEffects.closeConfirm.pipe((0,_.R)(this.unSubs[6])).subscribe(a=>{a&&this.store.dispatch((0,v.pW)({payload:{baseFeeMsat:a[0].inputValue,feeRate:a[1].inputValue,timeLockDelta:a[2].inputValue,chanPoint:t.channel_point}}))})),this.applyFilter()}onChannelClose(t){t.active&&this.store.dispatch((0,v.UR)()),this.store.dispatch((0,w.qR)({payload:{data:{channel:t,component:ys}}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{channel:t,showCopy:!0,component:xe}}}))}loadChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?1:-1),this.channels=new r.by([...t]),this.channels.filterPredicate=(a,o)=>((a.active?"active":"inactive")+(a.chan_id?a.chan_id.toLowerCase():"")+(a.remote_pubkey?a.remote_pubkey.toLowerCase():"")+(a.remote_alias?a.remote_alias.toLowerCase():"")+(a.capacity?a.capacity:"")+(a.local_balance?a.local_balance:"")+(a.remote_balance?a.remote_balance:"")+(a.total_satoshis_sent?a.total_satoshis_sent:"")+(a.total_satoshis_received?a.total_satoshis_received:"")+(a.commit_fee?a.commit_fee:"")+(a.private?"private":"public")).includes(o),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.channels.paginator=this.paginator,this.applyFilter(),this.logger.info(this.channels)}calculateUptime(t){let g=60,U=1,x=0;switch(t.forEach(q=>{q.uptime&&+q.uptime>x&&(x=+q.uptime)}),!0){case x<3600:this.timeUnit="Mins:Secs",g=60,U=1;break;case x>=3600&&x<86400:this.timeUnit="Hrs:Mins",g=3600,U=60;break;case x>=86400&&x<31536e3:this.timeUnit="Days:Hrs",g=86400,U=3600;break;case x>31536e3:this.timeUnit="Yrs:Days",g=31536e3,U=86400;break;default:this.timeUnit="Mins:Secs",g=60,U=1}return t.forEach(q=>{q.uptime_str=q.uptime?this.decimalPipe.transform(Math.floor(+q.uptime/g),"2.0-0")+":"+this.decimalPipe.transform(Math.round(+q.uptime%g/U),"2.0-0"):"---"}),t}onLoopOut(t){this.loopService.getLoopOutTermsAndQuotes(this.targetConf).pipe((0,_.R)(this.unSubs[7])).subscribe(a=>{this.store.dispatch((0,w.qR)({payload:{minHeight:"56rem",data:{channel:t,minQuote:a[0],maxQuote:a[1],direction:l.$I.LOOP_OUT,component:Oe.a}}}))})}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Open-channels")}percentHintFunction(t){return(t/1e4).toString()+"%"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(ee.l),e.Y36(O.v),e.Y36(oe.V),e.Y36(p.JJ),e.Y36(Re.W),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-open-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:39,vars:14,consts:[["fxLayout","column",1,"padding-gap-x"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","remote_alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","uptime"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","total_satoshis_sent"],["matColumnDef","total_satoshis_received"],["matColumnDef","local_balance"],["matColumnDef","remote_balance"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-2",4,"matHeaderCellDef"],["mat-cell","","class","pl-2",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","dot green","matTooltip","Active","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltip","Inactive","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Active","matTooltipPosition","right",1,"dot","green"],["matTooltip","Inactive","matTooltipPosition","right",1,"dot","yellow"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-2"],["mat-cell","",1,"pl-2"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["placeholder","Actions","tabindex","2",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3)(4,"input",4),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(5,"div",5),e.YNc(6,Ts,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,bs,2,0,"th",10),e.YNc(11,Ls,8,8,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,ks,2,1,"th",13),e.YNc(14,Fs,3,1,"td",11),e.BQk(),e.ynx(15,14),e.YNc(16,Ns,2,0,"th",13),e.YNc(17,qs,4,3,"td",11),e.BQk(),e.ynx(18,15),e.YNc(19,Us,2,0,"th",13),e.YNc(20,Os,4,3,"td",11),e.BQk(),e.ynx(21,16),e.YNc(22,Rs,2,0,"th",13),e.YNc(23,Is,4,3,"td",11),e.BQk(),e.ynx(24,17),e.YNc(25,Ms,2,0,"th",13),e.YNc(26,Ds,4,3,"td",11),e.BQk(),e.ynx(27,18),e.YNc(28,Ps,2,0,"th",19),e.YNc(29,Js,6,4,"td",20),e.BQk(),e.ynx(30,21),e.YNc(31,Es,8,0,"th",22),e.YNc(32,Hs,14,2,"td",23),e.BQk(),e.ynx(33,24),e.YNc(34,Ws,5,4,"td",25),e.BQk(),e.YNc(35,$s,1,3,"tr",26),e.YNc(36,js,1,0,"tr",27),e.YNc(37,Ks,1,0,"tr",28),e.qZA()(),e._UZ(38,"mat-paginator",29),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",(null==a.apiCallStatus?null:a.apiCallStatus.status)===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.channels)("ngClass",e.VKq(11,el,""!==a.errorMessage)),e.xp6(28),e.Q6J("matFooterRowDef",e.DdM(13,tl)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.Wh,d.yH,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,X.gM,M.BN,f.bx,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-remote_alias[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-remote_alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}@media only screen and (max-width: 75em){.mat-column-balancedness[_ngcontent-%COMP%]{flex:0 0 35%;width:35%}}@media only screen and (max-width: 56.25em){.mat-column-balancedness[_ngcontent-%COMP%]{flex:0 0 25%;width:25%}}.mat-column-uptime[_ngcontent-%COMP%], .mat-column-local_balance[_ngcontent-%COMP%], .mat-column-remote_balance[_ngcontent-%COMP%], .mat-column-total_satoshis_sent[_ngcontent-%COMP%], .mat-column-total_satoshis_received[_ngcontent-%COMP%]{flex:1 1 10%;width:10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 75em){.mat-column-uptime[_ngcontent-%COMP%], .mat-column-local_balance[_ngcontent-%COMP%], .mat-column-remote_balance[_ngcontent-%COMP%], .mat-column-total_satoshis_sent[_ngcontent-%COMP%], .mat-column-total_satoshis_received[_ngcontent-%COMP%]{white-space:unset;flex:1 1 25%;width:25%}}@media only screen and (max-width: 56.25em){.mat-column-uptime[_ngcontent-%COMP%], .mat-column-local_balance[_ngcontent-%COMP%], .mat-column-remote_balance[_ngcontent-%COMP%], .mat-column-total_satoshis_sent[_ngcontent-%COMP%], .mat-column-total_satoshis_received[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}}@media only screen and (max-width: 37.5em){.mat-column-uptime[_ngcontent-%COMP%], .mat-column-local_balance[_ngcontent-%COMP%], .mat-column-remote_balance[_ngcontent-%COMP%], .mat-column-total_satoshis_sent[_ngcontent-%COMP%], .mat-column-total_satoshis_received[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 56.25em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 90%}}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})();const al=["outputIdx"];function il(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Index for change output is required."),e.qZA())}function ol(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid index value."),e.qZA())}function sl(n,i){if(1&n&&(e.TgZ(0,"mat-option",29),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function ll(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Number of blocks is required."),e.qZA())}function rl(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",17)(1,"input",30,31),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().blocks=o}),e.qZA(),e.YNc(3,ll,2,0,"mat-error",20),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.blocks)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.blocks)}}function cl(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function ul(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",17)(1,"input",32,33),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().fees=o}),e.qZA(),e.YNc(3,cl,2,0,"mat-error",20),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.fees)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.fees)}}function pl(n,i){if(1&n&&(e.TgZ(0,"div",34),e._UZ(1,"fa-icon",13),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.bumpFeeError)}}let ml=(()=>{class n{constructor(t,a,o,s,u){this.dialogRef=t,this.data=a,this.logger=o,this.dataService=s,this.snackBar=u,this.transTypes=[...l.Dr],this.selTransType="2",this.blocks=null,this.fees=null,this.outputIndex=null,this.faCopy=y.kZ_,this.faInfoCircle=y.sqG,this.faExclamationTriangle=y.eHv,this.bumpFeeError="",this.unSubs=[new m.x,new m.x]}set payReq(t){t&&(this.outputIdx=t)}ngOnInit(){this.transTypes=this.transTypes.splice(1),this.bumpFeeChannel=this.data.pendingChannel;const t=this.bumpFeeChannel.channel.channel_point.split(":")||[];this.bumpFeeChannel.channel.txid_str=t[0]||(this.bumpFeeChannel.channel&&this.bumpFeeChannel.channel.channel_point?this.bumpFeeChannel.channel.channel_point:""),this.bumpFeeChannel.channel.output_index=+t[1]||null}onBumpFee(){return this.outputIndex===this.bumpFeeChannel.channel.output_index?(this.outputIdx.control.setErrors({pendingChannelOutputIndex:!0}),!0):!this.outputIndex&&0!==this.outputIndex||!("1"!==this.selTransType||this.blocks&&0!==this.blocks)||!("2"!==this.selTransType||this.fees&&0!==this.fees)||void this.dataService.bumpFee(this.bumpFeeChannel.channel.txid_str,this.outputIndex,this.blocks,this.fees).pipe((0,_.R)(this.unSubs[0])).subscribe({next:t=>{this.dialogRef.close(!1)},error:t=>{this.logger.error(t),this.bumpFeeError=t.message?t.message:t}})}onCopyID(t){this.snackBar.open("Transaction ID copied.")}resetData(){this.bumpFeeError="",this.selTransType="2",this.blocks=null,this.fees=null,this.outputIdx.control.setErrors(null)}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(N.mQ),e.Y36(j.D),e.Y36(te.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-bump-fee"]],viewQuery:function(t,a){if(1&t&&e.Gf(al,5),2&t){let o;e.iGM(o=e.CRH())&&(a.payReq=o.first)}},decls:48,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxLayout","column",1,"bordered-box","mb-1","p-2"],["fxLayoutAlign","start center",1,"pb-1","word-break"],["matSuffix","","rtlClipboard","","matTooltip","Copy transaction ID",1,"ml-1",3,"icon","payload","copied"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxFlex","100"],[1,"pl-1"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex.gt-sm","32","fxLayoutAlign","start end"],["matInput","","placeholder","Index for Change Output","type","number","tabindex","1","required","","name","outputIdx",3,"ngModel","step","min","ngModelChange"],["outputIdx","ngModel"],[4,"ngIf"],["fxFlex.gt-sm","32"],["tabindex","2",3,"value","valueChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex.gt-sm","32","fxLayoutAlign","start end",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center"],["mat-button","","color","primary","type","reset","tabindex","5","default","",1,"mr-1",3,"click"],["mat-button","","color","primary","type","submit","tabindex","6",3,"click"],[3,"value"],["matInput","","placeholder","Number of Blocks","type","number","name","blocks","required","","tabindex","3",3,"ngModel","step","min","ngModelChange"],["blcks","ngModel"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","fees","required","","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100",1,"alert","alert-danger","mt-1"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Bump Fee"),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return a.onClose()}),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7)(10,"div",8)(11,"p",9),e._uU(12),e.TgZ(13,"fa-icon",10),e.NdJ("copied",function(s){return a.onCopyID(s)}),e.qZA()(),e.TgZ(14,"div",11)(15,"div",12),e._UZ(16,"fa-icon",13),e.TgZ(17,"span",14),e._uU(18,"Bumping fee on pending open channels is an advanced feature, attempt it only if you are familiar with the functionality of Bitcoin transactions. "),e.TgZ(19,"div"),e._uU(20,"Before attempting fee bump ensure the following:"),e.qZA(),e.TgZ(21,"div",15),e._uU(22,"1: Use a Bitcoin block explorer to ensure that channel opening transaction is not confirmed."),e.qZA(),e.TgZ(23,"div",15),e._uU(24,"2: The channel opening transaction must have a sizable change output, which can be spent further. The fee cannot be bumped without the change output."),e.qZA(),e.TgZ(25,"div",15),e._uU(26,"3: Find the index value of the change output via a block explorer."),e.qZA(),e.TgZ(27,"div",15),e._uU(28,"4: Enter the index value of the change output in the form below and the desired fee rate."),e.qZA(),e.TgZ(29,"div",15),e._uU(30,"5: Upon successful fee bump, use your block explorer to track the child transaction in the mempool, which should be linked with the change output transaction."),e.qZA()()(),e.TgZ(31,"div",16)(32,"mat-form-field",17)(33,"input",18,19),e.NdJ("ngModelChange",function(s){return a.outputIndex=s}),e.qZA(),e.YNc(35,il,2,0,"mat-error",20),e.YNc(36,ol,2,0,"mat-error",20),e.qZA(),e.TgZ(37,"mat-form-field",21)(38,"mat-select",22),e.NdJ("valueChange",function(s){return a.selTransType=s})("selectionChange",function(){return a.blocks=null,a.fees=null}),e.YNc(39,sl,2,2,"mat-option",23),e.qZA()(),e.YNc(40,rl,4,4,"mat-form-field",24),e.YNc(41,ul,4,4,"mat-form-field",24),e.qZA(),e.YNc(42,pl,4,2,"div",25),e.qZA()(),e.TgZ(43,"div",26)(44,"button",27),e.NdJ("click",function(){return a.resetData()}),e._uU(45,"Clear"),e.qZA(),e.TgZ(46,"button",28),e.NdJ("click",function(){return a.onBumpFee()}),e._uU(47),e.qZA()()()()()()),2&t){const o=e.MAs(34);e.xp6(12),e.hij("Bump fee for channel point: ",null==a.bumpFeeChannel||null==a.bumpFeeChannel.channel?null:a.bumpFeeChannel.channel.channel_point," "),e.xp6(1),e.Q6J("icon",a.faCopy)("payload",null==a.bumpFeeChannel||null==a.bumpFeeChannel.channel?null:a.bumpFeeChannel.channel.txid_str),e.xp6(3),e.Q6J("icon",a.faInfoCircle),e.xp6(17),e.Q6J("ngModel",a.outputIndex)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",null==o.errors?null:o.errors.required),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.pendingChannelOutputIndex),e.xp6(2),e.Q6J("value",a.selTransType),e.xp6(1),e.Q6J("ngForOf",a.transTypes),e.xp6(1),e.Q6J("ngIf","1"===a.selTransType),e.xp6(1),e.Q6J("ngIf","2"===a.selTransType),e.xp6(1),e.Q6J("ngIf",""!==a.bumpFeeError),e.xp6(5),e.Oqu(""!==a.bumpFeeError?"Retry Bump Fee":"Bump Fee")}},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,b.dn,c._Y,c.JL,c.F,M.BN,f.R9,se.y,X.gM,f.KE,I.Nt,c.wV,c.qQ,c.Fj,$.q,c.Q7,c.JJ,c.On,p.O5,f.TO,R.gD,p.sg,Y.ey],styles:[""]}),n})();function dl(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function _l(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function hl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",37),e._uU(1," Peer "),e.qZA())}const me=function(n){return{"max-width":n}};function gl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",38),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(1),e.Oqu(t.channel.remote_alias)}}function fl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Commit Fee (Sats) "),e.qZA())}function Cl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.commit_fee))}}function xl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Commit Weight "),e.qZA())}function yl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.commit_weight))}}function Tl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Capacity (Sats)"),e.qZA())}function bl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.capacity))}}function vl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",41),e._uU(1,"Actions"),e.qZA())}function Zl(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-cell",42)(1,"div",43)(2,"mat-select",44),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",45),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onOpenClick(s)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",45),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onBumpFee(s)}),e._uU(7,"Bump Fee"),e.qZA()()()()}}function wl(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending channel."),e.qZA())}function Al(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending channels..."),e.qZA())}function Sl(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Ll(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,wl,2,0,"p",47),e.YNc(2,Al,2,0,"p",47),e.YNc(3,Sl,2,1,"p",47),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!t.pendingOpenChannels||!(null!=t.pendingOpenChannels&&t.pendingOpenChannels.data)||(null==t.pendingOpenChannels||null==t.pendingOpenChannels.data?null:t.pendingOpenChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!t.pendingOpenChannels||!(null!=t.pendingOpenChannels&&t.pendingOpenChannels.data)||(null==t.pendingOpenChannels||null==t.pendingOpenChannels.data?null:t.pendingOpenChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!t.pendingOpenChannels||!(null!=t.pendingOpenChannels&&t.pendingOpenChannels.data)||(null==t.pendingOpenChannels||null==t.pendingOpenChannels.data?null:t.pendingOpenChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const be=function(n){return{"display-none":n}};function kl(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,be,t.pendingOpenChannels&&(null==t.pendingOpenChannels?null:t.pendingOpenChannels.data)&&(null==t.pendingOpenChannels||null==t.pendingOpenChannels.data?null:t.pendingOpenChannels.data.length)>0))}}function Fl(n,i){1&n&&e._UZ(0,"mat-header-row")}function Nl(n,i){1&n&&e._UZ(0,"mat-row",49)}function ql(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function Ul(n,i){1&n&&(e.TgZ(0,"mat-header-cell",37),e._uU(1," Peer "),e.qZA())}function Ol(n,i){if(1&n&&(e.TgZ(0,"mat-cell",38),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(1),e.Oqu(t.channel.remote_alias)}}function Rl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Recovered Balance (Sats) "),e.qZA())}function Il(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.recovered_balance))}}function Ml(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Limbo Balance (Sats) "),e.qZA())}function Dl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.limbo_balance))}}function Pl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Capacity (Sats) "),e.qZA())}function Jl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.capacity))}}function El(n,i){1&n&&(e.TgZ(0,"mat-header-cell",50),e._uU(1,"Actions"),e.qZA())}function Ql(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-cell",51)(1,"button",52),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onForceClosingClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function Yl(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending channel."),e.qZA())}function Hl(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending channels..."),e.qZA())}function Bl(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Vl(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,Yl,2,0,"p",47),e.YNc(2,Hl,2,0,"p",47),e.YNc(3,Bl,2,1,"p",47),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!t.pendingForceClosingChannels||!(null!=t.pendingForceClosingChannels&&t.pendingForceClosingChannels.data)||(null==t.pendingForceClosingChannels||null==t.pendingForceClosingChannels.data?null:t.pendingForceClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!t.pendingForceClosingChannels||!(null!=t.pendingForceClosingChannels&&t.pendingForceClosingChannels.data)||(null==t.pendingForceClosingChannels||null==t.pendingForceClosingChannels.data?null:t.pendingForceClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!t.pendingForceClosingChannels||!(null!=t.pendingForceClosingChannels&&t.pendingForceClosingChannels.data)||(null==t.pendingForceClosingChannels||null==t.pendingForceClosingChannels.data?null:t.pendingForceClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}function Gl(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,be,t.pendingForceClosingChannels&&(null==t.pendingForceClosingChannels?null:t.pendingForceClosingChannels.data)&&(null==t.pendingForceClosingChannels||null==t.pendingForceClosingChannels.data?null:t.pendingForceClosingChannels.data.length)>0))}}function zl(n,i){1&n&&e._UZ(0,"mat-header-row")}function Wl(n,i){1&n&&e._UZ(0,"mat-row",49)}function Xl(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function $l(n,i){1&n&&(e.TgZ(0,"mat-header-cell",53),e._uU(1," Peer "),e.qZA())}function jl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",54),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(1),e.Oqu(t.channel.remote_alias)}}function Kl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Local Balance (Sats) "),e.qZA())}function er(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.local_balance))}}function tr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Remote Balance (Sats) "),e.qZA())}function nr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.remote_balance))}}function ar(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Capacity (Sats) "),e.qZA())}function ir(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.capacity))}}function or(n,i){1&n&&(e.TgZ(0,"mat-header-cell",50),e._uU(1,"Actions"),e.qZA())}function sr(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-cell",51)(1,"button",55),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onClosingClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function lr(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending channel."),e.qZA())}function rr(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending channels..."),e.qZA())}function cr(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function ur(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,lr,2,0,"p",47),e.YNc(2,rr,2,0,"p",47),e.YNc(3,cr,2,1,"p",47),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!t.pendingClosingChannels||!(null!=t.pendingClosingChannels&&t.pendingClosingChannels.data)||(null==t.pendingClosingChannels||null==t.pendingClosingChannels.data?null:t.pendingClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!t.pendingClosingChannels||!(null!=t.pendingClosingChannels&&t.pendingClosingChannels.data)||(null==t.pendingClosingChannels||null==t.pendingClosingChannels.data?null:t.pendingClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!t.pendingClosingChannels||!(null!=t.pendingClosingChannels&&t.pendingClosingChannels.data)||(null==t.pendingClosingChannels||null==t.pendingClosingChannels.data?null:t.pendingClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}function pr(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,be,t.pendingClosingChannels&&(null==t.pendingClosingChannels?null:t.pendingClosingChannels.data)&&(null==t.pendingClosingChannels||null==t.pendingClosingChannels.data?null:t.pendingClosingChannels.data.length)>0))}}function mr(n,i){1&n&&e._UZ(0,"mat-header-row")}function dr(n,i){1&n&&e._UZ(0,"mat-row",49)}function _r(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function hr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",53),e._uU(1," Peer "),e.qZA())}function gr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",54),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(1),e.Oqu(t.channel.remote_alias)}}function fr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Limbo Balance (Sats) "),e.qZA())}function Cr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij("",e.lcZ(2,1,t.limbo_balance)," ")}}function xr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Local Balance (Sats) "),e.qZA())}function yr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.local_balance))}}function Tr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Remote Balance (Sats) "),e.qZA())}function br(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.remote_balance))}}function vr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Capacity (Sats) "),e.qZA())}function Zr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.capacity))}}function wr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",50),e._uU(1,"Actions"),e.qZA())}function Ar(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-cell",51)(1,"button",56),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onWaitClosingClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function Sr(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending channel."),e.qZA())}function Lr(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending channels..."),e.qZA())}function kr(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Fr(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,Sr,2,0,"p",47),e.YNc(2,Lr,2,0,"p",47),e.YNc(3,kr,2,1,"p",47),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!t.pendingWaitClosingChannels||!(null!=t.pendingWaitClosingChannels&&t.pendingWaitClosingChannels.data)||(null==t.pendingWaitClosingChannels||null==t.pendingWaitClosingChannels.data?null:t.pendingWaitClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!t.pendingWaitClosingChannels||!(null!=t.pendingWaitClosingChannels&&t.pendingWaitClosingChannels.data)||(null==t.pendingWaitClosingChannels||null==t.pendingWaitClosingChannels.data?null:t.pendingWaitClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!t.pendingWaitClosingChannels||!(null!=t.pendingWaitClosingChannels&&t.pendingWaitClosingChannels.data)||(null==t.pendingWaitClosingChannels||null==t.pendingWaitClosingChannels.data?null:t.pendingWaitClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Nr=function(n){return{"py-0":!0,"display-none":n}};function qr(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Nr,t.pendingWaitClosingChannels&&(null==t.pendingWaitClosingChannels?null:t.pendingWaitClosingChannels.data)&&(null==t.pendingWaitClosingChannels||null==t.pendingWaitClosingChannels.data?null:t.pendingWaitClosingChannels.data.length)>0))}}function Ur(n,i){1&n&&e._UZ(0,"mat-header-row")}function Or(n,i){1&n&&e._UZ(0,"mat-row",49)}const de=function(n){return{"error-border bordered-box":n,"bordered-box":!0}},Rr=function(){return["no_pending_open"]},Ir=function(){return["no_pending_force_closing"]},Mr=function(){return["no_pending_closing"]},Dr=function(){return["no_pending_wait_closing"]};let Pr=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.commonService=o,this.selNode={},this.selectedFilter="",this.information={},this.pendingChannels={},this.displayedOpenColumns=["remote_alias","commit_fee","commit_weight","capacity","actions"],this.pendingOpenChannelsLength=0,this.displayedForceClosingColumns=["remote_alias","recovered_balance","limbo_balance","capacity","actions"],this.pendingForceClosingChannelsLength=0,this.displayedClosingColumns=["remote_alias","local_balance","remote_balance","capacity","actions"],this.pendingClosingChannelsLength=0,this.displayedWaitClosingColumns=["remote_alias","limbo_balance","local_balance","remote_balance","actions"],this.pendingWaitClosingChannelsLength=0,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.displayedOpenColumns=["remote_alias","actions"],this.displayedForceClosingColumns=["remote_alias","actions"],this.displayedClosingColumns=["remote_alias","actions"],this.displayedWaitClosingColumns=["remote_alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.displayedOpenColumns=["remote_alias","commit_fee","actions"],this.displayedForceClosingColumns=["remote_alias","limbo_balance","actions"],this.displayedClosingColumns=["remote_alias","remote_balance","actions"],this.displayedWaitClosingColumns=["remote_alias","limbo_balance","actions"]):(this.displayedOpenColumns=["remote_alias","commit_fee","commit_weight","capacity","actions"],this.displayedForceClosingColumns=["remote_alias","recovered_balance","limbo_balance","capacity","actions"],this.displayedClosingColumns=["remote_alias","local_balance","remote_balance","capacity","actions"],this.displayedWaitClosingColumns=["remote_alias","limbo_balance","local_balance","remote_balance","actions"])}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(C.ni).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.pendingChannels=t.pendingChannels,this.pendingChannels.pending_open_channels&&this.pendingChannels.pending_open_channels.length&&this.pendingChannels.pending_open_channels.length>0&&this.loadOpenChannelsTable(this.pendingChannels.pending_open_channels),this.pendingChannels.pending_force_closing_channels&&this.pendingChannels.pending_force_closing_channels.length&&this.pendingChannels.pending_force_closing_channels.length>0&&this.loadForceClosingChannelsTable(this.pendingChannels.pending_force_closing_channels),this.pendingChannels.pending_closing_channels&&this.pendingChannels.pending_closing_channels.length&&this.pendingChannels.pending_closing_channels.length>0&&this.loadClosingChannelsTable(this.pendingChannels.pending_closing_channels),this.pendingChannels.waiting_close_channels&&this.pendingChannels.waiting_close_channels.length&&this.pendingChannels.waiting_close_channels.length>0&&this.loadWaitClosingChannelsTable(this.pendingChannels.waiting_close_channels),this.logger.info(t)})}ngAfterViewInit(){this.pendingChannels.pending_open_channels&&this.pendingChannels.pending_open_channels.length&&this.pendingChannels.pending_open_channels.length>0&&this.loadOpenChannelsTable(this.pendingChannels.pending_open_channels),this.pendingChannels.pending_force_closing_channels&&this.pendingChannels.pending_force_closing_channels.length&&this.pendingChannels.pending_force_closing_channels.length>0&&this.loadForceClosingChannelsTable(this.pendingChannels.pending_force_closing_channels),this.pendingChannels.pending_closing_channels&&this.pendingChannels.pending_closing_channels.length&&this.pendingChannels.pending_closing_channels.length>0&&this.loadClosingChannelsTable(this.pendingChannels.pending_closing_channels),this.pendingChannels.waiting_close_channels&&this.pendingChannels.waiting_close_channels.length&&this.pendingChannels.waiting_close_channels.length>0&&this.loadWaitClosingChannelsTable(this.pendingChannels.waiting_close_channels)}onOpenClick(t){const a=JSON.parse(JSON.stringify(t,["commit_weight","confirmation_height","fee_per_kw","commit_fee"],2)),o=JSON.parse(JSON.stringify(t.channel,["remote_alias","channel_point","remote_balance","local_balance","remote_node_pub","capacity"],2)),s={};Object.assign(s,a,o),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Opening Channel Information",message:[[{key:"channel_point",value:s.channel_point,title:"Channel Point",width:100,type:l.Gi.STRING}],[{key:"remote_node_pub",value:s.remote_node_pub,title:"Peer Node Pubkey",width:100,type:l.Gi.STRING}],[{key:"remote_alias",value:s.remote_alias,title:"Peer Alias",width:100,type:l.Gi.STRING}],[{key:"capacity",value:s.capacity,title:"Capacity",width:25,type:l.Gi.NUMBER},{key:"confirmation_height",value:s.confirmation_height,title:"Confirmation Height",width:25,type:l.Gi.NUMBER},{key:"local_balance",value:s.local_balance,title:"Local Balance",width:25,type:l.Gi.NUMBER},{key:"remote_balance",value:s.remote_balance,title:"Remote Balance",width:25,type:l.Gi.NUMBER}],[{key:"fee_per_kw",value:s.fee_per_kw,title:"Fee/KW",width:25,type:l.Gi.NUMBER},{key:"commit_weight",value:s.commit_weight,title:"Commit Weight",width:25,type:l.Gi.NUMBER},{key:"commit_fee",value:s.commit_fee,title:"Commit Fee",width:50,type:l.Gi.NUMBER}]]}}}))}onBumpFee(t){this.store.dispatch((0,w.qR)({payload:{data:{pendingChannel:t,component:ml}}}))}onForceClosingClick(t){const a=JSON.parse(JSON.stringify(t,["closing_txid","limbo_balance","maturity_height","blocks_til_maturity","recovered_balance"],2)),o=JSON.parse(JSON.stringify(t.channel,["remote_alias","channel_point","remote_balance","local_balance","remote_node_pub","capacity"],2)),s={};Object.assign(s,a,o),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Force Closing Channel Information",message:[[{key:"closing_txid",value:s.closing_txid,title:"Closing Transaction ID",width:100,type:l.Gi.STRING}],[{key:"channel_point",value:s.channel_point,title:"Channel Point",width:100,type:l.Gi.STRING}],[{key:"remote_alias",value:s.remote_alias,title:"Peer Alias",width:25,type:l.Gi.STRING},{key:"remote_node_pub",value:s.remote_node_pub,title:"Peer Node Pubkey",width:75,type:l.Gi.STRING}],[{key:"capacity",value:s.capacity,title:"Capacity",width:25,type:l.Gi.NUMBER},{key:"limbo_balance",value:s.limbo_balance,title:"Limbo Balance",width:25,type:l.Gi.NUMBER},{key:"local_balance",value:s.local_balance,title:"Local Balance",width:25,type:l.Gi.NUMBER},{key:"remote_balance",value:s.remote_balance,title:"Remote Balance",width:25,type:l.Gi.NUMBER}],[{key:"maturity_height",value:s.maturity_height,title:"Maturity Height",width:25,type:l.Gi.NUMBER},{key:"blocks_til_maturity",value:s.blocks_til_maturity,title:"Blocks Till Maturity",width:25,type:l.Gi.NUMBER},{key:"recovered_balance",value:s.recovered_balance,title:"Recovered Balance",width:50,type:l.Gi.NUMBER}]]}}}))}onClosingClick(t){const a=JSON.parse(JSON.stringify(t,["closing_txid"],2)),o=JSON.parse(JSON.stringify(t.channel,["remote_alias","channel_point","remote_balance","local_balance","remote_node_pub","capacity"],2)),s={};Object.assign(s,a,o),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Closing Channel Information",message:[[{key:"closing_txid",value:s.closing_txid,title:"Closing Transaction ID",width:50,type:l.Gi.STRING}],[{key:"channel_point",value:s.channel_point,title:"Channel Point",width:100,type:l.Gi.STRING}],[{key:"remote_alias",value:s.remote_alias,title:"Peer Alias",width:25,type:l.Gi.STRING},{key:"remote_node_pub",value:s.remote_node_pub,title:"Peer Node Pubkey",width:75,type:l.Gi.STRING}],[{key:"capacity",value:s.capacity,title:"Capacity",width:25,type:l.Gi.NUMBER},{key:"local_balance",value:s.local_balance,title:"Local Balance",width:25,type:l.Gi.NUMBER},{key:"remote_balance",value:s.remote_balance,title:"Remote Balance",width:50,type:l.Gi.NUMBER}]]}}}))}onWaitClosingClick(t){const a=JSON.parse(JSON.stringify(t,["limbo_balance"],2)),o=JSON.parse(JSON.stringify(t.channel,["remote_alias","channel_point","remote_balance","local_balance","remote_node_pub","capacity"],2)),s=JSON.parse(JSON.stringify(t.commitments,["local_txid"],2)),u={};Object.assign(u,a,o,s),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Wait Closing Channel Information",message:[[{key:"local_txid",value:u.local_txid,title:"Transaction ID",width:100,type:l.Gi.STRING}],[{key:"channel_point",value:u.channel_point,title:"Channel Point",width:100,type:l.Gi.STRING}],[{key:"remote_alias",value:u.remote_alias,title:"Peer Alias",width:25,type:l.Gi.STRING},{key:"remote_node_pub",value:u.remote_node_pub,title:"Peer Node Pubkey",width:75,type:l.Gi.STRING}],[{key:"capacity",value:u.capacity,title:"Capacity",width:25,type:l.Gi.NUMBER},{key:"limbo_balance",value:u.limbo_balance,title:"Limbo Balance",width:25,type:l.Gi.NUMBER},{key:"local_balance",value:u.local_balance,title:"Local Balance",width:25,type:l.Gi.NUMBER},{key:"remote_balance",value:u.remote_balance,title:"Remote Balance",width:25,type:l.Gi.NUMBER}]]}}}))}loadOpenChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?-1:1),this.pendingOpenChannelsLength=t.length?t.length:0,this.pendingOpenChannels=new r.by([...t]),this.pendingOpenChannels.sort=this.sort,this.pendingOpenChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.pendingOpenChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.logger.info(this.pendingOpenChannels)}loadForceClosingChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?-1:1),this.pendingForceClosingChannelsLength=t.length?t.length:0,this.pendingForceClosingChannels=new r.by([...t]),this.pendingForceClosingChannels.sort=this.sort,this.pendingForceClosingChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.pendingForceClosingChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.logger.info(this.pendingForceClosingChannels)}loadClosingChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?-1:1),this.pendingClosingChannelsLength=t.length?t.length:0,this.pendingClosingChannels=new r.by([...t]),this.pendingClosingChannels.sort=this.sort,this.pendingClosingChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.pendingClosingChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.logger.info(this.pendingClosingChannels)}loadWaitClosingChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?-1:1),this.pendingWaitClosingChannelsLength=t.length?t.length:0,this.pendingWaitClosingChannels=new r.by([...t]),this.pendingWaitClosingChannels.sort=this.sort,this.pendingWaitClosingChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.pendingWaitClosingChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.logger.info(this.pendingWaitClosingChannels)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-pending-table"]],viewQuery:function(t,a){if(1&t&&e.Gf(Z.YE,5),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first)}},decls:121,vars:44,consts:[["fxLayout","column",1,"mb-2"],[1,"page-title"],["displayMode","flat",1,"mt-1"],["mode","indeterminate",4,"ngIf"],["fxLayout","column",1,"flat-expansion-panel"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","remote_alias"],["mat-sort-header","",4,"matHeaderCellDef"],[3,"ngStyle",4,"matCellDef"],["matColumnDef","commit_fee"],["fxLayoutAlign","end center","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","commit_weight"],["matColumnDef","capacity"],["matColumnDef","actions"],["fxLayoutAlign","end center","class","pl-3 pr-4",4,"matHeaderCellDef"],["fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_pending_open"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","","fxLayoutAlign","start center",3,"ngClass",4,"matFooterRowDef"],[4,"matHeaderRowDef"],["fxLayoutAlign","stretch stretch",4,"matRowDef","matRowDefColumns"],["mat-table","","matSort","",3,"dataSource","ngClass"],["matColumnDef","recovered_balance"],["matColumnDef","limbo_balance"],["fxLayoutAlign","end center","class","pl-4 pr-3",4,"matHeaderCellDef"],["fxLayoutAlign","end center","class","pl-4",4,"matCellDef"],["matColumnDef","no_pending_force_closing"],["class","pl-2","mat-sort-header","",4,"matHeaderCellDef"],["class","pl-2",3,"ngStyle",4,"matCellDef"],["matColumnDef","local_balance"],["matColumnDef","remote_balance"],["matColumnDef","no_pending_closing"],["matColumnDef","no_pending_wait_closing"],["mode","indeterminate"],["mat-sort-header",""],[3,"ngStyle"],["fxLayoutAlign","end center","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",1,"pl-3","pr-4"],["fxLayoutAlign","end center",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","","fxLayoutAlign","start center",3,"ngClass"],["fxLayoutAlign","stretch stretch"],["fxLayoutAlign","end center",1,"pl-4","pr-3"],["fxLayoutAlign","end center",1,"pl-4"],["mat-stroked-button","","color","primary","type","button","tabindex","2",3,"click"],["mat-sort-header","",1,"pl-2"],[1,"pl-2",3,"ngStyle"],["mat-stroked-button","","color","primary","type","button","tabindex","3",3,"click"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"span",1),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"mat-accordion",2),e.YNc(5,dl,1,0,"mat-progress-bar",3),e.TgZ(6,"mat-expansion-panel",4)(7,"mat-expansion-panel-header")(8,"mat-panel-title"),e._uU(9),e.qZA()(),e.TgZ(10,"div",5),e.YNc(11,_l,1,0,"mat-progress-bar",3),e.TgZ(12,"table",6,7),e.ynx(14,8),e.YNc(15,hl,2,0,"mat-header-cell",9),e.YNc(16,gl,2,4,"mat-cell",10),e.BQk(),e.ynx(17,11),e.YNc(18,fl,2,0,"mat-header-cell",12),e.YNc(19,Cl,3,3,"mat-cell",13),e.BQk(),e.ynx(20,14),e.YNc(21,xl,2,0,"mat-header-cell",12),e.YNc(22,yl,3,3,"mat-cell",13),e.BQk(),e.ynx(23,15),e.YNc(24,Tl,2,0,"mat-header-cell",12),e.YNc(25,bl,3,3,"mat-cell",13),e.BQk(),e.ynx(26,16),e.YNc(27,vl,2,0,"mat-header-cell",17),e.YNc(28,Zl,8,0,"mat-cell",18),e.BQk(),e.ynx(29,19),e.YNc(30,Ll,4,3,"td",20),e.BQk(),e.YNc(31,kl,1,3,"tr",21),e.YNc(32,Fl,1,0,"mat-header-row",22),e.YNc(33,Nl,1,0,"mat-row",23),e.qZA()()(),e.YNc(34,ql,1,0,"mat-progress-bar",3),e.TgZ(35,"mat-expansion-panel",4)(36,"mat-expansion-panel-header")(37,"mat-panel-title"),e._uU(38),e.qZA()(),e.TgZ(39,"div",5)(40,"table",24,7),e.ynx(42,8),e.YNc(43,Ul,2,0,"mat-header-cell",9),e.YNc(44,Ol,2,4,"mat-cell",10),e.BQk(),e.ynx(45,25),e.YNc(46,Rl,2,0,"mat-header-cell",12),e.YNc(47,Il,3,3,"mat-cell",13),e.BQk(),e.ynx(48,26),e.YNc(49,Ml,2,0,"mat-header-cell",12),e.YNc(50,Dl,3,3,"mat-cell",13),e.BQk(),e.ynx(51,15),e.YNc(52,Pl,2,0,"mat-header-cell",12),e.YNc(53,Jl,3,3,"mat-cell",13),e.BQk(),e.ynx(54,16),e.YNc(55,El,2,0,"mat-header-cell",27),e.YNc(56,Ql,3,0,"mat-cell",28),e.BQk(),e.ynx(57,29),e.YNc(58,Vl,4,3,"td",20),e.BQk(),e.YNc(59,Gl,1,3,"tr",21),e.YNc(60,zl,1,0,"mat-header-row",22),e.YNc(61,Wl,1,0,"mat-row",23),e.qZA()()(),e.YNc(62,Xl,1,0,"mat-progress-bar",3),e.TgZ(63,"mat-expansion-panel",4)(64,"mat-expansion-panel-header")(65,"mat-panel-title"),e._uU(66),e.qZA()(),e.TgZ(67,"div",5)(68,"table",24,7),e.ynx(70,8),e.YNc(71,$l,2,0,"mat-header-cell",30),e.YNc(72,jl,2,4,"mat-cell",31),e.BQk(),e.ynx(73,32),e.YNc(74,Kl,2,0,"mat-header-cell",12),e.YNc(75,er,3,3,"mat-cell",13),e.BQk(),e.ynx(76,33),e.YNc(77,tr,2,0,"mat-header-cell",12),e.YNc(78,nr,3,3,"mat-cell",13),e.BQk(),e.ynx(79,15),e.YNc(80,ar,2,0,"mat-header-cell",12),e.YNc(81,ir,3,3,"mat-cell",13),e.BQk(),e.ynx(82,16),e.YNc(83,or,2,0,"mat-header-cell",27),e.YNc(84,sr,3,0,"mat-cell",28),e.BQk(),e.ynx(85,34),e.YNc(86,ur,4,3,"td",20),e.BQk(),e.YNc(87,pr,1,3,"tr",21),e.YNc(88,mr,1,0,"mat-header-row",22),e.YNc(89,dr,1,0,"mat-row",23),e.qZA()()(),e.YNc(90,_r,1,0,"mat-progress-bar",3),e.TgZ(91,"mat-expansion-panel",4)(92,"mat-expansion-panel-header")(93,"mat-panel-title"),e._uU(94),e.qZA()(),e.TgZ(95,"div",5)(96,"table",24,7),e.ynx(98,8),e.YNc(99,hr,2,0,"mat-header-cell",30),e.YNc(100,gr,2,4,"mat-cell",31),e.BQk(),e.ynx(101,26),e.YNc(102,fr,2,0,"mat-header-cell",12),e.YNc(103,Cr,3,3,"mat-cell",13),e.BQk(),e.ynx(104,32),e.YNc(105,xr,2,0,"mat-header-cell",12),e.YNc(106,yr,3,3,"mat-cell",13),e.BQk(),e.ynx(107,33),e.YNc(108,Tr,2,0,"mat-header-cell",12),e.YNc(109,br,3,3,"mat-cell",13),e.BQk(),e.ynx(110,15),e.YNc(111,vr,2,0,"mat-header-cell",12),e.YNc(112,Zr,3,3,"mat-cell",13),e.BQk(),e.ynx(113,16),e.YNc(114,wr,2,0,"mat-header-cell",27),e.YNc(115,Ar,3,0,"mat-cell",28),e.BQk(),e.ynx(116,35),e.YNc(117,Fr,4,3,"td",20),e.BQk(),e.YNc(118,qr,1,3,"tr",21),e.YNc(119,Ur,1,0,"mat-header-row",22),e.YNc(120,Or,1,0,"mat-row",23),e.qZA()()()()()),2&t&&(e.xp6(2),e.hij("Total Limbo Balance: ",e.lcZ(3,30,a.pendingChannels.total_limbo_balance)," Sats"),e.xp6(3),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(4),e.hij("Pending Open (",a.pendingOpenChannelsLength,")"),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.pendingOpenChannels)("ngClass",e.VKq(32,de,""!==a.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(34,Rr)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedOpenColumns),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedOpenColumns),e.xp6(1),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(4),e.hij("Pending Force Closing (",a.pendingForceClosingChannelsLength,")"),e.xp6(2),e.Q6J("dataSource",a.pendingForceClosingChannels)("ngClass",e.VKq(35,de,""!==a.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(37,Ir)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedForceClosingColumns),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedForceClosingColumns),e.xp6(1),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(4),e.hij("Pending Closing (",a.pendingClosingChannelsLength,")"),e.xp6(2),e.Q6J("dataSource",a.pendingClosingChannels)("ngClass",e.VKq(38,de,""!==a.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(40,Mr)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedClosingColumns),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedClosingColumns),e.xp6(1),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(4),e.hij("Waiting Close (",a.pendingWaitClosingChannelsLength,")"),e.xp6(2),e.Q6J("dataSource",a.pendingWaitClosingChannels)("ngClass",e.VKq(41,de,""!==a.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(43,Dr)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedWaitClosingColumns),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedWaitClosingColumns))},directives:[d.xw,H.pp,p.O5,P.pW,H.ib,H.yz,H.yK,d.Wh,d.yH,Q.$V,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,k.lW],pipes:[p.JJ],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}tr.mat-footer-row[_ngcontent-%COMP%] td.mat-footer-cell[_ngcontent-%COMP%]{border-bottom:none}"]}),n})();function Jr(n,i){1&n&&e._UZ(0,"mat-progress-bar",27)}function Er(n,i){1&n&&(e.TgZ(0,"th",28),e._uU(1," Close Type "),e.qZA())}function Qr(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"div",30)(2,"mat-icon",31),e._uU(3,"info_outline"),e.qZA(),e._uU(4),e.qZA()()),2&n){const t=i.$implicit,a=e.oxw();e.xp6(2),e.Q6J("matTooltip",a.channelClosureType[t.close_type].tooltip),e.xp6(2),e.hij(" ",a.channelClosureType[t.close_type].name," ")}}function Yr(n,i){1&n&&(e.TgZ(0,"th",28),e._uU(1," Peer "),e.qZA())}const Hr=function(n){return{"max-width":n}};function Br(n,i){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,Hr,a.screenSize===a.screenSizeEnum.XS?"10rem":"20rem")),e.xp6(1),e.hij(" ",t.remote_alias," ")}}function Vr(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Capacity "),e.qZA())}function Gr(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,t.capacity)," ")}}function zr(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Close Height "),e.qZA())}function Wr(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,t.close_height)," ")}}function Xr(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Settled Balance "),e.qZA())}function $r(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,t.settled_balance)," ")}}function jr(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",35)(1,"div",36)(2,"mat-select",37),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",38),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function Kr(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",39)(1,"span",34)(2,"button",40),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onClosedChannelClick(u,o)}),e._uU(3,"View Info"),e.qZA()()()}}function ec(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No closed channel available."),e.qZA())}function tc(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting closed channels..."),e.qZA())}function nc(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function ac(n,i){if(1&n&&(e.TgZ(0,"td",41),e.YNc(1,ec,2,0,"p",42),e.YNc(2,tc,2,0,"p",42),e.YNc(3,nc,2,1,"p",42),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.closedChannels&&t.closedChannels.data)||(null==t.closedChannels||null==t.closedChannels.data?null:t.closedChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.closedChannels&&t.closedChannels.data)||(null==t.closedChannels||null==t.closedChannels.data?null:t.closedChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.closedChannels&&t.closedChannels.data)||(null==t.closedChannels||null==t.closedChannels.data?null:t.closedChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const ic=function(n){return{"display-none":n}};function oc(n,i){if(1&n&&e._UZ(0,"tr",43),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,ic,(null==t.closedChannels?null:t.closedChannels.data)&&(null==t.closedChannels||null==t.closedChannels.data?null:t.closedChannels.data.length)>0))}}function sc(n,i){1&n&&e._UZ(0,"tr",44)}function lc(n,i){1&n&&e._UZ(0,"tr",45)}const rc=function(n){return{"error-border":n,"overflow-auto":!0}},cc=function(){return["no_closed_channel"]};let uc=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.commonService=o,this.channelClosureType=l.HW,this.faHistory=y.qO$,this.displayedColumns=[],this.closedChannelsData=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unsub=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["remote_alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["close_type","remote_alias","settled_balance","actions"]):(this.flgSticky=!0,this.displayedColumns=["close_type","remote_alias","capacity","close_height","settled_balance","actions"])}ngOnInit(){this.store.select(C.P2).pipe((0,_.R)(this.unsub[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.closedChannelsData=t.closedChannels,this.closedChannelsData.length>0&&this.loadClosedChannelsTable(this.closedChannelsData),this.logger.info(t)})}ngAfterViewInit(){this.closedChannelsData.length>0&&this.loadClosedChannelsTable(this.closedChannelsData)}applyFilter(){this.closedChannels.filter=this.selFilter.trim().toLowerCase()}onClosedChannelClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Closed Channel Information",message:[[{key:"close_type",value:this.channelClosureType[t.close_type].name,title:"Close Type",width:30,type:l.Gi.STRING},{key:"settled_balance",value:t.settled_balance,title:"Settled Balance",width:30,type:l.Gi.NUMBER},{key:"time_locked_balance",value:t.time_locked_balance,title:"Time Locked Balance",width:40,type:l.Gi.NUMBER}],[{key:"chan_id",value:t.chan_id,title:"Channel ID",width:30},{key:"capacity",value:t.capacity,title:"Capacity",width:30,type:l.Gi.NUMBER},{key:"close_height",value:t.close_height,title:"Close Height",width:40,type:l.Gi.NUMBER}],[{key:"remote_alias",value:t.remote_alias,title:"Peer Alias",width:30},{key:"remote_pubkey",value:t.remote_pubkey,title:"Peer Public Key",width:70}],[{key:"channel_point",value:t.channel_point,title:"Channel Point",width:100}],[{key:"closing_tx_hash",value:t.closing_tx_hash,title:"Closing Transaction Hash",width:100,type:l.Gi.STRING}]]}}}))}loadClosedChannelsTable(t){this.closedChannels=new r.by([...t]),this.closedChannels.sort=this.sort,this.closedChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.closedChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.closedChannels.paginator=this.paginator,this.applyFilter(),this.logger.info(this.closedChannels)}onDownloadCSV(){this.closedChannels.data&&this.closedChannels.data.length>0&&this.commonService.downloadFile(this.closedChannels.data,"Closed-channels")}ngOnDestroy(){this.unsub.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-closed-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:33,vars:14,consts:[["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","close_type"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","remote_alias"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","capacity"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","close_height"],["matColumnDef","settled_balance"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["matColumnDef","no_closed_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row","fxLayoutAlign","start center"],[1,"info-icon","info-icon-text",3,"matTooltip"],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3)(4,"input",4),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(5,"div",5),e.YNc(6,Jr,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,Er,2,0,"th",10),e.YNc(11,Qr,5,2,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,Yr,2,0,"th",10),e.YNc(14,Br,2,4,"td",13),e.BQk(),e.ynx(15,14),e.YNc(16,Vr,2,0,"th",15),e.YNc(17,Gr,4,3,"td",11),e.BQk(),e.ynx(18,16),e.YNc(19,zr,2,0,"th",15),e.YNc(20,Wr,4,3,"td",11),e.BQk(),e.ynx(21,17),e.YNc(22,Xr,2,0,"th",15),e.YNc(23,$r,4,3,"td",11),e.BQk(),e.ynx(24,18),e.YNc(25,jr,6,0,"th",19),e.YNc(26,Kr,4,0,"td",20),e.BQk(),e.ynx(27,21),e.YNc(28,ac,4,3,"td",22),e.BQk(),e.YNc(29,oc,1,3,"tr",23),e.YNc(30,sc,1,0,"tr",24),e.YNc(31,lc,1,0,"tr",25),e.qZA()(),e._UZ(32,"mat-paginator",26),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.closedChannels)("ngClass",e.VKq(11,rc,""!==a.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(13,cc)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.Wh,d.yH,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,K.Hw,X.gM,p.PC,S.Zl,R.gD,R.$L,Y.ey,k.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-close_type[_ngcontent-%COMP%]{flex:0 0 16%;min-width:5rem}.mat-column-remote_alias[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function pc(n,i){1&n&&e._UZ(0,"mat-progress-bar",27)}function mc(n,i){1&n&&(e.TgZ(0,"th",28),e._uU(1,"Amount (Sats)"),e.qZA())}function dc(n,i){if(1&n&&(e.TgZ(0,"span",33),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,null==t?null:t.amount)," ")}}function _c(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,dc,3,3,"span",32),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function hc(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",30),e._uU(2),e.qZA(),e.YNc(3,_c,2,1,"span",31),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" Active HTLCs: ",null==t||null==t.pending_htlcs?null:t.pending_htlcs.length," "),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function gc(n,i){1&n&&(e.TgZ(0,"th",28),e._uU(1,"Alias/Incoming"),e.qZA())}function fc(n,i){if(1&n&&(e.TgZ(0,"span",30),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.incoming?"Yes":"No"," ")}}function Cc(n,i){if(1&n&&(e.ynx(0),e.YNc(1,fc,2,1,"span",34),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function xc(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",30),e._uU(2),e.qZA(),e.YNc(3,Cc,2,1,"ng-container",31),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(null==t?null:t.remote_alias),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function yc(n,i){1&n&&(e.TgZ(0,"th",35)(1,"span",36),e._uU(2,"Expiration Height"),e.qZA()())}function Tc(n,i){if(1&n&&(e.TgZ(0,"span",36),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,null==t?null:t.expiration_height,"1.0-0")," ")}}function bc(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Tc,3,4,"span",37),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function vc(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",36),e._uU(2),e.qZA(),e.YNc(3,bc,2,1,"span",31),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(" "),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function Zc(n,i){1&n&&(e.TgZ(0,"th",38)(1,"span",36),e._uU(2,"Hash Lock"),e.qZA()())}function wc(n,i){if(1&n&&(e.TgZ(0,"span",36),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.hash_lock," ")}}function Ac(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,wc,2,1,"span",37),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function Sc(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",36),e._uU(2),e.qZA(),e.YNc(3,Ac,2,1,"span",31),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(" "),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function Lc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",40)(1,"div",41)(2,"mat-select",42),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",43),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function kc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",45)(1,"button",48),e.NdJ("click",function(){const s=e.CHM(t).$implicit,u=e.oxw(2).$implicit;return e.oxw().onHTLCClick(s,u)}),e._uU(2),e.qZA()()}if(2&n){const t=i.index;e.xp6(2),e.hij("View ",t+1,"")}}function Fc(n,i){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,kc,3,1,"div",47),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function Nc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",44)(1,"span",45)(2,"button",46),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return s.is_expanded=!s.is_expanded}),e._uU(3),e.qZA()(),e.YNc(4,Fc,2,1,"div",31),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(3),e.Oqu(t.is_expanded?"Hide":"Show"),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function qc(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No active htlc available."),e.qZA())}function Uc(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting active htlcs..."),e.qZA())}function Oc(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Rc(n,i){if(1&n&&(e.TgZ(0,"td",49),e.YNc(1,qc,2,0,"p",31),e.YNc(2,Uc,2,0,"p",31),e.YNc(3,Oc,2,1,"p",31),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Ic=function(n){return{"display-none":n}};function Mc(n,i){if(1&n&&e._UZ(0,"tr",50),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Ic,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Dc(n,i){1&n&&e._UZ(0,"tr",51)}function Pc(n,i){1&n&&e._UZ(0,"tr",52)}const Jc=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Ec=function(){return["no_channel"]};let Qc=(()=>{class n{constructor(t,a,o){this.logger=t,this.commonService=a,this.store=o,this.channelsJSONArr=[],this.displayedColumns=[],this.htlcColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["amount","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["amount","incoming","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["amount","incoming","expiration_height","actions"]):(this.flgSticky=!0,this.displayedColumns=["amount","incoming","expiration_height","hash_lock","actions"])}ngOnInit(){this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.channelsJSONArr=t.channels.filter(a=>a.pending_htlcs&&a.pending_htlcs.length>0)||[],this.loadHTLCsTable(this.channelsJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.loadHTLCsTable(this.channelsJSONArr)}onHTLCClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"HTLC Information",message:[[{key:"remote_alias",value:a.remote_alias,title:"Alias",width:100,type:l.Gi.STRING}],[{key:"amount",value:t.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER},{key:"incoming",value:t.incoming?"Yes":"No",title:"Incoming",width:50,type:l.Gi.STRING}],[{key:"expiration_height",value:t.expiration_height,title:"Expiration Height",width:50,type:l.Gi.NUMBER},{key:"hash_lock",value:t.hash_lock,title:"Hash Lock",width:50,type:l.Gi.STRING}]]}}}))}onChannelClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{channel:t,showCopy:!0,component:xe}}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}loadHTLCsTable(t){this.channels=new r.by(t?[...t]:[]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(a,o)=>{switch(o){case"amount":return this.commonService.sortByKey(a.pending_htlcs,o,"number",this.sort.direction),a.pending_htlcs&&a.pending_htlcs.length?a.pending_htlcs.length:null;case"incoming":return this.commonService.sortByKey(a.pending_htlcs,o,"boolean",this.sort.direction),a.remote_alias?a.remote_alias:a.remote_pubkey?a.remote_pubkey:null;case"expiration_height":case"hash_lock":return this.commonService.sortByKey(a.pending_htlcs,o,"number",this.sort.direction),a;default:return a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null}},this.channels.paginator=this.paginator,this.channels.filterPredicate=(a,o)=>((a.remote_alias?a.remote_alias.toLowerCase():"")+a.pending_htlcs.map(u=>JSON.stringify(u)+(u.incoming?"yes":"no"))).includes(o),this.applyFilter()}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.flattenHTLCs(),"ActiveHTLCs")}flattenHTLCs(){return JSON.parse(JSON.stringify(this.channels.data)).reduce((o,s)=>o.concat(s.pending_htlcs?s.pending_htlcs:s),[])}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-active-htlcs-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("HTLCs")}])],decls:30,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","incoming"],["matColumnDef","expiration_height"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","hash_lock"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pl-3 htlc-row-span",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-2",4,"matHeaderCellDef"],["mat-cell","","class","px-2",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayoutAlign","start center",1,"htlc-row-span"],[4,"ngIf"],["fxLayoutAlign","start center","class","htlc-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"htlc-row-span","pl-3"],["fxLayoutAlign","start center","class","htlc-row-span",4,"ngFor","ngForOf"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center",1,"htlc-row-span"],["fxLayoutAlign","end center","class","htlc-row-span",4,"ngFor","ngForOf"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pl-3","htlc-row-span"],["mat-cell","",1,"pl-3"],["mat-header-cell","",1,"px-2"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","",1,"px-2"],["fxLayoutAlign","end center"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-htlc-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-htlc-info",3,"click"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3)(4,"input",4),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(5,"div",5),e.YNc(6,pc,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,mc,2,0,"th",10),e.YNc(11,hc,4,2,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,gc,2,0,"th",10),e.YNc(14,xc,4,2,"td",11),e.BQk(),e.ynx(15,13),e.YNc(16,yc,3,0,"th",14),e.YNc(17,vc,4,2,"td",11),e.BQk(),e.ynx(18,15),e.YNc(19,Zc,3,0,"th",16),e.YNc(20,Sc,4,2,"td",17),e.BQk(),e.ynx(21,18),e.YNc(22,Lc,6,0,"th",19),e.YNc(23,Nc,5,2,"td",20),e.BQk(),e.ynx(24,21),e.YNc(25,Rc,4,3,"td",22),e.BQk(),e.YNc(26,Mc,1,3,"tr",23),e.YNc(27,Dc,1,0,"tr",24),e.YNc(28,Pc,1,0,"tr",25),e.qZA()(),e._UZ(29,"mat-paginator",26),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.channels)("ngClass",e.VKq(11,Jc,""!==a.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(13,Ec)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.Wh,d.yH,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.sg,R.gD,R.$L,Y.ey,k.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-amount[_ngcontent-%COMP%], .mat-column-expiration_height[_ngcontent-%COMP%]{flex:0 0 30%;width:30%}.mat-column-incoming[_ngcontent-%COMP%], .mat-column-hash_lock[_ngcontent-%COMP%]{flex:0 0 25%;width:25%;text-overflow:ellipsis}.htlc-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .btn-htlc-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-actions[_ngcontent-%COMP%] .btn-htlc-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}"]}),n})();function Yc(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Wallet password is required."),e.qZA())}let Hc=(()=>{class n{constructor(t){this.store=t,this.walletPassword=""}ngOnInit(){this.walletPassword=""}onUnlockWallet(){if(!this.walletPassword)return!0;this.store.dispatch((0,v.xG)({payload:{pwd:window.btoa(this.walletPassword)}}))}resetData(){this.walletPassword=""}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-unlock-wallet"]],decls:12,vars:2,consts:[["fxLayout","column",1,"padding-gap","mb-2"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between"],["fxFlex","100","fxLayoutAlign","start"],["autoFocus","","matInput","","type","password","placeholder","Password","name","walletPassword","tabindex","1","required","",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","3",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"form",1)(2,"mat-form-field",2)(3,"input",3),e.NdJ("ngModelChange",function(s){return a.walletPassword=s}),e.qZA(),e.TgZ(4,"mat-hint"),e._uU(5,"Enter Wallet Password"),e.qZA(),e.YNc(6,Yc,2,0,"mat-error",4),e.qZA(),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return a.resetData()}),e._uU(9,"Clear Field"),e.qZA(),e.TgZ(10,"button",7),e.NdJ("click",function(){return a.onUnlockWallet()}),e._uU(11,"Unlock Wallet"),e.qZA()()()()),2&t&&(e.xp6(3),e.Q6J("ngModel",a.walletPassword),e.xp6(3),e.Q6J("ngIf",!a.walletPassword))},directives:[d.xw,c._Y,c.JL,c.F,d.Wh,f.KE,d.yH,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,f.bx,p.O5,f.TO,k.lW],styles:[""]}),n})();var Bc=h(1555);function Vc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"form",4)(2,"div",5),e._uU(3,"Warning: Your connection is unsecure, it's not safe to generate private keys over this connection.Are you sure you want to proceed?"),e.qZA(),e.TgZ(4,"div",6)(5,"button",7),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.proceed=!1,o.warnRes=!0}),e._uU(6,"Do Not Proceed"),e.qZA(),e.TgZ(7,"button",8),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.proceed=!0,o.warnRes=!0}),e._uU(8,"Proceed"),e.qZA()()()()}}function Gc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",9)(1,"div",10),e._uU(2,"Please re-configure & re-start RTL after securing your LND connction. You can close this window now."),e.qZA(),e.TgZ(3,"div",6)(4,"button",11),e.NdJ("click",function(){return e.CHM(t),e.oxw().warnRes=!1}),e._uU(5,"Go Back"),e.qZA()()()}}function zc(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Password is required."),e.qZA())}function Wc(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Password must be at least 8 characters in length."),e.qZA())}function Xc(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Confirm password is required."),e.qZA())}function $c(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Confirm password must be at least 8 characters in length."),e.qZA())}function jc(n,i){1&n&&(e.TgZ(0,"div",41)(1,"mat-icon",42),e._uU(2,"cancel"),e.qZA(),e._uU(3,"Passwords do not match. "),e.qZA())}function Kc(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Cipher seed is required."),e.qZA())}function e1(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid Cipher. Enter comma separated 24 words cipher seed."),e.qZA())}function t1(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Passphrase is required."),e.qZA())}function n1(n,i){1&n&&(e.TgZ(0,"mat-icon"),e._uU(1,"vpn_key"),e.qZA())}function a1(n,i){1&n&&(e.TgZ(0,"mat-icon"),e._uU(1,"swap_calls"),e.qZA())}function i1(n,i){1&n&&(e.TgZ(0,"mat-icon"),e._uU(1,"fingerprint"),e.qZA())}function o1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-vertical-stepper",12,13)(2,"mat-step",14)(3,"form",15)(4,"mat-form-field",16),e._UZ(5,"input",17),e.TgZ(6,"mat-hint"),e._uU(7,"Enter Wallet Password"),e.qZA(),e.YNc(8,zc,2,0,"mat-error",1),e.YNc(9,Wc,2,0,"mat-error",1),e.qZA(),e.TgZ(10,"mat-form-field",16),e._UZ(11,"input",18),e.TgZ(12,"mat-hint"),e._uU(13,"Confirm Wallet Password"),e.qZA(),e.YNc(14,Xc,2,0,"mat-error",1),e.YNc(15,$c,2,0,"mat-error",1),e.qZA(),e.YNc(16,jc,4,0,"div",19),e.TgZ(17,"div",20)(18,"button",21),e._uU(19,"Next"),e.qZA()()()(),e.TgZ(20,"mat-step",22)(21,"form",23)(22,"div",24)(23,"mat-slide-toggle",25),e._uU(24,"Existing Cipher"),e.qZA(),e.TgZ(25,"mat-form-field",26),e._UZ(26,"input",27),e.TgZ(27,"mat-hint"),e._uU(28,"Cipher Seed"),e.qZA(),e.YNc(29,Kc,2,0,"mat-error",1),e.YNc(30,e1,2,0,"mat-error",1),e.qZA()(),e.TgZ(31,"div",28)(32,"button",29),e._uU(33,"Back"),e.qZA(),e.TgZ(34,"button",30),e._uU(35,"Next"),e.qZA()()()(),e.TgZ(36,"mat-step",31)(37,"form",23)(38,"div",24)(39,"mat-slide-toggle",32),e._uU(40,"Existing Passphrase"),e.qZA(),e.TgZ(41,"mat-form-field",33),e._UZ(42,"input",34),e.TgZ(43,"mat-hint"),e._uU(44,"Enter Passphrase"),e.qZA(),e.YNc(45,t1,2,0,"mat-error",1),e.qZA()(),e.TgZ(46,"div",28)(47,"button",35),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(48,"Clear"),e.qZA(),e.TgZ(49,"button",36),e._uU(50,"Back"),e.qZA(),e.TgZ(51,"button",37),e.NdJ("click",function(){return e.CHM(t),e.oxw().onInitWallet()}),e._uU(52,"Initialize Wallet"),e.qZA()()()(),e.YNc(53,n1,2,0,"ng-template",38),e.YNc(54,a1,2,0,"ng-template",39),e.YNc(55,i1,2,0,"ng-template",40),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("linear",!0),e.xp6(2),e.Q6J("stepControl",t.passwordFormGroup),e.xp6(1),e.Q6J("formGroup",t.passwordFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.passwordFormGroup.controls.initWalletPassword.errors?null:t.passwordFormGroup.controls.initWalletPassword.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.passwordFormGroup.controls.initWalletPassword.errors?null:t.passwordFormGroup.controls.initWalletPassword.errors.minlength),e.xp6(5),e.Q6J("ngIf",null==t.passwordFormGroup.controls.initWalletConfirmPassword.errors?null:t.passwordFormGroup.controls.initWalletConfirmPassword.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.passwordFormGroup.controls.initWalletConfirmPassword.errors?null:t.passwordFormGroup.controls.initWalletConfirmPassword.errors.minlength),e.xp6(1),e.Q6J("ngIf",(null==t.passwordFormGroup.errors?null:t.passwordFormGroup.errors.unmatchedPasswords)&&(t.passwordFormGroup.controls.initWalletPassword.touched||t.passwordFormGroup.controls.initWalletPassword.dirty)&&(t.passwordFormGroup.controls.initWalletConfirmPassword.touched||t.passwordFormGroup.controls.initWalletConfirmPassword.dirty)),e.xp6(4),e.Q6J("stepControl",t.cipherFormGroup),e.xp6(1),e.Q6J("formGroup",t.cipherFormGroup),e.xp6(2),e.Q6J("labelPosition","before"),e.xp6(6),e.Q6J("ngIf",null==t.cipherFormGroup.controls.cipherSeed.errors?null:t.cipherFormGroup.controls.cipherSeed.errors.required),e.xp6(1),e.Q6J("ngIf",!(null!=t.cipherFormGroup.controls.cipherSeed.errors&&t.cipherFormGroup.controls.cipherSeed.errors.required)&&(null==t.cipherFormGroup.controls.cipherSeed.errors?null:t.cipherFormGroup.controls.cipherSeed.errors.invalidCipher)),e.xp6(6),e.Q6J("stepControl",t.passphraseFormGroup),e.xp6(1),e.Q6J("formGroup",t.passphraseFormGroup),e.xp6(2),e.Q6J("labelPosition","before"),e.xp6(6),e.Q6J("ngIf",null==t.passphraseFormGroup.controls.passphrase.errors?null:t.passphraseFormGroup.controls.passphrase.errors.required)}}function s1(n,i){if(1&n&&(e.TgZ(0,"span",48),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function l1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"form",4)(2,"div",43),e._uU(3,"YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET!"),e.qZA(),e.TgZ(4,"div",44),e.YNc(5,s1,2,1,"span",45),e.qZA(),e.TgZ(6,"div",46),e._uU(7,"Wallet initialization is done."),e.qZA(),e.TgZ(8,"div",46),e._uU(9,"The node will be usable only after LND has synced completely with the network."),e.qZA(),e.TgZ(10,"div",46),e._uU(11,"Click continue only after writing down the seed."),e.qZA(),e.TgZ(12,"div",6)(13,"button",47),e.NdJ("click",function(){return e.CHM(t),e.oxw().onGoToHome()}),e._uU(14,"Go To Home"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(5),e.Q6J("ngForOf",t.genSeedResponse)}}function r1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"form",4)(2,"div",46),e._uU(3,"Something went wrong! Unable to initialize wallet!"),e.qZA(),e.TgZ(4,"div",6)(5,"button",49),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(6,"Restart"),e.qZA()()()()}}function c1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"form",4)(2,"div",46),e._uU(3,"Wallet recovery is done."),e.qZA(),e.TgZ(4,"div",46),e._uU(5,"The node will be usable only after LND has synced completely with the network."),e.qZA(),e.TgZ(6,"div",6)(7,"button",50),e.NdJ("click",function(){return e.CHM(t),e.oxw().onGoToHome()}),e._uU(8,"Go To Home"),e.qZA()()()()}}function u1(n){const i=n.get("initWalletPassword"),t=n.get("initWalletConfirmPassword");return i&&t&&i.value!==t.value?{unmatchedPasswords:!0}:null}function p1(n){const i=n.value.toString().trim().split(",")||[];return i&&24!==i.length?{invalidCipher:!0}:null}let m1=(()=>{class n{constructor(t,a,o){this.store=t,this.formBuilder=a,this.lndEffects=o,this.insecureLND=!1,this.genSeedResponse=[],this.initWalletResponse="",this.proceed=!0,this.warnRes=!1,this.unsubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.passwordFormGroup=this.formBuilder.group({initWalletPassword:["",[c.kI.required,c.kI.minLength(8)]],initWalletConfirmPassword:["",[c.kI.required,c.kI.minLength(8)]]},{validators:u1}),this.cipherFormGroup=this.formBuilder.group({existingCipher:[!1],cipherSeed:[{value:"",disabled:!0},[p1]]}),this.passphraseFormGroup=this.formBuilder.group({enterPassphrase:[!1],passphrase:[{value:"",disabled:!0}]}),this.cipherFormGroup.controls.existingCipher.valueChanges.pipe((0,_.R)(this.unsubs[0])).subscribe(t=>{t?(this.cipherFormGroup.controls.cipherSeed.setValue(""),this.cipherFormGroup.controls.cipherSeed.enable()):(this.cipherFormGroup.controls.cipherSeed.setValue(""),this.cipherFormGroup.controls.cipherSeed.disable())}),this.passphraseFormGroup.controls.enterPassphrase.valueChanges.pipe((0,_.R)(this.unsubs[1])).subscribe(t=>{t?(this.passphraseFormGroup.controls.passphrase.setValue(""),this.passphraseFormGroup.controls.passphrase.enable()):(this.passphraseFormGroup.controls.passphrase.setValue(""),this.passphraseFormGroup.controls.passphrase.disable())}),this.insecureLND=!window.location.protocol.includes("https:"),this.lndEffects.initWalletRes.pipe((0,_.R)(this.unsubs[2])).subscribe(t=>{this.initWalletResponse=t}),this.lndEffects.genSeedResponse.pipe((0,_.R)(this.unsubs[3])).subscribe(t=>{this.genSeedResponse=t,this.store.dispatch((0,v.y2)(this.passphraseFormGroup.controls.enterPassphrase.value?{payload:{pwd:window.btoa(this.passwordFormGroup.controls.initWalletPassword.value),cipher:this.genSeedResponse,passphrase:window.btoa(this.passphraseFormGroup.controls.passphrase.value)}}:{payload:{pwd:window.btoa(this.passwordFormGroup.controls.initWalletPassword.value),cipher:this.genSeedResponse}}))})}onInitWallet(){if(this.passwordFormGroup.invalid||this.cipherFormGroup.invalid||this.passphraseFormGroup.invalid)return!0;if(this.cipherFormGroup.controls.existingCipher.value){const t=this.cipherFormGroup.controls.cipherSeed.value.toString().trim().split(",");this.store.dispatch((0,v.y2)(this.passphraseFormGroup.controls.enterPassphrase.value?{payload:{pwd:window.btoa(this.passwordFormGroup.controls.initWalletPassword.value),cipher:t,passphrase:window.btoa(this.passphraseFormGroup.controls.passphrase.value)}}:{payload:{pwd:window.btoa(this.passwordFormGroup.controls.initWalletPassword.value),cipher:t}}))}else this.store.dispatch((0,v.fu)(this.passphraseFormGroup.controls.enterPassphrase.value?{payload:window.btoa(this.passphraseFormGroup.controls.passphrase.value)}:{payload:""}))}onGoToHome(){setTimeout(()=>{this.store.dispatch((0,w.tw)()),this.store.dispatch((0,v.sQ)({payload:{loadPage:"HOME"}}))},1e3)}resetData(){this.genSeedResponse=[],this.initWalletResponse=""}ngOnDestroy(){this.unsubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(c.qu),e.Y36(ee.l))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-initialize-wallet"]],viewQuery:function(t,a){if(1&t&&e.Gf(B.Vq,5),2&t){let o;e.iGM(o=e.CRH())&&(a.stepper=o.first)}},features:[e._Bn([{provide:Bc.gx,useValue:{displayDefaultIndicatorType:!1}}])],decls:7,vars:6,consts:[["fxLayout","column",1,"padding-gap","mb-4"],[4,"ngIf"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","stretch stretch",4,"ngIf"],[3,"linear",4,"ngIf"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mt-2"],["fxFlex","100","fxLayoutAlign","start"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","1","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","2",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","stretch stretch"],["fxFlex","100",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",3,"click"],[3,"linear"],["stepper",""],["label","Wallet Password","state","password",3,"stepControl"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mt-1",3,"formGroup"],["fxFlex","49","fxLayoutAlign","start"],["matInput","","type","password","placeholder","Password","name","initWalletPassword","formControlName","initWalletPassword","tabindex","5","required",""],["matInput","","type","password","placeholder","Confirm Password","name","initWalletConfirmPassword","formControlName","initWalletConfirmPassword","tabindex","6","required",""],["class","validation-error-message",4,"ngIf"],["fxLayout","row",1,"my-2"],["mat-flat-button","","color","primary","tabindex","7","type","submit","matStepperNext",""],["label","Cipher","state","cipher",3,"stepControl"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start stretch","fxLayoutAlign.gt-sm","space-between start",1,"mt-1",3,"formGroup"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch"],["fxFlex","20","tabindex","8","color","primary","formControlName","existingCipher","name","existingCipher",1,"chkbox-wallet",3,"labelPosition"],["fxFlex","75","fxLayoutAlign","start",1,"my-1"],["autofocus","","matInput","","type","input","placeholder","Comma separated array of 24 words cipher seed","name","cipherSeed","formControlName","cipherSeed","tabindex","9","required",""],["fxLayout","row",1,"mb-2"],["mat-stroked-button","","color","primary","type","reset","tabindex","10","matStepperPrevious","",1,"mr-1","mt-1"],["mat-flat-button","","color","primary","tabindex","11","type","submit","matStepperNext","",1,"mt-1"],["label","Passphrase","state","passphrase",3,"stepControl"],["fxFlex","20","tabindex","10","color","primary","formControlName","enterPassphrase","name","enterPassphrase",1,"chkbox-wallet",3,"labelPosition"],["fxFlex","75","fxLayoutAlign","start"],["matInput","","type","password","placeholder","Passphrase","name","passphrase","formControlName","passphrase","tabindex","12","required",""],["mat-stroked-button","","color","warn","tabindex","13","type","reset",1,"mr-1","mt-1",3,"click"],["mat-stroked-button","","tabindex","14","color","primary","type","button","matStepperPrevious","",1,"mr-1","mt-1"],["mat-flat-button","","color","primary","tabindex","15","type","submit",1,"mt-1",3,"click"],["matStepperIcon","password"],["matStepperIcon","cipher"],["matStepperIcon","passphrase"],[1,"validation-error-message"],[1,"validation-error-icon","red"],["fxFlex","100","fxLayoutAlign","start",1,"blinker"],["fxFlex","40","fxLayout","row wrap",1,"mt-2"],["fxFlex","25","fxLayoutAlign","start","class","genseed-message",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start",1,"mt-2"],["mat-flat-button","","color","primary","type","submit","tabindex","16",3,"click"],["fxFlex","25","fxLayoutAlign","start",1,"genseed-message"],["mat-stroked-button","","color","primary","tabindex","17","type","reset",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","18",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Vc,9,0,"div",1),e.YNc(2,Gc,6,0,"div",2),e.YNc(3,o1,56,17,"mat-vertical-stepper",3),e.YNc(4,l1,15,1,"div",1),e.YNc(5,r1,7,0,"div",1),e.YNc(6,c1,9,0,"div",1),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",a.insecureLND&&!a.warnRes),e.xp6(1),e.Q6J("ngIf",a.warnRes&&!a.proceed),e.xp6(1),e.Q6J("ngIf",(!a.insecureLND||a.warnRes&&a.proceed)&&a.genSeedResponse.length<=0&&""===a.initWalletResponse),e.xp6(1),e.Q6J("ngIf",a.genSeedResponse.length>0&&""!==a.initWalletResponse),e.xp6(1),e.Q6J("ngIf",a.genSeedResponse.length>0&&""===a.initWalletResponse),e.xp6(1),e.Q6J("ngIf",a.genSeedResponse.length<=0&&""!==a.initWalletResponse))},directives:[d.xw,p.O5,c._Y,c.JL,c.F,d.Wh,d.yH,k.lW,B.Vq,B.C0,c.sg,f.KE,I.Nt,c.Fj,c.JJ,c.u,c.Q7,f.bx,f.TO,K.Hw,B.Ic,ue.Rr,B.fd,B.z9,p.sg],styles:[""]}),n})(),d1=(()=>{class n{constructor(){this.faWallet=y.X5K}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-wallet"]],decls:12,vars:1,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["label","Unlock"],["label","Initialize"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Wallet"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"mat-tab-group")(8,"mat-tab",5),e._UZ(9,"rtl-unlock-wallet"),e.qZA(),e.TgZ(10,"mat-tab",6),e._UZ(11,"rtl-initialize-wallet"),e.qZA()()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faWallet))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.SP,D.uX,Hc,m1],styles:[""]}),n})();var _1=h(1365);function h1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",11),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let g1=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.router=o,this.faExchangeAlt=y.Ssp,this.faChartPie=y.OS1,this.currencyUnits=[],this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"},{link:"lookuptransactions",name:"Lookup"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[1]),(0,_1.M)(this.store.select(C.$k))).subscribe(([a,o])=>{this.currencyUnits=o.currencyUnits,this.balances=o.userPersona===l.ol.OPERATOR?[{title:"Local Capacity",dataValue:a.lightningBalance.local,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:a.lightningBalance.remote,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:a.lightningBalance.local,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:a.lightningBalance.remote,tooltip:"Amount you can receive"}],this.logger.info(a)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Lightning Balance"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA()()(),e.TgZ(8,"div",6),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"Lightning Transactions"),e.qZA()(),e.TgZ(12,"div",7)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",8),e.YNc(16,h1,2,3,"div",9),e.qZA(),e.TgZ(17,"div",10),e._UZ(18,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faChartPie),e.xp6(6),e.Q6J("values",a.balances),e.xp6(2),e.Q6J("icon",a.faExchangeAlt),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,ge.D,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC],styles:[""]}),n})();function f1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let C1=(()=>{class n{constructor(t){this.router=t,this.faSearch=y.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-graph"]],decls:11,vars:2,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Graph Lookups"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),e.YNc(8,f1,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faSearch),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC],styles:[""]}),n})();function x1(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Destination pubkey is required."),e.qZA())}function y1(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function T1(n,i){1&n&&e._UZ(0,"mat-progress-bar",37)}function b1(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1," Hop "),e.qZA())}function v1(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.hop_sequence," ")}}function Z1(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1," Peer "),e.qZA())}const w1=function(n){return{"max-width":n}};function A1(n,i){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,w1,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.hij(" ",null==t?null:t.pubkey_alias," ")}}function S1(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1," Channel "),e.qZA())}function L1(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.chan_id," ")}}function k1(n,i){1&n&&(e.TgZ(0,"th",41),e._uU(1," Capacity (Sats) "),e.qZA())}function F1(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.chan_capacity),"")}}function N1(n,i){1&n&&(e.TgZ(0,"th",41),e._uU(1," Amount To Fwd (Sats) "),e.qZA())}function q1(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.amt_to_forward)," ")}}function U1(n,i){1&n&&(e.TgZ(0,"th",41),e._uU(1," Fee (mSats) "),e.qZA())}function O1(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.fee_msat)," ")}}function R1(n,i){1&n&&(e.TgZ(0,"th",43)(1,"span",42),e._uU(2,"Actions"),e.qZA()())}function I1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",44)(1,"button",45),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onHopClick(u,o)}),e._uU(2,"View Info"),e.qZA()()}}function M1(n,i){1&n&&e._UZ(0,"tr",46)}function D1(n,i){1&n&&e._UZ(0,"tr",47)}const P1=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}};let J1=(()=>{class n{constructor(t,a,o){this.store=t,this.lndEffects=a,this.commonService=o,this.destinationPubkey="",this.amount=null,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=y.FpQ,this.faExclamationTriangle=y.eHv,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["pubkey_alias","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["hop_sequence","pubkey_alias","fee_msat","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["hop_sequence","pubkey_alias","chan_capacity","amt_to_forward_msat","fee_msat","actions"]):(this.flgSticky=!0,this.displayedColumns=["hop_sequence","pubkey_alias","chan_capacity","amt_to_forward_msat","fee_msat","actions"])}ngOnInit(){this.lndEffects.setQueryRoutes.pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.qrHops=new r.by([]),t.routes&&t.routes.length&&t.routes.length>0&&t.routes[0].hops?(this.flgLoading[0]=!1,this.qrHops=new r.by([...t.routes[0].hops]),this.qrHops.data=t.routes[0].hops):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null})}onQueryRoutes(){if(!this.destinationPubkey||!this.amount)return!0;this.qrHops=new r.by([]),this.flgLoading[0]=!0,this.store.dispatch((0,v.WO)({payload:{destPubkey:this.destinationPubkey,amount:this.amount}}))}resetData(){this.destinationPubkey="",this.amount=null,this.flgLoading[0]=!1}onHopClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"hop_sequence",value:t.hop_sequence,title:"Sequence",width:33,type:l.Gi.NUMBER},{key:"amt_to_forward",value:t.amt_to_forward,title:"Amount To Forward (Sats)",width:33,type:l.Gi.NUMBER},{key:"fee_msat",value:t.fee_msat,title:"Fee (mSats)",width:34,type:l.Gi.NUMBER}],[{key:"chan_capacity",value:t.chan_capacity,title:"Channel Capacity (Sats)",width:50,type:l.Gi.NUMBER},{key:"expiry",value:t.expiry,title:"Expiry",width:50,type:l.Gi.NUMBER}],[{key:"pubkey_alias",value:t.pubkey_alias,title:"Peer Alias",width:50,type:l.Gi.STRING},{key:"chan_id",value:t.chan_id,title:"Channel ID",width:50,type:l.Gi.STRING}],[{key:"pub_key",value:t.pub_key,title:"Peer Pubkey",width:100,type:l.Gi.STRING}]]}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(ee.l),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-query-routes"]],viewQuery:function(t,a){if(1&t&&e.Gf(Z.YE,5),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first)}},decls:51,vars:16,consts:[["fxLayout","column","fxFlex","100",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Pubkey","name","destinationPubkey","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-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"],[1,"table-container","mb-6",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","hop_sequence"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","pubkey_alias"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","chan_id"],["matColumnDef","chan_capacity"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amt_to_forward_msat"],["matColumnDef","fee_msat"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-4","pr-3"],["mat-cell","",1,"pl-4"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,a){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"form",1,2),e.NdJ("ngSubmit",function(){return e.CHM(o),e.MAs(2).form.valid&&a.onQueryRoutes()}),e.TgZ(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span"),e._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),e.qZA()(),e.TgZ(7,"mat-form-field",5)(8,"input",6,7),e.NdJ("ngModelChange",function(u){return a.destinationPubkey=u}),e.qZA(),e.YNc(10,x1,2,0,"mat-error",8),e.qZA(),e.TgZ(11,"mat-form-field",9)(12,"input",10),e.NdJ("ngModelChange",function(u){return a.amount=u}),e.qZA(),e.YNc(13,y1,2,0,"mat-error",8),e.qZA(),e.TgZ(14,"div",11)(15,"button",12),e.NdJ("click",function(){return a.resetData()}),e._uU(16,"Clear"),e.qZA(),e.TgZ(17,"button",13),e._uU(18,"Query Route"),e.qZA()()(),e.TgZ(19,"div",14)(20,"div",15),e._UZ(21,"fa-icon",16),e.TgZ(22,"span",17),e._uU(23,"Transaction Route"),e.qZA()()(),e.TgZ(24,"div",18),e.YNc(25,T1,1,0,"mat-progress-bar",19),e.TgZ(26,"table",20,21),e.ynx(28,22),e.YNc(29,b1,2,0,"th",23),e.YNc(30,v1,2,1,"td",24),e.BQk(),e.ynx(31,25),e.YNc(32,Z1,2,0,"th",23),e.YNc(33,A1,2,4,"td",26),e.BQk(),e.ynx(34,27),e.YNc(35,S1,2,0,"th",23),e.YNc(36,L1,2,1,"td",24),e.BQk(),e.ynx(37,28),e.YNc(38,k1,2,0,"th",29),e.YNc(39,F1,4,3,"td",24),e.BQk(),e.ynx(40,30),e.YNc(41,N1,2,0,"th",29),e.YNc(42,q1,4,3,"td",24),e.BQk(),e.ynx(43,31),e.YNc(44,U1,2,0,"th",29),e.YNc(45,O1,4,3,"td",24),e.BQk(),e.ynx(46,32),e.YNc(47,R1,3,0,"th",33),e.YNc(48,I1,3,0,"td",34),e.BQk(),e.YNc(49,M1,1,0,"tr",35),e.YNc(50,D1,1,0,"tr",36),e.qZA()()()}2&t&&(e.xp6(4),e.Q6J("icon",a.faExclamationTriangle),e.xp6(4),e.Q6J("ngModel",a.destinationPubkey),e.xp6(2),e.Q6J("ngIf",!a.destinationPubkey),e.xp6(2),e.Q6J("ngModel",a.amount)("step",1e3)("min",0),e.xp6(1),e.Q6J("ngIf",!a.amount),e.xp6(8),e.Q6J("icon",a.faRoute),e.xp6(4),e.Q6J("ngIf",!0===a.flgLoading[0]),e.xp6(1),e.Q6J("dataSource",a.qrHops)("ngClass",e.VKq(14,P1,"error"===a.flgLoading[0])),e.xp6(23),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns))},directives:[d.xw,d.yH,c._Y,c.JL,c.F,d.Wh,M.BN,f.KE,I.Nt,c.Fj,c.Q7,c.JJ,c.On,p.O5,f.TO,c.wV,c.qQ,$.q,k.lW,Q.$V,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,r.as,r.XQ,r.nj,r.Gk],pipes:[p.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{flex:0 0 5%;width:5%}.mat-column-pubkey_alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();var ie=h(9814);function E1(n,i){if(1&n&&(e.TgZ(0,"span",9),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.AsE("",a.nodeFeaturesEnum[t.value.name]||t.value.name,": ",t.value.is_required?"Mandatory":"Optional","")}}function Q1(n,i){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Network"),e.qZA())}function Y1(n,i){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.network," ")}}function H1(n,i){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Address"),e.qZA())}function B1(n,i){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.addr," ")}}function V1(n,i){1&n&&(e.TgZ(0,"th",29)(1,"span",30),e._uU(2,"Actions"),e.qZA()())}function G1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",31)(1,"span",30)(2,"button",32),e.NdJ("copied",function(o){return e.CHM(t),e.oxw(2).onCopyNodeURI(o)}),e._uU(3,"Copy Node URI"),e.qZA()()()}if(2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(2),e.Q6J("payload",a.lookupResult.node.pub_key+"@"+t.addr)}}function z1(n,i){1&n&&e._UZ(0,"tr",33)}function W1(n,i){1&n&&e._UZ(0,"tr",34)}const X1=function(n){return{"background-color":n}};function $1(n,i){if(1&n&&(e.TgZ(0,"div",1),e._UZ(1,"mat-divider",2),e.TgZ(2,"div",3)(3,"div",4)(4,"h4",5),e._uU(5,"Alias"),e.qZA(),e.TgZ(6,"span",6),e._uU(7),e.TgZ(8,"span",7),e._uU(9),e.qZA()()(),e.TgZ(10,"div",8)(11,"h4",5),e._uU(12,"Pub Key"),e.qZA(),e.TgZ(13,"span",9),e._uU(14),e.qZA()()(),e._UZ(15,"mat-divider",10),e.TgZ(16,"div",3)(17,"div",4)(18,"h4",5),e._uU(19,"Last Update"),e.qZA(),e.TgZ(20,"span",6),e._uU(21),e.ALo(22,"date"),e.qZA()(),e.TgZ(23,"div",8)(24,"h4",5),e._uU(25,"Total Capacity (Sats)"),e.qZA(),e.TgZ(26,"span",6),e._uU(27),e.ALo(28,"number"),e.qZA()()(),e._UZ(29,"mat-divider",10),e.TgZ(30,"div",3)(31,"div",4)(32,"h4",5),e._uU(33,"Number of Channels"),e.qZA(),e.TgZ(34,"span",6),e._uU(35),e.ALo(36,"number"),e.qZA()(),e.TgZ(37,"div",11)(38,"h4",5),e._uU(39,"Features"),e.qZA(),e.YNc(40,E1,2,2,"span",12),e.ALo(41,"keyvalue"),e.qZA()(),e._UZ(42,"mat-divider",10),e.TgZ(43,"div",13)(44,"h4",14),e._uU(45,"Addresses"),e.qZA(),e.TgZ(46,"div",15)(47,"table",16,17),e.ynx(49,18),e.YNc(50,Q1,2,0,"th",19),e.YNc(51,Y1,2,1,"td",20),e.BQk(),e.ynx(52,21),e.YNc(53,H1,2,0,"th",19),e.YNc(54,B1,2,1,"td",20),e.BQk(),e.ynx(55,22),e.YNc(56,V1,3,0,"th",23),e.YNc(57,G1,4,1,"td",24),e.BQk(),e.YNc(58,z1,1,0,"tr",25),e.YNc(59,W1,1,0,"tr",26),e.qZA()()()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(t.lookupResult.node.alias),e.xp6(1),e.Q6J("ngStyle",e.VKq(24,X1,null==t.lookupResult.node?null:t.lookupResult.node.color)),e.xp6(1),e.Oqu(null==t.lookupResult.node?null:t.lookupResult.node.color),e.xp6(5),e.Oqu(t.lookupResult.node.pub_key),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.xi3(22,15,1e3*t.lookupResult.node.last_update,"dd/MMM/y HH:mm")),e.xp6(6),e.Oqu(e.lcZ(28,18,t.lookupResult.total_capacity)),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(36,20,t.lookupResult.num_channels)),e.xp6(5),e.Q6J("ngForOf",e.lcZ(41,22,t.lookupResult.node.features)),e.xp6(2),e.Q6J("inset",!0),e.xp6(5),e.Q6J("dataSource",t.lookupResult.node.addresses),e.xp6(11),e.Q6J("matHeaderRowDef",t.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}let j1=(()=>{class n{constructor(t,a){this.logger=t,this.snackBar=a,this.nodeFeaturesEnum=l.hZ,this.displayedColumns=["network","addr","actions"]}onCopyNodeURI(t){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(te.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-node-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],[1,"mb-1",3,"inset"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"ml-2",3,"ngStyle"],["fxFlex","70"],[1,"foreground-secondary-text","w-100"],[1,"my-1",3,"inset"],["fxLayout","column","fxFlex","70","fxLayoutAlign","end start",1,"my-1"],["class","foreground-secondary-text w-100",4,"ngFor","ngForOf"],["fxLayout","column"],["fxFlex","100","fxLayoutAlign","start",1,"font-bold-500","mb-1"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource"],["table",""],["matColumnDef","network"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","addr"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","1","rtlClipboard","",3,"payload","copied"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&e.YNc(0,$1,60,26,"div",0),2&t&&e.Q6J("ngIf",a.lookupResult)},directives:[p.O5,d.xw,z.d,d.yH,d.Wh,p.PC,S.Zl,p.sg,Q.$V,r.BZ,Z.YE,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,k.lW,se.y,r.as,r.XQ,r.nj,r.Gk],pipes:[p.uU,p.JJ,p.Nd],styles:[""]}),n})();function K1(n,i){1&n&&(e.TgZ(0,"h3",15),e._uU(1,"Node 1"),e.qZA())}function eu(n,i){1&n&&(e.TgZ(0,"h3",15),e._uU(1,"Node 1 (Your Node)"),e.qZA())}function tu(n,i){1&n&&(e.TgZ(0,"h3",15),e._uU(1,"Node 2"),e.qZA())}function nu(n,i){1&n&&(e.TgZ(0,"h3",15),e._uU(1,"Node 2 (Your Node)"),e.qZA())}function au(n,i){if(1&n&&(e.TgZ(0,"div",1),e._UZ(1,"mat-divider",2),e.TgZ(2,"div",3)(3,"div",4)(4,"h4",5),e._uU(5,"Channel Id"),e.qZA(),e.TgZ(6,"span",6),e._uU(7),e.qZA()(),e.TgZ(8,"div",7)(9,"h4",5),e._uU(10,"Channel Point"),e.qZA(),e.TgZ(11,"span",6),e._uU(12),e.qZA()()(),e._UZ(13,"mat-divider",8),e.TgZ(14,"div",3)(15,"div",4)(16,"h4",5),e._uU(17,"Last Update"),e.qZA(),e.TgZ(18,"span",6),e._uU(19),e.ALo(20,"date"),e.qZA()(),e.TgZ(21,"div",7)(22,"h4",5),e._uU(23,"Capacity (Sats)"),e.qZA(),e.TgZ(24,"span",6),e._uU(25),e.ALo(26,"number"),e.qZA()()(),e._UZ(27,"mat-divider",8),e.TgZ(28,"div",9)(29,"div",10)(30,"div",11),e.YNc(31,K1,2,0,"h3",12),e.YNc(32,eu,2,0,"h3",12),e.qZA(),e._UZ(33,"mat-divider",8),e.TgZ(34,"div",13)(35,"h4",5),e._uU(36,"Pubkey"),e.qZA(),e.TgZ(37,"span",6),e._uU(38),e.qZA()(),e._UZ(39,"mat-divider",8),e.TgZ(40,"div",14)(41,"h4",5),e._uU(42,"Time Lock Delta"),e.qZA(),e.TgZ(43,"span",6),e._uU(44),e.qZA()(),e._UZ(45,"mat-divider",8),e.TgZ(46,"div",14)(47,"h4",5),e._uU(48,"Min HTLC"),e.qZA(),e.TgZ(49,"span",6),e._uU(50),e.qZA()(),e._UZ(51,"mat-divider",8),e.TgZ(52,"div",14)(53,"h4",5),e._uU(54,"Fee Base Msat"),e.qZA(),e.TgZ(55,"span",6),e._uU(56),e.qZA()(),e._UZ(57,"mat-divider",8),e.TgZ(58,"div",14)(59,"h4",5),e._uU(60,"Fee Rate Milli Msat"),e.qZA(),e.TgZ(61,"span",6),e._uU(62),e.qZA()(),e._UZ(63,"mat-divider",8),e.TgZ(64,"div",14)(65,"h4",5),e._uU(66,"Disabled"),e.qZA(),e.TgZ(67,"span",6),e._uU(68),e.qZA()()(),e.TgZ(69,"div",10)(70,"div"),e.YNc(71,tu,2,0,"h3",12),e.YNc(72,nu,2,0,"h3",12),e.qZA(),e._UZ(73,"mat-divider",8),e.TgZ(74,"div",13)(75,"h4",5),e._uU(76,"Pubkey"),e.qZA(),e.TgZ(77,"span",6),e._uU(78),e.qZA()(),e._UZ(79,"mat-divider",8),e.TgZ(80,"div",14)(81,"h4",5),e._uU(82,"Time Lock Delta"),e.qZA(),e.TgZ(83,"span",6),e._uU(84),e.qZA()(),e._UZ(85,"mat-divider",8),e.TgZ(86,"div",14)(87,"h4",5),e._uU(88,"Min HTLC"),e.qZA(),e.TgZ(89,"span",6),e._uU(90),e.qZA()(),e._UZ(91,"mat-divider",8),e.TgZ(92,"div",14)(93,"h4",5),e._uU(94,"Fee Base Msat"),e.qZA(),e.TgZ(95,"span",6),e._uU(96),e.qZA()(),e._UZ(97,"mat-divider",8),e.TgZ(98,"div",14)(99,"h4",5),e._uU(100,"Fee Rate Milli Msat"),e.qZA(),e.TgZ(101,"span",6),e._uU(102),e.qZA()(),e._UZ(103,"mat-divider",8),e.TgZ(104,"div",14)(105,"h4",5),e._uU(106,"Disabled"),e.qZA(),e.TgZ(107,"span",6),e._uU(108),e.qZA()()()()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(t.lookupResult.channel_id),e.xp6(5),e.Oqu(t.lookupResult.chan_point),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.xi3(20,35,1e3*t.lookupResult.last_update,"dd/MMM/y HH:mm")),e.xp6(6),e.Oqu(e.lcZ(26,38,t.lookupResult.capacity)),e.xp6(2),e.Q6J("inset",!0),e.xp6(4),e.Q6J("ngIf",!t.node1_match),e.xp6(1),e.Q6J("ngIf",t.node1_match),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(t.lookupResult.node1_pub),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node1_policy?null:t.lookupResult.node1_policy.time_lock_delta),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node1_policy?null:t.lookupResult.node1_policy.min_htlc),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node1_policy?null:t.lookupResult.node1_policy.fee_base_msat),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node1_policy?null:t.lookupResult.node1_policy.fee_rate_milli_msat),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null!=t.lookupResult.node1_policy&&t.lookupResult.node1_policy.disabled?"Yes":"No"),e.xp6(3),e.Q6J("ngIf",!t.node2_match),e.xp6(1),e.Q6J("ngIf",t.node2_match),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(t.lookupResult.node2_pub),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node2_policy?null:t.lookupResult.node2_policy.time_lock_delta),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node2_policy?null:t.lookupResult.node2_policy.min_htlc),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node2_policy?null:t.lookupResult.node2_policy.fee_base_msat),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node2_policy?null:t.lookupResult.node2_policy.fee_rate_milli_msat),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null!=t.lookupResult.node2_policy&&t.lookupResult.node2_policy.disabled?"Yes":"No")}}let iu=(()=>{class n{constructor(t){this.store=t,this.node1_match=!1,this.node2_match=!1,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.lookupResult.node1_pub===t.identity_pubkey&&(this.node1_match=!0),this.lookupResult.node2_pub===t.identity_pubkey&&(this.node2_match=!0)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],[1,"mb-1",3,"inset"],["fxLayout","row"],["fxLayout","column","fxFlex","30","fxLayoutAlign","end start"],[1,"font-bold-500"],[1,"foreground-secondary-text"],["fxLayout","column","fxFlex","70","fxLayoutAlign","end start"],[1,"my-1",3,"inset"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start",1,"mt-1","bordered-box","padding-gap-large"],["fxLayout","column"],["class","page-title font-bold-500",4,"ngIf"],["fxLayout","column","fxFlex","20"],["fxLayout","column","fxFlex","10"],[1,"page-title","font-bold-500"]],template:function(t,a){1&t&&e.YNc(0,au,109,40,"div",0),2&t&&e.Q6J("ngIf",a.lookupResult)},directives:[p.O5,d.xw,z.d,d.yH,d.Wh],pipes:[p.uU,p.JJ],styles:[".mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%], .mat-list-base[_ngcontent-%COMP%] .mat-list-option[_ngcontent-%COMP%]{height:38px!important}"]}),n})();function ou(n,i){if(1&n&&(e.TgZ(0,"mat-radio-button",17),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("value",t.id)("checked",a.selectedFieldId===t.id),e.xp6(1),e.hij(" ",t.name," ")}}function su(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function lu(n,i){1&n&&e._UZ(0,"mat-progress-bar",20)}const ru=function(n){return{"w-100 mt-2 p-2 error-border":n,"w-100 my-2 p-2":!0}};function cu(n,i){if(1&n&&(e.TgZ(0,"div",18),e.YNc(1,lu,1,0,"mat-progress-bar",19),e._uU(2),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(3,ru,""!==t.errorMessage&&"Getting lookup details..."!==t.errorMessage)),e.xp6(1),e.Q6J("ngIf","Getting lookup details..."===t.errorMessage),e.xp6(1),e.hij(" ",t.errorMessage," ")}}function uu(n,i){if(1&n&&(e.TgZ(0,"span",27),e._UZ(1,"rtl-node-lookup",28),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("lookupResult",t.lookupValue)}}function pu(n,i){if(1&n&&(e.TgZ(0,"span",27),e._UZ(1,"rtl-channel-lookup",28),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("lookupResult",t.lookupValue)}}function mu(n,i){1&n&&(e.TgZ(0,"span",27)(1,"h3"),e._uU(2,"Error! Unable to find details!"),e.qZA()())}function du(n,i){if(1&n&&(e.TgZ(0,"div",21)(1,"div",22)(2,"span",23),e._uU(3),e.qZA()(),e.TgZ(4,"div",24),e.YNc(5,uu,2,1,"span",25),e.YNc(6,pu,2,1,"span",25),e.YNc(7,mu,3,0,"span",26),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.hij("",t.lookupFields[t.selectedFieldId].name," Details"),e.xp6(1),e.Q6J("ngSwitch",t.selectedFieldId),e.xp6(1),e.Q6J("ngSwitchCase",0),e.xp6(1),e.Q6J("ngSwitchCase",1)}}const _u=function(n){return{"mt-1":!0,"mt-2":n}};let He=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.commonService=a,this.store=o,this.actions=s,this.lookupKey="",this.lookupValue={},this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Pubkey"},{id:1,name:"Channel",placeholder:"Channel ID"}],this.faSearch=y.wn1,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t.type===l.uR.SET_LOOKUP_LND||t.type===l.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(t=>{t.type===l.uR.SET_LOOKUP_LND&&(this.errorMessage=0===this.selectedFieldId&&t.payload.hasOwnProperty("node")||1===this.selectedFieldId&&t.payload.hasOwnProperty("channel_id")?"":this.errorMessage,this.lookupValue=JSON.parse(JSON.stringify(t.payload)),this.flgSetLookupValue=!(0!==this.selectedFieldId||!t.payload.hasOwnProperty("node"))||!(1!==this.selectedFieldId||!t.payload.hasOwnProperty("channel_id")),this.logger.info(this.lookupValue)),t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&"Lookup"===t.payload.action&&(this.errorMessage="",t.payload.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof t.payload.message?JSON.stringify(t.payload.message):t.payload.message),t.payload.status===l.Bn.INITIATED&&(this.errorMessage=l.m6.GET_LOOKUP_DETAILS))})}onLookup(){if(!this.lookupKey)return!0;switch(this.flgSetLookupValue=!1,this.lookupValue={},this.selectedFieldId){case 0:this.store.dispatch((0,v.Sf)({payload:this.lookupKey.trim()}));break;case 1:this.store.dispatch((0,v.$A)({payload:{uiMessage:l.m6.SEARCHING_CHANNEL,channelID:this.lookupKey.trim()}}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.lookupKey="",this.lookupValue={},this.errorMessage=""}clearLookupValue(){this.lookupValue={},this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lookups"]],decls:19,vars:10,consts:[["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"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[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","row wrap","fxLayoutAlign","space-between center",3,"ngClass",4,"ngIf"],["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"],[1,"mr-4",3,"value","checked"],["fxFlex","100","fxLayout","row wrap","fxLayoutAlign","space-between center",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["mode","indeterminate"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[3,"lookupResult"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-content",2)(3,"form",3,4)(5,"div",5)(6,"mat-radio-group",6),e.NdJ("ngModelChange",function(s){return a.selectedFieldId=s})("change",function(s){return a.onSelectChange(s)}),e.YNc(7,ou,2,3,"mat-radio-button",7),e.qZA()(),e.TgZ(8,"mat-form-field",8)(9,"input",9,10),e.NdJ("change",function(){return a.clearLookupValue()})("ngModelChange",function(s){return a.lookupKey=s}),e.qZA(),e.YNc(11,su,2,1,"mat-error",11),e.qZA(),e.TgZ(12,"div",12)(13,"button",13),e.NdJ("click",function(){return a.resetData()}),e._uU(14,"Clear"),e.qZA(),e.TgZ(15,"button",14),e.NdJ("click",function(){return a.onLookup()}),e._uU(16,"Lookup"),e.qZA()()(),e.YNc(17,cu,3,5,"div",15),e.YNc(18,du,8,4,"div",16),e.qZA()()()),2&t&&(e.xp6(6),e.Q6J("ngModel",a.selectedFieldId),e.xp6(1),e.Q6J("ngForOf",a.lookupFields),e.xp6(1),e.Q6J("ngClass",e.VKq(8,_u,a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM)),e.xp6(1),e.Q6J("placeholder",(null==a.lookupFields[a.selectedFieldId]?null:a.lookupFields[a.selectedFieldId].placeholder)||"Lookup Key")("ngModel",a.lookupKey),e.xp6(2),e.Q6J("ngIf",!a.lookupKey),e.xp6(6),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage&&a.lookupValue&&a.flgSetLookupValue))},directives:[d.xw,d.yH,d.Wh,b.dn,c._Y,c.JL,c.F,ie.VQ,c.JJ,c.On,p.sg,ie.U0,f.KE,p.mk,S.oO,I.Nt,c.Fj,c.Q7,p.O5,f.TO,k.lW,P.pW,p.RF,p.n9,j1,iu,p.ED],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}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})();var ve=h(6856);function hu(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid date format."),e.qZA())}function gu(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid date format."),e.qZA())}function fu(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",27),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let Cu=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.router=o,this.faMapSigns=y.SuH,this.today=new Date(Date.now()),this.lastMonthDay=new Date(this.today.getFullYear(),this.today.getMonth()-1,this.today.getDate()+1,0,0,0),this.yesterday=new Date(this.today.getFullYear(),this.today.getMonth(),this.today.getDate()-1,0,0,0),this.endDate=this.today,this.startDate=this.lastMonthDay,this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"peers",name:"Routing Peers"},{link:"nonroutingprs",name:"Non Routing Peers"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x]}ngOnInit(){this.onEventsFetch();const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}onEventsFetch(){this.store.dispatch((0,v.QJ)({payload:{forwarding_events:[]}})),this.endDate||(this.endDate=this.today),this.startDate||(this.startDate=new Date(this.endDate.getFullYear(),this.endDate.getMonth()-1,this.endDate.getDate()+1,0,0,0)),this.store.dispatch((0,v.u0)({payload:{end_time:Math.round(this.endDate.getTime()/1e3).toString(),start_time:Math.round(this.startDate.getTime()/1e3).toString()}}))}resetData(){this.endDate=this.today,this.startDate=this.lastMonthDay}ngOnDestroy(){this.resetData(),this.store.dispatch((0,v.QJ)({payload:{forwarding_events:[]}})),this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-routing"]],decls:35,vars:15,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"card-content-gap","mt-1"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mb-1",3,"ngSubmit"],["routingForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","49","fxLayoutAlign","start"],["matInput","","placeholder","Start Date","name","startDate","tabindex","1",3,"matDatepicker","max","ngModel","ngModelChange"],["strtDate","ngModel"],["matSuffix","",3,"for"],[3,"startAt"],["startDatepicker",""],[4,"ngIf"],["matInput","","placeholder","End Date","name","endDate","tabindex","2",3,"matDatepicker","min","max","ngModel","ngModelChange"],["enDate","ngModel"],["endDatepicker",""],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","4"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"fa-icon",2),e.TgZ(3,"span",3),e._uU(4,"Routing"),e.qZA()(),e.TgZ(5,"div",4)(6,"mat-card",5)(7,"mat-card-content",6)(8,"form",7,8),e.NdJ("ngSubmit",function(){return a.onEventsFetch()}),e.TgZ(10,"div",9)(11,"mat-form-field",10)(12,"input",11,12),e.NdJ("ngModelChange",function(s){return a.startDate=s}),e.qZA(),e._UZ(14,"mat-datepicker-toggle",13)(15,"mat-datepicker",14,15),e.YNc(17,hu,2,0,"mat-error",16),e.qZA(),e.TgZ(18,"mat-form-field",10)(19,"input",17,18),e.NdJ("ngModelChange",function(s){return a.endDate=s}),e.qZA(),e._UZ(21,"mat-datepicker-toggle",13)(22,"mat-datepicker",14,19),e.YNc(24,gu,2,0,"mat-error",16),e.qZA()(),e.TgZ(25,"div",20)(26,"button",21),e.NdJ("click",function(){return a.resetData()}),e._uU(27,"Clear"),e.qZA(),e.TgZ(28,"button",22),e._uU(29,"Fetch Events"),e.qZA()()(),e.TgZ(30,"div",23)(31,"nav",24),e.YNc(32,fu,2,3,"div",25),e.qZA()(),e.TgZ(33,"div",26),e._UZ(34,"router-outlet"),e.qZA()()()()()),2&t){const o=e.MAs(13),s=e.MAs(16),u=e.MAs(20),g=e.MAs(23);e.xp6(2),e.Q6J("icon",a.faMapSigns),e.xp6(10),e.Q6J("matDatepicker",s)("max",a.today)("ngModel",a.startDate),e.xp6(2),e.Q6J("for",s),e.xp6(1),e.Q6J("startAt",a.startDate),e.xp6(2),e.Q6J("ngIf",o.errors),e.xp6(2),e.Q6J("matDatepicker",g)("min",a.startDate)("max",a.today)("ngModel",a.endDate),e.xp6(2),e.Q6J("for",g),e.xp6(1),e.Q6J("startAt",a.endDate),e.xp6(2),e.Q6J("ngIf",u.errors),e.xp6(8),e.Q6J("ngForOf",a.links)}},directives:[d.xw,d.Wh,M.BN,d.yH,b.a8,b.dn,c._Y,c.JL,c.F,f.KE,I.Nt,ve.hl,Ee.F,c.Fj,c.JJ,c.On,ve.nW,f.R9,ve.Mq,p.O5,f.TO,$.q,k.lW,D.BU,p.sg,D.Nj,T.rH,T.lC],styles:[""]}),n})();function xu(n,i){if(1&n&&(e.TgZ(0,"div",5),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function yu(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e._UZ(1,"div",7),e.TgZ(2,"mat-form-field",8)(3,"input",9),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().filterValue=o})("input",function(){return e.CHM(t),e.oxw().applyFilter()})("keyup",function(){return e.CHM(t),e.oxw().applyFilter()}),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.filterValue)}}function Tu(n,i){1&n&&e._UZ(0,"mat-progress-bar",31)}function bu(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1,"Timestamp"),e.qZA())}function vu(n,i){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*t.timestamp,"dd/MMM/y HH:mm"))}}function Zu(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1,"Inbound Channel"),e.qZA())}function wu(n,i){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t.alias_in)}}function Au(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1,"Outbound Channel"),e.qZA())}function Su(n,i){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t.alias_out)}}function Lu(n,i){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Inbound Amount (Sats)"),e.qZA())}function ku(n,i){if(1&n&&(e.TgZ(0,"td",33)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.amt_in))}}function Fu(n,i){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Outbound Amount (Sats)"),e.qZA())}function Nu(n,i){if(1&n&&(e.TgZ(0,"td",33)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.amt_out))}}function qu(n,i){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Fee (mSats)"),e.qZA())}function Uu(n,i){if(1&n&&(e.TgZ(0,"td",33)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.fee_msat))}}function Ou(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",36)(1,"div",37)(2,"mat-select",38),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",39),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function Ru(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",40)(1,"button",41),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw(2).onForwardingEventClick(u,o)}),e._uU(2,"View Info"),e.qZA()()}}function Iu(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No forwarding history available."),e.qZA())}function Mu(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting forwarding history..."),e.qZA())}function Du(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function Pu(n,i){if(1&n&&(e.TgZ(0,"td",42),e.YNc(1,Iu,2,0,"p",43),e.YNc(2,Mu,2,0,"p",43),e.YNc(3,Du,2,1,"p",43),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Ju=function(n){return{"display-none":n}};function Eu(n,i){if(1&n&&e._UZ(0,"tr",44),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Ju,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function Qu(n,i){1&n&&e._UZ(0,"tr",45)}function Yu(n,i){1&n&&e._UZ(0,"tr",46)}const Hu=function(){return["no_event"]};function Bu(n,i){if(1&n&&(e.TgZ(0,"div",10),e.YNc(1,Tu,1,0,"mat-progress-bar",11),e.TgZ(2,"table",12,13),e.ynx(4,14),e.YNc(5,bu,2,0,"th",15),e.YNc(6,vu,3,4,"td",16),e.BQk(),e.ynx(7,17),e.YNc(8,Zu,2,0,"th",15),e.YNc(9,wu,2,1,"td",16),e.BQk(),e.ynx(10,18),e.YNc(11,Au,2,0,"th",15),e.YNc(12,Su,2,1,"td",16),e.BQk(),e.ynx(13,19),e.YNc(14,Lu,2,0,"th",20),e.YNc(15,ku,4,3,"td",16),e.BQk(),e.ynx(16,21),e.YNc(17,Fu,2,0,"th",20),e.YNc(18,Nu,4,3,"td",16),e.BQk(),e.ynx(19,22),e.YNc(20,qu,2,0,"th",20),e.YNc(21,Uu,4,3,"td",16),e.BQk(),e.ynx(22,23),e.YNc(23,Ou,6,0,"th",24),e.YNc(24,Ru,3,0,"td",25),e.BQk(),e.ynx(25,26),e.YNc(26,Pu,4,3,"td",27),e.BQk(),e.YNc(27,Eu,1,3,"tr",28),e.YNc(28,Qu,1,0,"tr",29),e.YNc(29,Yu,1,0,"tr",30),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.forwardingHistoryEvents),e.xp6(25),e.Q6J("matFooterRowDef",e.DdM(6,Hu)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}function Vu(n,i){if(1&n&&e._UZ(0,"mat-paginator",47),2&n){const t=e.oxw();e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Be=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.commonService=a,this.store=o,this.datePipe=s,this.eventsData=[],this.filterValue="",this.forwardingHistoryData=[],this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","fee_msat","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amt_in","amt_out","fee_msat","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","alias_in","alias_out","amt_in","amt_out","fee_msat","actions"])}ngOnInit(){this.store.select(C.Bo).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{var a;this.eventsData.length<=0&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,(null===(a=t.apiCallStatus)||void 0===a?void 0:a.status)===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.forwardingHistoryData=t.forwardingHistory.forwarding_events||[],this.loadForwardingEventsTable(this.forwardingHistoryData),this.logger.info(t.apiCallStatus),this.logger.info(t.forwardingHistory))})}ngAfterViewInit(){this.forwardingHistoryData.length>0&&this.loadForwardingEventsTable(this.forwardingHistoryData)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:l.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.forwardingHistoryData=this.eventsData,t.eventsData.firstChange||this.loadForwardingEventsTable(this.forwardingHistoryData)),t.filterValue&&!t.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Event Information",message:[[{key:"timestamp",value:t.timestamp,title:"Timestamp",width:25,type:l.Gi.DATE_TIME},{key:"amt_in",value:t.amt_in,title:"Inbound Amount (Sats)",width:25,type:l.Gi.NUMBER},{key:"amt_out",value:t.amt_out,title:"Outbound Amount (Sats)",width:25,type:l.Gi.NUMBER},{key:"fee_msat",value:t.fee_msat,title:"Fee (mSats)",width:25,type:l.Gi.NUMBER}],[{key:"alias_in",value:t.alias_in,title:"Inbound Peer Alias",width:25,type:l.Gi.STRING},{key:"chan_id_in",value:t.chan_id_in,title:"Inbound Channel ID",width:25,type:l.Gi.STRING},{key:"alias_out",value:t.alias_out,title:"Outbound Peer Alias",width:25,type:l.Gi.STRING},{key:"chan_id_out",value:t.chan_id_out,title:"Outbound Channel ID",width:25,type:l.Gi.STRING}]]}}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new r.by(t?[...t]:[]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.forwardingHistoryEvents.filterPredicate=(a,o)=>((a.timestamp?this.datePipe.transform(new Date(1e3*a.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(a).toLowerCase()).includes(o),this.forwardingHistoryEvents.paginator=this.paginator,this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(p.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-forwarding-history"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Events")}]),e.TTD],decls:5,vars:4,consts:[["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","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["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,"dataSource"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias_in"],["matColumnDef","alias_out"],["matColumnDef","amt_in"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amt_out"],["matColumnDef","fee_msat"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,xu,2,1,"div",1),e.YNc(2,yu,4,1,"div",2),e.YNc(3,Bu,30,7,"div",3),e.YNc(4,Vu,1,3,"mat-paginator",4),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage))},directives:[d.xw,d.Wh,p.O5,d.yH,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,P.pW,r.BZ,Z.YE,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,R.gD,R.$L,Y.ey,k.lW,r.mD,r.yh,r.Ke,r.Q2,p.mk,S.oO,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.uU,p.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const Gu=["tableIn"],zu=["tableOut"],Wu=["paginatorIn"],Xu=["paginatorOut"];function $u(n,i){if(1&n&&(e.TgZ(0,"div",3),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function ju(n,i){1&n&&e._UZ(0,"mat-progress-bar",37)}function Ku(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Channel ID"),e.qZA())}const _e=function(n){return{"max-width":n}};function ep(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,_e,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.chan_id)}}function tp(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Peer Alias"),e.qZA())}function np(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,_e,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.alias)}}function ap(n,i){1&n&&(e.TgZ(0,"th",40),e._uU(1,"Events"),e.qZA())}function ip(n,i){if(1&n&&(e.TgZ(0,"td",41)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.events))}}function op(n,i){1&n&&(e.TgZ(0,"th",40),e._uU(1,"Total Amount (Sats)"),e.qZA())}function sp(n,i){if(1&n&&(e.TgZ(0,"td",41)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_amount))}}function lp(n,i){1&n&&(e.TgZ(0,"th",43)(1,"span",42),e._uU(2,"Actions"),e.qZA()())}function rp(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",44)(1,"button",45),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw(2).onRoutingPeerClick(u,o,"in")}),e._uU(2,"View Info"),e.qZA()()}}function cp(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No incoming routing peer available."),e.qZA())}function up(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting incoming routing peers..."),e.qZA())}function pp(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function mp(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,cp,2,0,"p",47),e.YNc(2,up,2,0,"p",47),e.YNc(3,pp,2,1,"p",47),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Ve=function(n){return{"display-none":n}};function dp(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Ve,(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)>0))}}function _p(n,i){1&n&&e._UZ(0,"tr",49)}function hp(n,i){1&n&&e._UZ(0,"tr",50)}function gp(n,i){1&n&&e._UZ(0,"mat-progress-bar",37)}function fp(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Channel ID"),e.qZA())}function Cp(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,_e,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.chan_id)}}function xp(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Peer Alias"),e.qZA())}function yp(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,_e,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.alias)}}function Tp(n,i){1&n&&(e.TgZ(0,"th",40),e._uU(1,"Events"),e.qZA())}function bp(n,i){if(1&n&&(e.TgZ(0,"td",41)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.events))}}function vp(n,i){1&n&&(e.TgZ(0,"th",40),e._uU(1,"Total Amount (Sats)"),e.qZA())}function Zp(n,i){if(1&n&&(e.TgZ(0,"td",41)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_amount))}}function wp(n,i){1&n&&(e.TgZ(0,"th",43)(1,"span",42),e._uU(2,"Actions"),e.qZA()())}function Ap(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",51)(1,"button",52),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw(2).onRoutingPeerClick(u,o,"out")}),e._uU(2,"View Info"),e.qZA()()}}function Sp(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No outgoing routing peer available."),e.qZA())}function Lp(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting outgoing routing peers..."),e.qZA())}function kp(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function Fp(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,Sp,2,0,"p",47),e.YNc(2,Lp,2,0,"p",47),e.YNc(3,kp,2,1,"p",47),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}function Np(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Ve,(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)>0))}}function qp(n,i){1&n&&e._UZ(0,"tr",49)}function Up(n,i){1&n&&e._UZ(0,"tr",50)}const Op=function(n,i){return{"mt-2":n,"mt-1":i}},Rp=function(){return["no_incoming_event"]},Ip=function(n){return{"mt-2":n}},Mp=function(){return["no_outgoing_event"]};function Dp(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7),e._uU(4,"Incoming"),e.qZA(),e.TgZ(5,"mat-form-field",8)(6,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyIncomingFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().filterIn=o}),e.qZA()()(),e.TgZ(7,"div",10),e.YNc(8,ju,1,0,"mat-progress-bar",11),e.TgZ(9,"table",12,13),e.ynx(11,14),e.YNc(12,Ku,2,0,"th",15),e.YNc(13,ep,2,4,"td",16),e.BQk(),e.ynx(14,17),e.YNc(15,tp,2,0,"th",15),e.YNc(16,np,2,4,"td",16),e.BQk(),e.ynx(17,18),e.YNc(18,ap,2,0,"th",19),e.YNc(19,ip,4,3,"td",20),e.BQk(),e.ynx(20,21),e.YNc(21,op,2,0,"th",19),e.YNc(22,sp,4,3,"td",20),e.BQk(),e.ynx(23,22),e.YNc(24,lp,3,0,"th",23),e.YNc(25,rp,3,0,"td",24),e.BQk(),e.ynx(26,25),e.YNc(27,mp,4,3,"td",26),e.BQk(),e.YNc(28,dp,1,3,"tr",27),e.YNc(29,_p,1,0,"tr",28),e.YNc(30,hp,1,0,"tr",29),e.qZA()(),e._UZ(31,"mat-paginator",30,31),e.qZA(),e.TgZ(33,"div",5)(34,"div",6)(35,"div",7),e._uU(36,"Outgoing"),e.qZA(),e.TgZ(37,"mat-form-field",8)(38,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyOutgoingFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().filterOut=o}),e.qZA()()(),e.TgZ(39,"div",10),e.YNc(40,gp,1,0,"mat-progress-bar",11),e.TgZ(41,"table",32,33),e.ynx(43,14),e.YNc(44,fp,2,0,"th",15),e.YNc(45,Cp,2,4,"td",16),e.BQk(),e.ynx(46,17),e.YNc(47,xp,2,0,"th",15),e.YNc(48,yp,2,4,"td",16),e.BQk(),e.ynx(49,18),e.YNc(50,Tp,2,0,"th",19),e.YNc(51,bp,4,3,"td",20),e.BQk(),e.ynx(52,21),e.YNc(53,vp,2,0,"th",19),e.YNc(54,Zp,4,3,"td",20),e.BQk(),e.ynx(55,22),e.YNc(56,wp,3,0,"th",23),e.YNc(57,Ap,3,0,"td",34),e.BQk(),e.ynx(58,35),e.YNc(59,Fp,4,3,"td",26),e.BQk(),e.YNc(60,Np,1,3,"tr",27),e.YNc(61,qp,1,0,"tr",28),e.YNc(62,Up,1,0,"tr",29),e.qZA()(),e._UZ(63,"mat-paginator",30,36),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngClass",e.WLB(22,Op,t.screenSize===t.screenSizeEnum.XS,t.screenSize===t.screenSizeEnum.SM)),e.xp6(4),e.Q6J("ngModel",t.filterIn),e.xp6(2),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.RoutingPeersIncoming),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(25,Rp)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS),e.xp6(3),e.Q6J("ngClass",e.VKq(26,Ip,t.screenSize!==t.screenSizeEnum.LG)),e.xp6(4),e.Q6J("ngModel",t.filterOut),e.xp6(2),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.RoutingPeersOutgoing),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(28,Mp)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Pp=(()=>{class n{constructor(t,a,o){this.logger=t,this.commonService=a,this.store=o,this.routingPeersData=[],this.displayedColumns=[],this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]),this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["chan_id","events","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["chan_id","alias","events","total_amount"]):(this.flgSticky=!0,this.displayedColumns=["chan_id","alias","events","total_amount"])}ngOnInit(){this.store.select(C.Bo).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{var a;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,(null===(a=t.apiCallStatus)||void 0===a?void 0:a.status)===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.routingPeersData=t.forwardingHistory.forwarding_events?t.forwardingHistory.forwarding_events:[],this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData),this.logger.info(t.apiCallStatus),this.logger.info(t.forwardingHistory)})}ngAfterViewInit(){this.routingPeersData.length>0&&this.loadRoutingPeersTable(this.routingPeersData)}onRoutingPeerClick(t,a,o){let s=" Routing Information";s="in"===o?"Incoming"+s:"Outgoing"+s,this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:s,message:[[{key:"chan_id",value:t.chan_id,title:"Channel ID",width:50,type:l.Gi.STRING},{key:"alias",value:t.alias,title:"Peer Alias",width:50,type:l.Gi.STRING}],[{key:"events",value:t.events,title:"Events",width:50,type:l.Gi.NUMBER},{key:"total_amount",value:t.total_amount,title:"Total Amount (Sats)",width:50,type:l.Gi.NUMBER}]]}}}))}loadRoutingPeersTable(t){if(t.length>0){const a=this.groupRoutingPeers(t);this.RoutingPeersIncoming=new r.by(a[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new r.by(a[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter()}groupRoutingPeers(t){const a=[],o=[];return t.forEach(s=>{const u=a.find(U=>U.chan_id===s.chan_id_in),g=o.find(U=>U.chan_id===s.chan_id_out);u?(u.events++,u.total_amount=+u.total_amount+ +s.amt_in):a.push({chan_id:s.chan_id_in,alias:s.alias_in,events:1,total_amount:+s.amt_in}),g?(g.events++,g.total_amount=+g.total_amount+ +s.amt_out):o.push({chan_id:s.chan_id_out,alias:s.alias_out,events:1,total_amount:+s.amt_out})}),[this.commonService.sortDescByKey(a,"total_amount"),this.commonService.sortDescByKey(o,"total_amount")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-routing-peers"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Gu,5,Z.YE),e.Gf(zu,5,Z.YE),e.Gf(Wu,5),e.Gf(Xu,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sortIn=o.first),e.iGM(o=e.CRH())&&(a.sortOut=o.first),e.iGM(o=e.CRH())&&(a.paginatorIn=o.first),e.iGM(o=e.CRH())&&(a.paginatorOut=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Routing peers")}])],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between start","class","page-sub-title-container",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between start",1,"page-sub-title-container"],["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","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource"],["tableIn",""],["matColumnDef","chan_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","total_amount"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-2","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_incoming_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["mat-cell","","class","pl-2",4,"matCellDef"],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],["mat-cell","","fxLayoutAlign","end center",1,"pl-2"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],["mat-cell","",1,"pl-2"],["mat-stroked-button","","color","primary","type","button","tabindex","5",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,$u,2,1,"div",1),e.YNc(2,Dp,65,29,"div",2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage))},directives:[d.xw,d.Wh,p.O5,d.yH,p.mk,S.oO,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,P.pW,r.BZ,Z.YE,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,k.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-chan_id[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Jp(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",7),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let Ep=(()=>{class n{constructor(t){this.router=t,this.faChartBar=y.koM,this.links=[{link:"routingreport",name:"Routing"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Reports"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),e.YNc(8,Jp,2,3,"div",6),e.qZA(),e._UZ(9,"router-outlet"),e.qZA()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faChartBar),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.BU,p.sg,D.Nj,T.rH,T.lC],styles:[""]}),n})();var Ge=h(7671),ze=h(1210);function Qp(n,i){1&n&&e._UZ(0,"mat-progress-bar",16)}function Yp(n,i){if(1&n&&(e.TgZ(0,"div",17),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw();e.Q6J("@fadeIn",t.events.total_fee_msat),e.xp6(1),e.AsE("",e.xi3(2,3,t.events.total_fee_msat/1e3||0,"1.0-2")," Sats/",e.lcZ(3,6,(null==t.events||null==t.events.forwarding_events?null:t.events.forwarding_events.length)||0)," Events")}}function Hp(n,i){1&n&&(e.TgZ(0,"div",18),e._uU(1,"No routing report for the selected period"),e.qZA())}const Bp=function(n){return{"error-border":n}};function Vp(n,i){if(1&n&&(e.TgZ(0,"div",19),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(2,Bp,"Getting Forwarding History..."!==t.errorMessage&&""!==t.errorMessage)),e.xp6(1),e.Oqu(t.errorMessage)}}function Gp(n,i){if(1&n&&(e.TgZ(0,"span")(1,"span",22),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"span",22),e._uU(5),e.ALo(6,"number"),e.qZA()()),2&n){const t=i.model,a=e.oxw(2);e.xp6(2),e.hij("Events: ",e.lcZ(3,2,(a.selReportBy===a.reportBy.EVENTS?t.value:t.extra.totalEvents)||0),""),e.xp6(3),e.hij("Fee: ",e.xi3(6,4,(a.selReportBy===a.reportBy.EVENTS?t.extra.totalFees:t.value)||0,"1.0-2"),"")}}function zp(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"ngx-charts-bar-vertical",20),e.NdJ("select",function(o){return e.CHM(t),e.oxw().onChartBarSelected(o)})("mouseup",function(o){return e.CHM(t),e.oxw().onChartMouseUp(o)}),e.YNc(1,Gp,7,7,"ng-template",null,21,e.W1O),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("view",t.view)("results",t.routingReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function Wp(n,i){if(1&n&&e._UZ(0,"rtl-forwarding-history",23),2&n){const t=e.oxw();e.Q6J("eventsData",null==t.events?null:t.events.forwarding_events)("filterValue",t.eventFilterValue)}}let Xp=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.dataService=a,this.commonService=o,this.store=s,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.events={},this.eventFilterValue="",this.reportBy=l.Xr,this.selReportBy=l.Xr.FEES,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.cu,this.errorMessage="",this.unSubs=[new m.x,new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{t.identity_pubkey&&setTimeout(()=>{this.fetchEvents(this.startDate,this.endDate)},10)}),this.commonService.containerSizeUpdated.pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=t.width/10;break;case l.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}fetchEvents(t,a){this.errorMessage=l.m6.GET_FORWARDING_HISTORY;const o=Math.round(t.getTime()/1e3).toString(),s=Math.round(a.getTime()/1e3).toString();this.dataService.getForwardingHistory("LND",o,s).pipe((0,_.R)(this.unSubs[2])).subscribe({next:u=>{this.errorMessage="",u.forwarding_events&&u.forwarding_events.length?(u.forwarding_events=u.forwarding_events.reverse(),this.events=u,this.routingReportData=this.selReportBy===this.reportBy.EVENTS?this.prepareEventsReport(t):this.prepareFeeReport(t)):(this.events={forwarding_events:[],total_fee_msat:0},this.routingReportData=[])},error:u=>{this.errorMessage=u}})}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(t){this.eventFilterValue=this.reportPeriod===l.op[1]?t.name+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(t){const a=Math.round(t.getTime()/1e3),o=[];if(this.events.total_fee_msat=0,this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalEvents:0}});this.events.forwarding_events.map(s=>{const u=new Date(1e3*+s.timestamp).getMonth();return o[u].value=o[u].value+ +s.fee_msat/1e3,o[u].extra.totalEvents=o[u].extra.totalEvents+1,this.events.total_fee_msat=(this.events.total_fee_msat?this.events.total_fee_msat:0)+ +s.fee_msat,this.events})}else{for(let s=0;s{const u=Math.floor((+s.timestamp-a)/this.secondsInADay);return o[u].value=o[u].value+ +s.fee_msat/1e3,o[u].extra.totalEvents=o[u].extra.totalEvents+1,this.events.total_fee_msat=(this.events.total_fee_msat?this.events.total_fee_msat:0)+ +s.fee_msat,this.events})}return o}prepareEventsReport(t){const a=Math.round(t.getTime()/1e3),o=[];if(this.events.total_fee_msat=0,this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalFees:0}});this.events.forwarding_events.map(s=>{const u=new Date(1e3*+s.timestamp).getMonth();return o[u].value=o[u].value+1,o[u].extra.totalFees=o[u].extra.totalFees+ +s.fee_msat/1e3,this.events.total_fee_msat=(this.events.total_fee_msat?this.events.total_fee_msat:0)+ +s.fee_msat,this.events})}else{for(let s=0;s{const u=Math.floor((+s.timestamp-a)/this.secondsInADay);return o[u].value=o[u].value+1,o[u].extra.totalFees=o[u].extra.totalFees+ +s.fee_msat/1e3,this.events.total_fee_msat=(this.events.total_fee_msat?this.events.total_fee_msat:0)+ +s.fee_msat,this.events})}return o}onSelectionChange(t){const a=t.selDate.getMonth(),o=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,a,1,0,0,0),this.endDate=new Date(o,a,this.getMonthDays(a,o),23,59,59)),this.fetchEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(t,a){return 1===t&&a%4==0?l.gg[t].days+1:l.gg[t].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(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(j.D),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-routing-report"]],hostBindings:function(t,a){1&t&&e.NdJ("mouseup",function(s){return a.onChartMouseUp(s)})},decls:20,vars:9,consts:[["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 start",1,"my-1",3,"ngModel","ngModelChange","change"],[1,"mr-2"],["tabindex","1",1,"mr-2",3,"value"],["tabindex","2",3,"value"],["mode","indeterminate","class","mt-2",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x","my-1"],["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"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",3,"ngClass",4,"ngIf"],[1,"mt-1"],["class","one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],[3,"eventsData","filterValue",4,"ngIf"],["mode","indeterminate",1,"mt-2"],["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"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1",3,"ngClass"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),e.NdJ("stepChanged",function(s){return a.onSelectionChange(s)}),e.qZA(),e.TgZ(2,"div",2)(3,"mat-radio-group",3),e.NdJ("ngModelChange",function(s){return a.selReportBy=s})("change",function(){return a.onSelReportByChange()}),e.TgZ(4,"span",4),e._uU(5,"Report By: "),e.qZA(),e.TgZ(6,"mat-radio-button",5),e._uU(7,"Fees"),e.qZA(),e.TgZ(8,"mat-radio-button",6),e._uU(9,"Events"),e.qZA()()(),e.YNc(10,Qp,1,0,"mat-progress-bar",7),e.TgZ(11,"div",8),e.YNc(12,Yp,4,8,"div",9),e.YNc(13,Hp,2,0,"div",10),e.YNc(14,Vp,2,4,"div",11),e.TgZ(15,"div",12),e.YNc(16,zp,3,11,"ngx-charts-bar-vertical",13),e.qZA()(),e.TgZ(17,"div",14)(18,"div",12),e.YNc(19,Wp,1,2,"rtl-forwarding-history",15),e.qZA()()()),2&t&&(e.xp6(3),e.Q6J("ngModel",a.selReportBy),e.xp6(3),e.s9C("value",a.reportBy.FEES),e.xp6(2),e.s9C("value",a.reportBy.EVENTS),e.xp6(2),e.Q6J("ngIf","Getting Forwarding History..."===a.errorMessage),e.xp6(2),e.Q6J("ngIf",a.routingReportData.length>0&&a.events.forwarding_events&&a.events.forwarding_events.length&&a.events.forwarding_events.length>0),e.xp6(1),e.Q6J("ngIf",(a.routingReportData.length<=0||a.events.forwarding_events.length<=0)&&""===a.errorMessage),e.xp6(1),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(2),e.Q6J("ngIf",a.routingReportData.length>0&&a.events.forwarding_events&&a.events.forwarding_events.length&&a.events.forwarding_events.length>0),e.xp6(3),e.Q6J("ngIf",a.events&&(null==a.events?null:a.events.forwarding_events)&&a.events.forwarding_events.length&&a.events.forwarding_events.length>0))},directives:[d.xw,d.Wh,d.yH,Ge.D,ie.VQ,c.JJ,c.On,ie.U0,p.O5,P.pW,p.mk,S.oO,ze.K$,Be],pipes:[p.JJ],styles:[""],data:{animation:[Te.J]}}),n})();var $p=h(165);function jp(n,i){1&n&&(e.TgZ(0,"div",11),e._UZ(1,"mat-progress-bar",12),e.TgZ(2,"span"),e._uU(3,"Getting transactions data..."),e.qZA()())}function Kp(n,i){if(1&n&&(e.TgZ(0,"div",13),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function em(n,i){if(1&n&&(e.TgZ(0,"div",16),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE(" Paid ",e.xi3(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod/1e3||0,"1.0-2")," Sats/",e.lcZ(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function tm(n,i){if(1&n&&(e.TgZ(0,"div",16),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE(" Received ",e.xi3(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod/1e3||0,"1.0-2")," Sats/",e.lcZ(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function nm(n,i){if(1&n&&(e.TgZ(0,"div",14),e.YNc(1,em,4,7,"div",15),e.YNc(2,tm,4,7,"div",15),e.qZA()),2&n){const t=e.oxw();e.Q6J("@fadeIn",t.transactionsReportSummary),e.xp6(1),e.Q6J("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod>0),e.xp6(1),e.Q6J("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function am(n,i){1&n&&(e.TgZ(0,"div",17),e._uU(1,"No transactions report for the selected period"),e.qZA())}function im(n,i){if(1&n&&(e.TgZ(0,"span",21),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=i.model;e.xp6(1),e.HOy("",t.name,": ",e.xi3(2,4,t.value||0,"1.0-2"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",e.lcZ(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function om(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"ngx-charts-bar-vertical-2d",19),e.NdJ("select",function(o){return e.CHM(t),e.oxw(2).onChartBarSelected(o)})("mouseup",function(o){return e.CHM(t),e.oxw(2).onChartMouseUp(o)}),e.YNc(1,im,4,9,"ng-template",null,20,e.W1O),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("view",t.view)("results",t.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",t.reportPeriod===t.scrollRanges[0]?2:8)}}function sm(n,i){if(1&n&&(e.TgZ(0,"div",9),e.YNc(1,om,3,13,"ngx-charts-bar-vertical-2d",18),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.transactionsReportData.length>0&&t.transactionsNonZeroReportData.length>0)}}function lm(n,i){if(1&n&&e._UZ(0,"rtl-transactions-report-table",22),2&n){const t=e.oxw();e.Q6J("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let rm=(()=>{class n{constructor(t,a,o){this.logger=t,this.commonService=a,this.store=o,this.scrollRanges=l.op,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[{date:"",name:"1",series:[{extra:{total:0},name:"Paid",value:0},{extra:{total:0},name:"Received",value:0}]}],this.transactionsNonZeroReportData=[{amount_paid:0,amount_received:0,date:"",num_invoices:0,num_payments:0}],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.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(C.l5).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{t.apiCallStatus.status===l.Bn.UN_INITIATED&&this.store.dispatch((0,v.Jo)()),this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.payments=t.allLightningTransactions.listPaymentsAll.payments||[],this.invoices=t.allLightningTransactions.listInvoicesAll.invoices||[],(this.payments.length>0||this.invoices.length>0)&&(this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()),this.logger.info(t)}),this.commonService.containerSizeUpdated.pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=t.width/10;break;case l.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(t){this.transactionFilterValue=this.reportPeriod===l.op[1]?t.series+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,a){const o=Math.round(t.getTime()/1e3),s=Math.round(a.getTime()/1e3),u=[];this.transactionsNonZeroReportData=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const g=this.payments.filter(x=>"SUCCEEDED"===x.status&&x.creation_date>=o&&x.creation_datex.settled&&+x.creation_date>=o&&+x.creation_date{const q=new Date(1e3*+x.creation_date).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+ +x.value_msat+ +x.fee_msat,u[q].series[0].value=u[q].series[0].value+(+x.value_msat+ +x.fee_msat)/1e3,u[q].series[0].extra.total=u[q].series[0].extra.total+1,this.transactionsReportSummary}),U.map(x=>{const q=new Date(1e3*+x.creation_date).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+ +x.amt_paid_msat,u[q].series[1].value=u[q].series[1].value+ +x.amt_paid_msat/1e3,u[q].series[1].extra.total=u[q].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let x=0;x{const q=Math.floor((+x.creation_date-o)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+ +x.value_msat+ +x.fee_msat,u[q].series[0].value=u[q].series[0].value+(+x.value_msat+ +x.fee_msat)/1e3,u[q].series[0].extra.total=u[q].series[0].extra.total+1,this.transactionsReportSummary}),U.map(x=>{const q=Math.floor((+x.creation_date-o)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+ +x.amt_paid_msat,u[q].series[1].value=u[q].series[1].value+ +x.amt_paid_msat/1e3,u[q].series[1].extra.total=u[q].series[1].extra.total+1,this.transactionsReportSummary})}return u}prepareTableData(){return this.transactionsReportData.reduce((t,a)=>a.series[0].extra.total>0||a.series[1].extra.total>0?t.concat({date:a.date,amount_paid:a.series[0].value,num_payments:a.series[0].extra.total,amount_received:a.series[1].value,num_invoices:a.series[1].extra.total}):t,[])}onSelectionChange(t){const a=t.selDate.getMonth(),o=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,a,1,0,0,0),this.endDate=new Date(o,a,this.getMonthDays(a,o),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(t,a){return 1===t&&a%4==0?l.gg[t].days+1:l.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-transactions-report"]],hostBindings:function(t,a){1&t&&e.NdJ("mouseup",function(s){return a.onChartMouseUp(s)})},decls:11,vars:6,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100"],[3,"stepChanged"],["class","p-2",4,"ngIf"],["class","p-2 error-border my-2",4,"ngIf"],["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"],["class","mt-1",4,"ngIf"],[1,"mt-1"],[3,"dataList","dataRange","filterValue",4,"ngIf"],[1,"p-2"],["mode","indeterminate"],[1,"p-2","error-border","my-2"],["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"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[1,"two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"dataList","dataRange","filterValue"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"rtl-horizontal-scroller",3),e.NdJ("stepChanged",function(s){return a.onSelectionChange(s)}),e.qZA(),e.YNc(4,jp,4,0,"div",4),e.YNc(5,Kp,2,1,"div",5),e.YNc(6,nm,3,3,"div",6),e.YNc(7,am,2,0,"div",7),e.YNc(8,sm,2,1,"div",8),e.TgZ(9,"div",9),e.YNc(10,lm,1,3,"rtl-transactions-report-table",10),e.qZA()()()()),2&t&&(e.xp6(4),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.ERROR),e.xp6(1),e.Q6J("ngIf",a.transactionsNonZeroReportData.length>0&&a.apiCallStatus.status===a.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",a.transactionsNonZeroReportData.length<=0&&a.apiCallStatus.status===a.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",a.transactionsNonZeroReportData.length>0&&a.apiCallStatus.status===a.apiCallStatusEnum.COMPLETED),e.xp6(2),e.Q6J("ngIf",a.transactionsNonZeroReportData.length>0&&a.apiCallStatus.status===a.apiCallStatusEnum.COMPLETED))},directives:[d.xw,d.Wh,d.yH,Ge.D,p.O5,P.pW,ze.H5,$p.g],pipes:[p.JJ],styles:[""],data:{animation:[Te.J]}}),n})();const cm=["form"];function um(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"UTXO Label is required."),e.qZA())}function pm(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.labelError)}}function mm(n,i){if(1&n&&(e.TgZ(0,"div",16),e._UZ(1,"fa-icon",17),e.YNc(2,pm,2,1,"span",11),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.labelError)}}let dm=(()=>{class n{constructor(t,a,o,s,u,g){this.dialogRef=t,this.data=a,this.dataService=o,this.store=s,this.snackBar=u,this.commonService=g,this.faExclamationTriangle=y.eHv,this.utxo=null,this.label="",this.labelError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.utxo=this.data.utxo,this.label=this.utxo.label}onLabelUTXO(){if(!this.label||""===this.label)return!0;this.labelError="",this.dataService.labelUTXO(this.utxo.outpoint.txid_bytes,this.label,!0).pipe((0,_.R)(this.unSubs[0])).subscribe({next:t=>{this.store.dispatch((0,v.mC)()),this.store.dispatch((0,v.Ly)()),this.snackBar.open("Successfully labelled the UTXO."),this.dialogRef.close()},error:t=>{this.labelError=t}})}resetData(){this.labelError="",this.label=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(j.D),e.Y36(A.yh),e.Y36(te.ux),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-lebel-modal"]],viewQuery:function(t,a){if(1&t&&e.Gf(cm,7),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first)}},decls:20,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex.gt-sm","100"],["autoFocus","","matInput","","placeholder","UTXO Label","name","label","tabindex","1","required","",3,"ngModel","ngModelChange"],[4,"ngIf"],["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"],["mat-button","","color","primary","type","submit","tabindex","8"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Label UTXO"),e.qZA()(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7,8),e.NdJ("submit",function(){return a.onLabelUTXO()})("reset",function(){return a.resetData()}),e.TgZ(11,"mat-form-field",9)(12,"input",10),e.NdJ("ngModelChange",function(s){return a.label=s}),e.qZA(),e.YNc(13,um,2,0,"mat-error",11),e.qZA(),e.YNc(14,mm,3,2,"div",12),e.TgZ(15,"div",13)(16,"button",14),e._uU(17,"Clear"),e.qZA(),e.TgZ(18,"button",15),e._uU(19,"Label UTXO"),e.qZA()()()()()()),2&t&&(e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",a.label),e.xp6(1),e.Q6J("ngIf",!a.label),e.xp6(1),e.Q6J("ngIf",""!==a.labelError))},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,J.ZT,b.dn,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,p.O5,f.TO,M.BN],styles:[""]}),n})();function _m(n,i){1&n&&e._UZ(0,"mat-progress-bar",28)}function hm(n,i){1&n&&(e.TgZ(0,"th",29),e._uU(1," Transaction ID "),e.qZA())}function gm(n,i){1&n&&(e.TgZ(0,"span",35)(1,"mat-icon",36),e._uU(2,"warning"),e.qZA()())}function fm(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,gm,3,0,"span",34),e.qZA()),2&n){const t=e.oxw().$implicit;e.oxw();const a=e.MAs(34);e.xp6(1),e.Q6J("ngIf",t.amount_sat<1e3)("ngIfElse",a)}}const We=function(n){return{"max-width":n}};function Cm(n,i){if(1&n&&(e.TgZ(0,"td",30)(1,"span",31),e.YNc(2,fm,2,2,"span",32),e.TgZ(3,"span",33),e._uU(4),e.qZA()()()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(3,We,a.screenSize===a.screenSizeEnum.XS?"12rem":"25rem")),e.xp6(2),e.Q6J("ngIf",a.utxos.length>0&&a.dustUtxos.length>0&&!a.isDustUTXO),e.xp6(2),e.Oqu(t.outpoint.txid_str)}}function xm(n,i){1&n&&(e.TgZ(0,"th",37),e._uU(1," Output "),e.qZA())}function ym(n,i){if(1&n&&(e.TgZ(0,"td",38)(1,"span",39),e._uU(2),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(t.outpoint.output_index)}}function Tm(n,i){1&n&&(e.TgZ(0,"th",29),e._uU(1," Label "),e.qZA())}function bm(n,i){if(1&n&&(e.TgZ(0,"td",30),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,We,a.screenSize===a.screenSizeEnum.XS?"12rem":"25rem")),e.xp6(1),e.hij(" ",null==t?null:t.label," ")}}function vm(n,i){1&n&&(e.TgZ(0,"th",37),e._uU(1," Amount (Sats) "),e.qZA())}function Zm(n,i){if(1&n&&(e.TgZ(0,"td",38)(1,"span",39),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.amount_sat||0))}}function wm(n,i){1&n&&(e.TgZ(0,"th",37),e._uU(1," Confirmations "),e.qZA())}function Am(n,i){if(1&n&&(e.TgZ(0,"td",38)(1,"span",39),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.confirmations||0))}}function Sm(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",40)(1,"div",41)(2,"mat-select",42),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",43),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function Lm(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",44)(1,"div",45)(2,"mat-select",46),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",43),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onUTXOClick(s)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",43),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onLabelUTXO(s)}),e._uU(7,"Label"),e.qZA(),e.TgZ(8,"mat-option",43),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onLeaseUTXO(s)}),e._uU(9,"Lease"),e.qZA()()()()}}function km(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No UTXO available."),e.qZA())}function Fm(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting UTXOs..."),e.qZA())}function Nm(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function qm(n,i){if(1&n&&(e.TgZ(0,"td",47),e.YNc(1,km,2,0,"p",32),e.YNc(2,Fm,2,0,"p",32),e.YNc(3,Nm,2,1,"p",32),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Um=function(n){return{"display-none":n}};function Om(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Um,(null==t.listUTXOs?null:t.listUTXOs.data)&&(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)>0))}}function Rm(n,i){1&n&&e._UZ(0,"tr",49)}function Im(n,i){1&n&&e._UZ(0,"tr",50)}function Mm(n,i){1&n&&e._UZ(0,"mat-icon",36)}const Dm=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Pm=function(){return["no_utxo"]};let Jm=(()=>{class n{constructor(t,a,o,s,u,g){this.logger=t,this.commonService=a,this.dataService=o,this.store=s,this.rtlEffects=u,this.decimalPipe=g,this.isDustUTXO=!1,this.addressType=l.x$,this.faMoneyBillWave=y.aj4,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["amount_sat","confirmations","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["tx_id","output","amount_sat","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["tx_id","output","label","amount_sat","confirmations","actions"]):(this.flgSticky=!0,this.displayedColumns=["tx_id","output","label","amount_sat","confirmations","actions"])}ngOnInit(){this.store.select(C.T4).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),t.utxos&&t.utxos.length>0&&(this.dustUtxos=t.utxos.filter(a=>+a.amount_sat<1e3),this.utxos=t.utxos,this.loadUTXOsTable(this.isDustUTXO?this.dustUtxos:this.utxos)),this.logger.info(t)})}ngOnChanges(){!this.isDustUTXO&&this.utxos&&this.utxos.length>0&&this.loadUTXOsTable(this.utxos),this.isDustUTXO&&this.dustUtxos&&this.dustUtxos.length>0&&this.loadUTXOsTable(this.dustUtxos)}applyFilter(){this.listUTXOs.filter=this.selFilter.trim().toLowerCase()}onUTXOClick(t){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"UTXO Information",message:[[{key:"txid",value:t.outpoint.txid_str,title:"Transaction ID",width:100,type:l.Gi.STRING}],[{key:"label",value:t.label,title:"Label",width:100,type:l.Gi.STRING}],[{key:"output_index",value:t.outpoint.output_index,title:"Output Index",width:34,type:l.Gi.NUMBER},{key:"amount_sat",value:t.amount_sat,title:"Amount (Sats)",width:33,type:l.Gi.NUMBER},{key:"confirmations",value:t.confirmations,title:"Confirmations",width:33,type:l.Gi.NUMBER}],[{key:"address_type",value:this.addressType[t.address_type].name,title:"Address Type",width:34},{key:"address",value:t.address,title:"Address",width:66}],[{key:"pk_script",value:t.pk_script,title:"PK Script",width:100,type:l.Gi.STRING}]]}}}))}loadUTXOsTable(t){this.listUTXOs=new r.by([...t]),this.listUTXOs.filterPredicate=(a,o)=>((a.label?a.label.toLowerCase():"")+(a.outpoint.txid_str?a.outpoint.txid_str.toLowerCase():"")+(a.outpoint.output_index?a.outpoint.output_index:"")+(a.outpoint.txid_bytes?a.outpoint.txid_bytes.toLowerCase():"")+(a.address?a.address.toLowerCase():"")+(a.address_type?a.address_type.toLowerCase():"")+(a.amount_sat?a.amount_sat:"")+(a.confirmations?a.confirmations:"")+(a.pk_script?a.pk_script.toLowerCase():"")).includes(o),this.listUTXOs.sortingDataAccessor=(a,o)=>{switch(o){case"tx_id":return a.outpoint.txid_str.toLocaleLowerCase();case"output":return+a.outpoint.output_index;default:return a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null}},this.listUTXOs.sort=this.sort,this.listUTXOs.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.listUTXOs.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listUTXOs)}onLabelUTXO(t){this.store.dispatch((0,w.qR)({payload:{data:{utxo:t,component:dm}}}))}onLeaseUTXO(t){const a=[[{key:"txid_str",value:t.outpoint.txid_str,title:"Transaction ID",width:100}],[{key:"amount_sat",value:this.decimalPipe.transform(t.amount_sat),title:"Amount (Sats)",width:100}]];t.label&&a.splice(1,0,[{key:"label",value:t.label,title:"Label",width:100}]),this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Lease UTXO",informationMessage:"The UTXO will be leased for 10 minutes.",message:a,noBtnText:"Cancel",yesBtnText:"Lease UTXO"}}})),this.rtlEffects.closeConfirm.pipe((0,_.R)(this.unSubs[0])).subscribe(o=>{o&&this.dataService.leaseUTXO(t.outpoint.txid_bytes,t.outpoint.output_index)})}onDownloadCSV(){this.listUTXOs.data&&this.listUTXOs.data.length>0&&this.commonService.downloadFile(this.listUTXOs.data,"UTXOs")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(j.D),e.Y36(A.yh),e.Y36(oe.V),e.Y36(p.JJ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-utxos"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},inputs:{isDustUTXO:"isDustUTXO"},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("UTXOs")}]),e.TTD],decls:35,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","end stretch","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource","ngClass"],["table",""],["matColumnDef","tx_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","output"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","label"],["matColumnDef","amount_sat"],["matColumnDef","confirmations"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-3",4,"matCellDef"],["matColumnDef","no_utxo"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["emptySpace",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["fxLayout","row"],[4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Risk of dust attack","matTooltipPosition","right",4,"ngIf","ngIfElse"],["matTooltip","Risk of dust attack","matTooltipPosition","right"],["fxLayoutAlign","start center","color","warn",1,"small-icon"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"input",3),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(4,"div",4)(5,"div",5),e.YNc(6,_m,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,hm,2,0,"th",10),e.YNc(11,Cm,5,5,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,xm,2,0,"th",13),e.YNc(14,ym,3,1,"td",14),e.BQk(),e.ynx(15,15),e.YNc(16,Tm,2,0,"th",10),e.YNc(17,bm,2,4,"td",11),e.BQk(),e.ynx(18,16),e.YNc(19,vm,2,0,"th",13),e.YNc(20,Zm,4,3,"td",14),e.BQk(),e.ynx(21,17),e.YNc(22,wm,2,0,"th",13),e.YNc(23,Am,4,3,"td",14),e.BQk(),e.ynx(24,18),e.YNc(25,Sm,6,0,"th",19),e.YNc(26,Lm,10,0,"td",20),e.BQk(),e.ynx(27,21),e.YNc(28,qm,4,3,"td",22),e.BQk(),e.YNc(29,Om,1,3,"tr",23),e.YNc(30,Rm,1,0,"tr",24),e.YNc(31,Im,1,0,"tr",25),e.qZA(),e._UZ(32,"mat-paginator",26),e.qZA()()(),e.YNc(33,Mm,1,0,"ng-template",null,27,e.W1O)),2&t&&(e.xp6(3),e.Q6J("ngModel",a.selFilter),e.xp6(3),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.listUTXOs)("ngClass",e.VKq(11,Dm,""!==a.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(13,Pm)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.yH,d.Wh,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,X.gM,K.Hw,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-label[_ngcontent-%COMP%]{padding-left:1rem;flex:1 1 15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-tx_id[_ngcontent-%COMP%]{flex:1 1 15%}.mat-column-tx_id[_ngcontent-%COMP%] .ellipsis-child[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function Em(n,i){1&n&&e._UZ(0,"mat-progress-bar",28)}function Qm(n,i){1&n&&(e.TgZ(0,"th",29),e._uU(1," Date/Time "),e.qZA())}function Ym(n,i){if(1&n&&(e.TgZ(0,"td",30),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*t.time_stamp,"dd/MMM/y HH:mm"))}}function Hm(n,i){1&n&&(e.TgZ(0,"th",29),e._uU(1," Label "),e.qZA())}const Bm=function(n){return{"max-width":n}};function Vm(n,i){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,Bm,a.screenSize===a.screenSizeEnum.XS?"12rem":"25rem")),e.xp6(1),e.hij(" ",null==t?null:t.label," ")}}function Gm(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Amount (Sats) "),e.qZA())}function zm(n,i){if(1&n&&(e.TgZ(0,"span",35),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.amount))}}function Wm(n,i){if(1&n&&(e.TgZ(0,"span",36),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.hij("(",e.lcZ(2,1,-1*t.amount),")")}}function Xm(n,i){if(1&n&&(e.TgZ(0,"td",30),e.YNc(1,zm,3,3,"span",33),e.YNc(2,Wm,3,3,"span",34),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf",t.amount>0||0===t.amount),e.xp6(1),e.Q6J("ngIf",t.amount<0)}}function $m(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Fees (Sats) "),e.qZA())}function jm(n,i){if(1&n&&(e.TgZ(0,"td",30)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_fees))}}function Km(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Block Height "),e.qZA())}function ed(n,i){if(1&n&&(e.TgZ(0,"td",30)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.block_height))}}function td(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Confirmations "),e.qZA())}function nd(n,i){if(1&n&&(e.TgZ(0,"td",30)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.num_confirmations)," ")}}function ad(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",37)(1,"div",38)(2,"mat-select",39),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function id(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",41)(1,"button",42),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onTransactionClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function od(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No transaction available."),e.qZA())}function sd(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting transactions..."),e.qZA())}function ld(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function rd(n,i){if(1&n&&(e.TgZ(0,"td",43),e.YNc(1,od,2,0,"p",44),e.YNc(2,sd,2,0,"p",44),e.YNc(3,ld,2,1,"p",44),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.listTransactions&&t.listTransactions.data)||(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listTransactions&&t.listTransactions.data)||(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listTransactions&&t.listTransactions.data)||(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const cd=function(n){return{"display-none":n}};function ud(n,i){if(1&n&&e._UZ(0,"tr",45),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,cd,(null==t.listTransactions?null:t.listTransactions.data)&&(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)>0))}}function pd(n,i){1&n&&e._UZ(0,"tr",46)}function md(n,i){1&n&&e._UZ(0,"tr",47)}const dd=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},_d=function(){return["no_transaction"]};let hd=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.commonService=a,this.store=o,this.datePipe=s,this.faHistory=y.qO$,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["time_stamp","amount","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["time_stamp","amount","num_confirmations","total_fees","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["time_stamp","label","amount","total_fees","num_confirmations","actions"]):(this.flgSticky=!0,this.displayedColumns=["time_stamp","label","amount","total_fees","block_height","num_confirmations","actions"])}ngOnInit(){this.store.select(C.dx).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),t.transactions&&t.transactions.length>0&&(this.transactions=t.transactions,this.loadTransactionsTable(this.transactions)),this.logger.info(t)})}ngOnChanges(){this.transactions&&this.transactions.length>0&&this.loadTransactionsTable(this.transactions)}applyFilter(){this.listTransactions.filter=this.selFilter.trim().toLowerCase()}onTransactionClick(t){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Transaction Information",message:[[{key:"block_hash",value:t.block_hash,title:"Block Hash",width:100}],[{key:"tx_hash",value:t.tx_hash,title:"Transaction Hash",width:100}],[{key:"label",value:t.label,title:"Label",width:100,type:l.Gi.STRING}],[{key:"time_stamp",value:t.time_stamp,title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"block_height",value:t.block_height,title:"Block Height",width:50,type:l.Gi.NUMBER}],[{key:"num_confirmations",value:t.num_confirmations,title:"Number of Confirmations",width:34,type:l.Gi.NUMBER},{key:"total_fees",value:t.total_fees,title:"Total Fees (Sats)",width:33,type:l.Gi.NUMBER},{key:"amount",value:t.amount,title:"Amount (Sats)",width:33,type:l.Gi.NUMBER}],[{key:"dest_addresses",value:t.dest_addresses,title:"Destination Addresses",width:100,type:l.Gi.ARRAY}]],scrollable:t.dest_addresses&&t.dest_addresses.length>5}}}))}loadTransactionsTable(t){this.listTransactions=new r.by([...t]),this.listTransactions.sort=this.sort,this.listTransactions.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.listTransactions.filterPredicate=(a,o)=>((a.time_stamp?this.datePipe.transform(new Date(1e3*a.time_stamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(a).toLowerCase()).includes(o),this.listTransactions.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listTransactions)}onDownloadCSV(){this.listTransactions.data&&this.listTransactions.data.length>0&&this.commonService.downloadFile(this.listTransactions.data,"Transactions")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(p.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-transaction-history"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Transactions")}]),e.TTD],decls:36,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","end stretch","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource","ngClass"],["table",""],["matColumnDef","time_stamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","label"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","total_fees"],["matColumnDef","block_height"],["matColumnDef","num_confirmations"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_transaction"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",3,"ngStyle"],["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","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"input",3),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(4,"div",4)(5,"div",5),e.YNc(6,Em,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,Qm,2,0,"th",10),e.YNc(11,Ym,3,4,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,Hm,2,0,"th",10),e.YNc(14,Vm,2,4,"td",13),e.BQk(),e.ynx(15,14),e.YNc(16,Gm,2,0,"th",15),e.YNc(17,Xm,3,2,"td",11),e.BQk(),e.ynx(18,16),e.YNc(19,$m,2,0,"th",15),e.YNc(20,jm,4,3,"td",11),e.BQk(),e.ynx(21,17),e.YNc(22,Km,2,0,"th",15),e.YNc(23,ed,4,3,"td",11),e.BQk(),e.ynx(24,18),e.YNc(25,td,2,0,"th",15),e.YNc(26,nd,4,3,"td",11),e.BQk(),e.ynx(27,19),e.YNc(28,ad,6,0,"th",20),e.YNc(29,id,3,0,"td",21),e.BQk(),e.ynx(30,22),e.YNc(31,rd,4,3,"td",23),e.BQk(),e.YNc(32,ud,1,3,"tr",24),e.YNc(33,pd,1,0,"tr",25),e.YNc(34,md,1,0,"tr",26),e.qZA(),e._UZ(35,"mat-paginator",27),e.qZA()()()),2&t&&(e.xp6(3),e.Q6J("ngModel",a.selFilter),e.xp6(3),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.listTransactions)("ngClass",e.VKq(11,dd,""!==a.errorMessage)),e.xp6(25),e.Q6J("matFooterRowDef",e.DdM(13,_d)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.yH,d.Wh,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,R.gD,R.$L,Y.ey,k.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.uU,p.JJ],styles:[".mat-column-label[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function gd(n,i){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"UTXOs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numUtxos)}}function fd(n,i){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"Transactions"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numTransactions)}}function Cd(n,i){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"Dust UTXOs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numDustUtxos)}}let xd=(()=>{class n{constructor(t,a){this.logger=t,this.store=a,this.selectedTableIndex=0,this.selectedTableIndexChange=new e.vpe,this.numTransactions=0,this.numUtxos=0,this.numDustUtxos=0,this.unSubs=[new m.x,new m.x,new m.x]}ngOnInit(){this.store.dispatch((0,v.mC)()),this.store.dispatch((0,v.Ly)()),this.store.select(C.T4).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{t.utxos&&t.utxos.length>0&&(this.numUtxos=t.utxos.length,this.numDustUtxos=t.utxos.filter(a=>+a.amount_sat<1e3).length),this.logger.info(t)}),this.store.select(C.dx).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{t.transactions&&t.transactions.length>0&&(this.numTransactions=t.transactions.length),this.logger.info(t)})}onSelectedIndexChanged(t){this.selectedTableIndexChange.emit(t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-utxo-tables"]],inputs:{selectedTableIndex:"selectedTableIndex"},outputs:{selectedTableIndexChange:"selectedTableIndexChange"},decls:11,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"bordered-box"],[3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],["fxLayout","row","fxFlex","100",3,"isDustUTXO"],["fxLayout","row","fxFlex","100"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"mat-tab-group",1),e.NdJ("selectedIndexChange",function(s){return a.onSelectedIndexChanged(s)}),e.TgZ(2,"mat-tab"),e.YNc(3,gd,2,1,"ng-template",2),e._UZ(4,"rtl-on-chain-utxos",3),e.qZA(),e.TgZ(5,"mat-tab"),e.YNc(6,fd,2,1,"ng-template",2),e._UZ(7,"rtl-on-chain-transaction-history",4),e.qZA(),e.TgZ(8,"mat-tab"),e.YNc(9,Cd,2,1,"ng-template",2),e._UZ(10,"rtl-on-chain-utxos",3),e.qZA()()()),2&t&&(e.xp6(1),e.Q6J("selectedIndex",a.selectedTableIndex),e.xp6(3),e.Q6J("isDustUTXO",!1),e.xp6(6),e.Q6J("isDustUTXO",!0))},directives:[d.xw,d.yH,d.Wh,D.SP,D.uX,D.uD,fe.k,Jm,hd],styles:[""]}),n})();const yd=function(n,i){return[n,i]};function Td(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",12),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=null==s?null:s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.Q6J("active",a.activeLink===(null==t?null:t.link))("routerLink",e.WLB(3,yd,null==t?null:t.link,null==a.selectedTable?null:a.selectedTable.name)),e.xp6(1),e.Oqu(null==t?null:t.name)}}let bd=(()=>{class n{constructor(t,a,o){this.store=t,this.router=a,this.activatedRoute=o,this.selNode={},this.faExchangeAlt=y.Ssp,this.faChartPie=y.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"},{link:"sweep",name:"Sweep All"}],this.activeLink=this.links[0].link,this.tables=[{id:0,name:"utxos"},{id:1,name:"trans"},{id:2,name:"dustUtxos"}],this.selectedTable=this.tables[0],this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.selectedTable=this.tables.find(a=>a.name===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link,this.selectedTable=this.tables.find(s=>s.name===a.urlAfterRedirects.substring(a.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.$k).pipe((0,_.R)(this.unSubs[1])).subscribe(a=>{this.selNode=a}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[2])).subscribe(a=>{this.balances=[{title:"Total Balance",dataValue:a.blockchainBalance.total_balance||0},{title:"Confirmed",dataValue:a.blockchainBalance.confirmed_balance},{title:"Unconfirmed",dataValue:a.blockchainBalance.unconfirmed_balance}]})}onSelectedTableIndexChanged(t){this.selectedTable=this.tables.find(a=>a.id===t),this.router.navigate(["./",this.activeLink,this.selectedTable.name],{relativeTo:this.activatedRoute})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(T.F0),e.Y36(T.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain"]],decls:21,vars:5,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100",3,"selectedTableIndex","selectedTableIndexChange"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"On-chain Balance"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA()()(),e.TgZ(8,"div",0),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"On-chain Transactions"),e.qZA()(),e.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",7),e.YNc(16,Td,2,6,"div",8),e.qZA(),e.TgZ(17,"div",9),e._UZ(18,"router-outlet"),e.qZA(),e.TgZ(19,"div",10)(20,"rtl-utxo-tables",11),e.NdJ("selectedTableIndexChange",function(s){return a.onSelectedTableIndexChanged(s)}),e.qZA()()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faChartPie),e.xp6(6),e.Q6J("values",a.balances),e.xp6(2),e.Q6J("icon",a.faExchangeAlt),e.xp6(7),e.Q6J("ngForOf",a.links),e.xp6(4),e.Q6J("selectedTableIndex",null==a.selectedTable?null:a.selectedTable.id))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,ge.D,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC,xd],styles:[""]}),n})();var vd=h(9122);function Zd(n,i){if(1&n&&(e.TgZ(0,"mat-option",7),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.addressTp," ")}}let wd=(()=>{class n{constructor(t,a){this.store=t,this.lndEffects=a,this.addressTypes=l._t,this.selectedAddressType=l._t[0],this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,v._E)({payload:this.selectedAddressType})),this.lndEffects.setNewAddress.pipe((0,V.q)(1)).subscribe(t=>{this.newAddress=t,setTimeout(()=>{this.store.dispatch((0,w.qR)({payload:{data:{address:this.newAddress,addressType:this.selectedAddressType.addressTp,component:vd.n}}}))},0)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(ee.l))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-receive"]],decls:8,vars:2,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start end"],["fxFlex","48","fxFlex.gt-md","25","fxLayoutAlign","start end",1,"mr-2"],["placeholder","Address Type","name","address_type","tabindex","1",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"mt-2"],["mat-flat-button","","color","primary","tabindex","2",1,"top-minus-15px",3,"click"],[3,"value"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-select",3),e.NdJ("ngModelChange",function(s){return a.selectedAddressType=s}),e.YNc(4,Zd,2,2,"mat-option",4),e.qZA()(),e.TgZ(5,"div",5)(6,"button",6),e.NdJ("click",function(){return a.onGenerateAddress()}),e._uU(7,"Generate Address"),e.qZA()()()()),2&t&&(e.xp6(3),e.Q6J("ngModel",a.selectedAddressType),e.xp6(1),e.Q6J("ngForOf",a.addressTypes))},directives:[d.xw,d.Wh,f.KE,d.yH,R.gD,c.JJ,c.On,p.sg,Y.ey,k.lW],styles:[""]}),n})();var Ad=h(8012),Xe=h(8377);const Sd=["form"],Ld=["formSweepAll"],kd=["stepper"];function Fd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Bitcoin address is required."),e.qZA())}function Nd(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.amountError)}}function qd(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function Ud(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function Od(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Number of blocks is required."),e.qZA())}function Rd(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",23)(1,"input",32,33),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).transactionBlocks=o}),e.qZA(),e.YNc(3,Od,2,0,"mat-error",14),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.transactionBlocks)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.transactionBlocks)}}function Id(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function Md(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",23)(1,"input",34,35),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).transactionFees=o}),e.qZA(),e.YNc(3,Id,2,0,"mat-error",14),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.transactionFees)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.transactionFees)}}function Dd(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.sendFundError)}}function Pd(n,i){if(1&n&&(e.TgZ(0,"div",36),e._UZ(1,"fa-icon",37),e.YNc(2,Dd,2,1,"span",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.sendFundError)}}function Jd(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"form",9,10),e.NdJ("submit",function(){return e.CHM(t),e.oxw().onSendFunds()})("reset",function(){return e.CHM(t),e.oxw().resetData()}),e.TgZ(2,"mat-form-field",11)(3,"input",12,13),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().transactionAddress=o}),e.qZA(),e.YNc(5,Fd,2,0,"mat-error",14),e.qZA(),e.TgZ(6,"mat-form-field",15)(7,"input",16,17),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().transactionAmount=o}),e.qZA(),e.TgZ(9,"span",18),e._uU(10),e.qZA(),e.YNc(11,Nd,2,1,"mat-error",14),e.qZA(),e.TgZ(12,"mat-form-field",19)(13,"mat-select",20),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().onAmountUnitChange(o)}),e.YNc(14,qd,2,2,"mat-option",21),e.qZA()(),e.TgZ(15,"div",22)(16,"mat-form-field",23)(17,"mat-select",24),e.NdJ("valueChange",function(o){return e.CHM(t),e.oxw().selTransType=o}),e.YNc(18,Ud,2,2,"mat-option",21),e.qZA()(),e.YNc(19,Rd,4,4,"mat-form-field",25),e.YNc(20,Md,4,4,"mat-form-field",25),e.qZA(),e._UZ(21,"div",26),e.YNc(22,Pd,3,2,"div",27),e.TgZ(23,"div",28)(24,"button",29),e._uU(25,"Clear Fields"),e.qZA(),e.TgZ(26,"button",30),e._uU(27,"Send Funds"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.transactionAddress),e.xp6(2),e.Q6J("ngIf",!t.transactionAddress),e.xp6(2),e.Q6J("ngModel",t.transactionAmount)("step",100)("min",0),e.xp6(3),e.hij(" ",t.selAmountUnit," "),e.xp6(1),e.Q6J("ngIf",!t.transactionAmount),e.xp6(2),e.Q6J("value",t.selAmountUnit),e.xp6(1),e.Q6J("ngForOf",t.amountUnits),e.xp6(3),e.Q6J("value",t.selTransType),e.xp6(1),e.Q6J("ngForOf",t.transTypes),e.xp6(1),e.Q6J("ngIf","1"===t.selTransType),e.xp6(1),e.Q6J("ngIf","2"===t.selTransType),e.xp6(2),e.Q6J("ngIf",""!==t.sendFundError)}}function Ed(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(3);e.Oqu(t.passwordFormLabel)}}function Qd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Password is required."),e.qZA())}function Yd(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-step",42)(1,"form",61),e.YNc(2,Ed,1,1,"ng-template",55),e.TgZ(3,"div",0)(4,"mat-form-field",1),e._UZ(5,"input",62),e.YNc(6,Qd,2,0,"mat-error",14),e.qZA()(),e.TgZ(7,"div",63)(8,"button",64),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onAuthenticate()}),e._uU(9,"Confirm"),e.qZA()()()()}if(2&n){const t=e.oxw(2);e.Q6J("stepControl",t.passwordFormGroup)("editable",t.flgEditable),e.xp6(1),e.Q6J("formGroup",t.passwordFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.passwordFormGroup.controls.password.errors?null:t.passwordFormGroup.controls.password.errors.required)}}function Hd(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.sendFundFormLabel)}}function Bd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Bitcoin address is required."),e.qZA())}function Vd(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function Gd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Number of blocks is required."),e.qZA())}function zd(n,i){if(1&n&&(e.TgZ(0,"mat-form-field",65),e._UZ(1,"input",66),e.YNc(2,Gd,2,0,"mat-error",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("step",1)("min",0),e.xp6(1),e.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionBlocks.errors?null:t.sendFundFormGroup.controls.transactionBlocks.errors.required)}}function Wd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function Xd(n,i){if(1&n&&(e.TgZ(0,"mat-form-field",65),e._UZ(1,"input",67),e.YNc(2,Wd,2,0,"mat-error",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("step",1)("min",0),e.xp6(1),e.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionFees.errors?null:t.sendFundFormGroup.controls.transactionFees.errors.required)}}function $d(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.confirmFormLabel)}}function jd(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.sendFundError)}}function Kd(n,i){if(1&n&&(e.TgZ(0,"div",36),e._UZ(1,"fa-icon",37),e.YNc(2,jd,2,1,"span",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.sendFundError)}}function e_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",38)(1,"mat-vertical-stepper",39,40),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().stepSelectionChanged(o)}),e.YNc(3,Yd,10,4,"mat-step",41),e.TgZ(4,"mat-step",42)(5,"form",43),e.YNc(6,Hd,1,1,"ng-template",44),e.TgZ(7,"div",45)(8,"mat-form-field",46),e._UZ(9,"input",47),e.YNc(10,Bd,2,0,"mat-error",14),e.qZA(),e.TgZ(11,"mat-form-field",48)(12,"mat-select",49),e.YNc(13,Vd,2,2,"mat-option",21),e.qZA()(),e.YNc(14,zd,3,3,"mat-form-field",50),e.YNc(15,Xd,3,3,"mat-form-field",50),e.qZA(),e.TgZ(16,"div",51)(17,"button",52),e._uU(18,"Next"),e.qZA()()()(),e.TgZ(19,"mat-step",53)(20,"form",54),e.YNc(21,$d,1,1,"ng-template",55),e.TgZ(22,"div",38)(23,"div",56),e._UZ(24,"fa-icon",57),e.TgZ(25,"span"),e._uU(26,"You are about to sweep all funds from RTL. Are you sure?"),e.qZA()(),e.YNc(27,Kd,3,2,"div",27),e.TgZ(28,"div",51)(29,"button",58),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSendFunds()}),e._uU(30,"Sweep All Funds"),e.qZA()()()()()(),e.TgZ(31,"div",59)(32,"button",60),e._uU(33),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("linear",!0),e.xp6(2),e.Q6J("ngIf",!t.appConfig.sso.rtlSSO),e.xp6(1),e.Q6J("stepControl",t.sendFundFormGroup)("editable",t.flgEditable),e.xp6(1),e.Q6J("formGroup",t.sendFundFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionAddress.errors?null:t.sendFundFormGroup.controls.transactionAddress.errors.required),e.xp6(3),e.Q6J("ngForOf",t.transTypes),e.xp6(1),e.Q6J("ngIf","1"===t.sendFundFormGroup.controls.selTransType.value),e.xp6(1),e.Q6J("ngIf","2"===t.sendFundFormGroup.controls.selTransType.value),e.xp6(4),e.Q6J("stepControl",t.confirmFormGroup),e.xp6(1),e.Q6J("formGroup",t.confirmFormGroup),e.xp6(4),e.Q6J("icon",t.faExclamationTriangle),e.xp6(3),e.Q6J("ngIf",""!==t.sendFundError),e.xp6(5),e.Q6J("mat-dialog-close",!1),e.xp6(1),e.Oqu(t.flgValidated?"Close":"Cancel")}}let t_=(()=>{class n{constructor(t,a,o,s,u,g,U,x,q,re){this.dialogRef=t,this.data=a,this.logger=o,this.store=s,this.rtlEffects=u,this.commonService=g,this.decimalPipe=U,this.snackBar=x,this.actions=q,this.formBuilder=re,this.faExclamationTriangle=y.eHv,this.sweepAll=!1,this.selNode={},this.addressTypes=[],this.selectedAddress={},this.blockchainBalance={},this.information={},this.newAddress="",this.transactionAddress="",this.transactionAmount=null,this.transactionFees=null,this.transactionBlocks=null,this.transTypes=[{id:"1",name:"Target Confirmation Blocks"},{id:"2",name:"Fee"}],this.selTransType="1",this.fiatConversion=!1,this.amountUnits=l.uA,this.selAmountUnit=l.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=l.Xz,this.sendFundError="",this.flgValidated=!1,this.flgEditable=!0,this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds",this.confirmFormLabel="Confirm sweep",this.amountError="Amount is Required.",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.sweepAll=this.data.sweepAll,this.passwordFormGroup=this.formBuilder.group({hiddenPassword:["",[c.kI.required]],password:["",[c.kI.required]]}),this.sendFundFormGroup=this.formBuilder.group({transactionAddress:["",c.kI.required],transactionBlocks:[null],transactionFees:[null],selTransType:["1",c.kI.required]}),this.confirmFormGroup=this.formBuilder.group({}),this.sendFundFormGroup.controls.selTransType.valueChanges.pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{"1"===t?(this.sendFundFormGroup.controls.transactionBlocks.setValidators([c.kI.required]),this.sendFundFormGroup.controls.transactionBlocks.setValue(null),this.sendFundFormGroup.controls.transactionFees.setValidators(null),this.sendFundFormGroup.controls.transactionFees.setValue(null)):(this.sendFundFormGroup.controls.transactionBlocks.setValidators(null),this.sendFundFormGroup.controls.transactionBlocks.setValue(null),this.sendFundFormGroup.controls.transactionFees.setValidators([c.kI.required]),this.sendFundFormGroup.controls.transactionFees.setValue(null))}),this.store.select(Xe.Yj).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.appConfig=t}),this.store.select(Xe.dT).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.fiatConversion=t.settings.fiatConversion,this.amountUnits=t.settings.currencyUnits,this.logger.info(t)}),this.actions.pipe((0,_.R)(this.unSubs[3]),(0,E.h)(t=>t.type===l.uR.UPDATE_API_CALL_STATUS_LND||t.type===l.uR.SET_CHANNEL_TRANSACTION_RES_LND)).subscribe(t=>{t.type===l.uR.SET_CHANNEL_TRANSACTION_RES_LND&&(this.store.dispatch((0,w.jW)({payload:this.sweepAll?"All Funds Sent Successfully!":"Fund Sent Successfully!"})),this.dialogRef.close()),t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&t.payload.status===l.Bn.ERROR&&"SetChannelTransaction"===t.payload.action&&(this.sendFundError=t.payload.message)})}onAuthenticate(){if(!this.passwordFormGroup.controls.password.value)return!0;this.flgValidated=!1,this.store.dispatch((0,w.QO)({payload:Ad(this.passwordFormGroup.controls.password.value).toString()})),this.rtlEffects.isAuthorizedRes.pipe((0,V.q)(1)).subscribe(t=>{"ERROR"!==t?(this.passwordFormGroup.controls.hiddenPassword.setValue(this.passwordFormGroup.controls.password.value),this.stepper.next()):(this.dialogRef.close(),this.snackBar.open("Unauthorized User. Logging out from RTL."))})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="";const t={amount:this.transactionAmount?this.transactionAmount:0,sendAll:this.sweepAll};this.sweepAll?(t.address=this.sendFundFormGroup.controls.transactionAddress.value,"1"===this.sendFundFormGroup.controls.selTransType.value&&(t.blocks=this.sendFundFormGroup.controls.transactionBlocks.value),"2"===this.sendFundFormGroup.controls.selTransType.value&&(t.fees=this.sendFundFormGroup.controls.transactionFees.value)):(t.address=this.transactionAddress,"1"===this.selTransType&&(t.blocks=this.transactionBlocks),"2"===this.selTransType&&(t.fees=this.transactionFees)),this.transactionAmount&&this.selAmountUnit!==l.NT.SATS?this.commonService.convertCurrency(this.transactionAmount,this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit,l.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,_.R)(this.unSubs[4])).subscribe({next:a=>{this.selAmountUnit=l.NT.SATS,t.amount=+this.decimalPipe.transform(a[this.amountUnits[0]],this.currencyUnitFormats[this.amountUnits[0]]).replace(/,/g,""),this.store.dispatch((0,v.Wi)({payload:t}))},error:a=>{this.transactionAmount=null,this.selAmountUnit=l.NT.SATS,this.amountError="Conversion Error: "+a}}):this.store.dispatch((0,v.Wi)({payload:t}))}get invalidValues(){return this.sweepAll?!this.sendFundFormGroup.controls.transactionAddress.value||""===this.sendFundFormGroup.controls.transactionAddress.value||"1"===this.sendFundFormGroup.controls.selTransType.value&&(!this.sendFundFormGroup.controls.transactionBlocks.value||this.sendFundFormGroup.controls.transactionBlocks.value<=0)||"2"===this.sendFundFormGroup.controls.selTransType.value&&(!this.sendFundFormGroup.controls.transactionFees.value||this.sendFundFormGroup.controls.transactionFees.value<=0):!this.transactionAddress||""===this.transactionAddress||!this.transactionAmount||this.transactionAmount<=0||"1"===this.selTransType&&(!this.transactionBlocks||this.transactionBlocks<=0)||"2"===this.selTransType&&(!this.transactionFees||this.transactionFees<=0)}resetData(){this.sendFundError="",this.selTransType="1",this.transactionAddress="",this.transactionBlocks=null,this.transactionFees=null,this.sweepAll||(this.transactionAmount=null)}stepSelectionChanged(t){switch(this.sendFundError="",t.selectedIndex){case 0:default:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds";break;case 1:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds";break;case 2:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds | Address: "+this.sendFundFormGroup.controls.transactionAddress.value+" | "+this.transTypes[this.sendFundFormGroup.controls.selTransType.value-1].name+("2"===this.sendFundFormGroup.controls.selTransType.value?" (Sats/vByte)":"")+": "+("1"===this.sendFundFormGroup.controls.selTransType.value?this.sendFundFormGroup.controls.transactionBlocks.value:this.sendFundFormGroup.controls.transactionFees.value)}t.selectedIndex{this.selAmountUnit=t.value,a.transactionAmount=+a.decimalPipe.transform(g[s],a.currencyUnitFormats[s]).replace(/,/g,"")},error:g=>{a.transactionAmount=null,this.amountError="Conversion Error: "+g,this.selAmountUnit=o,s=o}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(N.mQ),e.Y36(A.yh),e.Y36(oe.V),e.Y36(O.v),e.Y36(p.JJ),e.Y36(te.ux),e.Y36(G.eX),e.Y36(c.qu))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-send-modal"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Sd,7),e.Gf(Ld,5),e.Gf(kd,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first),e.iGM(o=e.CRH())&&(a.formSweepAll=o.first),e.iGM(o=e.CRH())&&(a.stepper=o.first)}},decls:12,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100","class","overflow-x-hidden",3,"submit","reset",4,"ngIf","ngIfElse"],["sweepAllBlock",""],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex.gt-sm","55"],["autoFocus","","matInput","","placeholder","Bitcoin Address","tabindex","1","name","address","required","",3,"ngModel","ngModelChange"],["address","ngModel"],[4,"ngIf"],["fxFlex.gt-sm","30"],["matInput","","placeholder","Amount","name","amt","type","number","tabindex","2","required","",3,"ngModel","step","min","ngModelChange"],["amnt","ngModel"],["matSuffix",""],["fxFlex.gt-sm","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxFlex.gt-sm","60","fxLayout.gt-sm","row wrap","fxLayoutAlign","start stretch","fxLayoutAlign.gt-sm","space-between start"],["fxFlex","48"],["tabindex","4",3,"value","valueChange"],["fxFlex","48",4,"ngIf"],["fxLayout","column","fxFlex","100","fxFlex.gt-sm","40","fxLayout.gt-sm","row wrap","fxLayoutAlign","start stretch","fxLayoutAlign.gt-sm","space-between start"],["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"],["mat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["matInput","","placeholder","Number of Blocks","type","number","name","blcks","required","","tabindex","5",3,"ngModel","step","min","ngModelChange"],["blocks","ngModel"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","chainFees","required","","tabindex","6",3,"ngModel","step","min","ngModelChange"],["fees","ngModel"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable",4,"ngIf"],[3,"stepControl","editable"],["fxLayout","column",1,"my-1","pr-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxLayout","column","fxFlex","98","fxLayout.gt-sm","row wrap","fxLayoutAlign","start stretch","fxLayoutAlign.gt-sm","space-between start"],["fxFlex.gt-sm","45"],["matInput","","formControlName","transactionAddress","placeholder","Bitcoin Address","tabindex","4","name","address","required",""],["fxFlex.gt-sm","25"],["formControlName","selTransType","tabindex","5"],["fxFlex.gt-sm","25","fxLayoutAlign","start end",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","8","type","button","matStepperNext",""],[3,"stepControl"],["fxLayout","column","fxLayoutAlign","start",1,"my-1","pr-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100",1,"w-100","alert","alert-warn"],[1,"mt-1","mr-1","alert-icon",3,"icon"],["mat-button","","color","primary","tabindex","9","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","space-between",1,"my-1","pr-1",3,"formGroup"],["autoFocus","","matInput","","placeholder","Password","type","password","tabindex","1","formControlName","password","required",""],["fxLayout","row",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","button",3,"click"],["fxFlex.gt-sm","25","fxLayoutAlign","start end"],["matInput","","formControlName","transactionBlocks","placeholder","Number of Blocks","type","number","name","blcks","required","","tabindex","6",3,"step","min"],["matInput","","formControlName","transactionFees","placeholder","Fees (Sats/vByte)","type","number","name","chainFees","required","","tabindex","7",3,"step","min"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5),e.qZA()(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6),e.YNc(9,Jd,28,14,"form",7),e.qZA()()(),e.YNc(10,e_,34,15,"ng-template",null,8,e.W1O)),2&t){const o=e.MAs(11);e.xp6(5),e.Oqu(a.sweepAll?"Sweep All Funds":"Send Funds"),e.xp6(1),e.Q6J("mat-dialog-close",!1),e.xp6(3),e.Q6J("ngIf",!a.sweepAll)("ngIfElse",o)}},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,J.ZT,b.dn,p.O5,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,f.TO,c.wV,c.qQ,$.q,f.R9,R.gD,p.sg,Y.ey,M.BN,B.Vq,B.C0,c.sg,B.VY,c.u,B.Ic],styles:[""]}),n})(),$e=(()=>{class n{constructor(t,a){this.store=t,this.activatedRoute=a,this.sweepAll=!1,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.activatedRoute.data.pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.sweepAll=t.sweepAll})}openSendFundsModal(){this.store.dispatch((0,w.qR)({payload:{data:{sweepAll:this.sweepAll,component:t_}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(T.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"button",2),e.NdJ("click",function(){return a.openSendFundsModal()}),e._uU(3),e.qZA()()()),2&t&&(e.xp6(3),e.Oqu(a.sweepAll?"Sweep All":"Send Funds"))},directives:[d.xw,d.yH,d.Wh,k.lW],styles:[""]}),n})();function n_(n,i){1&n&&e._UZ(0,"mat-progress-bar",26)}function a_(n,i){if(1&n&&e._UZ(0,"rtl-node-info",27),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!0)}}function i_(n,i){if(1&n&&e._UZ(0,"rtl-channel-status-info",28),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[3]+" "+t.errorMessages[4])}}function o_(n,i){if(1&n&&e._UZ(0,"rtl-fee-info",29),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[2])}}const je=function(n){return{"dashboard-card-content":!0,"error-border":n}};function s_(n,i){if(1&n&&(e.TgZ(0,"mat-grid-tile",13)(1,"div",14)(2,"div",15)(3,"div",16),e._UZ(4,"fa-icon",17),e.TgZ(5,"span"),e._uU(6),e.qZA()()(),e.TgZ(7,"div",18)(8,"mat-card",19)(9,"mat-card-content",20),e.YNc(10,n_,1,0,"mat-progress-bar",21),e.TgZ(11,"div",22),e.YNc(12,a_,1,2,"rtl-node-info",23),e.YNc(13,i_,1,2,"rtl-channel-status-info",24),e.YNc(14,o_,1,2,"rtl-fee-info",25),e.qZA()()()()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(4),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(3),e.Q6J("ngClass",e.VKq(10,je,"node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.ERROR||"status"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||a.apiCallStatusPendingChannels.status===a.apiCallStatusEnum.ERROR)||"fee"===t.id&&a.apiCallStatusFees.status===a.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.INITIATED||"status"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||a.apiCallStatusPendingChannels.status===a.apiCallStatusEnum.INITIATED)||"fee"===t.id&&a.apiCallStatusFees.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","status"),e.xp6(1),e.Q6J("ngSwitchCase","fee")}}function l_(n,i){if(1&n&&(e.TgZ(0,"mat-grid-list",11),e.YNc(1,s_,15,12,"mat-grid-tile",12),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.nodeCards)}}function r_(n,i){1&n&&e._UZ(0,"mat-progress-bar",26)}function c_(n,i){1&n&&e.GkF(0)}function u_(n,i){if(1&n&&(e.TgZ(0,"div",33),e.YNc(1,c_,1,0,"ng-container",34),e.qZA()),2&n){const t=e.oxw(2),a=e.MAs(9),o=e.MAs(11);e.xp6(1),e.Q6J("ngTemplateOutlet",t.apiCallStatusNetwork.status===t.apiCallStatusEnum.ERROR?a:o)}}function p_(n,i){1&n&&e.GkF(0)}function m_(n,i){if(1&n&&(e.TgZ(0,"div",33),e.YNc(1,p_,1,0,"ng-container",34),e.qZA()),2&n){const t=e.oxw(2),a=e.MAs(9),o=e.MAs(13);e.xp6(1),e.Q6J("ngTemplateOutlet",t.apiCallStatusNetwork.status===t.apiCallStatusEnum.ERROR?a:o)}}function d_(n,i){1&n&&e.GkF(0)}function __(n,i){if(1&n&&(e.TgZ(0,"div",33),e.YNc(1,d_,1,0,"ng-container",34),e.qZA()),2&n){const t=e.oxw(2),a=e.MAs(9),o=e.MAs(15);e.xp6(1),e.Q6J("ngTemplateOutlet",t.apiCallStatusNetwork.status===t.apiCallStatusEnum.ERROR?a:o)}}function h_(n,i){if(1&n&&(e.TgZ(0,"mat-grid-tile",30)(1,"mat-card",31)(2,"mat-card-content",20),e.YNc(3,r_,1,0,"mat-progress-bar",21),e.TgZ(4,"div",22),e.YNc(5,u_,2,1,"div",32),e.YNc(6,m_,2,1,"div",32),e.YNc(7,__,2,1,"div",32),e.qZA()()()()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(2),e.Q6J("ngClass",e.VKq(8,je,a.apiCallStatusNetwork.status===a.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf",a.apiCallStatusNetwork.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","general"),e.xp6(1),e.Q6J("ngSwitchCase","channels"),e.xp6(1),e.Q6J("ngSwitchCase","degrees")}}function g_(n,i){if(1&n&&(e.TgZ(0,"div",35)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessages[1])}}function f_(n,i){if(1&n&&(e.TgZ(0,"div",36)(1,"div")(2,"h4",37),e._uU(3,"Network Capacity"),e.qZA(),e.TgZ(4,"div",38),e._uU(5),e.ALo(6,"number"),e.qZA()(),e.TgZ(7,"div")(8,"h4",37),e._uU(9,"Number of Nodes"),e.qZA(),e.TgZ(10,"div",38),e._uU(11),e.ALo(12,"number"),e.qZA()(),e.TgZ(13,"div")(14,"h4",37),e._uU(15,"Number of Channels"),e.qZA(),e.TgZ(16,"span",38),e._uU(17),e.ALo(18,"number"),e.qZA()()()),2&n){const t=e.oxw();e.xp6(5),e.hij("",e.lcZ(6,3,t.networkInfo.total_network_capacity)," Sats"),e.xp6(6),e.Oqu(e.lcZ(12,5,t.networkInfo.num_nodes)),e.xp6(6),e.Oqu(e.lcZ(18,7,t.networkInfo.num_channels))}}function C_(n,i){if(1&n&&(e.TgZ(0,"div",36)(1,"div")(2,"h4",37),e._uU(3,"Max Channel Size"),e.qZA(),e.TgZ(4,"div",38),e._uU(5),e.ALo(6,"number"),e.qZA()(),e.TgZ(7,"div")(8,"h4",37),e._uU(9,"Avg Channel Size"),e.qZA(),e.TgZ(10,"div",38),e._uU(11),e.ALo(12,"number"),e.qZA()(),e.TgZ(13,"div")(14,"h4",37),e._uU(15,"Min Channel Size"),e.qZA(),e.TgZ(16,"span",38),e._uU(17),e.ALo(18,"number"),e.qZA()()()),2&n){const t=e.oxw();e.xp6(5),e.Oqu(e.lcZ(6,3,t.networkInfo.max_channel_size)),e.xp6(6),e.Oqu(e.lcZ(12,5,t.networkInfo.avg_channel_size)),e.xp6(6),e.Oqu(e.lcZ(18,7,t.networkInfo.min_channel_size))}}function x_(n,i){if(1&n&&(e.TgZ(0,"div",36)(1,"div")(2,"h4",37),e._uU(3,"Max Out Degree"),e.qZA(),e.TgZ(4,"div",38),e._uU(5),e.ALo(6,"number"),e.qZA()(),e.TgZ(7,"div")(8,"h4",37),e._uU(9,"Avg Out Degree"),e.qZA(),e.TgZ(10,"div",38),e._uU(11),e.ALo(12,"number"),e.qZA()(),e.TgZ(13,"div",39),e._UZ(14,"h4",37)(15,"span",38),e.qZA()()),2&n){const t=e.oxw();e.xp6(5),e.Oqu(e.lcZ(6,2,t.networkInfo.max_out_degree)),e.xp6(6),e.Oqu(e.xi3(12,4,t.networkInfo.avg_out_degree,"1.0-2"))}}const y_=function(n){return{"mt-1":n}};let T_=(()=>{class n{constructor(t,a,o){this.logger=t,this.commonService=a,this.store=o,this.faProjectDiagram=y.TmZ,this.faBolt=y.BDt,this.faServer=y.xf3,this.faNetworkWired=y.kXW,this.selNode={},this.information={},this.channelsStatus={},this.networkInfo={},this.networkCards=[],this.nodeCards=[],this.screenSize="",this.screenSizeEnum=l.cu,this.userPersonaEnum=l.ol,this.errorMessages=["","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusNetwork=null,this.apiCallStatusFees=null,this.apiCallStatusChannels=null,this.apiCallStatusPendingChannels=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.networkCards=[{id:"general",cols:3,rows:1},{id:"channels",cols:3,rows:1},{id:"degrees",cols:3,rows:1}],this.nodeCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:3,rows:1},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:3,rows:1}]):(this.networkCards=[{id:"general",cols:1,rows:1},{id:"channels",cols:1,rows:1},{id:"degrees",cols:1,rows:1}],this.nodeCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:1,rows:1},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:1,rows:1},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:1,rows:1}])}ngOnInit(){this.store.select(C.bx).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=t.apiCallStatus,this.apiCallStatusNodeInfo.status===l.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.selNode=t.nodeSettings,this.information=t.information}),this.store.select(C.N7).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusNetwork=t.apiCallStatus,this.apiCallStatusNetwork.status===l.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusNetwork.message?JSON.stringify(this.apiCallStatusNetwork.message):this.apiCallStatusNetwork.message),this.networkInfo=t.networkInfo}),this.store.select(C.JG).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[2]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===l.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees}),this.store.select(C.ni).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusPendingChannels=t.apiCallStatus,this.apiCallStatusPendingChannels.status===l.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusPendingChannels.message?JSON.stringify(this.apiCallStatusPendingChannels.message):this.apiCallStatusPendingChannels.message),this.channelsStatus.pending={num_channels:t.pendingChannelsSummary.open.num_channels,capacity:t.pendingChannelsSummary.open.limbo_balance},this.channelsStatus.closing={num_channels:t.pendingChannelsSummary.closing.num_channels+t.pendingChannelsSummary.force_closing.num_channels+t.pendingChannelsSummary.waiting_close.num_channels,capacity:t.pendingChannelsSummary.total_limbo_balance}}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.errorMessages[3]="",this.apiCallStatusChannels=t.apiCallStatus,this.apiCallStatusChannels.status===l.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message),this.channelsStatus.active=t.channelsSummary.active,this.channelsStatus.inactive=t.channelsSummary.inactive,this.logger.info(t)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-network-info"]],decls:16,vars:6,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch",1,"mb-4"],["cols","3","rowHeight","330px",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container",3,"ngClass"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","3","rowHeight","250px"],["fxLayout","row",3,"colspan","rowspan",4,"ngFor","ngForOf"],["errorBlock",""],["generalBlock",""],["channelsBlock",""],["degreesBlock",""],["cols","3","rowHeight","330px"],["class","node-grid-tile",3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"node-grid-tile",3,"colspan","rowspan"],["fxLayout","column","fxLayoutAlign","stretch start","fxFlex","100",1,"h-100"],["fxLayout","row","fxLayoutAlign","start start",1,"w-100"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container"],[1,"mr-1",3,"icon"],["fxLayout","column","fxLayoutAlign","stretch center","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","center stretch",1,"w-100","h-93"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","w-96","h-93"],["fxLayout","column","fxFlex","100",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxLayout","row",3,"colspan","rowspan"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","h-93"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100"],[4,"ngTemplateOutlet"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxFlex","20"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,l_,2,1,"mat-grid-list",1),e.TgZ(2,"div",2),e._UZ(3,"fa-icon",3),e.TgZ(4,"span",4),e._uU(5,"Network"),e.qZA()(),e.TgZ(6,"mat-grid-list",5),e.YNc(7,h_,8,10,"mat-grid-tile",6),e.qZA()(),e.YNc(8,g_,3,1,"ng-template",null,7,e.W1O),e.YNc(10,f_,19,9,"ng-template",null,8,e.W1O),e.YNc(12,C_,19,9,"ng-template",null,9,e.W1O),e.YNc(14,x_,16,7,"ng-template",null,10,e.W1O)),2&t&&(e.xp6(1),e.Q6J("ngIf",a.selNode.userPersona!==a.userPersonaEnum.OPERATOR),e.xp6(1),e.Q6J("ngClass",e.VKq(4,y_,a.screenSize!==a.screenSizeEnum.XS)),e.xp6(1),e.Q6J("icon",a.faProjectDiagram),e.xp6(4),e.Q6J("ngForOf",a.networkCards))},directives:[d.xw,d.Wh,p.O5,ce.Il,p.sg,ce.DX,d.yH,M.BN,b.a8,b.dn,p.mk,S.oO,P.pW,p.RF,p.n9,Ne,Ue,qe,p.tP],pipes:[p.JJ],styles:[""]}),n})();function b_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let v_=(()=>{class n{constructor(t){this.router=t,this.faDownload=y.q7m,this.links=[{link:"bckup",name:"Backup"},{link:"restore",name:"Restore"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-backup"]],decls:11,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Channels Backup"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),e.YNc(8,b_,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faDownload),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC],styles:[""]}),n})();function Z_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",23)(1,"h4",24),e._uU(2),e.qZA(),e.TgZ(3,"div",25)(4,"button",26),e.NdJ("click",function(){return e.CHM(t),e.oxw().onRestoreChannels({})}),e._uU(5,"Restore All"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(2),e.hij("Restore folder location: ",t.selNode.channelBackupPath,"/restore")}}function w_(n,i){if(1&n&&(e.TgZ(0,"div",27)(1,"h4",24),e._uU(2),e.qZA(),e.TgZ(3,"h4",28),e._uU(4,"All channel backup file not found! To perform channel restoration, channel backup file/s must be placed at the above location."),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.hij("Restore folder location: ",t.selNode.channelBackupPath,"/restore")}}function A_(n,i){if(1&n&&(e.TgZ(0,"div",27)(1,"h4",24),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.hij("Restore folder location: ",t.selNode.channelBackupPath,"/restore")}}function S_(n,i){1&n&&e._UZ(0,"mat-progress-bar",29)}function L_(n,i){1&n&&(e.TgZ(0,"th",30),e._uU(1," Channel Point "),e.qZA())}const k_=function(n){return{"max-width":n}};function F_(n,i){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,k_,a.screenSize===a.screenSizeEnum.XS?"10rem":"45rem")),e.xp6(1),e.Oqu(null==t?null:t.channel_point)}}function N_(n,i){1&n&&(e.TgZ(0,"th",32)(1,"span",33),e._uU(2,"Actions"),e.qZA()())}function q_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",34)(1,"span",33)(2,"button",35),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onRestoreChannels(s)}),e._uU(3,"Restore"),e.qZA()()()}}function U_(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No singular channel backups available."),e.qZA())}function O_(n,i){if(1&n&&(e.TgZ(0,"td",36),e.YNc(1,U_,2,0,"p",37),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.channels||!t.channels.data||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)}}const R_=function(n){return{"display-none":n}};function I_(n,i){if(1&n&&e._UZ(0,"tr",38),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,R_,t.channels&&t.channels.data&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function M_(n,i){1&n&&e._UZ(0,"tr",39)}function D_(n,i){1&n&&e._UZ(0,"tr",40)}const P_=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},J_=function(){return["no_channel"]};let E_=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.store=a,this.lndEffects=o,this.commonService=s,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.selNode={},this.displayedColumns=["channel_point","actions"],this.channelsData=[],this.allRestoreExists=!1,this.flgLoading=[!0],this.flgSticky=!1,this.selFilter="",this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.dispatch((0,v.tb)()),this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.lndEffects.setRestoreChannelList.pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.allRestoreExists=t.all_restore_exists,this.channelsData=t.files,this.channelsData.length>0&&this.loadRestoreTable(this.channelsData),("error"!==this.flgLoading[0]||t&&t.files)&&(this.flgLoading[0]=!1),this.logger.info(t)})}ngAfterViewInit(){this.channelsData&&this.channelsData.length>0&&this.loadRestoreTable(this.channelsData)}onRestoreChannels(t){this.store.dispatch((0,v.vV)({payload:{channelPoint:t.channel_point?t.channel_point:"ALL"}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}loadRestoreTable(t){this.channels=new r.by([...t]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.channels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.channels.paginator=this.paginator,this.applyFilter()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(ee.l),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-restore-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:24,vars:17,consts:[["fxLayout","column",1,"mt-2"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between start","fxLayout.gt-md","row wrap",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container","mt-2"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","channel_point"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["fxFlex","100"],["fxLayout","row",1,"mt-2"],["mat-flat-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxLayoutAlign","space-between start","fxLayout.gt-md","row wrap"],["fxFlex","100",1,"mt-1"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","",1,"pr-3"],["fxLayoutAlign","end center"],["mat-cell",""],["mat-stroked-button","","color","primary","type","button","tabindex","1",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Z_,6,1,"div",1),e.YNc(2,w_,5,1,"div",2),e.YNc(3,A_,3,1,"div",2),e.TgZ(4,"div",3),e._UZ(5,"div",4),e.TgZ(6,"mat-form-field",5)(7,"input",6),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(8,"div",7),e.YNc(9,S_,1,0,"mat-progress-bar",8),e.TgZ(10,"table",9,10),e.ynx(12,11),e.YNc(13,L_,2,0,"th",12),e.YNc(14,F_,2,4,"td",13),e.BQk(),e.ynx(15,14),e.YNc(16,N_,3,0,"th",15),e.YNc(17,q_,4,0,"td",16),e.BQk(),e.ynx(18,17),e.YNc(19,O_,2,1,"td",18),e.BQk(),e.YNc(20,I_,1,3,"tr",19),e.YNc(21,M_,1,0,"tr",20),e.YNc(22,D_,1,0,"tr",21),e.qZA()(),e._UZ(23,"mat-paginator",22),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",a.allRestoreExists),e.xp6(1),e.Q6J("ngIf",!a.allRestoreExists&&(!a.channels||(null==a.channels||null==a.channels.data?null:a.channels.data.length)<=0)),e.xp6(1),e.Q6J("ngIf",!a.allRestoreExists&&a.channels&&(null==a.channels||null==a.channels.data?null:a.channels.data.length)&&(null==a.channels||null==a.channels.data?null:a.channels.data.length)>0),e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",!0===a.flgLoading[0]),e.xp6(1),e.Q6J("dataSource",a.channels)("ngClass",e.VKq(14,P_,"error"===a.flgLoading[0])),e.xp6(10),e.Q6J("matFooterRowDef",e.DdM(16,J_)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,p.O5,d.Wh,d.yH,k.lW,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Q_(n,i){1&n&&e._UZ(0,"mat-progress-bar",31)}function Y_(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Channel Point "),e.qZA())}const H_=function(n){return{"max-width":n}};function B_(n,i){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,H_,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(null==t?null:t.channel_point)}}function V_(n,i){1&n&&(e.TgZ(0,"th",34)(1,"span",35),e._uU(2,"Actions"),e.qZA()())}function G_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",36)(1,"div",37)(2,"mat-select",38),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",39),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onChannelClick(u,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",39),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onBackupChannels(s)}),e._uU(7,"Backup"),e.qZA(),e.TgZ(8,"mat-option",39),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onDownloadBackup(s)}),e._uU(9,"Download Backup"),e.qZA(),e.TgZ(10,"mat-option",39),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onVerifyChannels(s)}),e._uU(11,"Verify"),e.qZA()()()()}}function z_(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No channel available."),e.qZA())}function W_(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting channels..."),e.qZA())}function X_(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function $_(n,i){if(1&n&&(e.TgZ(0,"td",40),e.YNc(1,z_,2,0,"p",41),e.YNc(2,W_,2,0,"p",41),e.YNc(3,X_,2,1,"p",41),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const j_=function(n){return{"display-none":n}};function K_(n,i){if(1&n&&e._UZ(0,"tr",42),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,j_,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function eh(n,i){1&n&&e._UZ(0,"tr",43)}function th(n,i){1&n&&e._UZ(0,"tr",44)}const nh=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},ah=function(){return["no_channel"]};let ih=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.store=a,this.actions=o,this.commonService=s,this.faInfoCircle=y.sqG,this.faExclamationTriangle=y.eHv,this.faArchive=y.N2j,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.selNode={},this.displayedColumns=["channel_point","actions"],this.channelsData=[],this.flgSticky=!1,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.channelsData=t.channels,this.channelsData.length>0&&this.loadBackupTable(this.channelsData),this.logger.info(t)}),this.actions.pipe((0,_.R)(this.unSubs[2]),(0,E.h)(t=>t.type===l.uR.SET_CHANNELS_LND||t.type===l.pg.SHOW_FILE)).subscribe(t=>{t.type===l.uR.SET_CHANNELS_LND&&(this.selectedChannel=null),t.type===l.pg.SHOW_FILE&&(this.commonService.downloadFile(t.payload,"channel-"+(this.selectedChannel.channel_point?this.selectedChannel.channel_point:"all"),".bak",".bak"),this.selectedChannel=null)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadBackupTable(this.channelsData)}onBackupChannels(t){this.store.dispatch((0,v.Vv)({payload:{uiMessage:l.m6.BACKUP_CHANNEL,channelPoint:t.channel_point?t.channel_point:"ALL",showMessage:""}}))}onVerifyChannels(t){this.store.dispatch((0,v.Cp)({payload:{channelPoint:t.channel_point?t.channel_point:"ALL"}}))}onDownloadBackup(t){this.selectedChannel=t,this.store.dispatch((0,w.dc)({payload:{channelPoint:t.channel_point?t.channel_point:"all"}}))}onChannelClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{channel:t,showCopy:!1,component:xe}}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}loadBackupTable(t){this.channels=new r.by(t?[...t]:[]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.channels.paginator=this.paginator,this.channels.filterPredicate=(a,o)=>((a.active?"active":"inactive")+(a.channel_point?a.channel_point.toLowerCase():"")+(a.chan_id?a.chan_id.toLowerCase():"")+(a.remote_pubkey?a.remote_pubkey.toLowerCase():"")+(a.remote_alias?a.remote_alias.toLowerCase():"")+(a.capacity?a.capacity:"")+(a.local_balance?a.local_balance:"")+(a.remote_balance?a.remote_balance:"")+(a.total_satoshis_sent?a.total_satoshis_sent:"")+(a.total_satoshis_received?a.total_satoshis_received:"")+(a.commit_fee?a.commit_fee:"")+(a.private?"private":"public")).includes(o),this.applyFilter()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(G.eX),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-backup-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:42,vars:18,consts:[["fxLayout","column"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","100",1,"alert","alert-info"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","1",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","2",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container","mt-2"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","channel_point"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",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","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","",1,"pr-3"],["fxLayoutAlign","end center"],["mat-cell","","fxLayoutAlign","end center"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._UZ(3,"fa-icon",3),e.TgZ(4,"span"),e._uU(5,"Save your backup files in a redundant location."),e.qZA()(),e.TgZ(6,"div",4),e._UZ(7,"fa-icon",3),e.TgZ(8,"span")(9,"strong"),e._uU(10,"Backup Folder Location: "),e.qZA(),e._uU(11),e.qZA()(),e.TgZ(12,"div",5)(13,"button",6),e.NdJ("click",function(){return a.onVerifyChannels({})}),e._uU(14,"Verify All"),e.qZA(),e.TgZ(15,"button",7),e.NdJ("click",function(){return a.onBackupChannels({})}),e._uU(16,"Backup All"),e.qZA(),e.TgZ(17,"button",8),e.NdJ("click",function(){return a.onDownloadBackup({})}),e._uU(18,"Download Backup"),e.qZA()()(),e.TgZ(19,"div",9)(20,"div",10),e._UZ(21,"fa-icon",11),e.TgZ(22,"span",12),e._uU(23,"Backups"),e.qZA()(),e.TgZ(24,"mat-form-field",13)(25,"input",14),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(26,"div",15),e.YNc(27,Q_,1,0,"mat-progress-bar",16),e.TgZ(28,"table",17,18),e.ynx(30,19),e.YNc(31,Y_,2,0,"th",20),e.YNc(32,B_,2,4,"td",21),e.BQk(),e.ynx(33,22),e.YNc(34,V_,3,0,"th",23),e.YNc(35,G_,12,0,"td",24),e.BQk(),e.ynx(36,25),e.YNc(37,$_,4,3,"td",26),e.BQk(),e.YNc(38,K_,1,3,"tr",27),e.YNc(39,eh,1,0,"tr",28),e.YNc(40,th,1,0,"tr",29),e.qZA()(),e._UZ(41,"mat-paginator",30),e.qZA()),2&t&&(e.xp6(3),e.Q6J("icon",a.faExclamationTriangle),e.xp6(4),e.Q6J("icon",a.faInfoCircle),e.xp6(4),e.hij("",a.selNode.channelBackupPath,"."),e.xp6(10),e.Q6J("icon",a.faArchive),e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.channels)("ngClass",e.VKq(15,nh,""!==a.errorMessage)),e.xp6(10),e.Q6J("matFooterRowDef",e.DdM(17,ah)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.Wh,d.yH,M.BN,k.lW,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 70%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function oh(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let sh=(()=>{class n{constructor(t){this.router=t,this.faUserCheck=y.hkK,this.links=[{link:"sign",name:"Sign"},{link:"verify",name:"Verify"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-sign-verify-message"]],decls:11,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Sign/Verify Message"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),e.YNc(8,oh,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faUserCheck),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC],styles:[""]}),n})();function lh(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Message is required."),e.qZA())}let rh=(()=>{class n{constructor(t,a,o){this.dataService=t,this.snackBar=a,this.logger=o,this.message="",this.signedMessage="",this.signature="",this.unSubs=[new m.x,new m.x]}onSign(){if(!this.message||""===this.message)return!0;this.dataService.signMessage(this.message).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.signedMessage=this.message,this.signature=t.signature})}onMessageChange(){this.signedMessage!==this.message&&(this.signature="")}onCopyField(t){this.snackBar.open("Signature copied."),this.logger.info("Copied Text: "+t)}resetData(){this.message="",this.signature="",this.signedMessage=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(j.D),e.Y36(te.ux),e.Y36(N.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-sign"]],decls:20,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to sign","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3","type","submit",3,"click"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","4","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),e.NdJ("ngModelChange",function(s){return a.message=s})("keyup",function(){return a.onMessageChange()}),e.qZA(),e.YNc(5,lh,2,0,"mat-error",5),e.qZA(),e.TgZ(6,"div",6)(7,"button",7),e.NdJ("click",function(){return a.resetData()}),e._uU(8,"Clear Field"),e.qZA(),e.TgZ(9,"button",8),e.NdJ("click",function(){return a.onSign()}),e._uU(10,"Sign"),e.qZA()(),e._UZ(11,"mat-divider",9),e.TgZ(12,"div",10)(13,"p"),e._uU(14,"Generated Signature"),e.qZA()(),e.TgZ(15,"div",11),e._uU(16),e.qZA(),e.TgZ(17,"div",12)(18,"button",13),e.NdJ("copied",function(s){return a.onCopyField(s)}),e._uU(19,"Copy Signature"),e.qZA()()()()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.message),e.xp6(1),e.Q6J("ngIf",!a.message),e.xp6(6),e.Q6J("inset",!0),e.xp6(5),e.Oqu(a.signature),e.xp6(2),e.Q6J("payload",a.signature))},directives:[d.xw,d.yH,d.Wh,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,p.O5,f.TO,k.lW,z.d,se.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function ch(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Message is required."),e.qZA())}function uh(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Signature is required."),e.qZA())}function ph(n,i){1&n&&(e.TgZ(0,"p",13)(1,"mat-icon",14),e._uU(2,"close"),e.qZA(),e._uU(3,"Verification failed, please double check message and signature"),e.qZA())}function mh(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Pubkey Used"),e.qZA())}function dh(n,i){if(1&n&&(e.TgZ(0,"div",20)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(2),e.Oqu(null==t.verifyRes?null:t.verifyRes.pubkey)}}function _h(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",21)(1,"button",22),e.NdJ("copied",function(o){return e.CHM(t),e.oxw(2).onCopyField(o)}),e._uU(2,"Copy Pubkey"),e.qZA()()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("payload",null==t.verifyRes?null:t.verifyRes.pubkey)}}function hh(n,i){if(1&n&&(e.TgZ(0,"div",15),e._UZ(1,"mat-divider",16),e.TgZ(2,"div",17),e.YNc(3,mh,2,0,"p",5),e.qZA(),e.YNc(4,dh,3,1,"div",18),e.YNc(5,_h,3,1,"div",19),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(2),e.Q6J("ngIf",t.verifyRes.valid),e.xp6(1),e.Q6J("ngIf",t.verifyRes.valid),e.xp6(1),e.Q6J("ngIf",t.verifyRes.valid)}}let gh=(()=>{class n{constructor(t,a,o){this.dataService=t,this.snackBar=a,this.logger=o,this.message="",this.verifiedMessage="",this.signature="",this.verifiedSignature="",this.showVerifyStatus=!1,this.verifyRes={pubkey:"",valid:null},this.unSubs=[new m.x,new m.x]}onVerify(){if(!this.message||""===this.message||!this.signature||""===this.signature)return!0;this.dataService.verifyMessage(this.message,this.signature).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.verifyRes=t,this.showVerifyStatus=!0,this.verifiedMessage=this.message,this.verifiedSignature=this.signature})}onChange(){(this.verifiedMessage!==this.message||this.verifiedSignature!==this.signature)&&(this.showVerifyStatus=!1,this.verifyRes={pubkey:"",valid:null})}resetData(){this.message="",this.signature="",this.verifyRes=null,this.showVerifyStatus=!1}onCopyField(t){this.snackBar.open("Pubkey copied."),this.logger.info("Copied Text: "+t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(j.D),e.Y36(te.ux),e.Y36(N.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-verify"]],decls:17,vars:6,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to verify","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Signature provided","name","signature","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["sign","ngModel"],["fxFlex","100","class","color-warn","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start","class","bordered-box read-only h-4 padding-gap",4,"ngIf"],["fxLayout","row","class","mt-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","5","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),e.NdJ("ngModelChange",function(s){return a.message=s})("keyup",function(){return a.onChange()}),e.qZA(),e.YNc(5,ch,2,0,"mat-error",5),e.qZA(),e.TgZ(6,"mat-form-field",3)(7,"input",6,7),e.NdJ("ngModelChange",function(s){return a.signature=s})("keyup",function(){return a.onChange()}),e.qZA(),e.YNc(9,uh,2,0,"mat-error",5),e.qZA(),e.YNc(10,ph,4,0,"p",8),e.TgZ(11,"div",9)(12,"button",10),e.NdJ("click",function(){return a.resetData()}),e._uU(13,"Clear Fields"),e.qZA(),e.TgZ(14,"button",11),e.NdJ("click",function(){return a.onVerify()}),e._uU(15,"Verify"),e.qZA()(),e.YNc(16,hh,6,4,"div",12),e.qZA()()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.message),e.xp6(1),e.Q6J("ngIf",!a.message),e.xp6(2),e.Q6J("ngModel",a.signature),e.xp6(2),e.Q6J("ngIf",!a.signature),e.xp6(1),e.Q6J("ngIf",a.showVerifyStatus&&!a.verifyRes.valid),e.xp6(6),e.Q6J("ngIf",a.showVerifyStatus&&a.verifyRes.valid))},directives:[d.xw,d.yH,d.Wh,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,p.O5,f.TO,K.Hw,k.lW,z.d,se.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();var fh=h(9442),F=h(1643);function Ch(n,i){if(1&n&&(e.TgZ(0,"div",3),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function xh(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",9)(1,"div",10),e._uU(2,"Non Routing Peers"),e.qZA(),e.TgZ(3,"mat-form-field",11)(4,"input",12),e.NdJ("keyup",function(){return e.CHM(t),e.oxw(2).applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw(2).filter=o}),e.qZA()()()}if(2&n){const t=e.oxw(2);e.xp6(4),e.Q6J("ngModel",t.filter)}}function yh(n,i){1&n&&e._UZ(0,"mat-progress-bar",35)}function Th(n,i){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Channel ID"),e.qZA())}const Ke=function(n){return{"max-width":n}};function bh(n,i){if(1&n&&(e.TgZ(0,"td",37),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(3);e.Q6J("ngStyle",e.VKq(2,Ke,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.chan_id)}}function vh(n,i){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Peer Alias"),e.qZA())}function Zh(n,i){if(1&n&&(e.TgZ(0,"td",37),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(3);e.Q6J("ngStyle",e.VKq(2,Ke,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.remote_alias)}}function wh(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Sats Sent"),e.qZA())}function Ah(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",40),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_satoshis_sent))}}function Sh(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Sats Received"),e.qZA())}function Lh(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",40),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_satoshis_received))}}function kh(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Local Balance (Sats)"),e.qZA())}function Fh(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",40),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.local_balance))}}function Nh(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Remote Balance (Sats)"),e.qZA())}function qh(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",40),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.remote_balance))}}function Uh(n,i){1&n&&(e.TgZ(0,"th",41)(1,"span",40),e._uU(2,"Actions"),e.qZA()())}function Oh(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",42)(1,"button",43),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(3).onManagePeer(s)}),e._uU(2,"Manage"),e.qZA()()}}function Rh(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"All peers are routing."),e.qZA())}function Ih(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting non routing peers..."),e.qZA())}function Mh(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(4);e.xp6(1),e.Oqu(t.errorMessage)}}function Dh(n,i){if(1&n&&(e.TgZ(0,"td",44),e.YNc(1,Rh,2,0,"p",45),e.YNc(2,Ih,2,0,"p",45),e.YNc(3,Mh,2,1,"p",45),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",(!(null!=t.NonRoutingPeers&&t.NonRoutingPeers.data)||(null==t.NonRoutingPeers||null==t.NonRoutingPeers.data?null:t.NonRoutingPeers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.NonRoutingPeers&&t.NonRoutingPeers.data)||(null==t.NonRoutingPeers||null==t.NonRoutingPeers.data?null:t.NonRoutingPeers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.NonRoutingPeers&&t.NonRoutingPeers.data)||(null==t.NonRoutingPeers||null==t.NonRoutingPeers.data?null:t.NonRoutingPeers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Ph=function(n){return{"display-none":n}};function Jh(n,i){if(1&n&&e._UZ(0,"tr",46),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,Ph,(null==t.NonRoutingPeers||null==t.NonRoutingPeers.data?null:t.NonRoutingPeers.data.length)>0))}}function Eh(n,i){1&n&&e._UZ(0,"tr",47)}function Qh(n,i){1&n&&e._UZ(0,"tr",48)}const Yh=function(){return["no_non_routing_event"]};function Hh(n,i){if(1&n&&(e.TgZ(0,"div",13),e.YNc(1,yh,1,0,"mat-progress-bar",14),e.TgZ(2,"table",15,16),e.ynx(4,17),e.YNc(5,Th,2,0,"th",18),e.YNc(6,bh,2,4,"td",19),e.BQk(),e.ynx(7,20),e.YNc(8,vh,2,0,"th",18),e.YNc(9,Zh,2,4,"td",19),e.BQk(),e.ynx(10,21),e.YNc(11,wh,2,0,"th",22),e.YNc(12,Ah,4,3,"td",23),e.BQk(),e.ynx(13,24),e.YNc(14,Sh,2,0,"th",22),e.YNc(15,Lh,4,3,"td",23),e.BQk(),e.ynx(16,25),e.YNc(17,kh,2,0,"th",22),e.YNc(18,Fh,4,3,"td",23),e.BQk(),e.ynx(19,26),e.YNc(20,Nh,2,0,"th",22),e.YNc(21,qh,4,3,"td",23),e.BQk(),e.ynx(22,27),e.YNc(23,Uh,3,0,"th",28),e.YNc(24,Oh,3,0,"td",29),e.BQk(),e.ynx(25,30),e.YNc(26,Dh,4,3,"td",31),e.BQk(),e.YNc(27,Jh,1,3,"tr",32),e.YNc(28,Eh,1,0,"tr",33),e.YNc(29,Qh,1,0,"tr",34),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.NonRoutingPeers),e.xp6(25),e.Q6J("matFooterRowDef",e.DdM(6,Yh)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}function Bh(n,i){if(1&n&&(e.TgZ(0,"div",4),e.YNc(1,xh,5,1,"div",5),e.YNc(2,Hh,30,7,"div",6),e._UZ(3,"mat-paginator",7,8),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",""===t.errorMessage),e.xp6(1),e.Q6J("ngIf",""===t.errorMessage),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Vh=(()=>{class n{constructor(t,a,o,s,u){this.logger=t,this.commonService=a,this.store=o,this.router=s,this.activatedRoute=u,this.routingPeersData=[],this.displayedColumns=[],this.NonRoutingPeers=new r.by([]),this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.filter="",this.activeChannels=[],this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS||this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["remote_alias","local_balance","remote_balance","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["chan_id","remote_alias","local_balance","remote_balance","actions"]):(this.flgSticky=!0,this.displayedColumns=["chan_id","remote_alias","total_satoshis_received","total_satoshis_sent","local_balance","remote_balance","actions"])}ngOnInit(){this.store.select(C.Bo).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{var a;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,(null===(a=t.apiCallStatus)||void 0===a?void 0:a.status)===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.routingPeersData=t.forwardingHistory.forwarding_events?t.forwardingHistory.forwarding_events:[],this.routingPeersData.length>0&&this.sort&&this.paginator&&this.loadNonRoutingPeersTable(this.routingPeersData),this.logger.info(t.apiCallStatus),this.logger.info(t.forwardingHistory)}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.activeChannels=t.channels,this.logger.info(t)})}ngAfterViewInit(){this.routingPeersData.length>0&&this.loadNonRoutingPeersTable(this.routingPeersData)}onManagePeer(t){this.router.navigate(["../../","connections","channels","open"],{relativeTo:this.activatedRoute,state:{filter:t.chan_id}})}loadNonRoutingPeersTable(t){if(t.length>0){const a=this.activeChannels.filter(o=>t.findIndex(s=>s.chan_id_in===o.chan_id||s.chan_id_out===o.chan_id)<0);this.NonRoutingPeers=new r.by(a),this.NonRoutingPeers.sort=this.sort,this.NonRoutingPeers.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.NonRoutingPeers.paginator=this.paginator,this.logger.info(this.NonRoutingPeers)}else this.NonRoutingPeers=new r.by([]);this.applyFilter()}applyFilter(){this.NonRoutingPeers.filter=this.filter.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(T.F0),e.Y36(T.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-non-routing-peers"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Non routing peers")}])],decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginator",""],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","chan_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","remote_alias"],["matColumnDef","total_satoshis_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","total_satoshis_received"],["matColumnDef","local_balance"],["matColumnDef","remote_balance"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-2","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_non_routing_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],["mat-cell","","fxLayoutAlign","end center",1,"pl-2"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Ch,2,1,"div",1),e.YNc(2,Bh,5,5,"div",2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage))},directives:[d.xw,d.yH,d.Wh,p.O5,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,P.pW,r.BZ,Z.YE,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,k.lW,r.mD,r.yh,r.Ke,r.Q2,p.mk,S.oO,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-chan_id[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})(),Gh=(()=>{class n{constructor(t){this.dataService=t,this.paths="",this.unSubs=[new m.x,new m.x]}ngOnInit(){if(this.payment.htlcs&&this.payment.htlcs[0]&&this.payment.htlcs[0].route&&this.payment.htlcs[0].route.hops&&this.payment.htlcs[0].route.hops.length>0){const t=this.payment.htlcs[0].route.hops.reduce((a,o)=>""===a?o.pub_key:a+","+o.pub_key,"");this.dataService.getAliasesFromPubkeys(t,!0).pipe((0,_.R)(this.unSubs[0])).subscribe(a=>{this.paths=a.reduce((o,s)=>""===o?s:o+"\n"+s,"")})}this.payment.payment_request&&""!==this.payment.payment_request.trim()&&this.dataService.decodePayment(this.payment.payment_request,!1).pipe((0,V.q)(1)).subscribe(t=>{t&&t.description&&""!==t.description&&(this.payment.description=t.description)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(j.D))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-payment-lookup"]],inputs:{payment:"payment"},decls:66,vars:20,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxFlex","100"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxLayout","row"],["fxFlex","50"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"mat-card-content",1)(2,"div",2)(3,"h4",3),e._uU(4,"Payment Hash"),e.qZA(),e.TgZ(5,"span",4),e._uU(6),e.qZA()(),e._UZ(7,"mat-divider",5),e.TgZ(8,"div",2)(9,"h4",3),e._uU(10,"Payment Preimage"),e.qZA(),e.TgZ(11,"span",4)(12,"div"),e._uU(13),e.qZA()()(),e._UZ(14,"mat-divider",5),e.TgZ(15,"div",2)(16,"h4",3),e._uU(17,"Payment Request"),e.qZA(),e.TgZ(18,"span",4)(19,"div"),e._uU(20),e.qZA()()(),e._UZ(21,"mat-divider",5),e.TgZ(22,"div",2)(23,"h4",3),e._uU(24,"Description"),e.qZA(),e.TgZ(25,"span",4)(26,"div"),e._uU(27),e.qZA()()(),e._UZ(28,"mat-divider",5),e.TgZ(29,"div",6)(30,"div",7)(31,"h4",3),e._uU(32,"Status"),e.qZA(),e.TgZ(33,"span",4)(34,"div"),e._uU(35),e.qZA()()(),e.TgZ(36,"div",7)(37,"h4",3),e._uU(38,"Creation Date"),e.qZA(),e.TgZ(39,"span",4)(40,"div"),e._uU(41),e.qZA()()()(),e._UZ(42,"mat-divider",5),e.TgZ(43,"div",6)(44,"div",7)(45,"h4",3),e._uU(46,"Value (mSats)"),e.qZA(),e.TgZ(47,"span",4)(48,"div"),e._uU(49),e.ALo(50,"number"),e.qZA()()(),e.TgZ(51,"div",7)(52,"h4",3),e._uU(53,"Fee (mSats)"),e.qZA(),e.TgZ(54,"span",4)(55,"div"),e._uU(56),e.ALo(57,"number"),e.qZA()()()(),e._UZ(58,"mat-divider",5),e.TgZ(59,"div",2)(60,"h4",3),e._uU(61,"Path"),e.qZA(),e.TgZ(62,"span",4)(63,"div"),e._uU(64),e.qZA()()(),e._UZ(65,"mat-divider",5),e.qZA()()),2&t&&(e.xp6(6),e.Oqu(null==a.payment?null:a.payment.payment_hash),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.payment?null:a.payment.payment_preimage),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.payment?null:a.payment.payment_request),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.payment?null:a.payment.description),e.xp6(1),e.Q6J("inset",!0),e.xp6(7),e.Oqu(null==a.payment?null:a.payment.status),e.xp6(6),e.Oqu(null==a.payment?null:a.payment.creation_date),e.xp6(1),e.Q6J("inset",!0),e.xp6(7),e.Oqu(e.lcZ(50,16,null==a.payment?null:a.payment.value_msat)),e.xp6(7),e.Oqu(e.lcZ(57,18,null==a.payment?null:a.payment.fee_msat)),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(a.paths),e.xp6(1),e.Q6J("inset",!0))},directives:[d.xw,d.yH,d.Wh,b.dn,z.d],pipes:[p.JJ],styles:[""]}),n})();var zh=h(159);function Wh(n,i){if(1&n&&e._UZ(0,"qr-code",22),2&n){const t=e.oxw();e.Q6J("value",null==t.invoice?null:t.invoice.payment_request)("size",t.qrWidth)("errorCorrectionLevel","L")}}function Xh(n,i){1&n&&(e.TgZ(0,"span",23),e._uU(1,"N/A"),e.qZA())}function $h(n,i){if(1&n&&e._UZ(0,"qr-code",22),2&n){const t=e.oxw();e.Q6J("value",null==t.invoice?null:t.invoice.payment_request)("size",t.qrWidth)("errorCorrectionLevel","L")}}function jh(n,i){1&n&&(e.TgZ(0,"span",24),e._uU(1,"QR Code Not Applicable"),e.qZA())}function Kh(n,i){1&n&&e._UZ(0,"mat-divider",16),2&n&&e.Q6J("inset",!0)}function eg(n,i){1&n&&(e.ynx(0),e._uU(1," (zero amount) "),e.BQk())}const Ze=function(n){return{"mr-0":n}};function tg(n,i){if(1&n&&e._UZ(0,"span",38),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,Ze,t.screenSize===t.screenSizeEnum.XS))}}function ng(n,i){if(1&n&&e._UZ(0,"span",39),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,Ze,t.screenSize===t.screenSizeEnum.XS))}}function ag(n,i){if(1&n&&e._UZ(0,"span",40),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,Ze,t.screenSize===t.screenSizeEnum.XS))}}function ig(n,i){if(1&n&&(e.TgZ(0,"div",27)(1,"div",32)(2,"span",33),e.YNc(3,tg,1,3,"span",34),e.YNc(4,ng,1,3,"span",35),e.YNc(5,ag,1,3,"span",36),e._uU(6),e.qZA(),e.TgZ(7,"span",37),e._uU(8),e.ALo(9,"number"),e.qZA()(),e._UZ(10,"mat-divider",16),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(3),e.Q6J("ngIf","SETTLED"===t.state),e.xp6(1),e.Q6J("ngIf","ACCEPTED"===t.state),e.xp6(1),e.Q6J("ngIf","CANCELED"===t.state),e.xp6(1),e.hij(" ",t.chan_id," "),e.xp6(2),e.Oqu(e.xi3(9,6,+t.amt_msat/1e3||0,a.getDecimalFormat(t))),e.xp6(2),e.Q6J("inset",!0)}}function og(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",11)(1,"mat-expansion-panel",25),e.NdJ("opened",function(){return e.CHM(t),e.oxw().flgOpened=!0})("closed",function(){return e.CHM(t),e.oxw().onExpansionClosed()}),e.TgZ(2,"mat-expansion-panel-header")(3,"mat-panel-title")(4,"h4",26),e._uU(5,"HTLCs"),e.qZA()()(),e.TgZ(6,"div",27)(7,"div",28)(8,"span",29),e._uU(9,"Channel ID"),e.qZA(),e.TgZ(10,"span",30),e._uU(11,"Amount (Sats)"),e.qZA()(),e._UZ(12,"mat-divider",16),e.YNc(13,ig,11,9,"div",31),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(12),e.Q6J("inset",!0),e.xp6(1),e.Q6J("ngForOf",null==t.invoice?null:t.invoice.htlcs)}}function sg(n,i){1&n&&e._UZ(0,"mat-divider",16),2&n&&e.Q6J("inset",!0)}const et=function(n){return{"display-none":n}};let lg=(()=>{class n{constructor(t){this.commonService=t,this.qrWidth=240,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS&&(this.qrWidth=220)}getDecimalFormat(t){return t.amt_msat<1e3?"1.0-4":"1.0-0"}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-invoice-lookup"]],inputs:{invoice:"invoice"},decls:90,vars:45,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between stretch"],["fxFlex","20",1,"modal-qr-code-container","padding-gap-large",3,"fxLayoutAlign","ngClass"],[3,"value","size","errorCorrectionLevel",4,"ngIf"],["class","font-size-300",4,"ngIf"],["fxLayout","column","fxFlex","80"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxFlex","30",1,"modal-qr-code-container","padding-gap",3,"fxLayoutAlign","ngClass"],["class","font-size-120",4,"ngIf"],["class","my-1",3,"inset",4,"ngIf"],[3,"perfectScrollbar"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[4,"ngIf"],[1,"my-1",3,"inset"],["fxFlex","100"],[1,"overflow-wrap","foreground-secondary-text"],["fxFlex","34"],["fxFlex","33"],["fxLayout","row",4,"ngIf"],[3,"value","size","errorCorrectionLevel"],[1,"font-size-300"],[1,"font-size-120"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"flat-expansion-panel",3,"opened","closed"],["fxLayoutAlign","start center","fxFlex","100",1,"font-bold-500"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","row","fxLayoutAlign","start start","fxFlex","100",1,"mt-minus-1"],["fxFlex","60",1,"foreground-secondary-text","font-bold-500"],["fxFlex","40",1,"foreground-secondary-text","font-bold-500"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start start","fxFlex","100"],["fxFlex","60",1,"foreground-secondary-text"],["class","dot green","matTooltip","Settled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Accepted","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Cancelled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["fxFlex","40",1,"foreground-secondary-text"],["matTooltip","Settled","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Accepted","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Cancelled","matTooltipPosition","right",1,"dot","red",3,"ngClass"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,Wh,1,3,"qr-code",2),e.YNc(3,Xh,2,0,"span",3),e.qZA(),e.TgZ(4,"div",4)(5,"mat-card-content",5)(6,"div",6)(7,"div",7),e.YNc(8,$h,1,3,"qr-code",2),e.YNc(9,jh,2,0,"span",8),e.qZA(),e.YNc(10,Kh,1,1,"mat-divider",9),e.TgZ(11,"div",10)(12,"div",11)(13,"div",12)(14,"h4",13),e._uU(15),e.qZA(),e.TgZ(16,"span",14),e._uU(17),e.ALo(18,"number"),e.YNc(19,eg,2,0,"ng-container",15),e.qZA()(),e.TgZ(20,"div",12)(21,"h4",13),e._uU(22,"Amount Settled"),e.qZA(),e.TgZ(23,"span",14)(24,"div"),e._uU(25),e.ALo(26,"number"),e.qZA()()()(),e._UZ(27,"mat-divider",16),e.TgZ(28,"div",11)(29,"div",12)(30,"h4",13),e._uU(31,"Date Created"),e.qZA(),e.TgZ(32,"span",14),e._uU(33),e.ALo(34,"date"),e.qZA()(),e.TgZ(35,"div",12)(36,"h4",13),e._uU(37,"Date Settled"),e.qZA(),e.TgZ(38,"span",14),e._uU(39),e.ALo(40,"date"),e.qZA()()(),e._UZ(41,"mat-divider",16),e.TgZ(42,"div",11)(43,"div",17)(44,"h4",13),e._uU(45,"Memo"),e.qZA(),e.TgZ(46,"span",14),e._uU(47),e.qZA()()(),e._UZ(48,"mat-divider",16),e.TgZ(49,"div",11)(50,"div",17)(51,"h4",13),e._uU(52,"Payment Request"),e.qZA(),e.TgZ(53,"span",18),e._uU(54),e.qZA()()(),e._UZ(55,"mat-divider",16),e.TgZ(56,"div",11)(57,"div",17)(58,"h4",13),e._uU(59,"Payment Hash"),e.qZA(),e.TgZ(60,"span",18),e._uU(61),e.qZA()()(),e.TgZ(62,"div"),e._UZ(63,"mat-divider",16),e.TgZ(64,"div",11)(65,"div",17)(66,"h4",13),e._uU(67,"Preimage"),e.qZA(),e.TgZ(68,"span",18),e._uU(69),e.qZA()()(),e._UZ(70,"mat-divider",16),e.TgZ(71,"div",11)(72,"div",19)(73,"h4",13),e._uU(74,"State"),e.qZA(),e.TgZ(75,"span",18),e._uU(76),e.qZA()(),e.TgZ(77,"div",20)(78,"h4",13),e._uU(79,"Expiry"),e.qZA(),e.TgZ(80,"span",18),e._uU(81),e.qZA()(),e.TgZ(82,"div",20)(83,"h4",13),e._uU(84,"Private Routing Hints"),e.qZA(),e.TgZ(85,"span",18),e._uU(86),e.qZA()()(),e._UZ(87,"mat-divider",16),e.YNc(88,og,14,2,"div",21),e.YNc(89,sg,1,1,"mat-divider",9),e.qZA()()()()()()),2&t&&(e.xp6(1),e.Q6J("fxLayoutAlign",null!=a.invoice&&a.invoice.payment_request&&""!==(null==a.invoice?null:a.invoice.payment_request)?"center start":"center center")("ngClass",e.VKq(41,et,a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM)),e.xp6(1),e.Q6J("ngIf",(null==a.invoice?null:a.invoice.payment_request)&&""!==(null==a.invoice?null:a.invoice.payment_request)),e.xp6(1),e.Q6J("ngIf",!(null!=a.invoice&&a.invoice.payment_request)||""===(null==a.invoice?null:a.invoice.payment_request)),e.xp6(4),e.Q6J("fxLayoutAlign",null!=a.invoice&&a.invoice.payment_request&&""!==(null==a.invoice?null:a.invoice.payment_request)?"center start":"center center")("ngClass",e.VKq(43,et,a.screenSize!==a.screenSizeEnum.XS&&a.screenSize!==a.screenSizeEnum.SM)),e.xp6(1),e.Q6J("ngIf",(null==a.invoice?null:a.invoice.payment_request)&&""!==(null==a.invoice?null:a.invoice.payment_request)),e.xp6(1),e.Q6J("ngIf",!(null!=a.invoice&&a.invoice.payment_request)||""===(null==a.invoice?null:a.invoice.payment_request)),e.xp6(1),e.Q6J("ngIf",a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM),e.xp6(5),e.Oqu(a.screenSize===a.screenSizeEnum.XS?"Amount":"Amount Requested"),e.xp6(2),e.hij("",e.lcZ(18,31,(null==a.invoice?null:a.invoice.value)||0)," Sats"),e.xp6(2),e.Q6J("ngIf",!(null!=a.invoice&&a.invoice.value)||"0"===(null==a.invoice?null:a.invoice.value)),e.xp6(6),e.hij("",e.lcZ(26,33,null==a.invoice?null:a.invoice.amt_paid_sat)," Sats"),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.xi3(34,35,1e3*(null==a.invoice?null:a.invoice.creation_date),"dd/MMM/y HH:mm")),e.xp6(6),e.Oqu(0!=+(null==a.invoice?null:a.invoice.settle_date)?e.xi3(40,38,1e3*+(null==a.invoice?null:a.invoice.settle_date),"dd/MMM/y HH:mm"):"-"),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.invoice?null:a.invoice.memo),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu((null==a.invoice?null:a.invoice.payment_request)||"N/A"),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu((null==a.invoice?null:a.invoice.r_hash)||""),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu((null==a.invoice?null:a.invoice.r_preimage)||"-"),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.invoice?null:a.invoice.state),e.xp6(5),e.Oqu(null==a.invoice?null:a.invoice.expiry),e.xp6(5),e.Oqu(null!=a.invoice&&a.invoice.private?"Yes":"No"),e.xp6(1),e.Q6J("inset",!0),e.xp6(1),e.Q6J("ngIf",(null==a.invoice?null:a.invoice.htlcs)&&(null==a.invoice?null:a.invoice.htlcs.length)>0),e.xp6(1),e.Q6J("ngIf",(null==a.invoice?null:a.invoice.htlcs)&&(null==a.invoice?null:a.invoice.htlcs.length)>0))},directives:[d.xw,d.Wh,d.yH,p.mk,S.oO,p.O5,zh.uU,b.dn,z.d,Q.$V,H.ib,H.yz,H.yK,p.sg,X.gM],pipes:[p.JJ,p.uU],styles:[""]}),n})();function rg(n,i){if(1&n&&(e.TgZ(0,"mat-radio-button",17),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("value",t.id)("checked",a.selectedFieldId===t.id),e.xp6(1),e.hij(" ",t.name," ")}}function cg(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function ug(n,i){1&n&&e._UZ(0,"mat-progress-bar",20)}const pg=function(n){return{"w-100 mt-2 p-2 error-border":n,"w-100 my-2 p-2":!0}};function mg(n,i){if(1&n&&(e.TgZ(0,"div",18),e.YNc(1,ug,1,0,"mat-progress-bar",19),e._uU(2),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(3,pg,""!==t.errorMessage&&"Getting lookup details..."!==t.errorMessage)),e.xp6(1),e.Q6J("ngIf","Getting lookup details..."===t.errorMessage),e.xp6(1),e.hij(" ",t.errorMessage," ")}}function dg(n,i){if(1&n&&(e.TgZ(0,"span",27),e._UZ(1,"rtl-payment-lookup",28),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("payment",t.lookupValue)}}function _g(n,i){if(1&n&&(e.TgZ(0,"span",27),e._UZ(1,"rtl-invoice-lookup",29),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("invoice",t.lookupValue)}}function hg(n,i){1&n&&(e.TgZ(0,"span",27)(1,"h3"),e._uU(2,"Error! Unable to find details!"),e.qZA()())}function gg(n,i){if(1&n&&(e.TgZ(0,"div",21)(1,"div",22)(2,"span",23),e._uU(3),e.qZA()(),e.TgZ(4,"div",24),e.YNc(5,dg,2,1,"span",25),e.YNc(6,_g,2,1,"span",25),e.YNc(7,hg,3,0,"span",26),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.hij("",t.lookupFields[t.selectedFieldId].name," Details"),e.xp6(1),e.Q6J("ngSwitch",t.selectedFieldId),e.xp6(1),e.Q6J("ngSwitchCase",0),e.xp6(1),e.Q6J("ngSwitchCase",1)}}const fg=function(n){return{"mt-1":!0,"mt-2":n}},yg=T.Bz.forChild([{path:"",component:Le,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:si,canActivate:[F.QM]},{path:"wallet",component:d1,canActivate:[F.a1]},{path:"onchain",component:bd,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"receive/utxos"},{path:"receive/:selTab",component:wd,canActivate:[F.QM]},{path:"send/:selTab",component:$e,data:{sweepAll:!1},canActivate:[F.QM]},{path:"sweep/:selTab",component:$e,data:{sweepAll:!0},canActivate:[F.QM]}]},{path:"connections",component:ci,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:po,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:nl,canActivate:[F.QM]},{path:"pending",component:Pr,canActivate:[F.QM]},{path:"closed",component:uc,canActivate:[F.QM]},{path:"activehtlcs",component:Qc,canActivate:[F.QM]}]},{path:"peers",component:so,data:{sweepAll:!1},canActivate:[F.QM]}]},{path:"transactions",component:g1,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:De,canActivate:[F.QM]},{path:"invoices",component:Ie,canActivate:[F.QM]},{path:"lookuptransactions",component:(()=>{class n{constructor(t,a,o,s){this.logger=t,this.commonService=a,this.store=o,this.actions=s,this.lookupKey="",this.lookupValue={},this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Payment",placeholder:"Payment Hash"},{id:1,name:"Invoice",placeholder:"Payment Hash"}],this.faSearch=y.wn1,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t.type===l.uR.SET_LOOKUP_LND)).subscribe(t=>{this.flgSetLookupValue=!t.payload.error,this.lookupValue=JSON.parse(JSON.stringify(t.payload)),this.errorMessage=t.payload.error?this.commonService.extractErrorMessage(t.payload.error):"",this.logger.info(this.lookupValue)})}onLookup(){if(!this.lookupKey)return!0;switch(this.errorMessage="",this.flgSetLookupValue=!1,this.lookupValue={},this.selectedFieldId){case 0:this.store.dispatch((0,v.yZ)({payload:Buffer.from(this.lookupKey.trim(),"hex").toString("base64").replace(/\+/g,"-").replace(/[/]/g,"_")}));break;case 1:this.store.dispatch((0,v.n7)({payload:{openSnackBar:!1,paymentHash:Buffer.from(this.lookupKey.trim(),"hex").toString("base64").replace(/\+/g,"-").replace(/[/]/g,"_")}}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.lookupKey="",this.lookupValue={},this.errorMessage=""}clearLookupValue(){this.lookupValue={},this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lookup-transactions"]],decls:19,vars:10,consts:[["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"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[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","row wrap","fxLayoutAlign","space-between center",3,"ngClass",4,"ngIf"],["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"],[1,"mr-4",3,"value","checked"],["fxFlex","100","fxLayout","row wrap","fxLayoutAlign","space-between center",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["mode","indeterminate"],["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,"mb-2"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[3,"payment"],[3,"invoice"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-content",2)(3,"form",3,4)(5,"div",5)(6,"mat-radio-group",6),e.NdJ("ngModelChange",function(s){return a.selectedFieldId=s})("change",function(s){return a.onSelectChange(s)}),e.YNc(7,rg,2,3,"mat-radio-button",7),e.qZA()(),e.TgZ(8,"mat-form-field",8)(9,"input",9,10),e.NdJ("change",function(){return a.clearLookupValue()})("ngModelChange",function(s){return a.lookupKey=s}),e.qZA(),e.YNc(11,cg,2,1,"mat-error",11),e.qZA(),e.TgZ(12,"div",12)(13,"button",13),e.NdJ("click",function(){return a.resetData()}),e._uU(14,"Clear"),e.qZA(),e.TgZ(15,"button",14),e.NdJ("click",function(){return a.onLookup()}),e._uU(16,"Lookup"),e.qZA()()(),e.YNc(17,mg,3,5,"div",15),e.YNc(18,gg,8,4,"div",16),e.qZA()()()),2&t&&(e.xp6(6),e.Q6J("ngModel",a.selectedFieldId),e.xp6(1),e.Q6J("ngForOf",a.lookupFields),e.xp6(1),e.Q6J("ngClass",e.VKq(8,fg,a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM)),e.xp6(1),e.Q6J("placeholder",(null==a.lookupFields[a.selectedFieldId]?null:a.lookupFields[a.selectedFieldId].placeholder)||"Lookup Key")("ngModel",a.lookupKey),e.xp6(2),e.Q6J("ngIf",!a.lookupKey),e.xp6(6),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage&&a.lookupValue&&a.flgSetLookupValue))},directives:[d.xw,d.yH,d.Wh,b.dn,c._Y,c.JL,c.F,ie.VQ,c.JJ,c.On,p.sg,ie.U0,f.KE,p.mk,S.oO,I.Nt,c.Fj,c.Q7,p.O5,f.TO,k.lW,P.pW,p.RF,p.n9,Gh,lg,p.ED],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}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})(),canActivate:[F.QM]}]},{path:"messages",component:sh,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"sign"},{path:"sign",component:rh,canActivate:[F.QM]},{path:"verify",component:gh,canActivate:[F.QM]}]},{path:"channelbackup",component:v_,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"bckup"},{path:"bckup",component:ih,canActivate:[F.QM]},{path:"restore",component:E_,canActivate:[F.QM]}]},{path:"routing",component:Cu,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:Be,canActivate:[F.QM]},{path:"peers",component:Pp,canActivate:[F.QM]},{path:"nonroutingprs",component:Vh,canActivate:[F.QM]}]},{path:"reports",component:Ep,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"routingreport"},{path:"routingreport",component:Xp,canActivate:[F.QM]},{path:"transactions",component:rm,canActivate:[F.QM]}]},{path:"graph",component:C1,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:He,canActivate:[F.QM]},{path:"queryroutes",component:J1,canActivate:[F.QM]}]},{path:"lookups",component:He,canActivate:[F.QM]},{path:"network",component:T_,canActivate:[F.QM]},{path:"**",component:fh.w},{path:"rates",redirectTo:"network"}]}]);var Tg=h(8750);let bg=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n,bootstrap:[Le]}),n.\u0275inj=e.cJS({providers:[F.QM],imports:[[p.ez,Tg.m,yg]]}),n})()}}]); \ No newline at end of file diff --git a/frontend/636.d70da2a07ddfc5b5.js b/frontend/636.d70da2a07ddfc5b5.js new file mode 100644 index 00000000..a6f55a8f --- /dev/null +++ b/frontend/636.d70da2a07ddfc5b5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[636],{1636:(wg,ke,h)=>{h.r(ke),h.d(ke,{LNDModule:()=>Zg});var p=h(9808),T=h(1402),at=h(8878),e=h(5e3),d=h(7093),P=h(5899);function it(n,i){1&n&&e._UZ(0,"mat-progress-bar",3)}let Fe=(()=>{class n{constructor(t){this.router=t,this.loading=!1,this.router.events.subscribe(a=>{switch(!0){case a instanceof T.OD:this.loading=!0;break;case a instanceof T.m2:case a instanceof T.gk:case a instanceof T.Q3:this.loading=!1}})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lnd-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,it,1,0,"mat-progress-bar",1),e._UZ(2,"router-outlet",null,2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",a.loading))},directives:[d.xw,d.yH,d.Wh,p.O5,P.pW,T.lC],styles:[""],data:{animation:[at.g]}}),n})();var m=h(7579),_=h(2722),E=h(9300),Ne=h(534),y=h(801),l=h(7731),C=h(6529),N=h(5043),A=h(5620),G=h(6642),O=h(62),M=h(9444),ce=h(3954),b=h(9224),k=h(7423),he=h(2181),K=h(5245),S=h(3322);const qe=function(n){return{backgroundColor:n}};function ot(n,i){if(1&n&&e._UZ(0,"span",6),2&n){const t=e.oxw();e.Q6J("ngStyle",e.VKq(1,qe,null==t.information?null:t.information.color))}}function st(n,i){if(1&n&&(e.TgZ(0,"div")(1,"h4",1),e._uU(2,"Color"),e.qZA(),e.TgZ(3,"div",2),e._UZ(4,"span",7),e._uU(5),e.ALo(6,"uppercase"),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.Q6J("ngStyle",e.VKq(4,qe,null==t.information?null:t.information.color)),e.xp6(1),e.hij(" ",e.lcZ(6,2,null==t.information?null:t.information.color)," ")}}function lt(n,i){if(1&n&&(e.TgZ(0,"span",2),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}let Ue=(()=>{class n{constructor(t){this.commonService=t,this.chains=[""]}ngOnChanges(){this.information&&this.information.chains&&this.information.chains.length>0&&(this.chains=[""],this.information.chains.forEach(t=>{this.chains.push(this.commonService.titleCase(t.chain)+" "+this.commonService.titleCase(t.network))}))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[e.TTD],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div")(2,"h4",1),e._uU(3,"Alias"),e.qZA(),e.TgZ(4,"div",2),e._uU(5),e.YNc(6,ot,1,3,"span",3),e.qZA()(),e.YNc(7,st,7,6,"div",4),e.TgZ(8,"div")(9,"h4",1),e._uU(10,"Implementation"),e.qZA(),e.TgZ(11,"div",2),e._uU(12),e.qZA()(),e.TgZ(13,"div")(14,"h4",1),e._uU(15,"Chain"),e.qZA(),e.YNc(16,lt,2,1,"span",5),e.qZA()()),2&t&&(e.xp6(5),e.hij(" ",null==a.information?null:a.information.alias," "),e.xp6(1),e.Q6J("ngIf",!a.showColorFieldSeparately),e.xp6(1),e.Q6J("ngIf",a.showColorFieldSeparately),e.xp6(5),e.Oqu(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):""),e.xp6(4),e.Q6J("ngForOf",a.chains))},directives:[d.xw,d.yH,d.Wh,p.O5,p.PC,S.Zl,p.sg],pipes:[p.gd],styles:[""]}),n})();function rt(n,i){if(1&n&&(e.TgZ(0,"div",2)(1,"div")(2,"h4",3),e._uU(3,"Lightning"),e.qZA(),e.TgZ(4,"div",4),e._uU(5),e.ALo(6,"number"),e.qZA(),e._UZ(7,"mat-progress-bar",5),e.qZA(),e.TgZ(8,"div")(9,"h4",3),e._uU(10,"On-chain"),e.qZA(),e.TgZ(11,"div",4),e._uU(12),e.ALo(13,"number"),e.qZA(),e._UZ(14,"mat-progress-bar",5),e.qZA(),e.TgZ(15,"div")(16,"h4",3),e._uU(17,"Total"),e.qZA(),e.TgZ(18,"div",4),e._uU(19),e.ALo(20,"number"),e.qZA()()()),2&n){const t=e.oxw();e.xp6(5),e.hij("",e.lcZ(6,5,null==t.balances?null:t.balances.lightning)," Sats"),e.xp6(2),e.s9C("value",(null==t.balances?null:t.balances.lightning)/(null==t.balances?null:t.balances.total)*100),e.xp6(5),e.hij("",e.lcZ(13,7,null==t.balances?null:t.balances.onchain)," Sats"),e.xp6(2),e.s9C("value",(null==t.balances?null:t.balances.onchain)/(null==t.balances?null:t.balances.total)*100),e.xp6(5),e.hij("",e.lcZ(20,9,null==t.balances?null:t.balances.total)," Sats")}}function ct(n,i){if(1&n&&(e.TgZ(0,"div",6)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let ut=(()=>{class n{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(t,a){if(1&t&&(e.YNc(0,rt,21,11,"div",0),e.YNc(1,ct,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf"," "===a.errorMessage)("ngIfElse",o)}},directives:[p.O5,d.xw,d.yH,d.Wh,P.pW],pipes:[p.JJ],styles:[""]}),n})();var f=h(7322),X=h(7238),z=h(4834),Q=h(8129);const pt=function(){return["../connections/channels/open"]},mt=function(n){return{filter:n}};function dt(n,i){if(1&n&&(e.TgZ(0,"div",19)(1,"a",20),e._uU(2),e.ALo(3,"slice"),e.qZA(),e.TgZ(4,"div",6)(5,"mat-hint",21)(6,"strong",8),e._uU(7,"Local:"),e.qZA(),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"mat-hint",22),e._UZ(11,"fa-icon",23),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"mat-hint",24)(15,"strong",8),e._uU(16,"Remote:"),e.qZA(),e._uU(17),e.ALo(18,"number"),e.qZA()(),e._UZ(19,"mat-progress-bar",25),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(3);e.xp6(1),e.s9C("matTooltip",t.remote_alias||t.remote_pubkey),e.s9C("matTooltipDisabled",(t.remote_alias||t.remote_pubkey).length<26),e.Q6J("routerLink",e.DdM(21,pt))("state",e.VKq(22,mt,t.chan_id)),e.xp6(1),e.AsE(" ",e.Dn7(3,11,t.remote_alias||t.remote_pubkey,0,24),"",(t.remote_alias||t.remote_pubkey).length>25?"...":""," "),e.xp6(6),e.hij("",e.lcZ(9,15,t.local_balance||0)," Sats"),e.xp6(3),e.Q6J("icon",a.faBalanceScale),e.xp6(1),e.hij(" (",e.lcZ(13,17,t.balancedness||0),") "),e.xp6(5),e.hij("",e.lcZ(18,19,t.remote_balance||0)," Sats"),e.xp6(2),e.s9C("value",t.local_balance&&t.local_balance>0?+t.local_balance/(+t.local_balance+ +t.remote_balance)*100:0)}}function _t(n,i){if(1&n&&(e.TgZ(0,"div",17),e.YNc(1,dt,20,24,"div",18),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.allChannels)}}function ht(n,i){if(1&n&&(e.TgZ(0,"div",3)(1,"div",4)(2,"span",5),e._uU(3,"Total Capacity"),e.qZA(),e.TgZ(4,"div",6)(5,"mat-hint",7)(6,"strong",8),e._uU(7,"Local:"),e.qZA(),e._uU(8),e.ALo(9,"number"),e.qZA(),e.TgZ(10,"mat-hint",9),e._UZ(11,"fa-icon",10),e._uU(12),e.ALo(13,"number"),e.qZA(),e.TgZ(14,"mat-hint",11)(15,"strong",8),e._uU(16,"Remote:"),e.qZA(),e._uU(17),e.ALo(18,"number"),e.qZA()(),e._UZ(19,"mat-progress-bar",12),e.qZA(),e.TgZ(20,"div",13),e._UZ(21,"mat-divider",14),e.qZA(),e.TgZ(22,"div",15),e.YNc(23,_t,2,1,"div",16),e.qZA()()),2&n){const t=e.oxw(),a=e.MAs(2);e.xp6(8),e.hij("",e.lcZ(9,7,(null==t.channelBalances?null:t.channelBalances.localBalance)||0)," Sats"),e.xp6(3),e.Q6J("icon",t.faBalanceScale),e.xp6(1),e.hij(" (",e.lcZ(13,9,(null==t.channelBalances?null:t.channelBalances.balancedness)||0),") "),e.xp6(5),e.hij("",e.lcZ(18,11,(null==t.channelBalances?null:t.channelBalances.remoteBalance)||0)," Sats"),e.xp6(2),e.s9C("value",null!=t.channelBalances&&t.channelBalances.localBalance&&(null==t.channelBalances?null:t.channelBalances.localBalance)>0?+(null==t.channelBalances?null:t.channelBalances.localBalance)/(+(null==t.channelBalances?null:t.channelBalances.localBalance)+ +(null==t.channelBalances?null:t.channelBalances.remoteBalance))*100:0),e.xp6(4),e.Q6J("ngIf",t.allChannels&&t.allChannels.length>0)("ngIfElse",a)}}function gt(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",26),e._uU(1," No channels available. "),e.TgZ(2,"button",27),e.NdJ("click",function(){return e.CHM(t),e.oxw().goToChannels()}),e._uU(3,"Open Channel"),e.qZA()()}}function ft(n,i){if(1&n&&(e.TgZ(0,"div",28)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let Ct=(()=>{class n{constructor(t){this.router=t,this.faBalanceScale=y.DL8,this.faDumbbell=y.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/lnd/connections")}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["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(t,a){if(1&t&&(e.YNc(0,ht,24,13,"div",0),e.YNc(1,gt,4,0,"ng-template",null,1,e.W1O),e.YNc(3,ft,3,1,"ng-template",null,2,e.W1O)),2&t){const o=e.MAs(4);e.Q6J("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",o)}},directives:[p.O5,d.xw,d.Wh,d.yH,f.bx,M.BN,X.gM,P.pW,z.d,Q.$V,p.sg,T.yS,k.lW],pipes:[p.JJ,p.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),n})();function xt(n,i){if(1&n&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),e._uU(4,"Daily"),e.qZA(),e.TgZ(5,"div",5),e._uU(6),e.ALo(7,"number"),e.qZA()(),e.TgZ(8,"div")(9,"h4",4),e._uU(10,"Weekly"),e.qZA(),e.TgZ(11,"div",5),e._uU(12),e.ALo(13,"number"),e.qZA()(),e.TgZ(14,"div")(15,"h4",4),e._uU(16,"Monthly"),e.qZA(),e.TgZ(17,"div",5),e._uU(18),e.ALo(19,"number"),e.qZA()(),e.TgZ(20,"div",6),e._UZ(21,"h4",7)(22,"span",5),e.qZA()(),e.TgZ(23,"div",3)(24,"div")(25,"h4",4),e._uU(26,"Transactions"),e.qZA(),e.TgZ(27,"div",5),e._uU(28),e.ALo(29,"number"),e.qZA()(),e.TgZ(30,"div")(31,"h4",4),e._uU(32,"Transactions"),e.qZA(),e.TgZ(33,"div",5),e._uU(34),e.ALo(35,"number"),e.qZA()(),e.TgZ(36,"div")(37,"h4",4),e._uU(38,"Transactions"),e.qZA(),e.TgZ(39,"div",5),e._uU(40),e.ALo(41,"number"),e.qZA()(),e.TgZ(42,"div",6),e._UZ(43,"h4",7)(44,"span",5),e.qZA()()()),2&n){const t=e.oxw();e.xp6(6),e.hij("",e.lcZ(7,6,null==t.fees?null:t.fees.day_fee_sum)," Sats"),e.xp6(6),e.hij("",e.lcZ(13,8,null==t.fees?null:t.fees.week_fee_sum)," Sats"),e.xp6(6),e.hij("",e.lcZ(19,10,null==t.fees?null:t.fees.month_fee_sum)," Sats"),e.xp6(10),e.Oqu(e.lcZ(29,12,null==t.fees?null:t.fees.daily_tx_count)),e.xp6(6),e.Oqu(e.lcZ(35,14,null==t.fees?null:t.fees.weekly_tx_count)),e.xp6(6),e.Oqu(e.lcZ(41,16,null==t.fees?null:t.fees.monthly_tx_count))}}function yt(n,i){if(1&n&&(e.TgZ(0,"div",8)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let Oe=(()=>{class n{constructor(){this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100}ngOnChanges(){if(this.fees.month_fee_sum){this.totalFees=[{name:"Monthly",value:this.fees.month_fee_sum},{name:"Weekly",value:this.fees.week_fee_sum},{name:"Daily ",value:this.fees.day_fee_sum}];const t=Math.ceil(Math.log(this.fees.month_fee_sum+1)/Math.LN10),a=Math.pow(10,t-1);this.maxFeeValue=Math.ceil(this.fees.month_fee_sum/a)*a/5||100,Object.assign(this,this.totalFees)}else this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100,Object.assign(this,this.totalFees)}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},features:[e.TTD],decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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"],["fxFlex","20"],[1,"dashboard-info-title"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,a){if(1&t&&(e.YNc(0,xt,45,18,"div",0),e.YNc(1,yt,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",o)}},directives:[p.O5,d.xw,d.yH,d.Wh],pipes:[p.JJ],styles:[""]}),n})();function Tt(n,i){if(1&n&&(e.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),e._uU(4,"Active"),e.qZA(),e.TgZ(5,"div",5),e._UZ(6,"span",6),e._uU(7),e.ALo(8,"number"),e.qZA()(),e.TgZ(9,"div")(10,"h4",4),e._uU(11,"Pending"),e.qZA(),e.TgZ(12,"div",5),e._UZ(13,"span",7),e._uU(14),e.ALo(15,"number"),e.qZA()(),e.TgZ(16,"div")(17,"h4",4),e._uU(18,"Inactive"),e.qZA(),e.TgZ(19,"div",5),e._UZ(20,"span",8),e._uU(21),e.ALo(22,"number"),e.qZA()(),e.TgZ(23,"div")(24,"h4",4),e._uU(25,"Closing"),e.qZA(),e.TgZ(26,"div",5),e._UZ(27,"span",9),e._uU(28),e.ALo(29,"number"),e.qZA()()(),e.TgZ(30,"div",3)(31,"div")(32,"h4",4),e._uU(33,"Capacity"),e.qZA(),e.TgZ(34,"div",5),e._uU(35),e.ALo(36,"number"),e.qZA()(),e.TgZ(37,"div")(38,"h4",4),e._uU(39,"Capacity"),e.qZA(),e.TgZ(40,"div",5),e._uU(41),e.ALo(42,"number"),e.qZA()(),e.TgZ(43,"div")(44,"h4",4),e._uU(45,"Capacity"),e.qZA(),e.TgZ(46,"div",5),e._uU(47),e.ALo(48,"number"),e.qZA()(),e.TgZ(49,"div")(50,"h4",4),e._uU(51,"Capacity"),e.qZA(),e.TgZ(52,"div",5),e._uU(53),e.ALo(54,"number"),e.qZA()()()()),2&n){const t=e.oxw();e.xp6(7),e.Oqu(e.lcZ(8,8,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.num_channels)||0)),e.xp6(7),e.Oqu(e.lcZ(15,10,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.num_channels)||0)),e.xp6(7),e.Oqu(e.lcZ(22,12,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.num_channels)||0)),e.xp6(7),e.Oqu(e.lcZ(29,14,(null==t.channelsStatus||null==t.channelsStatus.closing?null:t.channelsStatus.closing.num_channels)||0)),e.xp6(7),e.hij("",e.lcZ(36,16,(null==t.channelsStatus||null==t.channelsStatus.active?null:t.channelsStatus.active.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(42,18,(null==t.channelsStatus||null==t.channelsStatus.pending?null:t.channelsStatus.pending.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(48,20,(null==t.channelsStatus||null==t.channelsStatus.inactive?null:t.channelsStatus.inactive.capacity)||0)," Sats"),e.xp6(6),e.hij("",e.lcZ(54,22,(null==t.channelsStatus||null==t.channelsStatus.closing?null:t.channelsStatus.closing.capacity)||0)," Sats")}}function bt(n,i){if(1&n&&(e.TgZ(0,"div",10)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let Re=(()=>{class n{constructor(){this.channelsStatus={}}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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"],[1,"dot","tiny-dot","red"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"]],template:function(t,a){if(1&t&&(e.YNc(0,Tt,55,24,"div",0),e.YNc(1,bt,3,1,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf"," "===a.errorMessage)("ngIfElse",o)}},directives:[p.O5,d.xw,d.yH,d.Wh],pipes:[p.JJ],styles:[""]}),n})();var Ie=h(8213),w=h(7861),Me=h(9107);function vt(n,i){if(1&n&&(e.TgZ(0,"mat-hint",19)(1,"strong",20),e._uU(2,"Capacity: "),e.qZA(),e._uU(3),e.ALo(4,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(3),e.hij("",e.lcZ(4,1,t.remote_balance||0)," Sats")}}function Zt(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2).$implicit;return e.oxw(3).onLoopOut(o)}),e._uU(1,"Loop Out"),e.qZA()}}function wt(n,i){if(1&n&&(e.TgZ(0,"div",21)(1,"mat-hint",22)(2,"strong",20),e._uU(3,"Capacity: "),e.qZA(),e._uU(4),e.ALo(5,"number"),e.qZA(),e.YNc(6,Zt,2,0,"button",23),e.qZA()),2&n){const t=e.oxw().$implicit,a=e.oxw(3);e.xp6(4),e.hij("",e.lcZ(5,2,t.local_balance||0)," Sats"),e.xp6(2),e.Q6J("ngIf",a.showLoop)}}function At(n,i){if(1&n&&e._UZ(0,"mat-progress-bar",25),2&n){const t=e.oxw().$implicit,a=e.oxw(3);e.s9C("value",a.totalLiquidity>0?(+t.remote_balance||0)/a.totalLiquidity*100:0)}}function St(n,i){if(1&n&&e._UZ(0,"mat-progress-bar",25),2&n){const t=e.oxw().$implicit,a=e.oxw(3);e.s9C("value",a.totalLiquidity>0?(+t.local_balance||0)/a.totalLiquidity*100:0)}}const Lt=function(){return["../connections/channels/open"]},kt=function(n){return{filter:n}};function Ft(n,i){if(1&n&&(e.TgZ(0,"div",13)(1,"a",14),e._uU(2),e.ALo(3,"slice"),e.qZA(),e.TgZ(4,"div",15),e.YNc(5,vt,5,3,"mat-hint",16),e.YNc(6,wt,7,4,"div",17),e.qZA(),e.YNc(7,At,1,1,"mat-progress-bar",18),e.YNc(8,St,1,1,"mat-progress-bar",18),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(3);e.xp6(1),e.s9C("matTooltip",t.remote_alias||t.remote_pubkey),e.s9C("matTooltipDisabled",(t.remote_alias||t.remote_pubkey).length<26),e.Q6J("routerLink",e.DdM(14,Lt))("state",e.VKq(15,kt,t.chan_id)),e.xp6(1),e.AsE(" ",e.Dn7(3,10,t.remote_alias||t.remote_pubkey,0,24),"",(t.remote_alias||t.remote_pubkey).length>25?"...":""," "),e.xp6(3),e.Q6J("ngIf","In"===a.direction),e.xp6(1),e.Q6J("ngIf","Out"===a.direction),e.xp6(1),e.Q6J("ngIf","In"===a.direction),e.xp6(1),e.Q6J("ngIf","Out"===a.direction)}}function Nt(n,i){if(1&n&&(e.TgZ(0,"div",11),e.YNc(1,Ft,9,17,"div",12),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngForOf",t.allChannels)}}const qt=function(n,i,t){return{"mb-4":n,"mb-2":i,"mb-1":t}};function Ut(n,i){if(1&n&&(e.TgZ(0,"div",3)(1,"div",4)(2,"span",5),e._uU(3,"Total Capacity"),e.qZA(),e.TgZ(4,"mat-hint",6),e._uU(5),e.ALo(6,"number"),e.qZA(),e._UZ(7,"mat-progress-bar",7),e.qZA(),e.TgZ(8,"div",8),e._UZ(9,"mat-divider",9),e.qZA(),e.YNc(10,Nt,2,1,"div",10),e.qZA()),2&n){const t=e.oxw(),a=e.MAs(2);e.Q6J("ngClass",e.kEZ(6,qt,t.screenSize===t.screenSizeEnum.XS||t.screenSize===t.screenSizeEnum.SM,t.screenSize===t.screenSizeEnum.MD,t.screenSize===t.screenSizeEnum.LG||t.screenSize===t.screenSizeEnum.XL)),e.xp6(5),e.hij("",e.lcZ(6,4,t.totalLiquidity)," Sats"),e.xp6(5),e.Q6J("ngIf",t.allChannels&&t.allChannels.length>0)("ngIfElse",a)}}function Ot(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",28),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).goToChannels()}),e._uU(1,"Open Channel"),e.qZA()}}function Rt(n,i){if(1&n&&(e.TgZ(0,"div",26),e._uU(1," No channels available. "),e.YNc(2,Ot,2,0,"button",27),e.qZA()),2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngIf","Out"===t.direction)}}function It(n,i){if(1&n&&(e.TgZ(0,"div",29)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessage)}}let Mt=(()=>{class n{constructor(t,a,o,s){this.router=t,this.loopService=a,this.commonService=o,this.store=s,this.targetConf=6,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.showLoop=!(!t.swapServerUrl||""===t.swapServerUrl.trim())})}goToChannels(){this.router.navigateByUrl("/lnd/connections")}onLoopOut(t){this.loopService.getLoopOutTermsAndQuotes(this.targetConf).pipe((0,_.R)(this.unSubs[1])).subscribe(a=>{this.store.dispatch((0,w.qR)({payload:{minHeight:"56rem",data:{channel:t,minQuote:a[0],maxQuote:a[1],direction:l.$I.LOOP_OUT,component:Ie.a}}}))})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0),e.Y36(Me.W),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[3,"perfectScrollbar",4,"ngIf","ngIfElse"],[3,"perfectScrollbar"],["fxLayout","column",4,"ngFor","ngForOf"],["fxLayout","column"],[1,"dashboard-capacity-header","mt-2",3,"routerLink","state","matTooltip","matTooltipDisabled"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between start"],["class","font-size-90 color-primary",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",4,"ngIf"],["class","dashboard-progress-bar","mode","determinate",3,"value",4,"ngIf"],[1,"font-size-90","color-primary"],[1,"font-weight-900","mr-5px"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxFlex","85","fxLayoutAlign","start start",1,"font-size-90","color-primary"],["fxFlex","15","fxLayoutAlign","end start","class","button-link-dashboard","color","primary","mat-button","","aria-label","Loop Out",3,"click",4,"ngIf"],["fxFlex","15","fxLayoutAlign","end start","color","primary","mat-button","","aria-label","Loop Out",1,"button-link-dashboard",3,"click"],["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(t,a){if(1&t&&(e.YNc(0,Ut,11,10,"div",0),e.YNc(1,Rt,3,1,"ng-template",null,1,e.W1O),e.YNc(3,It,3,1,"ng-template",null,2,e.W1O)),2&t){const o=e.MAs(4);e.Q6J("ngIf",""===(null==a.errorMessage?null:a.errorMessage.trim()))("ngIfElse",o)}},directives:[p.O5,d.xw,d.Wh,d.yH,p.mk,S.oO,f.bx,P.pW,z.d,Q.$V,p.sg,T.yS,X.gM,k.lW],pipes:[p.JJ,p.OU],styles:[""]}),n})();var D=h(3251),L=h(6087),Z=h(4847),r=h(2075),J=h(8966),v=h(6523),c=h(3075),I=h(7531),W=h(3390),$=h(6534),R=h(4107),Y=h(508),ue=h(2368);function Dt(n,i){if(1&n&&(e.TgZ(0,"mat-option",25),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(e.lcZ(2,2,t))}}function Pt(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.invoiceError)}}function Jt(n,i){if(1&n&&(e.TgZ(0,"div",26),e._UZ(1,"fa-icon",27),e.YNc(2,Pt,2,1,"span",28),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.invoiceError)}}let Et=(()=>{class n{constructor(t,a,o,s,u,g){this.dialogRef=t,this.data=a,this.store=o,this.decimalPipe=s,this.commonService=u,this.actions=g,this.faExclamationTriangle=y.eHv,this.selNode={},this.memo="",this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=l.IV,this.timeUnitEnum=l.Qk,this.timeUnits=l.LO,this.selTimeUnit=l.Qk.SECS,this.invoiceError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.actions.pipe((0,_.R)(this.unSubs[2]),(0,E.h)(t=>t.type===l.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(t=>{t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&"SaveNewInvoice"===t.payload.action&&(this.invoiceError=t.payload.message,t.payload.status===l.Bn.ERROR&&(this.invoiceError=t.payload.message),t.payload.status===l.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(t){this.invoiceError="";let a=this.expiry?this.expiry:3600;this.selTimeUnit!==l.Qk.SECS&&(a=this.commonService.convertTime(this.expiry,this.selTimeUnit,l.Qk.SECS)),this.store.dispatch((0,v.Rd)({payload:{uiMessage:l.m6.ADD_INVOICE,memo:this.memo,invoiceValue:this.invoiceValue,private:this.private,expiry:a,pageSize:this.pageSize,openModal:!0}}))}resetData(){this.memo="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=l.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,_.R)(this.unSubs[3])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,l.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onTimeUnitChange(t){this.expiry&&this.selTimeUnit!==t.value&&(this.expiry=this.commonService.convertTime(this.expiry,this.selTimeUnit,t.value)),this.selTimeUnit=t.value}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(A.yh),e.Y36(p.JJ),e.Y36(O.v),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-create-invoices"]],decls:38,vars:16,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","end start"],["matInput","","autoFocus","","placeholder","Memo","tabindex","1","name","memo",3,"ngModel","ngModelChange"],["fxFlex","50","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","2","name","invoiceValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","24","fxLayoutAlign","start end"],["matInput","","placeholder","Expiry","type","number","tabindex","3","name","expiry",3,"ngModel","step","min","ngModelChange"],["tabindex","4","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"mt-1"],["tabindex","4","color","primary","name","private",3,"ngModel","ngModelChange"],["matTooltip","Include routing hints for private channels","matTooltipPosition","above",1,"info-icon"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-1"],["mat-button","","color","primary","tabindex","5","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","6",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[4,"ngIf"]],template:function(t,a){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Create Invoice"),e.qZA()(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),e.NdJ("ngModelChange",function(u){return a.memo=u}),e.qZA()(),e.TgZ(13,"mat-form-field",11)(14,"input",12),e.NdJ("ngModelChange",function(u){return a.invoiceValue=u})("keyup",function(){return a.onInvoiceValueChange()}),e.qZA(),e.TgZ(15,"span",13),e._uU(16," Sats "),e.qZA(),e.TgZ(17,"mat-hint"),e._uU(18),e.qZA()(),e.TgZ(19,"mat-form-field",14)(20,"input",15),e.NdJ("ngModelChange",function(u){return a.expiry=u}),e.qZA(),e.TgZ(21,"span",13),e._uU(22),e.ALo(23,"titlecase"),e.qZA()(),e.TgZ(24,"mat-form-field",14)(25,"mat-select",16),e.NdJ("selectionChange",function(u){return a.onTimeUnitChange(u)}),e.YNc(26,Dt,3,4,"mat-option",17),e.qZA()(),e.TgZ(27,"div",18)(28,"mat-slide-toggle",19),e.NdJ("ngModelChange",function(u){return a.private=u}),e._uU(29,"Private Routing Hints"),e.qZA(),e.TgZ(30,"mat-icon",20),e._uU(31,"info_outline"),e.qZA()(),e.YNc(32,Jt,3,2,"div",21),e.TgZ(33,"div",22)(34,"button",23),e.NdJ("click",function(){return a.resetData()}),e._uU(35,"Clear Field"),e.qZA(),e.TgZ(36,"button",24),e.NdJ("click",function(){e.CHM(o);const u=e.MAs(10);return a.onAddInvoice(u)}),e._uU(37,"Create Invoice"),e.qZA()()()()()()}2&t&&(e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",a.memo),e.xp6(2),e.Q6J("ngModel",a.invoiceValue)("step",100)("min",1),e.xp6(4),e.Oqu(a.invoiceValueHint),e.xp6(2),e.Q6J("ngModel",a.expiry)("step",a.selTimeUnit===a.timeUnitEnum.SECS?300:a.selTimeUnit===a.timeUnitEnum.MINS?10:a.selTimeUnit===a.timeUnitEnum.HOURS?2:1)("min",1),e.xp6(2),e.hij(" ",e.lcZ(23,14,a.selTimeUnit)," "),e.xp6(3),e.Q6J("value",a.selTimeUnit),e.xp6(1),e.Q6J("ngForOf",a.timeUnits),e.xp6(2),e.Q6J("ngModel",a.private),e.xp6(4),e.Q6J("ngIf",""!==a.invoiceError))},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,J.ZT,b.dn,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.JJ,c.On,c.wV,c.qQ,$.q,f.R9,f.bx,R.gD,p.sg,Y.ey,ue.Rr,K.Hw,X.gM,p.O5,M.BN],pipes:[p.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var Qt=h(8627);function Yt(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"input",7),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().memo=o}),e.qZA()(),e.TgZ(4,"mat-form-field",8)(5,"input",9),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().invoiceValue=o})("keyup",function(){return e.CHM(t),e.oxw().onInvoiceValueChange()}),e.qZA(),e.TgZ(6,"span",10),e._uU(7," Sats "),e.qZA(),e.TgZ(8,"mat-hint"),e._uU(9),e.qZA()(),e.TgZ(10,"div",11)(11,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(12,"Clear Field"),e.qZA(),e.TgZ(13,"button",13),e.NdJ("click",function(){e.CHM(t);const o=e.MAs(1);return e.oxw().onAddInvoice(o)}),e._uU(14,"Create Invoice"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.memo),e.xp6(2),e.Q6J("ngModel",t.invoiceValue)("step",100)("min",1),e.xp6(4),e.Oqu(t.invoiceValueHint)}}function Ht(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",14)(1,"button",15),e.NdJ("click",function(){return e.CHM(t),e.oxw().openCreateInvoiceModal()}),e._uU(2,"Create Invoice"),e.qZA()()}}function Bt(n,i){1&n&&e._UZ(0,"mat-progress-bar",46)}function Vt(n,i){1&n&&(e.TgZ(0,"th",47),e._uU(1," Date Created "),e.qZA())}const pe=function(n){return{"mr-0":n}};function Gt(n,i){if(1&n&&e._UZ(0,"span",53),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,pe,t.screenSize===t.screenSizeEnum.XS))}}function zt(n,i){if(1&n&&e._UZ(0,"span",54),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,pe,t.screenSize===t.screenSizeEnum.XS))}}function Wt(n,i){if(1&n&&e._UZ(0,"span",55),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,pe,t.screenSize===t.screenSizeEnum.XS))}}function Xt(n,i){if(1&n&&e._UZ(0,"span",56),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,pe,t.screenSize===t.screenSizeEnum.XS))}}function $t(n,i){if(1&n&&(e.TgZ(0,"td",48),e.YNc(1,Gt,1,3,"span",49),e.YNc(2,zt,1,3,"span",50),e.YNc(3,Wt,1,3,"span",51),e.YNc(4,Xt,1,3,"span",52),e._uU(5),e.ALo(6,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf","OPEN"===(null==t?null:t.state)),e.xp6(1),e.Q6J("ngIf","SETTLED"===(null==t?null:t.state)),e.xp6(1),e.Q6J("ngIf","ACCEPTED"===(null==t?null:t.state)),e.xp6(1),e.Q6J("ngIf","CANCELED"===(null==t?null:t.state)),e.xp6(1),e.hij(" ",e.xi3(6,5,1e3*(null==t?null:t.creation_date),"dd/MMM/y HH:mm"),"")}}function jt(n,i){1&n&&(e.TgZ(0,"th",57),e._uU(1," Date Settled "),e.qZA())}function Kt(n,i){if(1&n&&(e.TgZ(0,"td",58),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(0!=+(null==t?null:t.settle_date)?e.xi3(2,1,1e3*+(null==t?null:t.settle_date),"dd/MMM/y HH:mm"):"-")}}function en(n,i){1&n&&(e.TgZ(0,"th",47),e._uU(1," Memo "),e.qZA())}const tn=function(n){return{"max-width":n}};function nn(n,i){if(1&n&&(e.TgZ(0,"td",48)(1,"div",59)(2,"span",60),e._uU(3),e.qZA()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngStyle",e.VKq(2,tn,a.screenSize===a.screenSizeEnum.XS?"10rem":"22rem")),e.xp6(2),e.Oqu(null==t?null:t.memo)}}function an(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1," Amount (Sats) "),e.qZA())}function on(n,i){if(1&n&&(e.TgZ(0,"td",48)(1,"span",62),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.value)," ")}}function sn(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1," Amount Settled (Sats) "),e.qZA())}function ln(n,i){if(1&n&&(e.TgZ(0,"td",48)(1,"span",62),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.amt_paid_sat)," ")}}function rn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",63)(1,"div",64)(2,"mat-select",65),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",66),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}const cn=function(n){return{"pl-3":n}};function un(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",67)(1,"div",68)(2,"mat-select",69),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",66),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).onInvoiceClick(s)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",66),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).onRefreshInvoice(s)}),e._uU(7,"Refresh"),e.qZA()()()()}if(2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,cn,t.screenSize!==t.screenSizeEnum.XS))}}function pn(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No invoice available."),e.qZA())}function mn(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting invoices..."),e.qZA())}function dn(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function _n(n,i){if(1&n&&(e.TgZ(0,"td",70),e.YNc(1,pn,2,0,"p",71),e.YNc(2,mn,2,0,"p",71),e.YNc(3,dn,2,1,"p",71),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.invoices&&t.invoices.data)||(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const hn=function(n){return{"display-none":n}};function gn(n,i){if(1&n&&e._UZ(0,"tr",72),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,hn,(null==t.invoices?null:t.invoices.data)&&(null==t.invoices||null==t.invoices.data?null:t.invoices.data.length)>0))}}function fn(n,i){1&n&&e._UZ(0,"tr",73)}function Cn(n,i){1&n&&e._UZ(0,"tr",74)}const xn=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},yn=function(){return["no_invoice"]};function Tn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",16)(1,"div",17)(2,"div",18),e._UZ(3,"fa-icon",19),e.TgZ(4,"span",20),e._uU(5,"Invoices History"),e.qZA()(),e.TgZ(6,"mat-form-field",21)(7,"input",22),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA()()(),e.TgZ(8,"div",23),e.YNc(9,Bt,1,0,"mat-progress-bar",24),e.TgZ(10,"table",25,26),e.ynx(12,27),e.YNc(13,Vt,2,0,"th",28),e.YNc(14,$t,7,8,"td",29),e.BQk(),e.ynx(15,30),e.YNc(16,jt,2,0,"th",31),e.YNc(17,Kt,3,4,"td",32),e.BQk(),e.ynx(18,33),e.YNc(19,en,2,0,"th",28),e.YNc(20,nn,4,4,"td",29),e.BQk(),e.ynx(21,34),e.YNc(22,an,2,0,"th",35),e.YNc(23,on,4,3,"td",29),e.BQk(),e.ynx(24,36),e.YNc(25,sn,2,0,"th",35),e.YNc(26,ln,4,3,"td",29),e.BQk(),e.ynx(27,37),e.YNc(28,rn,6,0,"th",38),e.YNc(29,un,8,3,"td",39),e.BQk(),e.ynx(30,40),e.YNc(31,_n,4,3,"td",41),e.BQk(),e.YNc(32,gn,1,3,"tr",42),e.YNc(33,fn,1,0,"tr",43),e.YNc(34,Cn,1,0,"tr",44),e.qZA(),e.TgZ(35,"mat-paginator",45),e.NdJ("page",function(o){return e.CHM(t),e.oxw().onPageChange(o)}),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("icon",t.faHistory),e.xp6(4),e.Q6J("ngModel",t.selFilter),e.xp6(2),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.invoices)("ngClass",e.VKq(13,xn,""!==t.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(15,yn)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("length",t.totalInvoices)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let De=(()=>{class n{constructor(t,a,o,s,u,g){this.logger=t,this.store=a,this.decimalPipe=o,this.commonService=s,this.datePipe=u,this.actions=g,this.calledFrom="transactions",this.faHistory=y.qO$,this.selNode={},this.newlyAddedInvoiceMemo=null,this.newlyAddedInvoiceValue=null,this.memo="",this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoicesData=[],this.information={},this.flgSticky=!1,this.selFilter="",this.private=!1,this.expiryStep=100,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.firstOffset=-1,this.lastOffset=-1,this.totalInvoices=0,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["creation_date","value","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["creation_date","settle_date","value","amt_paid_sat","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["creation_date","settle_date","memo","value","actions"]):(this.flgSticky=!0,this.displayedColumns=["creation_date","settle_date","memo","value","amt_paid_sat","actions"])}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(C.Ef).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.totalInvoices=t.listInvoices.total_invoices,this.firstOffset=+t.listInvoices.first_index_offset,this.lastOffset=+t.listInvoices.last_index_offset,this.invoicesData=t.listInvoices.invoices||[],this.invoicesData.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoicesData),this.logger.info(t)}),this.actions.pipe((0,_.R)(this.unSubs[3]),(0,E.h)(t=>t.type===l.uR.SET_LOOKUP_LND||t.type===l.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(t=>{t.type===l.uR.SET_LOOKUP_LND&&this.invoicesData.length>0&&this.sort&&this.paginator&&t.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(t.payload))),this.loadInvoicesTable(this.invoicesData))})}ngAfterViewInit(){this.invoicesData.length>0&&this.loadInvoicesTable(this.invoicesData)}onAddInvoice(t){const a=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo=this.memo,this.newlyAddedInvoiceValue=this.invoiceValue,this.store.dispatch((0,v.Rd)({payload:{uiMessage:l.m6.ADD_INVOICE,memo:this.memo,invoiceValue:this.invoiceValue,private:this.private,expiry:a,pageSize:this.pageSize,openModal:!0}})),this.resetData()}onInvoiceClick(t){this.store.dispatch((0,w.qR)({payload:{data:{invoice:t,newlyAdded:!1,component:Qt.v}}}))}onRefreshInvoice(t){this.store.dispatch((0,v.n7)({payload:{openSnackBar:!0,paymentHash:Buffer.from(t.r_hash.trim(),"hex").toString("base64").replace(/\+/g,"-").replace(/[/]/g,"_")}}))}updateInvoicesData(t){this.invoicesData=this.invoicesData.map(a=>a.r_hash===t.r_hash?t:a)}loadInvoicesTable(t){this.invoices=new r.by(t?[...t]:[]),this.invoices.sort=this.sort,this.invoices.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.invoices.filterPredicate=(a,o)=>((a.creation_date?this.datePipe.transform(new Date(1e3*a.creation_date),"dd/MMM/YYYY HH:mm").toLowerCase():"")+(a.settle_date?this.datePipe.transform(new Date(1e3*a.settle_date),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(a).toLowerCase()).includes(o),this.applyFilter(),this.logger.info(this.invoices)}resetData(){this.memo="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onPageChange(t){let a=!0,o=this.lastOffset;this.pageSize=t.pageSize,0===t.pageIndex?(a=!0,o=0):t.pageIndext.previousPageIndex&&t.length>(t.pageIndex+1)*t.pageSize?(a=!0,o=this.firstOffset):t.length<=(t.pageIndex+1)*t.pageSize&&(a=!1,o=0),this.store.dispatch((0,v.WM)({payload:{num_max_invoices:t.pageSize,index_offset:o,reversed:a}}))}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,_.R)(this.unSubs[4])).subscribe({next:t=>{this.invoiceValueHint="= "+t.symbol+this.decimalPipe.transform(t.OTHER,l.Xz.OTHER)+" "+t.unit},error:t=>{this.invoiceValueHint="Conversion Error: "+t}}))}onDownloadCSV(){this.invoices.data&&this.invoices.data.length>0&&this.commonService.downloadFile(this.invoices.data,"Invoices")}openCreateInvoiceModal(){this.store.dispatch((0,w.qR)({payload:{data:{pageSize:this.pageSize,component:Et}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(p.JJ),e.Y36(O.v),e.Y36(p.uU),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lightning-invoices"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","end start"],["matInput","","placeholder","Memo","tabindex","1","name","memo",3,"ngModel","ngModelChange"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","2","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4",3,"click"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","5",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","tabindex","6","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start end","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","creation_date"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","settle_date"],["mat-header-cell","","mat-sort-header","","class","pl-4",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["matColumnDef","memo"],["matColumnDef","value"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amt_paid_sat"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot grey","matTooltip","Open","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot green","matTooltip","Settled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Accepted","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Cancelled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Open","matTooltipPosition","right",1,"dot","grey",3,"ngClass"],["matTooltip","Settled","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Accepted","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Cancelled","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-header-cell","","mat-sort-header","",1,"pl-4"],["mat-cell","",1,"pl-4"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Yt,15,5,"form",1),e.YNc(2,Ht,3,0,"div",2),e.YNc(3,Tn,36,16,"div",3),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf","home"===a.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===a.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===a.calledFrom))},directives:[d.xw,d.yH,d.Wh,p.O5,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,c.JJ,c.On,c.wV,c.qQ,$.q,f.R9,f.bx,k.lW,M.BN,Q.$V,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,X.gM,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.uU,p.JJ],styles:[".mat-column-memo[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-memo[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var V=h(5698),j=h(8104),H=h(1125),ne=h(1079);const bn=["paymentReq"];function vn(n,i){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function Zn(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment request is required."),e.qZA())}function wn(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function An(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment amount is required."),e.qZA())}function Sn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",1)(1,"input",29,30),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().paymentAmount=o})("change",function(o){return e.CHM(t),e.oxw().onAmountChange(o)}),e.qZA(),e.TgZ(3,"mat-hint"),e._uU(4,"It is a zero amount invoice, enter amount to be paid."),e.qZA(),e.YNc(5,An,2,0,"mat-error",11),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.paymentAmount),e.xp6(4),e.Q6J("ngIf",!t.paymentAmount)}}function Ln(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",null==t?null:t.name," ")}}function kn(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("",null==t.selFeeLimitType?null:t.selFeeLimitType.placeholder," is required.")}}function Fn(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu((null==t?null:t.remote_alias)||(null==t?null:t.chan_id))}}function Nn(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Channel not found in the list."),e.qZA())}function qn(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentError)}}function Un(n,i){if(1&n&&(e.TgZ(0,"div",32),e._UZ(1,"fa-icon",33),e.YNc(2,qn,2,1,"span",11),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.paymentError)}}let On=(()=>{class n{constructor(t,a,o,s,u,g,U){this.dialogRef=t,this.store=a,this.logger=o,this.commonService=s,this.decimalPipe=u,this.actions=g,this.dataService=U,this.faExclamationTriangle=y.eHv,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.showAdvanced=!1,this.activeChannels=[],this.filteredMinAmtActvChannels=[],this.selectedChannelCtrl=new c.NI,this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.feeLimitTypes=l.Vc,this.advancedTitle="Advanced Options",this.paymentError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(o=>{this.selNode=o}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[1])).subscribe(o=>{this.activeChannels=o.channels&&o.channels.length?o.channels.filter(s=>s.active):[],this.filteredMinAmtActvChannels=this.activeChannels,this.filteredMinAmtActvChannels.length&&this.filteredMinAmtActvChannels.length>0?this.selectedChannelCtrl.enable():this.selectedChannelCtrl.disable(),this.logger.info(o)}),this.actions.pipe((0,_.R)(this.unSubs[2]),(0,E.h)(o=>o.type===l.uR.UPDATE_API_CALL_STATUS_LND||o.type===l.uR.SEND_PAYMENT_STATUS_LND)).subscribe(o=>{o.type===l.uR.SEND_PAYMENT_STATUS_LND&&this.dialogRef.close(),o.type===l.uR.UPDATE_API_CALL_STATUS_LND&&o.payload.status===l.Bn.ERROR&&"SendPayment"===o.payload.action&&(delete this.paymentDecoded.num_satoshis,this.paymentError=o.payload.message)});let t="",a="";this.activeChannels=this.activeChannels.sort((o,s)=>(t=o.remote_alias?o.remote_alias.toLowerCase():o.chan_id?o.chan_id.toLowerCase():"",a=s.remote_alias?s.remote_alias.toLowerCase():s.chan_id?s.chan_id.toLowerCase():"",ta?1:0)),this.selectedChannelCtrl.valueChanges.pipe((0,_.R)(this.unSubs[3])).subscribe(o=>{"string"==typeof o&&(this.filteredMinAmtActvChannels=this.filterChannels())})}filterChannels(){return this.activeChannels&&this.activeChannels.length?this.activeChannels.filter(t=>0===(t.remote_alias?t.remote_alias.toLowerCase():t.chan_id?t.chan_id.toLowerCase():"").indexOf(this.selectedChannelCtrl.value?this.selectedChannelCtrl.value.toLowerCase():"")&&(t.local_balance||0)>=+(this.paymentDecoded.num_satoshis?this.paymentDecoded.num_satoshis:0)):[]}displayFn(t){return t&&t.remote_alias?t.remote_alias:t&&t.chan_id?t.chan_id:""}onSelectedChannelChanged(){if(this.selectedChannelCtrl.value&&this.selectedChannelCtrl.value.length>0&&"string"==typeof this.selectedChannelCtrl.value){const t=this.activeChannels&&this.activeChannels.length?this.activeChannels.filter(a=>{const o=a.remote_alias?a.remote_alias.toLowerCase():a.chan_id?a.chan_id.toLowerCase():"";return o.length===this.selectedChannelCtrl.value.length&&0===o.indexOf(this.selectedChannelCtrl.value?this.selectedChannelCtrl.value.toLowerCase():"")}):[];t&&t.length>0?(this.selectedChannelCtrl.setValue(t[0]),this.selectedChannelCtrl.setErrors(null)):this.selectedChannelCtrl.setErrors({notfound:!0})}}onSendPayment(){if(this.selectedChannelCtrl.value&&"string"==typeof this.selectedChannelCtrl.value&&this.onSelectedChannelChanged(),!this.paymentRequest||this.zeroAmtInvoice&&(!this.paymentAmount||this.paymentAmount<=0)||"string"==typeof this.selectedChannelCtrl.value)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.onPaymentRequestEntry(this.paymentRequest)}sendPayment(){var t;if(this.selFeeLimitType!==this.feeLimitTypes[0]&&!this.feeLimit)return!0;this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis&&(this.paymentDecoded.num_satoshis=(+this.paymentDecoded.num_msat/1e3).toString()),this.paymentDecoded.num_satoshis&&""!==this.paymentDecoded.num_satoshis&&"0"!==this.paymentDecoded.num_satoshis?(this.zeroAmtInvoice=!1,this.store.dispatch((0,v.oV)({payload:{uiMessage:l.m6.SEND_PAYMENT,paymentReq:this.paymentRequest,outgoingChannel:this.selectedChannelCtrl.value,feeLimitType:this.selFeeLimitType.id,feeLimit:this.feeLimit,fromDialog:!0}}))):(this.zeroAmtInvoice=!0,this.paymentDecoded.num_satoshis=(null===(t=this.paymentAmount)||void 0===t?void 0:t.toString())||"",this.store.dispatch((0,v.oV)({payload:{uiMessage:l.m6.SEND_PAYMENT,paymentReq:this.paymentRequest,paymentAmount:this.paymentAmount||0,outgoingChannel:this.selectedChannelCtrl.value,feeLimitType:this.selFeeLimitType.id,feeLimit:this.feeLimit,fromDialog:!0}})))}onAmountChange(t){delete this.paymentDecoded.num_satoshis}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentAmount=null,this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentRequest&&this.paymentRequest.length>100&&(this.paymentReq.control.setErrors(null),this.zeroAmtInvoice=!1,this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,V.q)(1)).subscribe({next:a=>{this.paymentDecoded=a,this.selectedChannelCtrl.setValue(null),this.onAdvancedPanelToggle(!0,!0),this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis&&(this.paymentDecoded.num_satoshis=(+this.paymentDecoded.num_msat/1e3).toString()),this.paymentDecoded.num_satoshis&&""!==this.paymentDecoded.num_satoshis&&"0"!==this.paymentDecoded.num_satoshis?(this.filteredMinAmtActvChannels=this.filterChannels(),this.filteredMinAmtActvChannels.length&&this.filteredMinAmtActvChannels.length>0?this.selectedChannelCtrl.enable():this.selectedChannelCtrl.disable(),this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.num_satoshis,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"BTC",this.selNode.fiatConversion).pipe((0,_.R)(this.unSubs[4])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis)+" Sats ("+o.symbol+" "+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+(this.paymentDecoded.description?this.paymentDecoded.description:"None")},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis)+" Sats | Memo: "+(this.paymentDecoded.description?this.paymentDecoded.description:"None")+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis)+" Sats | Memo: "+(this.paymentDecoded.description?this.paymentDecoded.description:"None")):(this.zeroAmtInvoice=!0,this.filteredMinAmtActvChannels=this.activeChannels,this.filteredMinAmtActvChannels.length&&this.filteredMinAmtActvChannels.length>0?this.selectedChannelCtrl.enable():this.selectedChannelCtrl.disable(),this.paymentDecodedHint="Memo: "+(this.paymentDecoded.description?this.paymentDecoded.description:"None"))},error:a=>{this.logger.error(a),this.paymentDecodedHint="ERROR: "+a.message,this.paymentReq.control.setErrors({decodeError:!0})}}))}onAdvancedPanelToggle(t,a){if(t&&!a){const o=this.selectedChannelCtrl.value&&this.selectedChannelCtrl.value.remote_alias?this.selectedChannelCtrl.value.remote_alias:this.selectedChannelCtrl.value&&this.selectedChannelCtrl.value.chan_id?this.selectedChannelCtrl.value.chan_id:"";this.advancedTitle="Advanced Options | "+this.selFeeLimitType.name+("none"===this.selFeeLimitType.id?"":": "+this.feeLimit)+(""!==o?" | First Outgoing Channel: "+o:"")}else this.advancedTitle="Advanced Options"}resetData(){this.paymentDecoded={},this.paymentRequest="",this.selectedChannelCtrl.setValue(null),this.filteredMinAmtActvChannels=this.activeChannels,this.filteredMinAmtActvChannels.length&&this.filteredMinAmtActvChannels.length>0?this.selectedChannelCtrl.enable():this.selectedChannelCtrl.disable(),this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.advancedTitle="Advanced Options",this.zeroAmtInvoice=!1,this.paymentReq.control.setErrors(null),this.paymentError="",this.paymentDecodedHint=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(A.yh),e.Y36(N.mQ),e.Y36(O.v),e.Y36(p.JJ),e.Y36(G.eX),e.Y36(j.D))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lightning-send-payments"]],viewQuery:function(t,a){if(1&t&&e.Gf(bn,5),2&t){let o;e.iGM(o=e.CRH())&&(a.paymentReq=o.first)}},decls:43,vars:21,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","rows","4","tabindex","1","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxFlex","100",4,"ngIf"],["fxFlex","100","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxFlex","100","fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["fxFlex","30","fxLayoutAlign","start end"],["tabindex","5","Placeholder","Fee Limits",3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","26"],["matInput","","type","number","name","feeLmt","required","","tabindex","6",3,"ngModel","placeholder","step","min","disabled","ngModelChange"],["fLmt","ngModel"],["fxFlex","40","fxLayoutAlign","start end"],["type","text","placeholder","First Outgoing Channel","aria-label","First Outgoing Channel","matInput","","tabindex","7",3,"formControl","matAutocomplete"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],["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","","id","sendBtn","color","primary","tabindex","3",3,"click"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Send Payment"),e.qZA()(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",1)(12,"textarea",9,10),e.NdJ("ngModelChange",function(s){return a.onPaymentRequestEntry(s)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(14,vn,2,1,"mat-hint",11),e.YNc(15,Zn,2,0,"mat-error",11),e.YNc(16,wn,2,1,"mat-error",11),e.qZA(),e.YNc(17,Sn,6,2,"mat-form-field",12),e.TgZ(18,"mat-expansion-panel",13),e.NdJ("closed",function(){return a.onAdvancedPanelToggle(!0,!1)})("opened",function(){return a.onAdvancedPanelToggle(!1,!1)}),e.TgZ(19,"mat-expansion-panel-header")(20,"mat-panel-title")(21,"span"),e._uU(22),e.qZA()()(),e.TgZ(23,"div",14)(24,"mat-form-field",15)(25,"mat-select",16),e.NdJ("valueChange",function(s){return a.selFeeLimitType=s}),e.YNc(26,Ln,2,2,"mat-option",17),e.qZA()(),e.TgZ(27,"mat-form-field",18)(28,"input",19,20),e.NdJ("ngModelChange",function(s){return a.feeLimit=s}),e.qZA(),e.YNc(30,kn,2,1,"mat-error",11),e.qZA(),e.TgZ(31,"mat-form-field",21),e._UZ(32,"input",22),e.TgZ(33,"mat-autocomplete",23,24),e.NdJ("optionSelected",function(){return a.onSelectedChannelChanged()}),e.YNc(35,Fn,2,2,"mat-option",17),e.qZA(),e.YNc(36,Nn,2,0,"mat-error",11),e.qZA()()(),e.YNc(37,Un,3,2,"div",25),e.TgZ(38,"div",26)(39,"button",27),e.NdJ("click",function(){return a.resetData()}),e._uU(40,"Clear Fields"),e.qZA(),e.TgZ(41,"button",28),e.NdJ("click",function(){return a.onSendPayment()}),e._uU(42,"Send Payment"),e.qZA()()()()()()),2&t){const o=e.MAs(13),s=e.MAs(34);e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",a.paymentRequest),e.xp6(2),e.Q6J("ngIf",a.paymentRequest&&""!==a.paymentDecodedHint),e.xp6(1),e.Q6J("ngIf",!a.paymentRequest),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.decodeError),e.xp6(1),e.Q6J("ngIf",a.zeroAmtInvoice),e.xp6(5),e.Oqu(a.advancedTitle),e.xp6(3),e.Q6J("value",a.selFeeLimitType),e.xp6(1),e.Q6J("ngForOf",a.feeLimitTypes),e.xp6(2),e.Q6J("ngModel",a.feeLimit)("placeholder",null==a.selFeeLimitType?null:a.selFeeLimitType.placeholder)("step",1)("min",0)("disabled",a.selFeeLimitType===a.feeLimitTypes[0]),e.xp6(2),e.Q6J("ngIf",a.selFeeLimitType!==a.feeLimitTypes[0]&&!a.feeLimit),e.xp6(2),e.Q6J("formControl",a.selectedChannelCtrl)("matAutocomplete",s),e.xp6(1),e.Q6J("displayWith",a.displayFn),e.xp6(2),e.Q6J("ngForOf",a.filteredMinAmtActvChannels),e.xp6(1),e.Q6J("ngIf",null==a.selectedChannelCtrl.errors?null:a.selectedChannelCtrl.errors.notfound),e.xp6(1),e.Q6J("ngIf",""!==a.paymentError)}},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,J.ZT,b.dn,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,p.O5,f.bx,f.TO,H.ib,H.yz,H.yK,R.gD,p.sg,Y.ey,c.wV,c.qQ,$.q,ne.ZL,c.oH,ne.XC,M.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();var oe=h(3093),ee=h(711);const Rn=["sendPaymentForm"];function In(n,i){if(1&n&&(e.TgZ(0,"mat-hint"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentDecodedHint)}}function Mn(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Payment request is required."),e.qZA())}function Dn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"textarea",7,8),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),e.qZA(),e.YNc(5,In,2,1,"mat-hint",9),e.YNc(6,Mn,2,0,"mat-error",9),e.qZA(),e.TgZ(7,"div",10)(8,"button",11),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(9,"Clear Field"),e.qZA(),e.TgZ(10,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSendPayment()}),e._uU(11,"Send Payment"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.paymentRequest),e.xp6(2),e.Q6J("ngIf",t.paymentRequest&&""!==t.paymentDecodedHint),e.xp6(1),e.Q6J("ngIf",!t.paymentRequest)}}function Pn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",13)(1,"button",14),e.NdJ("click",function(){return e.CHM(t),e.oxw().openSendPaymentModal()}),e._uU(2,"Send Payment"),e.qZA()()}}function Jn(n,i){1&n&&e._UZ(0,"mat-progress-bar",52)}function En(n,i){1&n&&(e.TgZ(0,"th",53),e._uU(1,"Creation Date"),e.qZA())}const ae=function(n){return{"mr-0":n}};function Qn(n,i){if(1&n&&e._UZ(0,"span",57),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function Yn(n,i){if(1&n&&e._UZ(0,"span",58),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function Hn(n,i){if(1&n&&(e.TgZ(0,"td",54),e.YNc(1,Qn,1,3,"span",55),e.YNc(2,Yn,1,3,"span",56),e._uU(3),e.ALo(4,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf","SUCCEEDED"===(null==t?null:t.status)),e.xp6(1),e.Q6J("ngIf","SUCCEEDED"!==(null==t?null:t.status)),e.xp6(1),e.hij(" ",e.xi3(4,3,1e3*(null==t?null:t.creation_date),"dd/MMM/y HH:mm")," ")}}function Bn(n,i){1&n&&(e.TgZ(0,"th",53),e._uU(1,"Payment Hash"),e.qZA())}const Pe=function(n){return{"max-width":n}};function Vn(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",59)(2,"span",60),e._uU(3),e.qZA()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngStyle",e.VKq(2,Pe,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(2),e.Oqu(null==t?null:t.payment_hash)}}function Gn(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1,"Fee (Sats)"),e.qZA())}function zn(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",62),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,null==t?null:t.fee))}}function Wn(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1,"Value (Sats)"),e.qZA())}function Xn(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",62),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,null==t?null:t.value))}}function $n(n,i){1&n&&(e.TgZ(0,"th",61),e._uU(1,"#Hops"),e.qZA())}function jn(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",62),e._uU(2),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu((null==t||null==t.htlcs[0]||null==t.htlcs[0].route||null==t.htlcs[0].route.hops?null:t.htlcs[0].route.hops.length)||0)}}function Kn(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",63)(1,"div",64)(2,"mat-select",65),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",66),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function ea(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",67)(1,"button",68),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).onPaymentClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function ta(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No payment available."),e.qZA())}function na(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting payments..."),e.qZA())}function aa(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function ia(n,i){if(1&n&&(e.TgZ(0,"td",69),e.YNc(1,ta,2,0,"p",9),e.YNc(2,na,2,0,"p",9),e.YNc(3,aa,2,1,"p",9),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.payments&&t.payments.data)||(null==t.payments||null==t.payments.data?null:t.payments.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}function oa(n,i){if(1&n&&e._UZ(0,"span",57),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function sa(n,i){if(1&n&&e._UZ(0,"span",58),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function la(n,i){if(1&n&&e._UZ(0,"span",57),2&n){const t=e.oxw(5);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function ra(n,i){if(1&n&&e._UZ(0,"span",58),2&n){const t=e.oxw(5);e.Q6J("ngClass",e.VKq(1,ae,t.screenSize===t.screenSizeEnum.XS))}}function ca(n,i){if(1&n&&(e.TgZ(0,"span",72),e.YNc(1,la,1,3,"span",55),e.YNc(2,ra,1,3,"span",56),e._uU(3),e.ALo(4,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf","SUCCEEDED"===t.status),e.xp6(1),e.Q6J("ngIf","SUCCEEDED"!==t.status),e.xp6(1),e.hij(" ",e.xi3(4,3,1e3*t.attempt_time,"dd/MMM/y HH:mm")," ")}}function ua(n,i){if(1&n&&(e.ynx(0),e.YNc(1,ca,5,6,"span",71),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function pa(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",70),e.YNc(2,oa,1,3,"span",55),e.YNc(3,sa,1,3,"span",56),e._uU(4),e.qZA(),e.YNc(5,ua,2,1,"ng-container",9),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Q6J("ngIf","SUCCEEDED"===(null==t?null:t.status)),e.xp6(1),e.Q6J("ngIf","SUCCEEDED"!==(null==t?null:t.status)),e.xp6(1),e.hij(" Total Attempts: ",null==t||null==t.htlcs?null:t.htlcs.length," "),e.xp6(1),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function ma(n,i){if(1&n&&(e.TgZ(0,"span",70),e._uU(1),e.qZA()),2&n){const t=i.index;e.xp6(1),e.hij(" HTLC ",t+1," ")}}function da(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,ma,2,1,"span",73),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function _a(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",59)(2,"span",60),e._uU(3),e.qZA()(),e.YNc(4,da,2,1,"span",9),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngStyle",e.VKq(3,Pe,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(2),e.Oqu(null==t?null:t.payment_hash),e.xp6(1),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function ha(n,i){if(1&n&&(e.TgZ(0,"span",74),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,null==t.route?null:t.route.total_fees,"1.0-0")," ")}}function ga(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,ha,3,4,"span",75),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function fa(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",74),e._uU(2),e.ALo(3,"number"),e.qZA(),e.YNc(4,ga,2,1,"span",9),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.xi3(3,2,null==t?null:t.fee,"1.0-0")),e.xp6(2),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function Ca(n,i){if(1&n&&(e.TgZ(0,"span",74),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,null==t.route?null:t.route.total_amt,"1.0-0")," ")}}function xa(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Ca,3,4,"span",75),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function ya(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",74),e._uU(2),e.ALo(3,"number"),e.qZA(),e.YNc(4,xa,2,1,"span",9),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.xi3(3,2,null==t?null:t.value,"1.0-0")),e.xp6(2),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function Ta(n,i){if(1&n&&(e.TgZ(0,"span",74),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,(null==t.route||null==t.route.hops?null:t.route.hops.length)||0,"1.0-0")," ")}}function ba(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Ta,3,4,"span",75),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function va(n,i){if(1&n&&(e.TgZ(0,"td",54)(1,"span",74),e._uU(2,"-"),e.qZA(),e.YNc(3,ba,2,1,"span",9),e.qZA()),2&n){const t=i.$implicit;e.xp6(3),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function Za(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",62)(1,"button",79),e.NdJ("click",function(){const s=e.CHM(t).$implicit,u=e.oxw(2).$implicit;return e.oxw(2).onHTLCClick(s,u)}),e._uU(2),e.qZA()()}if(2&n){const t=i.index;e.xp6(2),e.hij("View ",t+1,"")}}function wa(n,i){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,Za,3,1,"div",78),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.htlcs)}}function Aa(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",76)(1,"span",62)(2,"button",77),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return s.is_expanded=!(null!=s&&s.is_expanded)}),e._uU(3),e.qZA()(),e.YNc(4,wa,2,1,"div",9),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(3),e.Oqu(null!=t&&t.is_expanded?"Hide":"Show"),e.xp6(1),e.Q6J("ngIf",null==t?null:t.is_expanded)}}function Sa(n,i){1&n&&e._UZ(0,"tr",80)}const La=function(n){return{"display-none":n}};function ka(n,i){if(1&n&&e._UZ(0,"tr",81),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,La,(null==t.payments?null:t.payments.data)&&(null==t.payments||null==t.payments.data?null:t.payments.data.length)>0))}}function Fa(n,i){1&n&&e._UZ(0,"tr",82)}function Na(n,i){1&n&&e._UZ(0,"tr",80)}const qa=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Ua=function(){return["no_payment"]};function Oa(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",15)(1,"div",16)(2,"div",17),e._UZ(3,"fa-icon",18),e.TgZ(4,"span",19),e._uU(5,"Payments History"),e.qZA()(),e.TgZ(6,"mat-form-field",20)(7,"input",21),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().selFilter=o}),e.qZA()()(),e.TgZ(8,"div",22)(9,"div",23),e.YNc(10,Jn,1,0,"mat-progress-bar",24),e.TgZ(11,"table",25,26),e.ynx(13,27),e.YNc(14,En,2,0,"th",28),e.YNc(15,Hn,5,6,"td",29),e.BQk(),e.ynx(16,30),e.YNc(17,Bn,2,0,"th",28),e.YNc(18,Vn,4,4,"td",29),e.BQk(),e.ynx(19,31),e.YNc(20,Gn,2,0,"th",32),e.YNc(21,zn,4,3,"td",29),e.BQk(),e.ynx(22,33),e.YNc(23,Wn,2,0,"th",32),e.YNc(24,Xn,4,3,"td",29),e.BQk(),e.ynx(25,34),e.YNc(26,$n,2,0,"th",32),e.YNc(27,jn,3,1,"td",29),e.BQk(),e.ynx(28,35),e.YNc(29,Kn,6,0,"th",36),e.YNc(30,ea,3,0,"td",37),e.BQk(),e.ynx(31,38),e.YNc(32,ia,4,3,"td",39),e.BQk(),e.ynx(33,40),e.YNc(34,pa,6,4,"td",29),e.BQk(),e.ynx(35,41),e.YNc(36,_a,5,5,"td",29),e.BQk(),e.ynx(37,42),e.YNc(38,fa,5,5,"td",29),e.BQk(),e.ynx(39,43),e.YNc(40,ya,5,5,"td",29),e.BQk(),e.ynx(41,44),e.YNc(42,va,4,1,"td",29),e.BQk(),e.ynx(43,45),e.YNc(44,Aa,5,2,"td",46),e.BQk(),e.YNc(45,Sa,1,0,"tr",47),e.YNc(46,ka,1,3,"tr",48),e.YNc(47,Fa,1,0,"tr",49),e.YNc(48,Na,1,0,"tr",50),e.qZA(),e.TgZ(49,"mat-paginator",51),e.NdJ("page",function(o){return e.CHM(t),e.oxw().onPageChange(o)}),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("icon",t.faHistory),e.xp6(4),e.Q6J("ngModel",t.selFilter),e.xp6(3),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.payments)("ngClass",e.VKq(15,qa,""!==t.errorMessage)),e.xp6(34),e.Q6J("matRowDefColumns",t.htlcColumns)("matRowDefWhen",t.is_group),e.xp6(1),e.Q6J("matFooterRowDef",e.DdM(17,Ua)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("length",t.totalPayments)("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Je=(()=>{class n{constructor(t,a,o,s,u,g,U,x){this.logger=t,this.commonService=a,this.dataService=o,this.store=s,this.rtlEffects=u,this.lndEffects=g,this.decimalPipe=U,this.datePipe=x,this.calledFrom="transactions",this.faHistory=y.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.peers=[],this.totalPayments=100,this.paymentJSONArr=[],this.displayedColumns=[],this.htlcColumns=[],this.paymentDecoded={},this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.firstOffset=-1,this.lastOffset=-1,this.selFilter="",this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["creation_date","fee","actions"],this.htlcColumns=["groupTotal","groupFee","groupAction"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["creation_date","fee","value","hops","actions"],this.htlcColumns=["groupTotal","groupFee","groupValue","groupHops","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["creation_date","payment_hash","fee","value","hops","actions"],this.htlcColumns=["groupTotal","groupHash","groupFee","groupValue","groupHops","groupAction"])}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.peers=t.peers}),this.store.select(C.PP).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.paymentJSONArr=t.listPayments.payments||[],this.totalPayments=this.paymentJSONArr.length,this.firstOffset=+t.listPayments.first_index_offset,this.lastOffset=+t.listPayments.last_index_offset,this.paymentJSONArr&&this.paymentJSONArr.length>0&&this.sort&&this.paginator&&this.loadPaymentsTable(this.paymentJSONArr.slice(0,this.pageSize)),this.logger.info(t)})}ngAfterViewInit(){this.paymentJSONArr&&this.paymentJSONArr.length>0&&this.loadPaymentsTable(this.paymentJSONArr.slice(0,this.pageSize))}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,V.q)(1)).subscribe(t=>{this.paymentDecoded=t,this.paymentDecoded.timestamp?(this.paymentDecoded.num_satoshis=this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis?(+this.paymentDecoded.num_msat/1e3).toString():"0",this.sendPayment()):this.resetData()})}sendPayment(){this.newlyAddedPayment=this.paymentDecoded.payment_hash,this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis&&(this.paymentDecoded.num_satoshis=(+this.paymentDecoded.num_msat/1e3).toString()),this.paymentDecoded.num_satoshis&&""!==this.paymentDecoded.num_satoshis&&"0"!==this.paymentDecoded.num_satoshis?(this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"destination",value:this.paymentDecoded.destination,title:"Destination",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.Gi.DATE_TIME},{key:"num_satoshis",value:this.paymentDecoded.num_satoshis,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:l.Gi.NUMBER},{key:"cltv_expiry",value:this.paymentDecoded.cltv_expiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,V.q)(1)).subscribe(a=>{a&&(this.store.dispatch((0,v.oV)({payload:{uiMessage:l.m6.SEND_PAYMENT,paymentReq:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",message:[[{key:"payment_hash",value:this.paymentDecoded.payment_hash,title:"Payment Hash",width:100}],[{key:"destination",value:this.paymentDecoded.destination,title:"Destination",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.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:l.Gi.NUMBER},{key:"cltv_expiry",value:this.paymentDecoded.cltv_expiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,getInputs:[{placeholder:"Amount (Sats)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,V.q)(1)).subscribe(o=>{o&&(this.paymentDecoded.num_satoshis=o[0].inputValue,this.store.dispatch((0,v.oV)({payload:{uiMessage:l.m6.SEND_PAYMENT,paymentReq:this.paymentRequest,paymentAmount:o[0].inputValue,fromDialog:!1}})),this.resetData())}))}openSendPaymentModal(){this.store.dispatch((0,w.qR)({payload:{data:{component:On}}}))}onPaymentRequestEntry(t){this.paymentRequest=t,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,V.q)(1)).subscribe(a=>{this.paymentDecoded=a,this.paymentDecoded.num_msat&&!this.paymentDecoded.num_satoshis&&(this.paymentDecoded.num_satoshis=(+this.paymentDecoded.num_msat/1e3).toString()),this.paymentDecoded.num_satoshis?this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.num_satoshis,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,_.R)(this.unSubs[5])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis?this.paymentDecoded.num_satoshis:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis?this.paymentDecoded.num_satoshis:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.num_satoshis?this.paymentDecoded.num_satoshis:0)+" Sats | Memo: "+this.paymentDecoded.description:this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description})}onPageChange(t){let a=!0,o=this.lastOffset;this.pageSize=t.pageSize,0===t.pageIndex?(a=!0,o=0):t.pageIndext.previousPageIndex&&t.length>(t.pageIndex+1)*t.pageSize?(a=!0,o=this.firstOffset):t.length<=(t.pageIndex+1)*t.pageSize&&(a=!1,o=0);const s=t.pageIndex*this.pageSize;this.loadPaymentsTable(this.paymentJSONArr.slice(s,s+this.pageSize))}is_group(t,a){return a.htlcs&&a.htlcs.length>1}resetData(){this.paymentDecoded={},this.paymentRequest="",this.form.resetForm()}getHopDetails(t){const a=this;return t.reduce((o,s)=>{const u=a.peers.find(g=>g.pub_key===s.pub_key);return u&&u.alias?o.push("
Channel: "+u.alias.padEnd(20)+"			Amount (Sats): "+a.decimalPipe.transform(s.amt_to_forward)+"
"):a.dataService.getAliasesFromPubkeys(s.pub_key,!1).pipe((0,_.R)(a.unSubs[6])).subscribe(g=>{o.push("
Channel: "+(g.node&&g.node.alias?g.node.alias.padEnd(20):s.pub_key.substring(0,17)+"...")+"			Amount (Sats): "+a.decimalPipe.transform(s.amt_to_forward)+"
")}),o},[])}onHTLCClick(t,a){a.payment_request&&""!==a.payment_request.trim()?this.dataService.decodePayment(a.payment_request,!1).pipe((0,V.q)(1)).subscribe({next:o=>{setTimeout(()=>{this.showHTLCView(t,a,o)},0)},error:o=>{this.showHTLCView(t,a,null)}}):this.showHTLCView(t,a,null)}showHTLCView(t,a,o){const s=[[{key:"payment_hash",value:a.payment_hash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"preimage",value:t.preimage,title:"Preimage",width:100,type:l.Gi.STRING}],[{key:"payment_request",value:a.payment_request,title:"Payment Request",width:100,type:l.Gi.STRING}],[{key:"status",value:t.status,title:"Status",width:33,type:l.Gi.STRING},{key:"attempt_time_ns",value:+t.attempt_time_ns/1e9,title:"Attempt Time",width:33,type:l.Gi.DATE_TIME},{key:"resolve_time_ns",value:+t.resolve_time_ns/1e9,title:"Resolve Time",width:34,type:l.Gi.DATE_TIME}],[{key:"total_amt",value:t.route.total_amt,title:"Amount (Sats)",width:33,type:l.Gi.NUMBER},{key:"total_fees",value:t.route.total_fees,title:"Fee (Sats)",width:33,type:l.Gi.NUMBER},{key:"total_time_lock",value:t.route.total_time_lock,title:"Total Time Lock",width:34,type:l.Gi.NUMBER}],[{key:"hops",value:this.getHopDetails(t.route.hops),title:"Hops",width:100,type:l.Gi.ARRAY}]];o&&o.description&&""!==o.description&&s.splice(3,0,[{key:"description",value:o.description,title:"Description",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"HTLC Information",message:s,scrollable:t.route&&t.route.hops&&t.route.hops.length>1}}}))}onPaymentClick(t){if(t.htlcs&&t.htlcs[0]&&t.htlcs[0].route&&t.htlcs[0].route.hops&&t.htlcs[0].route.hops.length>0){const a=t.htlcs[0].route.hops.reduce((o,s)=>""===o?s.pub_key:o+","+s.pub_key,"");this.dataService.getAliasesFromPubkeys(a,!0).pipe((0,_.R)(this.unSubs[7])).subscribe(o=>{this.showPaymentView(t,o.reduce((s,u)=>""===s?u:s+"\n"+u,""))})}else this.showPaymentView(t,"")}showPaymentView(t,a){const o=[[{key:"payment_hash",value:t.payment_hash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"payment_preimage",value:t.payment_preimage,title:"Payment Preimage",width:100,type:l.Gi.STRING}],[{key:"payment_request",value:t.payment_request,title:"Payment Request",width:100,type:l.Gi.STRING}],[{key:"status",value:t.status,title:"Status",width:50,type:l.Gi.STRING},{key:"creation_date",value:t.creation_date,title:"Creation Date",width:50,type:l.Gi.DATE_TIME}],[{key:"value_msat",value:t.value_msat,title:"Value (mSats)",width:50,type:l.Gi.NUMBER},{key:"fee_msat",value:t.fee_msat,title:"Fee (mSats)",width:50,type:l.Gi.NUMBER}],[{key:"path",value:a,title:"Path",width:100,type:l.Gi.STRING}]];t.payment_request&&""!==t.payment_request.trim()?this.dataService.decodePayment(t.payment_request,!1).pipe((0,V.q)(1)).subscribe(s=>{s&&s.description&&""!==s.description&&o.splice(3,0,[{key:"description",value:s.description,title:"Description",width:100,type:l.Gi.STRING}]),setTimeout(()=>{this.openPaymentAlert(o,t.htlcs&&t.htlcs[0]&&t.htlcs[0].route&&t.htlcs[0].route.hops&&t.htlcs[0].route.hops.length>1)},0)}):this.openPaymentAlert(o,!1)}openPaymentAlert(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Payment Information",message:t,scrollable:a}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}loadPaymentsTable(t){this.payments=new r.by(t?[...t]:[]),this.payments.sortingDataAccessor=(a,o)=>"hops"===o?a.htlcs.length&&a.htlcs[0]&&a.htlcs[0].route&&a.htlcs[0].route.hops&&a.htlcs[0].route.hops.length?a.htlcs[0].route.hops.length:0:a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.payments.sort=this.sort,this.payments.filterPredicate=(a,o)=>((a.creation_date?this.datePipe.transform(new Date(1e3*a.creation_date),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(a).toLowerCase()).includes(o),this.applyFilter()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const t=JSON.parse(JSON.stringify(this.payments.data)),a=t.reduce((o,s)=>(s.payment_request&&""!==s.payment_request.trim()&&(o=""===o?s.payment_request:o+","+s.payment_request),o),"");this.dataService.decodePayments(a).pipe((0,_.R)(this.unSubs[8])).subscribe(o=>{let s=0;o.forEach((g,U)=>{if(g){for(;t[U+s].payment_hash!==g.payment_hash;)s+=1;t[U+s].description=g.description}});const u=t.reduce((g,U)=>g.concat(U),[]);this.commonService.downloadFile(u,"Payments")})}}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(j.D),e.Y36(A.yh),e.Y36(oe.V),e.Y36(ee.l),e.Y36(p.JJ),e.Y36(p.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lightning-payments"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Rn,5),e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first),e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayoutAlign","space-between stretch","fxLayout","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayoutAlign","space-between stretch","fxLayout","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","4",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource","ngClass"],["table",""],["matColumnDef","creation_date"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","payment_hash"],["matColumnDef","fee"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","value"],["matColumnDef","hops"],["matColumnDef","actions"],["mat-header-cell","","class","px-2",4,"matHeaderCellDef"],["mat-cell","","class","px-2","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","groupTotal"],["matColumnDef","groupHash"],["matColumnDef","groupFee"],["matColumnDef","groupValue"],["matColumnDef","groupHops"],["matColumnDef","groupAction"],["mat-cell","","class","px-2",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"length","pageSize","pageSizeOptions","showFirstLastButtons","page"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Succeeded","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Failed","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Succeeded","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Failed","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["fxLayout","row",1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-2"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-2"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"htlc-row-span"],["fxLayoutAlign","start center","class","htlc-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"htlc-row-span","pl-3"],["fxLayoutAlign","start center","class","htlc-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"htlc-row-span"],["fxLayoutAlign","end center","class","htlc-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-2"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-htlc-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-htlc-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Dn,12,3,"form",1),e.YNc(2,Pn,3,0,"div",2),e.YNc(3,Oa,50,18,"div",3),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf","home"===a.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===a.calledFrom),e.xp6(1),e.Q6J("ngIf","transactions"===a.calledFrom))},directives:[d.xw,d.yH,d.Wh,p.O5,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,c.Q7,Q.$V,c.JJ,c.On,f.bx,f.TO,k.lW,M.BN,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,X.gM,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,p.sg,r.nj,r.Gk,r.Ke,r.Q2,r.as,r.XQ,L.NW],pipes:[p.uU,p.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}.mat-column-payment_hash[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-htlc-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-htlc-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.htlc-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:17rem}"]}),n})();function Ra(n,i){if(1&n&&(e.TgZ(0,"button",26)(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA()()),2&n){e.oxw();const t=e.MAs(11);e.Q6J("matMenuTriggerFor",t)}}function Ia(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){const s=e.CHM(t).index,u=e.oxw().$implicit;return e.oxw(2).onNavigateTo(u.links[s])}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function Ma(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){return e.CHM(t),e.oxw(3).onsortChannelsBy()}),e._uU(1),e.qZA()}if(2&n){const t=e.oxw(3);e.xp6(1),e.hij("Sort By ","Balance Score"===t.sortField?"Capacity":"Balance Score","")}}function Da(n,i){1&n&&e._UZ(0,"mat-progress-bar",28)}function Pa(n,i){if(1&n&&e._UZ(0,"rtl-node-info",29),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!1)}}function Ja(n,i){if(1&n&&e._UZ(0,"rtl-balances-info",30),2&n){const t=e.oxw(3);e.Q6J("balances",t.balances)("errorMessage",t.errorMessages[3]+" "+t.errorMessages[2])}}function Ea(n,i){if(1&n&&e._UZ(0,"rtl-channel-capacity-info",31),2&n){const t=e.oxw(3);e.Q6J("sortBy",t.sortField)("channelBalances",t.channelBalances)("allChannels",t.allChannelsCapacity)("errorMessage",t.errorMessages[3])}}function Qa(n,i){if(1&n&&e._UZ(0,"rtl-fee-info",32),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[1])}}function Ya(n,i){if(1&n&&e._UZ(0,"rtl-channel-status-info",33),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[3]+" "+t.errorMessages[4])}}function Ha(n,i){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find information!"),e.qZA())}const Ee=function(n){return{"dashboard-card-content":!0,"error-border":n}};function Ba(n,i){if(1&n&&(e.TgZ(0,"mat-grid-tile",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-title",10)(4,"div"),e._UZ(5,"fa-icon",11),e.TgZ(6,"span"),e._uU(7),e.qZA()(),e.TgZ(8,"div"),e.YNc(9,Ra,3,1,"button",12),e.TgZ(10,"mat-menu",13,14),e.YNc(12,Ia,2,1,"button",15),e.YNc(13,Ma,2,1,"button",16),e.qZA()()()(),e.TgZ(14,"mat-card-content",17),e.YNc(15,Da,1,0,"mat-progress-bar",18),e.TgZ(16,"div",19),e.YNc(17,Pa,1,2,"rtl-node-info",20),e.YNc(18,Ja,1,2,"rtl-balances-info",21),e.YNc(19,Ea,1,4,"rtl-channel-capacity-info",22),e.YNc(20,Qa,1,2,"rtl-fee-info",23),e.YNc(21,Ya,1,2,"rtl-channel-status-info",24),e.YNc(22,Ha,2,0,"h3",25),e.qZA()()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(5),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Q6J("ngIf",t.links[0]),e.xp6(3),e.Q6J("ngForOf",t.goToOptions),e.xp6(1),e.Q6J("ngIf","capacity"===t.id),e.xp6(1),e.s9C("fxFlex","node"===t.id||"balance"===t.id?70:"fee"===t.id||"status"===t.id?78:90),e.Q6J("ngClass",e.VKq(16,Ee,"node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.ERROR||"balance"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||a.apiCallStatusBlockchainBalance.status===a.apiCallStatusEnum.ERROR)||"capacity"===t.id&&a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||"fee"===t.id&&a.apiCallStatusFees.status===a.apiCallStatusEnum.ERROR||"status"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||a.apiCallStatusPendingChannels.status===a.apiCallStatusEnum.ERROR))),e.xp6(1),e.Q6J("ngIf","node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.INITIATED||"balance"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||a.apiCallStatusBlockchainBalance.status===a.apiCallStatusEnum.INITIATED)||"capacity"===t.id&&a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||"fee"===t.id&&a.apiCallStatusFees.status===a.apiCallStatusEnum.INITIATED||"status"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||a.apiCallStatusPendingChannels.status===a.apiCallStatusEnum.INITIATED)),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","balance"),e.xp6(1),e.Q6J("ngSwitchCase","capacity"),e.xp6(1),e.Q6J("ngSwitchCase","fee"),e.xp6(1),e.Q6J("ngSwitchCase","status")}}function Va(n,i){if(1&n&&(e.TgZ(0,"div",2)(1,"div",3),e._UZ(2,"fa-icon",4),e.TgZ(3,"span",5),e._uU(4),e.qZA()(),e.TgZ(5,"mat-grid-list",6),e.YNc(6,Ba,23,18,"mat-grid-tile",7),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Q6J("icon",t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.ERROR?t.faFrown:t.faSmile),e.xp6(2),e.Oqu(t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.COMPLETED?"Welcome "+t.information.alias+"! Your node is up and running.":t.apiCallStatusNodeInfo.status===t.apiCallStatusEnum.INITIATED?"Wait! Getting your node information...":"Error! Please check the server connection."),e.xp6(1),e.Q6J("rowHeight",t.operatorCardHeight),e.xp6(1),e.Q6J("ngForOf",t.operatorCards)}}function Ga(n,i){if(1&n&&(e.TgZ(0,"button",26)(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA()()),2&n){e.oxw();const t=e.MAs(9);e.Q6J("matMenuTriggerFor",t)}}function za(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){const s=e.CHM(t).index,u=e.oxw(2).$implicit;return e.oxw(2).onNavigateTo(u.links[s])}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function Wa(n,i){if(1&n&&(e.TgZ(0,"mat-card-header")(1,"mat-card-title",10)(2,"div"),e._UZ(3,"fa-icon",11),e.TgZ(4,"span"),e._uU(5),e.qZA()(),e.TgZ(6,"div"),e.YNc(7,Ga,3,1,"button",12),e.TgZ(8,"mat-menu",13,43),e.YNc(10,za,2,1,"button",15),e.qZA()()()()),2&n){const t=e.oxw().$implicit;e.xp6(3),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(2),e.Q6J("ngIf",t.links[0]),e.xp6(3),e.Q6J("ngForOf",t.goToOptions)}}function Xa(n,i){1&n&&e._UZ(0,"mat-progress-bar",28)}function $a(n,i){if(1&n&&e._UZ(0,"rtl-node-info",44),2&n){const t=e.oxw(3);e.Q6J("information",t.information)}}function ja(n,i){if(1&n&&e._UZ(0,"rtl-balances-info",30),2&n){const t=e.oxw(3);e.Q6J("balances",t.balances)("errorMessage",t.errorMessages[3]+" "+t.errorMessages[2])}}function Ka(n,i){if(1&n&&e._UZ(0,"rtl-channel-liquidity-info",45),2&n){const t=e.oxw(3);e.Q6J("direction","In")("totalLiquidity",t.totalInboundLiquidity)("allChannels",t.allInboundChannels)("errorMessage",t.errorMessages[3])}}function ei(n,i){if(1&n&&e._UZ(0,"rtl-channel-liquidity-info",45),2&n){const t=e.oxw(3);e.Q6J("direction","Out")("totalLiquidity",t.totalOutboundLiquidity)("allChannels",t.allOutboundChannels)("errorMessage",t.errorMessages[3])}}function ti(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",27),e.NdJ("click",function(){const s=e.CHM(t).index,u=e.oxw(3).$implicit;return e.oxw(2).onNavigateTo(u.links[s])}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function ni(n,i){if(1&n&&(e.TgZ(0,"button",26)(1,"mat-icon"),e._uU(2,"more_vert"),e.qZA()(),e.TgZ(3,"mat-menu",13,53),e.YNc(5,ti,2,1,"button",15),e.qZA()),2&n){const t=e.MAs(4),a=e.oxw(2).$implicit;e.Q6J("matMenuTriggerFor",t),e.xp6(5),e.Q6J("ngForOf",a.goToOptions)}}function ai(n,i){1&n&&(e.TgZ(0,"span",46)(1,"mat-tab-group",47)(2,"mat-tab",48),e._UZ(3,"rtl-lightning-invoices",49),e.qZA(),e.TgZ(4,"mat-tab",50),e._UZ(5,"rtl-lightning-payments",49),e.qZA(),e.TgZ(6,"mat-tab",51),e.YNc(7,ni,6,2,"ng-template",52),e.qZA()()()),2&n&&(e.xp6(3),e.Q6J("calledFrom","home"),e.xp6(2),e.Q6J("calledFrom","home"),e.xp6(1),e.Q6J("disabled",!0))}function ii(n,i){1&n&&(e.TgZ(0,"h3"),e._uU(1,"Error! Unable to find information!"),e.qZA())}const oi=function(n){return{"p-0":n}};function si(n,i){if(1&n&&(e.TgZ(0,"mat-grid-tile",8)(1,"mat-card",36),e.YNc(2,Wa,11,4,"mat-card-header",37),e.TgZ(3,"mat-card-content",38),e.YNc(4,Xa,1,0,"mat-progress-bar",18),e.TgZ(5,"div",39),e.YNc(6,$a,1,1,"rtl-node-info",40),e.YNc(7,ja,1,2,"rtl-balances-info",21),e.YNc(8,Ka,1,4,"rtl-channel-liquidity-info",41),e.YNc(9,ei,1,4,"rtl-channel-liquidity-info",41),e.YNc(10,ai,8,3,"span",42),e.YNc(11,ii,2,0,"h3",25),e.qZA()()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(1),e.Q6J("ngClass",e.VKq(13,oi,"transactions"===t.id)),e.xp6(1),e.Q6J("ngIf","transactions"!==t.id),e.xp6(1),e.s9C("fxFlex","transactions"===t.id?100:"balance"===t.id?70:90),e.Q6J("ngClass",e.VKq(15,Ee,"node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.ERROR||"balance"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||a.apiCallStatusBlockchainBalance.status===a.apiCallStatusEnum.ERROR)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.INITIATED||"balance"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||a.apiCallStatusBlockchainBalance.status===a.apiCallStatusEnum.INITIATED)||("inboundLiq"===t.id||"outboundLiq"===t.id)&&a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","balance"),e.xp6(1),e.Q6J("ngSwitchCase","inboundLiq"),e.xp6(1),e.Q6J("ngSwitchCase","outboundLiq"),e.xp6(1),e.Q6J("ngSwitchCase","transactions")}}function li(n,i){if(1&n&&(e.TgZ(0,"div",34),e._UZ(1,"fa-icon",4),e.TgZ(2,"span",5),e._uU(3),e.qZA()(),e.TgZ(4,"mat-grid-list",35),e.YNc(5,si,12,17,"mat-grid-tile",7),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faSmile),e.xp6(2),e.hij("Welcome ",t.information.alias,"! Your node is up and running."),e.xp6(1),e.Q6J("rowHeight",t.merchantCardHeight),e.xp6(1),e.Q6J("ngForOf",t.merchantCards)}}let ri=(()=>{class n{constructor(t,a,o,s,u){switch(this.logger=t,this.store=a,this.actions=o,this.commonService=s,this.router=u,this.faSmile=Ne.ctA,this.faFrown=Ne.KfU,this.faAngleDoubleDown=y.Sbq,this.faAngleDoubleUp=y.Vfw,this.faChartPie=y.OS1,this.faBolt=y.BDt,this.faServer=y.xf3,this.faNetworkWired=y.kXW,this.flgChildInfoUpdated=!1,this.userPersonaEnum=l.ol,this.activeChannels=0,this.inactiveChannels=0,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.balances={onchain:-1,lightning:-1,total:0},this.allChannels=[],this.channelsStatus={},this.allChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="330px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.screenSizeEnum=l.cu,this.errorMessages=["","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusFees=null,this.apiCallStatusBlockchainBalance=null,this.apiCallStatusChannels=null,this.apiCallStatusPendingChannels=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize){case l.cu.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","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:6},{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}];break;case l.cu.SM:case l.cu.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","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}];break;default: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","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(C.bx).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=t.apiCallStatus,this.apiCallStatusNodeInfo.status===l.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.selNode=t.nodeSettings,this.information=t.information}),this.store.select(C.JG).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===l.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[2]="",this.apiCallStatusBlockchainBalance=t.apiCallStatus,this.apiCallStatusBlockchainBalance.status===l.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusBlockchainBalance.message?JSON.stringify(this.apiCallStatusBlockchainBalance.message):this.apiCallStatusBlockchainBalance.message),this.balances.onchain=+t.blockchainBalance.total_balance>=0?+t.blockchainBalance.total_balance:0,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances)}),this.store.select(C.ni).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusPendingChannels=t.apiCallStatus,this.apiCallStatusPendingChannels.status===l.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusPendingChannels.message?JSON.stringify(this.apiCallStatusPendingChannels.message):this.apiCallStatusPendingChannels.message),this.channelsStatus.pending={num_channels:t.pendingChannelsSummary.open.num_channels,capacity:t.pendingChannelsSummary.open.limbo_balance},this.channelsStatus.closing={num_channels:t.pendingChannelsSummary.closing.num_channels+t.pendingChannelsSummary.force_closing.num_channels+t.pendingChannelsSummary.waiting_close.num_channels,capacity:t.pendingChannelsSummary.total_limbo_balance}}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.errorMessages[3]="",this.apiCallStatusChannels=t.apiCallStatus,this.apiCallStatusChannels.status===l.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message);const a=t.lightningBalance&&t.lightningBalance.local?+t.lightningBalance.local:0,o=t.lightningBalance&&t.lightningBalance.remote?+t.lightningBalance.remote:0;this.channelBalances={localBalance:a,remoteBalance:o,balancedness:+(1-Math.abs((a-o)/(a+o))).toFixed(3)},this.balances.lightning=t.lightningBalance.local,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances),this.activeChannels=t.channelsSummary.active.num_channels,this.inactiveChannels=t.channelsSummary.inactive.num_channels,this.channelsStatus.active=t.channelsSummary.active,this.channelsStatus.inactive=t.channelsSummary.inactive,this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.allChannels=t.channels.filter(u=>!0===u.active),this.allChannelsCapacity=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels,"balancedness"))),this.allInboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels.filter(u=>u.remote_balance>0),"remote_balance"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.allChannels.filter(u=>u.local_balance>0),"local_balance"))),this.allChannels.forEach(u=>{this.totalInboundLiquidity=this.totalInboundLiquidity+ +u.remote_balance,this.totalOutboundLiquidity=this.totalOutboundLiquidity+ +u.local_balance}),this.flgChildInfoUpdated=this.balances.lightning>=0&&this.balances.onchain>=0&&this.fees.month_fee_sum>=0,this.logger.info(t)}),this.actions.pipe((0,_.R)(this.unSubs[5]),(0,E.h)(t=>t.type===l.uR.FETCH_FEES_LND||t.type===l.uR.SET_FEES_LND)).subscribe(t=>{t.type===l.uR.FETCH_FEES_LND&&(this.flgChildInfoUpdated=!1),t.type===l.uR.SET_FEES_LND&&(this.flgChildInfoUpdated=!0)})}onNavigateTo(t){"inactive"===t?this.router.navigateByUrl("/lnd/connections",{state:{filter:t}}):this.router.navigateByUrl("/lnd/"+t)}onsortChannelsBy(){"Balance Score"===this.sortField?(this.sortField="Capacity",this.allChannelsCapacity=this.allChannels.sort((t,a)=>{const o=+t.local_balance+ +t.remote_balance,s=+a.local_balance+ +a.remote_balance;return o>s?-1:o{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(G.eX),e.Y36(O.v),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-0"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10",3,"rowHeight"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click",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-0"],["cols","6",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",3,"fxFlex","ngClass"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",3,"ngSwitch"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",3,"perfectScrollbar",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",1,"w-100","dashboard-tabs-group"],["label","Receive"],[3,"calledFrom"],["label","Pay"],[3,"disabled"],["mat-tab-label",""],["menuTransactions","matMenu"]],template:function(t,a){if(1&t&&(e.YNc(0,Va,7,4,"div",0),e.YNc(1,li,6,4,"ng-template",null,1,e.W1O)),2&t){const o=e.MAs(2);e.Q6J("ngIf",(null==a.selNode?null:a.selNode.userPersona)===a.userPersonaEnum.OPERATOR)("ngIfElse",o)}},directives:[p.O5,d.xw,d.Wh,M.BN,ce.Il,p.sg,ce.DX,b.a8,d.yH,b.dk,b.n5,k.lW,he.p6,K.Hw,he.VK,he.OP,b.dn,p.mk,S.oO,P.pW,p.RF,p.n9,Ue,ut,Ct,Oe,Re,p.ED,Mt,Q.$V,D.SP,D.uX,De,Je,D.uD],styles:[""]}),n})();var ge=h(1203),fe=h(7544);function ci(n,i){if(1&n&&(e.TgZ(0,"span",10),e._uU(1,"Channels"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.activeChannels)}}function ui(n,i){if(1&n&&(e.TgZ(0,"span",10),e._uU(1,"Peers"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.activePeers)}}let pi=(()=>{class n{constructor(t,a,o){this.store=t,this.logger=a,this.router=o,this.selNode={},this.activePeers=0,this.activeChannels=0,this.faUsers=y.FVb,this.faChartPie=y.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t instanceof T.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(a=>a.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.$k).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.selNode=t}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.activePeers=t.peers&&t.peers.length?t.peers.length:0,this.logger.info(t)}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.activeChannels=t.channelsSummary.active.num_channels,this.logger.info(t)}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.balances=[{title:"Total Balance",dataValue:t.blockchainBalance.total_balance||0},{title:"Confirmed",dataValue:t.blockchainBalance.confirmed_balance},{title:"Unconfirmed",dataValue:t.blockchainBalance.unconfirmed_balance}],this.logger.info(t)})}onSelectedTabChange(t){this.router.navigateByUrl("/lnd/connections/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(N.mQ),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-connections"]],decls:22,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"On-chain Balance"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA()()(),e.TgZ(8,"div",0),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"Connections"),e.qZA()(),e.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"mat-tab-group",7),e.NdJ("selectedIndexChange",function(s){return a.activeLink=s})("selectedTabChange",function(s){return a.onSelectedTabChange(s)}),e.TgZ(16,"mat-tab"),e.YNc(17,ci,2,1,"ng-template",8),e.qZA(),e.TgZ(18,"mat-tab"),e.YNc(19,ui,2,1,"ng-template",8),e.qZA()(),e.TgZ(20,"div",9),e._UZ(21,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faChartPie),e.xp6(6),e.Q6J("values",a.balances),e.xp6(2),e.Q6J("icon",a.faUsers),e.xp6(6),e.Q6J("selectedIndex",a.activeLink))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,ge.D,D.SP,D.uX,D.uD,fe.k,d.yH,T.lC],styles:[""]}),n})();var Ce=h(8675),Qe=h(4004),Ye=h(9843);const mi=["form"];function di(n,i){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t.alias?t.alias:t.pub_key?t.pub_key:"")}}function _i(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Peer alias is required."),e.qZA())}function hi(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Peer not found in the list."),e.qZA())}function gi(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",34),e._UZ(1,"input",35),e.TgZ(2,"mat-autocomplete",36,37),e.NdJ("optionSelected",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.YNc(4,di,2,2,"mat-option",24),e.ALo(5,"async"),e.qZA(),e.YNc(6,_i,2,0,"mat-error",17),e.YNc(7,hi,2,0,"mat-error",17),e.qZA()}if(2&n){const t=e.MAs(3),a=e.oxw();e.xp6(1),e.Q6J("formControl",a.selectedPeer)("matAutocomplete",t),e.xp6(1),e.Q6J("displayWith",a.displayFn),e.xp6(2),e.Q6J("ngForOf",e.lcZ(5,6,a.filteredPeers)),e.xp6(2),e.Q6J("ngIf",null==a.selectedPeer.errors?null:a.selectedPeer.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.selectedPeer.errors?null:a.selectedPeer.errors.notfound)}}function fi(n,i){1&n&&e.GkF(0)}function Ci(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function xi(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function yi(n,i){if(1&n&&(e.TgZ(0,"mat-option",38),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function Ti(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("","1"===t.selTransType?"Target Confirmation Blocks":"Fee"," is required.")}}function bi(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.channelConnectionError)}}function vi(n,i){if(1&n&&(e.TgZ(0,"div",39),e._UZ(1,"fa-icon",40),e.YNc(2,bi,2,1,"span",17),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.channelConnectionError)}}function Zi(n,i){if(1&n&&(e.TgZ(0,"mat-expansion-panel",42)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),e._uU(4,"Peer: \xa0"),e.qZA(),e.TgZ(5,"strong",43),e._uU(6),e.qZA()()(),e.TgZ(7,"div",9)(8,"div",44)(9,"div",34)(10,"h4",45),e._uU(11,"Pubkey"),e.qZA(),e.TgZ(12,"span",46),e._uU(13),e.qZA()()(),e._UZ(14,"mat-divider",47),e.TgZ(15,"div",44)(16,"div",48)(17,"h4",45),e._uU(18,"Address"),e.qZA(),e.TgZ(19,"span",49),e._uU(20),e.qZA()(),e.TgZ(21,"div",48)(22,"h4",45),e._uU(23,"Inbound"),e.qZA(),e.TgZ(24,"span",49),e._uU(25),e.qZA()()()()()),2&n){const t=e.oxw(2);e.xp6(6),e.Oqu((null==t.peer?null:t.peer.alias)||(null==t.peer?null:t.peer.address)),e.xp6(7),e.Oqu(t.peer.pub_key),e.xp6(7),e.Oqu(null==t.peer?null:t.peer.address),e.xp6(5),e.Oqu(null!=t.peer&&t.peer.inbound?"True":"False")}}function wi(n,i){if(1&n&&e.YNc(0,Zi,26,4,"mat-expansion-panel",41),2&n){const t=e.oxw();e.Q6J("ngIf",t.peer)}}let He=(()=>{class n{constructor(t,a,o,s){this.dialogRef=t,this.data=a,this.store=o,this.actions=s,this.selectedPeer=new c.NI,this.amount=new c.NI,this.faExclamationTriangle=y.eHv,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.selectedPubkey="",this.isPrivate=!1,this.selTransType="0",this.spendUnconfirmed=!1,this.transTypeValue="",this.transTypes=l.Dr,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(o=>o.type===l.uR.UPDATE_API_CALL_STATUS_LND||o.type===l.uR.FETCH_CHANNELS_LND)).subscribe(o=>{o.type===l.uR.UPDATE_API_CALL_STATUS_LND&&o.payload.status===l.Bn.ERROR&&"SaveNewChannel"===o.payload.action&&(this.channelConnectionError=o.payload.message),o.type===l.uR.FETCH_CHANNELS_LND&&this.dialogRef.close()});let t="",a="";this.sortedPeers=this.peers.sort((o,s)=>(t=o.alias?o.alias.toLowerCase():o.pub_key?o.pub_key.toLowerCase():"",a=s.alias?s.alias.toLowerCase():o.pub_key.toLowerCase(),ta?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,_.R)(this.unSubs[1]),(0,Ce.O)(""),(0,Qe.U)(o=>"string"==typeof o?o:o.alias?o.alias:o.pub_key),(0,Qe.U)(o=>o?this.filterPeers(o):this.sortedPeers.slice()))}filterPeers(t){return this.sortedPeers.filter(a=>0===a.alias.toLowerCase().indexOf(t?t.toLowerCase():""))}displayFn(t){return t&&t.alias?t.alias:t&&t.pub_key?t.pub_key:""}onSelectedPeerChanged(){if(this.channelConnectionError="",this.selectedPubkey=this.selectedPeer.value&&this.selectedPeer.value.pub_key?this.selectedPeer.value.pub_key:null,"string"==typeof this.selectedPeer.value){const t=this.peers.filter(a=>a.alias.length===this.selectedPeer.value.length&&0===a.alias.toLowerCase().indexOf(this.selectedPeer.value?this.selectedPeer.value.toLowerCase():""));1===t.length&&t[0].pub_key&&(this.selectedPubkey=t[0].pub_key)}this.selectedPeer.setErrors(this.selectedPeer.value&&!this.selectedPubkey?{notfound:!0}:null)}onClose(){this.dialogRef.close(!1)}resetData(){this.selectedPeer.setValue(""),this.fundingAmount=null,this.isPrivate=!1,this.spendUnconfirmed=!1,this.selTransType="0",this.transTypeValue="",this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0||("1"===this.selTransType||"2"===this.selTransType)&&!this.transTypeValue)return!0;this.store.dispatch((0,v.YX)({payload:{selectedPeerPubkey:this.peer&&this.peer.pub_key?this.peer.pub_key:this.selectedPubkey,fundingAmount:this.fundingAmount,private:this.isPrivate,transType:this.selTransType,transTypeValue:this.transTypeValue,spendUnconfirmed:this.spendUnconfirmed}}))}onAdvancedPanelToggle(t){this.advancedTitle=t?"Advanced Options | "+("1"===this.selTransType?"Target Confirmation Blocks: ":"2"===this.selTransType?"Fee (Sats/vByte): ":"Default")+("1"===this.selTransType||"2"===this.selTransType?this.transTypeValue:"")+" | Spend Unconfirmed Output: "+(this.spendUnconfirmed?"Yes":"No"):"Advanced Options"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(A.yh),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-open-channel"]],viewQuery:function(t,a){if(1&t&&e.Gf(mi,7),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first)}},decls:55,vars:25,consts:[["fxLayout","row","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amnt",3,"ngModel","step","min","max","ngModelChange"],["amt","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch","expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","49"],["tabindex","3",3,"value","valueChange"],[3,"value",4,"ngFor","ngForOf"],["matInput","","type","number","tabindex","4","name","transTpValue",3,"ngModel","required","disabled","placeholder","step","min","ngModelChange"],["transTypeVal","ngModel"],["fxFlex","50","fxLayoutAlign","start center"],["tabindex","6","color","primary","name","spendUnconfirmed",3,"ngModel","ngModelChange"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["fxFlex","100"],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayout","row"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return a.onClose()}),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7,8),e.NdJ("submit",function(){return a.onOpenChannel()})("reset",function(){return a.resetData()}),e.TgZ(11,"div",9),e.YNc(12,gi,8,8,"mat-form-field",10),e.qZA(),e.YNc(13,fi,1,0,"ng-container",11),e.TgZ(14,"div",9)(15,"div",12)(16,"mat-form-field",13)(17,"input",14,15),e.NdJ("ngModelChange",function(s){return a.fundingAmount=s}),e.qZA(),e.TgZ(19,"mat-hint"),e._uU(20),e.ALo(21,"number"),e.qZA(),e.TgZ(22,"span",16),e._uU(23," Sats "),e.qZA(),e.YNc(24,Ci,2,0,"mat-error",17),e.YNc(25,xi,2,1,"mat-error",17),e.qZA(),e.TgZ(26,"div",18)(27,"mat-slide-toggle",19),e.NdJ("ngModelChange",function(s){return a.isPrivate=s}),e._uU(28,"Private Channel"),e.qZA()()(),e.TgZ(29,"mat-expansion-panel",20),e.NdJ("closed",function(){return a.onAdvancedPanelToggle(!0)})("opened",function(){return a.onAdvancedPanelToggle(!1)}),e.TgZ(30,"mat-expansion-panel-header")(31,"mat-panel-title")(32,"span"),e._uU(33),e.qZA()()(),e.TgZ(34,"div",21)(35,"div",12)(36,"mat-form-field",22)(37,"mat-select",23),e.NdJ("valueChange",function(s){return a.selTransType=s}),e.YNc(38,yi,2,2,"mat-option",24),e.qZA()(),e.TgZ(39,"mat-form-field",22)(40,"input",25,26),e.NdJ("ngModelChange",function(s){return a.transTypeValue=s}),e.qZA(),e.YNc(42,Ti,2,1,"mat-error",17),e.qZA()(),e.TgZ(43,"div",12)(44,"div",27)(45,"mat-slide-toggle",28),e.NdJ("ngModelChange",function(s){return a.spendUnconfirmed=s}),e._uU(46,"Spend Unconfirmed Output"),e.qZA()()()()()(),e.YNc(47,vi,3,2,"div",29),e.TgZ(48,"div",30)(49,"button",31),e._uU(50,"Clear Fields"),e.qZA(),e.TgZ(51,"button",32),e._uU(52,"Open Channel"),e.qZA()()()()()(),e.YNc(53,wi,1,1,"ng-template",null,33,e.W1O)),2&t){const o=e.MAs(54);e.xp6(5),e.Oqu(a.alertTitle),e.xp6(7),e.Q6J("ngIf",!a.peer&&a.peers&&a.peers.length>0),e.xp6(1),e.Q6J("ngTemplateOutlet",o),e.xp6(4),e.Q6J("ngModel",a.fundingAmount)("step",1e3)("min",1)("max",a.totalBalance),e.xp6(3),e.hij("(Remaining Bal: ",e.lcZ(21,23,a.totalBalance-(a.fundingAmount?a.fundingAmount:0)),")"),e.xp6(4),e.Q6J("ngIf",null==a.amount.errors?null:a.amount.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.amount.errors?null:a.amount.errors.max),e.xp6(2),e.Q6J("ngModel",a.isPrivate),e.xp6(6),e.Oqu(a.advancedTitle),e.xp6(4),e.Q6J("value",a.selTransType),e.xp6(1),e.Q6J("ngForOf",a.transTypes),e.xp6(2),e.Q6J("ngModel",a.transTypeValue)("required","0"!==a.selTransType)("disabled","0"===a.selTransType)("placeholder","0"===a.selTransType?"Default":"1"===a.selTransType?"Target Confirmation Blocks":"Fee (Sats/vByte)")("step",1)("min",0),e.xp6(2),e.Q6J("ngIf","0"!==a.selTransType&&!a.transTypeValue),e.xp6(3),e.Q6J("ngModel",a.spendUnconfirmed),e.xp6(2),e.Q6J("ngIf",""!==a.channelConnectionError)}},directives:[d.xw,d.Wh,d.yH,b.dk,k.lW,b.dn,c._Y,c.JL,c.F,p.O5,f.KE,I.Nt,c.Fj,ne.ZL,c.Q7,c.JJ,c.oH,ne.XC,p.sg,Y.ey,f.TO,p.tP,c.wV,c.qQ,c.Fd,$.q,Ye.F,c.On,f.bx,f.R9,ue.Rr,H.ib,H.yz,H.yK,R.gD,M.BN,W.h,z.d],pipes:[p.Ov,p.JJ],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),n})();var B=h(5615);const Ai=["peersForm"],Si=["stepper"];function Li(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw();e.Oqu(t.peerFormLabel)}}function ki(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Address is required."),e.qZA())}function Fi(n,i){if(1&n&&(e.TgZ(0,"div",37),e._UZ(1,"fa-icon",38),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.peerConnectionError)}}function Ni(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw();e.Oqu(t.channelFormLabel)}}function qi(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function Ui(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount must be a positive number."),e.qZA())}function Oi(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Amount must be less than or equal to ",t.totalBalance,".")}}function Ri(n,i){if(1&n&&(e.TgZ(0,"mat-option",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function Ii(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("","0"===t.channelFormGroup.controls.selTransType.value?"Default":"1"===t.channelFormGroup.controls.selTransType.value?"Target Confirmation Blocks":"Fee (Sats/vByte)"," is required.")}}function Mi(n,i){if(1&n&&(e.TgZ(0,"div",37),e._UZ(1,"fa-icon",38),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.channelConnectionError)}}let Di=(()=>{class n{constructor(t,a,o,s,u,g,U){this.dialogRef=t,this.data=a,this.store=o,this.lndEffects=s,this.formBuilder=u,this.actions=g,this.logger=U,this.faExclamationTriangle=y.eHv,this.peerAddress="",this.totalBalance=0,this.transTypes=l.Dr,this.flgChannelOpened=!1,this.channelOpenStatus=null,this.newlyAddedPeer=null,this.flgEditable=!0,this.peerConnectionError="",this.channelConnectionError="",this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)",this.unSubs=[new m.x,new m.x]}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[c.kI.required]],peerAddress:["",[c.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[c.kI.required,c.kI.min(1),c.kI.max(this.totalBalance)]],isPrivate:[!1],selTransType:[l.Dr[0].id],transTypeValue:[{value:"",disabled:!0}],spendUnconfirmed:[!1],hiddenAmount:["",[c.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.channelFormGroup.controls.selTransType.valueChanges.pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{t===l.Dr[0].id?(this.channelFormGroup.controls.transTypeValue.setValue(""),this.channelFormGroup.controls.transTypeValue.disable(),this.channelFormGroup.controls.transTypeValue.setValidators(null),this.channelFormGroup.controls.transTypeValue.setErrors(null)):(this.channelFormGroup.controls.transTypeValue.setValue(""),this.channelFormGroup.controls.transTypeValue.enable(),this.channelFormGroup.controls.transTypeValue.setValidators([c.kI.required]))}),this.actions.pipe((0,_.R)(this.unSubs[1]),(0,E.h)(t=>t.type===l.uR.NEWLY_ADDED_PEER_LND||t.type===l.uR.FETCH_PENDING_CHANNELS_LND||t.type===l.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(t=>{t.type===l.uR.NEWLY_ADDED_PEER_LND&&(this.logger.info(t.payload),this.flgEditable=!1,this.newlyAddedPeer=t.payload.peer,this.peerFormGroup.controls.hiddenAddress.setValue(this.peerFormGroup.controls.peerAddress.value),this.stepper.next()),t.type===l.uR.FETCH_PENDING_CHANNELS_LND&&this.dialogRef.close(),t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&t.payload.status===l.Bn.ERROR&&("SaveNewPeer"===t.payload.action||"FetchGraphNode"===t.payload.action?this.peerConnectionError=t.payload.message:"SaveNewChannel"===t.payload.action&&(this.channelConnectionError=t.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="";const t=this.peerFormGroup.controls.peerAddress.value.search("@");let a="",o="";t>-1?(a=this.peerFormGroup.controls.peerAddress.value.substring(0,t),o=this.peerFormGroup.controls.peerAddress.value.substring(t+1),this.connectPeerWithParams(a,o)):(this.store.dispatch((0,v.dV)({payload:{pubkey:this.peerFormGroup.controls.peerAddress.value}})),this.lndEffects.setGraphNode.pipe((0,V.q)(1)).subscribe(s=>{setTimeout(()=>{o=s.node.addresses&&s.node.addresses.length&&s.node.addresses.length>0&&s.node.addresses[0].addr?s.node.addresses[0].addr:"",this.connectPeerWithParams(this.peerFormGroup.controls.peerAddress.value,o)},0)}))}connectPeerWithParams(t,a){this.store.dispatch((0,v.El)({payload:{pubkey:t,host:a,perm:!1}}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0||"1"===this.channelFormGroup.controls.selTransType.value&&!this.channelFormGroup.controls.transTypeValue.value||"2"===this.channelFormGroup.controls.selTransType.value&&!this.channelFormGroup.controls.transTypeValue.value)return!0;this.channelConnectionError="",this.store.dispatch((0,v.YX)({payload:{selectedPeerPubkey:this.newlyAddedPeer.pub_key,fundingAmount:this.channelFormGroup.controls.fundingAmount.value,private:this.channelFormGroup.controls.isPrivate.value,transType:this.channelFormGroup.controls.selTransType.value,transTypeValue:this.channelFormGroup.controls.transTypeValue.value,spendUnconfirmed:this.channelFormGroup.controls.spendUnconfirmed.value}}))}onClose(){this.dialogRef.close(!1)}stepSelectionChanged(t){switch(t.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:"Peer Details",this.channelFormLabel="Open Channel (Optional)";break;case 2:this.peerFormLabel=this.peerFormGroup.controls.peerAddress.value?"Peer Added: "+this.newlyAddedPeer.alias:"Peer Details",this.channelFormLabel=this.channelFormGroup.controls.fundingAmount.value?"Opening Channel for "+this.channelFormGroup.controls.fundingAmount.value+" Sats":"Open Channel (Optional)"}t.selectedIndex{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(A.yh),e.Y36(ee.l),e.Y36(c.qu),e.Y36(G.eX),e.Y36(N.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-connect-peer"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Ai,5),e.Gf(Si,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first),e.iGM(o=e.CRH())&&(a.stepper=o.first)}},decls:56,vars:24,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","button",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mb-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["fxFlex","30","fxLayoutAlign","start end"],["tabindex","3","formControlName","selTransType","placeholder","Transaction Type"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","30"],["matInput","","formControlName","transTypeValue","type","number","name","transTypeValue","tabindex","4",3,"placeholder","step","required"],["tabindex","6","color","primary","formControlName","spendUnconfirmed","name","spendUnconfirmed"],["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,"mat-dialog-close"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Connect to a new peer"),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return a.onClose()}),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"div",7)(10,"mat-vertical-stepper",8,9),e.NdJ("selectionChange",function(s){return a.stepSelectionChanged(s)}),e.TgZ(12,"mat-step",10)(13,"form",11),e.YNc(14,Li,1,1,"ng-template",12),e.TgZ(15,"mat-form-field",1),e._UZ(16,"input",13),e.YNc(17,ki,2,0,"mat-error",14),e.qZA(),e.YNc(18,Fi,4,2,"div",15),e.TgZ(19,"div",16)(20,"button",17),e.NdJ("click",function(){return a.onConnectPeer()}),e._uU(21),e.qZA()()()(),e.TgZ(22,"mat-step",10)(23,"form",18),e.YNc(24,Ni,1,1,"ng-template",19),e.TgZ(25,"div",20)(26,"div",21)(27,"mat-form-field",22),e._UZ(28,"input",23),e.TgZ(29,"mat-hint"),e._uU(30),e.qZA(),e.TgZ(31,"span",24),e._uU(32," Sats "),e.qZA(),e.YNc(33,qi,2,0,"mat-error",14),e.YNc(34,Ui,2,0,"mat-error",14),e.YNc(35,Oi,2,1,"mat-error",14),e.qZA(),e.TgZ(36,"div",25)(37,"mat-slide-toggle",26),e._uU(38,"Private Channel"),e.qZA()()(),e.TgZ(39,"div",27)(40,"mat-form-field",28)(41,"mat-select",29),e.YNc(42,Ri,2,2,"mat-option",30),e.qZA()(),e.TgZ(43,"mat-form-field",31),e._UZ(44,"input",32),e.YNc(45,Ii,2,1,"mat-error",14),e.qZA(),e.TgZ(46,"div",25)(47,"mat-slide-toggle",33),e._uU(48,"Spend Unconfirmed Output"),e.qZA()()()(),e.YNc(49,Mi,4,2,"div",15),e.TgZ(50,"div",16)(51,"button",34),e.NdJ("click",function(){return a.onOpenChannel()}),e._uU(52),e.qZA()()()()(),e.TgZ(53,"div",35)(54,"button",36),e._uU(55),e.qZA()()()()()()),2&t&&(e.xp6(10),e.Q6J("linear",!0),e.xp6(2),e.Q6J("stepControl",a.peerFormGroup)("editable",a.flgEditable),e.xp6(1),e.Q6J("formGroup",a.peerFormGroup),e.xp6(4),e.Q6J("ngIf",null==a.peerFormGroup.controls.peerAddress.errors?null:a.peerFormGroup.controls.peerAddress.errors.required),e.xp6(1),e.Q6J("ngIf",""!==a.peerConnectionError),e.xp6(3),e.Oqu(""!==a.peerConnectionError?"Retry":"Add Peer"),e.xp6(1),e.Q6J("stepControl",a.channelFormGroup)("editable",a.flgEditable),e.xp6(1),e.Q6J("formGroup",a.channelFormGroup),e.xp6(5),e.Q6J("step",1e3),e.xp6(2),e.hij("Remaining Bal: ",a.totalBalance-(a.channelFormGroup.controls.fundingAmount.value?a.channelFormGroup.controls.fundingAmount.value:0),""),e.xp6(3),e.Q6J("ngIf",null==a.channelFormGroup.controls.fundingAmount.errors?null:a.channelFormGroup.controls.fundingAmount.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.channelFormGroup.controls.fundingAmount.errors?null:a.channelFormGroup.controls.fundingAmount.errors.min),e.xp6(1),e.Q6J("ngIf",null==a.channelFormGroup.controls.fundingAmount.errors?null:a.channelFormGroup.controls.fundingAmount.errors.max),e.xp6(7),e.Q6J("ngForOf",a.transTypes),e.xp6(2),e.Q6J("placeholder","0"===a.channelFormGroup.controls.selTransType.value?"Default":"1"===a.channelFormGroup.controls.selTransType.value?"Target Confirmation Blocks":"Fee (Sats/vByte)")("step",1)("required","0"!==a.channelFormGroup.controls.selTransType.value),e.xp6(1),e.Q6J("ngIf",null==a.channelFormGroup.controls.transTypeValue.errors?null:a.channelFormGroup.controls.transTypeValue.errors.required),e.xp6(4),e.Q6J("ngIf",""!==a.channelConnectionError),e.xp6(3),e.Oqu(""!==a.channelConnectionError?"Retry":"Open Channel"),e.xp6(2),e.Q6J("mat-dialog-close",!1),e.xp6(1),e.Oqu(null!=a.newlyAddedPeer&&a.newlyAddedPeer.pub_key?"Do It Later":"Close"))},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,b.dn,B.Vq,B.C0,c._Y,c.JL,c.sg,B.VY,f.KE,I.Nt,c.Fj,W.h,c.JJ,c.u,c.Q7,p.O5,f.TO,M.BN,c.wV,f.bx,f.R9,ue.Rr,R.gD,p.sg,Y.ey,J.ZT],styles:[""]}),n})();function Pi(n,i){1&n&&e._UZ(0,"mat-progress-bar",32)}function Ji(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Alias "),e.qZA())}const Be=function(n){return{"max-width":n}};function Ei(n,i){if(1&n&&(e.TgZ(0,"td",34),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,Be,a.screenSize===a.screenSizeEnum.XS?"12rem":"25rem")),e.xp6(1),e.hij(" ",null==t?null:t.alias," ")}}function Qi(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Public Key "),e.qZA())}function Yi(n,i){if(1&n&&(e.TgZ(0,"td",34),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,Be,a.screenSize===a.screenSizeEnum.XS?"5rem":"35rem")),e.xp6(1),e.hij(" ",null==t?null:t.pub_key," ")}}function Hi(n,i){1&n&&(e.TgZ(0,"th",35),e._uU(1," Sats Sent "),e.qZA())}function Bi(n,i){if(1&n&&(e.TgZ(0,"td",36)(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.sat_sent)," ")}}function Vi(n,i){1&n&&(e.TgZ(0,"th",35),e._uU(1," Sats Received "),e.qZA())}function Gi(n,i){if(1&n&&(e.TgZ(0,"td",36)(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.sat_recv)," ")}}function zi(n,i){1&n&&(e.TgZ(0,"th",35),e._uU(1," Ping "),e.qZA())}function Wi(n,i){if(1&n&&(e.TgZ(0,"td",36)(1,"span",37),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.ping_time)," ")}}function Xi(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",38)(1,"div",39)(2,"mat-select",40),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",41),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function $i(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",42)(1,"div",39)(2,"mat-select",40),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",41),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onPeerClick(u,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",41),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onOpenChannel(s)}),e._uU(7,"Open Channel"),e.qZA(),e.TgZ(8,"mat-option",41),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onPeerDetach(s)}),e._uU(9,"Disconnect"),e.qZA()()()()}}function ji(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No connected peer."),e.qZA())}function Ki(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting peers..."),e.qZA())}function eo(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function to(n,i){if(1&n&&(e.TgZ(0,"td",43),e.YNc(1,ji,2,0,"p",44),e.YNc(2,Ki,2,0,"p",44),e.YNc(3,eo,2,1,"p",44),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.peers&&t.peers.data)||(null==t.peers.data?null:t.peers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const no=function(n){return{"display-none":n}};function ao(n,i){if(1&n&&e._UZ(0,"tr",45),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,no,(null==t.peers?null:t.peers.data)&&(null==t.peers||null==t.peers.data?null:t.peers.data.length)>0))}}function io(n,i){1&n&&e._UZ(0,"tr",46)}function oo(n,i){1&n&&e._UZ(0,"tr",47)}const so=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},lo=function(){return["no_peer"]};let ro=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.store=a,this.rtlEffects=o,this.commonService=s,this.availableBalance=0,this.faUsers=y.FVb,this.displayedColumns=[],this.peersData=[],this.information={},this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","sat_sent","sat_recv","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","sat_sent","sat_recv","ping_time","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","pub_key","sat_sent","sat_recv","ping_time","actions"])}ngOnInit(){this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.information=t}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.availableBalance=t.blockchainBalance.total_balance||0}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.peersData=t.peers,this.peersData.length>0&&this.loadPeersTable(this.peersData),this.logger.info(t)})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:t.pub_key,message:[[{key:"pub_key",value:t.pub_key,title:"Public Key",width:100}],[{key:"address",value:t.address,title:"Address",width:100}],[{key:"alias",value:t.alias,title:"Alias",width:40},{key:"inbound",value:t.inbound?"True":"False",title:"Inbound",width:30},{key:"ping_time",value:t.ping_time,title:"Ping Time",width:30,type:l.Gi.NUMBER}],[{key:"sat_sent",value:t.sat_sent,title:"Satoshis Sent",width:50,type:l.Gi.NUMBER},{key:"sat_recv",value:t.sat_recv,title:"Satoshis Received",width:50,type:l.Gi.NUMBER}],[{key:"bytes_sent",value:t.bytes_sent,title:"Bytes Sent",width:50,type:l.Gi.NUMBER},{key:"bytes_recv",value:t.bytes_recv,title:"Bytes Received",width:50,type:l.Gi.NUMBER}]]}}}))}onConnectPeer(){this.store.dispatch((0,w.qR)({payload:{data:{message:{peer:null,information:this.information,balance:this.availableBalance},component:Di}}}))}onOpenChannel(t){this.store.dispatch((0,w.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:t,information:this.information,balance:this.availableBalance},component:He}}}))}onPeerDetach(t){this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(t.alias?t.alias:t.pub_key),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,_.R)(this.unSubs[3])).subscribe(o=>{o&&this.store.dispatch((0,v.z)({payload:{pubkey:t.pub_key}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(t){this.peers=new r.by(t?[...t]:[]),this.peers.sort=this.sort,this.peers.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.peers.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.peers.paginator=this.paginator,this.applyFilter()}onDownloadCSV(){this.peers.data&&this.peers.data.length>0&&this.commonService.downloadFile(this.peers.data,"Peers")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(oe.V),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-peers"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Peers")}])],decls:40,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","pub_key"],["matColumnDef","sat_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","sat_recv"],["matColumnDef","ping_time"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"button",2),e.NdJ("click",function(){return a.onConnectPeer()}),e._uU(3,"Add Peer"),e.qZA()(),e.TgZ(4,"div",3)(5,"div",4)(6,"div",5),e._UZ(7,"fa-icon",6),e.TgZ(8,"span",7),e._uU(9,"Connected Peers"),e.qZA()(),e.TgZ(10,"mat-form-field",8)(11,"input",9),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(12,"div",10),e.YNc(13,Pi,1,0,"mat-progress-bar",11),e.TgZ(14,"table",12,13),e.ynx(16,14),e.YNc(17,Ji,2,0,"th",15),e.YNc(18,Ei,2,4,"td",16),e.BQk(),e.ynx(19,17),e.YNc(20,Qi,2,0,"th",15),e.YNc(21,Yi,2,4,"td",16),e.BQk(),e.ynx(22,18),e.YNc(23,Hi,2,0,"th",19),e.YNc(24,Bi,4,3,"td",20),e.BQk(),e.ynx(25,21),e.YNc(26,Vi,2,0,"th",19),e.YNc(27,Gi,4,3,"td",20),e.BQk(),e.ynx(28,22),e.YNc(29,zi,2,0,"th",19),e.YNc(30,Wi,4,3,"td",20),e.BQk(),e.ynx(31,23),e.YNc(32,Xi,6,0,"th",24),e.YNc(33,$i,10,0,"td",25),e.BQk(),e.ynx(34,26),e.YNc(35,to,4,3,"td",27),e.BQk(),e.YNc(36,ao,1,3,"tr",28),e.YNc(37,io,1,0,"tr",29),e.YNc(38,oo,1,0,"tr",30),e.qZA()(),e._UZ(39,"mat-paginator",31),e.qZA()()),2&t&&(e.xp6(7),e.Q6J("icon",a.faUsers),e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.peers)("ngClass",e.VKq(12,so,""!==a.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(14,lo)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.yH,d.Wh,k.lW,M.BN,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-pub_key[_ngcontent-%COMP%]{flex:1 1 35%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:2rem}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem;flex:1 1 10%}.mat-column-sat_sent[_ngcontent-%COMP%], .mat-column-sat_recv[_ngcontent-%COMP%], .mat-column-ping_time[_ngcontent-%COMP%]{flex:1 1 13%;width:13%}"]}),n})();function co(n,i){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Open"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numOpenChannels)}}function uo(n,i){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Pending"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numPendingChannels)}}function po(n,i){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Closed"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numClosedChannels)}}function mo(n,i){if(1&n&&(e.TgZ(0,"span",7),e._uU(1,"Active HTLCs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numActiveHTLCs)}}let _o=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.router=o,this.numOpenChannels=0,this.numPendingChannels=0,this.numClosedChannels=0,this.numActiveHTLCs=0,this.peers=[],this.information={},this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending"},{link:"closed",name:"Closed"},{link:"activehtlcs",name:"Active HTLCs"}],this.activeLink=0,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.activeLink=this.links.findIndex(t=>t.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t instanceof T.Av)).subscribe({next:t=>{this.activeLink=this.links.findIndex(a=>a.link===t.urlAfterRedirects.substring(t.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.numOpenChannels=t.channels&&t.channels.length?t.channels.length:0,this.numActiveHTLCs=t.channels.reduce((a,o)=>a+(o.pending_htlcs&&o.pending_htlcs.length>0?o.pending_htlcs.length:0),0),this.logger.info(t)}),this.store.select(C.ni).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.numPendingChannels=t.pendingChannelsSummary.total_channels?t.pendingChannelsSummary.total_channels:0}),this.store.select(C.P2).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.numClosedChannels=t.closedChannels&&t.closedChannels.length?t.closedChannels.length:0}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[5])).subscribe(t=>{this.totalBalance=+t.blockchainBalance.total_balance}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[6])).subscribe(t=>{this.peers=t.peers,this.peers.forEach(a=>{(!a.alias||""===a.alias)&&(a.alias=a.pub_key.substring(0,15)+"...")}),this.logger.info(t)})}onOpenChannel(){this.store.dispatch((0,w.qR)({payload:{data:{alertTitle:"Open Channel",message:{peers:this.peers,information:this.information,balance:this.totalBalance},component:He}}}))}onSelectedTabChange(t){this.router.navigateByUrl("/lnd/connections/channels/"+this.links[t.index].link)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channels-tables"]],decls:16,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x"],["fxLayout","row"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column","fxFlex","100",1,"my-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"button",2),e.NdJ("click",function(){return a.onOpenChannel()}),e._uU(3,"Open Channel"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-tab-group",4),e.NdJ("selectedIndexChange",function(s){return a.activeLink=s})("selectedTabChange",function(s){return a.onSelectedTabChange(s)}),e.TgZ(6,"mat-tab"),e.YNc(7,co,2,1,"ng-template",5),e.qZA(),e.TgZ(8,"mat-tab"),e.YNc(9,uo,2,1,"ng-template",5),e.qZA(),e.TgZ(10,"mat-tab"),e.YNc(11,po,2,1,"ng-template",5),e.qZA(),e.TgZ(12,"mat-tab"),e.YNc(13,mo,2,1,"ng-template",5),e.qZA()(),e.TgZ(14,"div",6),e._UZ(15,"router-outlet"),e.qZA()()()),2&t&&(e.xp6(5),e.Q6J("selectedIndex",a.activeLink))},directives:[d.xw,d.yH,d.Wh,k.lW,D.SP,D.uX,D.uD,fe.k,T.lC],styles:[""]}),n})();var te=h(7261),se=h(6895);function ho(n,i){if(1&n&&(e.TgZ(0,"div")(1,"div",9)(2,"div",14)(3,"h4",11),e._uU(4,"Commit Fee"),e.qZA(),e.TgZ(5,"span",15),e._uU(6),e.ALo(7,"number"),e.qZA()(),e.TgZ(8,"div",14)(9,"h4",11),e._uU(10,"Commit Weight"),e.qZA(),e.TgZ(11,"span",15),e._uU(12),e.ALo(13,"number"),e.qZA()(),e.TgZ(14,"div",14)(15,"h4",11),e._uU(16,"Fee/KW"),e.qZA(),e.TgZ(17,"span",15),e._uU(18),e.ALo(19,"number"),e.qZA()(),e.TgZ(20,"div",14)(21,"h4",11),e._uU(22,"Static Remote Key"),e.qZA(),e.TgZ(23,"span",15),e._uU(24),e.qZA()()(),e._UZ(25,"mat-divider",13),e.TgZ(26,"div",9)(27,"div",14)(28,"h4",11),e._uU(29),e.qZA(),e.TgZ(30,"span",15),e._uU(31),e.ALo(32,"number"),e.qZA()(),e.TgZ(33,"div",14)(34,"h4",11),e._uU(35),e.qZA(),e.TgZ(36,"span",15),e._uU(37),e.ALo(38,"number"),e.qZA()(),e.TgZ(39,"div",14)(40,"h4",11),e._uU(41,"Unsettled Balance"),e.qZA(),e.TgZ(42,"span",15),e._uU(43),e.ALo(44,"number"),e.qZA()(),e.TgZ(45,"div",14)(46,"h4",11),e._uU(47,"CSV Delay"),e.qZA(),e.TgZ(48,"span",15),e._uU(49),e.ALo(50,"number"),e.qZA()()(),e._UZ(51,"mat-divider",13),e.TgZ(52,"div",9)(53,"div",14)(54,"h4",11),e._uU(55,"Local Reserve (Sats)"),e.qZA(),e.TgZ(56,"span",15),e._uU(57),e.ALo(58,"number"),e.qZA()(),e.TgZ(59,"div",14)(60,"h4",11),e._uU(61,"Remote Reserve (Sats)"),e.qZA(),e.TgZ(62,"span",15),e._uU(63),e.ALo(64,"number"),e.qZA()(),e.TgZ(65,"div",14)(66,"h4",11),e._uU(67,"Lifetime (Seconds)"),e.qZA(),e.TgZ(68,"span",15),e._uU(69),e.ALo(70,"number"),e.qZA()(),e.TgZ(71,"div",14)(72,"h4",11),e._uU(73,"Pending HTLCs"),e.qZA(),e.TgZ(74,"span",15),e._uU(75),e.ALo(76,"number"),e.qZA()()(),e._UZ(77,"mat-divider",13),e.qZA()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(e.lcZ(7,17,t.channel.commit_fee)),e.xp6(6),e.Oqu(e.lcZ(13,19,t.channel.commit_weight)),e.xp6(6),e.Oqu(e.lcZ(19,21,t.channel.fee_per_kw)),e.xp6(6),e.Oqu(t.channel.static_remote_key?"Yes":"No"),e.xp6(1),e.Q6J("inset",!0),e.xp6(4),e.Oqu(t.screenSize===t.screenSizeEnum.XS?"Total Sats Sent":"Total Satoshis Sent"),e.xp6(2),e.Oqu(e.lcZ(32,23,t.channel.total_satoshis_sent)),e.xp6(4),e.Oqu(t.screenSize===t.screenSizeEnum.XS?"Total Sats Recv":"Total Satoshis Received"),e.xp6(2),e.Oqu(e.lcZ(38,25,t.channel.total_satoshis_received)),e.xp6(6),e.Oqu(e.lcZ(44,27,t.channel.unsettled_balance)),e.xp6(6),e.Oqu(e.lcZ(50,29,t.channel.csv_delay)),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(58,31,t.channel.local_chan_reserve_sat)),e.xp6(6),e.Oqu(e.lcZ(64,33,t.channel.remote_chan_reserve_sat)),e.xp6(6),e.Oqu(e.lcZ(70,35,t.channel.lifetime)),e.xp6(6),e.Oqu(e.lcZ(76,37,null==t.channel||null==t.channel.pending_htlcs?null:t.channel.pending_htlcs.length)),e.xp6(2),e.Q6J("inset",!0)}}function go(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Show Advanced"),e.qZA())}function fo(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Hide Advanced"),e.qZA())}function Co(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",23),e.NdJ("copied",function(o){return e.CHM(t),e.oxw().onCopyChanID(o)}),e._uU(1,"Copy Channel ID"),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("payload",t.channel.chan_id)}}function xo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",24),e.NdJ("click",function(){return e.CHM(t),e.oxw().onClose()}),e._uU(1,"OK"),e.qZA()}}const yo=function(n){return{"xs-scroll-y":n}};let xe=(()=>{class n{constructor(t,a,o,s,u){this.dialogRef=t,this.data=a,this.logger=o,this.commonService=s,this.snackBar=u,this.faReceipt=y.dLy,this.showAdvanced=!1,this.showCopy=!0,this.showCopyField=null,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.channel=this.data.channel,this.showCopy=this.data.showCopy,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(t){this.snackBar.open("Channel ID "+t+" copied."),this.logger.info("Copied Text: "+t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(N.mQ),e.Y36(O.v),e.Y36(te.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-information"]],decls:94,vars:36,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxFlex","25"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",1,"mt-1"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","button",3,"click"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span",5),e._uU(6,"Channel Information"),e.qZA()(),e.TgZ(7,"button",6),e.NdJ("click",function(){return a.onClose()}),e._uU(8,"X"),e.qZA()(),e.TgZ(9,"mat-card-content",7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h4",11),e._uU(14,"Channel ID"),e.qZA(),e.TgZ(15,"span",12),e._uU(16),e.qZA()(),e.TgZ(17,"div",10)(18,"h4",11),e._uU(19,"Peer Alias"),e.qZA(),e.TgZ(20,"span",12),e._uU(21),e.qZA()()(),e._UZ(22,"mat-divider",13),e.TgZ(23,"div",9)(24,"div",1)(25,"h4",11),e._uU(26,"Channel Point"),e.qZA(),e.TgZ(27,"span",12),e._uU(28),e.qZA()()(),e._UZ(29,"mat-divider",13),e.TgZ(30,"div",9)(31,"div",1)(32,"h4",11),e._uU(33,"Peer Public Key"),e.qZA(),e.TgZ(34,"span",12),e._uU(35),e.qZA()()(),e._UZ(36,"mat-divider",13),e.TgZ(37,"div",9)(38,"div",14)(39,"h4",11),e._uU(40,"Local Balance"),e.qZA(),e.TgZ(41,"span",15),e._uU(42),e.ALo(43,"number"),e.qZA()(),e.TgZ(44,"div",14)(45,"h4",11),e._uU(46,"Remote Balance"),e.qZA(),e.TgZ(47,"span",15),e._uU(48),e.ALo(49,"number"),e.qZA()(),e.TgZ(50,"div",14)(51,"h4",11),e._uU(52,"Capacity"),e.qZA(),e.TgZ(53,"span",15),e._uU(54),e.ALo(55,"number"),e.qZA()(),e.TgZ(56,"div",14)(57,"h4",11),e._uU(58,"Uptime (Seconds)"),e.qZA(),e.TgZ(59,"span",15),e._uU(60),e.ALo(61,"number"),e.qZA()()(),e._UZ(62,"mat-divider",13),e.TgZ(63,"div",9)(64,"div",14)(65,"h4",11),e._uU(66,"Active"),e.qZA(),e.TgZ(67,"span",15),e._uU(68),e.qZA()(),e.TgZ(69,"div",14)(70,"h4",11),e._uU(71,"Private"),e.qZA(),e.TgZ(72,"span",15),e._uU(73),e.qZA()(),e.TgZ(74,"div",14)(75,"h4",11),e._uU(76,"Initiator"),e.qZA(),e.TgZ(77,"span",15),e._uU(78),e.qZA()(),e.TgZ(79,"div",14)(80,"h4",11),e._uU(81,"Number of Updates"),e.qZA(),e.TgZ(82,"span",15),e._uU(83),e.ALo(84,"number"),e.qZA()()(),e._UZ(85,"mat-divider",13),e.YNc(86,ho,78,39,"div",16),e.TgZ(87,"div",17)(88,"button",18),e.NdJ("click",function(){return a.onShowAdvanced()}),e.YNc(89,go,2,0,"p",19),e.YNc(90,fo,2,0,"ng-template",null,20,e.W1O),e.qZA(),e.YNc(92,Co,2,1,"button",21),e.YNc(93,xo,2,0,"button",22),e.qZA()()()()()),2&t){const o=e.MAs(91);e.xp6(4),e.Q6J("icon",a.faReceipt),e.xp6(5),e.Q6J("ngClass",e.VKq(34,yo,a.screenSize===a.screenSizeEnum.XS)),e.xp6(7),e.Oqu(a.channel.chan_id),e.xp6(5),e.Oqu(a.channel.remote_alias),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(a.channel.channel_point),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(a.channel.remote_pubkey),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(43,24,a.channel.local_balance)),e.xp6(6),e.Oqu(e.lcZ(49,26,a.channel.remote_balance)),e.xp6(6),e.Oqu(e.lcZ(55,28,a.channel.capacity)),e.xp6(6),e.Oqu(e.lcZ(61,30,a.channel.uptime)),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(a.channel.active?"Yes":"No"),e.xp6(5),e.Oqu(a.channel.private?"Yes":"No"),e.xp6(5),e.Oqu(a.channel.initiator?"Yes":"No"),e.xp6(5),e.Oqu(e.lcZ(84,32,a.channel.num_updates)),e.xp6(2),e.Q6J("inset",!0),e.xp6(1),e.Q6J("ngIf",a.showAdvanced),e.xp6(3),e.Q6J("ngIf",!a.showAdvanced)("ngIfElse",o),e.xp6(3),e.Q6J("ngIf",a.showCopy),e.xp6(1),e.Q6J("ngIf",!a.showCopy)}},directives:[d.xw,d.Wh,d.yH,b.dk,M.BN,k.lW,b.dn,p.mk,S.oO,z.d,p.O5,W.h,se.y],pipes:[p.JJ],styles:[""]}),n})();var ye=h(9646),Te=h(7772),To=h(113);function bo(n,i){1&n&&e.GkF(0)}const le=function(n,i){return{"small-svg":n,"large-svg":i}};function vo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",7),e._UZ(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),e.qZA(),e.kcU(),e.TgZ(41,"div",47)(42,"mat-card-title"),e._uU(43,"Circular rebalancing explained."),e.qZA()(),e.TgZ(44,"div",48)(45,"mat-card-subtitle",49),e._uU(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. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}function Zo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",50),e._UZ(2,"path",51)(3,"path",52)(4,"path",53)(5,"path",54)(6,"path",55)(7,"path",56)(8,"path",57)(9,"path",58)(10,"path",59)(11,"path",60)(12,"path",61)(13,"path",62)(14,"path",63)(15,"path",64)(16,"path",65)(17,"path",66)(18,"path",67)(19,"path",68)(20,"path",69)(21,"path",70)(22,"path",71)(23,"path",72)(24,"path",73)(25,"path",74)(26,"path",75)(27,"path",76)(28,"path",77)(29,"path",78)(30,"path",79)(31,"path",80)(32,"path",81)(33,"path",51)(34,"path",52)(35,"path",53)(36,"path",54)(37,"path",55)(38,"path",56)(39,"path",57)(40,"path",58)(41,"path",59)(42,"path",82)(43,"path",83)(44,"path",62)(45,"path",84)(46,"path",85)(47,"path",86)(48,"path",66)(49,"path",67)(50,"path",68)(51,"path",69)(52,"path",70)(53,"path",71)(54,"path",72)(55,"path",73)(56,"path",74)(57,"path",75)(58,"path",76)(59,"path",77)(60,"path",78)(61,"path",79)(62,"path",87)(63,"path",81)(64,"path",88),e.TgZ(65,"defs")(66,"linearGradient",89),e._UZ(67,"stop",90)(68,"stop",91)(69,"stop",92),e.qZA(),e.TgZ(70,"linearGradient",93),e._UZ(71,"stop",90)(72,"stop",91)(73,"stop",92),e.qZA(),e.TgZ(74,"linearGradient",94),e._UZ(75,"stop",90)(76,"stop",91)(77,"stop",92),e.qZA(),e.TgZ(78,"linearGradient",95),e._UZ(79,"stop",90)(80,"stop",91)(81,"stop",92),e.qZA(),e.TgZ(82,"linearGradient",96),e._UZ(83,"stop",90)(84,"stop",91)(85,"stop",92),e.qZA(),e.TgZ(86,"linearGradient",97),e._UZ(87,"stop",90)(88,"stop",91)(89,"stop",92),e.qZA()()(),e.kcU(),e.TgZ(90,"div",47)(91,"mat-card-title"),e._uU(92,"Step 1: Unbalanced channel"),e.qZA()(),e.TgZ(93,"div",48)(94,"mat-card-subtitle",49),e._uU(95," It starts with an unbalanced channel, that needs to be rebalanced in order to continue to route payments. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}function wo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",98),e._UZ(2,"path",99)(3,"path",100)(4,"path",101)(5,"path",102)(6,"path",103)(7,"path",104)(8,"path",105)(9,"path",106)(10,"path",107)(11,"path",108)(12,"path",109)(13,"path",110)(14,"path",111)(15,"path",112)(16,"path",113)(17,"path",51)(18,"path",114)(19,"path",115)(20,"path",116)(21,"path",117)(22,"path",118)(23,"path",119)(24,"path",120)(25,"path",121)(26,"path",82)(27,"path",83)(28,"path",122)(29,"path",123)(30,"path",124)(31,"path",125)(32,"path",66)(33,"path",126)(34,"path",127)(35,"path",128)(36,"path",129)(37,"path",130)(38,"path",131)(39,"path",73)(40,"path",74)(41,"path",132)(42,"path",76)(43,"path",77)(44,"path",78)(45,"path",79)(46,"path",133)(47,"path",134)(48,"path",135),e.TgZ(49,"defs")(50,"linearGradient",136),e._UZ(51,"stop",90)(52,"stop",91)(53,"stop",92),e.qZA(),e.TgZ(54,"linearGradient",137),e._UZ(55,"stop",90)(56,"stop",91)(57,"stop",92),e.qZA(),e.TgZ(58,"linearGradient",138),e._UZ(59,"stop",90)(60,"stop",91)(61,"stop",92),e.qZA()()(),e.kcU(),e.TgZ(62,"div",47)(63,"mat-card-title"),e._uU(64,"Step 2: Invoice/Payment"),e.qZA()(),e.TgZ(65,"div",48)(66,"mat-card-subtitle",49),e._uU(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. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}function Ao(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",139),e._UZ(2,"path",140)(3,"path",141)(4,"path",142)(5,"path",143)(6,"path",144)(7,"path",145)(8,"path",146)(9,"path",147)(10,"path",148)(11,"path",149)(12,"path",150)(13,"path",151)(14,"path",152)(15,"path",153)(16,"path",154)(17,"path",155)(18,"path",156)(19,"path",157)(20,"path",158)(21,"path",159)(22,"path",160)(23,"path",161)(24,"path",162)(25,"path",163)(26,"path",162)(27,"path",164)(28,"path",165)(29,"path",166)(30,"path",167)(31,"path",168)(32,"path",169)(33,"path",170)(34,"path",171)(35,"path",172)(36,"path",173)(37,"path",174)(38,"path",175)(39,"path",176)(40,"path",177)(41,"path",178),e.TgZ(42,"defs")(43,"linearGradient",179),e._UZ(44,"stop",90)(45,"stop",91)(46,"stop",92),e.qZA()()(),e.kcU(),e.TgZ(47,"div",47)(48,"mat-card-title"),e._uU(49,"Step 3: Rebalance amount"),e.qZA()(),e.TgZ(50,"div",48)(51,"mat-card-subtitle",49),e._uU(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. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}function So(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e.NdJ("swipe",function(o){return e.CHM(t),e.oxw().onSwipe(o)}),e.O4$(),e.TgZ(1,"svg",139),e._UZ(2,"path",180)(3,"path",142)(4,"path",181)(5,"path",144)(6,"path",145)(7,"path",182)(8,"path",147)(9,"path",183)(10,"path",184)(11,"path",185)(12,"path",186)(13,"path",187)(14,"path",188)(15,"path",189)(16,"path",190)(17,"path",191)(18,"path",157)(19,"path",192)(20,"path",193)(21,"path",178)(22,"path",159)(23,"path",160)(24,"path",194)(25,"path",162)(26,"path",163)(27,"path",162)(28,"path",164)(29,"path",165)(30,"path",166)(31,"path",167)(32,"path",195)(33,"path",169)(34,"path",196)(35,"path",171)(36,"path",172)(37,"path",173)(38,"path",174)(39,"path",175)(40,"path",197),e.TgZ(41,"defs")(42,"linearGradient",198),e._UZ(43,"stop",90)(44,"stop",91)(45,"stop",92),e.qZA()()(),e.kcU(),e.TgZ(46,"div",47)(47,"mat-card-title"),e._uU(48,"Rebalance successful!"),e.qZA()(),e.TgZ(49,"div",48)(50,"mat-card-subtitle",49),e._uU(51," Your channel is successfully rebalanced and is able to continue to route payments. "),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@sliderAnimation",t.animationDirection),e.xp6(1),e.Q6J("ngClass",e.WLB(2,le,t.screenSize===t.screenSizeEnum.XS,t.screenSize!==t.screenSizeEnum.XS))}}let Lo=(()=>{class n{constructor(t){this.commonService=t,this.animationDirection="forward",this.stepNumber=1,this.stepNumberChange=new e.vpe,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}onSwipe(t){2===t.direction&&this.stepNumber<5?(this.stepNumber++,this.animationDirection="forward",this.stepNumberChange.emit(this.stepNumber)):4===t.direction&&this.stepNumber>1&&(this.stepNumber--,this.animationDirection="backward",this.stepNumberChange.emit(this.stepNumber))}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-rebalance-infographics"]],inputs:{animationDirection:"animationDirection",stepNumber:"stepNumber"},outputs:{stepNumberChange:"stepNumberChange"},decls:11,vars:1,consts:[[4,"ngTemplateOutlet"],["infoStepBlock1",""],["infoStepBlock2",""],["infoStepBlock3",""],["infoStepBlock4",""],["infoStepBlock5",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","fill","#444053"],["d","M127.4 137.844L128.262 144L129 137.6L127.4 137.844Z","fill","#D0D2D5"],["d","M100.2 134.349V138.226L101 141.6H101.571L102.258 137.976L102.6 133.6L100.2 134.349Z","fill","#3F3D56"],["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","fill","#D0D2D5"],["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","fill","#D0D2D5"],["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","#444053"],["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","fill","#444053"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","fill","#6C63FF"],["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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","#C4B7FF","stroke-width","0.8","stroke-dasharray","4 4"],["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","fill","#5E4EA5","stroke","white","stroke-width","1.6"],["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","fill","#5E4EA5","stroke","white","stroke-width","1.6"],["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","fill","#5E4EA5","stroke","white","stroke-width","1.6"],["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","fill","#5E4EA5","stroke","white","stroke-width","1.6"],["fxFlex","20","fxLayoutAlign","center end"],["fxFlex","40"],[1,"font-size-120"],["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","fill","#E6E6E6"],["d","M88.6575 67.1775H1.48926V98.4248H88.6575V67.1775Z","fill","white"],["d","M59.844 74.5891H8.64404V90.6009H59.844V74.5891Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M88.6575 34.7129H1.48926V65.9602H88.6575V34.7129Z","fill","white"],["d","M59.844 42.1244H8.64404V58.1363H59.844V42.1244Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M88.6575 2.24823H1.48926V33.4955H88.6575V2.24823Z","fill","white"],["d","M59.844 9.66199H8.64404V25.6739H59.844V9.66199Z","fill","#C4B7FF"],["d","M32.644 74.5891H8.64404V90.6009H32.644V74.5891Z","fill","#5E4EA5"],["d","M45.444 42.1244H8.64404V58.1363H45.444V42.1244Z","fill","#5E4EA5"],["d","M59.644 9.66199H8.64404V25.662H59.644V9.66199Z","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#4A4A4A"],["d","M192.266 42.8538H69.9434V111.856H192.266V42.8538Z","fill","#CBCBCB"],["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","fill","#F2F2F2"],["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","fill","#3F3D56"],["d","M170.967 80.0673H159.541V82.4548H170.967V80.0673Z","fill","#4A4A4A"],["d","M184.781 61.4783H145.727V62.5015H184.781V61.4783Z","fill","#4A4A4A"],["d","M184.781 64.7186H145.727V65.7418H184.781V64.7186Z","fill","#4A4A4A"],["d","M184.781 67.9589H145.727V68.9821H184.781V67.9589Z","fill","#4A4A4A"],["d","M184.781 71.1991H145.727V72.2224H184.781V71.1991Z","fill","#4A4A4A"],["d","M184.781 74.4394H145.727V75.4626H184.781V74.4394Z","fill","#4A4A4A"],["d","M184.781 44.2537H180.006V49.0288H184.781V44.2537Z","fill","#F2F2F2"],["d","M186.998 51.2458H181.2V45.4474H186.998V51.2458ZM181.452 50.9937H186.746V45.6996H181.452V50.9937Z","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#5B5B5B"],["d","M42 75H9V91H42V75Z","fill","#5E4EA5"],["d","M42 42H9V58H42V42Z","fill","#5E4EA5"],["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","fill","#4A4A4A"],["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","fill","#F1F1F1"],["d","M115.068 85.6077H349.8V86.5722H113L115.068 85.6077Z","fill","#4A4A4A"],["d","M236.776 84.376H226.024V91.544H236.776V84.376Z","fill","#D0CDE1"],["d","M218.856 87.96H233.192V79H218.856V87.96ZM232.569 87.5704H219.479V79.3896H232.569V87.5704Z","fill","#4A4A4A"],["d","M265 57.3624H357.392V120.307H265V57.3624Z","fill","#CBCBCB"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#F2F2F2"],["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","fill","#4A4A4A"],["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","fill","#5B5B5B"],["d","M88.6576 67.1775H1.48938V98.4248H88.6576V67.1775Z","fill","white"],["d","M59.8442 74.589H8.64417V90.6009H59.8442V74.589Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M88.6576 34.7129H1.48938V65.9602H88.6576V34.7129Z","fill","white"],["d","M59.8442 42.1244H8.64417V58.1363H59.8442V42.1244Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M88.6576 2.24824H1.48938V33.4955H88.6576V2.24824Z","fill","white"],["d","M59.8442 9.66196H8.64417V25.6738H59.8442V9.66196Z","fill","#C4B7FF"],["d","M59.8442 9.66196H8.64417V25.6738H59.8442V9.66196Z","fill","#5E4EA5"],["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","fill","#4A4A4A"],["d","M192.265 42.8538H69.9432V111.856H192.265V42.8538Z","fill","#CBCBCB"],["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","fill","#F2F2F2"],["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","fill","#3F3D56"],["d","M170.967 80.0672H159.541V82.4548H170.967V80.0672Z","fill","#4A4A4A"],["d","M184.781 67.9588H145.727V68.9821H184.781V67.9588Z","fill","#4A4A4A"],["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","fill","#4A4A4A"],["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","fill","#5B5B5B"],["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","#C4B7FF","stroke-width","2","stroke-linecap","round","stroke-dasharray","7 7"],["d","M76.25 191C114.91 191 146.25 158.541 146.25 118.5C146.25 78.4594 114.91 46 76.25 46","stroke","#5E4EA5","stroke-width","2","stroke-linecap","round","stroke-dasharray","7 7"],["d","M122.399 37H32.25V137.616H122.399V37Z","fill","#E6E6E6"],["d","M120.908 104.178H33.7394V135.425H120.908V104.178Z","fill","white"],["d","M92.0943 111.589H40.8943V127.601H92.0943V111.589Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M120.908 71.7129H33.7394V102.96H120.908V71.7129Z","fill","white"],["d","M92.0943 79.1244H40.8943V95.1363H92.0943V79.1244Z","fill","#C4B7FF"],["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","fill","#6C63FF"],["d","M120.908 39.2482H33.7394V70.4955H120.908V39.2482Z","fill","white"],["d","M92.0943 46.662H40.8943V62.6738H92.0943V46.662Z","fill","#C4B7FF"],["d","M74.5 112H40.5V128H74.5V112Z","fill","#5E4EA5"],["d","M74.5 79H40.5V95H74.5V79Z","fill","#5E4EA5"],["d","M91.8943 46.662H40.8943V62.662H91.8943V46.662Z","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#C4B7FF"],["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","fill","#C4B7FF"],["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","fill","#F2F2F2"],["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","fill","#5B5B5B"],["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","fill","#F2F2F2"],["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","fill","#CBCBCB"],["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","fill","#595959"],["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","fill","#F2F2F2"],["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","fill","#CBCBCB"],["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","fill","#595959"],["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","fill","#595959"],["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","fill","#CBCBCB"],["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","fill","#CBCBCB"],["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","fill","#CBCBCB"],["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","fill","#595959"],["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","fill","#5E4EA5"],["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","#5E4EA5","stroke-width","2","stroke-linecap","round","stroke-dasharray","7 7"],["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","fill","#6C63FF"],["d","M120.908 39.2482H33.7393V70.4955H120.908V39.2482Z","fill","white"],["d","M92.0943 46.662H40.8943V62.6739H92.0943V46.662Z","fill","#C4B7FF"],["d","M76 112H41V128H76V112Z","fill","#5E4EA5"],["d","M70 79H41V95H70V79Z","fill","#5E4EA5"],["d","M70 47H41V63H70V47Z","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#5E4EA5"],["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","fill","#CBCBCB"],["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","fill","#595959"],["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(t,a){if(1&t&&(e.YNc(0,bo,1,0,"ng-container",0),e.YNc(1,vo,47,5,"ng-template",null,1,e.W1O),e.YNc(3,Zo,96,5,"ng-template",null,2,e.W1O),e.YNc(5,wo,68,5,"ng-template",null,3,e.W1O),e.YNc(7,Ao,53,5,"ng-template",null,4,e.W1O),e.YNc(9,So,52,5,"ng-template",null,5,e.W1O)),2&t){const o=e.MAs(2),s=e.MAs(4),u=e.MAs(6),g=e.MAs(8),U=e.MAs(10);e.Q6J("ngTemplateOutlet",1===a.stepNumber?o:2===a.stepNumber?s:3===a.stepNumber?u:4===a.stepNumber?g:U)}},directives:[p.tP,d.xw,d.yH,d.Wh,p.mk,S.oO,b.n5,b.$j],styles:["svg.small-svg[_ngcontent-%COMP%]{height:50%;min-height:50%;max-width:100%}svg.large-svg[_ngcontent-%COMP%]{height:60%;min-height:60%;max-width:100%}"],data:{animation:[To.l]}}),n})();const ko=["stepper"];function Fo(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.inputFormLabel)}}function No(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function qo(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount must be a positive number."),e.qZA())}function Uo(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("Amount must be less than or equal to ",null==t.selChannel?null:t.selChannel.local_balance,".")}}function Oo(n,i){if(1&n&&(e.TgZ(0,"mat-option",55),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.AsE("",t.remote_alias," - ",t.chan_id,"")}}function Ro(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Receive from Peer is required."),e.qZA())}function Io(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Receive from Peer not found in the list."),e.qZA())}function Mo(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.feeFormLabel)}}function Do(n,i){if(1&n&&(e.TgZ(0,"mat-option",55),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.name," ")}}function Po(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("",t.feeFormGroup.controls.selFeeLimitType.value?t.feeFormGroup.controls.selFeeLimitType.value.placeholder:t.feeLimitTypes[0].placeholder," is required.")}}function Jo(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.hij("",t.feeFormGroup.controls.selFeeLimitType.value?t.feeFormGroup.controls.selFeeLimitType.value.placeholder:t.feeLimitTypes[0].placeholder," must be a positive number.")}}function Eo(n,i){1&n&&e._uU(0,"Invoice/Payment")}function Qo(n,i){1&n&&(e.TgZ(0,"mat-icon",56),e._uU(1,"check"),e.qZA())}function Yo(n,i){1&n&&e._UZ(0,"mat-progress-bar",57)}function Ho(n,i){if(1&n&&(e.TgZ(0,"mat-icon",56),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(null!=t.paymentStatus&&t.paymentStatus.error?"close":"check")}}function Bo(n,i){1&n&&e._UZ(0,"div",14)}function Vo(n,i){1&n&&e._UZ(0,"mat-progress-bar",57)}function Go(n,i){if(1&n&&(e.TgZ(0,"h4",58),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.paymentStatus&&t.paymentStatus.payment_hash?"Rebalance Successful.":"Rebalance Failed.")}}function zo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",59),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onRestart()}),e._uU(1,"Start Again"),e.qZA()}}function Wo(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",5)(1,"div",6)(2,"mat-card-header",7)(3,"div",8)(4,"span",9),e._uU(5),e.qZA()(),e.TgZ(6,"div",10)(7,"button",11),e.NdJ("click",function(){return e.CHM(t),e.oxw().showInfo()}),e._uU(8,"?"),e.qZA(),e.TgZ(9,"button",12),e.NdJ("click",function(){return e.CHM(t),e.oxw().onClose()}),e._uU(10,"X"),e.qZA()()(),e.TgZ(11,"mat-card-content",13)(12,"div",14)(13,"div",15)(14,"div",16),e._UZ(15,"fa-icon",17),e.TgZ(16,"span"),e._uU(17,"Circular Rebalance is a payment you make to *yourselves* 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."),e.qZA()()(),e.TgZ(18,"div",18)(19,"p",19)(20,"strong"),e._uU(21,"Channel Peer:\xa0"),e.qZA(),e._uU(22),e.ALo(23,"titlecase"),e.qZA(),e.TgZ(24,"p",19)(25,"strong"),e._uU(26,"Channel ID:\xa0"),e.qZA(),e._uU(27),e.qZA()(),e.TgZ(28,"mat-vertical-stepper",20,21),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().stepSelectionChanged(o)}),e.TgZ(30,"mat-step",22)(31,"form",23),e.YNc(32,Fo,1,1,"ng-template",24),e.TgZ(33,"div",25)(34,"mat-form-field",26),e._UZ(35,"input",27),e.TgZ(36,"mat-hint"),e._uU(37),e.qZA(),e.TgZ(38,"span",28),e._uU(39,"Sats"),e.qZA(),e.YNc(40,No,2,0,"mat-error",29),e.YNc(41,qo,2,0,"mat-error",29),e.YNc(42,Uo,2,1,"mat-error",29),e.qZA(),e.TgZ(43,"mat-form-field",30)(44,"input",31),e.NdJ("change",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.qZA(),e.TgZ(45,"mat-autocomplete",32,33),e.NdJ("optionSelected",function(){return e.CHM(t),e.oxw().onSelectedPeerChanged()}),e.YNc(47,Oo,2,3,"mat-option",34),e.ALo(48,"async"),e.qZA(),e.YNc(49,Ro,2,0,"mat-error",29),e.YNc(50,Io,2,0,"mat-error",29),e.qZA()(),e.TgZ(51,"div",35)(52,"button",36),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSelectFee()}),e._uU(53,"Select Fee"),e.qZA()()()(),e.TgZ(54,"mat-step",22)(55,"form",23),e.YNc(56,Mo,1,1,"ng-template",37),e.TgZ(57,"div",25)(58,"div",25)(59,"mat-form-field",30)(60,"mat-select",38),e.YNc(61,Do,2,2,"mat-option",34),e.qZA()(),e.TgZ(62,"mat-form-field",26),e._UZ(63,"input",39),e.YNc(64,Po,2,1,"mat-error",29),e.YNc(65,Jo,2,1,"mat-error",29),e.qZA()()(),e.TgZ(66,"div",35)(67,"button",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().onRebalance()}),e._uU(68,"Rebalance"),e.qZA()()()(),e.TgZ(69,"mat-step",41)(70,"form",23),e.YNc(71,Eo,1,0,"ng-template",24),e.TgZ(72,"div",42)(73,"mat-expansion-panel",43)(74,"mat-expansion-panel-header")(75,"mat-panel-title")(76,"span",44),e._uU(77),e.YNc(78,Qo,2,0,"mat-icon",45),e.qZA()()(),e.TgZ(79,"div",14)(80,"span",46),e._uU(81),e.qZA()()(),e.YNc(82,Yo,1,0,"mat-progress-bar",47),e.TgZ(83,"mat-expansion-panel",48)(84,"mat-expansion-panel-header")(85,"mat-panel-title")(86,"span",44),e._uU(87),e.YNc(88,Ho,2,1,"mat-icon",45),e.qZA()()(),e.YNc(89,Bo,1,0,"div",49),e.qZA(),e.YNc(90,Vo,1,0,"mat-progress-bar",47),e.qZA(),e.YNc(91,Go,2,1,"h4",50),e.TgZ(92,"div",51),e.YNc(93,zo,2,0,"button",52),e.qZA()()()(),e.TgZ(94,"div",53)(95,"button",54),e._uU(96,"Close"),e.qZA()()()()()()}if(2&n){const t=e.MAs(46),a=e.oxw(),o=e.MAs(2);e.Q6J("@opacityAnimation",void 0),e.xp6(3),e.Q6J("fxFlex",a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM?"83":"91"),e.xp6(2),e.Oqu(a.channel?"Channel "+a.loopDirectionCaption:a.loopDirectionCaption),e.xp6(1),e.Q6J("fxFlex",a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM?"17":"9"),e.xp6(9),e.Q6J("icon",a.faInfoCircle),e.xp6(7),e.Oqu(e.lcZ(23,45,a.selChannel.remote_alias)),e.xp6(5),e.Oqu(a.selChannel.chan_id),e.xp6(1),e.Q6J("linear",!0),e.xp6(2),e.Q6J("stepControl",a.inputFormGroup)("editable",a.flgEditable),e.xp6(1),e.Q6J("formGroup",a.inputFormGroup),e.xp6(4),e.Q6J("step",100),e.xp6(2),e.AsE("(Local Bal: ",null==a.selChannel?null:a.selChannel.local_balance,", Remaining: ",(null==a.selChannel?null:a.selChannel.local_balance)-(a.inputFormGroup.controls.rebalanceAmount.value?a.inputFormGroup.controls.rebalanceAmount.value:0),")"),e.xp6(3),e.Q6J("ngIf",null==a.inputFormGroup.controls.rebalanceAmount.errors?null:a.inputFormGroup.controls.rebalanceAmount.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.inputFormGroup.controls.rebalanceAmount.errors?null:a.inputFormGroup.controls.rebalanceAmount.errors.min),e.xp6(1),e.Q6J("ngIf",null==a.inputFormGroup.controls.rebalanceAmount.errors?null:a.inputFormGroup.controls.rebalanceAmount.errors.max),e.xp6(2),e.Q6J("matAutocomplete",t),e.xp6(1),e.Q6J("displayWith",a.displayFn),e.xp6(2),e.Q6J("ngForOf",e.lcZ(48,47,a.filteredActiveChannels)),e.xp6(2),e.Q6J("ngIf",null==a.inputFormGroup.controls.selRebalancePeer.errors?null:a.inputFormGroup.controls.selRebalancePeer.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.inputFormGroup.controls.selRebalancePeer.errors?null:a.inputFormGroup.controls.selRebalancePeer.errors.notfound),e.xp6(4),e.Q6J("stepControl",a.feeFormGroup)("editable",a.flgEditable),e.xp6(1),e.Q6J("formGroup",a.feeFormGroup),e.xp6(6),e.Q6J("ngForOf",a.feeLimitTypes),e.xp6(2),e.s9C("placeholder",a.feeFormGroup.controls.selFeeLimitType.value?a.feeFormGroup.controls.selFeeLimitType.value.placeholder:a.feeLimitTypes[0].placeholder),e.Q6J("step",1),e.xp6(1),e.Q6J("ngIf",null==a.feeFormGroup.controls.feeLimit.errors?null:a.feeFormGroup.controls.feeLimit.errors.required),e.xp6(1),e.Q6J("ngIf",null==a.feeFormGroup.controls.feeLimit.errors?null:a.feeFormGroup.controls.feeLimit.errors.min),e.xp6(4),e.Q6J("stepControl",a.statusFormGroup),e.xp6(1),e.Q6J("formGroup",a.statusFormGroup),e.xp6(7),e.Oqu(a.flgInvoiceGenerated?a.flgReusingInvoice?"Invoice re-used":"Invoice generated":"Generating invoice..."),e.xp6(1),e.Q6J("ngIf",a.flgInvoiceGenerated),e.xp6(3),e.Oqu(a.paymentRequest),e.xp6(1),e.Q6J("ngIf",!a.flgInvoiceGenerated),e.xp6(1),e.Q6J("expanded",(a.flgInvoiceGenerated||a.flgReusingInvoice)&&a.flgPaymentSent),e.xp6(4),e.Oqu(a.flgInvoiceGenerated||a.flgPaymentSent?a.flgPaymentSent?null!=a.paymentStatus&&a.paymentStatus.error?"Payment failed":"Payment successful":"Processing payment...":"Payment waiting for Invoice"),e.xp6(1),e.Q6J("ngIf",a.flgPaymentSent),e.xp6(1),e.Q6J("ngIf",!a.paymentStatus)("ngIfElse",o),e.xp6(1),e.Q6J("ngIf",a.flgInvoiceGenerated&&!a.flgPaymentSent),e.xp6(1),e.Q6J("ngIf",a.flgInvoiceGenerated&&a.flgPaymentSent),e.xp6(2),e.Q6J("ngIf",a.paymentStatus&&a.paymentStatus.error),e.xp6(2),e.Q6J("mat-dialog-close",!1)}}function Xo(n,i){1&n&&e.GkF(0)}function $o(n,i){if(1&n&&e.YNc(0,Xo,1,0,"ng-container",60),2&n){const t=e.oxw(),a=e.MAs(4),o=e.MAs(6);e.Q6J("ngTemplateOutlet",t.paymentStatus.error?a:o)}}function jo(n,i){if(1&n&&(e.TgZ(0,"div",14)(1,"span",46),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.hij("Error: ",t.paymentStatus.error,"")}}function Ko(n,i){if(1&n&&(e.TgZ(0,"div",14)(1,"div",61)(2,"div",6)(3,"h4",62),e._uU(4,"Payment Hash"),e.qZA(),e.TgZ(5,"span",46),e._uU(6),e.qZA()()(),e._UZ(7,"mat-divider",63),e.TgZ(8,"div",61)(9,"div",64)(10,"h4",62),e._uU(11),e.qZA(),e.TgZ(12,"span",46),e._uU(13),e.qZA()(),e.TgZ(14,"div",64)(15,"h4",62),e._uU(16,"Number of Hops"),e.qZA(),e.TgZ(17,"span",46),e._uU(18),e.qZA()()()()),2&n){const t=e.oxw();e.xp6(6),e.Oqu(t.paymentStatus.payment_hash),e.xp6(5),e.hij("Total Fees (",t.paymentStatus.payment_route.total_fees_msat?"mSats":"Sats",")"),e.xp6(2),e.Oqu(t.paymentStatus.payment_route.total_fees_msat?t.paymentStatus.payment_route.total_fees_msat:t.paymentStatus.payment_route.total_fees?t.paymentStatus.payment_route.total_fees:0),e.xp6(5),e.Oqu(t.paymentStatus&&t.paymentStatus.payment_route&&t.paymentStatus.payment_route.hops&&t.paymentStatus.payment_route.hops.length?t.paymentStatus.payment_route.hops.length:0)}}const es=function(n,i){return{"dot-primary":n,"dot-primary-lighter":i}};function ts(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"span",81),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(2).onStepChanged(s)}),e._UZ(1,"p",82),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.Q6J("ngClass",e.WLB(1,es,a.stepNumber===t,a.stepNumber!==t))}}function ns(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",83),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onStepChanged(4)}),e._uU(1,"Back"),e.qZA()}}function as(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",84),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.flgShowInfo=!1,o.stepNumber=1}),e._uU(1,"Close"),e.qZA()}}function is(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",85),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.flgShowInfo=!1,o.stepNumber=1}),e._uU(1,"Close"),e.qZA()}}function os(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",86),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.onStepChanged(o.stepNumber-1)}),e._uU(1,"Back"),e.qZA()}}function ss(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",87),e.NdJ("click",function(){e.CHM(t);const o=e.oxw(2);return o.onStepChanged(o.stepNumber+1)}),e._uU(1,"Next"),e.qZA()}}const ls=function(){return[1,2,3,4,5]};function rs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",65)(1,"div",66)(2,"mat-card-header",67)(3,"div",68),e._UZ(4,"span",9),e.qZA(),e.TgZ(5,"div",69)(6,"button",70),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.flgShowInfo=!1,o.stepNumber=1}),e._uU(7,"X"),e.qZA()()(),e.TgZ(8,"mat-card-content",71)(9,"rtl-channel-rebalance-infographics",72),e.NdJ("stepNumberChange",function(o){return e.CHM(t),e.oxw().stepNumber=o}),e.qZA()(),e.TgZ(10,"div",73),e.YNc(11,ts,2,4,"span",74),e.qZA(),e.TgZ(12,"div",75),e.YNc(13,ns,2,0,"button",76),e.YNc(14,as,2,0,"button",77),e.YNc(15,is,2,0,"button",78),e.YNc(16,os,2,0,"button",79),e.YNc(17,ss,2,0,"button",80),e.qZA()()()}if(2&n){const t=e.oxw();e.Q6J("@opacityAnimation",void 0),e.xp6(9),e.Q6J("stepNumber",t.stepNumber)("animationDirection",t.animationDirection),e.xp6(2),e.Q6J("ngForOf",e.DdM(9,ls)),e.xp6(2),e.Q6J("ngIf",5===t.stepNumber),e.xp6(1),e.Q6J("ngIf",5===t.stepNumber),e.xp6(1),e.Q6J("ngIf",t.stepNumber<5),e.xp6(1),e.Q6J("ngIf",t.stepNumber>1&&t.stepNumber<5),e.xp6(1),e.Q6J("ngIf",t.stepNumber<5)}}let cs=(()=>{class n{constructor(t,a,o,s,u,g,U,x){this.dialogRef=t,this.data=a,this.logger=o,this.store=s,this.actions=u,this.formBuilder=g,this.decimalPipe=U,this.commonService=x,this.faInfoCircle=y.sqG,this.invoices={},this.selChannel={},this.activeChannels=[],this.feeLimitTypes=[],this.queryRoute={},this.paymentRequest="",this.paymentStatus=null,this.flgReusingInvoice=!1,this.flgInvoiceGenerated=!1,this.flgPaymentSent=!1,this.inputFormLabel="Amount to rebalance",this.feeFormLabel="Select rebalance fee",this.flgEditable=!0,this.flgShowInfo=!1,this.stepNumber=1,this.screenSize="",this.screenSizeEnum=l.cu,this.animationDirection="forward",this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize();let t="",a="";this.selChannel=this.data.message.selChannel,this.activeChannels=this.data.message.channels.filter(o=>o.active&&o.chan_id!==this.selChannel.chan_id&&o.remote_balance>0),this.activeChannels=this.activeChannels.sort((o,s)=>(t=o.remote_alias?o.remote_alias.toLowerCase():o.chan_id?o.chan_id.toLowerCase():"",a=s.remote_alias?s.remote_alias.toLowerCase():o.chan_id.toLowerCase(),ta?1:0)),l.Vc.forEach((o,s)=>{s>0&&this.feeLimitTypes.push(o)}),this.inputFormGroup=this.formBuilder.group({hiddenAmount:["",[c.kI.required]],rebalanceAmount:["",[c.kI.required,c.kI.min(1),c.kI.max(this.selChannel.local_balance)]],selRebalancePeer:[null,c.kI.required]}),this.feeFormGroup=this.formBuilder.group({selFeeLimitType:[this.feeLimitTypes[0],c.kI.required],feeLimit:["",[c.kI.required,c.kI.min(0)]],hiddenFeeLimit:["",[c.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.store.select(C.Ef).pipe((0,_.R)(this.unSubs[0])).subscribe(o=>{this.invoices=o.listInvoices,this.logger.info(o)}),this.actions.pipe((0,_.R)(this.unSubs[1]),(0,E.h)(o=>o.type===l.uR.SET_QUERY_ROUTES_LND||o.type===l.uR.SEND_PAYMENT_STATUS_LND||o.type===l.uR.NEWLY_SAVED_INVOICE_LND)).subscribe(o=>{o.type===l.uR.SET_QUERY_ROUTES_LND&&(this.queryRoute=o.payload),o.type===l.uR.SEND_PAYMENT_STATUS_LND&&(this.logger.info(o.payload),this.flgPaymentSent=!0,this.paymentStatus=o.payload,this.flgEditable=!0),o.type===l.uR.NEWLY_SAVED_INVOICE_LND&&(this.logger.info(o.payload),this.flgInvoiceGenerated=!0,this.sendPayment(o.payload.paymentRequest))}),this.inputFormGroup.get("rebalanceAmount").valueChanges.pipe((0,_.R)(this.unSubs[2]),(0,Ce.O)(0)).subscribe(o=>{this.inputFormGroup.controls.selRebalancePeer.setValue(""),this.inputFormGroup.controls.selRebalancePeer.setErrors(null),this.filteredActiveChannels=(0,ye.of)(o?this.filterActiveChannels():this.activeChannels.slice())}),this.inputFormGroup.get("selRebalancePeer").valueChanges.pipe((0,_.R)(this.unSubs[3]),(0,Ce.O)("")).subscribe(o=>{"string"==typeof o&&(this.filteredActiveChannels=(0,ye.of)(this.filterActiveChannels()))})}onSelectFee(){return this.inputFormGroup.controls.selRebalancePeer.value&&"string"==typeof this.inputFormGroup.controls.selRebalancePeer.value&&this.onSelectedPeerChanged(),this.inputFormGroup.controls.selRebalancePeer.value&&"string"!=typeof this.inputFormGroup.controls.selRebalancePeer.value?!this.inputFormGroup.controls.rebalanceAmount.value||(0===this.stepper.selectedIndex&&(this.inputFormGroup.controls.hiddenAmount.setValue(this.inputFormGroup.controls.rebalanceAmount.value),this.stepper.next()),this.queryRoute=null,this.feeFormGroup.reset(),void this.feeFormGroup.controls.selFeeLimitType.setValue(this.feeLimitTypes[0])):(this.inputFormGroup.controls.selRebalancePeer.setErrors({required:!0}),!0)}stepSelectionChanged(t){switch(t.selectedIndex){case 0:default:this.inputFormLabel="Amount to rebalance",this.feeFormLabel="Select rebalance fee";break;case 1:this.inputFormLabel=this.inputFormGroup.controls.rebalanceAmount.value||this.inputFormGroup.controls.selRebalancePeer.value.remote_alias?"Rebalancing Amount: "+this.decimalPipe.transform(this.inputFormGroup.controls.rebalanceAmount.value?this.inputFormGroup.controls.rebalanceAmount.value:0)+" Sats | Peer: "+(this.inputFormGroup.controls.selRebalancePeer.value.remote_alias?this.inputFormGroup.controls.selRebalancePeer.value.remote_alias:this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey.substring(0,15)+"..."):"Amount to rebalance",this.feeFormLabel="Select rebalance fee";break;case 2:this.inputFormLabel=this.inputFormGroup.controls.rebalanceAmount.value||this.inputFormGroup.controls.selRebalancePeer.value.remote_alias?"Rebalancing Amount: "+this.decimalPipe.transform(this.inputFormGroup.controls.rebalanceAmount.value?this.inputFormGroup.controls.rebalanceAmount.value:0)+" Sats | Peer: "+(this.inputFormGroup.controls.selRebalancePeer.value.remote_alias?this.inputFormGroup.controls.selRebalancePeer.value.remote_alias:this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey.substring(0,15)+"..."):"Amount to rebalance",this.feeFormLabel=this.queryRoute&&this.queryRoute.routes&&this.queryRoute.routes.length>0&&(this.queryRoute.routes[0].total_fees_msat||this.queryRoute.routes[0].hops&&this.queryRoute.routes[0].hops.length)?this.feeFormGroup.controls.selFeeLimitType.value.placeholder+": "+this.decimalPipe.transform(this.feeFormGroup.controls.feeLimit.value?this.feeFormGroup.controls.feeLimit.value:0)+" | Hops: "+this.queryRoute.routes[0].hops.length:"Select rebalance fee"}t.selectedIndex+this.selChannel.local_balance||!this.feeFormGroup.controls.feeLimit.value||this.feeFormGroup.controls.feeLimit.value<0||!this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey)return!0;this.feeFormGroup.controls.hiddenFeeLimit.setValue(this.feeFormGroup.controls.feeLimit.value),this.stepper.next(),this.flgEditable=!1,this.paymentRequest="",this.paymentStatus=null,this.flgReusingInvoice=!1,this.flgInvoiceGenerated=!1,this.flgPaymentSent=!1;const t=this.findUnsettledInvoice();t?(this.flgReusingInvoice=!0,this.sendPayment(t.payment_request)):this.store.dispatch((0,v.Rd)({payload:{uiMessage:l.m6.NO_SPINNER,memo:"Local-Rebalance-"+this.inputFormGroup.controls.rebalanceAmount.value+"-Sats",invoiceValue:this.inputFormGroup.controls.rebalanceAmount.value,private:!1,expiry:3600,pageSize:l.IV,openModal:!1}}))}findUnsettledInvoice(){return this.invoices.invoices.find(t=>(0==+t.settle_date||!t.settle_date)&&t.memo==="Local-Rebalance-"+this.inputFormGroup.controls.rebalanceAmount.value+"-Sats"&&"CANCELED"!==t.state)}sendPayment(t){this.flgInvoiceGenerated=!0,this.paymentRequest=t,this.store.dispatch((0,v.oV)("percent"===this.feeFormGroup.controls.selFeeLimitType.value.id&&+this.feeFormGroup.controls.feeLimit.value%1!=0?{payload:{uiMessage:l.m6.NO_SPINNER,paymentReq:t,outgoingChannel:this.selChannel,feeLimitType:"fixed",feeLimit:Math.ceil(+this.feeFormGroup.controls.feeLimit.value*+this.inputFormGroup.controls.rebalanceAmount.value/100),allowSelfPayment:!0,lastHopPubkey:this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey,fromDialog:!0}}:{payload:{uiMessage:l.m6.NO_SPINNER,paymentReq:t,outgoingChannel:this.selChannel,feeLimitType:this.feeFormGroup.controls.selFeeLimitType.value.id,feeLimit:this.feeFormGroup.controls.feeLimit.value,allowSelfPayment:!0,lastHopPubkey:this.inputFormGroup.controls.selRebalancePeer.value.remote_pubkey,fromDialog:!0}}))}filterActiveChannels(){return this.activeChannels.filter(t=>t.remote_balance>=this.inputFormGroup.controls.rebalanceAmount.value&&t.chan_id!==this.selChannel.chan_id&&(0===t.remote_alias.toLowerCase().indexOf(this.inputFormGroup.controls.selRebalancePeer.value?this.inputFormGroup.controls.selRebalancePeer.value.toLowerCase():"")||0===t.chan_id.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 t=this.activeChannels.filter(a=>a.remote_alias.length===this.inputFormGroup.controls.selRebalancePeer.value.length&&0===a.remote_alias.toLowerCase().indexOf(this.inputFormGroup.controls.selRebalancePeer.value?this.inputFormGroup.controls.selRebalancePeer.value.toLowerCase():""));t&&t.length>0?(this.inputFormGroup.controls.selRebalancePeer.setValue(t[0]),this.inputFormGroup.controls.selRebalancePeer.setErrors(null)):this.inputFormGroup.controls.selRebalancePeer.setErrors({notfound:!0})}}displayFn(t){return t&&t.remote_alias?t.remote_alias:t&&t.chan_id?t.chan_id:""}showInfo(){this.flgShowInfo=!0}onStepChanged(t){this.animationDirection=t{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(N.mQ),e.Y36(A.yh),e.Y36(G.eX),e.Y36(c.qu),e.Y36(p.JJ),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-rebalance"]],viewQuery:function(t,a){if(1&t&&e.Gf(ko,5),2&t){let o;e.iGM(o=e.CRH())&&(a.stepper=o.first)}},decls:8,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf"],["paymentStatusBlock",""],["paymentFailedBlock",""],["paymentSuccessfulBlock",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch","class","info-graphics-container",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxLayoutAlign","start start",3,"fxFlex"],[1,"page-title"],["fxLayoutAlign","space-between end",3,"fxFlex"],["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","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","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","48"],["autoFocus","","matInput","","placeholder","Amount","type","number","tabindex","1","formControlName","rebalanceAmount","required","",3,"step"],["matSuffix",""],[4,"ngIf"],["fxFlex","48","fxLayoutAlign","start end"],["type","text","placeholder","Receive from Peer","aria-label","Receive from Peer","matInput","","formControlName","selRebalancePeer","tabindex","2","required","",3,"matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","submit",3,"click"],["matStepLabel","","disabled","true"],["tabindex","6","formControlName","selFeeLimitType","Placeholder","Fee Limits","required",""],["matInput","","formControlName","feeLimit","type","number","tabindex","7","required","",3,"placeholder","step"],["mat-button","","color","primary","tabindex","8","type","submit",3,"click"],[3,"stepControl"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["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","color","primary","mode","indeterminate",4,"ngIf"],["fxFlex","100",1,"flat-expansion-panel",3,"expanded"],["fxLayout","column",4,"ngIf","ngIfElse"],["fxLayoutAlign","start","class","font-bold-500 mt-1",4,"ngIf"],["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"],[1,"ml-1","icon-small"],["fxFlex","100","color","primary","mode","indeterminate"],["fxLayoutAlign","start",1,"font-bold-500","mt-1"],["mat-button","","color","primary","tabindex","11","type","button",3,"click"],[4,"ngTemplateOutlet"],["fxLayout","row"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"w-100","my-1"],["fxFlex","50"],["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"],["tabindex","19","mat-button","",1,"btn-close-x","p-0",3,"click"],["fxLayout","column","fxFlex","70","fxLayoutAlign","space-between center",1,"padding-gap-x-large"],["fxFlex","100",3,"stepNumber","animationDirection","stepNumberChange"],["fxLayout","row","fxFlex","10","fxLayoutAlign","center end",1,"padding-gap-x-large","padding-gap-bottom-large"],["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"],["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(t,a){1&t&&(e.YNc(0,Wo,97,49,"div",0),e.YNc(1,$o,1,1,"ng-template",null,1,e.W1O),e.YNc(3,jo,3,1,"ng-template",null,2,e.W1O),e.YNc(5,Ko,19,4,"ng-template",null,3,e.W1O),e.YNc(7,rs,18,10,"div",4)),2&t&&(e.Q6J("ngIf",!a.flgShowInfo),e.xp6(7),e.Q6J("ngIf",a.flgShowInfo))},directives:[p.O5,d.xw,d.yH,d.Wh,b.dk,k.lW,b.dn,M.BN,B.Vq,B.C0,c._Y,c.JL,c.sg,B.VY,f.KE,I.Nt,c.wV,c.Fj,W.h,c.JJ,c.u,c.Q7,f.bx,f.R9,f.TO,ne.ZL,ne.XC,p.sg,Y.ey,R.gD,H.ib,H.yz,H.yK,K.Hw,P.pW,J.ZT,p.tP,z.d,Lo,p.mk,S.oO],pipes:[p.rS,p.Ov],styles:[".dots-stepper-block[_ngcontent-%COMP%]{width:3rem}.info-graphics-container[_ngcontent-%COMP%]{max-height:60rem;min-height:60rem}"],data:{animation:[Te._]}}),n})();function us(n,i){if(1&n&&(e.TgZ(0,"div",16)(1,"p",17)(2,"mat-icon",18),e._uU(3,"close"),e.qZA(),e._uU(4),e.qZA()()),2&n){const t=e.oxw();e.xp6(4),e.Oqu(t.errorMsg)}}function ps(n,i){if(1&n&&(e.TgZ(0,"div",27),e._UZ(1,"fa-icon",28),e.TgZ(2,"span"),e._uU(3,"Priority/Fee for force closing inactive channels cannot be modified."),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faInfoCircle)}}function ms(n,i){if(1&n&&(e.TgZ(0,"mat-option",29),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function ds(n,i){1&n&&(e.TgZ(0,"mat-form-field",30),e._UZ(1,"input",31),e.qZA())}function _s(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Number of blocks is required."),e.qZA())}function hs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",32)(1,"input",33,34),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).blocks=o}),e.qZA(),e.YNc(3,_s,2,0,"mat-error",35),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.blocks)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.blocks)}}function gs(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function fs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",32)(1,"input",36,37),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).fees=o}),e.qZA(),e.YNc(3,gs,2,0,"mat-error",35),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.fees)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.fees)}}function Cs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",19),e.YNc(1,ps,4,1,"div",20),e.TgZ(2,"div",21)(3,"mat-form-field",22)(4,"mat-select",23),e.NdJ("valueChange",function(o){return e.CHM(t),e.oxw().selTransType=o}),e.YNc(5,ms,2,2,"mat-option",24),e.qZA()(),e.YNc(6,ds,2,0,"mat-form-field",25),e.YNc(7,hs,4,4,"mat-form-field",26),e.YNc(8,fs,4,4,"mat-form-field",26),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.channelToClose.active),e.xp6(3),e.Q6J("value",t.selTransType)("disabled",!t.channelToClose.active),e.xp6(1),e.Q6J("ngForOf",t.transTypes),e.xp6(1),e.Q6J("ngIf","0"===t.selTransType),e.xp6(1),e.Q6J("ngIf","1"===t.selTransType),e.xp6(1),e.Q6J("ngIf","2"===t.selTransType)}}function xs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",38),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(1,"Clear"),e.qZA()}}function ys(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",39),e.NdJ("click",function(){return e.CHM(t),e.oxw().onCloseChannel()}),e._uU(1),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.channelToClose.active?"Close Channel":"Force Close")}}function Ts(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"button",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().onClose()}),e._uU(1,"Ok"),e.qZA()}}let bs=(()=>{class n{constructor(t,a,o,s,u){this.dialogRef=t,this.data=a,this.store=o,this.actions=s,this.logger=u,this.transTypes=l.Dr,this.selTransType="0",this.blocks=null,this.fees=null,this.faExclamationTriangle=y.eHv,this.faInfoCircle=y.sqG,this.flgPendingHtlcs=!1,this.errorMsg="Please wait for pending HTLCs to settle before attempting channel closure.",this.unSubs=[new m.x,new m.x]}ngOnInit(){this.channelToClose=this.data.channel,this.actions.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t.type===l.uR.UPDATE_API_CALL_STATUS_LND||t.type===l.uR.SET_CHANNELS_LND)).subscribe(t=>{if(t.type===l.uR.SET_CHANNELS_LND){const a=t.payload.find(o=>o.chan_id===this.data.channel.chan_id);a&&a.pending_htlcs&&a.pending_htlcs.length&&a.pending_htlcs.length>0&&(this.flgPendingHtlcs=!0)}t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&t.payload.status===l.Bn.ERROR&&"FetchAllChannels"===t.payload.action&&this.logger.error("Fetching latest channel information failed!\n"+t.payload.message)})}onCloseChannel(){if("1"===this.selTransType&&(!this.blocks||0===this.blocks)||"2"===this.selTransType&&(!this.fees||0===this.fees))return!0;const t={channelPoint:this.channelToClose.channel_point,forcibly:!this.channelToClose.active};this.blocks&&(t.targetConf=this.blocks),this.fees&&(t.satPerByte=this.fees),this.store.dispatch((0,v.BL)({payload:t})),this.dialogRef.close(!1)}resetData(){this.selTransType="0",this.blocks=null,this.fees=null}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(A.yh),e.Y36(G.eX),e.Y36(N.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-close-channel"]],decls:19,vars:7,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxLayout","column",1,"bordered-box","mb-1","p-2"],["fxLayoutAlign","start center",1,"pb-1","word-break"],["fxLayoutAlign","start center",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center"],["mat-button","","color","primary","type","reset","class","mr-1","tabindex","3","default","",3,"click",4,"ngIf"],["mat-button","","color","primary","type","submit","tabindex","4",3,"click",4,"ngIf"],["mat-button","","color","primary","type","submit","tabindex","5",3,"click",4,"ngIf"],["fxLayoutAlign","start center"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100","class","alert alert-info",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex.gt-sm","48"],["tabindex","1",3,"value","disabled","valueChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","48",4,"ngIf"],["fxFlex.gt-sm","48","fxLayoutAlign","start end",4,"ngIf"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],[3,"value"],["fxFlex","48"],["matInput","","placeholder","Default","disabled",""],["fxFlex.gt-sm","48","fxLayoutAlign","start end"],["matInput","","placeholder","Number of Blocks","type","number","name","blocks","required","","tabindex","2",3,"ngModel","step","min","ngModelChange"],["blcks","ngModel"],[4,"ngIf"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","ccfees","required","","tabindex","3",3,"ngModel","step","min","ngModelChange"],["clchfee","ngModel"],["mat-button","","color","primary","type","reset","tabindex","3","default","",1,"mr-1",3,"click"],["mat-button","","color","primary","type","submit","tabindex","4",3,"click"],["mat-button","","color","primary","type","submit","tabindex","5",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return a.onClose()}),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7)(10,"div",8)(11,"p",9),e._uU(12),e.qZA(),e.YNc(13,us,5,1,"div",10),e.YNc(14,Cs,9,7,"div",11),e.qZA(),e.TgZ(15,"div",12),e.YNc(16,xs,2,0,"button",13),e.YNc(17,ys,2,1,"button",14),e.YNc(18,Ts,2,0,"button",15),e.qZA()()()()()),2&t&&(e.xp6(5),e.Oqu(a.channelToClose.active?"Close Channel":"Force Close Channel"),e.xp6(7),e.hij("",a.channelToClose.active?"Closing channel: "+(a.channelToClose.remote_alias||a.channelToClose.chan_id?a.channelToClose.remote_alias&&a.channelToClose.chan_id?a.channelToClose.remote_alias+" ("+a.channelToClose.chan_id+")":a.channelToClose.remote_alias?a.channelToClose.remote_alias:a.channelToClose.chan_id:a.channelToClose.channel_point):"Force closing channel: "+(a.channelToClose.remote_alias||a.channelToClose.chan_id?a.channelToClose.remote_alias&&a.channelToClose.chan_id?a.channelToClose.remote_alias+" ("+a.channelToClose.chan_id+")":a.channelToClose.remote_alias?a.channelToClose.remote_alias:a.channelToClose.chan_id:a.channelToClose.channel_point)," "),e.xp6(1),e.Q6J("ngIf",a.flgPendingHtlcs),e.xp6(1),e.Q6J("ngIf",!a.flgPendingHtlcs),e.xp6(2),e.Q6J("ngIf",a.channelToClose.active&&!a.flgPendingHtlcs),e.xp6(1),e.Q6J("ngIf",!a.flgPendingHtlcs),e.xp6(1),e.Q6J("ngIf",a.flgPendingHtlcs))},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,b.dn,c._Y,c.JL,c.F,p.O5,K.Hw,M.BN,f.KE,R.gD,p.sg,Y.ey,I.Nt,c.wV,c.qQ,c.Fj,$.q,c.Q7,c.JJ,c.On,f.TO],styles:[""]}),n})();function vs(n,i){1&n&&e._UZ(0,"mat-progress-bar",30)}function Zs(n,i){1&n&&(e.TgZ(0,"th",31),e._uU(1," Peer "),e.qZA())}function ws(n,i){1&n&&e._UZ(0,"span",39)}function As(n,i){1&n&&e._UZ(0,"span",40)}function Ss(n,i){if(1&n&&(e.TgZ(0,"span",41),e._UZ(1,"fa-icon",42),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faEyeSlash)}}function Ls(n,i){if(1&n&&(e.TgZ(0,"span",43),e._UZ(1,"fa-icon",42),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faEye)}}const ks=function(n){return{"max-width":n}};function Fs(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"div",33),e.YNc(2,ws,1,0,"span",34),e.YNc(3,As,1,0,"span",35),e.YNc(4,Ss,2,1,"span",36),e.YNc(5,Ls,2,1,"span",37),e.TgZ(6,"span",38),e._uU(7),e.qZA()()()),2&n){const t=i.$implicit,a=e.oxw();e.xp6(1),e.Q6J("ngStyle",e.VKq(6,ks,a.screenSize===a.screenSizeEnum.XS?"10rem":a.screenSize===a.screenSizeEnum.MD?"15rem":"22rem")),e.xp6(1),e.Q6J("ngIf",t.active),e.xp6(1),e.Q6J("ngIf",!t.active),e.xp6(1),e.Q6J("ngIf",t.private),e.xp6(1),e.Q6J("ngIf",!t.private),e.xp6(2),e.Oqu(t.remote_alias||t.remote_pubkey)}}function Ns(n,i){if(1&n&&(e.TgZ(0,"th",44),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("Uptime (",t.timeUnit,")")}}function qs(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",t.uptime_str," ")}}function Us(n,i){1&n&&(e.TgZ(0,"th",44),e._uU(1,"Sats Sent "),e.qZA())}function Os(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",e.lcZ(3,1,t.total_satoshis_sent)," ")}}function Rs(n,i){1&n&&(e.TgZ(0,"th",44),e._uU(1,"Sats Received "),e.qZA())}function Is(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",e.lcZ(3,1,t.total_satoshis_received)," ")}}function Ms(n,i){1&n&&(e.TgZ(0,"th",44),e._uU(1,"Local Balance (Sats) "),e.qZA())}function Ds(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",e.lcZ(3,1,t.local_balance)," ")}}function Ps(n,i){1&n&&(e.TgZ(0,"th",44),e._uU(1,"Remote Balance (Sats) "),e.qZA())}function Js(n,i){if(1&n&&(e.TgZ(0,"td",32)(1,"span",45),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij("",e.lcZ(3,1,t.remote_balance)," ")}}function Es(n,i){1&n&&(e.TgZ(0,"th",46),e._uU(1,"Balance Score "),e.qZA())}function Qs(n,i){if(1&n&&(e.TgZ(0,"td",47)(1,"div",48)(2,"mat-hint",49),e._uU(3),e.ALo(4,"number"),e.qZA()(),e._UZ(5,"mat-progress-bar",50),e.qZA()),2&n){const t=i.$implicit;e.xp6(3),e.Oqu(e.lcZ(4,2,t.balancedness||0)),e.xp6(2),e.s9C("value",t.local_balance&&t.local_balance>0?+t.local_balance/(+t.local_balance+ +t.remote_balance)*100:0)}}function Ys(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",51)(1,"div",52)(2,"mat-select",53),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",54),e.NdJ("click",function(){return e.CHM(t),e.oxw().onChannelUpdate("all")}),e._uU(5,"Update Fee Policy"),e.qZA(),e.TgZ(6,"mat-option",54),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(7,"Download CSV"),e.qZA()()()()}}function Hs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onCircularRebalance(o)}),e._uU(1,"Circular Rebalance"),e.qZA()}}function Bs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-option",54),e.NdJ("click",function(){e.CHM(t);const o=e.oxw().$implicit;return e.oxw().onLoopOut(o)}),e._uU(1,"Loop Out"),e.qZA()}}function Vs(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",55)(1,"div",52)(2,"mat-select",56),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",54),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onChannelClick(u,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",54),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onViewRemotePolicy(s)}),e._uU(7,"View Remote Fee "),e.qZA(),e.TgZ(8,"mat-option",54),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onChannelUpdate(s)}),e._uU(9,"Update Fee Policy"),e.qZA(),e.YNc(10,Hs,2,0,"mat-option",57),e.YNc(11,Bs,2,0,"mat-option",57),e.TgZ(12,"mat-option",54),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onChannelClose(s)}),e._uU(13,"Close Channel"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(10),e.Q6J("ngIf",+t.versionsArr[0]>0||+t.versionsArr[1]>=9),e.xp6(1),e.Q6J("ngIf",t.selNode.swapServerUrl)}}function Gs(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No peers connected. Add a peer in order to open a channel."),e.qZA())}function zs(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No channel available."),e.qZA())}function Ws(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting channels..."),e.qZA())}function Xs(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function $s(n,i){if(1&n&&(e.TgZ(0,"td",58),e.YNc(1,Gs,2,0,"p",59),e.YNc(2,zs,2,0,"p",59),e.YNc(3,Ws,2,0,"p",59),e.YNc(4,Xs,2,1,"p",59),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.numPeers<1&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",t.numPeers>0&&(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&(null==t.apiCallStatus?null:t.apiCallStatus.status)===t.apiCallStatusEnum.ERROR)}}const js=function(n){return{"display-none":n}};function Ks(n,i){if(1&n&&e._UZ(0,"tr",60),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,js,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function el(n,i){1&n&&e._UZ(0,"tr",61)}function tl(n,i){1&n&&e._UZ(0,"tr",62)}const nl=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},al=function(){return["no_channel"]};let il=(()=>{class n{constructor(t,a,o,s,u,g,U,x){var q,re,we,Ae,Se,Le;this.logger=t,this.store=a,this.lndEffects=o,this.commonService=s,this.rtlEffects=u,this.decimalPipe=g,this.loopService=U,this.router=x,this.timeUnit="mins:secs",this.userPersonaEnum=l.ol,this.selNode={},this.totalBalance=0,this.displayedColumns=[],this.channelsData=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.versionsArr=[],this.faEye=y.Mdf,this.faEyeSlash=y.Aq,this.targetConf=6,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["remote_alias","local_balance","remote_balance","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["remote_alias","local_balance","remote_balance","balancedness","actions"]):(this.flgSticky=!0,this.displayedColumns=["remote_alias","uptime","total_satoshis_sent","total_satoshis_received","local_balance","remote_balance","balancedness","actions"]),this.selFilter=(null===(we=null===(re=null===(q=this.router.getCurrentNavigation())||void 0===q?void 0:q.extras)||void 0===re?void 0:re.state)||void 0===we?void 0:we.filter)?null===(Le=null===(Se=null===(Ae=this.router.getCurrentNavigation())||void 0===Ae?void 0:Ae.extras)||void 0===Se?void 0:Se.state)||void 0===Le?void 0:Le.filter:""}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t,this.information&&this.information.version&&(this.versionsArr=this.information.version.split("."))}),this.store.select(C.Wi).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.numPeers=t.peers&&t.peers.length?t.peers.length:0}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{var a,o;this.totalBalance=(null===(a=t.blockchainBalance)||void 0===a?void 0:a.total_balance)?+(null===(o=t.blockchainBalance)||void 0===o?void 0:o.total_balance):0}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.channelsData=this.calculateUptime(t.channels),this.channelsData.length>0&&this.loadChannelsTable(this.channelsData),this.logger.info(t)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadChannelsTable(this.channelsData)}onViewRemotePolicy(t){var a;this.store.dispatch((0,v.$A)({payload:{uiMessage:l.m6.GET_REMOTE_POLICY,channelID:(null===(a=t.chan_id)||void 0===a?void 0:a.toString())+"/"+this.information.identity_pubkey}})),this.lndEffects.setLookup.pipe((0,V.q)(1)).subscribe(o=>{if(!o.fee_base_msat&&!o.fee_rate_milli_msat&&!o.time_lock_delta)return!1;const s=[[{key:"fee_base_msat",value:o.fee_base_msat,title:"Base Fees (mSats)",width:25,type:l.Gi.NUMBER},{key:"fee_rate_milli_msat",value:o.fee_rate_milli_msat,title:"Fee Rate (milli mSats)",width:25,type:l.Gi.NUMBER},{key:"fee_rate_milli_msat",value:o.fee_rate_milli_msat/1e4,title:"Fee Rate (%)",width:25,type:l.Gi.NUMBER,digitsInfo:"1.0-8"},{key:"time_lock_delta",value:o.time_lock_delta,title:"Time Lock Delta",width:25,type:l.Gi.NUMBER}]],u="Remote policy for Channel: "+(t.remote_alias||t.chan_id?t.remote_alias&&t.chan_id?t.remote_alias+" ("+t.chan_id+")":t.remote_alias?t.remote_alias:t.chan_id:t.channel_point);setTimeout(()=>{this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Remote Channel Policy",titleMessage:u,message:s}}}))},0)})}onCircularRebalance(t){this.store.dispatch((0,w.qR)({payload:{data:{message:{channels:this.channelsData,selChannel:t},component:cs}}}))}onChannelUpdate(t){"all"===t?(this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update All Channels",message:[],titleMessage:"Update fee policy for all channels",flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSat)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:1e3,width:32},{placeholder:"Fee Rate (mili mSat)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:1,min:1,width:32,hintFunction:this.percentHintFunction},{placeholder:"Time Lock Delta",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:40,width:32}]}}})),this.rtlEffects.closeConfirm.pipe((0,_.R)(this.unSubs[5])).subscribe(o=>{o&&this.store.dispatch((0,v.pW)({payload:{baseFeeMsat:o[0].inputValue,feeRate:o[1].inputValue,timeLockDelta:o[2].inputValue,chanPoint:"all"}}))})):(this.myChanPolicy={fee_base_msat:0,fee_rate_milli_msat:0,time_lock_delta:0},this.store.dispatch((0,v.$A)({payload:{uiMessage:l.m6.GET_CHAN_POLICY,channelID:t.chan_id.toString()}})),this.lndEffects.setLookup.pipe((0,V.q)(1)).subscribe(a=>{this.myChanPolicy=a.node1_pub===this.information.identity_pubkey?a.node1_policy:a.node2_pub===this.information.identity_pubkey?a.node2_policy:{fee_base_msat:0,fee_rate_milli_msat:0,time_lock_delta:0},this.logger.info(this.myChanPolicy);const o="Update fee policy for Channel: "+(t.remote_alias||t.chan_id?t.remote_alias&&t.chan_id?t.remote_alias+" ("+t.chan_id+")":t.remote_alias?t.remote_alias:t.chan_id:t.channel_point),s=[];setTimeout(()=>{this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Update Fee Policy",titleMessage:o,noBtnText:"Cancel",yesBtnText:"Update Channel",message:s,flgShowInput:!0,getInputs:[{placeholder:"Base Fee (mSat)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:""===this.myChanPolicy.fee_base_msat?0:this.myChanPolicy.fee_base_msat,width:32},{placeholder:"Fee Rate (mili mSat)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:this.myChanPolicy.fee_rate_milli_msat,min:1,width:32,hintFunction:this.percentHintFunction},{placeholder:"Time Lock Delta",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:this.myChanPolicy.time_lock_delta,width:32}]}}}))},0)}),this.rtlEffects.closeConfirm.pipe((0,_.R)(this.unSubs[6])).subscribe(a=>{a&&this.store.dispatch((0,v.pW)({payload:{baseFeeMsat:a[0].inputValue,feeRate:a[1].inputValue,timeLockDelta:a[2].inputValue,chanPoint:t.channel_point}}))})),this.applyFilter()}onChannelClose(t){t.active&&this.store.dispatch((0,v.UR)()),this.store.dispatch((0,w.qR)({payload:{data:{channel:t,component:bs}}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{channel:t,showCopy:!0,component:xe}}}))}loadChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?1:-1),this.channels=new r.by([...t]),this.channels.filterPredicate=(a,o)=>((a.active?"active":"inactive")+(a.chan_id?a.chan_id.toLowerCase():"")+(a.remote_pubkey?a.remote_pubkey.toLowerCase():"")+(a.remote_alias?a.remote_alias.toLowerCase():"")+(a.capacity?a.capacity:"")+(a.local_balance?a.local_balance:"")+(a.remote_balance?a.remote_balance:"")+(a.total_satoshis_sent?a.total_satoshis_sent:"")+(a.total_satoshis_received?a.total_satoshis_received:"")+(a.commit_fee?a.commit_fee:"")+(a.private?"private":"public")).includes(o),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.channels.paginator=this.paginator,this.applyFilter(),this.logger.info(this.channels)}calculateUptime(t){let g=60,U=1,x=0;switch(t.forEach(q=>{q.uptime&&+q.uptime>x&&(x=+q.uptime)}),!0){case x<3600:this.timeUnit="Mins:Secs",g=60,U=1;break;case x>=3600&&x<86400:this.timeUnit="Hrs:Mins",g=3600,U=60;break;case x>=86400&&x<31536e3:this.timeUnit="Days:Hrs",g=86400,U=3600;break;case x>31536e3:this.timeUnit="Yrs:Days",g=31536e3,U=86400;break;default:this.timeUnit="Mins:Secs",g=60,U=1}return t.forEach(q=>{q.uptime_str=q.uptime?this.decimalPipe.transform(Math.floor(+q.uptime/g),"2.0-0")+":"+this.decimalPipe.transform(Math.round(+q.uptime%g/U),"2.0-0"):"---"}),t}onLoopOut(t){this.loopService.getLoopOutTermsAndQuotes(this.targetConf).pipe((0,_.R)(this.unSubs[7])).subscribe(a=>{this.store.dispatch((0,w.qR)({payload:{minHeight:"56rem",data:{channel:t,minQuote:a[0],maxQuote:a[1],direction:l.$I.LOOP_OUT,component:Ie.a}}}))})}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.channels.data,"Open-channels")}percentHintFunction(t){return(t/1e4).toString()+"%"}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(ee.l),e.Y36(O.v),e.Y36(oe.V),e.Y36(p.JJ),e.Y36(Me.W),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-open-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:39,vars:14,consts:[["fxLayout","column",1,"padding-gap-x"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","remote_alias"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","uptime"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","total_satoshis_sent"],["matColumnDef","total_satoshis_received"],["matColumnDef","local_balance"],["matColumnDef","remote_balance"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-2",4,"matHeaderCellDef"],["mat-cell","","class","pl-2",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","dot green","matTooltip","Active","matTooltipPosition","right",4,"ngIf"],["class","dot yellow","matTooltip","Inactive","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Active","matTooltipPosition","right",1,"dot","green"],["matTooltip","Inactive","matTooltipPosition","right",1,"dot","yellow"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-2"],["mat-cell","",1,"pl-2"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["placeholder","Actions","tabindex","2",1,"mr-0"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3)(4,"input",4),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(5,"div",5),e.YNc(6,vs,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,Zs,2,0,"th",10),e.YNc(11,Fs,8,8,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,Ns,2,1,"th",13),e.YNc(14,qs,3,1,"td",11),e.BQk(),e.ynx(15,14),e.YNc(16,Us,2,0,"th",13),e.YNc(17,Os,4,3,"td",11),e.BQk(),e.ynx(18,15),e.YNc(19,Rs,2,0,"th",13),e.YNc(20,Is,4,3,"td",11),e.BQk(),e.ynx(21,16),e.YNc(22,Ms,2,0,"th",13),e.YNc(23,Ds,4,3,"td",11),e.BQk(),e.ynx(24,17),e.YNc(25,Ps,2,0,"th",13),e.YNc(26,Js,4,3,"td",11),e.BQk(),e.ynx(27,18),e.YNc(28,Es,2,0,"th",19),e.YNc(29,Qs,6,4,"td",20),e.BQk(),e.ynx(30,21),e.YNc(31,Ys,8,0,"th",22),e.YNc(32,Vs,14,2,"td",23),e.BQk(),e.ynx(33,24),e.YNc(34,$s,5,4,"td",25),e.BQk(),e.YNc(35,Ks,1,3,"tr",26),e.YNc(36,el,1,0,"tr",27),e.YNc(37,tl,1,0,"tr",28),e.qZA()(),e._UZ(38,"mat-paginator",29),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",(null==a.apiCallStatus?null:a.apiCallStatus.status)===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.channels)("ngClass",e.VKq(11,nl,""!==a.errorMessage)),e.xp6(28),e.Q6J("matFooterRowDef",e.DdM(13,al)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.Wh,d.yH,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,X.gM,M.BN,f.bx,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-remote_alias[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-remote_alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{flex:0 0 20%;width:20%}@media only screen and (max-width: 75em){.mat-column-balancedness[_ngcontent-%COMP%]{flex:0 0 35%;width:35%}}@media only screen and (max-width: 56.25em){.mat-column-balancedness[_ngcontent-%COMP%]{flex:0 0 25%;width:25%}}.mat-column-uptime[_ngcontent-%COMP%], .mat-column-local_balance[_ngcontent-%COMP%], .mat-column-remote_balance[_ngcontent-%COMP%], .mat-column-total_satoshis_sent[_ngcontent-%COMP%], .mat-column-total_satoshis_received[_ngcontent-%COMP%]{flex:1 1 10%;width:10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 75em){.mat-column-uptime[_ngcontent-%COMP%], .mat-column-local_balance[_ngcontent-%COMP%], .mat-column-remote_balance[_ngcontent-%COMP%], .mat-column-total_satoshis_sent[_ngcontent-%COMP%], .mat-column-total_satoshis_received[_ngcontent-%COMP%]{white-space:unset;flex:1 1 25%;width:25%}}@media only screen and (max-width: 56.25em){.mat-column-uptime[_ngcontent-%COMP%], .mat-column-local_balance[_ngcontent-%COMP%], .mat-column-remote_balance[_ngcontent-%COMP%], .mat-column-total_satoshis_sent[_ngcontent-%COMP%], .mat-column-total_satoshis_received[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}}@media only screen and (max-width: 37.5em){.mat-column-uptime[_ngcontent-%COMP%], .mat-column-local_balance[_ngcontent-%COMP%], .mat-column-remote_balance[_ngcontent-%COMP%], .mat-column-total_satoshis_sent[_ngcontent-%COMP%], .mat-column-total_satoshis_received[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 56.25em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 90%}}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})();const ol=["outputIdx"];function sl(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Index for change output is required."),e.qZA())}function ll(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid index value."),e.qZA())}function rl(n,i){if(1&n&&(e.TgZ(0,"mat-option",29),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function cl(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Number of blocks is required."),e.qZA())}function ul(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",17)(1,"input",30,31),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().blocks=o}),e.qZA(),e.YNc(3,cl,2,0,"mat-error",20),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.blocks)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.blocks)}}function pl(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function ml(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",17)(1,"input",32,33),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().fees=o}),e.qZA(),e.YNc(3,pl,2,0,"mat-error",20),e.qZA()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngModel",t.fees)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.fees)}}function dl(n,i){if(1&n&&(e.TgZ(0,"div",34),e._UZ(1,"fa-icon",13),e.TgZ(2,"span"),e._uU(3),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(2),e.Oqu(t.bumpFeeError)}}let _l=(()=>{class n{constructor(t,a,o,s,u){this.dialogRef=t,this.data=a,this.logger=o,this.dataService=s,this.snackBar=u,this.transTypes=[...l.Dr],this.selTransType="2",this.blocks=null,this.fees=null,this.outputIndex=null,this.faCopy=y.kZ_,this.faInfoCircle=y.sqG,this.faExclamationTriangle=y.eHv,this.bumpFeeError="",this.unSubs=[new m.x,new m.x]}set payReq(t){t&&(this.outputIdx=t)}ngOnInit(){this.transTypes=this.transTypes.splice(1),this.bumpFeeChannel=this.data.pendingChannel;const t=this.bumpFeeChannel.channel.channel_point.split(":")||[];this.bumpFeeChannel.channel.txid_str=t[0]||(this.bumpFeeChannel.channel&&this.bumpFeeChannel.channel.channel_point?this.bumpFeeChannel.channel.channel_point:""),this.bumpFeeChannel.channel.output_index=+t[1]||null}onBumpFee(){return this.outputIndex===this.bumpFeeChannel.channel.output_index?(this.outputIdx.control.setErrors({pendingChannelOutputIndex:!0}),!0):!this.outputIndex&&0!==this.outputIndex||!("1"!==this.selTransType||this.blocks&&0!==this.blocks)||!("2"!==this.selTransType||this.fees&&0!==this.fees)||void this.dataService.bumpFee(this.bumpFeeChannel.channel.txid_str,this.outputIndex,this.blocks,this.fees).pipe((0,_.R)(this.unSubs[0])).subscribe({next:t=>{this.dialogRef.close(!1)},error:t=>{this.logger.error(t),this.bumpFeeError=t.message?t.message:t}})}onCopyID(t){this.snackBar.open("Transaction ID copied.")}resetData(){this.bumpFeeError="",this.selTransType="2",this.blocks=null,this.fees=null,this.outputIdx.control.setErrors(null)}onClose(){this.dialogRef.close(!1)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(N.mQ),e.Y36(j.D),e.Y36(te.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-bump-fee"]],viewQuery:function(t,a){if(1&t&&e.Gf(ol,5),2&t){let o;e.iGM(o=e.CRH())&&(a.payReq=o.first)}},decls:48,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxLayout","column",1,"bordered-box","mb-1","p-2"],["fxLayoutAlign","start center",1,"pb-1","word-break"],["matSuffix","","rtlClipboard","","matTooltip","Copy transaction ID",1,"ml-1",3,"icon","payload","copied"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","100",1,"alert","alert-info"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column","fxFlex","100"],[1,"pl-1"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex.gt-sm","32","fxLayoutAlign","start end"],["matInput","","placeholder","Index for Change Output","type","number","tabindex","1","required","","name","outputIdx",3,"ngModel","step","min","ngModelChange"],["outputIdx","ngModel"],[4,"ngIf"],["fxFlex.gt-sm","32"],["tabindex","2",3,"value","valueChange","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex.gt-sm","32","fxLayoutAlign","start end",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center"],["mat-button","","color","primary","type","reset","tabindex","5","default","",1,"mr-1",3,"click"],["mat-button","","color","primary","type","submit","tabindex","6",3,"click"],[3,"value"],["matInput","","placeholder","Number of Blocks","type","number","name","blocks","required","","tabindex","3",3,"ngModel","step","min","ngModelChange"],["blcks","ngModel"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","fees","required","","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100",1,"alert","alert-danger","mt-1"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Bump Fee"),e.qZA()(),e.TgZ(6,"button",5),e.NdJ("click",function(){return a.onClose()}),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7)(10,"div",8)(11,"p",9),e._uU(12),e.TgZ(13,"fa-icon",10),e.NdJ("copied",function(s){return a.onCopyID(s)}),e.qZA()(),e.TgZ(14,"div",11)(15,"div",12),e._UZ(16,"fa-icon",13),e.TgZ(17,"span",14),e._uU(18,"Bumping fee on pending open channels is an advanced feature, attempt it only if you are familiar with the functionality of Bitcoin transactions. "),e.TgZ(19,"div"),e._uU(20,"Before attempting fee bump ensure the following:"),e.qZA(),e.TgZ(21,"div",15),e._uU(22,"1: Use a Bitcoin block explorer to ensure that channel opening transaction is not confirmed."),e.qZA(),e.TgZ(23,"div",15),e._uU(24,"2: The channel opening transaction must have a sizable change output, which can be spent further. The fee cannot be bumped without the change output."),e.qZA(),e.TgZ(25,"div",15),e._uU(26,"3: Find the index value of the change output via a block explorer."),e.qZA(),e.TgZ(27,"div",15),e._uU(28,"4: Enter the index value of the change output in the form below and the desired fee rate."),e.qZA(),e.TgZ(29,"div",15),e._uU(30,"5: Upon successful fee bump, use your block explorer to track the child transaction in the mempool, which should be linked with the change output transaction."),e.qZA()()(),e.TgZ(31,"div",16)(32,"mat-form-field",17)(33,"input",18,19),e.NdJ("ngModelChange",function(s){return a.outputIndex=s}),e.qZA(),e.YNc(35,sl,2,0,"mat-error",20),e.YNc(36,ll,2,0,"mat-error",20),e.qZA(),e.TgZ(37,"mat-form-field",21)(38,"mat-select",22),e.NdJ("valueChange",function(s){return a.selTransType=s})("selectionChange",function(){return a.blocks=null,a.fees=null}),e.YNc(39,rl,2,2,"mat-option",23),e.qZA()(),e.YNc(40,ul,4,4,"mat-form-field",24),e.YNc(41,ml,4,4,"mat-form-field",24),e.qZA(),e.YNc(42,dl,4,2,"div",25),e.qZA()(),e.TgZ(43,"div",26)(44,"button",27),e.NdJ("click",function(){return a.resetData()}),e._uU(45,"Clear"),e.qZA(),e.TgZ(46,"button",28),e.NdJ("click",function(){return a.onBumpFee()}),e._uU(47),e.qZA()()()()()()),2&t){const o=e.MAs(34);e.xp6(12),e.hij("Bump fee for channel point: ",null==a.bumpFeeChannel||null==a.bumpFeeChannel.channel?null:a.bumpFeeChannel.channel.channel_point," "),e.xp6(1),e.Q6J("icon",a.faCopy)("payload",null==a.bumpFeeChannel||null==a.bumpFeeChannel.channel?null:a.bumpFeeChannel.channel.txid_str),e.xp6(3),e.Q6J("icon",a.faInfoCircle),e.xp6(17),e.Q6J("ngModel",a.outputIndex)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",null==o.errors?null:o.errors.required),e.xp6(1),e.Q6J("ngIf",null==o.errors?null:o.errors.pendingChannelOutputIndex),e.xp6(2),e.Q6J("value",a.selTransType),e.xp6(1),e.Q6J("ngForOf",a.transTypes),e.xp6(1),e.Q6J("ngIf","1"===a.selTransType),e.xp6(1),e.Q6J("ngIf","2"===a.selTransType),e.xp6(1),e.Q6J("ngIf",""!==a.bumpFeeError),e.xp6(5),e.Oqu(""!==a.bumpFeeError?"Retry Bump Fee":"Bump Fee")}},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,b.dn,c._Y,c.JL,c.F,M.BN,f.R9,se.y,X.gM,f.KE,I.Nt,c.wV,c.qQ,c.Fj,$.q,c.Q7,c.JJ,c.On,p.O5,f.TO,R.gD,p.sg,Y.ey],styles:[""]}),n})();function hl(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function gl(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function fl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",37),e._uU(1," Peer "),e.qZA())}const me=function(n){return{"max-width":n}};function Cl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",38),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(1),e.Oqu(t.channel.remote_alias)}}function xl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Commit Fee (Sats) "),e.qZA())}function yl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.commit_fee))}}function Tl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Commit Weight "),e.qZA())}function bl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.commit_weight))}}function vl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Capacity (Sats)"),e.qZA())}function Zl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.capacity))}}function wl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",41),e._uU(1,"Actions"),e.qZA())}function Al(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-cell",42)(1,"div",43)(2,"mat-select",44),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",45),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onOpenClick(s)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",45),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onBumpFee(s)}),e._uU(7,"Bump Fee"),e.qZA()()()()}}function Sl(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending channel."),e.qZA())}function Ll(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending channels..."),e.qZA())}function kl(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Fl(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,Sl,2,0,"p",47),e.YNc(2,Ll,2,0,"p",47),e.YNc(3,kl,2,1,"p",47),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!t.pendingOpenChannels||!(null!=t.pendingOpenChannels&&t.pendingOpenChannels.data)||(null==t.pendingOpenChannels||null==t.pendingOpenChannels.data?null:t.pendingOpenChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!t.pendingOpenChannels||!(null!=t.pendingOpenChannels&&t.pendingOpenChannels.data)||(null==t.pendingOpenChannels||null==t.pendingOpenChannels.data?null:t.pendingOpenChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!t.pendingOpenChannels||!(null!=t.pendingOpenChannels&&t.pendingOpenChannels.data)||(null==t.pendingOpenChannels||null==t.pendingOpenChannels.data?null:t.pendingOpenChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const be=function(n){return{"display-none":n}};function Nl(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,be,t.pendingOpenChannels&&(null==t.pendingOpenChannels?null:t.pendingOpenChannels.data)&&(null==t.pendingOpenChannels||null==t.pendingOpenChannels.data?null:t.pendingOpenChannels.data.length)>0))}}function ql(n,i){1&n&&e._UZ(0,"mat-header-row")}function Ul(n,i){1&n&&e._UZ(0,"mat-row",49)}function Ol(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function Rl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",37),e._uU(1," Peer "),e.qZA())}function Il(n,i){if(1&n&&(e.TgZ(0,"mat-cell",38),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(1),e.Oqu(t.channel.remote_alias)}}function Ml(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Recovered Balance (Sats) "),e.qZA())}function Dl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.recovered_balance))}}function Pl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Limbo Balance (Sats) "),e.qZA())}function Jl(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.limbo_balance))}}function El(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1,"Capacity (Sats) "),e.qZA())}function Ql(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.capacity))}}function Yl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",50),e._uU(1,"Actions"),e.qZA())}function Hl(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-cell",51)(1,"button",52),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onForceClosingClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function Bl(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending channel."),e.qZA())}function Vl(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending channels..."),e.qZA())}function Gl(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function zl(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,Bl,2,0,"p",47),e.YNc(2,Vl,2,0,"p",47),e.YNc(3,Gl,2,1,"p",47),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!t.pendingForceClosingChannels||!(null!=t.pendingForceClosingChannels&&t.pendingForceClosingChannels.data)||(null==t.pendingForceClosingChannels||null==t.pendingForceClosingChannels.data?null:t.pendingForceClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!t.pendingForceClosingChannels||!(null!=t.pendingForceClosingChannels&&t.pendingForceClosingChannels.data)||(null==t.pendingForceClosingChannels||null==t.pendingForceClosingChannels.data?null:t.pendingForceClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!t.pendingForceClosingChannels||!(null!=t.pendingForceClosingChannels&&t.pendingForceClosingChannels.data)||(null==t.pendingForceClosingChannels||null==t.pendingForceClosingChannels.data?null:t.pendingForceClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}function Wl(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,be,t.pendingForceClosingChannels&&(null==t.pendingForceClosingChannels?null:t.pendingForceClosingChannels.data)&&(null==t.pendingForceClosingChannels||null==t.pendingForceClosingChannels.data?null:t.pendingForceClosingChannels.data.length)>0))}}function Xl(n,i){1&n&&e._UZ(0,"mat-header-row")}function $l(n,i){1&n&&e._UZ(0,"mat-row",49)}function jl(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function Kl(n,i){1&n&&(e.TgZ(0,"mat-header-cell",53),e._uU(1," Peer "),e.qZA())}function er(n,i){if(1&n&&(e.TgZ(0,"mat-cell",54),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(1),e.Oqu(t.channel.remote_alias)}}function tr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Local Balance (Sats) "),e.qZA())}function nr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.local_balance))}}function ar(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Remote Balance (Sats) "),e.qZA())}function ir(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.remote_balance))}}function or(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Capacity (Sats) "),e.qZA())}function sr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.capacity))}}function lr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",50),e._uU(1,"Actions"),e.qZA())}function rr(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-cell",51)(1,"button",55),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onClosingClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function cr(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending channel."),e.qZA())}function ur(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending channels..."),e.qZA())}function pr(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function mr(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,cr,2,0,"p",47),e.YNc(2,ur,2,0,"p",47),e.YNc(3,pr,2,1,"p",47),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!t.pendingClosingChannels||!(null!=t.pendingClosingChannels&&t.pendingClosingChannels.data)||(null==t.pendingClosingChannels||null==t.pendingClosingChannels.data?null:t.pendingClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!t.pendingClosingChannels||!(null!=t.pendingClosingChannels&&t.pendingClosingChannels.data)||(null==t.pendingClosingChannels||null==t.pendingClosingChannels.data?null:t.pendingClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!t.pendingClosingChannels||!(null!=t.pendingClosingChannels&&t.pendingClosingChannels.data)||(null==t.pendingClosingChannels||null==t.pendingClosingChannels.data?null:t.pendingClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}function dr(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,be,t.pendingClosingChannels&&(null==t.pendingClosingChannels?null:t.pendingClosingChannels.data)&&(null==t.pendingClosingChannels||null==t.pendingClosingChannels.data?null:t.pendingClosingChannels.data.length)>0))}}function _r(n,i){1&n&&e._UZ(0,"mat-header-row")}function hr(n,i){1&n&&e._UZ(0,"mat-row",49)}function gr(n,i){1&n&&e._UZ(0,"mat-progress-bar",36)}function fr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",53),e._uU(1," Peer "),e.qZA())}function Cr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",54),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,me,a.screenSize===a.screenSizeEnum.XS?"10rem":"30rem")),e.xp6(1),e.Oqu(t.channel.remote_alias)}}function xr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Limbo Balance (Sats) "),e.qZA())}function yr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij("",e.lcZ(2,1,t.limbo_balance)," ")}}function Tr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Local Balance (Sats) "),e.qZA())}function br(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.local_balance))}}function vr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Remote Balance (Sats) "),e.qZA())}function Zr(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.remote_balance))}}function wr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",39),e._uU(1," Capacity (Sats) "),e.qZA())}function Ar(n,i){if(1&n&&(e.TgZ(0,"mat-cell",40),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.channel.capacity))}}function Sr(n,i){1&n&&(e.TgZ(0,"mat-header-cell",50),e._uU(1,"Actions"),e.qZA())}function Lr(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-cell",51)(1,"button",56),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onWaitClosingClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function kr(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No pending channel."),e.qZA())}function Fr(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting pending channels..."),e.qZA())}function Nr(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function qr(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,kr,2,0,"p",47),e.YNc(2,Fr,2,0,"p",47),e.YNc(3,Nr,2,1,"p",47),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!t.pendingWaitClosingChannels||!(null!=t.pendingWaitClosingChannels&&t.pendingWaitClosingChannels.data)||(null==t.pendingWaitClosingChannels||null==t.pendingWaitClosingChannels.data?null:t.pendingWaitClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!t.pendingWaitClosingChannels||!(null!=t.pendingWaitClosingChannels&&t.pendingWaitClosingChannels.data)||(null==t.pendingWaitClosingChannels||null==t.pendingWaitClosingChannels.data?null:t.pendingWaitClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!t.pendingWaitClosingChannels||!(null!=t.pendingWaitClosingChannels&&t.pendingWaitClosingChannels.data)||(null==t.pendingWaitClosingChannels||null==t.pendingWaitClosingChannels.data?null:t.pendingWaitClosingChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Ur=function(n){return{"py-0":!0,"display-none":n}};function Or(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Ur,t.pendingWaitClosingChannels&&(null==t.pendingWaitClosingChannels?null:t.pendingWaitClosingChannels.data)&&(null==t.pendingWaitClosingChannels||null==t.pendingWaitClosingChannels.data?null:t.pendingWaitClosingChannels.data.length)>0))}}function Rr(n,i){1&n&&e._UZ(0,"mat-header-row")}function Ir(n,i){1&n&&e._UZ(0,"mat-row",49)}const de=function(n){return{"error-border bordered-box":n,"bordered-box":!0}},Mr=function(){return["no_pending_open"]},Dr=function(){return["no_pending_force_closing"]},Pr=function(){return["no_pending_closing"]},Jr=function(){return["no_pending_wait_closing"]};let Er=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.commonService=o,this.selNode={},this.selectedFilter="",this.information={},this.pendingChannels={},this.displayedOpenColumns=["remote_alias","commit_fee","commit_weight","capacity","actions"],this.pendingOpenChannelsLength=0,this.displayedForceClosingColumns=["remote_alias","recovered_balance","limbo_balance","capacity","actions"],this.pendingForceClosingChannelsLength=0,this.displayedClosingColumns=["remote_alias","local_balance","remote_balance","capacity","actions"],this.pendingClosingChannelsLength=0,this.displayedWaitClosingColumns=["remote_alias","limbo_balance","local_balance","remote_balance","actions"],this.pendingWaitClosingChannelsLength=0,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.displayedOpenColumns=["remote_alias","actions"],this.displayedForceClosingColumns=["remote_alias","actions"],this.displayedClosingColumns=["remote_alias","actions"],this.displayedWaitClosingColumns=["remote_alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.displayedOpenColumns=["remote_alias","commit_fee","actions"],this.displayedForceClosingColumns=["remote_alias","limbo_balance","actions"],this.displayedClosingColumns=["remote_alias","remote_balance","actions"],this.displayedWaitClosingColumns=["remote_alias","limbo_balance","actions"]):(this.displayedOpenColumns=["remote_alias","commit_fee","commit_weight","capacity","actions"],this.displayedForceClosingColumns=["remote_alias","recovered_balance","limbo_balance","capacity","actions"],this.displayedClosingColumns=["remote_alias","local_balance","remote_balance","capacity","actions"],this.displayedWaitClosingColumns=["remote_alias","limbo_balance","local_balance","remote_balance","actions"])}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.information=t}),this.store.select(C.ni).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.pendingChannels=t.pendingChannels,this.pendingChannels.pending_open_channels&&this.pendingChannels.pending_open_channels.length&&this.pendingChannels.pending_open_channels.length>0&&this.loadOpenChannelsTable(this.pendingChannels.pending_open_channels),this.pendingChannels.pending_force_closing_channels&&this.pendingChannels.pending_force_closing_channels.length&&this.pendingChannels.pending_force_closing_channels.length>0&&this.loadForceClosingChannelsTable(this.pendingChannels.pending_force_closing_channels),this.pendingChannels.pending_closing_channels&&this.pendingChannels.pending_closing_channels.length&&this.pendingChannels.pending_closing_channels.length>0&&this.loadClosingChannelsTable(this.pendingChannels.pending_closing_channels),this.pendingChannels.waiting_close_channels&&this.pendingChannels.waiting_close_channels.length&&this.pendingChannels.waiting_close_channels.length>0&&this.loadWaitClosingChannelsTable(this.pendingChannels.waiting_close_channels),this.logger.info(t)})}ngAfterViewInit(){this.pendingChannels.pending_open_channels&&this.pendingChannels.pending_open_channels.length&&this.pendingChannels.pending_open_channels.length>0&&this.loadOpenChannelsTable(this.pendingChannels.pending_open_channels),this.pendingChannels.pending_force_closing_channels&&this.pendingChannels.pending_force_closing_channels.length&&this.pendingChannels.pending_force_closing_channels.length>0&&this.loadForceClosingChannelsTable(this.pendingChannels.pending_force_closing_channels),this.pendingChannels.pending_closing_channels&&this.pendingChannels.pending_closing_channels.length&&this.pendingChannels.pending_closing_channels.length>0&&this.loadClosingChannelsTable(this.pendingChannels.pending_closing_channels),this.pendingChannels.waiting_close_channels&&this.pendingChannels.waiting_close_channels.length&&this.pendingChannels.waiting_close_channels.length>0&&this.loadWaitClosingChannelsTable(this.pendingChannels.waiting_close_channels)}onOpenClick(t){const a=JSON.parse(JSON.stringify(t,["commit_weight","confirmation_height","fee_per_kw","commit_fee"],2)),o=JSON.parse(JSON.stringify(t.channel,["remote_alias","channel_point","remote_balance","local_balance","remote_node_pub","capacity"],2)),s={};Object.assign(s,a,o),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Opening Channel Information",message:[[{key:"channel_point",value:s.channel_point,title:"Channel Point",width:100,type:l.Gi.STRING}],[{key:"remote_node_pub",value:s.remote_node_pub,title:"Peer Node Pubkey",width:100,type:l.Gi.STRING}],[{key:"remote_alias",value:s.remote_alias,title:"Peer Alias",width:100,type:l.Gi.STRING}],[{key:"capacity",value:s.capacity,title:"Capacity",width:25,type:l.Gi.NUMBER},{key:"confirmation_height",value:s.confirmation_height,title:"Confirmation Height",width:25,type:l.Gi.NUMBER},{key:"local_balance",value:s.local_balance,title:"Local Balance",width:25,type:l.Gi.NUMBER},{key:"remote_balance",value:s.remote_balance,title:"Remote Balance",width:25,type:l.Gi.NUMBER}],[{key:"fee_per_kw",value:s.fee_per_kw,title:"Fee/KW",width:25,type:l.Gi.NUMBER},{key:"commit_weight",value:s.commit_weight,title:"Commit Weight",width:25,type:l.Gi.NUMBER},{key:"commit_fee",value:s.commit_fee,title:"Commit Fee",width:50,type:l.Gi.NUMBER}]]}}}))}onBumpFee(t){this.store.dispatch((0,w.qR)({payload:{data:{pendingChannel:t,component:_l}}}))}onForceClosingClick(t){const a=JSON.parse(JSON.stringify(t,["closing_txid","limbo_balance","maturity_height","blocks_til_maturity","recovered_balance"],2)),o=JSON.parse(JSON.stringify(t.channel,["remote_alias","channel_point","remote_balance","local_balance","remote_node_pub","capacity"],2)),s={};Object.assign(s,a,o),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Force Closing Channel Information",message:[[{key:"closing_txid",value:s.closing_txid,title:"Closing Transaction ID",width:100,type:l.Gi.STRING}],[{key:"channel_point",value:s.channel_point,title:"Channel Point",width:100,type:l.Gi.STRING}],[{key:"remote_alias",value:s.remote_alias,title:"Peer Alias",width:25,type:l.Gi.STRING},{key:"remote_node_pub",value:s.remote_node_pub,title:"Peer Node Pubkey",width:75,type:l.Gi.STRING}],[{key:"capacity",value:s.capacity,title:"Capacity",width:25,type:l.Gi.NUMBER},{key:"limbo_balance",value:s.limbo_balance,title:"Limbo Balance",width:25,type:l.Gi.NUMBER},{key:"local_balance",value:s.local_balance,title:"Local Balance",width:25,type:l.Gi.NUMBER},{key:"remote_balance",value:s.remote_balance,title:"Remote Balance",width:25,type:l.Gi.NUMBER}],[{key:"maturity_height",value:s.maturity_height,title:"Maturity Height",width:25,type:l.Gi.NUMBER},{key:"blocks_til_maturity",value:s.blocks_til_maturity,title:"Blocks Till Maturity",width:25,type:l.Gi.NUMBER},{key:"recovered_balance",value:s.recovered_balance,title:"Recovered Balance",width:50,type:l.Gi.NUMBER}]]}}}))}onClosingClick(t){const a=JSON.parse(JSON.stringify(t,["closing_txid"],2)),o=JSON.parse(JSON.stringify(t.channel,["remote_alias","channel_point","remote_balance","local_balance","remote_node_pub","capacity"],2)),s={};Object.assign(s,a,o),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Closing Channel Information",message:[[{key:"closing_txid",value:s.closing_txid,title:"Closing Transaction ID",width:50,type:l.Gi.STRING}],[{key:"channel_point",value:s.channel_point,title:"Channel Point",width:100,type:l.Gi.STRING}],[{key:"remote_alias",value:s.remote_alias,title:"Peer Alias",width:25,type:l.Gi.STRING},{key:"remote_node_pub",value:s.remote_node_pub,title:"Peer Node Pubkey",width:75,type:l.Gi.STRING}],[{key:"capacity",value:s.capacity,title:"Capacity",width:25,type:l.Gi.NUMBER},{key:"local_balance",value:s.local_balance,title:"Local Balance",width:25,type:l.Gi.NUMBER},{key:"remote_balance",value:s.remote_balance,title:"Remote Balance",width:50,type:l.Gi.NUMBER}]]}}}))}onWaitClosingClick(t){const a=JSON.parse(JSON.stringify(t,["limbo_balance"],2)),o=JSON.parse(JSON.stringify(t.channel,["remote_alias","channel_point","remote_balance","local_balance","remote_node_pub","capacity"],2)),s=JSON.parse(JSON.stringify(t.commitments,["local_txid"],2)),u={};Object.assign(u,a,o,s),this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Wait Closing Channel Information",message:[[{key:"local_txid",value:u.local_txid,title:"Transaction ID",width:100,type:l.Gi.STRING}],[{key:"channel_point",value:u.channel_point,title:"Channel Point",width:100,type:l.Gi.STRING}],[{key:"remote_alias",value:u.remote_alias,title:"Peer Alias",width:25,type:l.Gi.STRING},{key:"remote_node_pub",value:u.remote_node_pub,title:"Peer Node Pubkey",width:75,type:l.Gi.STRING}],[{key:"capacity",value:u.capacity,title:"Capacity",width:25,type:l.Gi.NUMBER},{key:"limbo_balance",value:u.limbo_balance,title:"Limbo Balance",width:25,type:l.Gi.NUMBER},{key:"local_balance",value:u.local_balance,title:"Local Balance",width:25,type:l.Gi.NUMBER},{key:"remote_balance",value:u.remote_balance,title:"Remote Balance",width:25,type:l.Gi.NUMBER}]]}}}))}loadOpenChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?-1:1),this.pendingOpenChannelsLength=t.length?t.length:0,this.pendingOpenChannels=new r.by([...t]),this.pendingOpenChannels.sort=this.sort,this.pendingOpenChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.pendingOpenChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.logger.info(this.pendingOpenChannels)}loadForceClosingChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?-1:1),this.pendingForceClosingChannelsLength=t.length?t.length:0,this.pendingForceClosingChannels=new r.by([...t]),this.pendingForceClosingChannels.sort=this.sort,this.pendingForceClosingChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.pendingForceClosingChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.logger.info(this.pendingForceClosingChannels)}loadClosingChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?-1:1),this.pendingClosingChannelsLength=t.length?t.length:0,this.pendingClosingChannels=new r.by([...t]),this.pendingClosingChannels.sort=this.sort,this.pendingClosingChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.pendingClosingChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.logger.info(this.pendingClosingChannels)}loadWaitClosingChannelsTable(t){t.sort((a,o)=>a.active===o.active?0:o.active?-1:1),this.pendingWaitClosingChannelsLength=t.length?t.length:0,this.pendingWaitClosingChannels=new r.by([...t]),this.pendingWaitClosingChannels.sort=this.sort,this.pendingWaitClosingChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.pendingWaitClosingChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.logger.info(this.pendingWaitClosingChannels)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-pending-table"]],viewQuery:function(t,a){if(1&t&&e.Gf(Z.YE,5),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first)}},decls:121,vars:44,consts:[["fxLayout","column",1,"mb-2"],[1,"page-title"],["displayMode","flat",1,"mt-1"],["mode","indeterminate",4,"ngIf"],["fxLayout","column",1,"flat-expansion-panel"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","remote_alias"],["mat-sort-header","",4,"matHeaderCellDef"],[3,"ngStyle",4,"matCellDef"],["matColumnDef","commit_fee"],["fxLayoutAlign","end center","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","commit_weight"],["matColumnDef","capacity"],["matColumnDef","actions"],["fxLayoutAlign","end center","class","pl-3 pr-4",4,"matHeaderCellDef"],["fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_pending_open"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","","fxLayoutAlign","start center",3,"ngClass",4,"matFooterRowDef"],[4,"matHeaderRowDef"],["fxLayoutAlign","stretch stretch",4,"matRowDef","matRowDefColumns"],["mat-table","","matSort","",3,"dataSource","ngClass"],["matColumnDef","recovered_balance"],["matColumnDef","limbo_balance"],["fxLayoutAlign","end center","class","pl-4 pr-3",4,"matHeaderCellDef"],["fxLayoutAlign","end center","class","pl-4",4,"matCellDef"],["matColumnDef","no_pending_force_closing"],["class","pl-2","mat-sort-header","",4,"matHeaderCellDef"],["class","pl-2",3,"ngStyle",4,"matCellDef"],["matColumnDef","local_balance"],["matColumnDef","remote_balance"],["matColumnDef","no_pending_closing"],["matColumnDef","no_pending_wait_closing"],["mode","indeterminate"],["mat-sort-header",""],[3,"ngStyle"],["fxLayoutAlign","end center","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",1,"pl-3","pr-4"],["fxLayoutAlign","end center",1,"px-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","","fxLayoutAlign","start center",3,"ngClass"],["fxLayoutAlign","stretch stretch"],["fxLayoutAlign","end center",1,"pl-4","pr-3"],["fxLayoutAlign","end center",1,"pl-4"],["mat-stroked-button","","color","primary","type","button","tabindex","2",3,"click"],["mat-sort-header","",1,"pl-2"],[1,"pl-2",3,"ngStyle"],["mat-stroked-button","","color","primary","type","button","tabindex","3",3,"click"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"span",1),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"mat-accordion",2),e.YNc(5,hl,1,0,"mat-progress-bar",3),e.TgZ(6,"mat-expansion-panel",4)(7,"mat-expansion-panel-header")(8,"mat-panel-title"),e._uU(9),e.qZA()(),e.TgZ(10,"div",5),e.YNc(11,gl,1,0,"mat-progress-bar",3),e.TgZ(12,"table",6,7),e.ynx(14,8),e.YNc(15,fl,2,0,"mat-header-cell",9),e.YNc(16,Cl,2,4,"mat-cell",10),e.BQk(),e.ynx(17,11),e.YNc(18,xl,2,0,"mat-header-cell",12),e.YNc(19,yl,3,3,"mat-cell",13),e.BQk(),e.ynx(20,14),e.YNc(21,Tl,2,0,"mat-header-cell",12),e.YNc(22,bl,3,3,"mat-cell",13),e.BQk(),e.ynx(23,15),e.YNc(24,vl,2,0,"mat-header-cell",12),e.YNc(25,Zl,3,3,"mat-cell",13),e.BQk(),e.ynx(26,16),e.YNc(27,wl,2,0,"mat-header-cell",17),e.YNc(28,Al,8,0,"mat-cell",18),e.BQk(),e.ynx(29,19),e.YNc(30,Fl,4,3,"td",20),e.BQk(),e.YNc(31,Nl,1,3,"tr",21),e.YNc(32,ql,1,0,"mat-header-row",22),e.YNc(33,Ul,1,0,"mat-row",23),e.qZA()()(),e.YNc(34,Ol,1,0,"mat-progress-bar",3),e.TgZ(35,"mat-expansion-panel",4)(36,"mat-expansion-panel-header")(37,"mat-panel-title"),e._uU(38),e.qZA()(),e.TgZ(39,"div",5)(40,"table",24,7),e.ynx(42,8),e.YNc(43,Rl,2,0,"mat-header-cell",9),e.YNc(44,Il,2,4,"mat-cell",10),e.BQk(),e.ynx(45,25),e.YNc(46,Ml,2,0,"mat-header-cell",12),e.YNc(47,Dl,3,3,"mat-cell",13),e.BQk(),e.ynx(48,26),e.YNc(49,Pl,2,0,"mat-header-cell",12),e.YNc(50,Jl,3,3,"mat-cell",13),e.BQk(),e.ynx(51,15),e.YNc(52,El,2,0,"mat-header-cell",12),e.YNc(53,Ql,3,3,"mat-cell",13),e.BQk(),e.ynx(54,16),e.YNc(55,Yl,2,0,"mat-header-cell",27),e.YNc(56,Hl,3,0,"mat-cell",28),e.BQk(),e.ynx(57,29),e.YNc(58,zl,4,3,"td",20),e.BQk(),e.YNc(59,Wl,1,3,"tr",21),e.YNc(60,Xl,1,0,"mat-header-row",22),e.YNc(61,$l,1,0,"mat-row",23),e.qZA()()(),e.YNc(62,jl,1,0,"mat-progress-bar",3),e.TgZ(63,"mat-expansion-panel",4)(64,"mat-expansion-panel-header")(65,"mat-panel-title"),e._uU(66),e.qZA()(),e.TgZ(67,"div",5)(68,"table",24,7),e.ynx(70,8),e.YNc(71,Kl,2,0,"mat-header-cell",30),e.YNc(72,er,2,4,"mat-cell",31),e.BQk(),e.ynx(73,32),e.YNc(74,tr,2,0,"mat-header-cell",12),e.YNc(75,nr,3,3,"mat-cell",13),e.BQk(),e.ynx(76,33),e.YNc(77,ar,2,0,"mat-header-cell",12),e.YNc(78,ir,3,3,"mat-cell",13),e.BQk(),e.ynx(79,15),e.YNc(80,or,2,0,"mat-header-cell",12),e.YNc(81,sr,3,3,"mat-cell",13),e.BQk(),e.ynx(82,16),e.YNc(83,lr,2,0,"mat-header-cell",27),e.YNc(84,rr,3,0,"mat-cell",28),e.BQk(),e.ynx(85,34),e.YNc(86,mr,4,3,"td",20),e.BQk(),e.YNc(87,dr,1,3,"tr",21),e.YNc(88,_r,1,0,"mat-header-row",22),e.YNc(89,hr,1,0,"mat-row",23),e.qZA()()(),e.YNc(90,gr,1,0,"mat-progress-bar",3),e.TgZ(91,"mat-expansion-panel",4)(92,"mat-expansion-panel-header")(93,"mat-panel-title"),e._uU(94),e.qZA()(),e.TgZ(95,"div",5)(96,"table",24,7),e.ynx(98,8),e.YNc(99,fr,2,0,"mat-header-cell",30),e.YNc(100,Cr,2,4,"mat-cell",31),e.BQk(),e.ynx(101,26),e.YNc(102,xr,2,0,"mat-header-cell",12),e.YNc(103,yr,3,3,"mat-cell",13),e.BQk(),e.ynx(104,32),e.YNc(105,Tr,2,0,"mat-header-cell",12),e.YNc(106,br,3,3,"mat-cell",13),e.BQk(),e.ynx(107,33),e.YNc(108,vr,2,0,"mat-header-cell",12),e.YNc(109,Zr,3,3,"mat-cell",13),e.BQk(),e.ynx(110,15),e.YNc(111,wr,2,0,"mat-header-cell",12),e.YNc(112,Ar,3,3,"mat-cell",13),e.BQk(),e.ynx(113,16),e.YNc(114,Sr,2,0,"mat-header-cell",27),e.YNc(115,Lr,3,0,"mat-cell",28),e.BQk(),e.ynx(116,35),e.YNc(117,qr,4,3,"td",20),e.BQk(),e.YNc(118,Or,1,3,"tr",21),e.YNc(119,Rr,1,0,"mat-header-row",22),e.YNc(120,Ir,1,0,"mat-row",23),e.qZA()()()()()),2&t&&(e.xp6(2),e.hij("Total Limbo Balance: ",e.lcZ(3,30,a.pendingChannels.total_limbo_balance)," Sats"),e.xp6(3),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(4),e.hij("Pending Open (",a.pendingOpenChannelsLength,")"),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.pendingOpenChannels)("ngClass",e.VKq(32,de,""!==a.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(34,Mr)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedOpenColumns),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedOpenColumns),e.xp6(1),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(4),e.hij("Pending Force Closing (",a.pendingForceClosingChannelsLength,")"),e.xp6(2),e.Q6J("dataSource",a.pendingForceClosingChannels)("ngClass",e.VKq(35,de,""!==a.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(37,Dr)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedForceClosingColumns),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedForceClosingColumns),e.xp6(1),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(4),e.hij("Pending Closing (",a.pendingClosingChannelsLength,")"),e.xp6(2),e.Q6J("dataSource",a.pendingClosingChannels)("ngClass",e.VKq(38,de,""!==a.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(40,Pr)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedClosingColumns),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedClosingColumns),e.xp6(1),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(4),e.hij("Waiting Close (",a.pendingWaitClosingChannelsLength,")"),e.xp6(2),e.Q6J("dataSource",a.pendingWaitClosingChannels)("ngClass",e.VKq(41,de,""!==a.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(43,Jr)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedWaitClosingColumns),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedWaitClosingColumns))},directives:[d.xw,H.pp,p.O5,P.pW,H.ib,H.yz,H.yK,d.Wh,d.yH,Q.$V,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,k.lW],pipes:[p.JJ],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}tr.mat-footer-row[_ngcontent-%COMP%] td.mat-footer-cell[_ngcontent-%COMP%]{border-bottom:none}"]}),n})();function Qr(n,i){1&n&&e._UZ(0,"mat-progress-bar",27)}function Yr(n,i){1&n&&(e.TgZ(0,"th",28),e._uU(1," Close Type "),e.qZA())}function Hr(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"div",30)(2,"mat-icon",31),e._uU(3,"info_outline"),e.qZA(),e._uU(4),e.qZA()()),2&n){const t=i.$implicit,a=e.oxw();e.xp6(2),e.Q6J("matTooltip",a.channelClosureType[t.close_type].tooltip),e.xp6(2),e.hij(" ",a.channelClosureType[t.close_type].name," ")}}function Br(n,i){1&n&&(e.TgZ(0,"th",28),e._uU(1," Peer "),e.qZA())}const Vr=function(n){return{"max-width":n}};function Gr(n,i){if(1&n&&(e.TgZ(0,"td",32),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,Vr,a.screenSize===a.screenSizeEnum.XS?"10rem":"20rem")),e.xp6(1),e.hij(" ",t.remote_alias," ")}}function zr(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Capacity "),e.qZA())}function Wr(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,t.capacity)," ")}}function Xr(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Close Height "),e.qZA())}function $r(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,t.close_height)," ")}}function jr(n,i){1&n&&(e.TgZ(0,"th",33),e._uU(1," Settled Balance "),e.qZA())}function Kr(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",34),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,t.settled_balance)," ")}}function ec(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",35)(1,"div",36)(2,"mat-select",37),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",38),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function tc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",39)(1,"span",34)(2,"button",40),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onClosedChannelClick(u,o)}),e._uU(3,"View Info"),e.qZA()()()}}function nc(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No closed channel available."),e.qZA())}function ac(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting closed channels..."),e.qZA())}function ic(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function oc(n,i){if(1&n&&(e.TgZ(0,"td",41),e.YNc(1,nc,2,0,"p",42),e.YNc(2,ac,2,0,"p",42),e.YNc(3,ic,2,1,"p",42),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.closedChannels&&t.closedChannels.data)||(null==t.closedChannels||null==t.closedChannels.data?null:t.closedChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.closedChannels&&t.closedChannels.data)||(null==t.closedChannels||null==t.closedChannels.data?null:t.closedChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.closedChannels&&t.closedChannels.data)||(null==t.closedChannels||null==t.closedChannels.data?null:t.closedChannels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const sc=function(n){return{"display-none":n}};function lc(n,i){if(1&n&&e._UZ(0,"tr",43),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,sc,(null==t.closedChannels?null:t.closedChannels.data)&&(null==t.closedChannels||null==t.closedChannels.data?null:t.closedChannels.data.length)>0))}}function rc(n,i){1&n&&e._UZ(0,"tr",44)}function cc(n,i){1&n&&e._UZ(0,"tr",45)}const uc=function(n){return{"error-border":n,"overflow-auto":!0}},pc=function(){return["no_closed_channel"]};let mc=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.commonService=o,this.channelClosureType=l.HW,this.faHistory=y.qO$,this.displayedColumns=[],this.closedChannelsData=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unsub=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["remote_alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["close_type","remote_alias","settled_balance","actions"]):(this.flgSticky=!0,this.displayedColumns=["close_type","remote_alias","capacity","close_height","settled_balance","actions"])}ngOnInit(){this.store.select(C.P2).pipe((0,_.R)(this.unsub[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.closedChannelsData=t.closedChannels,this.closedChannelsData.length>0&&this.loadClosedChannelsTable(this.closedChannelsData),this.logger.info(t)})}ngAfterViewInit(){this.closedChannelsData.length>0&&this.loadClosedChannelsTable(this.closedChannelsData)}applyFilter(){this.closedChannels.filter=this.selFilter.trim().toLowerCase()}onClosedChannelClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Closed Channel Information",message:[[{key:"close_type",value:this.channelClosureType[t.close_type].name,title:"Close Type",width:30,type:l.Gi.STRING},{key:"settled_balance",value:t.settled_balance,title:"Settled Balance",width:30,type:l.Gi.NUMBER},{key:"time_locked_balance",value:t.time_locked_balance,title:"Time Locked Balance",width:40,type:l.Gi.NUMBER}],[{key:"chan_id",value:t.chan_id,title:"Channel ID",width:30},{key:"capacity",value:t.capacity,title:"Capacity",width:30,type:l.Gi.NUMBER},{key:"close_height",value:t.close_height,title:"Close Height",width:40,type:l.Gi.NUMBER}],[{key:"remote_alias",value:t.remote_alias,title:"Peer Alias",width:30},{key:"remote_pubkey",value:t.remote_pubkey,title:"Peer Public Key",width:70}],[{key:"channel_point",value:t.channel_point,title:"Channel Point",width:100}],[{key:"closing_tx_hash",value:t.closing_tx_hash,title:"Closing Transaction Hash",width:100,type:l.Gi.STRING}]]}}}))}loadClosedChannelsTable(t){this.closedChannels=new r.by([...t]),this.closedChannels.sort=this.sort,this.closedChannels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.closedChannels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.closedChannels.paginator=this.paginator,this.applyFilter(),this.logger.info(this.closedChannels)}onDownloadCSV(){this.closedChannels.data&&this.closedChannels.data.length>0&&this.commonService.downloadFile(this.closedChannels.data,"Closed-channels")}ngOnDestroy(){this.unsub.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-closed-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:33,vars:14,consts:[["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","close_type"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","remote_alias"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","capacity"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","close_height"],["matColumnDef","settled_balance"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["matColumnDef","no_closed_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayout","row","fxLayoutAlign","start center"],[1,"info-icon","info-icon-text",3,"matTooltip"],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3)(4,"input",4),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(5,"div",5),e.YNc(6,Qr,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,Yr,2,0,"th",10),e.YNc(11,Hr,5,2,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,Br,2,0,"th",10),e.YNc(14,Gr,2,4,"td",13),e.BQk(),e.ynx(15,14),e.YNc(16,zr,2,0,"th",15),e.YNc(17,Wr,4,3,"td",11),e.BQk(),e.ynx(18,16),e.YNc(19,Xr,2,0,"th",15),e.YNc(20,$r,4,3,"td",11),e.BQk(),e.ynx(21,17),e.YNc(22,jr,2,0,"th",15),e.YNc(23,Kr,4,3,"td",11),e.BQk(),e.ynx(24,18),e.YNc(25,ec,6,0,"th",19),e.YNc(26,tc,4,0,"td",20),e.BQk(),e.ynx(27,21),e.YNc(28,oc,4,3,"td",22),e.BQk(),e.YNc(29,lc,1,3,"tr",23),e.YNc(30,rc,1,0,"tr",24),e.YNc(31,cc,1,0,"tr",25),e.qZA()(),e._UZ(32,"mat-paginator",26),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.closedChannels)("ngClass",e.VKq(11,uc,""!==a.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(13,pc)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.Wh,d.yH,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,K.Hw,X.gM,p.PC,S.Zl,R.gD,R.$L,Y.ey,k.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-close_type[_ngcontent-%COMP%]{flex:0 0 16%;min-width:5rem}.mat-column-remote_alias[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function dc(n,i){1&n&&e._UZ(0,"mat-progress-bar",27)}function _c(n,i){1&n&&(e.TgZ(0,"th",28),e._uU(1,"Amount (Sats)"),e.qZA())}function hc(n,i){if(1&n&&(e.TgZ(0,"span",33),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.lcZ(2,1,null==t?null:t.amount)," ")}}function gc(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,hc,3,3,"span",32),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function fc(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",30),e._uU(2),e.qZA(),e.YNc(3,gc,2,1,"span",31),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" Active HTLCs: ",null==t||null==t.pending_htlcs?null:t.pending_htlcs.length," "),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function Cc(n,i){1&n&&(e.TgZ(0,"th",28),e._uU(1,"Alias/Incoming"),e.qZA())}function xc(n,i){if(1&n&&(e.TgZ(0,"span",30),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null!=t&&t.incoming?"Yes":"No"," ")}}function yc(n,i){if(1&n&&(e.ynx(0),e.YNc(1,xc,2,1,"span",34),e.BQk()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function Tc(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",30),e._uU(2),e.qZA(),e.YNc(3,yc,2,1,"ng-container",31),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(null==t?null:t.remote_alias),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function bc(n,i){1&n&&(e.TgZ(0,"th",35)(1,"span",36),e._uU(2,"Expiration Height"),e.qZA()())}function vc(n,i){if(1&n&&(e.TgZ(0,"span",36),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",e.xi3(2,1,null==t?null:t.expiration_height,"1.0-0")," ")}}function Zc(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,vc,3,4,"span",37),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function wc(n,i){if(1&n&&(e.TgZ(0,"td",29)(1,"span",36),e._uU(2),e.qZA(),e.YNc(3,Zc,2,1,"span",31),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(" "),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function Ac(n,i){1&n&&(e.TgZ(0,"th",38)(1,"span",36),e._uU(2,"Hash Lock"),e.qZA()())}function Sc(n,i){if(1&n&&(e.TgZ(0,"span",36),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.hash_lock," ")}}function Lc(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Sc,2,1,"span",37),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function kc(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",36),e._uU(2),e.qZA(),e.YNc(3,Lc,2,1,"span",31),e.qZA()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(" "),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function Fc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",40)(1,"div",41)(2,"mat-select",42),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",43),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function Nc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",45)(1,"button",48),e.NdJ("click",function(){const s=e.CHM(t).$implicit,u=e.oxw(2).$implicit;return e.oxw().onHTLCClick(s,u)}),e._uU(2),e.qZA()()}if(2&n){const t=i.index;e.xp6(2),e.hij("View ",t+1,"")}}function qc(n,i){if(1&n&&(e.TgZ(0,"div"),e.YNc(1,Nc,3,1,"div",47),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Q6J("ngForOf",null==t?null:t.pending_htlcs)}}function Uc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",44)(1,"span",45)(2,"button",46),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return s.is_expanded=!s.is_expanded}),e._uU(3),e.qZA()(),e.YNc(4,qc,2,1,"div",31),e.qZA()}if(2&n){const t=i.$implicit;e.xp6(3),e.Oqu(t.is_expanded?"Hide":"Show"),e.xp6(1),e.Q6J("ngIf",t.is_expanded)}}function Oc(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No active htlc available."),e.qZA())}function Rc(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting active htlcs..."),e.qZA())}function Ic(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Mc(n,i){if(1&n&&(e.TgZ(0,"td",49),e.YNc(1,Oc,2,0,"p",31),e.YNc(2,Rc,2,0,"p",31),e.YNc(3,Ic,2,1,"p",31),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Dc=function(n){return{"display-none":n}};function Pc(n,i){if(1&n&&e._UZ(0,"tr",50),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Dc,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function Jc(n,i){1&n&&e._UZ(0,"tr",51)}function Ec(n,i){1&n&&e._UZ(0,"tr",52)}const Qc=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Yc=function(){return["no_channel"]};let Hc=(()=>{class n{constructor(t,a,o){this.logger=t,this.commonService=a,this.store=o,this.channelsJSONArr=[],this.displayedColumns=[],this.htlcColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["amount","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["amount","incoming","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["amount","incoming","expiration_height","actions"]):(this.flgSticky=!0,this.displayedColumns=["amount","incoming","expiration_height","hash_lock","actions"])}ngOnInit(){this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.channelsJSONArr=t.channels.filter(a=>a.pending_htlcs&&a.pending_htlcs.length>0)||[],this.loadHTLCsTable(this.channelsJSONArr),this.logger.info(t)})}ngAfterViewInit(){this.loadHTLCsTable(this.channelsJSONArr)}onHTLCClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"HTLC Information",message:[[{key:"remote_alias",value:a.remote_alias,title:"Alias",width:100,type:l.Gi.STRING}],[{key:"amount",value:t.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER},{key:"incoming",value:t.incoming?"Yes":"No",title:"Incoming",width:50,type:l.Gi.STRING}],[{key:"expiration_height",value:t.expiration_height,title:"Expiration Height",width:50,type:l.Gi.NUMBER},{key:"hash_lock",value:t.hash_lock,title:"Hash Lock",width:50,type:l.Gi.STRING}]]}}}))}onChannelClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{channel:t,showCopy:!0,component:xe}}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}loadHTLCsTable(t){this.channels=new r.by(t?[...t]:[]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(a,o)=>{switch(o){case"amount":return this.commonService.sortByKey(a.pending_htlcs,o,"number",this.sort.direction),a.pending_htlcs&&a.pending_htlcs.length?a.pending_htlcs.length:null;case"incoming":return this.commonService.sortByKey(a.pending_htlcs,o,"boolean",this.sort.direction),a.remote_alias?a.remote_alias:a.remote_pubkey?a.remote_pubkey:null;case"expiration_height":case"hash_lock":return this.commonService.sortByKey(a.pending_htlcs,o,"number",this.sort.direction),a;default:return a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null}},this.channels.paginator=this.paginator,this.channels.filterPredicate=(a,o)=>((a.remote_alias?a.remote_alias.toLowerCase():"")+a.pending_htlcs.map(u=>JSON.stringify(u)+(u.incoming?"yes":"no"))).includes(o),this.applyFilter()}onDownloadCSV(){this.channels.data&&this.channels.data.length>0&&this.commonService.downloadFile(this.flattenHTLCs(),"ActiveHTLCs")}flattenHTLCs(){return JSON.parse(JSON.stringify(this.channels.data)).reduce((o,s)=>o.concat(s.pending_htlcs?s.pending_htlcs:s),[])}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-active-htlcs-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("HTLCs")}])],decls:30,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","incoming"],["matColumnDef","expiration_height"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","hash_lock"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pl-3 htlc-row-span",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-2",4,"matHeaderCellDef"],["mat-cell","","class","px-2",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["fxLayoutAlign","start center",1,"htlc-row-span"],[4,"ngIf"],["fxLayoutAlign","start center","class","htlc-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"htlc-row-span","pl-3"],["fxLayoutAlign","start center","class","htlc-row-span",4,"ngFor","ngForOf"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center",1,"htlc-row-span"],["fxLayoutAlign","end center","class","htlc-row-span",4,"ngFor","ngForOf"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pl-3","htlc-row-span"],["mat-cell","",1,"pl-3"],["mat-header-cell","",1,"px-2"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","",1,"px-2"],["fxLayoutAlign","end center"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-htlc-expand",3,"click"],["fxLayoutAlign","end center",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-htlc-info",3,"click"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"div",2),e.TgZ(3,"mat-form-field",3)(4,"input",4),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(5,"div",5),e.YNc(6,dc,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,_c,2,0,"th",10),e.YNc(11,fc,4,2,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,Cc,2,0,"th",10),e.YNc(14,Tc,4,2,"td",11),e.BQk(),e.ynx(15,13),e.YNc(16,bc,3,0,"th",14),e.YNc(17,wc,4,2,"td",11),e.BQk(),e.ynx(18,15),e.YNc(19,Ac,3,0,"th",16),e.YNc(20,kc,4,2,"td",17),e.BQk(),e.ynx(21,18),e.YNc(22,Fc,6,0,"th",19),e.YNc(23,Uc,5,2,"td",20),e.BQk(),e.ynx(24,21),e.YNc(25,Mc,4,3,"td",22),e.BQk(),e.YNc(26,Pc,1,3,"tr",23),e.YNc(27,Jc,1,0,"tr",24),e.YNc(28,Ec,1,0,"tr",25),e.qZA()(),e._UZ(29,"mat-paginator",26),e.qZA()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.channels)("ngClass",e.VKq(11,Qc,""!==a.errorMessage)),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(13,Yc)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.Wh,d.yH,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.sg,R.gD,R.$L,Y.ey,k.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-amount[_ngcontent-%COMP%], .mat-column-expiration_height[_ngcontent-%COMP%]{flex:0 0 30%;width:30%}.mat-column-incoming[_ngcontent-%COMP%], .mat-column-hash_lock[_ngcontent-%COMP%]{flex:0 0 25%;width:25%;text-overflow:ellipsis}.htlc-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .btn-htlc-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-actions[_ngcontent-%COMP%] .btn-htlc-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}"]}),n})();function Bc(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Wallet password is required."),e.qZA())}let Vc=(()=>{class n{constructor(t){this.store=t,this.walletPassword=""}ngOnInit(){this.walletPassword=""}onUnlockWallet(){if(!this.walletPassword)return!0;this.store.dispatch((0,v.xG)({payload:{pwd:window.btoa(this.walletPassword)}}))}resetData(){this.walletPassword=""}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-unlock-wallet"]],decls:12,vars:2,consts:[["fxLayout","column",1,"padding-gap","mb-2"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between"],["fxFlex","100","fxLayoutAlign","start"],["autoFocus","","matInput","","type","password","placeholder","Password","name","walletPassword","tabindex","1","required","",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","3",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"form",1)(2,"mat-form-field",2)(3,"input",3),e.NdJ("ngModelChange",function(s){return a.walletPassword=s}),e.qZA(),e.TgZ(4,"mat-hint"),e._uU(5,"Enter Wallet Password"),e.qZA(),e.YNc(6,Bc,2,0,"mat-error",4),e.qZA(),e.TgZ(7,"div",5)(8,"button",6),e.NdJ("click",function(){return a.resetData()}),e._uU(9,"Clear Field"),e.qZA(),e.TgZ(10,"button",7),e.NdJ("click",function(){return a.onUnlockWallet()}),e._uU(11,"Unlock Wallet"),e.qZA()()()()),2&t&&(e.xp6(3),e.Q6J("ngModel",a.walletPassword),e.xp6(3),e.Q6J("ngIf",!a.walletPassword))},directives:[d.xw,c._Y,c.JL,c.F,d.Wh,f.KE,d.yH,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,f.bx,p.O5,f.TO,k.lW],styles:[""]}),n})();var Gc=h(1555);function zc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"form",4)(2,"div",5),e._uU(3,"Warning: Your connection is unsecure, it's not safe to generate private keys over this connection.Are you sure you want to proceed?"),e.qZA(),e.TgZ(4,"div",6)(5,"button",7),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.proceed=!1,o.warnRes=!0}),e._uU(6,"Do Not Proceed"),e.qZA(),e.TgZ(7,"button",8),e.NdJ("click",function(){e.CHM(t);const o=e.oxw();return o.proceed=!0,o.warnRes=!0}),e._uU(8,"Proceed"),e.qZA()()()()}}function Wc(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",9)(1,"div",10),e._uU(2,"Please re-configure & re-start RTL after securing your LND connction. You can close this window now."),e.qZA(),e.TgZ(3,"div",6)(4,"button",11),e.NdJ("click",function(){return e.CHM(t),e.oxw().warnRes=!1}),e._uU(5,"Go Back"),e.qZA()()()}}function Xc(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Password is required."),e.qZA())}function $c(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Password must be at least 8 characters in length."),e.qZA())}function jc(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Confirm password is required."),e.qZA())}function Kc(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Confirm password must be at least 8 characters in length."),e.qZA())}function e1(n,i){1&n&&(e.TgZ(0,"div",41)(1,"mat-icon",42),e._uU(2,"cancel"),e.qZA(),e._uU(3,"Passwords do not match. "),e.qZA())}function t1(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Cipher seed is required."),e.qZA())}function n1(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid Cipher. Enter comma separated 24 words cipher seed."),e.qZA())}function a1(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Passphrase is required."),e.qZA())}function i1(n,i){1&n&&(e.TgZ(0,"mat-icon"),e._uU(1,"vpn_key"),e.qZA())}function o1(n,i){1&n&&(e.TgZ(0,"mat-icon"),e._uU(1,"swap_calls"),e.qZA())}function s1(n,i){1&n&&(e.TgZ(0,"mat-icon"),e._uU(1,"fingerprint"),e.qZA())}function l1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-vertical-stepper",12,13)(2,"mat-step",14)(3,"form",15)(4,"mat-form-field",16),e._UZ(5,"input",17),e.TgZ(6,"mat-hint"),e._uU(7,"Enter Wallet Password"),e.qZA(),e.YNc(8,Xc,2,0,"mat-error",1),e.YNc(9,$c,2,0,"mat-error",1),e.qZA(),e.TgZ(10,"mat-form-field",16),e._UZ(11,"input",18),e.TgZ(12,"mat-hint"),e._uU(13,"Confirm Wallet Password"),e.qZA(),e.YNc(14,jc,2,0,"mat-error",1),e.YNc(15,Kc,2,0,"mat-error",1),e.qZA(),e.YNc(16,e1,4,0,"div",19),e.TgZ(17,"div",20)(18,"button",21),e._uU(19,"Next"),e.qZA()()()(),e.TgZ(20,"mat-step",22)(21,"form",23)(22,"div",24)(23,"mat-slide-toggle",25),e._uU(24,"Existing Cipher"),e.qZA(),e.TgZ(25,"mat-form-field",26),e._UZ(26,"input",27),e.TgZ(27,"mat-hint"),e._uU(28,"Cipher Seed"),e.qZA(),e.YNc(29,t1,2,0,"mat-error",1),e.YNc(30,n1,2,0,"mat-error",1),e.qZA()(),e.TgZ(31,"div",28)(32,"button",29),e._uU(33,"Back"),e.qZA(),e.TgZ(34,"button",30),e._uU(35,"Next"),e.qZA()()()(),e.TgZ(36,"mat-step",31)(37,"form",23)(38,"div",24)(39,"mat-slide-toggle",32),e._uU(40,"Existing Passphrase"),e.qZA(),e.TgZ(41,"mat-form-field",33),e._UZ(42,"input",34),e.TgZ(43,"mat-hint"),e._uU(44,"Enter Passphrase"),e.qZA(),e.YNc(45,a1,2,0,"mat-error",1),e.qZA()(),e.TgZ(46,"div",28)(47,"button",35),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(48,"Clear"),e.qZA(),e.TgZ(49,"button",36),e._uU(50,"Back"),e.qZA(),e.TgZ(51,"button",37),e.NdJ("click",function(){return e.CHM(t),e.oxw().onInitWallet()}),e._uU(52,"Initialize Wallet"),e.qZA()()()(),e.YNc(53,i1,2,0,"ng-template",38),e.YNc(54,o1,2,0,"ng-template",39),e.YNc(55,s1,2,0,"ng-template",40),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("linear",!0),e.xp6(2),e.Q6J("stepControl",t.passwordFormGroup),e.xp6(1),e.Q6J("formGroup",t.passwordFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.passwordFormGroup.controls.initWalletPassword.errors?null:t.passwordFormGroup.controls.initWalletPassword.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.passwordFormGroup.controls.initWalletPassword.errors?null:t.passwordFormGroup.controls.initWalletPassword.errors.minlength),e.xp6(5),e.Q6J("ngIf",null==t.passwordFormGroup.controls.initWalletConfirmPassword.errors?null:t.passwordFormGroup.controls.initWalletConfirmPassword.errors.required),e.xp6(1),e.Q6J("ngIf",null==t.passwordFormGroup.controls.initWalletConfirmPassword.errors?null:t.passwordFormGroup.controls.initWalletConfirmPassword.errors.minlength),e.xp6(1),e.Q6J("ngIf",(null==t.passwordFormGroup.errors?null:t.passwordFormGroup.errors.unmatchedPasswords)&&(t.passwordFormGroup.controls.initWalletPassword.touched||t.passwordFormGroup.controls.initWalletPassword.dirty)&&(t.passwordFormGroup.controls.initWalletConfirmPassword.touched||t.passwordFormGroup.controls.initWalletConfirmPassword.dirty)),e.xp6(4),e.Q6J("stepControl",t.cipherFormGroup),e.xp6(1),e.Q6J("formGroup",t.cipherFormGroup),e.xp6(2),e.Q6J("labelPosition","before"),e.xp6(6),e.Q6J("ngIf",null==t.cipherFormGroup.controls.cipherSeed.errors?null:t.cipherFormGroup.controls.cipherSeed.errors.required),e.xp6(1),e.Q6J("ngIf",!(null!=t.cipherFormGroup.controls.cipherSeed.errors&&t.cipherFormGroup.controls.cipherSeed.errors.required)&&(null==t.cipherFormGroup.controls.cipherSeed.errors?null:t.cipherFormGroup.controls.cipherSeed.errors.invalidCipher)),e.xp6(6),e.Q6J("stepControl",t.passphraseFormGroup),e.xp6(1),e.Q6J("formGroup",t.passphraseFormGroup),e.xp6(2),e.Q6J("labelPosition","before"),e.xp6(6),e.Q6J("ngIf",null==t.passphraseFormGroup.controls.passphrase.errors?null:t.passphraseFormGroup.controls.passphrase.errors.required)}}function r1(n,i){if(1&n&&(e.TgZ(0,"span",48),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t)}}function c1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"form",4)(2,"div",43),e._uU(3,"YOU MUST WRITE DOWN THIS SEED TO BE ABLE TO RESTORE THE WALLET!"),e.qZA(),e.TgZ(4,"div",44),e.YNc(5,r1,2,1,"span",45),e.qZA(),e.TgZ(6,"div",46),e._uU(7,"Wallet initialization is done."),e.qZA(),e.TgZ(8,"div",46),e._uU(9,"The node will be usable only after LND has synced completely with the network."),e.qZA(),e.TgZ(10,"div",46),e._uU(11,"Click continue only after writing down the seed."),e.qZA(),e.TgZ(12,"div",6)(13,"button",47),e.NdJ("click",function(){return e.CHM(t),e.oxw().onGoToHome()}),e._uU(14,"Go To Home"),e.qZA()()()()}if(2&n){const t=e.oxw();e.xp6(5),e.Q6J("ngForOf",t.genSeedResponse)}}function u1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"form",4)(2,"div",46),e._uU(3,"Something went wrong! Unable to initialize wallet!"),e.qZA(),e.TgZ(4,"div",6)(5,"button",49),e.NdJ("click",function(){return e.CHM(t),e.oxw().resetData()}),e._uU(6,"Restart"),e.qZA()()()()}}function p1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div")(1,"form",4)(2,"div",46),e._uU(3,"Wallet recovery is done."),e.qZA(),e.TgZ(4,"div",46),e._uU(5,"The node will be usable only after LND has synced completely with the network."),e.qZA(),e.TgZ(6,"div",6)(7,"button",50),e.NdJ("click",function(){return e.CHM(t),e.oxw().onGoToHome()}),e._uU(8,"Go To Home"),e.qZA()()()()}}function m1(n){const i=n.get("initWalletPassword"),t=n.get("initWalletConfirmPassword");return i&&t&&i.value!==t.value?{unmatchedPasswords:!0}:null}function d1(n){const i=n.value.toString().trim().split(",")||[];return i&&24!==i.length?{invalidCipher:!0}:null}let _1=(()=>{class n{constructor(t,a,o){this.store=t,this.formBuilder=a,this.lndEffects=o,this.insecureLND=!1,this.genSeedResponse=[],this.initWalletResponse="",this.proceed=!0,this.warnRes=!1,this.unsubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.passwordFormGroup=this.formBuilder.group({initWalletPassword:["",[c.kI.required,c.kI.minLength(8)]],initWalletConfirmPassword:["",[c.kI.required,c.kI.minLength(8)]]},{validators:m1}),this.cipherFormGroup=this.formBuilder.group({existingCipher:[!1],cipherSeed:[{value:"",disabled:!0},[d1]]}),this.passphraseFormGroup=this.formBuilder.group({enterPassphrase:[!1],passphrase:[{value:"",disabled:!0}]}),this.cipherFormGroup.controls.existingCipher.valueChanges.pipe((0,_.R)(this.unsubs[0])).subscribe(t=>{t?(this.cipherFormGroup.controls.cipherSeed.setValue(""),this.cipherFormGroup.controls.cipherSeed.enable()):(this.cipherFormGroup.controls.cipherSeed.setValue(""),this.cipherFormGroup.controls.cipherSeed.disable())}),this.passphraseFormGroup.controls.enterPassphrase.valueChanges.pipe((0,_.R)(this.unsubs[1])).subscribe(t=>{t?(this.passphraseFormGroup.controls.passphrase.setValue(""),this.passphraseFormGroup.controls.passphrase.enable()):(this.passphraseFormGroup.controls.passphrase.setValue(""),this.passphraseFormGroup.controls.passphrase.disable())}),this.insecureLND=!window.location.protocol.includes("https:"),this.lndEffects.initWalletRes.pipe((0,_.R)(this.unsubs[2])).subscribe(t=>{this.initWalletResponse=t}),this.lndEffects.genSeedResponse.pipe((0,_.R)(this.unsubs[3])).subscribe(t=>{this.genSeedResponse=t,this.store.dispatch((0,v.y2)(this.passphraseFormGroup.controls.enterPassphrase.value?{payload:{pwd:window.btoa(this.passwordFormGroup.controls.initWalletPassword.value),cipher:this.genSeedResponse,passphrase:window.btoa(this.passphraseFormGroup.controls.passphrase.value)}}:{payload:{pwd:window.btoa(this.passwordFormGroup.controls.initWalletPassword.value),cipher:this.genSeedResponse}}))})}onInitWallet(){if(this.passwordFormGroup.invalid||this.cipherFormGroup.invalid||this.passphraseFormGroup.invalid)return!0;if(this.cipherFormGroup.controls.existingCipher.value){const t=this.cipherFormGroup.controls.cipherSeed.value.toString().trim().split(",");this.store.dispatch((0,v.y2)(this.passphraseFormGroup.controls.enterPassphrase.value?{payload:{pwd:window.btoa(this.passwordFormGroup.controls.initWalletPassword.value),cipher:t,passphrase:window.btoa(this.passphraseFormGroup.controls.passphrase.value)}}:{payload:{pwd:window.btoa(this.passwordFormGroup.controls.initWalletPassword.value),cipher:t}}))}else this.store.dispatch((0,v.fu)(this.passphraseFormGroup.controls.enterPassphrase.value?{payload:window.btoa(this.passphraseFormGroup.controls.passphrase.value)}:{payload:""}))}onGoToHome(){setTimeout(()=>{this.store.dispatch((0,w.tw)()),this.store.dispatch((0,v.sQ)({payload:{loadPage:"HOME"}}))},1e3)}resetData(){this.genSeedResponse=[],this.initWalletResponse=""}ngOnDestroy(){this.unsubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(c.qu),e.Y36(ee.l))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-initialize-wallet"]],viewQuery:function(t,a){if(1&t&&e.Gf(B.Vq,5),2&t){let o;e.iGM(o=e.CRH())&&(a.stepper=o.first)}},features:[e._Bn([{provide:Gc.gx,useValue:{displayDefaultIndicatorType:!1}}])],decls:7,vars:6,consts:[["fxLayout","column",1,"padding-gap","mb-4"],[4,"ngIf"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","stretch stretch",4,"ngIf"],[3,"linear",4,"ngIf"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mt-2"],["fxFlex","100","fxLayoutAlign","start"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","1","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","2",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","stretch stretch"],["fxFlex","100",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",3,"click"],[3,"linear"],["stepper",""],["label","Wallet Password","state","password",3,"stepControl"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mt-1",3,"formGroup"],["fxFlex","49","fxLayoutAlign","start"],["matInput","","type","password","placeholder","Password","name","initWalletPassword","formControlName","initWalletPassword","tabindex","5","required",""],["matInput","","type","password","placeholder","Confirm Password","name","initWalletConfirmPassword","formControlName","initWalletConfirmPassword","tabindex","6","required",""],["class","validation-error-message",4,"ngIf"],["fxLayout","row",1,"my-2"],["mat-flat-button","","color","primary","tabindex","7","type","submit","matStepperNext",""],["label","Cipher","state","cipher",3,"stepControl"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start stretch","fxLayoutAlign.gt-sm","space-between start",1,"mt-1",3,"formGroup"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch"],["fxFlex","20","tabindex","8","color","primary","formControlName","existingCipher","name","existingCipher",1,"chkbox-wallet",3,"labelPosition"],["fxFlex","75","fxLayoutAlign","start",1,"my-1"],["autofocus","","matInput","","type","input","placeholder","Comma separated array of 24 words cipher seed","name","cipherSeed","formControlName","cipherSeed","tabindex","9","required",""],["fxLayout","row",1,"mb-2"],["mat-stroked-button","","color","primary","type","reset","tabindex","10","matStepperPrevious","",1,"mr-1","mt-1"],["mat-flat-button","","color","primary","tabindex","11","type","submit","matStepperNext","",1,"mt-1"],["label","Passphrase","state","passphrase",3,"stepControl"],["fxFlex","20","tabindex","10","color","primary","formControlName","enterPassphrase","name","enterPassphrase",1,"chkbox-wallet",3,"labelPosition"],["fxFlex","75","fxLayoutAlign","start"],["matInput","","type","password","placeholder","Passphrase","name","passphrase","formControlName","passphrase","tabindex","12","required",""],["mat-stroked-button","","color","warn","tabindex","13","type","reset",1,"mr-1","mt-1",3,"click"],["mat-stroked-button","","tabindex","14","color","primary","type","button","matStepperPrevious","",1,"mr-1","mt-1"],["mat-flat-button","","color","primary","tabindex","15","type","submit",1,"mt-1",3,"click"],["matStepperIcon","password"],["matStepperIcon","cipher"],["matStepperIcon","passphrase"],[1,"validation-error-message"],[1,"validation-error-icon","red"],["fxFlex","100","fxLayoutAlign","start",1,"blinker"],["fxFlex","40","fxLayout","row wrap",1,"mt-2"],["fxFlex","25","fxLayoutAlign","start","class","genseed-message",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start",1,"mt-2"],["mat-flat-button","","color","primary","type","submit","tabindex","16",3,"click"],["fxFlex","25","fxLayoutAlign","start",1,"genseed-message"],["mat-stroked-button","","color","primary","tabindex","17","type","reset",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","18",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,zc,9,0,"div",1),e.YNc(2,Wc,6,0,"div",2),e.YNc(3,l1,56,17,"mat-vertical-stepper",3),e.YNc(4,c1,15,1,"div",1),e.YNc(5,u1,7,0,"div",1),e.YNc(6,p1,9,0,"div",1),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",a.insecureLND&&!a.warnRes),e.xp6(1),e.Q6J("ngIf",a.warnRes&&!a.proceed),e.xp6(1),e.Q6J("ngIf",(!a.insecureLND||a.warnRes&&a.proceed)&&a.genSeedResponse.length<=0&&""===a.initWalletResponse),e.xp6(1),e.Q6J("ngIf",a.genSeedResponse.length>0&&""!==a.initWalletResponse),e.xp6(1),e.Q6J("ngIf",a.genSeedResponse.length>0&&""===a.initWalletResponse),e.xp6(1),e.Q6J("ngIf",a.genSeedResponse.length<=0&&""!==a.initWalletResponse))},directives:[d.xw,p.O5,c._Y,c.JL,c.F,d.Wh,d.yH,k.lW,B.Vq,B.C0,c.sg,f.KE,I.Nt,c.Fj,c.JJ,c.u,c.Q7,f.bx,f.TO,K.Hw,B.Ic,ue.Rr,B.fd,B.z9,p.sg],styles:[""]}),n})(),h1=(()=>{class n{constructor(){this.faWallet=y.X5K}}return n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-wallet"]],decls:12,vars:1,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["label","Unlock"],["label","Initialize"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Wallet"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"mat-tab-group")(8,"mat-tab",5),e._UZ(9,"rtl-unlock-wallet"),e.qZA(),e.TgZ(10,"mat-tab",6),e._UZ(11,"rtl-initialize-wallet"),e.qZA()()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faWallet))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.SP,D.uX,Vc,_1],styles:[""]}),n})();var g1=h(1365);function f1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",11),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let C1=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.router=o,this.faExchangeAlt=y.Ssp,this.faChartPie=y.OS1,this.currencyUnits=[],this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"},{link:"lookuptransactions",name:"Lookup"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[1]),(0,g1.M)(this.store.select(C.$k))).subscribe(([a,o])=>{this.currencyUnits=o.currencyUnits,this.balances=o.userPersona===l.ol.OPERATOR?[{title:"Local Capacity",dataValue:a.lightningBalance.local,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:a.lightningBalance.remote,tooltip:"Amount you can receive"}]:[{title:"Outbound Capacity",dataValue:a.lightningBalance.local,tooltip:"Amount you can send"},{title:"Inbound Capacity",dataValue:a.lightningBalance.remote,tooltip:"Amount you can receive"}],this.logger.info(a)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Lightning Balance"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA()()(),e.TgZ(8,"div",6),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"Lightning Transactions"),e.qZA()(),e.TgZ(12,"div",7)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",8),e.YNc(16,f1,2,3,"div",9),e.qZA(),e.TgZ(17,"div",10),e._UZ(18,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faChartPie),e.xp6(6),e.Q6J("values",a.balances),e.xp6(2),e.Q6J("icon",a.faExchangeAlt),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,ge.D,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC],styles:[""]}),n})();function x1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let y1=(()=>{class n{constructor(t){this.router=t,this.faSearch=y.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-graph"]],decls:11,vars:2,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Graph Lookups"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),e.YNc(8,x1,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faSearch),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC],styles:[""]}),n})();function T1(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Destination pubkey is required."),e.qZA())}function b1(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Amount is required."),e.qZA())}function v1(n,i){1&n&&e._UZ(0,"mat-progress-bar",37)}function Z1(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1," Hop "),e.qZA())}function w1(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.hop_sequence," ")}}function A1(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1," Peer "),e.qZA())}const S1=function(n){return{"max-width":n}};function L1(n,i){if(1&n&&(e.TgZ(0,"td",40),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,S1,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.hij(" ",null==t?null:t.pubkey_alias," ")}}function k1(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1," Channel "),e.qZA())}function F1(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.chan_id," ")}}function N1(n,i){1&n&&(e.TgZ(0,"th",41),e._uU(1," Capacity (Sats) "),e.qZA())}function q1(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.chan_capacity),"")}}function U1(n,i){1&n&&(e.TgZ(0,"th",41),e._uU(1," Amount To Fwd (Sats) "),e.qZA())}function O1(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.amt_to_forward)," ")}}function R1(n,i){1&n&&(e.TgZ(0,"th",41),e._uU(1," Fee (mSats) "),e.qZA())}function I1(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.fee_msat)," ")}}function M1(n,i){1&n&&(e.TgZ(0,"th",43)(1,"span",42),e._uU(2,"Actions"),e.qZA()())}function D1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",44)(1,"button",45),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onHopClick(u,o)}),e._uU(2,"View Info"),e.qZA()()}}function P1(n,i){1&n&&e._UZ(0,"tr",46)}function J1(n,i){1&n&&e._UZ(0,"tr",47)}const E1=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}};let Q1=(()=>{class n{constructor(t,a,o){this.store=t,this.lndEffects=a,this.commonService=o,this.destinationPubkey="",this.amount=null,this.flgSticky=!1,this.displayedColumns=[],this.flgLoading=[!1],this.faRoute=y.FpQ,this.faExclamationTriangle=y.eHv,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["pubkey_alias","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["hop_sequence","pubkey_alias","fee_msat","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["hop_sequence","pubkey_alias","chan_capacity","amt_to_forward_msat","fee_msat","actions"]):(this.flgSticky=!0,this.displayedColumns=["hop_sequence","pubkey_alias","chan_capacity","amt_to_forward_msat","fee_msat","actions"])}ngOnInit(){this.lndEffects.setQueryRoutes.pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.qrHops=new r.by([]),t.routes&&t.routes.length&&t.routes.length>0&&t.routes[0].hops?(this.flgLoading[0]=!1,this.qrHops=new r.by([...t.routes[0].hops]),this.qrHops.data=t.routes[0].hops):this.flgLoading[0]="error",this.qrHops.sort=this.sort,this.qrHops.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null})}onQueryRoutes(){if(!this.destinationPubkey||!this.amount)return!0;this.qrHops=new r.by([]),this.flgLoading[0]=!0,this.store.dispatch((0,v.WO)({payload:{destPubkey:this.destinationPubkey,amount:this.amount}}))}resetData(){this.destinationPubkey="",this.amount=null,this.flgLoading[0]=!1}onHopClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"hop_sequence",value:t.hop_sequence,title:"Sequence",width:33,type:l.Gi.NUMBER},{key:"amt_to_forward",value:t.amt_to_forward,title:"Amount To Forward (Sats)",width:33,type:l.Gi.NUMBER},{key:"fee_msat",value:t.fee_msat,title:"Fee (mSats)",width:34,type:l.Gi.NUMBER}],[{key:"chan_capacity",value:t.chan_capacity,title:"Channel Capacity (Sats)",width:50,type:l.Gi.NUMBER},{key:"expiry",value:t.expiry,title:"Expiry",width:50,type:l.Gi.NUMBER}],[{key:"pubkey_alias",value:t.pubkey_alias,title:"Peer Alias",width:50,type:l.Gi.STRING},{key:"chan_id",value:t.chan_id,title:"Channel ID",width:50,type:l.Gi.STRING}],[{key:"pub_key",value:t.pub_key,title:"Peer Pubkey",width:100,type:l.Gi.STRING}]]}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(ee.l),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-query-routes"]],viewQuery:function(t,a){if(1&t&&e.Gf(Z.YE,5),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first)}},decls:51,vars:16,consts:[["fxLayout","column","fxFlex","100",1,"padding-gap"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Pubkey","name","destinationPubkey","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-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"],[1,"table-container","mb-6",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","hop_sequence"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","pubkey_alias"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","chan_id"],["matColumnDef","chan_capacity"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amt_to_forward_msat"],["matColumnDef","fee_msat"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-4","pr-3"],["mat-cell","",1,"pl-4"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(t,a){if(1&t){const o=e.EpF();e.TgZ(0,"div",0)(1,"form",1,2),e.NdJ("ngSubmit",function(){return e.CHM(o),e.MAs(2).form.valid&&a.onQueryRoutes()}),e.TgZ(3,"div",3),e._UZ(4,"fa-icon",4),e.TgZ(5,"span"),e._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),e.qZA()(),e.TgZ(7,"mat-form-field",5)(8,"input",6,7),e.NdJ("ngModelChange",function(u){return a.destinationPubkey=u}),e.qZA(),e.YNc(10,T1,2,0,"mat-error",8),e.qZA(),e.TgZ(11,"mat-form-field",9)(12,"input",10),e.NdJ("ngModelChange",function(u){return a.amount=u}),e.qZA(),e.YNc(13,b1,2,0,"mat-error",8),e.qZA(),e.TgZ(14,"div",11)(15,"button",12),e.NdJ("click",function(){return a.resetData()}),e._uU(16,"Clear"),e.qZA(),e.TgZ(17,"button",13),e._uU(18,"Query Route"),e.qZA()()(),e.TgZ(19,"div",14)(20,"div",15),e._UZ(21,"fa-icon",16),e.TgZ(22,"span",17),e._uU(23,"Transaction Route"),e.qZA()()(),e.TgZ(24,"div",18),e.YNc(25,v1,1,0,"mat-progress-bar",19),e.TgZ(26,"table",20,21),e.ynx(28,22),e.YNc(29,Z1,2,0,"th",23),e.YNc(30,w1,2,1,"td",24),e.BQk(),e.ynx(31,25),e.YNc(32,A1,2,0,"th",23),e.YNc(33,L1,2,4,"td",26),e.BQk(),e.ynx(34,27),e.YNc(35,k1,2,0,"th",23),e.YNc(36,F1,2,1,"td",24),e.BQk(),e.ynx(37,28),e.YNc(38,N1,2,0,"th",29),e.YNc(39,q1,4,3,"td",24),e.BQk(),e.ynx(40,30),e.YNc(41,U1,2,0,"th",29),e.YNc(42,O1,4,3,"td",24),e.BQk(),e.ynx(43,31),e.YNc(44,R1,2,0,"th",29),e.YNc(45,I1,4,3,"td",24),e.BQk(),e.ynx(46,32),e.YNc(47,M1,3,0,"th",33),e.YNc(48,D1,3,0,"td",34),e.BQk(),e.YNc(49,P1,1,0,"tr",35),e.YNc(50,J1,1,0,"tr",36),e.qZA()()()}2&t&&(e.xp6(4),e.Q6J("icon",a.faExclamationTriangle),e.xp6(4),e.Q6J("ngModel",a.destinationPubkey),e.xp6(2),e.Q6J("ngIf",!a.destinationPubkey),e.xp6(2),e.Q6J("ngModel",a.amount)("step",1e3)("min",0),e.xp6(1),e.Q6J("ngIf",!a.amount),e.xp6(8),e.Q6J("icon",a.faRoute),e.xp6(4),e.Q6J("ngIf",!0===a.flgLoading[0]),e.xp6(1),e.Q6J("dataSource",a.qrHops)("ngClass",e.VKq(14,E1,"error"===a.flgLoading[0])),e.xp6(23),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns))},directives:[d.xw,d.yH,c._Y,c.JL,c.F,d.Wh,M.BN,f.KE,I.Nt,c.Fj,c.Q7,c.JJ,c.On,p.O5,f.TO,c.wV,c.qQ,$.q,k.lW,Q.$V,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,r.as,r.XQ,r.nj,r.Gk],pipes:[p.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{flex:0 0 5%;width:5%}.mat-column-pubkey_alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();var ie=h(9814);function Y1(n,i){if(1&n&&(e.TgZ(0,"span",9),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(1),e.AsE("",a.nodeFeaturesEnum[t.value.name]||t.value.name,": ",t.value.is_required?"Mandatory":"Optional","")}}function H1(n,i){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Network"),e.qZA())}function B1(n,i){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.network," ")}}function V1(n,i){1&n&&(e.TgZ(0,"th",27),e._uU(1,"Address"),e.qZA())}function G1(n,i){if(1&n&&(e.TgZ(0,"td",28),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.hij(" ",null==t?null:t.addr," ")}}function z1(n,i){1&n&&(e.TgZ(0,"th",29)(1,"span",30),e._uU(2,"Actions"),e.qZA()())}function W1(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",31)(1,"span",30)(2,"button",32),e.NdJ("copied",function(o){return e.CHM(t),e.oxw(2).onCopyNodeURI(o)}),e._uU(3,"Copy Node URI"),e.qZA()()()}if(2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(2),e.Q6J("payload",a.lookupResult.node.pub_key+"@"+t.addr)}}function X1(n,i){1&n&&e._UZ(0,"tr",33)}function $1(n,i){1&n&&e._UZ(0,"tr",34)}const j1=function(n){return{"background-color":n}};function K1(n,i){if(1&n&&(e.TgZ(0,"div",1),e._UZ(1,"mat-divider",2),e.TgZ(2,"div",3)(3,"div",4)(4,"h4",5),e._uU(5,"Alias"),e.qZA(),e.TgZ(6,"span",6),e._uU(7),e.TgZ(8,"span",7),e._uU(9),e.qZA()()(),e.TgZ(10,"div",8)(11,"h4",5),e._uU(12,"Pub Key"),e.qZA(),e.TgZ(13,"span",9),e._uU(14),e.qZA()()(),e._UZ(15,"mat-divider",10),e.TgZ(16,"div",3)(17,"div",4)(18,"h4",5),e._uU(19,"Last Update"),e.qZA(),e.TgZ(20,"span",6),e._uU(21),e.ALo(22,"date"),e.qZA()(),e.TgZ(23,"div",8)(24,"h4",5),e._uU(25,"Total Capacity (Sats)"),e.qZA(),e.TgZ(26,"span",6),e._uU(27),e.ALo(28,"number"),e.qZA()()(),e._UZ(29,"mat-divider",10),e.TgZ(30,"div",3)(31,"div",4)(32,"h4",5),e._uU(33,"Number of Channels"),e.qZA(),e.TgZ(34,"span",6),e._uU(35),e.ALo(36,"number"),e.qZA()(),e.TgZ(37,"div",11)(38,"h4",5),e._uU(39,"Features"),e.qZA(),e.YNc(40,Y1,2,2,"span",12),e.ALo(41,"keyvalue"),e.qZA()(),e._UZ(42,"mat-divider",10),e.TgZ(43,"div",13)(44,"h4",14),e._uU(45,"Addresses"),e.qZA(),e.TgZ(46,"div",15)(47,"table",16,17),e.ynx(49,18),e.YNc(50,H1,2,0,"th",19),e.YNc(51,B1,2,1,"td",20),e.BQk(),e.ynx(52,21),e.YNc(53,V1,2,0,"th",19),e.YNc(54,G1,2,1,"td",20),e.BQk(),e.ynx(55,22),e.YNc(56,z1,3,0,"th",23),e.YNc(57,W1,4,1,"td",24),e.BQk(),e.YNc(58,X1,1,0,"tr",25),e.YNc(59,$1,1,0,"tr",26),e.qZA()()()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(t.lookupResult.node.alias),e.xp6(1),e.Q6J("ngStyle",e.VKq(24,j1,null==t.lookupResult.node?null:t.lookupResult.node.color)),e.xp6(1),e.Oqu(null==t.lookupResult.node?null:t.lookupResult.node.color),e.xp6(5),e.Oqu(t.lookupResult.node.pub_key),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.xi3(22,15,1e3*t.lookupResult.node.last_update,"dd/MMM/y HH:mm")),e.xp6(6),e.Oqu(e.lcZ(28,18,t.lookupResult.total_capacity)),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.lcZ(36,20,t.lookupResult.num_channels)),e.xp6(5),e.Q6J("ngForOf",e.lcZ(41,22,t.lookupResult.node.features)),e.xp6(2),e.Q6J("inset",!0),e.xp6(5),e.Q6J("dataSource",t.lookupResult.node.addresses),e.xp6(11),e.Q6J("matHeaderRowDef",t.displayedColumns),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}let eu=(()=>{class n{constructor(t,a){this.logger=t,this.snackBar=a,this.nodeFeaturesEnum=l.hZ,this.displayedColumns=["network","addr","actions"]}onCopyNodeURI(t){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+t)}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(te.ux))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-node-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],[1,"mb-1",3,"inset"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"ml-2",3,"ngStyle"],["fxFlex","70"],[1,"foreground-secondary-text","w-100"],[1,"my-1",3,"inset"],["fxLayout","column","fxFlex","70","fxLayoutAlign","end start",1,"my-1"],["class","foreground-secondary-text w-100",4,"ngFor","ngForOf"],["fxLayout","column"],["fxFlex","100","fxLayoutAlign","start",1,"font-bold-500","mb-1"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",3,"dataSource"],["table",""],["matColumnDef","network"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","addr"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","1","rtlClipboard","",3,"payload","copied"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&e.YNc(0,K1,60,26,"div",0),2&t&&e.Q6J("ngIf",a.lookupResult)},directives:[p.O5,d.xw,z.d,d.yH,d.Wh,p.PC,S.Zl,p.sg,Q.$V,r.BZ,Z.YE,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,k.lW,se.y,r.as,r.XQ,r.nj,r.Gk],pipes:[p.uU,p.JJ,p.Nd],styles:[""]}),n})();function tu(n,i){1&n&&(e.TgZ(0,"h3",15),e._uU(1,"Node 1"),e.qZA())}function nu(n,i){1&n&&(e.TgZ(0,"h3",15),e._uU(1,"Node 1 (Your Node)"),e.qZA())}function au(n,i){1&n&&(e.TgZ(0,"h3",15),e._uU(1,"Node 2"),e.qZA())}function iu(n,i){1&n&&(e.TgZ(0,"h3",15),e._uU(1,"Node 2 (Your Node)"),e.qZA())}function ou(n,i){if(1&n&&(e.TgZ(0,"div",1),e._UZ(1,"mat-divider",2),e.TgZ(2,"div",3)(3,"div",4)(4,"h4",5),e._uU(5,"Channel Id"),e.qZA(),e.TgZ(6,"span",6),e._uU(7),e.qZA()(),e.TgZ(8,"div",7)(9,"h4",5),e._uU(10,"Channel Point"),e.qZA(),e.TgZ(11,"span",6),e._uU(12),e.qZA()()(),e._UZ(13,"mat-divider",8),e.TgZ(14,"div",3)(15,"div",4)(16,"h4",5),e._uU(17,"Last Update"),e.qZA(),e.TgZ(18,"span",6),e._uU(19),e.ALo(20,"date"),e.qZA()(),e.TgZ(21,"div",7)(22,"h4",5),e._uU(23,"Capacity (Sats)"),e.qZA(),e.TgZ(24,"span",6),e._uU(25),e.ALo(26,"number"),e.qZA()()(),e._UZ(27,"mat-divider",8),e.TgZ(28,"div",9)(29,"div",10)(30,"div",11),e.YNc(31,tu,2,0,"h3",12),e.YNc(32,nu,2,0,"h3",12),e.qZA(),e._UZ(33,"mat-divider",8),e.TgZ(34,"div",13)(35,"h4",5),e._uU(36,"Pubkey"),e.qZA(),e.TgZ(37,"span",6),e._uU(38),e.qZA()(),e._UZ(39,"mat-divider",8),e.TgZ(40,"div",14)(41,"h4",5),e._uU(42,"Time Lock Delta"),e.qZA(),e.TgZ(43,"span",6),e._uU(44),e.qZA()(),e._UZ(45,"mat-divider",8),e.TgZ(46,"div",14)(47,"h4",5),e._uU(48,"Min HTLC"),e.qZA(),e.TgZ(49,"span",6),e._uU(50),e.qZA()(),e._UZ(51,"mat-divider",8),e.TgZ(52,"div",14)(53,"h4",5),e._uU(54,"Fee Base Msat"),e.qZA(),e.TgZ(55,"span",6),e._uU(56),e.qZA()(),e._UZ(57,"mat-divider",8),e.TgZ(58,"div",14)(59,"h4",5),e._uU(60,"Fee Rate Milli Msat"),e.qZA(),e.TgZ(61,"span",6),e._uU(62),e.qZA()(),e._UZ(63,"mat-divider",8),e.TgZ(64,"div",14)(65,"h4",5),e._uU(66,"Disabled"),e.qZA(),e.TgZ(67,"span",6),e._uU(68),e.qZA()()(),e.TgZ(69,"div",10)(70,"div"),e.YNc(71,au,2,0,"h3",12),e.YNc(72,iu,2,0,"h3",12),e.qZA(),e._UZ(73,"mat-divider",8),e.TgZ(74,"div",13)(75,"h4",5),e._uU(76,"Pubkey"),e.qZA(),e.TgZ(77,"span",6),e._uU(78),e.qZA()(),e._UZ(79,"mat-divider",8),e.TgZ(80,"div",14)(81,"h4",5),e._uU(82,"Time Lock Delta"),e.qZA(),e.TgZ(83,"span",6),e._uU(84),e.qZA()(),e._UZ(85,"mat-divider",8),e.TgZ(86,"div",14)(87,"h4",5),e._uU(88,"Min HTLC"),e.qZA(),e.TgZ(89,"span",6),e._uU(90),e.qZA()(),e._UZ(91,"mat-divider",8),e.TgZ(92,"div",14)(93,"h4",5),e._uU(94,"Fee Base Msat"),e.qZA(),e.TgZ(95,"span",6),e._uU(96),e.qZA()(),e._UZ(97,"mat-divider",8),e.TgZ(98,"div",14)(99,"h4",5),e._uU(100,"Fee Rate Milli Msat"),e.qZA(),e.TgZ(101,"span",6),e._uU(102),e.qZA()(),e._UZ(103,"mat-divider",8),e.TgZ(104,"div",14)(105,"h4",5),e._uU(106,"Disabled"),e.qZA(),e.TgZ(107,"span",6),e._uU(108),e.qZA()()()()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(t.lookupResult.channel_id),e.xp6(5),e.Oqu(t.lookupResult.chan_point),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.xi3(20,35,1e3*t.lookupResult.last_update,"dd/MMM/y HH:mm")),e.xp6(6),e.Oqu(e.lcZ(26,38,t.lookupResult.capacity)),e.xp6(2),e.Q6J("inset",!0),e.xp6(4),e.Q6J("ngIf",!t.node1_match),e.xp6(1),e.Q6J("ngIf",t.node1_match),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(t.lookupResult.node1_pub),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node1_policy?null:t.lookupResult.node1_policy.time_lock_delta),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node1_policy?null:t.lookupResult.node1_policy.min_htlc),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node1_policy?null:t.lookupResult.node1_policy.fee_base_msat),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node1_policy?null:t.lookupResult.node1_policy.fee_rate_milli_msat),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null!=t.lookupResult.node1_policy&&t.lookupResult.node1_policy.disabled?"Yes":"No"),e.xp6(3),e.Q6J("ngIf",!t.node2_match),e.xp6(1),e.Q6J("ngIf",t.node2_match),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(t.lookupResult.node2_pub),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node2_policy?null:t.lookupResult.node2_policy.time_lock_delta),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node2_policy?null:t.lookupResult.node2_policy.min_htlc),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node2_policy?null:t.lookupResult.node2_policy.fee_base_msat),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null==t.lookupResult.node2_policy?null:t.lookupResult.node2_policy.fee_rate_milli_msat),e.xp6(1),e.Q6J("inset",!0),e.xp6(5),e.Oqu(null!=t.lookupResult.node2_policy&&t.lookupResult.node2_policy.disabled?"Yes":"No")}}let su=(()=>{class n{constructor(t){this.store=t,this.node1_match=!1,this.node2_match=!1,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.lookupResult.node1_pub===t.identity_pubkey&&(this.node1_match=!0),this.lookupResult.node2_pub===t.identity_pubkey&&(this.node2_match=!0)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-lookup"]],inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["fxLayout","column","class","mt-1",4,"ngIf"],["fxLayout","column",1,"mt-1"],[1,"mb-1",3,"inset"],["fxLayout","row"],["fxLayout","column","fxFlex","30","fxLayoutAlign","end start"],[1,"font-bold-500"],[1,"foreground-secondary-text"],["fxLayout","column","fxFlex","70","fxLayoutAlign","end start"],[1,"my-1",3,"inset"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row"],["fxLayout","column","fxFlex","49","fxLayoutAlign","start start",1,"mt-1","bordered-box","padding-gap-large"],["fxLayout","column"],["class","page-title font-bold-500",4,"ngIf"],["fxLayout","column","fxFlex","20"],["fxLayout","column","fxFlex","10"],[1,"page-title","font-bold-500"]],template:function(t,a){1&t&&e.YNc(0,ou,109,40,"div",0),2&t&&e.Q6J("ngIf",a.lookupResult)},directives:[p.O5,d.xw,z.d,d.yH,d.Wh],pipes:[p.uU,p.JJ],styles:[".mat-list-base[_ngcontent-%COMP%] .mat-list-item[_ngcontent-%COMP%], .mat-list-base[_ngcontent-%COMP%] .mat-list-option[_ngcontent-%COMP%]{height:38px!important}"]}),n})();function lu(n,i){if(1&n&&(e.TgZ(0,"mat-radio-button",17),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("value",t.id)("checked",a.selectedFieldId===t.id),e.xp6(1),e.hij(" ",t.name," ")}}function ru(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function cu(n,i){1&n&&e._UZ(0,"mat-progress-bar",20)}const uu=function(n){return{"w-100 mt-2 p-2 error-border":n,"w-100 my-2 p-2":!0}};function pu(n,i){if(1&n&&(e.TgZ(0,"div",18),e.YNc(1,cu,1,0,"mat-progress-bar",19),e._uU(2),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(3,uu,""!==t.errorMessage&&"Getting lookup details..."!==t.errorMessage)),e.xp6(1),e.Q6J("ngIf","Getting lookup details..."===t.errorMessage),e.xp6(1),e.hij(" ",t.errorMessage," ")}}function mu(n,i){if(1&n&&(e.TgZ(0,"span",27),e._UZ(1,"rtl-node-lookup",28),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("lookupResult",t.lookupValue)}}function du(n,i){if(1&n&&(e.TgZ(0,"span",27),e._UZ(1,"rtl-channel-lookup",28),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("lookupResult",t.lookupValue)}}function _u(n,i){1&n&&(e.TgZ(0,"span",27)(1,"h3"),e._uU(2,"Error! Unable to find details!"),e.qZA()())}function hu(n,i){if(1&n&&(e.TgZ(0,"div",21)(1,"div",22)(2,"span",23),e._uU(3),e.qZA()(),e.TgZ(4,"div",24),e.YNc(5,mu,2,1,"span",25),e.YNc(6,du,2,1,"span",25),e.YNc(7,_u,3,0,"span",26),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.hij("",t.lookupFields[t.selectedFieldId].name," Details"),e.xp6(1),e.Q6J("ngSwitch",t.selectedFieldId),e.xp6(1),e.Q6J("ngSwitchCase",0),e.xp6(1),e.Q6J("ngSwitchCase",1)}}const gu=function(n){return{"mt-1":!0,"mt-2":n}};let Ve=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.commonService=a,this.store=o,this.actions=s,this.lookupKey="",this.lookupValue={},this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Pubkey"},{id:1,name:"Channel",placeholder:"Channel ID"}],this.faSearch=y.wn1,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t.type===l.uR.SET_LOOKUP_LND||t.type===l.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(t=>{t.type===l.uR.SET_LOOKUP_LND&&(this.errorMessage=0===this.selectedFieldId&&t.payload.hasOwnProperty("node")||1===this.selectedFieldId&&t.payload.hasOwnProperty("channel_id")?"":this.errorMessage,this.lookupValue=JSON.parse(JSON.stringify(t.payload)),this.flgSetLookupValue=!(0!==this.selectedFieldId||!t.payload.hasOwnProperty("node"))||!(1!==this.selectedFieldId||!t.payload.hasOwnProperty("channel_id")),this.logger.info(this.lookupValue)),t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&"Lookup"===t.payload.action&&(this.errorMessage="",t.payload.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof t.payload.message?JSON.stringify(t.payload.message):t.payload.message),t.payload.status===l.Bn.INITIATED&&(this.errorMessage=l.m6.GET_LOOKUP_DETAILS))})}onLookup(){if(!this.lookupKey)return!0;switch(this.flgSetLookupValue=!1,this.lookupValue={},this.selectedFieldId){case 0:this.store.dispatch((0,v.Sf)({payload:this.lookupKey.trim()}));break;case 1:this.store.dispatch((0,v.$A)({payload:{uiMessage:l.m6.SEARCHING_CHANNEL,channelID:this.lookupKey.trim()}}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.lookupKey="",this.lookupValue={},this.errorMessage=""}clearLookupValue(){this.lookupValue={},this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lookups"]],decls:19,vars:10,consts:[["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"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[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","row wrap","fxLayoutAlign","space-between center",3,"ngClass",4,"ngIf"],["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"],[1,"mr-4",3,"value","checked"],["fxFlex","100","fxLayout","row wrap","fxLayoutAlign","space-between center",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["mode","indeterminate"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[3,"lookupResult"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-content",2)(3,"form",3,4)(5,"div",5)(6,"mat-radio-group",6),e.NdJ("ngModelChange",function(s){return a.selectedFieldId=s})("change",function(s){return a.onSelectChange(s)}),e.YNc(7,lu,2,3,"mat-radio-button",7),e.qZA()(),e.TgZ(8,"mat-form-field",8)(9,"input",9,10),e.NdJ("change",function(){return a.clearLookupValue()})("ngModelChange",function(s){return a.lookupKey=s}),e.qZA(),e.YNc(11,ru,2,1,"mat-error",11),e.qZA(),e.TgZ(12,"div",12)(13,"button",13),e.NdJ("click",function(){return a.resetData()}),e._uU(14,"Clear"),e.qZA(),e.TgZ(15,"button",14),e.NdJ("click",function(){return a.onLookup()}),e._uU(16,"Lookup"),e.qZA()()(),e.YNc(17,pu,3,5,"div",15),e.YNc(18,hu,8,4,"div",16),e.qZA()()()),2&t&&(e.xp6(6),e.Q6J("ngModel",a.selectedFieldId),e.xp6(1),e.Q6J("ngForOf",a.lookupFields),e.xp6(1),e.Q6J("ngClass",e.VKq(8,gu,a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM)),e.xp6(1),e.Q6J("placeholder",(null==a.lookupFields[a.selectedFieldId]?null:a.lookupFields[a.selectedFieldId].placeholder)||"Lookup Key")("ngModel",a.lookupKey),e.xp6(2),e.Q6J("ngIf",!a.lookupKey),e.xp6(6),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage&&a.lookupValue&&a.flgSetLookupValue))},directives:[d.xw,d.yH,d.Wh,b.dn,c._Y,c.JL,c.F,ie.VQ,c.JJ,c.On,p.sg,ie.U0,f.KE,p.mk,S.oO,I.Nt,c.Fj,c.Q7,p.O5,f.TO,k.lW,P.pW,p.RF,p.n9,eu,su,p.ED],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}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})();var ve=h(6856);function fu(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid date format."),e.qZA())}function Cu(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Invalid date format."),e.qZA())}function xu(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",27),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let yu=(()=>{class n{constructor(t,a,o){this.logger=t,this.store=a,this.router=o,this.faMapSigns=y.SuH,this.today=new Date(Date.now()),this.lastMonthDay=new Date(this.today.getFullYear(),this.today.getMonth()-1,this.today.getDate()+1,0,0,0),this.yesterday=new Date(this.today.getFullYear(),this.today.getMonth(),this.today.getDate()-1,0,0,0),this.endDate=this.today,this.startDate=this.lastMonthDay,this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"peers",name:"Routing Peers"},{link:"nonroutingprs",name:"Non Routing Peers"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x]}ngOnInit(){this.onEventsFetch();const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}onEventsFetch(){this.store.dispatch((0,v.QJ)({payload:{forwarding_events:[]}})),this.endDate||(this.endDate=this.today),this.startDate||(this.startDate=new Date(this.endDate.getFullYear(),this.endDate.getMonth()-1,this.endDate.getDate()+1,0,0,0)),this.store.dispatch((0,v.u0)({payload:{end_time:Math.round(this.endDate.getTime()/1e3).toString(),start_time:Math.round(this.startDate.getTime()/1e3).toString()}}))}resetData(){this.endDate=this.today,this.startDate=this.lastMonthDay}ngOnDestroy(){this.resetData(),this.store.dispatch((0,v.QJ)({payload:{forwarding_events:[]}})),this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-routing"]],decls:35,vars:15,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"card-content-gap","mt-1"],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mb-1",3,"ngSubmit"],["routingForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["fxFlex","49","fxLayoutAlign","start"],["matInput","","placeholder","Start Date","name","startDate","tabindex","1",3,"matDatepicker","max","ngModel","ngModelChange"],["strtDate","ngModel"],["matSuffix","",3,"for"],[3,"startAt"],["startDatepicker",""],[4,"ngIf"],["matInput","","placeholder","End Date","name","endDate","tabindex","2",3,"matDatepicker","min","max","ngModel","ngModelChange"],["enDate","ngModel"],["endDatepicker",""],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","type","submit","tabindex","4"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1),e._UZ(2,"fa-icon",2),e.TgZ(3,"span",3),e._uU(4,"Routing"),e.qZA()(),e.TgZ(5,"div",4)(6,"mat-card",5)(7,"mat-card-content",6)(8,"form",7,8),e.NdJ("ngSubmit",function(){return a.onEventsFetch()}),e.TgZ(10,"div",9)(11,"mat-form-field",10)(12,"input",11,12),e.NdJ("ngModelChange",function(s){return a.startDate=s}),e.qZA(),e._UZ(14,"mat-datepicker-toggle",13)(15,"mat-datepicker",14,15),e.YNc(17,fu,2,0,"mat-error",16),e.qZA(),e.TgZ(18,"mat-form-field",10)(19,"input",17,18),e.NdJ("ngModelChange",function(s){return a.endDate=s}),e.qZA(),e._UZ(21,"mat-datepicker-toggle",13)(22,"mat-datepicker",14,19),e.YNc(24,Cu,2,0,"mat-error",16),e.qZA()(),e.TgZ(25,"div",20)(26,"button",21),e.NdJ("click",function(){return a.resetData()}),e._uU(27,"Clear"),e.qZA(),e.TgZ(28,"button",22),e._uU(29,"Fetch Events"),e.qZA()()(),e.TgZ(30,"div",23)(31,"nav",24),e.YNc(32,xu,2,3,"div",25),e.qZA()(),e.TgZ(33,"div",26),e._UZ(34,"router-outlet"),e.qZA()()()()()),2&t){const o=e.MAs(13),s=e.MAs(16),u=e.MAs(20),g=e.MAs(23);e.xp6(2),e.Q6J("icon",a.faMapSigns),e.xp6(10),e.Q6J("matDatepicker",s)("max",a.today)("ngModel",a.startDate),e.xp6(2),e.Q6J("for",s),e.xp6(1),e.Q6J("startAt",a.startDate),e.xp6(2),e.Q6J("ngIf",o.errors),e.xp6(2),e.Q6J("matDatepicker",g)("min",a.startDate)("max",a.today)("ngModel",a.endDate),e.xp6(2),e.Q6J("for",g),e.xp6(1),e.Q6J("startAt",a.endDate),e.xp6(2),e.Q6J("ngIf",u.errors),e.xp6(8),e.Q6J("ngForOf",a.links)}},directives:[d.xw,d.Wh,M.BN,d.yH,b.a8,b.dn,c._Y,c.JL,c.F,f.KE,I.Nt,ve.hl,Ye.F,c.Fj,c.JJ,c.On,ve.nW,f.R9,ve.Mq,p.O5,f.TO,$.q,k.lW,D.BU,p.sg,D.Nj,T.rH,T.lC],styles:[""]}),n})();function Tu(n,i){if(1&n&&(e.TgZ(0,"div",5),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function bu(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",6),e._UZ(1,"div",7),e.TgZ(2,"mat-form-field",8)(3,"input",9),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().filterValue=o})("input",function(){return e.CHM(t),e.oxw().applyFilter()})("keyup",function(){return e.CHM(t),e.oxw().applyFilter()}),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.filterValue)}}function vu(n,i){1&n&&e._UZ(0,"mat-progress-bar",31)}function Zu(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1,"Timestamp"),e.qZA())}function wu(n,i){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*t.timestamp,"dd/MMM/y HH:mm"))}}function Au(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1,"Inbound Channel"),e.qZA())}function Su(n,i){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t.alias_in)}}function Lu(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1,"Outbound Channel"),e.qZA())}function ku(n,i){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(t.alias_out)}}function Fu(n,i){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Inbound Amount (Sats)"),e.qZA())}function Nu(n,i){if(1&n&&(e.TgZ(0,"td",33)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.amt_in))}}function qu(n,i){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Outbound Amount (Sats)"),e.qZA())}function Uu(n,i){if(1&n&&(e.TgZ(0,"td",33)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.amt_out))}}function Ou(n,i){1&n&&(e.TgZ(0,"th",34),e._uU(1,"Fee (mSats)"),e.qZA())}function Ru(n,i){if(1&n&&(e.TgZ(0,"td",33)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.fee_msat))}}function Iu(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",36)(1,"div",37)(2,"mat-select",38),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",39),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function Mu(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",40)(1,"button",41),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw(2).onForwardingEventClick(u,o)}),e._uU(2,"View Info"),e.qZA()()}}function Du(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No forwarding history available."),e.qZA())}function Pu(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting forwarding history..."),e.qZA())}function Ju(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function Eu(n,i){if(1&n&&(e.TgZ(0,"td",42),e.YNc(1,Du,2,0,"p",43),e.YNc(2,Pu,2,0,"p",43),e.YNc(3,Ju,2,1,"p",43),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.forwardingHistoryEvents&&t.forwardingHistoryEvents.data)||(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Qu=function(n){return{"display-none":n}};function Yu(n,i){if(1&n&&e._UZ(0,"tr",44),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,Qu,(null==t.forwardingHistoryEvents?null:t.forwardingHistoryEvents.data)&&(null==t.forwardingHistoryEvents||null==t.forwardingHistoryEvents.data?null:t.forwardingHistoryEvents.data.length)>0))}}function Hu(n,i){1&n&&e._UZ(0,"tr",45)}function Bu(n,i){1&n&&e._UZ(0,"tr",46)}const Vu=function(){return["no_event"]};function Gu(n,i){if(1&n&&(e.TgZ(0,"div",10),e.YNc(1,vu,1,0,"mat-progress-bar",11),e.TgZ(2,"table",12,13),e.ynx(4,14),e.YNc(5,Zu,2,0,"th",15),e.YNc(6,wu,3,4,"td",16),e.BQk(),e.ynx(7,17),e.YNc(8,Au,2,0,"th",15),e.YNc(9,Su,2,1,"td",16),e.BQk(),e.ynx(10,18),e.YNc(11,Lu,2,0,"th",15),e.YNc(12,ku,2,1,"td",16),e.BQk(),e.ynx(13,19),e.YNc(14,Fu,2,0,"th",20),e.YNc(15,Nu,4,3,"td",16),e.BQk(),e.ynx(16,21),e.YNc(17,qu,2,0,"th",20),e.YNc(18,Uu,4,3,"td",16),e.BQk(),e.ynx(19,22),e.YNc(20,Ou,2,0,"th",20),e.YNc(21,Ru,4,3,"td",16),e.BQk(),e.ynx(22,23),e.YNc(23,Iu,6,0,"th",24),e.YNc(24,Mu,3,0,"td",25),e.BQk(),e.ynx(25,26),e.YNc(26,Eu,4,3,"td",27),e.BQk(),e.YNc(27,Yu,1,3,"tr",28),e.YNc(28,Hu,1,0,"tr",29),e.YNc(29,Bu,1,0,"tr",30),e.qZA()()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.forwardingHistoryEvents),e.xp6(25),e.Q6J("matFooterRowDef",e.DdM(6,Vu)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}function zu(n,i){if(1&n&&e._UZ(0,"mat-paginator",47),2&n){const t=e.oxw();e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Ge=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.commonService=a,this.store=o,this.datePipe=s,this.eventsData=[],this.filterValue="",this.forwardingHistoryData=[],this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","fee_msat","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amt_in","amt_out","fee_msat","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","alias_in","alias_out","amt_in","amt_out","fee_msat","actions"])}ngOnInit(){this.store.select(C.Bo).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{var a;this.eventsData.length<=0&&(this.errorMessage="",this.apiCallStatus=t.apiCallStatus,(null===(a=t.apiCallStatus)||void 0===a?void 0:a.status)===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.forwardingHistoryData=t.forwardingHistory.forwarding_events||[],this.loadForwardingEventsTable(this.forwardingHistoryData),this.logger.info(t.apiCallStatus),this.logger.info(t.forwardingHistory))})}ngAfterViewInit(){this.forwardingHistoryData.length>0&&this.loadForwardingEventsTable(this.forwardingHistoryData)}ngOnChanges(t){t.eventsData&&(this.apiCallStatus={status:l.Bn.COMPLETED,action:"FetchForwardingHistory"},this.eventsData=t.eventsData.currentValue,this.forwardingHistoryData=this.eventsData,t.eventsData.firstChange||this.loadForwardingEventsTable(this.forwardingHistoryData)),t.filterValue&&!t.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Event Information",message:[[{key:"timestamp",value:t.timestamp,title:"Timestamp",width:25,type:l.Gi.DATE_TIME},{key:"amt_in",value:t.amt_in,title:"Inbound Amount (Sats)",width:25,type:l.Gi.NUMBER},{key:"amt_out",value:t.amt_out,title:"Outbound Amount (Sats)",width:25,type:l.Gi.NUMBER},{key:"fee_msat",value:t.fee_msat,title:"Fee (mSats)",width:25,type:l.Gi.NUMBER}],[{key:"alias_in",value:t.alias_in,title:"Inbound Peer Alias",width:25,type:l.Gi.STRING},{key:"chan_id_in",value:t.chan_id_in,title:"Inbound Channel ID",width:25,type:l.Gi.STRING},{key:"alias_out",value:t.alias_out,title:"Outbound Peer Alias",width:25,type:l.Gi.STRING},{key:"chan_id_out",value:t.chan_id_out,title:"Outbound Channel ID",width:25,type:l.Gi.STRING}]]}}}))}loadForwardingEventsTable(t){this.forwardingHistoryEvents=new r.by(t?[...t]:[]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.forwardingHistoryEvents.filterPredicate=(a,o)=>((a.timestamp?this.datePipe.transform(new Date(1e3*a.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(a).toLowerCase()).includes(o),this.forwardingHistoryEvents.paginator=this.paginator,this.logger.info(this.forwardingHistoryEvents)}onDownloadCSV(){this.forwardingHistoryEvents&&this.forwardingHistoryEvents.data&&this.forwardingHistoryEvents.data.length>0&&this.commonService.downloadFile(this.forwardingHistoryEvents.data,"Forwarding-history")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(p.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-forwarding-history"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Events")}]),e.TTD],decls:5,vars:4,consts:[["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","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["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,"dataSource"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias_in"],["matColumnDef","alias_out"],["matColumnDef","amt_in"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amt_out"],["matColumnDef","fee_msat"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Tu,2,1,"div",1),e.YNc(2,bu,4,1,"div",2),e.YNc(3,Gu,30,7,"div",3),e.YNc(4,zu,1,3,"mat-paginator",4),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage))},directives:[d.xw,d.Wh,p.O5,d.yH,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,P.pW,r.BZ,Z.YE,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,R.gD,R.$L,Y.ey,k.lW,r.mD,r.yh,r.Ke,r.Q2,p.mk,S.oO,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.uU,p.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const Wu=["tableIn"],Xu=["tableOut"],$u=["paginatorIn"],ju=["paginatorOut"];function Ku(n,i){if(1&n&&(e.TgZ(0,"div",3),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function ep(n,i){1&n&&e._UZ(0,"mat-progress-bar",37)}function tp(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Channel ID"),e.qZA())}const _e=function(n){return{"max-width":n}};function np(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,_e,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.chan_id)}}function ap(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Peer Alias"),e.qZA())}function ip(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,_e,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.alias)}}function op(n,i){1&n&&(e.TgZ(0,"th",40),e._uU(1,"Events"),e.qZA())}function sp(n,i){if(1&n&&(e.TgZ(0,"td",41)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.events))}}function lp(n,i){1&n&&(e.TgZ(0,"th",40),e._uU(1,"Total Amount (Sats)"),e.qZA())}function rp(n,i){if(1&n&&(e.TgZ(0,"td",41)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_amount))}}function cp(n,i){1&n&&(e.TgZ(0,"th",43)(1,"span",42),e._uU(2,"Actions"),e.qZA()())}function up(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",44)(1,"button",45),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw(2).onRoutingPeerClick(u,o,"in")}),e._uU(2,"View Info"),e.qZA()()}}function pp(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No incoming routing peer available."),e.qZA())}function mp(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting incoming routing peers..."),e.qZA())}function dp(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function _p(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,pp,2,0,"p",47),e.YNc(2,mp,2,0,"p",47),e.YNc(3,dp,2,1,"p",47),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersIncoming&&t.RoutingPeersIncoming.data)||(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const ze=function(n){return{"display-none":n}};function hp(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,ze,(null==t.RoutingPeersIncoming||null==t.RoutingPeersIncoming.data?null:t.RoutingPeersIncoming.data.length)>0))}}function gp(n,i){1&n&&e._UZ(0,"tr",49)}function fp(n,i){1&n&&e._UZ(0,"tr",50)}function Cp(n,i){1&n&&e._UZ(0,"mat-progress-bar",37)}function xp(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Channel ID"),e.qZA())}function yp(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,_e,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.chan_id)}}function Tp(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Peer Alias"),e.qZA())}function bp(n,i){if(1&n&&(e.TgZ(0,"td",39),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("ngStyle",e.VKq(2,_e,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.alias)}}function vp(n,i){1&n&&(e.TgZ(0,"th",40),e._uU(1,"Events"),e.qZA())}function Zp(n,i){if(1&n&&(e.TgZ(0,"td",41)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.events))}}function wp(n,i){1&n&&(e.TgZ(0,"th",40),e._uU(1,"Total Amount (Sats)"),e.qZA())}function Ap(n,i){if(1&n&&(e.TgZ(0,"td",41)(1,"span",42),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_amount))}}function Sp(n,i){1&n&&(e.TgZ(0,"th",43)(1,"span",42),e._uU(2,"Actions"),e.qZA()())}function Lp(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",51)(1,"button",52),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw(2).onRoutingPeerClick(u,o,"out")}),e._uU(2,"View Info"),e.qZA()()}}function kp(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No outgoing routing peer available."),e.qZA())}function Fp(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting outgoing routing peers..."),e.qZA())}function Np(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.errorMessage)}}function qp(n,i){if(1&n&&(e.TgZ(0,"td",46),e.YNc(1,kp,2,0,"p",47),e.YNc(2,Fp,2,0,"p",47),e.YNc(3,Np,2,1,"p",47),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.RoutingPeersOutgoing&&t.RoutingPeersOutgoing.data)||(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}function Up(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw(2);e.Q6J("ngClass",e.VKq(1,ze,(null==t.RoutingPeersOutgoing||null==t.RoutingPeersOutgoing.data?null:t.RoutingPeersOutgoing.data.length)>0))}}function Op(n,i){1&n&&e._UZ(0,"tr",49)}function Rp(n,i){1&n&&e._UZ(0,"tr",50)}const Ip=function(n,i){return{"mt-2":n,"mt-1":i}},Mp=function(){return["no_incoming_event"]},Dp=function(n){return{"mt-2":n}},Pp=function(){return["no_outgoing_event"]};function Jp(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7),e._uU(4,"Incoming"),e.qZA(),e.TgZ(5,"mat-form-field",8)(6,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyIncomingFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().filterIn=o}),e.qZA()()(),e.TgZ(7,"div",10),e.YNc(8,ep,1,0,"mat-progress-bar",11),e.TgZ(9,"table",12,13),e.ynx(11,14),e.YNc(12,tp,2,0,"th",15),e.YNc(13,np,2,4,"td",16),e.BQk(),e.ynx(14,17),e.YNc(15,ap,2,0,"th",15),e.YNc(16,ip,2,4,"td",16),e.BQk(),e.ynx(17,18),e.YNc(18,op,2,0,"th",19),e.YNc(19,sp,4,3,"td",20),e.BQk(),e.ynx(20,21),e.YNc(21,lp,2,0,"th",19),e.YNc(22,rp,4,3,"td",20),e.BQk(),e.ynx(23,22),e.YNc(24,cp,3,0,"th",23),e.YNc(25,up,3,0,"td",24),e.BQk(),e.ynx(26,25),e.YNc(27,_p,4,3,"td",26),e.BQk(),e.YNc(28,hp,1,3,"tr",27),e.YNc(29,gp,1,0,"tr",28),e.YNc(30,fp,1,0,"tr",29),e.qZA()(),e._UZ(31,"mat-paginator",30,31),e.qZA(),e.TgZ(33,"div",5)(34,"div",6)(35,"div",7),e._uU(36,"Outgoing"),e.qZA(),e.TgZ(37,"mat-form-field",8)(38,"input",9),e.NdJ("keyup",function(){return e.CHM(t),e.oxw().applyOutgoingFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw().filterOut=o}),e.qZA()()(),e.TgZ(39,"div",10),e.YNc(40,Cp,1,0,"mat-progress-bar",11),e.TgZ(41,"table",32,33),e.ynx(43,14),e.YNc(44,xp,2,0,"th",15),e.YNc(45,yp,2,4,"td",16),e.BQk(),e.ynx(46,17),e.YNc(47,Tp,2,0,"th",15),e.YNc(48,bp,2,4,"td",16),e.BQk(),e.ynx(49,18),e.YNc(50,vp,2,0,"th",19),e.YNc(51,Zp,4,3,"td",20),e.BQk(),e.ynx(52,21),e.YNc(53,wp,2,0,"th",19),e.YNc(54,Ap,4,3,"td",20),e.BQk(),e.ynx(55,22),e.YNc(56,Sp,3,0,"th",23),e.YNc(57,Lp,3,0,"td",34),e.BQk(),e.ynx(58,35),e.YNc(59,qp,4,3,"td",26),e.BQk(),e.YNc(60,Up,1,3,"tr",27),e.YNc(61,Op,1,0,"tr",28),e.YNc(62,Rp,1,0,"tr",29),e.qZA()(),e._UZ(63,"mat-paginator",30,36),e.qZA()()}if(2&n){const t=e.oxw();e.xp6(2),e.Q6J("ngClass",e.WLB(22,Ip,t.screenSize===t.screenSizeEnum.XS,t.screenSize===t.screenSizeEnum.SM)),e.xp6(4),e.Q6J("ngModel",t.filterIn),e.xp6(2),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.RoutingPeersIncoming),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(25,Mp)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS),e.xp6(3),e.Q6J("ngClass",e.VKq(26,Dp,t.screenSize!==t.screenSizeEnum.LG)),e.xp6(4),e.Q6J("ngModel",t.filterOut),e.xp6(2),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.RoutingPeersOutgoing),e.xp6(19),e.Q6J("matFooterRowDef",e.DdM(28,Pp)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let Ep=(()=>{class n{constructor(t,a,o){this.logger=t,this.commonService=a,this.store=o,this.routingPeersData=[],this.displayedColumns=[],this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]),this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["chan_id","events","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["chan_id","alias","events","total_amount"]):(this.flgSticky=!0,this.displayedColumns=["chan_id","alias","events","total_amount"])}ngOnInit(){this.store.select(C.Bo).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{var a;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,(null===(a=t.apiCallStatus)||void 0===a?void 0:a.status)===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.routingPeersData=t.forwardingHistory.forwarding_events?t.forwardingHistory.forwarding_events:[],this.routingPeersData.length>0&&this.sortIn&&this.paginatorIn&&this.sortOut&&this.paginatorOut&&this.loadRoutingPeersTable(this.routingPeersData),this.logger.info(t.apiCallStatus),this.logger.info(t.forwardingHistory)})}ngAfterViewInit(){this.routingPeersData.length>0&&this.loadRoutingPeersTable(this.routingPeersData)}onRoutingPeerClick(t,a,o){let s=" Routing Information";s="in"===o?"Incoming"+s:"Outgoing"+s,this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:s,message:[[{key:"chan_id",value:t.chan_id,title:"Channel ID",width:50,type:l.Gi.STRING},{key:"alias",value:t.alias,title:"Peer Alias",width:50,type:l.Gi.STRING}],[{key:"events",value:t.events,title:"Events",width:50,type:l.Gi.NUMBER},{key:"total_amount",value:t.total_amount,title:"Total Amount (Sats)",width:50,type:l.Gi.NUMBER}]]}}}))}loadRoutingPeersTable(t){if(t.length>0){const a=this.groupRoutingPeers(t);this.RoutingPeersIncoming=new r.by(a[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new r.by(a[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter()}groupRoutingPeers(t){const a=[],o=[];return t.forEach(s=>{const u=a.find(U=>U.chan_id===s.chan_id_in),g=o.find(U=>U.chan_id===s.chan_id_out);u?(u.events++,u.total_amount=+u.total_amount+ +s.amt_in):a.push({chan_id:s.chan_id_in,alias:s.alias_in,events:1,total_amount:+s.amt_in}),g?(g.events++,g.total_amount=+g.total_amount+ +s.amt_out):o.push({chan_id:s.chan_id_out,alias:s.alias_out,events:1,total_amount:+s.amt_out})}),[this.commonService.sortDescByKey(a,"total_amount"),this.commonService.sortDescByKey(o,"total_amount")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-routing-peers"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Wu,5,Z.YE),e.Gf(Xu,5,Z.YE),e.Gf($u,5),e.Gf(ju,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sortIn=o.first),e.iGM(o=e.CRH())&&(a.sortOut=o.first),e.iGM(o=e.CRH())&&(a.paginatorIn=o.first),e.iGM(o=e.CRH())&&(a.paginatorOut=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Routing peers")}])],decls:3,vars:2,consts:[["fxLayout","column","fxLayoutAlign","start stretch",1,"padding-gap-x"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between start","class","page-sub-title-container",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxLayout.gt-md","row","fxFlex","100","fxLayoutAlign","space-between start",1,"page-sub-title-container"],["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","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource"],["tableIn",""],["matColumnDef","chan_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","total_amount"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-2","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_incoming_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["mat-table","","matSort","",1,"overflow-auto","outgoing-table",3,"dataSource"],["tableOut",""],["mat-cell","","class","pl-2",4,"matCellDef"],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],["mat-cell","","fxLayoutAlign","end center",1,"pl-2"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],["mat-cell","",1,"pl-2"],["mat-stroked-button","","color","primary","type","button","tabindex","5",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,Ku,2,1,"div",1),e.YNc(2,Jp,65,29,"div",2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage))},directives:[d.xw,d.Wh,p.O5,d.yH,p.mk,S.oO,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,P.pW,r.BZ,Z.YE,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,k.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-chan_id[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Qp(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",7),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let Yp=(()=>{class n{constructor(t){this.router=t,this.faChartBar=y.koM,this.links=[{link:"routingreport",name:"Routing"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Reports"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),e.YNc(8,Qp,2,3,"div",6),e.qZA(),e._UZ(9,"router-outlet"),e.qZA()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faChartBar),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.BU,p.sg,D.Nj,T.rH,T.lC],styles:[""]}),n})();var We=h(7671),Xe=h(1210);function Hp(n,i){1&n&&e._UZ(0,"mat-progress-bar",16)}function Bp(n,i){if(1&n&&(e.TgZ(0,"div",17),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw();e.Q6J("@fadeIn",t.events.total_fee_msat),e.xp6(1),e.AsE("",e.xi3(2,3,t.events.total_fee_msat/1e3||0,"1.0-2")," Sats/",e.lcZ(3,6,(null==t.events||null==t.events.forwarding_events?null:t.events.forwarding_events.length)||0)," Events")}}function Vp(n,i){1&n&&(e.TgZ(0,"div",18),e._uU(1,"No routing report for the selected period"),e.qZA())}const Gp=function(n){return{"error-border":n}};function zp(n,i){if(1&n&&(e.TgZ(0,"div",19),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(2,Gp,"Getting Forwarding History..."!==t.errorMessage&&""!==t.errorMessage)),e.xp6(1),e.Oqu(t.errorMessage)}}function Wp(n,i){if(1&n&&(e.TgZ(0,"span")(1,"span",22),e._uU(2),e.ALo(3,"number"),e.qZA(),e.TgZ(4,"span",22),e._uU(5),e.ALo(6,"number"),e.qZA()()),2&n){const t=i.model,a=e.oxw(2);e.xp6(2),e.hij("Events: ",e.lcZ(3,2,(a.selReportBy===a.reportBy.EVENTS?t.value:t.extra.totalEvents)||0),""),e.xp6(3),e.hij("Fee: ",e.xi3(6,4,(a.selReportBy===a.reportBy.EVENTS?t.extra.totalFees:t.value)||0,"1.0-2"),"")}}function Xp(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"ngx-charts-bar-vertical",20),e.NdJ("select",function(o){return e.CHM(t),e.oxw().onChartBarSelected(o)})("mouseup",function(o){return e.CHM(t),e.oxw().onChartMouseUp(o)}),e.YNc(1,Wp,7,7,"ng-template",null,21,e.W1O),e.qZA()}if(2&n){const t=e.oxw();e.Q6J("view",t.view)("results",t.routingReportData)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)}}function $p(n,i){if(1&n&&e._UZ(0,"rtl-forwarding-history",23),2&n){const t=e.oxw();e.Q6J("eventsData",null==t.events?null:t.events.forwarding_events)("filterValue",t.eventFilterValue)}}let jp=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.dataService=a,this.commonService=o,this.store=s,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.events={},this.eventFilterValue="",this.reportBy=l.Xr,this.selReportBy=l.Xr.FEES,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.cu,this.errorMessage="",this.unSubs=[new m.x,new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(C.Q5).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{t.identity_pubkey&&setTimeout(()=>{this.fetchEvents(this.startDate,this.endDate)},10)}),this.commonService.containerSizeUpdated.pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=t.width/10;break;case l.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}fetchEvents(t,a){this.errorMessage=l.m6.GET_FORWARDING_HISTORY;const o=Math.round(t.getTime()/1e3).toString(),s=Math.round(a.getTime()/1e3).toString();this.dataService.getForwardingHistory("LND",o,s).pipe((0,_.R)(this.unSubs[2])).subscribe({next:u=>{this.errorMessage="",u.forwarding_events&&u.forwarding_events.length?(u.forwarding_events=u.forwarding_events.reverse(),this.events=u,this.routingReportData=this.selReportBy===this.reportBy.EVENTS?this.prepareEventsReport(t):this.prepareFeeReport(t)):(this.events={forwarding_events:[],total_fee_msat:0},this.routingReportData=[])},error:u=>{this.errorMessage=u}})}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(t){this.eventFilterValue=this.reportPeriod===l.op[1]?t.name+"/"+this.startDate.getFullYear():t.name.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(t){const a=Math.round(t.getTime()/1e3),o=[];if(this.events.total_fee_msat=0,this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalEvents:0}});this.events.forwarding_events.map(s=>{const u=new Date(1e3*+s.timestamp).getMonth();return o[u].value=o[u].value+ +s.fee_msat/1e3,o[u].extra.totalEvents=o[u].extra.totalEvents+1,this.events.total_fee_msat=(this.events.total_fee_msat?this.events.total_fee_msat:0)+ +s.fee_msat,this.events})}else{for(let s=0;s{const u=Math.floor((+s.timestamp-a)/this.secondsInADay);return o[u].value=o[u].value+ +s.fee_msat/1e3,o[u].extra.totalEvents=o[u].extra.totalEvents+1,this.events.total_fee_msat=(this.events.total_fee_msat?this.events.total_fee_msat:0)+ +s.fee_msat,this.events})}return o}prepareEventsReport(t){const a=Math.round(t.getTime()/1e3),o=[];if(this.events.total_fee_msat=0,this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalFees:0}});this.events.forwarding_events.map(s=>{const u=new Date(1e3*+s.timestamp).getMonth();return o[u].value=o[u].value+1,o[u].extra.totalFees=o[u].extra.totalFees+ +s.fee_msat/1e3,this.events.total_fee_msat=(this.events.total_fee_msat?this.events.total_fee_msat:0)+ +s.fee_msat,this.events})}else{for(let s=0;s{const u=Math.floor((+s.timestamp-a)/this.secondsInADay);return o[u].value=o[u].value+1,o[u].extra.totalFees=o[u].extra.totalFees+ +s.fee_msat/1e3,this.events.total_fee_msat=(this.events.total_fee_msat?this.events.total_fee_msat:0)+ +s.fee_msat,this.events})}return o}onSelectionChange(t){const a=t.selDate.getMonth(),o=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,a,1,0,0,0),this.endDate=new Date(o,a,this.getMonthDays(a,o),23,59,59)),this.fetchEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(t,a){return 1===t&&a%4==0?l.gg[t].days+1:l.gg[t].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(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(j.D),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-routing-report"]],hostBindings:function(t,a){1&t&&e.NdJ("mouseup",function(s){return a.onChartMouseUp(s)})},decls:20,vars:9,consts:[["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 start",1,"my-1",3,"ngModel","ngModelChange","change"],[1,"mr-2"],["tabindex","1",1,"mr-2",3,"value"],["tabindex","2",3,"value"],["mode","indeterminate","class","mt-2",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x","my-1"],["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"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",3,"ngClass",4,"ngIf"],[1,"mt-1"],["class","one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],[3,"eventsData","filterValue",4,"ngIf"],["mode","indeterminate",1,"mt-2"],["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"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1",3,"ngClass"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),e.NdJ("stepChanged",function(s){return a.onSelectionChange(s)}),e.qZA(),e.TgZ(2,"div",2)(3,"mat-radio-group",3),e.NdJ("ngModelChange",function(s){return a.selReportBy=s})("change",function(){return a.onSelReportByChange()}),e.TgZ(4,"span",4),e._uU(5,"Report By: "),e.qZA(),e.TgZ(6,"mat-radio-button",5),e._uU(7,"Fees"),e.qZA(),e.TgZ(8,"mat-radio-button",6),e._uU(9,"Events"),e.qZA()()(),e.YNc(10,Hp,1,0,"mat-progress-bar",7),e.TgZ(11,"div",8),e.YNc(12,Bp,4,8,"div",9),e.YNc(13,Vp,2,0,"div",10),e.YNc(14,zp,2,4,"div",11),e.TgZ(15,"div",12),e.YNc(16,Xp,3,11,"ngx-charts-bar-vertical",13),e.qZA()(),e.TgZ(17,"div",14)(18,"div",12),e.YNc(19,$p,1,2,"rtl-forwarding-history",15),e.qZA()()()),2&t&&(e.xp6(3),e.Q6J("ngModel",a.selReportBy),e.xp6(3),e.s9C("value",a.reportBy.FEES),e.xp6(2),e.s9C("value",a.reportBy.EVENTS),e.xp6(2),e.Q6J("ngIf","Getting Forwarding History..."===a.errorMessage),e.xp6(2),e.Q6J("ngIf",a.routingReportData.length>0&&a.events.forwarding_events&&a.events.forwarding_events.length&&a.events.forwarding_events.length>0),e.xp6(1),e.Q6J("ngIf",(a.routingReportData.length<=0||a.events.forwarding_events.length<=0)&&""===a.errorMessage),e.xp6(1),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(2),e.Q6J("ngIf",a.routingReportData.length>0&&a.events.forwarding_events&&a.events.forwarding_events.length&&a.events.forwarding_events.length>0),e.xp6(3),e.Q6J("ngIf",a.events&&(null==a.events?null:a.events.forwarding_events)&&a.events.forwarding_events.length&&a.events.forwarding_events.length>0))},directives:[d.xw,d.Wh,d.yH,We.D,ie.VQ,c.JJ,c.On,ie.U0,p.O5,P.pW,p.mk,S.oO,Xe.K$,Ge],pipes:[p.JJ],styles:[""],data:{animation:[Te.J]}}),n})();var Kp=h(165);function em(n,i){1&n&&(e.TgZ(0,"div",11),e._UZ(1,"mat-progress-bar",12),e.TgZ(2,"span"),e._uU(3,"Getting transactions data..."),e.qZA()())}function tm(n,i){if(1&n&&(e.TgZ(0,"div",13),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function nm(n,i){if(1&n&&(e.TgZ(0,"div",16),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE(" Paid ",e.xi3(2,2,t.transactionsReportSummary.amountPaidSelectedPeriod/1e3||0,"1.0-2")," Sats/",e.lcZ(3,5,t.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function am(n,i){if(1&n&&(e.TgZ(0,"div",16),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.AsE(" Received ",e.xi3(2,2,t.transactionsReportSummary.amountReceivedSelectedPeriod/1e3||0,"1.0-2")," Sats/",e.lcZ(3,5,t.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function im(n,i){if(1&n&&(e.TgZ(0,"div",14),e.YNc(1,nm,4,7,"div",15),e.YNc(2,am,4,7,"div",15),e.qZA()),2&n){const t=e.oxw();e.Q6J("@fadeIn",t.transactionsReportSummary),e.xp6(1),e.Q6J("ngIf",t.transactionsReportSummary.paymentsSelectedPeriod>0),e.xp6(1),e.Q6J("ngIf",t.transactionsReportSummary.invoicesSelectedPeriod)}}function om(n,i){1&n&&(e.TgZ(0,"div",17),e._uU(1,"No transactions report for the selected period"),e.qZA())}function sm(n,i){if(1&n&&(e.TgZ(0,"span",21),e._uU(1),e.ALo(2,"number"),e.ALo(3,"number"),e.qZA()),2&n){const t=i.model;e.xp6(1),e.HOy("",t.name,": ",e.xi3(2,4,t.value||0,"1.0-2"),"/# ","Paid"===t.name?"Payments":"Invoices",": ",e.lcZ(3,7,(null==t.extra?null:t.extra.total)||0),"")}}function lm(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"ngx-charts-bar-vertical-2d",19),e.NdJ("select",function(o){return e.CHM(t),e.oxw(2).onChartBarSelected(o)})("mouseup",function(o){return e.CHM(t),e.oxw(2).onChartMouseUp(o)}),e.YNc(1,sm,4,9,"ng-template",null,20,e.W1O),e.qZA()}if(2&n){const t=e.oxw(2);e.Q6J("view",t.view)("results",t.transactionsReportData)("noBarWhenZero",!1)("gradient",!1)("xAxis",!0)("yAxis",!0)("showXAxisLabel",!0)("showYAxisLabel",t.showYAxisLabel)("xAxisLabel",t.xAxisLabel)("yAxisLabel",t.yAxisLabel)("showGridLines",!1)("showDataLabel",!1)("groupPadding",t.reportPeriod===t.scrollRanges[0]?2:8)}}function rm(n,i){if(1&n&&(e.TgZ(0,"div",9),e.YNc(1,lm,3,13,"ngx-charts-bar-vertical-2d",18),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",t.transactionsReportData.length>0&&t.transactionsNonZeroReportData.length>0)}}function cm(n,i){if(1&n&&e._UZ(0,"rtl-transactions-report-table",22),2&n){const t=e.oxw();e.Q6J("dataList",t.transactionsNonZeroReportData)("dataRange",t.reportPeriod)("filterValue",t.transactionFilterValue)}}let um=(()=>{class n{constructor(t,a,o){this.logger=t,this.commonService=a,this.store=o,this.scrollRanges=l.op,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[{date:"",name:"1",series:[{extra:{total:0},name:"Paid",value:0},{extra:{total:0},name:"Received",value:0}]}],this.transactionsNonZeroReportData=[{amount_paid:0,amount_received:0,date:"",num_invoices:0,num_payments:0}],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.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(C.l5).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{t.apiCallStatus.status===l.Bn.UN_INITIATED&&this.store.dispatch((0,v.Jo)()),this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.payments=t.allLightningTransactions.listPaymentsAll.payments||[],this.invoices=t.allLightningTransactions.listInvoicesAll.invoices||[],(this.payments.length>0||this.invoices.length>0)&&(this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData()),this.logger.info(t)}),this.commonService.containerSizeUpdated.pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=t.width/10;break;case l.cu.LG:this.screenPaddingX=t.width/16;break;default:this.screenPaddingX=t.width/20}this.view=[t.width-this.screenPaddingX,t.height/2.2],this.logger.info("Container Size: "+JSON.stringify(t)),this.logger.info("View: "+JSON.stringify(this.view))})}onChartMouseUp(t){"svg"===t.srcElement.tagName&&t.srcElement.classList.length>0&&"ngx-charts"===t.srcElement.classList[0]&&(this.transactionFilterValue="")}onChartBarSelected(t){this.transactionFilterValue=this.reportPeriod===l.op[1]?t.series+"/"+this.startDate.getFullYear():t.series.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(t,a){const o=Math.round(t.getTime()/1e3),s=Math.round(a.getTime()/1e3),u=[];this.transactionsNonZeroReportData=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const g=this.payments.filter(x=>"SUCCEEDED"===x.status&&x.creation_date>=o&&x.creation_datex.settled&&+x.creation_date>=o&&+x.creation_date{const q=new Date(1e3*+x.creation_date).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+ +x.value_msat+ +x.fee_msat,u[q].series[0].value=u[q].series[0].value+(+x.value_msat+ +x.fee_msat)/1e3,u[q].series[0].extra.total=u[q].series[0].extra.total+1,this.transactionsReportSummary}),U.map(x=>{const q=new Date(1e3*+x.creation_date).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+ +x.amt_paid_msat,u[q].series[1].value=u[q].series[1].value+ +x.amt_paid_msat/1e3,u[q].series[1].extra.total=u[q].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let x=0;x{const q=Math.floor((+x.creation_date-o)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+ +x.value_msat+ +x.fee_msat,u[q].series[0].value=u[q].series[0].value+(+x.value_msat+ +x.fee_msat)/1e3,u[q].series[0].extra.total=u[q].series[0].extra.total+1,this.transactionsReportSummary}),U.map(x=>{const q=Math.floor((+x.creation_date-o)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+ +x.amt_paid_msat,u[q].series[1].value=u[q].series[1].value+ +x.amt_paid_msat/1e3,u[q].series[1].extra.total=u[q].series[1].extra.total+1,this.transactionsReportSummary})}return u}prepareTableData(){return this.transactionsReportData.reduce((t,a)=>a.series[0].extra.total>0||a.series[1].extra.total>0?t.concat({date:a.date,amount_paid:a.series[0].value,num_payments:a.series[0].extra.total,amount_received:a.series[1].value,num_invoices:a.series[1].extra.total}):t,[])}onSelectionChange(t){const a=t.selDate.getMonth(),o=t.selDate.getFullYear();this.reportPeriod=t.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,a,1,0,0,0),this.endDate=new Date(o,a,this.getMonthDays(a,o),23,59,59)),this.transactionsReportData=this.filterTransactionsForSelectedPeriod(this.startDate,this.endDate),this.transactionsNonZeroReportData=this.prepareTableData(),this.transactionFilterValue=""}getMonthDays(t,a){return 1===t&&a%4==0?l.gg[t].days+1:l.gg[t].days}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-transactions-report"]],hostBindings:function(t,a){1&t&&e.NdJ("mouseup",function(s){return a.onChartMouseUp(s)})},decls:11,vars:6,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100"],[3,"stepChanged"],["class","p-2",4,"ngIf"],["class","p-2 error-border my-2",4,"ngIf"],["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"],["class","mt-1",4,"ngIf"],[1,"mt-1"],[3,"dataList","dataRange","filterValue",4,"ngIf"],[1,"p-2"],["mode","indeterminate"],[1,"p-2","error-border","my-2"],["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"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[1,"two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"dataList","dataRange","filterValue"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"rtl-horizontal-scroller",3),e.NdJ("stepChanged",function(s){return a.onSelectionChange(s)}),e.qZA(),e.YNc(4,em,4,0,"div",4),e.YNc(5,tm,2,1,"div",5),e.YNc(6,im,3,3,"div",6),e.YNc(7,om,2,0,"div",7),e.YNc(8,rm,2,1,"div",8),e.TgZ(9,"div",9),e.YNc(10,cm,1,3,"rtl-transactions-report-table",10),e.qZA()()()()),2&t&&(e.xp6(4),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.ERROR),e.xp6(1),e.Q6J("ngIf",a.transactionsNonZeroReportData.length>0&&a.apiCallStatus.status===a.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",a.transactionsNonZeroReportData.length<=0&&a.apiCallStatus.status===a.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",a.transactionsNonZeroReportData.length>0&&a.apiCallStatus.status===a.apiCallStatusEnum.COMPLETED),e.xp6(2),e.Q6J("ngIf",a.transactionsNonZeroReportData.length>0&&a.apiCallStatus.status===a.apiCallStatusEnum.COMPLETED))},directives:[d.xw,d.Wh,d.yH,We.D,p.O5,P.pW,Xe.H5,Kp.g],pipes:[p.JJ],styles:[""],data:{animation:[Te.J]}}),n})();const pm=["form"];function mm(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"UTXO Label is required."),e.qZA())}function dm(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.labelError)}}function _m(n,i){if(1&n&&(e.TgZ(0,"div",16),e._UZ(1,"fa-icon",17),e.YNc(2,dm,2,1,"span",11),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.labelError)}}let hm=(()=>{class n{constructor(t,a,o,s,u,g){this.dialogRef=t,this.data=a,this.dataService=o,this.store=s,this.snackBar=u,this.commonService=g,this.faExclamationTriangle=y.eHv,this.utxo=null,this.label="",this.labelError="",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.utxo=this.data.utxo,this.label=this.utxo.label}onLabelUTXO(){if(!this.label||""===this.label)return!0;this.labelError="",this.dataService.labelUTXO(this.utxo.outpoint.txid_bytes,this.label,!0).pipe((0,_.R)(this.unSubs[0])).subscribe({next:t=>{this.store.dispatch((0,v.mC)()),this.store.dispatch((0,v.Ly)()),this.snackBar.open("Successfully labelled the UTXO."),this.dialogRef.close()},error:t=>{this.labelError=t}})}resetData(){this.labelError="",this.label=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(j.D),e.Y36(A.yh),e.Y36(te.ux),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-lebel-modal"]],viewQuery:function(t,a){if(1&t&&e.Gf(pm,7),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first)}},decls:20,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex.gt-sm","100"],["autoFocus","","matInput","","placeholder","UTXO Label","name","label","tabindex","1","required","",3,"ngModel","ngModelChange"],[4,"ngIf"],["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"],["mat-button","","color","primary","type","submit","tabindex","8"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5,"Label UTXO"),e.qZA()(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6)(9,"form",7,8),e.NdJ("submit",function(){return a.onLabelUTXO()})("reset",function(){return a.resetData()}),e.TgZ(11,"mat-form-field",9)(12,"input",10),e.NdJ("ngModelChange",function(s){return a.label=s}),e.qZA(),e.YNc(13,mm,2,0,"mat-error",11),e.qZA(),e.YNc(14,_m,3,2,"div",12),e.TgZ(15,"div",13)(16,"button",14),e._uU(17,"Clear"),e.qZA(),e.TgZ(18,"button",15),e._uU(19,"Label UTXO"),e.qZA()()()()()()),2&t&&(e.xp6(6),e.Q6J("mat-dialog-close",!1),e.xp6(6),e.Q6J("ngModel",a.label),e.xp6(1),e.Q6J("ngIf",!a.label),e.xp6(1),e.Q6J("ngIf",""!==a.labelError))},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,J.ZT,b.dn,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,p.O5,f.TO,M.BN],styles:[""]}),n})();function gm(n,i){1&n&&e._UZ(0,"mat-progress-bar",28)}function fm(n,i){1&n&&(e.TgZ(0,"th",29),e._uU(1," Transaction ID "),e.qZA())}function Cm(n,i){1&n&&(e.TgZ(0,"span",35)(1,"mat-icon",36),e._uU(2,"warning"),e.qZA()())}function xm(n,i){if(1&n&&(e.TgZ(0,"span"),e.YNc(1,Cm,3,0,"span",34),e.qZA()),2&n){const t=e.oxw().$implicit;e.oxw();const a=e.MAs(34);e.xp6(1),e.Q6J("ngIf",t.amount_sat<1e3)("ngIfElse",a)}}const $e=function(n){return{"max-width":n}};function ym(n,i){if(1&n&&(e.TgZ(0,"td",30)(1,"span",31),e.YNc(2,xm,2,2,"span",32),e.TgZ(3,"span",33),e._uU(4),e.qZA()()()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(3,$e,a.screenSize===a.screenSizeEnum.XS?"12rem":"25rem")),e.xp6(2),e.Q6J("ngIf",a.utxos.length>0&&a.dustUtxos.length>0&&!a.isDustUTXO),e.xp6(2),e.Oqu(t.outpoint.txid_str)}}function Tm(n,i){1&n&&(e.TgZ(0,"th",37),e._uU(1," Output "),e.qZA())}function bm(n,i){if(1&n&&(e.TgZ(0,"td",38)(1,"span",39),e._uU(2),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(t.outpoint.output_index)}}function vm(n,i){1&n&&(e.TgZ(0,"th",29),e._uU(1," Label "),e.qZA())}function Zm(n,i){if(1&n&&(e.TgZ(0,"td",30),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,$e,a.screenSize===a.screenSizeEnum.XS?"12rem":"25rem")),e.xp6(1),e.hij(" ",null==t?null:t.label," ")}}function wm(n,i){1&n&&(e.TgZ(0,"th",37),e._uU(1," Amount (Sats) "),e.qZA())}function Am(n,i){if(1&n&&(e.TgZ(0,"td",38)(1,"span",39),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.amount_sat||0))}}function Sm(n,i){1&n&&(e.TgZ(0,"th",37),e._uU(1," Confirmations "),e.qZA())}function Lm(n,i){if(1&n&&(e.TgZ(0,"td",38)(1,"span",39),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.confirmations||0))}}function km(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",40)(1,"div",41)(2,"mat-select",42),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",43),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function Fm(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",44)(1,"div",45)(2,"mat-select",46),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",43),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onUTXOClick(s)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",43),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onLabelUTXO(s)}),e._uU(7,"Label"),e.qZA(),e.TgZ(8,"mat-option",43),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onLeaseUTXO(s)}),e._uU(9,"Lease"),e.qZA()()()()}}function Nm(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No UTXO available."),e.qZA())}function qm(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting UTXOs..."),e.qZA())}function Um(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function Om(n,i){if(1&n&&(e.TgZ(0,"td",47),e.YNc(1,Nm,2,0,"p",32),e.YNc(2,qm,2,0,"p",32),e.YNc(3,Um,2,1,"p",32),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listUTXOs&&t.listUTXOs.data)||(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Rm=function(n){return{"display-none":n}};function Im(n,i){if(1&n&&e._UZ(0,"tr",48),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,Rm,(null==t.listUTXOs?null:t.listUTXOs.data)&&(null==t.listUTXOs||null==t.listUTXOs.data?null:t.listUTXOs.data.length)>0))}}function Mm(n,i){1&n&&e._UZ(0,"tr",49)}function Dm(n,i){1&n&&e._UZ(0,"tr",50)}function Pm(n,i){1&n&&e._UZ(0,"mat-icon",36)}const Jm=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Em=function(){return["no_utxo"]};let Qm=(()=>{class n{constructor(t,a,o,s,u,g){this.logger=t,this.commonService=a,this.dataService=o,this.store=s,this.rtlEffects=u,this.decimalPipe=g,this.isDustUTXO=!1,this.addressType=l.x$,this.faMoneyBillWave=y.aj4,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["amount_sat","confirmations","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["tx_id","output","amount_sat","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["tx_id","output","label","amount_sat","confirmations","actions"]):(this.flgSticky=!0,this.displayedColumns=["tx_id","output","label","amount_sat","confirmations","actions"])}ngOnInit(){this.store.select(C.T4).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),t.utxos&&t.utxos.length>0&&(this.dustUtxos=t.utxos.filter(a=>+a.amount_sat<1e3),this.utxos=t.utxos,this.loadUTXOsTable(this.isDustUTXO?this.dustUtxos:this.utxos)),this.logger.info(t)})}ngOnChanges(){!this.isDustUTXO&&this.utxos&&this.utxos.length>0&&this.loadUTXOsTable(this.utxos),this.isDustUTXO&&this.dustUtxos&&this.dustUtxos.length>0&&this.loadUTXOsTable(this.dustUtxos)}applyFilter(){this.listUTXOs.filter=this.selFilter.trim().toLowerCase()}onUTXOClick(t){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"UTXO Information",message:[[{key:"txid",value:t.outpoint.txid_str,title:"Transaction ID",width:100,type:l.Gi.STRING}],[{key:"label",value:t.label,title:"Label",width:100,type:l.Gi.STRING}],[{key:"output_index",value:t.outpoint.output_index,title:"Output Index",width:34,type:l.Gi.NUMBER},{key:"amount_sat",value:t.amount_sat,title:"Amount (Sats)",width:33,type:l.Gi.NUMBER},{key:"confirmations",value:t.confirmations,title:"Confirmations",width:33,type:l.Gi.NUMBER}],[{key:"address_type",value:this.addressType[t.address_type].name,title:"Address Type",width:34},{key:"address",value:t.address,title:"Address",width:66}],[{key:"pk_script",value:t.pk_script,title:"PK Script",width:100,type:l.Gi.STRING}]]}}}))}loadUTXOsTable(t){this.listUTXOs=new r.by([...t]),this.listUTXOs.filterPredicate=(a,o)=>((a.label?a.label.toLowerCase():"")+(a.outpoint.txid_str?a.outpoint.txid_str.toLowerCase():"")+(a.outpoint.output_index?a.outpoint.output_index:"")+(a.outpoint.txid_bytes?a.outpoint.txid_bytes.toLowerCase():"")+(a.address?a.address.toLowerCase():"")+(a.address_type?a.address_type.toLowerCase():"")+(a.amount_sat?a.amount_sat:"")+(a.confirmations?a.confirmations:"")+(a.pk_script?a.pk_script.toLowerCase():"")).includes(o),this.listUTXOs.sortingDataAccessor=(a,o)=>{switch(o){case"tx_id":return a.outpoint.txid_str.toLocaleLowerCase();case"output":return+a.outpoint.output_index;default:return a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null}},this.listUTXOs.sort=this.sort,this.listUTXOs.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.listUTXOs.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listUTXOs)}onLabelUTXO(t){this.store.dispatch((0,w.qR)({payload:{data:{utxo:t,component:hm}}}))}onLeaseUTXO(t){const a=[[{key:"txid_str",value:t.outpoint.txid_str,title:"Transaction ID",width:100}],[{key:"amount_sat",value:this.decimalPipe.transform(t.amount_sat),title:"Amount (Sats)",width:100}]];t.label&&a.splice(1,0,[{key:"label",value:t.label,title:"Label",width:100}]),this.store.dispatch((0,w.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Lease UTXO",informationMessage:"The UTXO will be leased for 10 minutes.",message:a,noBtnText:"Cancel",yesBtnText:"Lease UTXO"}}})),this.rtlEffects.closeConfirm.pipe((0,_.R)(this.unSubs[0])).subscribe(o=>{o&&this.dataService.leaseUTXO(t.outpoint.txid_bytes,t.outpoint.output_index)})}onDownloadCSV(){this.listUTXOs.data&&this.listUTXOs.data.length>0&&this.commonService.downloadFile(this.listUTXOs.data,"UTXOs")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(j.D),e.Y36(A.yh),e.Y36(oe.V),e.Y36(p.JJ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-utxos"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},inputs:{isDustUTXO:"isDustUTXO"},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("UTXOs")}]),e.TTD],decls:35,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","end stretch","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource","ngClass"],["table",""],["matColumnDef","tx_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","output"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","label"],["matColumnDef","amount_sat"],["matColumnDef","confirmations"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-3",4,"matCellDef"],["matColumnDef","no_utxo"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["emptySpace",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["fxLayout","row"],[4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Risk of dust attack","matTooltipPosition","right",4,"ngIf","ngIfElse"],["matTooltip","Risk of dust attack","matTooltipPosition","right"],["fxLayoutAlign","start center","color","warn",1,"small-icon"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"input",3),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(4,"div",4)(5,"div",5),e.YNc(6,gm,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,fm,2,0,"th",10),e.YNc(11,ym,5,5,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,Tm,2,0,"th",13),e.YNc(14,bm,3,1,"td",14),e.BQk(),e.ynx(15,15),e.YNc(16,vm,2,0,"th",10),e.YNc(17,Zm,2,4,"td",11),e.BQk(),e.ynx(18,16),e.YNc(19,wm,2,0,"th",13),e.YNc(20,Am,4,3,"td",14),e.BQk(),e.ynx(21,17),e.YNc(22,Sm,2,0,"th",13),e.YNc(23,Lm,4,3,"td",14),e.BQk(),e.ynx(24,18),e.YNc(25,km,6,0,"th",19),e.YNc(26,Fm,10,0,"td",20),e.BQk(),e.ynx(27,21),e.YNc(28,Om,4,3,"td",22),e.BQk(),e.YNc(29,Im,1,3,"tr",23),e.YNc(30,Mm,1,0,"tr",24),e.YNc(31,Dm,1,0,"tr",25),e.qZA(),e._UZ(32,"mat-paginator",26),e.qZA()()(),e.YNc(33,Pm,1,0,"ng-template",null,27,e.W1O)),2&t&&(e.xp6(3),e.Q6J("ngModel",a.selFilter),e.xp6(3),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.listUTXOs)("ngClass",e.VKq(11,Jm,""!==a.errorMessage)),e.xp6(22),e.Q6J("matFooterRowDef",e.DdM(13,Em)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.yH,d.Wh,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,X.gM,K.Hw,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-label[_ngcontent-%COMP%]{padding-left:1rem;flex:1 1 15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-tx_id[_ngcontent-%COMP%]{flex:1 1 15%}.mat-column-tx_id[_ngcontent-%COMP%] .ellipsis-child[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function Ym(n,i){1&n&&e._UZ(0,"mat-progress-bar",28)}function Hm(n,i){1&n&&(e.TgZ(0,"th",29),e._uU(1," Date/Time "),e.qZA())}function Bm(n,i){if(1&n&&(e.TgZ(0,"td",30),e._uU(1),e.ALo(2,"date"),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Oqu(e.xi3(2,1,1e3*t.time_stamp,"dd/MMM/y HH:mm"))}}function Vm(n,i){1&n&&(e.TgZ(0,"th",29),e._uU(1," Label "),e.qZA())}const Gm=function(n){return{"max-width":n}};function zm(n,i){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,Gm,a.screenSize===a.screenSizeEnum.XS?"12rem":"25rem")),e.xp6(1),e.hij(" ",null==t?null:t.label," ")}}function Wm(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Amount (Sats) "),e.qZA())}function Xm(n,i){if(1&n&&(e.TgZ(0,"span",35),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.Oqu(e.lcZ(2,1,t.amount))}}function $m(n,i){if(1&n&&(e.TgZ(0,"span",36),e._uU(1),e.ALo(2,"number"),e.qZA()),2&n){const t=e.oxw().$implicit;e.xp6(1),e.hij("(",e.lcZ(2,1,-1*t.amount),")")}}function jm(n,i){if(1&n&&(e.TgZ(0,"td",30),e.YNc(1,Xm,3,3,"span",33),e.YNc(2,$m,3,3,"span",34),e.qZA()),2&n){const t=i.$implicit;e.xp6(1),e.Q6J("ngIf",t.amount>0||0===t.amount),e.xp6(1),e.Q6J("ngIf",t.amount<0)}}function Km(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Fees (Sats) "),e.qZA())}function ed(n,i){if(1&n&&(e.TgZ(0,"td",30)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_fees))}}function td(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Block Height "),e.qZA())}function nd(n,i){if(1&n&&(e.TgZ(0,"td",30)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.block_height))}}function ad(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Confirmations "),e.qZA())}function id(n,i){if(1&n&&(e.TgZ(0,"td",30)(1,"span",35),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.hij(" ",e.lcZ(3,1,null==t?null:t.num_confirmations)," ")}}function od(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"th",37)(1,"div",38)(2,"mat-select",39),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",40),e.NdJ("click",function(){return e.CHM(t),e.oxw().onDownloadCSV()}),e._uU(5,"Download CSV"),e.qZA()()()()}}function sd(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",41)(1,"button",42),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onTransactionClick(s)}),e._uU(2,"View Info"),e.qZA()()}}function ld(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No transaction available."),e.qZA())}function rd(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting transactions..."),e.qZA())}function cd(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function ud(n,i){if(1&n&&(e.TgZ(0,"td",43),e.YNc(1,ld,2,0,"p",44),e.YNc(2,rd,2,0,"p",44),e.YNc(3,cd,2,1,"p",44),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.listTransactions&&t.listTransactions.data)||(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listTransactions&&t.listTransactions.data)||(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.listTransactions&&t.listTransactions.data)||(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const pd=function(n){return{"display-none":n}};function md(n,i){if(1&n&&e._UZ(0,"tr",45),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,pd,(null==t.listTransactions?null:t.listTransactions.data)&&(null==t.listTransactions||null==t.listTransactions.data?null:t.listTransactions.data.length)>0))}}function dd(n,i){1&n&&e._UZ(0,"tr",46)}function _d(n,i){1&n&&e._UZ(0,"tr",47)}const hd=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},gd=function(){return["no_transaction"]};let fd=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.commonService=a,this.store=o,this.datePipe=s,this.faHistory=y.qO$,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["time_stamp","amount","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["time_stamp","amount","num_confirmations","total_fees","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["time_stamp","label","amount","total_fees","num_confirmations","actions"]):(this.flgSticky=!0,this.displayedColumns=["time_stamp","label","amount","total_fees","block_height","num_confirmations","actions"])}ngOnInit(){this.store.select(C.dx).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),t.transactions&&t.transactions.length>0&&(this.transactions=t.transactions,this.loadTransactionsTable(this.transactions)),this.logger.info(t)})}ngOnChanges(){this.transactions&&this.transactions.length>0&&this.loadTransactionsTable(this.transactions)}applyFilter(){this.listTransactions.filter=this.selFilter.trim().toLowerCase()}onTransactionClick(t){this.store.dispatch((0,w.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Transaction Information",message:[[{key:"block_hash",value:t.block_hash,title:"Block Hash",width:100}],[{key:"tx_hash",value:t.tx_hash,title:"Transaction Hash",width:100}],[{key:"label",value:t.label,title:"Label",width:100,type:l.Gi.STRING}],[{key:"time_stamp",value:t.time_stamp,title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"block_height",value:t.block_height,title:"Block Height",width:50,type:l.Gi.NUMBER}],[{key:"num_confirmations",value:t.num_confirmations,title:"Number of Confirmations",width:34,type:l.Gi.NUMBER},{key:"total_fees",value:t.total_fees,title:"Total Fees (Sats)",width:33,type:l.Gi.NUMBER},{key:"amount",value:t.amount,title:"Amount (Sats)",width:33,type:l.Gi.NUMBER}],[{key:"dest_addresses",value:t.dest_addresses,title:"Destination Addresses",width:100,type:l.Gi.ARRAY}]],scrollable:t.dest_addresses&&t.dest_addresses.length>5}}}))}loadTransactionsTable(t){this.listTransactions=new r.by([...t]),this.listTransactions.sort=this.sort,this.listTransactions.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.listTransactions.filterPredicate=(a,o)=>((a.time_stamp?this.datePipe.transform(new Date(1e3*a.time_stamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(a).toLowerCase()).includes(o),this.listTransactions.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listTransactions)}onDownloadCSV(){this.listTransactions.data&&this.listTransactions.data.length>0&&this.commonService.downloadFile(this.listTransactions.data,"Transactions")}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(p.uU))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-transaction-history"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Transactions")}]),e.TTD],decls:36,vars:14,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","end stretch","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource","ngClass"],["table",""],["matColumnDef","time_stamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","label"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","total_fees"],["matColumnDef","block_height"],["matColumnDef","num_confirmations"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_transaction"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-cell","",3,"ngStyle"],["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","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"input",3),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(4,"div",4)(5,"div",5),e.YNc(6,Ym,1,0,"mat-progress-bar",6),e.TgZ(7,"table",7,8),e.ynx(9,9),e.YNc(10,Hm,2,0,"th",10),e.YNc(11,Bm,3,4,"td",11),e.BQk(),e.ynx(12,12),e.YNc(13,Vm,2,0,"th",10),e.YNc(14,zm,2,4,"td",13),e.BQk(),e.ynx(15,14),e.YNc(16,Wm,2,0,"th",15),e.YNc(17,jm,3,2,"td",11),e.BQk(),e.ynx(18,16),e.YNc(19,Km,2,0,"th",15),e.YNc(20,ed,4,3,"td",11),e.BQk(),e.ynx(21,17),e.YNc(22,td,2,0,"th",15),e.YNc(23,nd,4,3,"td",11),e.BQk(),e.ynx(24,18),e.YNc(25,ad,2,0,"th",15),e.YNc(26,id,4,3,"td",11),e.BQk(),e.ynx(27,19),e.YNc(28,od,6,0,"th",20),e.YNc(29,sd,3,0,"td",21),e.BQk(),e.ynx(30,22),e.YNc(31,ud,4,3,"td",23),e.BQk(),e.YNc(32,md,1,3,"tr",24),e.YNc(33,dd,1,0,"tr",25),e.YNc(34,_d,1,0,"tr",26),e.qZA(),e._UZ(35,"mat-paginator",27),e.qZA()()()),2&t&&(e.xp6(3),e.Q6J("ngModel",a.selFilter),e.xp6(3),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.listTransactions)("ngClass",e.VKq(11,hd,""!==a.errorMessage)),e.xp6(25),e.Q6J("matFooterRowDef",e.DdM(13,gd)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.yH,d.Wh,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,R.gD,R.$L,Y.ey,k.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.uU,p.JJ],styles:[".mat-column-label[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function Cd(n,i){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"UTXOs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numUtxos)}}function xd(n,i){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"Transactions"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numTransactions)}}function yd(n,i){if(1&n&&(e.TgZ(0,"span",5),e._uU(1,"Dust UTXOs"),e.qZA()),2&n){const t=e.oxw();e.s9C("matBadge",t.numDustUtxos)}}let Td=(()=>{class n{constructor(t,a){this.logger=t,this.store=a,this.selectedTableIndex=0,this.selectedTableIndexChange=new e.vpe,this.numTransactions=0,this.numUtxos=0,this.numDustUtxos=0,this.unSubs=[new m.x,new m.x,new m.x]}ngOnInit(){this.store.dispatch((0,v.mC)()),this.store.dispatch((0,v.Ly)()),this.store.select(C.T4).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{t.utxos&&t.utxos.length>0&&(this.numUtxos=t.utxos.length,this.numDustUtxos=t.utxos.filter(a=>+a.amount_sat<1e3).length),this.logger.info(t)}),this.store.select(C.dx).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{t.transactions&&t.transactions.length>0&&(this.numTransactions=t.transactions.length),this.logger.info(t)})}onSelectedIndexChanged(t){this.selectedTableIndexChange.emit(t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-utxo-tables"]],inputs:{selectedTableIndex:"selectedTableIndex"},outputs:{selectedTableIndexChange:"selectedTableIndexChange"},decls:11,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"bordered-box"],[3,"selectedIndex","selectedIndexChange"],["mat-tab-label",""],["fxLayout","row","fxFlex","100",3,"isDustUTXO"],["fxLayout","row","fxFlex","100"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"mat-tab-group",1),e.NdJ("selectedIndexChange",function(s){return a.onSelectedIndexChanged(s)}),e.TgZ(2,"mat-tab"),e.YNc(3,Cd,2,1,"ng-template",2),e._UZ(4,"rtl-on-chain-utxos",3),e.qZA(),e.TgZ(5,"mat-tab"),e.YNc(6,xd,2,1,"ng-template",2),e._UZ(7,"rtl-on-chain-transaction-history",4),e.qZA(),e.TgZ(8,"mat-tab"),e.YNc(9,yd,2,1,"ng-template",2),e._UZ(10,"rtl-on-chain-utxos",3),e.qZA()()()),2&t&&(e.xp6(1),e.Q6J("selectedIndex",a.selectedTableIndex),e.xp6(3),e.Q6J("isDustUTXO",!1),e.xp6(6),e.Q6J("isDustUTXO",!0))},directives:[d.xw,d.yH,d.Wh,D.SP,D.uX,D.uD,fe.k,Qm,fd],styles:[""]}),n})();const bd=function(n,i){return[n,i]};function vd(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",12),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=null==s?null:s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.Q6J("active",a.activeLink===(null==t?null:t.link))("routerLink",e.WLB(3,bd,null==t?null:t.link,null==a.selectedTable?null:a.selectedTable.name)),e.xp6(1),e.Oqu(null==t?null:t.name)}}let Zd=(()=>{class n{constructor(t,a,o){this.store=t,this.router=a,this.activatedRoute=o,this.selNode={},this.faExchangeAlt=y.Ssp,this.faChartPie=y.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"},{link:"sweep",name:"Sweep All"}],this.activeLink=this.links[0].link,this.tables=[{id:0,name:"utxos"},{id:1,name:"trans"},{id:2,name:"dustUtxos"}],this.selectedTable=this.tables[0],this.unSubs=[new m.x,new m.x,new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.selectedTable=this.tables.find(a=>a.name===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link,this.selectedTable=this.tables.find(s=>s.name===a.urlAfterRedirects.substring(a.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.$k).pipe((0,_.R)(this.unSubs[1])).subscribe(a=>{this.selNode=a}),this.store.select(C.qU).pipe((0,_.R)(this.unSubs[2])).subscribe(a=>{this.balances=[{title:"Total Balance",dataValue:a.blockchainBalance.total_balance||0},{title:"Confirmed",dataValue:a.blockchainBalance.confirmed_balance},{title:"Unconfirmed",dataValue:a.blockchainBalance.unconfirmed_balance}]})}onSelectedTableIndexChanged(t){this.selectedTable=this.tables.find(a=>a.id===t),this.router.navigate(["./",this.activeLink,this.selectedTable.name],{relativeTo:this.activatedRoute})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(T.F0),e.Y36(T.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain"]],decls:21,vars:5,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100",3,"selectedTableIndex","selectedTableIndexChange"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"On-chain Balance"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),e._UZ(7,"rtl-currency-unit-converter",5),e.qZA()()(),e.TgZ(8,"div",0),e._UZ(9,"fa-icon",1),e.TgZ(10,"span",2),e._uU(11,"On-chain Transactions"),e.qZA()(),e.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",7),e.YNc(16,vd,2,6,"div",8),e.qZA(),e.TgZ(17,"div",9),e._UZ(18,"router-outlet"),e.qZA(),e.TgZ(19,"div",10)(20,"rtl-utxo-tables",11),e.NdJ("selectedTableIndexChange",function(s){return a.onSelectedTableIndexChanged(s)}),e.qZA()()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faChartPie),e.xp6(6),e.Q6J("values",a.balances),e.xp6(2),e.Q6J("icon",a.faExchangeAlt),e.xp6(7),e.Q6J("ngForOf",a.links),e.xp6(4),e.Q6J("selectedTableIndex",null==a.selectedTable?null:a.selectedTable.id))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,ge.D,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC,Td],styles:[""]}),n})();var wd=h(9122);function Ad(n,i){if(1&n&&(e.TgZ(0,"mat-option",7),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.hij(" ",t.addressTp," ")}}let Sd=(()=>{class n{constructor(t,a){this.store=t,this.lndEffects=a,this.addressTypes=l._t,this.selectedAddressType=l._t[0],this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,v._E)({payload:this.selectedAddressType})),this.lndEffects.setNewAddress.pipe((0,V.q)(1)).subscribe(t=>{this.newAddress=t,setTimeout(()=>{this.store.dispatch((0,w.qR)({payload:{data:{address:this.newAddress,addressType:this.selectedAddressType.addressTp,component:wd.n}}}))},0)})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(ee.l))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-receive"]],decls:8,vars:2,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start end"],["fxFlex","48","fxFlex.gt-md","25","fxLayoutAlign","start end",1,"mr-2"],["placeholder","Address Type","name","address_type","tabindex","1",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[1,"mt-2"],["mat-flat-button","","color","primary","tabindex","2",1,"top-minus-15px",3,"click"],[3,"value"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-form-field",2)(3,"mat-select",3),e.NdJ("ngModelChange",function(s){return a.selectedAddressType=s}),e.YNc(4,Ad,2,2,"mat-option",4),e.qZA()(),e.TgZ(5,"div",5)(6,"button",6),e.NdJ("click",function(){return a.onGenerateAddress()}),e._uU(7,"Generate Address"),e.qZA()()()()),2&t&&(e.xp6(3),e.Q6J("ngModel",a.selectedAddressType),e.xp6(1),e.Q6J("ngForOf",a.addressTypes))},directives:[d.xw,d.Wh,f.KE,d.yH,R.gD,c.JJ,c.On,p.sg,Y.ey,k.lW],styles:[""]}),n})();var Ld=h(8012),je=h(8377);const kd=["form"],Fd=["formSweepAll"],Nd=["stepper"];function qd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Bitcoin address is required."),e.qZA())}function Ud(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.amountError)}}function Od(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t),e.xp6(1),e.Oqu(t)}}function Rd(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function Id(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Number of blocks is required."),e.qZA())}function Md(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",23)(1,"input",32,33),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).transactionBlocks=o}),e.qZA(),e.YNc(3,Id,2,0,"mat-error",14),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.transactionBlocks)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.transactionBlocks)}}function Dd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function Pd(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-form-field",23)(1,"input",34,35),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw(2).transactionFees=o}),e.qZA(),e.YNc(3,Dd,2,0,"mat-error",14),e.qZA()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngModel",t.transactionFees)("step",1)("min",0),e.xp6(2),e.Q6J("ngIf",!t.transactionFees)}}function Jd(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.sendFundError)}}function Ed(n,i){if(1&n&&(e.TgZ(0,"div",36),e._UZ(1,"fa-icon",37),e.YNc(2,Jd,2,1,"span",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.sendFundError)}}function Qd(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"form",9,10),e.NdJ("submit",function(){return e.CHM(t),e.oxw().onSendFunds()})("reset",function(){return e.CHM(t),e.oxw().resetData()}),e.TgZ(2,"mat-form-field",11)(3,"input",12,13),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().transactionAddress=o}),e.qZA(),e.YNc(5,qd,2,0,"mat-error",14),e.qZA(),e.TgZ(6,"mat-form-field",15)(7,"input",16,17),e.NdJ("ngModelChange",function(o){return e.CHM(t),e.oxw().transactionAmount=o}),e.qZA(),e.TgZ(9,"span",18),e._uU(10),e.qZA(),e.YNc(11,Ud,2,1,"mat-error",14),e.qZA(),e.TgZ(12,"mat-form-field",19)(13,"mat-select",20),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().onAmountUnitChange(o)}),e.YNc(14,Od,2,2,"mat-option",21),e.qZA()(),e.TgZ(15,"div",22)(16,"mat-form-field",23)(17,"mat-select",24),e.NdJ("valueChange",function(o){return e.CHM(t),e.oxw().selTransType=o}),e.YNc(18,Rd,2,2,"mat-option",21),e.qZA()(),e.YNc(19,Md,4,4,"mat-form-field",25),e.YNc(20,Pd,4,4,"mat-form-field",25),e.qZA(),e._UZ(21,"div",26),e.YNc(22,Ed,3,2,"div",27),e.TgZ(23,"div",28)(24,"button",29),e._uU(25,"Clear Fields"),e.qZA(),e.TgZ(26,"button",30),e._uU(27,"Send Funds"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(3),e.Q6J("ngModel",t.transactionAddress),e.xp6(2),e.Q6J("ngIf",!t.transactionAddress),e.xp6(2),e.Q6J("ngModel",t.transactionAmount)("step",100)("min",0),e.xp6(3),e.hij(" ",t.selAmountUnit," "),e.xp6(1),e.Q6J("ngIf",!t.transactionAmount),e.xp6(2),e.Q6J("value",t.selAmountUnit),e.xp6(1),e.Q6J("ngForOf",t.amountUnits),e.xp6(3),e.Q6J("value",t.selTransType),e.xp6(1),e.Q6J("ngForOf",t.transTypes),e.xp6(1),e.Q6J("ngIf","1"===t.selTransType),e.xp6(1),e.Q6J("ngIf","2"===t.selTransType),e.xp6(2),e.Q6J("ngIf",""!==t.sendFundError)}}function Yd(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(3);e.Oqu(t.passwordFormLabel)}}function Hd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Password is required."),e.qZA())}function Bd(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"mat-step",42)(1,"form",61),e.YNc(2,Yd,1,1,"ng-template",55),e.TgZ(3,"div",0)(4,"mat-form-field",1),e._UZ(5,"input",62),e.YNc(6,Hd,2,0,"mat-error",14),e.qZA()(),e.TgZ(7,"div",63)(8,"button",64),e.NdJ("click",function(){return e.CHM(t),e.oxw(2).onAuthenticate()}),e._uU(9,"Confirm"),e.qZA()()()()}if(2&n){const t=e.oxw(2);e.Q6J("stepControl",t.passwordFormGroup)("editable",t.flgEditable),e.xp6(1),e.Q6J("formGroup",t.passwordFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.passwordFormGroup.controls.password.errors?null:t.passwordFormGroup.controls.password.errors.required)}}function Vd(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.sendFundFormLabel)}}function Gd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Bitcoin address is required."),e.qZA())}function zd(n,i){if(1&n&&(e.TgZ(0,"mat-option",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit;e.Q6J("value",t.id),e.xp6(1),e.hij(" ",t.name," ")}}function Wd(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Number of blocks is required."),e.qZA())}function Xd(n,i){if(1&n&&(e.TgZ(0,"mat-form-field",65),e._UZ(1,"input",66),e.YNc(2,Wd,2,0,"mat-error",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("step",1)("min",0),e.xp6(1),e.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionBlocks.errors?null:t.sendFundFormGroup.controls.transactionBlocks.errors.required)}}function $d(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Fees is required."),e.qZA())}function jd(n,i){if(1&n&&(e.TgZ(0,"mat-form-field",65),e._UZ(1,"input",67),e.YNc(2,$d,2,0,"mat-error",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("step",1)("min",0),e.xp6(1),e.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionFees.errors?null:t.sendFundFormGroup.controls.transactionFees.errors.required)}}function Kd(n,i){if(1&n&&e._uU(0),2&n){const t=e.oxw(2);e.Oqu(t.confirmFormLabel)}}function e_(n,i){if(1&n&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Oqu(t.sendFundError)}}function t_(n,i){if(1&n&&(e.TgZ(0,"div",36),e._UZ(1,"fa-icon",37),e.YNc(2,e_,2,1,"span",14),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("icon",t.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==t.sendFundError)}}function n_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",38)(1,"mat-vertical-stepper",39,40),e.NdJ("selectionChange",function(o){return e.CHM(t),e.oxw().stepSelectionChanged(o)}),e.YNc(3,Bd,10,4,"mat-step",41),e.TgZ(4,"mat-step",42)(5,"form",43),e.YNc(6,Vd,1,1,"ng-template",44),e.TgZ(7,"div",45)(8,"mat-form-field",46),e._UZ(9,"input",47),e.YNc(10,Gd,2,0,"mat-error",14),e.qZA(),e.TgZ(11,"mat-form-field",48)(12,"mat-select",49),e.YNc(13,zd,2,2,"mat-option",21),e.qZA()(),e.YNc(14,Xd,3,3,"mat-form-field",50),e.YNc(15,jd,3,3,"mat-form-field",50),e.qZA(),e.TgZ(16,"div",51)(17,"button",52),e._uU(18,"Next"),e.qZA()()()(),e.TgZ(19,"mat-step",53)(20,"form",54),e.YNc(21,Kd,1,1,"ng-template",55),e.TgZ(22,"div",38)(23,"div",56),e._UZ(24,"fa-icon",57),e.TgZ(25,"span"),e._uU(26,"You are about to sweep all funds from RTL. Are you sure?"),e.qZA()(),e.YNc(27,t_,3,2,"div",27),e.TgZ(28,"div",51)(29,"button",58),e.NdJ("click",function(){return e.CHM(t),e.oxw().onSendFunds()}),e._uU(30,"Sweep All Funds"),e.qZA()()()()()(),e.TgZ(31,"div",59)(32,"button",60),e._uU(33),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(1),e.Q6J("linear",!0),e.xp6(2),e.Q6J("ngIf",!t.appConfig.sso.rtlSSO),e.xp6(1),e.Q6J("stepControl",t.sendFundFormGroup)("editable",t.flgEditable),e.xp6(1),e.Q6J("formGroup",t.sendFundFormGroup),e.xp6(5),e.Q6J("ngIf",null==t.sendFundFormGroup.controls.transactionAddress.errors?null:t.sendFundFormGroup.controls.transactionAddress.errors.required),e.xp6(3),e.Q6J("ngForOf",t.transTypes),e.xp6(1),e.Q6J("ngIf","1"===t.sendFundFormGroup.controls.selTransType.value),e.xp6(1),e.Q6J("ngIf","2"===t.sendFundFormGroup.controls.selTransType.value),e.xp6(4),e.Q6J("stepControl",t.confirmFormGroup),e.xp6(1),e.Q6J("formGroup",t.confirmFormGroup),e.xp6(4),e.Q6J("icon",t.faExclamationTriangle),e.xp6(3),e.Q6J("ngIf",""!==t.sendFundError),e.xp6(5),e.Q6J("mat-dialog-close",!1),e.xp6(1),e.Oqu(t.flgValidated?"Close":"Cancel")}}let a_=(()=>{class n{constructor(t,a,o,s,u,g,U,x,q,re){this.dialogRef=t,this.data=a,this.logger=o,this.store=s,this.rtlEffects=u,this.commonService=g,this.decimalPipe=U,this.snackBar=x,this.actions=q,this.formBuilder=re,this.faExclamationTriangle=y.eHv,this.sweepAll=!1,this.selNode={},this.addressTypes=[],this.selectedAddress={},this.blockchainBalance={},this.information={},this.newAddress="",this.transactionAddress="",this.transactionAmount=null,this.transactionFees=null,this.transactionBlocks=null,this.transTypes=[{id:"1",name:"Target Confirmation Blocks"},{id:"2",name:"Fee"}],this.selTransType="1",this.fiatConversion=!1,this.amountUnits=l.uA,this.selAmountUnit=l.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=l.Xz,this.sendFundError="",this.flgValidated=!1,this.flgEditable=!0,this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds",this.confirmFormLabel="Confirm sweep",this.amountError="Amount is Required.",this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x]}ngOnInit(){this.sweepAll=this.data.sweepAll,this.passwordFormGroup=this.formBuilder.group({hiddenPassword:["",[c.kI.required]],password:["",[c.kI.required]]}),this.sendFundFormGroup=this.formBuilder.group({transactionAddress:["",c.kI.required],transactionBlocks:[null],transactionFees:[null],selTransType:["1",c.kI.required]}),this.confirmFormGroup=this.formBuilder.group({}),this.sendFundFormGroup.controls.selTransType.valueChanges.pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{"1"===t?(this.sendFundFormGroup.controls.transactionBlocks.setValidators([c.kI.required]),this.sendFundFormGroup.controls.transactionBlocks.setValue(null),this.sendFundFormGroup.controls.transactionFees.setValidators(null),this.sendFundFormGroup.controls.transactionFees.setValue(null)):(this.sendFundFormGroup.controls.transactionBlocks.setValidators(null),this.sendFundFormGroup.controls.transactionBlocks.setValue(null),this.sendFundFormGroup.controls.transactionFees.setValidators([c.kI.required]),this.sendFundFormGroup.controls.transactionFees.setValue(null))}),this.store.select(je.Yj).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.appConfig=t}),this.store.select(je.dT).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.fiatConversion=t.settings.fiatConversion,this.amountUnits=t.settings.currencyUnits,this.logger.info(t)}),this.actions.pipe((0,_.R)(this.unSubs[3]),(0,E.h)(t=>t.type===l.uR.UPDATE_API_CALL_STATUS_LND||t.type===l.uR.SET_CHANNEL_TRANSACTION_RES_LND)).subscribe(t=>{t.type===l.uR.SET_CHANNEL_TRANSACTION_RES_LND&&(this.store.dispatch((0,w.jW)({payload:this.sweepAll?"All Funds Sent Successfully!":"Fund Sent Successfully!"})),this.dialogRef.close()),t.type===l.uR.UPDATE_API_CALL_STATUS_LND&&t.payload.status===l.Bn.ERROR&&"SetChannelTransaction"===t.payload.action&&(this.sendFundError=t.payload.message)})}onAuthenticate(){if(!this.passwordFormGroup.controls.password.value)return!0;this.flgValidated=!1,this.store.dispatch((0,w.QO)({payload:Ld(this.passwordFormGroup.controls.password.value).toString()})),this.rtlEffects.isAuthorizedRes.pipe((0,V.q)(1)).subscribe(t=>{"ERROR"!==t?(this.passwordFormGroup.controls.hiddenPassword.setValue(this.passwordFormGroup.controls.password.value),this.stepper.next()):(this.dialogRef.close(),this.snackBar.open("Unauthorized User. Logging out from RTL."))})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="";const t={amount:this.transactionAmount?this.transactionAmount:0,sendAll:this.sweepAll};this.sweepAll?(t.address=this.sendFundFormGroup.controls.transactionAddress.value,"1"===this.sendFundFormGroup.controls.selTransType.value&&(t.blocks=this.sendFundFormGroup.controls.transactionBlocks.value),"2"===this.sendFundFormGroup.controls.selTransType.value&&(t.fees=this.sendFundFormGroup.controls.transactionFees.value)):(t.address=this.transactionAddress,"1"===this.selTransType&&(t.blocks=this.transactionBlocks),"2"===this.selTransType&&(t.fees=this.transactionFees)),this.transactionAmount&&this.selAmountUnit!==l.NT.SATS?this.commonService.convertCurrency(this.transactionAmount,this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit,l.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,_.R)(this.unSubs[4])).subscribe({next:a=>{this.selAmountUnit=l.NT.SATS,t.amount=+this.decimalPipe.transform(a[this.amountUnits[0]],this.currencyUnitFormats[this.amountUnits[0]]).replace(/,/g,""),this.store.dispatch((0,v.Wi)({payload:t}))},error:a=>{this.transactionAmount=null,this.selAmountUnit=l.NT.SATS,this.amountError="Conversion Error: "+a}}):this.store.dispatch((0,v.Wi)({payload:t}))}get invalidValues(){return this.sweepAll?!this.sendFundFormGroup.controls.transactionAddress.value||""===this.sendFundFormGroup.controls.transactionAddress.value||"1"===this.sendFundFormGroup.controls.selTransType.value&&(!this.sendFundFormGroup.controls.transactionBlocks.value||this.sendFundFormGroup.controls.transactionBlocks.value<=0)||"2"===this.sendFundFormGroup.controls.selTransType.value&&(!this.sendFundFormGroup.controls.transactionFees.value||this.sendFundFormGroup.controls.transactionFees.value<=0):!this.transactionAddress||""===this.transactionAddress||!this.transactionAmount||this.transactionAmount<=0||"1"===this.selTransType&&(!this.transactionBlocks||this.transactionBlocks<=0)||"2"===this.selTransType&&(!this.transactionFees||this.transactionFees<=0)}resetData(){this.sendFundError="",this.selTransType="1",this.transactionAddress="",this.transactionBlocks=null,this.transactionFees=null,this.sweepAll||(this.transactionAmount=null)}stepSelectionChanged(t){switch(this.sendFundError="",t.selectedIndex){case 0:default:this.passwordFormLabel="Authenticate with your RTL password",this.sendFundFormLabel="Sweep funds";break;case 1:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds";break;case 2:this.passwordFormLabel="User authenticated successfully",this.sendFundFormLabel="Sweep funds | Address: "+this.sendFundFormGroup.controls.transactionAddress.value+" | "+this.transTypes[this.sendFundFormGroup.controls.selTransType.value-1].name+("2"===this.sendFundFormGroup.controls.selTransType.value?" (Sats/vByte)":"")+": "+("1"===this.sendFundFormGroup.controls.selTransType.value?this.sendFundFormGroup.controls.transactionBlocks.value:this.sendFundFormGroup.controls.transactionFees.value)}t.selectedIndex{this.selAmountUnit=t.value,a.transactionAmount=+a.decimalPipe.transform(g[s],a.currencyUnitFormats[s]).replace(/,/g,"")},error:g=>{a.transactionAmount=null,this.amountError="Conversion Error: "+g,this.selAmountUnit=o,s=o}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(J.so),e.Y36(J.WI),e.Y36(N.mQ),e.Y36(A.yh),e.Y36(oe.V),e.Y36(O.v),e.Y36(p.JJ),e.Y36(te.ux),e.Y36(G.eX),e.Y36(c.qu))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-send-modal"]],viewQuery:function(t,a){if(1&t&&(e.Gf(kd,7),e.Gf(Fd,5),e.Gf(Nd,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.form=o.first),e.iGM(o=e.CRH())&&(a.formSweepAll=o.first),e.iGM(o=e.CRH())&&(a.stepper=o.first)}},decls:12,vars:4,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100","class","overflow-x-hidden",3,"submit","reset",4,"ngIf","ngIfElse"],["sweepAllBlock",""],["fxLayout","row wrap","fxLayoutAlign","space-between start","fxFlex","100",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex.gt-sm","55"],["autoFocus","","matInput","","placeholder","Bitcoin Address","tabindex","1","name","address","required","",3,"ngModel","ngModelChange"],["address","ngModel"],[4,"ngIf"],["fxFlex.gt-sm","30"],["matInput","","placeholder","Amount","name","amt","type","number","tabindex","2","required","",3,"ngModel","step","min","ngModelChange"],["amnt","ngModel"],["matSuffix",""],["fxFlex.gt-sm","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxFlex.gt-sm","60","fxLayout.gt-sm","row wrap","fxLayoutAlign","start stretch","fxLayoutAlign.gt-sm","space-between start"],["fxFlex","48"],["tabindex","4",3,"value","valueChange"],["fxFlex","48",4,"ngIf"],["fxLayout","column","fxFlex","100","fxFlex.gt-sm","40","fxLayout.gt-sm","row wrap","fxLayoutAlign","start stretch","fxLayoutAlign.gt-sm","space-between start"],["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"],["mat-button","","color","primary","type","submit","tabindex","8"],[3,"value"],["matInput","","placeholder","Number of Blocks","type","number","name","blcks","required","","tabindex","5",3,"ngModel","step","min","ngModelChange"],["blocks","ngModel"],["matInput","","placeholder","Fees (Sats/vByte)","type","number","name","chainFees","required","","tabindex","6",3,"ngModel","step","min","ngModelChange"],["fees","ngModel"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable",4,"ngIf"],[3,"stepControl","editable"],["fxLayout","column",1,"my-1","pr-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxLayout","column","fxFlex","98","fxLayout.gt-sm","row wrap","fxLayoutAlign","start stretch","fxLayoutAlign.gt-sm","space-between start"],["fxFlex.gt-sm","45"],["matInput","","formControlName","transactionAddress","placeholder","Bitcoin Address","tabindex","4","name","address","required",""],["fxFlex.gt-sm","25"],["formControlName","selTransType","tabindex","5"],["fxFlex.gt-sm","25","fxLayoutAlign","start end",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","8","type","button","matStepperNext",""],[3,"stepControl"],["fxLayout","column","fxLayoutAlign","start",1,"my-1","pr-1",3,"formGroup"],["matStepLabel",""],["fxFlex","100",1,"w-100","alert","alert-warn"],[1,"mt-1","mr-1","alert-icon",3,"icon"],["mat-button","","color","primary","tabindex","9","type","button",3,"click"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-button","","color","primary","tabindex","12","type","button","default","",3,"mat-dialog-close"],["fxLayout","column","fxLayoutAlign","space-between",1,"my-1","pr-1",3,"formGroup"],["autoFocus","","matInput","","placeholder","Password","type","password","tabindex","1","formControlName","password","required",""],["fxLayout","row",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","button",3,"click"],["fxFlex.gt-sm","25","fxLayoutAlign","start end"],["matInput","","formControlName","transactionBlocks","placeholder","Number of Blocks","type","number","name","blcks","required","","tabindex","6",3,"step","min"],["matInput","","formControlName","transactionFees","placeholder","Fees (Sats/vByte)","type","number","name","chainFees","required","","tabindex","7",3,"step","min"]],template:function(t,a){if(1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),e._uU(5),e.qZA()(),e.TgZ(6,"button",5),e._uU(7,"X"),e.qZA()(),e.TgZ(8,"mat-card-content",6),e.YNc(9,Qd,28,14,"form",7),e.qZA()()(),e.YNc(10,n_,34,15,"ng-template",null,8,e.W1O)),2&t){const o=e.MAs(11);e.xp6(5),e.Oqu(a.sweepAll?"Sweep All Funds":"Send Funds"),e.xp6(1),e.Q6J("mat-dialog-close",!1),e.xp6(3),e.Q6J("ngIf",!a.sweepAll)("ngIfElse",o)}},directives:[d.xw,d.yH,b.dk,d.Wh,k.lW,J.ZT,b.dn,p.O5,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,f.TO,c.wV,c.qQ,$.q,f.R9,R.gD,p.sg,Y.ey,M.BN,B.Vq,B.C0,c.sg,B.VY,c.u,B.Ic],styles:[""]}),n})(),Ke=(()=>{class n{constructor(t,a){this.store=t,this.activatedRoute=a,this.sweepAll=!1,this.unSubs=[new m.x,new m.x]}ngOnInit(){this.activatedRoute.data.pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.sweepAll=t.sweepAll})}openSendFundsModal(){this.store.dispatch((0,w.qR)({payload:{data:{sweepAll:this.sweepAll,component:a_}}}))}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(A.yh),e.Y36(T.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-on-chain-send"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row"],["mat-flat-button","","color","primary","type","button","tabindex","1",3,"click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"button",2),e.NdJ("click",function(){return a.openSendFundsModal()}),e._uU(3),e.qZA()()()),2&t&&(e.xp6(3),e.Oqu(a.sweepAll?"Sweep All":"Send Funds"))},directives:[d.xw,d.yH,d.Wh,k.lW],styles:[""]}),n})();function i_(n,i){1&n&&e._UZ(0,"mat-progress-bar",26)}function o_(n,i){if(1&n&&e._UZ(0,"rtl-node-info",27),2&n){const t=e.oxw(3);e.Q6J("information",t.information)("showColorFieldSeparately",!0)}}function s_(n,i){if(1&n&&e._UZ(0,"rtl-channel-status-info",28),2&n){const t=e.oxw(3);e.Q6J("channelsStatus",t.channelsStatus)("errorMessage",t.errorMessages[3]+" "+t.errorMessages[4])}}function l_(n,i){if(1&n&&e._UZ(0,"rtl-fee-info",29),2&n){const t=e.oxw(3);e.Q6J("fees",t.fees)("errorMessage",t.errorMessages[2])}}const et=function(n){return{"dashboard-card-content":!0,"error-border":n}};function r_(n,i){if(1&n&&(e.TgZ(0,"mat-grid-tile",13)(1,"div",14)(2,"div",15)(3,"div",16),e._UZ(4,"fa-icon",17),e.TgZ(5,"span"),e._uU(6),e.qZA()()(),e.TgZ(7,"div",18)(8,"mat-card",19)(9,"mat-card-content",20),e.YNc(10,i_,1,0,"mat-progress-bar",21),e.TgZ(11,"div",22),e.YNc(12,o_,1,2,"rtl-node-info",23),e.YNc(13,s_,1,2,"rtl-channel-status-info",24),e.YNc(14,l_,1,2,"rtl-fee-info",25),e.qZA()()()()()()),2&n){const t=i.$implicit,a=e.oxw(2);e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(4),e.Q6J("icon",t.icon),e.xp6(2),e.Oqu(t.title),e.xp6(3),e.Q6J("ngClass",e.VKq(10,et,"node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.ERROR||"status"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.ERROR||a.apiCallStatusPendingChannels.status===a.apiCallStatusEnum.ERROR)||"fee"===t.id&&a.apiCallStatusFees.status===a.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf","node"===t.id&&a.apiCallStatusNodeInfo.status===a.apiCallStatusEnum.INITIATED||"status"===t.id&&(a.apiCallStatusChannels.status===a.apiCallStatusEnum.INITIATED||a.apiCallStatusPendingChannels.status===a.apiCallStatusEnum.INITIATED)||"fee"===t.id&&a.apiCallStatusFees.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","node"),e.xp6(1),e.Q6J("ngSwitchCase","status"),e.xp6(1),e.Q6J("ngSwitchCase","fee")}}function c_(n,i){if(1&n&&(e.TgZ(0,"mat-grid-list",11),e.YNc(1,r_,15,12,"mat-grid-tile",12),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngForOf",t.nodeCards)}}function u_(n,i){1&n&&e._UZ(0,"mat-progress-bar",26)}function p_(n,i){1&n&&e.GkF(0)}function m_(n,i){if(1&n&&(e.TgZ(0,"div",33),e.YNc(1,p_,1,0,"ng-container",34),e.qZA()),2&n){const t=e.oxw(2),a=e.MAs(9),o=e.MAs(11);e.xp6(1),e.Q6J("ngTemplateOutlet",t.apiCallStatusNetwork.status===t.apiCallStatusEnum.ERROR?a:o)}}function d_(n,i){1&n&&e.GkF(0)}function __(n,i){if(1&n&&(e.TgZ(0,"div",33),e.YNc(1,d_,1,0,"ng-container",34),e.qZA()),2&n){const t=e.oxw(2),a=e.MAs(9),o=e.MAs(13);e.xp6(1),e.Q6J("ngTemplateOutlet",t.apiCallStatusNetwork.status===t.apiCallStatusEnum.ERROR?a:o)}}function h_(n,i){1&n&&e.GkF(0)}function g_(n,i){if(1&n&&(e.TgZ(0,"div",33),e.YNc(1,h_,1,0,"ng-container",34),e.qZA()),2&n){const t=e.oxw(2),a=e.MAs(9),o=e.MAs(15);e.xp6(1),e.Q6J("ngTemplateOutlet",t.apiCallStatusNetwork.status===t.apiCallStatusEnum.ERROR?a:o)}}function f_(n,i){if(1&n&&(e.TgZ(0,"mat-grid-tile",30)(1,"mat-card",31)(2,"mat-card-content",20),e.YNc(3,u_,1,0,"mat-progress-bar",21),e.TgZ(4,"div",22),e.YNc(5,m_,2,1,"div",32),e.YNc(6,__,2,1,"div",32),e.YNc(7,g_,2,1,"div",32),e.qZA()()()()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("colspan",t.cols)("rowspan",t.rows),e.xp6(2),e.Q6J("ngClass",e.VKq(8,et,a.apiCallStatusNetwork.status===a.apiCallStatusEnum.ERROR)),e.xp6(1),e.Q6J("ngIf",a.apiCallStatusNetwork.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngSwitch",t.id),e.xp6(1),e.Q6J("ngSwitchCase","general"),e.xp6(1),e.Q6J("ngSwitchCase","channels"),e.xp6(1),e.Q6J("ngSwitchCase","degrees")}}function C_(n,i){if(1&n&&(e.TgZ(0,"div",35)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.Oqu(t.errorMessages[1])}}function x_(n,i){if(1&n&&(e.TgZ(0,"div",36)(1,"div")(2,"h4",37),e._uU(3,"Network Capacity"),e.qZA(),e.TgZ(4,"div",38),e._uU(5),e.ALo(6,"number"),e.qZA()(),e.TgZ(7,"div")(8,"h4",37),e._uU(9,"Number of Nodes"),e.qZA(),e.TgZ(10,"div",38),e._uU(11),e.ALo(12,"number"),e.qZA()(),e.TgZ(13,"div")(14,"h4",37),e._uU(15,"Number of Channels"),e.qZA(),e.TgZ(16,"span",38),e._uU(17),e.ALo(18,"number"),e.qZA()()()),2&n){const t=e.oxw();e.xp6(5),e.hij("",e.lcZ(6,3,t.networkInfo.total_network_capacity)," Sats"),e.xp6(6),e.Oqu(e.lcZ(12,5,t.networkInfo.num_nodes)),e.xp6(6),e.Oqu(e.lcZ(18,7,t.networkInfo.num_channels))}}function y_(n,i){if(1&n&&(e.TgZ(0,"div",36)(1,"div")(2,"h4",37),e._uU(3,"Max Channel Size"),e.qZA(),e.TgZ(4,"div",38),e._uU(5),e.ALo(6,"number"),e.qZA()(),e.TgZ(7,"div")(8,"h4",37),e._uU(9,"Avg Channel Size"),e.qZA(),e.TgZ(10,"div",38),e._uU(11),e.ALo(12,"number"),e.qZA()(),e.TgZ(13,"div")(14,"h4",37),e._uU(15,"Min Channel Size"),e.qZA(),e.TgZ(16,"span",38),e._uU(17),e.ALo(18,"number"),e.qZA()()()),2&n){const t=e.oxw();e.xp6(5),e.Oqu(e.lcZ(6,3,t.networkInfo.max_channel_size)),e.xp6(6),e.Oqu(e.lcZ(12,5,t.networkInfo.avg_channel_size)),e.xp6(6),e.Oqu(e.lcZ(18,7,t.networkInfo.min_channel_size))}}function T_(n,i){if(1&n&&(e.TgZ(0,"div",36)(1,"div")(2,"h4",37),e._uU(3,"Max Out Degree"),e.qZA(),e.TgZ(4,"div",38),e._uU(5),e.ALo(6,"number"),e.qZA()(),e.TgZ(7,"div")(8,"h4",37),e._uU(9,"Avg Out Degree"),e.qZA(),e.TgZ(10,"div",38),e._uU(11),e.ALo(12,"number"),e.qZA()(),e.TgZ(13,"div",39),e._UZ(14,"h4",37)(15,"span",38),e.qZA()()),2&n){const t=e.oxw();e.xp6(5),e.Oqu(e.lcZ(6,2,t.networkInfo.max_out_degree)),e.xp6(6),e.Oqu(e.xi3(12,4,t.networkInfo.avg_out_degree,"1.0-2"))}}const b_=function(n){return{"mt-1":n}};let v_=(()=>{class n{constructor(t,a,o){this.logger=t,this.commonService=a,this.store=o,this.faProjectDiagram=y.TmZ,this.faBolt=y.BDt,this.faServer=y.xf3,this.faNetworkWired=y.kXW,this.selNode={},this.information={},this.channelsStatus={},this.networkInfo={},this.networkCards=[],this.nodeCards=[],this.screenSize="",this.screenSizeEnum=l.cu,this.userPersonaEnum=l.ol,this.errorMessages=["","","","",""],this.apiCallStatusNodeInfo=null,this.apiCallStatusNetwork=null,this.apiCallStatusFees=null,this.apiCallStatusChannels=null,this.apiCallStatusPendingChannels=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.networkCards=[{id:"general",cols:3,rows:1},{id:"channels",cols:3,rows:1},{id:"degrees",cols:3,rows:1}],this.nodeCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:3,rows:1},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:3,rows:1},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:3,rows:1}]):(this.networkCards=[{id:"general",cols:1,rows:1},{id:"channels",cols:1,rows:1},{id:"degrees",cols:1,rows:1}],this.nodeCards=[{id:"node",icon:this.faServer,title:"Node Information",cols:1,rows:1},{id:"status",icon:this.faNetworkWired,title:"Channels",cols:1,rows:1},{id:"fee",icon:this.faBolt,title:"Routing Fee",cols:1,rows:1}])}ngOnInit(){this.store.select(C.bx).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=t.apiCallStatus,this.apiCallStatusNodeInfo.status===l.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.selNode=t.nodeSettings,this.information=t.information}),this.store.select(C.N7).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.errorMessages[1]="",this.apiCallStatusNetwork=t.apiCallStatus,this.apiCallStatusNetwork.status===l.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusNetwork.message?JSON.stringify(this.apiCallStatusNetwork.message):this.apiCallStatusNetwork.message),this.networkInfo=t.networkInfo}),this.store.select(C.JG).pipe((0,_.R)(this.unSubs[2])).subscribe(t=>{this.errorMessages[2]="",this.apiCallStatusFees=t.apiCallStatus,this.apiCallStatusFees.status===l.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=t.fees}),this.store.select(C.ni).pipe((0,_.R)(this.unSubs[3])).subscribe(t=>{this.errorMessages[4]="",this.apiCallStatusPendingChannels=t.apiCallStatus,this.apiCallStatusPendingChannels.status===l.Bn.ERROR&&(this.errorMessages[4]="object"==typeof this.apiCallStatusPendingChannels.message?JSON.stringify(this.apiCallStatusPendingChannels.message):this.apiCallStatusPendingChannels.message),this.channelsStatus.pending={num_channels:t.pendingChannelsSummary.open.num_channels,capacity:t.pendingChannelsSummary.open.limbo_balance},this.channelsStatus.closing={num_channels:t.pendingChannelsSummary.closing.num_channels+t.pendingChannelsSummary.force_closing.num_channels+t.pendingChannelsSummary.waiting_close.num_channels,capacity:t.pendingChannelsSummary.total_limbo_balance}}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[4])).subscribe(t=>{this.errorMessages[3]="",this.apiCallStatusChannels=t.apiCallStatus,this.apiCallStatusChannels.status===l.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusChannels.message?JSON.stringify(this.apiCallStatusChannels.message):this.apiCallStatusChannels.message),this.channelsStatus.active=t.channelsSummary.active,this.channelsStatus.inactive=t.channelsSummary.inactive,this.logger.info(t)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-network-info"]],decls:16,vars:6,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch",1,"mb-4"],["cols","3","rowHeight","330px",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start end",1,"page-title-container",3,"ngClass"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","3","rowHeight","250px"],["fxLayout","row",3,"colspan","rowspan",4,"ngFor","ngForOf"],["errorBlock",""],["generalBlock",""],["channelsBlock",""],["degreesBlock",""],["cols","3","rowHeight","330px"],["class","node-grid-tile",3,"colspan","rowspan",4,"ngFor","ngForOf"],[1,"node-grid-tile",3,"colspan","rowspan"],["fxLayout","column","fxLayoutAlign","stretch start","fxFlex","100",1,"h-100"],["fxLayout","row","fxLayoutAlign","start start",1,"w-100"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container"],[1,"mr-1",3,"icon"],["fxLayout","column","fxLayoutAlign","stretch center","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","center stretch",1,"w-100","h-93"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","w-96","h-93"],["fxLayout","column","fxFlex","100",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["fxLayout","column","fxFlex","100",3,"ngSwitch"],["fxFlex","100",3,"information","showColorFieldSeparately",4,"ngSwitchCase"],["fxFlex","100",3,"channelsStatus","errorMessage",4,"ngSwitchCase"],["fxFlex","100",3,"fees","errorMessage",4,"ngSwitchCase"],["mode","indeterminate"],["fxFlex","100",3,"information","showColorFieldSeparately"],["fxFlex","100",3,"channelsStatus","errorMessage"],["fxFlex","100",3,"fees","errorMessage"],["fxLayout","row",3,"colspan","rowspan"],["fxLayout","row","fxFlex","95","fxLayoutAlign","start stretch",1,"dashboard-card","h-93"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100"],[4,"ngTemplateOutlet"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between",1,"p-2"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["fxFlex","20"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,c_,2,1,"mat-grid-list",1),e.TgZ(2,"div",2),e._UZ(3,"fa-icon",3),e.TgZ(4,"span",4),e._uU(5,"Network"),e.qZA()(),e.TgZ(6,"mat-grid-list",5),e.YNc(7,f_,8,10,"mat-grid-tile",6),e.qZA()(),e.YNc(8,C_,3,1,"ng-template",null,7,e.W1O),e.YNc(10,x_,19,9,"ng-template",null,8,e.W1O),e.YNc(12,y_,19,9,"ng-template",null,9,e.W1O),e.YNc(14,T_,16,7,"ng-template",null,10,e.W1O)),2&t&&(e.xp6(1),e.Q6J("ngIf",a.selNode.userPersona!==a.userPersonaEnum.OPERATOR),e.xp6(1),e.Q6J("ngClass",e.VKq(4,b_,a.screenSize!==a.screenSizeEnum.XS)),e.xp6(1),e.Q6J("icon",a.faProjectDiagram),e.xp6(4),e.Q6J("ngForOf",a.networkCards))},directives:[d.xw,d.Wh,p.O5,ce.Il,p.sg,ce.DX,d.yH,M.BN,b.a8,b.dn,p.mk,S.oO,P.pW,p.RF,p.n9,Ue,Re,Oe,p.tP],pipes:[p.JJ],styles:[""]}),n})();function Z_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let w_=(()=>{class n{constructor(t){this.router=t,this.faDownload=y.q7m,this.links=[{link:"bckup",name:"Backup"},{link:"restore",name:"Restore"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-backup"]],decls:11,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Channels Backup"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),e.YNc(8,Z_,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faDownload),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC],styles:[""]}),n})();function A_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",23)(1,"h4",24),e._uU(2),e.qZA(),e.TgZ(3,"div",25)(4,"button",26),e.NdJ("click",function(){return e.CHM(t),e.oxw().onRestoreChannels({})}),e._uU(5,"Restore All"),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(2),e.hij("Restore folder location: ",t.selNode.channelBackupPath,"/restore")}}function S_(n,i){if(1&n&&(e.TgZ(0,"div",27)(1,"h4",24),e._uU(2),e.qZA(),e.TgZ(3,"h4",28),e._uU(4,"All channel backup file not found! To perform channel restoration, channel backup file/s must be placed at the above location."),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.hij("Restore folder location: ",t.selNode.channelBackupPath,"/restore")}}function L_(n,i){if(1&n&&(e.TgZ(0,"div",27)(1,"h4",24),e._uU(2),e.qZA()()),2&n){const t=e.oxw();e.xp6(2),e.hij("Restore folder location: ",t.selNode.channelBackupPath,"/restore")}}function k_(n,i){1&n&&e._UZ(0,"mat-progress-bar",29)}function F_(n,i){1&n&&(e.TgZ(0,"th",30),e._uU(1," Channel Point "),e.qZA())}const N_=function(n){return{"max-width":n}};function q_(n,i){if(1&n&&(e.TgZ(0,"td",31),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,N_,a.screenSize===a.screenSizeEnum.XS?"10rem":"45rem")),e.xp6(1),e.Oqu(null==t?null:t.channel_point)}}function U_(n,i){1&n&&(e.TgZ(0,"th",32)(1,"span",33),e._uU(2,"Actions"),e.qZA()())}function O_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",34)(1,"span",33)(2,"button",35),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onRestoreChannels(s)}),e._uU(3,"Restore"),e.qZA()()()}}function R_(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No singular channel backups available."),e.qZA())}function I_(n,i){if(1&n&&(e.TgZ(0,"td",36),e.YNc(1,R_,2,0,"p",37),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",!t.channels||!t.channels.data||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)}}const M_=function(n){return{"display-none":n}};function D_(n,i){if(1&n&&e._UZ(0,"tr",38),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,M_,t.channels&&t.channels.data&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function P_(n,i){1&n&&e._UZ(0,"tr",39)}function J_(n,i){1&n&&e._UZ(0,"tr",40)}const E_=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Q_=function(){return["no_channel"]};let Y_=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.store=a,this.lndEffects=o,this.commonService=s,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.selNode={},this.displayedColumns=["channel_point","actions"],this.channelsData=[],this.allRestoreExists=!1,this.flgLoading=[!0],this.flgSticky=!1,this.selFilter="",this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.dispatch((0,v.tb)()),this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.lndEffects.setRestoreChannelList.pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.allRestoreExists=t.all_restore_exists,this.channelsData=t.files,this.channelsData.length>0&&this.loadRestoreTable(this.channelsData),("error"!==this.flgLoading[0]||t&&t.files)&&(this.flgLoading[0]=!1),this.logger.info(t)})}ngAfterViewInit(){this.channelsData&&this.channelsData.length>0&&this.loadRestoreTable(this.channelsData)}onRestoreChannels(t){this.store.dispatch((0,v.vV)({payload:{channelPoint:t.channel_point?t.channel_point:"ALL"}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}loadRestoreTable(t){this.channels=new r.by([...t]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.channels.filterPredicate=(a,o)=>JSON.stringify(a).toLowerCase().includes(o),this.channels.paginator=this.paginator,this.applyFilter()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(ee.l),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-restore-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:24,vars:17,consts:[["fxLayout","column",1,"mt-2"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between start","fxLayout.gt-md","row wrap",4,"ngIf"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container","mt-2"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","channel_point"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["fxFlex","100"],["fxLayout","row",1,"mt-2"],["mat-flat-button","","color","primary","tabindex","1",3,"click"],["fxLayout","column","fxLayoutAlign","space-between start","fxLayout.gt-md","row wrap"],["fxFlex","100",1,"mt-1"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","",1,"pr-3"],["fxLayoutAlign","end center"],["mat-cell",""],["mat-stroked-button","","color","primary","type","button","tabindex","1",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,A_,6,1,"div",1),e.YNc(2,S_,5,1,"div",2),e.YNc(3,L_,3,1,"div",2),e.TgZ(4,"div",3),e._UZ(5,"div",4),e.TgZ(6,"mat-form-field",5)(7,"input",6),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(8,"div",7),e.YNc(9,k_,1,0,"mat-progress-bar",8),e.TgZ(10,"table",9,10),e.ynx(12,11),e.YNc(13,F_,2,0,"th",12),e.YNc(14,q_,2,4,"td",13),e.BQk(),e.ynx(15,14),e.YNc(16,U_,3,0,"th",15),e.YNc(17,O_,4,0,"td",16),e.BQk(),e.ynx(18,17),e.YNc(19,I_,2,1,"td",18),e.BQk(),e.YNc(20,D_,1,3,"tr",19),e.YNc(21,P_,1,0,"tr",20),e.YNc(22,J_,1,0,"tr",21),e.qZA()(),e._UZ(23,"mat-paginator",22),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",a.allRestoreExists),e.xp6(1),e.Q6J("ngIf",!a.allRestoreExists&&(!a.channels||(null==a.channels||null==a.channels.data?null:a.channels.data.length)<=0)),e.xp6(1),e.Q6J("ngIf",!a.allRestoreExists&&a.channels&&(null==a.channels||null==a.channels.data?null:a.channels.data.length)&&(null==a.channels||null==a.channels.data?null:a.channels.data.length)>0),e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",!0===a.flgLoading[0]),e.xp6(1),e.Q6J("dataSource",a.channels)("ngClass",e.VKq(14,E_,"error"===a.flgLoading[0])),e.xp6(10),e.Q6J("matFooterRowDef",e.DdM(16,Q_)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,p.O5,d.Wh,d.yH,k.lW,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function H_(n,i){1&n&&e._UZ(0,"mat-progress-bar",31)}function B_(n,i){1&n&&(e.TgZ(0,"th",32),e._uU(1," Channel Point "),e.qZA())}const V_=function(n){return{"max-width":n}};function G_(n,i){if(1&n&&(e.TgZ(0,"td",33),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("ngStyle",e.VKq(2,V_,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(null==t?null:t.channel_point)}}function z_(n,i){1&n&&(e.TgZ(0,"th",34)(1,"span",35),e._uU(2,"Actions"),e.qZA()())}function W_(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",36)(1,"div",37)(2,"mat-select",38),e._UZ(3,"mat-select-trigger"),e.TgZ(4,"mat-option",39),e.NdJ("click",function(o){const u=e.CHM(t).$implicit;return e.oxw().onChannelClick(u,o)}),e._uU(5,"View Info"),e.qZA(),e.TgZ(6,"mat-option",39),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onBackupChannels(s)}),e._uU(7,"Backup"),e.qZA(),e.TgZ(8,"mat-option",39),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onDownloadBackup(s)}),e._uU(9,"Download Backup"),e.qZA(),e.TgZ(10,"mat-option",39),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().onVerifyChannels(s)}),e._uU(11,"Verify"),e.qZA()()()()}}function X_(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"No channel available."),e.qZA())}function $_(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting channels..."),e.qZA())}function j_(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Oqu(t.errorMessage)}}function K_(n,i){if(1&n&&(e.TgZ(0,"td",40),e.YNc(1,X_,2,0,"p",41),e.YNc(2,$_,2,0,"p",41),e.YNc(3,j_,2,1,"p",41),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.channels&&t.channels.data)||(null==t.channels||null==t.channels.data?null:t.channels.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const eh=function(n){return{"display-none":n}};function th(n,i){if(1&n&&e._UZ(0,"tr",42),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(1,eh,(null==t.channels?null:t.channels.data)&&(null==t.channels||null==t.channels.data?null:t.channels.data.length)>0))}}function nh(n,i){1&n&&e._UZ(0,"tr",43)}function ah(n,i){1&n&&e._UZ(0,"tr",44)}const ih=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},oh=function(){return["no_channel"]};let sh=(()=>{class n{constructor(t,a,o,s){this.logger=t,this.store=a,this.actions=o,this.commonService=s,this.faInfoCircle=y.sqG,this.faExclamationTriangle=y.eHv,this.faArchive=y.N2j,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.selNode={},this.displayedColumns=["channel_point","actions"],this.channelsData=[],this.flgSticky=!1,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.store.select(C.$k).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.selNode=t}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.channelsData=t.channels,this.channelsData.length>0&&this.loadBackupTable(this.channelsData),this.logger.info(t)}),this.actions.pipe((0,_.R)(this.unSubs[2]),(0,E.h)(t=>t.type===l.uR.SET_CHANNELS_LND||t.type===l.pg.SHOW_FILE)).subscribe(t=>{t.type===l.uR.SET_CHANNELS_LND&&(this.selectedChannel=null),t.type===l.pg.SHOW_FILE&&(this.commonService.downloadFile(t.payload,"channel-"+(this.selectedChannel.channel_point?this.selectedChannel.channel_point:"all"),".bak",".bak"),this.selectedChannel=null)})}ngAfterViewInit(){this.channelsData.length>0&&this.loadBackupTable(this.channelsData)}onBackupChannels(t){this.store.dispatch((0,v.Vv)({payload:{uiMessage:l.m6.BACKUP_CHANNEL,channelPoint:t.channel_point?t.channel_point:"ALL",showMessage:""}}))}onVerifyChannels(t){this.store.dispatch((0,v.Cp)({payload:{channelPoint:t.channel_point?t.channel_point:"ALL"}}))}onDownloadBackup(t){this.selectedChannel=t,this.store.dispatch((0,w.dc)({payload:{channelPoint:t.channel_point?t.channel_point:"all"}}))}onChannelClick(t,a){this.store.dispatch((0,w.qR)({payload:{data:{channel:t,showCopy:!1,component:xe}}}))}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}loadBackupTable(t){this.channels=new r.by(t?[...t]:[]),this.channels.sort=this.sort,this.channels.sortingDataAccessor=(a,o)=>a[o]&&isNaN(a[o])?a[o].toLocaleLowerCase():a[o]?+a[o]:null,this.channels.paginator=this.paginator,this.channels.filterPredicate=(a,o)=>((a.active?"active":"inactive")+(a.channel_point?a.channel_point.toLowerCase():"")+(a.chan_id?a.chan_id.toLowerCase():"")+(a.remote_pubkey?a.remote_pubkey.toLowerCase():"")+(a.remote_alias?a.remote_alias.toLowerCase():"")+(a.capacity?a.capacity:"")+(a.local_balance?a.local_balance:"")+(a.remote_balance?a.remote_balance:"")+(a.total_satoshis_sent?a.total_satoshis_sent:"")+(a.total_satoshis_received?a.total_satoshis_received:"")+(a.commit_fee?a.commit_fee:"")+(a.private?"private":"public")).includes(o),this.applyFilter()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(A.yh),e.Y36(G.eX),e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-channel-backup-table"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Channels")}])],decls:42,vars:18,consts:[["fxLayout","column"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","100",1,"alert","alert-info"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","1",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","2",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container","mt-2"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","channel_point"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",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","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","",1,"pr-3"],["fxLayoutAlign","end center"],["mat-cell","","fxLayoutAlign","end center"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"div",2),e._UZ(3,"fa-icon",3),e.TgZ(4,"span"),e._uU(5,"Save your backup files in a redundant location."),e.qZA()(),e.TgZ(6,"div",4),e._UZ(7,"fa-icon",3),e.TgZ(8,"span")(9,"strong"),e._uU(10,"Backup Folder Location: "),e.qZA(),e._uU(11),e.qZA()(),e.TgZ(12,"div",5)(13,"button",6),e.NdJ("click",function(){return a.onVerifyChannels({})}),e._uU(14,"Verify All"),e.qZA(),e.TgZ(15,"button",7),e.NdJ("click",function(){return a.onBackupChannels({})}),e._uU(16,"Backup All"),e.qZA(),e.TgZ(17,"button",8),e.NdJ("click",function(){return a.onDownloadBackup({})}),e._uU(18,"Download Backup"),e.qZA()()(),e.TgZ(19,"div",9)(20,"div",10),e._UZ(21,"fa-icon",11),e.TgZ(22,"span",12),e._uU(23,"Backups"),e.qZA()(),e.TgZ(24,"mat-form-field",13)(25,"input",14),e.NdJ("keyup",function(){return a.applyFilter()})("ngModelChange",function(s){return a.selFilter=s}),e.qZA()()(),e.TgZ(26,"div",15),e.YNc(27,H_,1,0,"mat-progress-bar",16),e.TgZ(28,"table",17,18),e.ynx(30,19),e.YNc(31,B_,2,0,"th",20),e.YNc(32,G_,2,4,"td",21),e.BQk(),e.ynx(33,22),e.YNc(34,z_,3,0,"th",23),e.YNc(35,W_,12,0,"td",24),e.BQk(),e.ynx(36,25),e.YNc(37,K_,4,3,"td",26),e.BQk(),e.YNc(38,th,1,3,"tr",27),e.YNc(39,nh,1,0,"tr",28),e.YNc(40,ah,1,0,"tr",29),e.qZA()(),e._UZ(41,"mat-paginator",30),e.qZA()),2&t&&(e.xp6(3),e.Q6J("icon",a.faExclamationTriangle),e.xp6(4),e.Q6J("icon",a.faInfoCircle),e.xp6(4),e.hij("",a.selNode.channelBackupPath,"."),e.xp6(10),e.Q6J("icon",a.faArchive),e.xp6(4),e.Q6J("ngModel",a.selFilter),e.xp6(2),e.Q6J("ngIf",a.apiCallStatus.status===a.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",a.channels)("ngClass",e.VKq(15,ih,""!==a.errorMessage)),e.xp6(10),e.Q6J("matFooterRowDef",e.DdM(17,oh)),e.xp6(1),e.Q6J("matHeaderRowDef",a.displayedColumns)("matHeaderRowDefSticky",a.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",a.displayedColumns),e.xp6(1),e.Q6J("pageSize",a.pageSize)("pageSizeOptions",a.pageSizeOptions)("showFirstLastButtons",a.screenSize!==a.screenSizeEnum.XS))},directives:[d.xw,d.Wh,d.yH,M.BN,k.lW,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,p.O5,P.pW,r.BZ,Z.YE,p.mk,S.oO,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,R.gD,R.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,L.NW],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 70%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function lh(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",8),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw().activeLink=s.link}),e._uU(1),e.qZA()}if(2&n){const t=i.$implicit,a=e.oxw();e.s9C("routerLink",t.link),e.Q6J("active",a.activeLink===t.link),e.xp6(1),e.Oqu(t.name)}}let rh=(()=>{class n{constructor(t){this.router=t,this.faUserCheck=y.hkK,this.links=[{link:"sign",name:"Sign"},{link:"verify",name:"Verify"}],this.activeLink=this.links[0].link,this.unSubs=[new m.x,new m.x]}ngOnInit(){const t=this.links.find(a=>this.router.url.includes(a.link));this.activeLink=t?t.link:this.links[0].link,this.router.events.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(a=>a instanceof T.Av)).subscribe({next:a=>{const o=this.links.find(s=>a.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(T.F0))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-sign-verify-message"]],decls:11,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e._UZ(1,"fa-icon",1),e.TgZ(2,"span",2),e._uU(3,"Sign/Verify Message"),e.qZA()(),e.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),e.YNc(8,lh,2,3,"div",6),e.qZA(),e.TgZ(9,"div",7),e._UZ(10,"router-outlet"),e.qZA()()()()),2&t&&(e.xp6(1),e.Q6J("icon",a.faUserCheck),e.xp6(7),e.Q6J("ngForOf",a.links))},directives:[d.xw,d.Wh,M.BN,b.a8,b.dn,D.BU,p.sg,D.Nj,T.rH,d.yH,T.lC],styles:[""]}),n})();function ch(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Message is required."),e.qZA())}let uh=(()=>{class n{constructor(t,a,o){this.dataService=t,this.snackBar=a,this.logger=o,this.message="",this.signedMessage="",this.signature="",this.unSubs=[new m.x,new m.x]}onSign(){if(!this.message||""===this.message)return!0;this.dataService.signMessage(this.message).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.signedMessage=this.message,this.signature=t.signature})}onMessageChange(){this.signedMessage!==this.message&&(this.signature="")}onCopyField(t){this.snackBar.open("Signature copied."),this.logger.info("Copied Text: "+t)}resetData(){this.message="",this.signature="",this.signedMessage=""}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(j.D),e.Y36(te.ux),e.Y36(N.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-sign"]],decls:20,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to sign","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3","type","submit",3,"click"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","4","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),e.NdJ("ngModelChange",function(s){return a.message=s})("keyup",function(){return a.onMessageChange()}),e.qZA(),e.YNc(5,ch,2,0,"mat-error",5),e.qZA(),e.TgZ(6,"div",6)(7,"button",7),e.NdJ("click",function(){return a.resetData()}),e._uU(8,"Clear Field"),e.qZA(),e.TgZ(9,"button",8),e.NdJ("click",function(){return a.onSign()}),e._uU(10,"Sign"),e.qZA()(),e._UZ(11,"mat-divider",9),e.TgZ(12,"div",10)(13,"p"),e._uU(14,"Generated Signature"),e.qZA()(),e.TgZ(15,"div",11),e._uU(16),e.qZA(),e.TgZ(17,"div",12)(18,"button",13),e.NdJ("copied",function(s){return a.onCopyField(s)}),e._uU(19,"Copy Signature"),e.qZA()()()()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.message),e.xp6(1),e.Q6J("ngIf",!a.message),e.xp6(6),e.Q6J("inset",!0),e.xp6(5),e.Oqu(a.signature),e.xp6(2),e.Q6J("payload",a.signature))},directives:[d.xw,d.yH,d.Wh,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,p.O5,f.TO,k.lW,z.d,se.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function ph(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Message is required."),e.qZA())}function mh(n,i){1&n&&(e.TgZ(0,"mat-error"),e._uU(1,"Signature is required."),e.qZA())}function dh(n,i){1&n&&(e.TgZ(0,"p",13)(1,"mat-icon",14),e._uU(2,"close"),e.qZA(),e._uU(3,"Verification failed, please double check message and signature"),e.qZA())}function _h(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Pubkey Used"),e.qZA())}function hh(n,i){if(1&n&&(e.TgZ(0,"div",20)(1,"p"),e._uU(2),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(2),e.Oqu(null==t.verifyRes?null:t.verifyRes.pubkey)}}function gh(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",21)(1,"button",22),e.NdJ("copied",function(o){return e.CHM(t),e.oxw(2).onCopyField(o)}),e._uU(2,"Copy Pubkey"),e.qZA()()}if(2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("payload",null==t.verifyRes?null:t.verifyRes.pubkey)}}function fh(n,i){if(1&n&&(e.TgZ(0,"div",15),e._UZ(1,"mat-divider",16),e.TgZ(2,"div",17),e.YNc(3,_h,2,0,"p",5),e.qZA(),e.YNc(4,hh,3,1,"div",18),e.YNc(5,gh,3,1,"div",19),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("inset",!0),e.xp6(2),e.Q6J("ngIf",t.verifyRes.valid),e.xp6(1),e.Q6J("ngIf",t.verifyRes.valid),e.xp6(1),e.Q6J("ngIf",t.verifyRes.valid)}}let Ch=(()=>{class n{constructor(t,a,o){this.dataService=t,this.snackBar=a,this.logger=o,this.message="",this.verifiedMessage="",this.signature="",this.verifiedSignature="",this.showVerifyStatus=!1,this.verifyRes={pubkey:"",valid:null},this.unSubs=[new m.x,new m.x]}onVerify(){if(!this.message||""===this.message||!this.signature||""===this.signature)return!0;this.dataService.verifyMessage(this.message,this.signature).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{this.verifyRes=t,this.showVerifyStatus=!0,this.verifiedMessage=this.message,this.verifiedSignature=this.signature})}onChange(){(this.verifiedMessage!==this.message||this.verifiedSignature!==this.signature)&&(this.showVerifyStatus=!1,this.verifyRes={pubkey:"",valid:null})}resetData(){this.message="",this.signature="",this.verifyRes=null,this.showVerifyStatus=!1}onCopyField(t){this.snackBar.open("Pubkey copied."),this.logger.info("Copied Text: "+t)}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(j.D),e.Y36(te.ux),e.Y36(N.mQ))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-verify"]],decls:17,vars:6,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["autoFocus","","matInput","","rows","1","placeholder","Message to verify","required","","tabindex","1","name","message",3,"ngModel","ngModelChange","keyup"],[4,"ngIf"],["matInput","","placeholder","Signature provided","name","signature","tabindex","2","required","",3,"ngModel","ngModelChange","keyup"],["sign","ngModel"],["fxFlex","100","class","color-warn","fxLayoutAlign","start center",4,"ngIf"],["fxLayout","row",1,"my-1"],["mat-stroked-button","","color","primary","tabindex","3","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","4","type","submit",3,"click"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxFlex","100","fxLayoutAlign","start center",1,"color-warn"],[1,"mr-1","icon-small"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],[1,"my-2",3,"inset"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start","class","bordered-box read-only h-4 padding-gap",4,"ngIf"],["fxLayout","row","class","mt-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start start",1,"bordered-box","read-only","h-4","padding-gap"],["fxLayout","row",1,"mt-2"],["mat-stroked-button","","color","primary","tabindex","5","rtlClipboard","","type","button",3,"payload","copied"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"form",1,2)(3,"mat-form-field",3)(4,"textarea",4),e.NdJ("ngModelChange",function(s){return a.message=s})("keyup",function(){return a.onChange()}),e.qZA(),e.YNc(5,ph,2,0,"mat-error",5),e.qZA(),e.TgZ(6,"mat-form-field",3)(7,"input",6,7),e.NdJ("ngModelChange",function(s){return a.signature=s})("keyup",function(){return a.onChange()}),e.qZA(),e.YNc(9,mh,2,0,"mat-error",5),e.qZA(),e.YNc(10,dh,4,0,"p",8),e.TgZ(11,"div",9)(12,"button",10),e.NdJ("click",function(){return a.resetData()}),e._uU(13,"Clear Fields"),e.qZA(),e.TgZ(14,"button",11),e.NdJ("click",function(){return a.onVerify()}),e._uU(15,"Verify"),e.qZA()(),e.YNc(16,fh,6,4,"div",12),e.qZA()()),2&t&&(e.xp6(4),e.Q6J("ngModel",a.message),e.xp6(1),e.Q6J("ngIf",!a.message),e.xp6(2),e.Q6J("ngModel",a.signature),e.xp6(2),e.Q6J("ngIf",!a.signature),e.xp6(1),e.Q6J("ngIf",a.showVerifyStatus&&!a.verifyRes.valid),e.xp6(6),e.Q6J("ngIf",a.showVerifyStatus&&a.verifyRes.valid))},directives:[d.xw,d.yH,d.Wh,c._Y,c.JL,c.F,f.KE,I.Nt,c.Fj,W.h,c.Q7,c.JJ,c.On,p.O5,f.TO,K.Hw,k.lW,z.d,se.y],styles:[".mat-column-channel_point[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();var xh=h(9442),F=h(1643);function yh(n,i){if(1&n&&(e.TgZ(0,"div",3),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Oqu(t.errorMessage)}}function Th(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",9)(1,"div",10),e._uU(2,"Non Routing Peers"),e.qZA(),e.TgZ(3,"mat-form-field",11)(4,"input",12),e.NdJ("keyup",function(){return e.CHM(t),e.oxw(2).applyFilter()})("ngModelChange",function(o){return e.CHM(t),e.oxw(2).filter=o}),e.qZA()()()}if(2&n){const t=e.oxw(2);e.xp6(4),e.Q6J("ngModel",t.filter)}}function bh(n,i){1&n&&e._UZ(0,"mat-progress-bar",35)}function vh(n,i){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Channel ID"),e.qZA())}const tt=function(n){return{"max-width":n}};function Zh(n,i){if(1&n&&(e.TgZ(0,"td",37),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(3);e.Q6J("ngStyle",e.VKq(2,tt,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.chan_id)}}function wh(n,i){1&n&&(e.TgZ(0,"th",36),e._uU(1,"Peer Alias"),e.qZA())}function Ah(n,i){if(1&n&&(e.TgZ(0,"td",37),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(3);e.Q6J("ngStyle",e.VKq(2,tt,a.screenSize===a.screenSizeEnum.XS?"10rem":"28rem")),e.xp6(1),e.Oqu(t.remote_alias)}}function Sh(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Sats Sent"),e.qZA())}function Lh(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",40),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_satoshis_sent))}}function kh(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Sats Received"),e.qZA())}function Fh(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",40),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.total_satoshis_received))}}function Nh(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Local Balance (Sats)"),e.qZA())}function qh(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",40),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.local_balance))}}function Uh(n,i){1&n&&(e.TgZ(0,"th",38),e._uU(1,"Remote Balance (Sats)"),e.qZA())}function Oh(n,i){if(1&n&&(e.TgZ(0,"td",39)(1,"span",40),e._uU(2),e.ALo(3,"number"),e.qZA()()),2&n){const t=i.$implicit;e.xp6(2),e.Oqu(e.lcZ(3,1,t.remote_balance))}}function Rh(n,i){1&n&&(e.TgZ(0,"th",41)(1,"span",40),e._uU(2,"Actions"),e.qZA()())}function Ih(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"td",42)(1,"button",43),e.NdJ("click",function(){const s=e.CHM(t).$implicit;return e.oxw(3).onManagePeer(s)}),e._uU(2,"Manage"),e.qZA()()}}function Mh(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"All peers are routing."),e.qZA())}function Dh(n,i){1&n&&(e.TgZ(0,"p"),e._uU(1,"Getting non routing peers..."),e.qZA())}function Ph(n,i){if(1&n&&(e.TgZ(0,"p"),e._uU(1),e.qZA()),2&n){const t=e.oxw(4);e.xp6(1),e.Oqu(t.errorMessage)}}function Jh(n,i){if(1&n&&(e.TgZ(0,"td",44),e.YNc(1,Mh,2,0,"p",45),e.YNc(2,Dh,2,0,"p",45),e.YNc(3,Ph,2,1,"p",45),e.qZA()),2&n){const t=e.oxw(3);e.xp6(1),e.Q6J("ngIf",(!(null!=t.NonRoutingPeers&&t.NonRoutingPeers.data)||(null==t.NonRoutingPeers||null==t.NonRoutingPeers.data?null:t.NonRoutingPeers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.COMPLETED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.NonRoutingPeers&&t.NonRoutingPeers.data)||(null==t.NonRoutingPeers||null==t.NonRoutingPeers.data?null:t.NonRoutingPeers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("ngIf",(!(null!=t.NonRoutingPeers&&t.NonRoutingPeers.data)||(null==t.NonRoutingPeers||null==t.NonRoutingPeers.data?null:t.NonRoutingPeers.data.length)<1)&&t.apiCallStatus.status===t.apiCallStatusEnum.ERROR)}}const Eh=function(n){return{"display-none":n}};function Qh(n,i){if(1&n&&e._UZ(0,"tr",46),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,Eh,(null==t.NonRoutingPeers||null==t.NonRoutingPeers.data?null:t.NonRoutingPeers.data.length)>0))}}function Yh(n,i){1&n&&e._UZ(0,"tr",47)}function Hh(n,i){1&n&&e._UZ(0,"tr",48)}const Bh=function(){return["no_non_routing_event"]};function Vh(n,i){if(1&n&&(e.TgZ(0,"div",13),e.YNc(1,bh,1,0,"mat-progress-bar",14),e.TgZ(2,"table",15,16),e.ynx(4,17),e.YNc(5,vh,2,0,"th",18),e.YNc(6,Zh,2,4,"td",19),e.BQk(),e.ynx(7,20),e.YNc(8,wh,2,0,"th",18),e.YNc(9,Ah,2,4,"td",19),e.BQk(),e.ynx(10,21),e.YNc(11,Sh,2,0,"th",22),e.YNc(12,Lh,4,3,"td",23),e.BQk(),e.ynx(13,24),e.YNc(14,kh,2,0,"th",22),e.YNc(15,Fh,4,3,"td",23),e.BQk(),e.ynx(16,25),e.YNc(17,Nh,2,0,"th",22),e.YNc(18,qh,4,3,"td",23),e.BQk(),e.ynx(19,26),e.YNc(20,Uh,2,0,"th",22),e.YNc(21,Oh,4,3,"td",23),e.BQk(),e.ynx(22,27),e.YNc(23,Rh,3,0,"th",28),e.YNc(24,Ih,3,0,"td",29),e.BQk(),e.ynx(25,30),e.YNc(26,Jh,4,3,"td",31),e.BQk(),e.YNc(27,Qh,1,3,"tr",32),e.YNc(28,Yh,1,0,"tr",33),e.YNc(29,Hh,1,0,"tr",34),e.qZA()()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("ngIf",t.apiCallStatus.status===t.apiCallStatusEnum.INITIATED),e.xp6(1),e.Q6J("dataSource",t.NonRoutingPeers),e.xp6(25),e.Q6J("matFooterRowDef",e.DdM(6,Bh)),e.xp6(1),e.Q6J("matHeaderRowDef",t.displayedColumns)("matHeaderRowDefSticky",t.flgSticky),e.xp6(1),e.Q6J("matRowDefColumns",t.displayedColumns)}}function Gh(n,i){if(1&n&&(e.TgZ(0,"div",4),e.YNc(1,Th,5,1,"div",5),e.YNc(2,Vh,30,7,"div",6),e._UZ(3,"mat-paginator",7,8),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.Q6J("ngIf",""===t.errorMessage),e.xp6(1),e.Q6J("ngIf",""===t.errorMessage),e.xp6(1),e.Q6J("pageSize",t.pageSize)("pageSizeOptions",t.pageSizeOptions)("showFirstLastButtons",t.screenSize!==t.screenSizeEnum.XS)}}let zh=(()=>{class n{constructor(t,a,o,s,u){this.logger=t,this.commonService=a,this.store=o,this.router=s,this.activatedRoute=u,this.routingPeersData=[],this.displayedColumns=[],this.NonRoutingPeers=new r.by([]),this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.filter="",this.activeChannels=[],this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x,new m.x,new m.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS||this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["remote_alias","local_balance","remote_balance","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["chan_id","remote_alias","local_balance","remote_balance","actions"]):(this.flgSticky=!0,this.displayedColumns=["chan_id","remote_alias","total_satoshis_received","total_satoshis_sent","local_balance","remote_balance","actions"])}ngOnInit(){this.store.select(C.Bo).pipe((0,_.R)(this.unSubs[0])).subscribe(t=>{var a;this.errorMessage="",this.apiCallStatus=t.apiCallStatus,(null===(a=t.apiCallStatus)||void 0===a?void 0:a.status)===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.routingPeersData=t.forwardingHistory.forwarding_events?t.forwardingHistory.forwarding_events:[],this.routingPeersData.length>0&&this.sort&&this.paginator&&this.loadNonRoutingPeersTable(this.routingPeersData),this.logger.info(t.apiCallStatus),this.logger.info(t.forwardingHistory)}),this.store.select(C.ZW).pipe((0,_.R)(this.unSubs[1])).subscribe(t=>{this.errorMessage="",this.apiCallStatus=t.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),this.activeChannels=t.channels,this.logger.info(t)})}ngAfterViewInit(){this.routingPeersData.length>0&&this.loadNonRoutingPeersTable(this.routingPeersData)}onManagePeer(t){this.router.navigate(["../../","connections","channels","open"],{relativeTo:this.activatedRoute,state:{filter:t.chan_id}})}loadNonRoutingPeersTable(t){if(t.length>0){const a=this.activeChannels.filter(o=>t.findIndex(s=>s.chan_id_in===o.chan_id||s.chan_id_out===o.chan_id)<0);this.NonRoutingPeers=new r.by(a),this.NonRoutingPeers.sort=this.sort,this.NonRoutingPeers.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.NonRoutingPeers.paginator=this.paginator,this.logger.info(this.NonRoutingPeers)}else this.NonRoutingPeers=new r.by([]);this.applyFilter()}applyFilter(){this.NonRoutingPeers.filter=this.filter.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(T.F0),e.Y36(T.gz))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-non-routing-peers"]],viewQuery:function(t,a){if(1&t&&(e.Gf(Z.YE,5),e.Gf(L.NW,5)),2&t){let o;e.iGM(o=e.CRH())&&(a.sort=o.first),e.iGM(o=e.CRH())&&(a.paginator=o.first)}},features:[e._Bn([{provide:L.ye,useValue:(0,l.pt)("Non routing peers")}])],decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["class","p-2 error-border my-2",4,"ngIf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf"],[1,"p-2","error-border","my-2"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch","class","page-sub-title-container",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100","class","table-container",3,"perfectScrollbar",4,"ngIf"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginator",""],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","chan_id"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","remote_alias"],["matColumnDef","total_satoshis_sent"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","total_satoshis_received"],["matColumnDef","local_balance"],["matColumnDef","remote_balance"],["matColumnDef","actions"],["mat-header-cell","","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-2","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_non_routing_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pr-3"],["mat-cell","","fxLayoutAlign","end center",1,"pl-2"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(t,a){1&t&&(e.TgZ(0,"div",0),e.YNc(1,yh,2,1,"div",1),e.YNc(2,Gh,5,5,"div",2),e.qZA()),2&t&&(e.xp6(1),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage))},directives:[d.xw,d.yH,d.Wh,p.O5,f.KE,I.Nt,c.Fj,c.JJ,c.On,Q.$V,P.pW,r.BZ,Z.YE,r.w1,r.fO,r.ge,Z.nU,r.Dz,r.ev,p.PC,S.Zl,k.lW,r.mD,r.yh,r.Ke,r.Q2,p.mk,S.oO,r.as,r.XQ,r.nj,r.Gk,L.NW],pipes:[p.JJ],styles:[".mat-column-chan_id[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})(),Wh=(()=>{class n{constructor(t){this.dataService=t,this.paths="",this.unSubs=[new m.x,new m.x]}ngOnInit(){if(this.payment.htlcs&&this.payment.htlcs[0]&&this.payment.htlcs[0].route&&this.payment.htlcs[0].route.hops&&this.payment.htlcs[0].route.hops.length>0){const t=this.payment.htlcs[0].route.hops.reduce((a,o)=>""===a?o.pub_key:a+","+o.pub_key,"");this.dataService.getAliasesFromPubkeys(t,!0).pipe((0,_.R)(this.unSubs[0])).subscribe(a=>{this.paths=a.reduce((o,s)=>""===o?s:o+"\n"+s,"")})}this.payment.payment_request&&""!==this.payment.payment_request.trim()&&this.dataService.decodePayment(this.payment.payment_request,!1).pipe((0,V.q)(1)).subscribe(t=>{t&&t.description&&""!==t.description&&(this.payment.description=t.description)})}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(j.D))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-payment-lookup"]],inputs:{payment:"payment"},decls:66,vars:20,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxFlex","100"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],["fxLayout","row"],["fxFlex","50"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"mat-card-content",1)(2,"div",2)(3,"h4",3),e._uU(4,"Payment Hash"),e.qZA(),e.TgZ(5,"span",4),e._uU(6),e.qZA()(),e._UZ(7,"mat-divider",5),e.TgZ(8,"div",2)(9,"h4",3),e._uU(10,"Payment Preimage"),e.qZA(),e.TgZ(11,"span",4)(12,"div"),e._uU(13),e.qZA()()(),e._UZ(14,"mat-divider",5),e.TgZ(15,"div",2)(16,"h4",3),e._uU(17,"Payment Request"),e.qZA(),e.TgZ(18,"span",4)(19,"div"),e._uU(20),e.qZA()()(),e._UZ(21,"mat-divider",5),e.TgZ(22,"div",2)(23,"h4",3),e._uU(24,"Description"),e.qZA(),e.TgZ(25,"span",4)(26,"div"),e._uU(27),e.qZA()()(),e._UZ(28,"mat-divider",5),e.TgZ(29,"div",6)(30,"div",7)(31,"h4",3),e._uU(32,"Status"),e.qZA(),e.TgZ(33,"span",4)(34,"div"),e._uU(35),e.qZA()()(),e.TgZ(36,"div",7)(37,"h4",3),e._uU(38,"Creation Date"),e.qZA(),e.TgZ(39,"span",4)(40,"div"),e._uU(41),e.qZA()()()(),e._UZ(42,"mat-divider",5),e.TgZ(43,"div",6)(44,"div",7)(45,"h4",3),e._uU(46,"Value (mSats)"),e.qZA(),e.TgZ(47,"span",4)(48,"div"),e._uU(49),e.ALo(50,"number"),e.qZA()()(),e.TgZ(51,"div",7)(52,"h4",3),e._uU(53,"Fee (mSats)"),e.qZA(),e.TgZ(54,"span",4)(55,"div"),e._uU(56),e.ALo(57,"number"),e.qZA()()()(),e._UZ(58,"mat-divider",5),e.TgZ(59,"div",2)(60,"h4",3),e._uU(61,"Path"),e.qZA(),e.TgZ(62,"span",4)(63,"div"),e._uU(64),e.qZA()()(),e._UZ(65,"mat-divider",5),e.qZA()()),2&t&&(e.xp6(6),e.Oqu(null==a.payment?null:a.payment.payment_hash),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.payment?null:a.payment.payment_preimage),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.payment?null:a.payment.payment_request),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.payment?null:a.payment.description),e.xp6(1),e.Q6J("inset",!0),e.xp6(7),e.Oqu(null==a.payment?null:a.payment.status),e.xp6(6),e.Oqu(null==a.payment?null:a.payment.creation_date),e.xp6(1),e.Q6J("inset",!0),e.xp6(7),e.Oqu(e.lcZ(50,16,null==a.payment?null:a.payment.value_msat)),e.xp6(7),e.Oqu(e.lcZ(57,18,null==a.payment?null:a.payment.fee_msat)),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(a.paths),e.xp6(1),e.Q6J("inset",!0))},directives:[d.xw,d.yH,d.Wh,b.dn,z.d],pipes:[p.JJ],styles:[""]}),n})();var Xh=h(159);function $h(n,i){if(1&n&&e._UZ(0,"qr-code",22),2&n){const t=e.oxw();e.Q6J("value",null==t.invoice?null:t.invoice.payment_request)("size",t.qrWidth)("errorCorrectionLevel","L")}}function jh(n,i){1&n&&(e.TgZ(0,"span",23),e._uU(1,"N/A"),e.qZA())}function Kh(n,i){if(1&n&&e._UZ(0,"qr-code",22),2&n){const t=e.oxw();e.Q6J("value",null==t.invoice?null:t.invoice.payment_request)("size",t.qrWidth)("errorCorrectionLevel","L")}}function eg(n,i){1&n&&(e.TgZ(0,"span",24),e._uU(1,"QR Code Not Applicable"),e.qZA())}function tg(n,i){1&n&&e._UZ(0,"mat-divider",16),2&n&&e.Q6J("inset",!0)}function ng(n,i){1&n&&(e.ynx(0),e._uU(1," (zero amount) "),e.BQk())}const Ze=function(n){return{"mr-0":n}};function ag(n,i){if(1&n&&e._UZ(0,"span",38),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,Ze,t.screenSize===t.screenSizeEnum.XS))}}function ig(n,i){if(1&n&&e._UZ(0,"span",39),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,Ze,t.screenSize===t.screenSizeEnum.XS))}}function og(n,i){if(1&n&&e._UZ(0,"span",40),2&n){const t=e.oxw(3);e.Q6J("ngClass",e.VKq(1,Ze,t.screenSize===t.screenSizeEnum.XS))}}function sg(n,i){if(1&n&&(e.TgZ(0,"div",27)(1,"div",32)(2,"span",33),e.YNc(3,ag,1,3,"span",34),e.YNc(4,ig,1,3,"span",35),e.YNc(5,og,1,3,"span",36),e._uU(6),e.qZA(),e.TgZ(7,"span",37),e._uU(8),e.ALo(9,"number"),e.qZA()(),e._UZ(10,"mat-divider",16),e.qZA()),2&n){const t=i.$implicit,a=e.oxw(2);e.xp6(3),e.Q6J("ngIf","SETTLED"===t.state),e.xp6(1),e.Q6J("ngIf","ACCEPTED"===t.state),e.xp6(1),e.Q6J("ngIf","CANCELED"===t.state),e.xp6(1),e.hij(" ",t.chan_id," "),e.xp6(2),e.Oqu(e.xi3(9,6,+t.amt_msat/1e3||0,a.getDecimalFormat(t))),e.xp6(2),e.Q6J("inset",!0)}}function lg(n,i){if(1&n){const t=e.EpF();e.TgZ(0,"div",11)(1,"mat-expansion-panel",25),e.NdJ("opened",function(){return e.CHM(t),e.oxw().flgOpened=!0})("closed",function(){return e.CHM(t),e.oxw().onExpansionClosed()}),e.TgZ(2,"mat-expansion-panel-header")(3,"mat-panel-title")(4,"h4",26),e._uU(5,"HTLCs"),e.qZA()()(),e.TgZ(6,"div",27)(7,"div",28)(8,"span",29),e._uU(9,"Channel ID"),e.qZA(),e.TgZ(10,"span",30),e._uU(11,"Amount (Sats)"),e.qZA()(),e._UZ(12,"mat-divider",16),e.YNc(13,sg,11,9,"div",31),e.qZA()()()}if(2&n){const t=e.oxw();e.xp6(12),e.Q6J("inset",!0),e.xp6(1),e.Q6J("ngForOf",null==t.invoice?null:t.invoice.htlcs)}}function rg(n,i){1&n&&e._UZ(0,"mat-divider",16),2&n&&e.Q6J("inset",!0)}const nt=function(n){return{"display-none":n}};let cg=(()=>{class n{constructor(t){this.commonService=t,this.qrWidth=240,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS&&(this.qrWidth=220)}getDecimalFormat(t){return t.amt_msat<1e3?"1.0-4":"1.0-0"}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(O.v))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-invoice-lookup"]],inputs:{invoice:"invoice"},decls:90,vars:45,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign.gt-sm","space-between stretch"],["fxFlex","20",1,"modal-qr-code-container","padding-gap-large",3,"fxLayoutAlign","ngClass"],[3,"value","size","errorCorrectionLevel",4,"ngIf"],["class","font-size-300",4,"ngIf"],["fxLayout","column","fxFlex","80"],[1,"padding-gap-x-large"],["fxLayout","column"],["fxFlex","30",1,"modal-qr-code-container","padding-gap",3,"fxLayoutAlign","ngClass"],["class","font-size-120",4,"ngIf"],["class","my-1",3,"inset",4,"ngIf"],[3,"perfectScrollbar"],["fxLayout","row"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[4,"ngIf"],[1,"my-1",3,"inset"],["fxFlex","100"],[1,"overflow-wrap","foreground-secondary-text"],["fxFlex","34"],["fxFlex","33"],["fxLayout","row",4,"ngIf"],[3,"value","size","errorCorrectionLevel"],[1,"font-size-300"],[1,"font-size-120"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"flat-expansion-panel",3,"opened","closed"],["fxLayoutAlign","start center","fxFlex","100",1,"font-bold-500"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","row","fxLayoutAlign","start start","fxFlex","100",1,"mt-minus-1"],["fxFlex","60",1,"foreground-secondary-text","font-bold-500"],["fxFlex","40",1,"foreground-secondary-text","font-bold-500"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start start","fxFlex","100"],["fxFlex","60",1,"foreground-secondary-text"],["class","dot green","matTooltip","Settled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Accepted","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Cancelled","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["fxFlex","40",1,"foreground-secondary-text"],["matTooltip","Settled","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Accepted","matTooltipPosition","right",1,"dot","yellow",3,"ngClass"],["matTooltip","Cancelled","matTooltipPosition","right",1,"dot","red",3,"ngClass"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1),e.YNc(2,$h,1,3,"qr-code",2),e.YNc(3,jh,2,0,"span",3),e.qZA(),e.TgZ(4,"div",4)(5,"mat-card-content",5)(6,"div",6)(7,"div",7),e.YNc(8,Kh,1,3,"qr-code",2),e.YNc(9,eg,2,0,"span",8),e.qZA(),e.YNc(10,tg,1,1,"mat-divider",9),e.TgZ(11,"div",10)(12,"div",11)(13,"div",12)(14,"h4",13),e._uU(15),e.qZA(),e.TgZ(16,"span",14),e._uU(17),e.ALo(18,"number"),e.YNc(19,ng,2,0,"ng-container",15),e.qZA()(),e.TgZ(20,"div",12)(21,"h4",13),e._uU(22,"Amount Settled"),e.qZA(),e.TgZ(23,"span",14)(24,"div"),e._uU(25),e.ALo(26,"number"),e.qZA()()()(),e._UZ(27,"mat-divider",16),e.TgZ(28,"div",11)(29,"div",12)(30,"h4",13),e._uU(31,"Date Created"),e.qZA(),e.TgZ(32,"span",14),e._uU(33),e.ALo(34,"date"),e.qZA()(),e.TgZ(35,"div",12)(36,"h4",13),e._uU(37,"Date Settled"),e.qZA(),e.TgZ(38,"span",14),e._uU(39),e.ALo(40,"date"),e.qZA()()(),e._UZ(41,"mat-divider",16),e.TgZ(42,"div",11)(43,"div",17)(44,"h4",13),e._uU(45,"Memo"),e.qZA(),e.TgZ(46,"span",14),e._uU(47),e.qZA()()(),e._UZ(48,"mat-divider",16),e.TgZ(49,"div",11)(50,"div",17)(51,"h4",13),e._uU(52,"Payment Request"),e.qZA(),e.TgZ(53,"span",18),e._uU(54),e.qZA()()(),e._UZ(55,"mat-divider",16),e.TgZ(56,"div",11)(57,"div",17)(58,"h4",13),e._uU(59,"Payment Hash"),e.qZA(),e.TgZ(60,"span",18),e._uU(61),e.qZA()()(),e.TgZ(62,"div"),e._UZ(63,"mat-divider",16),e.TgZ(64,"div",11)(65,"div",17)(66,"h4",13),e._uU(67,"Preimage"),e.qZA(),e.TgZ(68,"span",18),e._uU(69),e.qZA()()(),e._UZ(70,"mat-divider",16),e.TgZ(71,"div",11)(72,"div",19)(73,"h4",13),e._uU(74,"State"),e.qZA(),e.TgZ(75,"span",18),e._uU(76),e.qZA()(),e.TgZ(77,"div",20)(78,"h4",13),e._uU(79,"Expiry"),e.qZA(),e.TgZ(80,"span",18),e._uU(81),e.qZA()(),e.TgZ(82,"div",20)(83,"h4",13),e._uU(84,"Private Routing Hints"),e.qZA(),e.TgZ(85,"span",18),e._uU(86),e.qZA()()(),e._UZ(87,"mat-divider",16),e.YNc(88,lg,14,2,"div",21),e.YNc(89,rg,1,1,"mat-divider",9),e.qZA()()()()()()),2&t&&(e.xp6(1),e.Q6J("fxLayoutAlign",null!=a.invoice&&a.invoice.payment_request&&""!==(null==a.invoice?null:a.invoice.payment_request)?"center start":"center center")("ngClass",e.VKq(41,nt,a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM)),e.xp6(1),e.Q6J("ngIf",(null==a.invoice?null:a.invoice.payment_request)&&""!==(null==a.invoice?null:a.invoice.payment_request)),e.xp6(1),e.Q6J("ngIf",!(null!=a.invoice&&a.invoice.payment_request)||""===(null==a.invoice?null:a.invoice.payment_request)),e.xp6(4),e.Q6J("fxLayoutAlign",null!=a.invoice&&a.invoice.payment_request&&""!==(null==a.invoice?null:a.invoice.payment_request)?"center start":"center center")("ngClass",e.VKq(43,nt,a.screenSize!==a.screenSizeEnum.XS&&a.screenSize!==a.screenSizeEnum.SM)),e.xp6(1),e.Q6J("ngIf",(null==a.invoice?null:a.invoice.payment_request)&&""!==(null==a.invoice?null:a.invoice.payment_request)),e.xp6(1),e.Q6J("ngIf",!(null!=a.invoice&&a.invoice.payment_request)||""===(null==a.invoice?null:a.invoice.payment_request)),e.xp6(1),e.Q6J("ngIf",a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM),e.xp6(5),e.Oqu(a.screenSize===a.screenSizeEnum.XS?"Amount":"Amount Requested"),e.xp6(2),e.hij("",e.lcZ(18,31,(null==a.invoice?null:a.invoice.value)||0)," Sats"),e.xp6(2),e.Q6J("ngIf",!(null!=a.invoice&&a.invoice.value)||"0"===(null==a.invoice?null:a.invoice.value)),e.xp6(6),e.hij("",e.lcZ(26,33,null==a.invoice?null:a.invoice.amt_paid_sat)," Sats"),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(e.xi3(34,35,1e3*(null==a.invoice?null:a.invoice.creation_date),"dd/MMM/y HH:mm")),e.xp6(6),e.Oqu(0!=+(null==a.invoice?null:a.invoice.settle_date)?e.xi3(40,38,1e3*+(null==a.invoice?null:a.invoice.settle_date),"dd/MMM/y HH:mm"):"-"),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.invoice?null:a.invoice.memo),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu((null==a.invoice?null:a.invoice.payment_request)||"N/A"),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu((null==a.invoice?null:a.invoice.r_hash)||""),e.xp6(2),e.Q6J("inset",!0),e.xp6(6),e.Oqu((null==a.invoice?null:a.invoice.r_preimage)||"-"),e.xp6(1),e.Q6J("inset",!0),e.xp6(6),e.Oqu(null==a.invoice?null:a.invoice.state),e.xp6(5),e.Oqu(null==a.invoice?null:a.invoice.expiry),e.xp6(5),e.Oqu(null!=a.invoice&&a.invoice.private?"Yes":"No"),e.xp6(1),e.Q6J("inset",!0),e.xp6(1),e.Q6J("ngIf",(null==a.invoice?null:a.invoice.htlcs)&&(null==a.invoice?null:a.invoice.htlcs.length)>0),e.xp6(1),e.Q6J("ngIf",(null==a.invoice?null:a.invoice.htlcs)&&(null==a.invoice?null:a.invoice.htlcs.length)>0))},directives:[d.xw,d.Wh,d.yH,p.mk,S.oO,p.O5,Xh.uU,b.dn,z.d,Q.$V,H.ib,H.yz,H.yK,p.sg,X.gM],pipes:[p.JJ,p.uU],styles:[""]}),n})();function ug(n,i){if(1&n&&(e.TgZ(0,"mat-radio-button",17),e._uU(1),e.qZA()),2&n){const t=i.$implicit,a=e.oxw();e.Q6J("value",t.id)("checked",a.selectedFieldId===t.id),e.xp6(1),e.hij(" ",t.name," ")}}function pg(n,i){if(1&n&&(e.TgZ(0,"mat-error"),e._uU(1),e.qZA()),2&n){const t=e.oxw();e.xp6(1),e.hij("",null==t.lookupFields[t.selectedFieldId]?null:t.lookupFields[t.selectedFieldId].placeholder," is required.")}}function mg(n,i){1&n&&e._UZ(0,"mat-progress-bar",20)}const dg=function(n){return{"w-100 mt-2 p-2 error-border":n,"w-100 my-2 p-2":!0}};function _g(n,i){if(1&n&&(e.TgZ(0,"div",18),e.YNc(1,mg,1,0,"mat-progress-bar",19),e._uU(2),e.qZA()),2&n){const t=e.oxw();e.Q6J("ngClass",e.VKq(3,dg,""!==t.errorMessage&&"Getting lookup details..."!==t.errorMessage)),e.xp6(1),e.Q6J("ngIf","Getting lookup details..."===t.errorMessage),e.xp6(1),e.hij(" ",t.errorMessage," ")}}function hg(n,i){if(1&n&&(e.TgZ(0,"span",27),e._UZ(1,"rtl-payment-lookup",28),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("payment",t.lookupValue)}}function gg(n,i){if(1&n&&(e.TgZ(0,"span",27),e._UZ(1,"rtl-invoice-lookup",29),e.qZA()),2&n){const t=e.oxw(2);e.xp6(1),e.Q6J("invoice",t.lookupValue)}}function fg(n,i){1&n&&(e.TgZ(0,"span",27)(1,"h3"),e._uU(2,"Error! Unable to find details!"),e.qZA()())}function Cg(n,i){if(1&n&&(e.TgZ(0,"div",21)(1,"div",22)(2,"span",23),e._uU(3),e.qZA()(),e.TgZ(4,"div",24),e.YNc(5,hg,2,1,"span",25),e.YNc(6,gg,2,1,"span",25),e.YNc(7,fg,3,0,"span",26),e.qZA()()),2&n){const t=e.oxw();e.xp6(3),e.hij("",t.lookupFields[t.selectedFieldId].name," Details"),e.xp6(1),e.Q6J("ngSwitch",t.selectedFieldId),e.xp6(1),e.Q6J("ngSwitchCase",0),e.xp6(1),e.Q6J("ngSwitchCase",1)}}const xg=function(n){return{"mt-1":!0,"mt-2":n}},bg=T.Bz.forChild([{path:"",component:Fe,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:ri,canActivate:[F.QM]},{path:"wallet",component:h1,canActivate:[F.a1]},{path:"onchain",component:Zd,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"receive/utxos"},{path:"receive/:selTab",component:Sd,canActivate:[F.QM]},{path:"send/:selTab",component:Ke,data:{sweepAll:!1},canActivate:[F.QM]},{path:"sweep/:selTab",component:Ke,data:{sweepAll:!0},canActivate:[F.QM]}]},{path:"connections",component:pi,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:_o,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:il,canActivate:[F.QM]},{path:"pending",component:Er,canActivate:[F.QM]},{path:"closed",component:mc,canActivate:[F.QM]},{path:"activehtlcs",component:Hc,canActivate:[F.QM]}]},{path:"peers",component:ro,data:{sweepAll:!1},canActivate:[F.QM]}]},{path:"transactions",component:C1,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:Je,canActivate:[F.QM]},{path:"invoices",component:De,canActivate:[F.QM]},{path:"lookuptransactions",component:(()=>{class n{constructor(t,a,o,s){this.logger=t,this.commonService=a,this.store=o,this.actions=s,this.lookupKey="",this.lookupValue={},this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Payment",placeholder:"Payment Hash"},{id:1,name:"Invoice",placeholder:"Payment Hash"}],this.faSearch=y.wn1,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatusEnum=l.Bn,this.unSubs=[new m.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,_.R)(this.unSubs[0]),(0,E.h)(t=>t.type===l.uR.SET_LOOKUP_LND)).subscribe(t=>{this.flgSetLookupValue=!t.payload.error,this.lookupValue=JSON.parse(JSON.stringify(t.payload)),this.errorMessage=t.payload.error?this.commonService.extractErrorMessage(t.payload.error):"",this.logger.info(this.lookupValue)})}onLookup(){if(!this.lookupKey)return!0;switch(this.errorMessage="",this.flgSetLookupValue=!1,this.lookupValue={},this.selectedFieldId){case 0:this.store.dispatch((0,v.yZ)({payload:Buffer.from(this.lookupKey.trim(),"hex").toString("base64").replace(/\+/g,"-").replace(/[/]/g,"_")}));break;case 1:this.store.dispatch((0,v.n7)({payload:{openSnackBar:!1,paymentHash:Buffer.from(this.lookupKey.trim(),"hex").toString("base64").replace(/\+/g,"-").replace(/[/]/g,"_")}}))}}onSelectChange(t){this.resetData(),this.selectedFieldId=t.value}resetData(){this.flgSetLookupValue=!1,this.selectedFieldId=0,this.lookupKey="",this.lookupValue={},this.errorMessage=""}clearLookupValue(){this.lookupValue={},this.flgSetLookupValue=!1}ngOnDestroy(){this.unSubs.forEach(t=>{t.next(null),t.complete()})}}return n.\u0275fac=function(t){return new(t||n)(e.Y36(N.mQ),e.Y36(O.v),e.Y36(A.yh),e.Y36(G.eX))},n.\u0275cmp=e.Xpm({type:n,selectors:[["rtl-lookup-transactions"]],decls:19,vars:10,consts:[["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"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField",3,"ngModel","ngModelChange","change"],["class","mr-4",3,"value","checked",4,"ngFor","ngForOf"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"placeholder","ngModel","change","ngModelChange"],["key",""],[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","row wrap","fxLayoutAlign","space-between center",3,"ngClass",4,"ngIf"],["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"],[1,"mr-4",3,"value","checked"],["fxFlex","100","fxLayout","row wrap","fxLayoutAlign","space-between center",3,"ngClass"],["mode","indeterminate",4,"ngIf"],["mode","indeterminate"],["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,"mb-2"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[3,"payment"],[3,"invoice"]],template:function(t,a){1&t&&(e.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-content",2)(3,"form",3,4)(5,"div",5)(6,"mat-radio-group",6),e.NdJ("ngModelChange",function(s){return a.selectedFieldId=s})("change",function(s){return a.onSelectChange(s)}),e.YNc(7,ug,2,3,"mat-radio-button",7),e.qZA()(),e.TgZ(8,"mat-form-field",8)(9,"input",9,10),e.NdJ("change",function(){return a.clearLookupValue()})("ngModelChange",function(s){return a.lookupKey=s}),e.qZA(),e.YNc(11,pg,2,1,"mat-error",11),e.qZA(),e.TgZ(12,"div",12)(13,"button",13),e.NdJ("click",function(){return a.resetData()}),e._uU(14,"Clear"),e.qZA(),e.TgZ(15,"button",14),e.NdJ("click",function(){return a.onLookup()}),e._uU(16,"Lookup"),e.qZA()()(),e.YNc(17,_g,3,5,"div",15),e.YNc(18,Cg,8,4,"div",16),e.qZA()()()),2&t&&(e.xp6(6),e.Q6J("ngModel",a.selectedFieldId),e.xp6(1),e.Q6J("ngForOf",a.lookupFields),e.xp6(1),e.Q6J("ngClass",e.VKq(8,xg,a.screenSize===a.screenSizeEnum.XS||a.screenSize===a.screenSizeEnum.SM)),e.xp6(1),e.Q6J("placeholder",(null==a.lookupFields[a.selectedFieldId]?null:a.lookupFields[a.selectedFieldId].placeholder)||"Lookup Key")("ngModel",a.lookupKey),e.xp6(2),e.Q6J("ngIf",!a.lookupKey),e.xp6(6),e.Q6J("ngIf",""!==a.errorMessage),e.xp6(1),e.Q6J("ngIf",""===a.errorMessage&&a.lookupValue&&a.flgSetLookupValue))},directives:[d.xw,d.yH,d.Wh,b.dn,c._Y,c.JL,c.F,ie.VQ,c.JJ,c.On,p.sg,ie.U0,f.KE,p.mk,S.oO,I.Nt,c.Fj,c.Q7,p.O5,f.TO,k.lW,P.pW,p.RF,p.n9,Wh,cg,p.ED],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}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})(),canActivate:[F.QM]}]},{path:"messages",component:rh,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"sign"},{path:"sign",component:uh,canActivate:[F.QM]},{path:"verify",component:Ch,canActivate:[F.QM]}]},{path:"channelbackup",component:w_,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"bckup"},{path:"bckup",component:sh,canActivate:[F.QM]},{path:"restore",component:Y_,canActivate:[F.QM]}]},{path:"routing",component:yu,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:Ge,canActivate:[F.QM]},{path:"peers",component:Ep,canActivate:[F.QM]},{path:"nonroutingprs",component:zh,canActivate:[F.QM]}]},{path:"reports",component:Yp,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"routingreport"},{path:"routingreport",component:jp,canActivate:[F.QM]},{path:"transactions",component:um,canActivate:[F.QM]}]},{path:"graph",component:y1,canActivate:[F.QM],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:Ve,canActivate:[F.QM]},{path:"queryroutes",component:Q1,canActivate:[F.QM]}]},{path:"lookups",component:Ve,canActivate:[F.QM]},{path:"network",component:v_,canActivate:[F.QM]},{path:"**",component:xh.w},{path:"rates",redirectTo:"network"}]}]);var vg=h(8750);let Zg=(()=>{class n{}return n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=e.oAB({type:n,bootstrap:[Fe]}),n.\u0275inj=e.cJS({providers:[F.QM],imports:[[p.ez,vg.m,bg]]}),n})()}}]); \ No newline at end of file diff --git a/frontend/924.5f21f58ee3917b8b.js b/frontend/924.5f21f58ee3917b8b.js deleted file mode 100644 index 62a2deb2..00000000 --- a/frontend/924.5f21f58ee3917b8b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[924],{7924:(Yc,ct,_)=>{_.r(ct),_.d(ct,{ECLModule:()=>Qc});var u=_(9808),x=_(1402),kt=_(8878),t=_(5e3),p=_(7093),M=_(5899);function Pt(n,a){1&n&&t._UZ(0,"mat-progress-bar",3)}let ut=(()=>{class n{constructor(e){this.router=e,this.loading=!1,this.router.events.subscribe(i=>{switch(!0){case i instanceof x.OD:this.loading=!0;break;case i instanceof x.m2:case i instanceof x.gk:case i instanceof x.Q3:this.loading=!1}})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Pt,1,0,"mat-progress-bar",1),t._UZ(2,"router-outlet",null,2),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.loading))},directives:[p.xw,p.yH,p.Wh,u.O5,M.pW,x.lC],styles:[""],data:{animation:[kt.g]}}),n})();var d=_(7579),h=_(2722),et=_(1365),pt=_(534),L=_(801),l=_(7731),C=_(2501),q=_(5043),S=_(5620),R=_(62),O=_(9444),mt=_(3954),T=_(9224),I=_(7423),nt=_(2181),dt=_(5245),w=_(3322);const ht=function(n){return{backgroundColor:n}};function Dt(n,a){if(1&n&&t._UZ(0,"span",6),2&n){const e=t.oxw();t.Q6J("ngStyle",t.VKq(1,ht,null==e.information?null:e.information.color))}}function Ut(n,a){if(1&n&&(t.TgZ(0,"div")(1,"h4",1),t._uU(2,"Color"),t.qZA(),t.TgZ(3,"div",2),t._UZ(4,"span",7),t._uU(5),t.ALo(6,"uppercase"),t.qZA()()),2&n){const e=t.oxw();t.xp6(4),t.Q6J("ngStyle",t.VKq(4,ht,null==e.information?null:e.information.color)),t.xp6(1),t.hij(" ",t.lcZ(6,2,null==e.information?null:e.information.color)," ")}}function Mt(n,a){if(1&n&&(t.TgZ(0,"span",2),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}let Jt=(()=>{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"))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[t.TTD],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div")(2,"h4",1),t._uU(3,"Alias"),t.qZA(),t.TgZ(4,"div",2),t._uU(5),t.YNc(6,Dt,1,3,"span",3),t.qZA()(),t.YNc(7,Ut,7,6,"div",4),t.TgZ(8,"div")(9,"h4",1),t._uU(10,"Implementation"),t.qZA(),t.TgZ(11,"div",2),t._uU(12),t.qZA()(),t.TgZ(13,"div")(14,"h4",1),t._uU(15,"Chain"),t.qZA(),t.YNc(16,Mt,2,1,"span",5),t.qZA()()),2&e&&(t.xp6(5),t.hij(" ",null==i.information?null:i.information.alias," "),t.xp6(1),t.Q6J("ngIf",!i.showColorFieldSeparately),t.xp6(1),t.Q6J("ngIf",i.showColorFieldSeparately),t.xp6(5),t.Oqu(null!=i.information&&i.information.lnImplementation||null!=i.information&&i.information.version?(null==i.information?null:i.information.lnImplementation)+" "+(null==i.information?null:i.information.version):""),t.xp6(4),t.Q6J("ngForOf",i.chains))},directives:[p.xw,p.yH,p.Wh,u.O5,u.PC,w.Zl,u.sg],pipes:[u.gd],styles:[""]}),n})();function Qt(n,a){if(1&n&&(t.TgZ(0,"div",2)(1,"div")(2,"h4",3),t._uU(3,"Lightning"),t.qZA(),t.TgZ(4,"div",4),t._uU(5),t.ALo(6,"number"),t.qZA(),t._UZ(7,"mat-progress-bar",5),t.qZA(),t.TgZ(8,"div")(9,"h4",3),t._uU(10,"On-chain"),t.qZA(),t.TgZ(11,"div",4),t._uU(12),t.ALo(13,"number"),t.qZA(),t._UZ(14,"mat-progress-bar",5),t.qZA(),t.TgZ(15,"div")(16,"h4",3),t._uU(17,"Total"),t.qZA(),t.TgZ(18,"div",4),t._uU(19),t.ALo(20,"number"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(5),t.hij("",t.lcZ(6,5,e.balances.lightning)," Sats"),t.xp6(2),t.s9C("value",e.balances.lightning/e.balances.total*100),t.xp6(5),t.hij("",t.lcZ(13,7,e.balances.onchain)," Sats"),t.xp6(2),t.s9C("value",e.balances.onchain/e.balances.total*100),t.xp6(5),t.hij("",t.lcZ(20,9,e.balances.total)," Sats")}}function Yt(n,a){if(1&n&&(t.TgZ(0,"div",6)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let Ht=(()=>{class n{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(e,i){if(1&e&&(t.YNc(0,Qt,21,11,"div",0),t.YNc(1,Yt,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,M.pW],pipes:[u.JJ],styles:[""]}),n})();var y=_(7322),V=_(7238),G=_(4834),Q=_(8129);const Bt=function(){return["../connections/channels/open"]},zt=function(n){return{filter:n}};function Vt(n,a){if(1&n&&(t.TgZ(0,"div",19)(1,"a",20),t._uU(2),t.ALo(3,"slice"),t.qZA(),t.TgZ(4,"div",6)(5,"mat-hint",21)(6,"strong",8),t._uU(7,"Local:"),t.qZA(),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"mat-hint",22),t._UZ(11,"fa-icon",23),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"mat-hint",24)(15,"strong",8),t._uU(16,"Remote:"),t.qZA(),t._uU(17),t.ALo(18,"number"),t.qZA()(),t._UZ(19,"mat-progress-bar",25),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(1),t.s9C("matTooltip",e.alias||e.shortChannelId),t.s9C("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.Q6J("routerLink",t.DdM(23,Bt))("state",t.VKq(24,zt,e.channelId)),t.xp6(1),t.AsE(" ",t.Dn7(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.xp6(6),t.hij("",t.xi3(9,15,(null==e?null:e.toLocal)||0,"1.0-0")," Sats"),t.xp6(3),t.Q6J("icon",i.faBalanceScale),t.xp6(1),t.hij(" (",t.lcZ(13,18,(null==e?null:e.balancedness)||0),") "),t.xp6(5),t.hij("",t.xi3(18,20,(null==e?null:e.toRemote)||0,"1.0-0")," Sats"),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function Gt(n,a){if(1&n&&(t.TgZ(0,"div",17),t.YNc(1,Vt,20,26,"div",18),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.allChannels)}}function Xt(n,a){if(1&n&&(t.TgZ(0,"div",3)(1,"div",4)(2,"span",5),t._uU(3,"Total Capacity"),t.qZA(),t.TgZ(4,"div",6)(5,"mat-hint",7)(6,"strong",8),t._uU(7,"Local:"),t.qZA(),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"mat-hint",9),t._UZ(11,"fa-icon",10),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"mat-hint",11)(15,"strong",8),t._uU(16,"Remote:"),t.qZA(),t._uU(17),t.ALo(18,"number"),t.qZA()(),t._UZ(19,"mat-progress-bar",12),t.qZA(),t.TgZ(20,"div",13),t._UZ(21,"mat-divider",14),t.qZA(),t.TgZ(22,"div",15),t.YNc(23,Gt,2,1,"div",16),t.qZA()()),2&n){const e=t.oxw(),i=t.MAs(2);t.xp6(8),t.hij("",t.xi3(9,7,(null==e.channelBalances?null:e.channelBalances.localBalance)||0,"1.0-0")," Sats"),t.xp6(3),t.Q6J("icon",e.faBalanceScale),t.xp6(1),t.hij(" (",t.lcZ(13,10,(null==e.channelBalances?null:e.channelBalances.balancedness)||0),") "),t.xp6(5),t.hij("",t.xi3(18,12,(null==e.channelBalances?null:e.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),t.xp6(2),t.s9C("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.xp6(4),t.Q6J("ngIf",e.allChannels&&(null==e.allChannels?null:e.allChannels.length)>0)("ngIfElse",i)}}function $t(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",26),t._uU(1," No channels available. "),t.TgZ(2,"button",27),t.NdJ("click",function(){return t.CHM(e),t.oxw().goToChannels()}),t._uU(3,"Open Channel"),t.qZA()()}}function Wt(n,a){if(1&n&&(t.TgZ(0,"div",28)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let Kt=(()=>{class n{constructor(e){this.router=e,this.faBalanceScale=L.DL8,this.faDumbbell=L.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["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(e,i){if(1&e&&(t.YNc(0,Xt,24,15,"div",0),t.YNc(1,$t,4,0,"ng-template",null,1,t.W1O),t.YNc(3,Wt,3,1,"ng-template",null,2,t.W1O)),2&e){const o=t.MAs(4);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,y.bx,O.BN,V.gM,M.pW,G.d,Q.$V,u.sg,x.yS,I.lW],pipes:[u.JJ,u.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),n})();function jt(n,a){if(1&n&&(t.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),t._uU(4,"Daily"),t.qZA(),t.TgZ(5,"div",5),t._uU(6),t.ALo(7,"number"),t.qZA()(),t.TgZ(8,"div")(9,"h4",4),t._uU(10,"Weekly"),t.qZA(),t.TgZ(11,"div",5),t._uU(12),t.ALo(13,"number"),t.qZA()(),t.TgZ(14,"div")(15,"h4",4),t._uU(16,"Monthly"),t.qZA(),t.TgZ(17,"div",5),t._uU(18),t.ALo(19,"number"),t.qZA()()(),t.TgZ(20,"div",3)(21,"div")(22,"h4",4),t._uU(23,"Transactions"),t.qZA(),t.TgZ(24,"div",5),t._uU(25),t.ALo(26,"number"),t.qZA()(),t.TgZ(27,"div")(28,"h4",4),t._uU(29,"Transactions"),t.qZA(),t.TgZ(30,"div",5),t._uU(31),t.ALo(32,"number"),t.qZA()(),t.TgZ(33,"div")(34,"h4",4),t._uU(35,"Transactions"),t.qZA(),t.TgZ(36,"div",5),t._uU(37),t.ALo(38,"number"),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(6),t.hij("",t.lcZ(7,6,null==e.fees?null:e.fees.daily_fee)," Sats"),t.xp6(6),t.hij("",t.lcZ(13,8,null==e.fees?null:e.fees.weekly_fee)," Sats"),t.xp6(6),t.hij("",t.lcZ(19,10,null==e.fees?null:e.fees.monthly_fee)," Sats"),t.xp6(7),t.Oqu(t.lcZ(26,12,null==e.fees?null:e.fees.daily_txs)),t.xp6(6),t.Oqu(t.lcZ(32,14,null==e.fees?null:e.fees.weekly_txs)),t.xp6(6),t.Oqu(t.lcZ(38,16,null==e.fees?null:e.fees.monthly_txs))}}function te(n,a){if(1&n&&(t.TgZ(0,"div",6)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let ee=(()=>{class n{constructor(){this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100}ngOnChanges(){var e;if(null===(e=this.fees)||void 0===e?void 0:e.monthly_fee){this.totalFees=[{name:"Monthly",value:this.fees.monthly_fee},{name:"Weekly",value:this.fees.weekly_fee},{name:"Daily ",value:this.fees.daily_fee}];const i=Math.ceil(Math.log(this.fees.monthly_fee+1)/Math.LN10),o=Math.pow(10,i-1);this.maxFeeValue=Math.ceil(this.fees.monthly_fee/o)*o/5||100,Object.assign(this,this.totalFees)}else this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100,Object.assign(this,this.totalFees)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},features:[t.TTD],decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(e,i){if(1&e&&(t.YNc(0,jt,39,18,"div",0),t.YNc(1,te,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function ne(n,a){if(1&n&&(t.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),t._uU(4,"Active"),t.qZA(),t.TgZ(5,"div",5),t._UZ(6,"span",6),t._uU(7),t.ALo(8,"number"),t.qZA()(),t.TgZ(9,"div")(10,"h4",4),t._uU(11,"Pending"),t.qZA(),t.TgZ(12,"div",5),t._UZ(13,"span",7),t._uU(14),t.ALo(15,"number"),t.qZA()(),t.TgZ(16,"div")(17,"h4",4),t._uU(18,"Inactive"),t.qZA(),t.TgZ(19,"div",5),t._UZ(20,"span",8),t._uU(21),t.ALo(22,"number"),t.qZA()()(),t.TgZ(23,"div",3)(24,"div")(25,"h4",4),t._uU(26,"Capacity"),t.qZA(),t.TgZ(27,"div",5),t._uU(28),t.ALo(29,"number"),t.qZA()(),t.TgZ(30,"div")(31,"h4",4),t._uU(32,"Capacity"),t.qZA(),t.TgZ(33,"div",5),t._uU(34),t.ALo(35,"number"),t.qZA()(),t.TgZ(36,"div")(37,"h4",4),t._uU(38,"Capacity"),t.qZA(),t.TgZ(39,"div",5),t._uU(40),t.ALo(41,"number"),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(7),t.Oqu(t.lcZ(8,6,(null==e.channelsStatus.active?null:e.channelsStatus.active.channels)||0)),t.xp6(7),t.Oqu(t.lcZ(15,8,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.channels)||0)),t.xp6(7),t.Oqu(t.lcZ(22,10,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.channels)||0)),t.xp6(7),t.hij("",t.lcZ(29,12,(null==e.channelsStatus.active?null:e.channelsStatus.active.capacity)||0)," Sats"),t.xp6(6),t.hij("",t.lcZ(35,14,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.capacity)||0)," Sats"),t.xp6(6),t.hij("",t.lcZ(41,16,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.capacity)||0)," Sats")}}function ie(n,a){if(1&n&&(t.TgZ(0,"div",9)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let ae=(()=>{class n{constructor(){this.channelsStatus={}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(e,i){if(1&e&&(t.YNc(0,ne,42,18,"div",0),t.YNc(1,ie,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function oe(n,a){if(1&n&&(t.TgZ(0,"mat-hint",19)(1,"strong",20),t._uU(2,"Capacity: "),t.qZA(),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij("",t.xi3(4,1,e.toRemote||0,"1.0-0")," Sats")}}function se(n,a){if(1&n&&(t.TgZ(0,"mat-hint",19)(1,"strong",20),t._uU(2,"Capacity: "),t.qZA(),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij("",t.xi3(4,1,e.toLocal||0,"1.0-0")," Sats")}}function le(n,a){if(1&n&&t._UZ(0,"mat-progress-bar",21),2&n){const e=t.oxw().$implicit,i=t.oxw(3);t.s9C("value",i.totalLiquidity>0?(+e.toRemote||0)/i.totalLiquidity*100:0)}}function re(n,a){if(1&n&&t._UZ(0,"mat-progress-bar",21),2&n){const e=t.oxw().$implicit,i=t.oxw(3);t.s9C("value",i.totalLiquidity>0?(+e.toLocal||0)/i.totalLiquidity*100:0)}}const ce=function(){return["../connections/channels/open"]},ue=function(n){return{filter:n}};function pe(n,a){if(1&n&&(t.TgZ(0,"div",14)(1,"a",15),t._uU(2),t.ALo(3,"slice"),t.qZA(),t.TgZ(4,"div",16),t.YNc(5,oe,5,4,"mat-hint",17),t.YNc(6,se,5,4,"mat-hint",17),t.qZA(),t.YNc(7,le,1,1,"mat-progress-bar",18),t.YNc(8,re,1,1,"mat-progress-bar",18),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(1),t.s9C("matTooltip",e.alias||e.shortChannelId),t.s9C("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.Q6J("routerLink",t.DdM(14,ce))("state",t.VKq(15,ue,e.channelId)),t.xp6(1),t.AsE(" ",t.Dn7(3,10,e.alias||e.shortChannelId,0,24),"",(e.alias||e.shortChannelId).length>25?"...":""," "),t.xp6(3),t.Q6J("ngIf","In"===i.direction),t.xp6(1),t.Q6J("ngIf","Out"===i.direction),t.xp6(1),t.Q6J("ngIf","In"===i.direction),t.xp6(1),t.Q6J("ngIf","Out"===i.direction)}}function me(n,a){if(1&n&&(t.TgZ(0,"div",12),t.YNc(1,pe,9,17,"div",13),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.allChannels)}}const de=function(n,a,e){return{"mb-4":n,"mb-2":a,"mb-1":e}};function he(n,a){if(1&n&&(t.TgZ(0,"div",3)(1,"div",4)(2,"span",5),t._uU(3,"Total Capacity"),t.qZA(),t.TgZ(4,"mat-hint",6),t._uU(5),t.ALo(6,"number"),t.qZA(),t._UZ(7,"mat-progress-bar",7),t.qZA(),t.TgZ(8,"div",8),t._UZ(9,"mat-divider",9),t.qZA(),t.TgZ(10,"div",10),t.YNc(11,me,2,1,"div",11),t.qZA()()),2&n){const e=t.oxw(),i=t.MAs(2);t.Q6J("ngClass",t.kEZ(7,de,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.xp6(5),t.hij("",t.xi3(6,4,e.totalLiquidity,"1.0-0")," Sats"),t.xp6(6),t.Q6J("ngIf",e.allChannels&&e.allChannels.length>0)("ngIfElse",i)}}function _e(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).goToChannels()}),t._uU(1,"Open Channel"),t.qZA()}}function fe(n,a){if(1&n&&(t.TgZ(0,"div",22),t._uU(1," No channels available. "),t.YNc(2,_e,2,0,"button",23),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngIf","Out"===e.direction)}}function ge(n,a){if(1&n&&(t.TgZ(0,"div",25)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let Ce=(()=>{class n{constructor(e,i){this.router=e,this.commonService=i,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],["fxLayout","column","fxFlex.gt-sm","88","fxFlex","84","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100","class","w-100",4,"ngIf","ngIfElse"],["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 center",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(e,i){if(1&e&&(t.YNc(0,he,12,11,"div",0),t.YNc(1,fe,3,1,"ng-template",null,1,t.W1O),t.YNc(3,ge,3,1,"ng-template",null,2,t.W1O)),2&e){const o=t.MAs(4);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,u.mk,w.oO,y.bx,M.pW,G.d,Q.$V,u.sg,x.yS,V.gM,I.lW],pipes:[u.JJ,u.OU],styles:[""]}),n})();var k=_(3251),J=_(9300),A=_(6087),v=_(4847),r=_(2075),D=_(8966),N=_(2994),z=_(6642),m=_(3075),U=_(7531),X=_(3390),$=_(6534),P=_(4107),Y=_(508);function xe(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Description is required."),t.qZA())}function ye(n,a){if(1&n&&(t.TgZ(0,"mat-option",25),t._uU(1),t.ALo(2,"titlecase"),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(t.lcZ(2,2,e))}}function Le(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.invoiceError)}}function Te(n,a){if(1&n&&(t.TgZ(0,"div",26),t._UZ(1,"fa-icon",27),t.YNc(2,Le,2,1,"span",11),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.invoiceError)}}let ve=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.data=i,this.store=o,this.decimalPipe=s,this.commonService=c,this.actions=f,this.faExclamationTriangle=L.eHv,this.selNode={},this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=l.IV,this.timeUnitEnum=l.Qk,this.timeUnits=l.LO,this.selTimeUnit=l.Qk.SECS,this.invoiceError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.actions.pipe((0,h.R)(this.unSubs[2]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&"CreateInvoice"===e.payload.action&&(e.payload.status===l.Bn.ERROR&&(this.invoiceError=e.payload.message),e.payload.status===l.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(e){if(this.invoiceError="",!this.description)return!0;let i=this.expiry?this.expiry:3600;this.selTimeUnit!==l.Qk.SECS&&(i=this.commonService.convertTime(this.expiry,this.selTimeUnit,l.Qk.SECS));let o=null;o=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,N.Z$)({payload:o}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=l.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,l.Xz.OTHER)+" "+e.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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(S.yh),t.Y36(u.JJ),t.Y36(R.v),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-create-invoices"]],decls:35,vars:16,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description","required","",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","placeholder","Expiry","type","number","name","exp","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(e,i){if(1&e){const o=t.EpF();t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Create Invoice"),t.qZA()(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),t.NdJ("ngModelChange",function(c){return i.description=c}),t.qZA(),t.YNc(13,xe,2,0,"mat-error",11),t.qZA(),t.TgZ(14,"div",12)(15,"mat-form-field",13)(16,"input",14),t.NdJ("ngModelChange",function(c){return i.invoiceValue=c})("keyup",function(){return i.onInvoiceValueChange()}),t.qZA(),t.TgZ(17,"span",15),t._uU(18," Sats "),t.qZA(),t.TgZ(19,"mat-hint"),t._uU(20),t.qZA()(),t.TgZ(21,"mat-form-field",16)(22,"input",17),t.NdJ("ngModelChange",function(c){return i.expiry=c}),t.qZA(),t.TgZ(23,"span",15),t._uU(24),t.ALo(25,"titlecase"),t.qZA()(),t.TgZ(26,"mat-form-field",18)(27,"mat-select",19),t.NdJ("selectionChange",function(c){return i.onTimeUnitChange(c)}),t.YNc(28,ye,3,4,"mat-option",20),t.qZA()()(),t.YNc(29,Te,3,2,"div",21),t.TgZ(30,"div",22)(31,"button",23),t.NdJ("click",function(){return i.resetData()}),t._uU(32,"Clear Field"),t.qZA(),t.TgZ(33,"button",24),t.NdJ("click",function(){t.CHM(o);const c=t.MAs(10);return i.onAddInvoice(c)}),t._uU(34,"Create Invoice"),t.qZA()()()()()()}2&e&&(t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.description),t.xp6(1),t.Q6J("ngIf",!i.description),t.xp6(3),t.Q6J("ngModel",i.invoiceValue)("step",100)("min",1),t.xp6(4),t.Oqu(i.invoiceValueHint),t.xp6(2),t.Q6J("ngModel",i.expiry)("step",i.selTimeUnit===i.timeUnitEnum.SECS?300:i.selTimeUnit===i.timeUnitEnum.MINS?10:i.selTimeUnit===i.timeUnitEnum.HOURS?2:1)("min",1),t.xp6(2),t.hij(" ",t.lcZ(25,14,i.selTimeUnit)," "),t.xp6(3),t.Q6J("value",i.selTimeUnit),t.xp6(1),t.Q6J("ngForOf",i.timeUnits),t.xp6(1),t.Q6J("ngIf",""!==i.invoiceError))},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,D.ZT,T.dn,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,y.TO,m.wV,m.qQ,$.q,y.R9,y.bx,P.gD,u.sg,Y.ey,O.BN],pipes:[u.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var be=_(7766),Z=_(7861);function Ae(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Description is required."),t.qZA())}function Ze(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"input",7),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().description=o}),t.qZA(),t.YNc(4,Ae,2,0,"mat-error",8),t.qZA(),t.TgZ(5,"mat-form-field",9)(6,"input",10,11),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().invoiceValue=o})("keyup",function(){return t.CHM(e),t.oxw().onInvoiceValueChange()}),t.qZA(),t.TgZ(8,"span",12),t._uU(9," Sats "),t.qZA(),t.TgZ(10,"mat-hint"),t._uU(11),t.qZA()(),t.TgZ(12,"div",13)(13,"button",14),t.NdJ("click",function(){return t.CHM(e),t.oxw().resetData()}),t._uU(14,"Clear Field"),t.qZA(),t.TgZ(15,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.MAs(1);return t.oxw().onAddInvoice(o)}),t._uU(16,"Create Invoice"),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.description),t.xp6(1),t.Q6J("ngIf",!e.description),t.xp6(2),t.Q6J("ngModel",e.invoiceValue)("step",100)("min",1),t.xp6(5),t.Oqu(e.invoiceValueHint)}}function Se(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",16)(1,"button",17),t.NdJ("click",function(){return t.CHM(e),t.oxw().openCreateInvoiceModal()}),t._uU(2,"Create Invoice"),t.qZA()()}}function we(n,a){1&n&&t._UZ(0,"mat-progress-bar",47)}function Ee(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Date Created "),t.qZA())}const it=function(n){return{"mr-0":n}};function Ie(n,a){if(1&n&&t._UZ(0,"span",53),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,it,e.screenSize===e.screenSizeEnum.XS))}}function Oe(n,a){if(1&n&&t._UZ(0,"span",54),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,it,e.screenSize===e.screenSizeEnum.XS))}}function Fe(n,a){if(1&n&&t._UZ(0,"span",55),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,it,e.screenSize===e.screenSizeEnum.XS))}}function qe(n,a){if(1&n&&(t.TgZ(0,"td",49),t.YNc(1,Ie,1,3,"span",50),t.YNc(2,Oe,1,3,"span",51),t.YNc(3,Fe,1,3,"span",52),t._uU(4),t.ALo(5,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf","received"===e.status),t.xp6(1),t.Q6J("ngIf","unpaid"===e.status),t.xp6(1),t.Q6J("ngIf",!e.status||"expired"===e.status||"unknown"===e.status),t.xp6(1),t.hij(" ",t.xi3(5,4,1e3*e.timestamp,"dd/MMM/y HH:mm")," ")}}function Re(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Date Settled "),t.qZA())}function Ne(n,a){if(1&n&&(t.TgZ(0,"td",49),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,1e3*e.receivedAt,"dd/MMM/y HH:mm")||"-")}}function ke(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Description "),t.qZA())}const Pe=function(n){return{"max-width":n}};function De(n,a){if(1&n&&(t.TgZ(0,"td",49)(1,"div",56)(2,"span",57),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,Pe,i.screenSize===i.screenSizeEnum.XS?"10rem":"32rem")),t.xp6(2),t.Oqu(e.description)}}function Ue(n,a){1&n&&(t.TgZ(0,"th",58),t._uU(1," Amount (Sats) "),t.qZA())}function Me(n,a){if(1&n&&(t.TgZ(0,"td",59)(1,"span",60),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",e.amount?t.xi3(3,1,e.amount,"1.0-0"):"-","")}}function Je(n,a){1&n&&(t.TgZ(0,"th",58),t._uU(1," Amount Settled (Sats) "),t.qZA())}function Qe(n,a){if(1&n&&(t.TgZ(0,"td",59)(1,"span",60),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",e.amountSettled?t.xi3(3,1,e.amountSettled,"1.0-0"):"-","")}}function Ye(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",61)(1,"div",62)(2,"mat-select",63),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",64),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}const He=function(n){return{"px-3":n}};function Be(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",65)(1,"div",66)(2,"mat-select",67),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",64),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onInvoiceClick(s)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",64),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onRefreshInvoice(s)}),t._uU(7,"Refresh"),t.qZA()()()()}if(2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,He,e.screenSize!==e.screenSizeEnum.XS))}}function ze(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No invoice available."),t.qZA())}function Ve(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting invoices..."),t.qZA())}function Ge(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Xe(n,a){if(1&n&&(t.TgZ(0,"td",68),t.YNc(1,ze,2,0,"p",8),t.YNc(2,Ve,2,0,"p",8),t.YNc(3,Ge,2,1,"p",8),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const $e=function(n){return{"display-none":n}};function We(n,a){if(1&n&&t._UZ(0,"tr",69),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,$e,(null==e.invoices?null:e.invoices.data)&&(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)>0))}}function Ke(n,a){1&n&&t._UZ(0,"tr",70)}function je(n,a){1&n&&t._UZ(0,"tr",71)}const tn=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},en=function(){return["no_invoice"]};function nn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",20),t._UZ(3,"fa-icon",21),t.TgZ(4,"span",22),t._uU(5,"Invoices History"),t.qZA()(),t.TgZ(6,"mat-form-field",23)(7,"input",24),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().selFilter=o}),t.qZA()()(),t.TgZ(8,"div",25),t.YNc(9,we,1,0,"mat-progress-bar",26),t.TgZ(10,"table",27,28),t.ynx(12,29),t.YNc(13,Ee,2,0,"th",30),t.YNc(14,qe,6,7,"td",31),t.BQk(),t.ynx(15,32),t.YNc(16,Re,2,0,"th",30),t.YNc(17,Ne,3,4,"td",31),t.BQk(),t.ynx(18,33),t.YNc(19,ke,2,0,"th",30),t.YNc(20,De,4,4,"td",31),t.BQk(),t.ynx(21,34),t.YNc(22,Ue,2,0,"th",35),t.YNc(23,Me,4,4,"td",36),t.BQk(),t.ynx(24,37),t.YNc(25,Je,2,0,"th",35),t.YNc(26,Qe,4,4,"td",36),t.BQk(),t.ynx(27,38),t.YNc(28,Ye,6,0,"th",39),t.YNc(29,Be,8,3,"td",40),t.BQk(),t.ynx(30,41),t.YNc(31,Xe,4,3,"td",42),t.BQk(),t.YNc(32,We,1,3,"tr",43),t.YNc(33,Ke,1,0,"tr",44),t.YNc(34,je,1,0,"tr",45),t.qZA()(),t._UZ(35,"mat-paginator",46),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("icon",e.faHistory),t.xp6(4),t.Q6J("ngModel",e.selFilter),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.invoices)("ngClass",t.VKq(12,tn,""!==e.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,en)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let _t=(()=>{class n{constructor(e,i,o,s,c,f){this.logger=e,this.store=i,this.decimalPipe=o,this.commonService=s,this.datePipe=c,this.actions=f,this.calledFrom="transactions",this.faHistory=L.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgSticky=!1,this.selFilter="",this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","amountSettled","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","receivedAt","description","amount","amountSettled","actions"])}ngOnInit(){this.store.select(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.Ef).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="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.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[3]),(0,J.h)(e=>e.type===l.lr.SET_LOOKUP_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.SET_LOOKUP_ECL&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&e.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(e.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,Z.qR)({payload:{data:{pageSize:this.pageSize,component:ve}}}))}onAddInvoice(e){if(!this.description)return!0;const i=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue;let o=null;o=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,N.Z$)({payload:o})),this.resetData()}onInvoiceClick(e){this.store.dispatch((0,Z.qR)({payload:{data:{invoice:e,newlyAdded:!1,component:be.R}}}))}onRefreshInvoice(e){this.store.dispatch((0,N.n7)({payload:e.paymentHash}))}updateInvoicesData(e){this.invoiceJSONArr=this.invoiceJSONArr.map(i=>i.paymentHash===e.paymentHash?e:i)}loadInvoicesTable(e){this.invoices=new r.by(e?[...e]:[]),this.invoices.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(1e3*i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.invoices.paginator=this.paginator,this.applyFilter()}resetData(){this.description="",this.invoiceValue=null,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[4])).subscribe({next:e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,l.Xz.OTHER)+" "+e.unit},error:e=>{this.invoiceValueHint="Conversion Error: "+e}}))}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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(u.JJ),t.Y36(R.v),t.Y36(u.uU),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-invoices"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["matInput","","placeholder","Description","tabindex","2","name","description","required","true",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["invcVal","ngModel"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","9","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","10",3,"click"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","receivedAt"],["matColumnDef","description"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pr-3",4,"matCellDef"],["matColumnDef","amountSettled"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Received","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unpaid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Expired/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"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-3"],["mat-cell","",1,"pr-3"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ze,17,6,"form",1),t.YNc(2,Se,3,0,"div",2),t.YNc(3,nn,36,15,"div",3),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf","home"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,m.Q7,m.JJ,m.On,y.TO,m.wV,m.qQ,$.q,y.R9,y.bx,I.lW,O.BN,Q.$V,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,V.gM,u.PC,w.Zl,P.gD,P.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.uU,u.JJ],styles:[".mat-column-description[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var B=_(5698),at=_(3289),ft=_(8104);const an=["paymentReq"];function on(n,a){if(1&n&&(t.TgZ(0,"mat-hint"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function sn(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment request is required."),t.qZA())}function ln(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function rn(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment amount is required."),t.qZA())}function cn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-form-field",1)(1,"input",17,18),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().paymentAmount=o})("change",function(o){return t.CHM(e),t.oxw().onAmountChange(o)}),t.qZA(),t.TgZ(3,"mat-hint"),t._uU(4,"It is a zero amount invoice, enter amount to be paid."),t.qZA(),t.YNc(5,rn,2,0,"mat-error",11),t.qZA()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.paymentAmount),t.xp6(4),t.Q6J("ngIf",!e.paymentAmount)}}function un(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.paymentError)}}function pn(n,a){if(1&n&&(t.TgZ(0,"div",19),t._UZ(1,"fa-icon",20),t.YNc(2,un,2,1,"span",11),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.paymentError)}}let mn=(()=>{class n{constructor(e,i,o,s,c,f,F,g){this.dialogRef=e,this.store=i,this.eclEffects=o,this.logger=s,this.commonService=c,this.decimalPipe=f,this.actions=F,this.dataService=g,this.faExclamationTriangle=L.eHv,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.feeLimitTypes=l.Vc,this.paymentError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.activeChannels=e.activeChannels,this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL||e.type===l.lr.SEND_PAYMENT_STATUS_ECL)).subscribe(e=>{e.type===l.lr.SEND_PAYMENT_STATUS_ECL&&this.dialogRef.close(),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.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.paymentDecodedHint="",this.paymentReq.control.setErrors(null),this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,B.q)(1)).subscribe({next:e=>{this.paymentDecoded=e,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe({next:i=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+i.symbol+this.decimalPipe.transform(i.OTHER?i.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:i=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description)},error:e=>{this.logger.error(e),this.paymentDecodedHint="ERROR: "+(e.message?e.message:"string"==typeof e?e:JSON.stringify(e)),this.paymentReq.control.setErrors({decodeError:!0})}}))}sendPayment(){this.store.dispatch((0,N.oV)(this.zeroAmtInvoice?{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.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentRequest&&this.paymentRequest.length>100&&(this.paymentReq.control.setErrors(null),this.zeroAmtInvoice=!1,this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,B.q)(1)).subscribe({next:i=>{this.paymentDecoded=i,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description)},error:i=>{this.logger.error(i),this.paymentDecodedHint="ERROR: "+(i.message?i.message:"string"==typeof i?i:JSON.stringify(i)),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.Vc[0],this.paymentReq.control.setErrors(null),this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(S.yh),t.Y36(at.o),t.Y36(q.mQ),t.Y36(R.v),t.Y36(u.JJ),t.Y36(z.eX),t.Y36(ft.D))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-send-payments"]],viewQuery:function(e,i){if(1&e&&t.Gf(an,5),2&e){let o;t.iGM(o=t.CRH())&&(i.paymentReq=o.first)}},decls:24,vars:7,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","rows","4","tabindex","1","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxFlex","100",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","3",3,"click"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Send Payment"),t.qZA()(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",1)(12,"textarea",9,10),t.NdJ("ngModelChange",function(s){return i.onPaymentRequestEntry(s)})("matTextareaAutosize",function(){return!0}),t.qZA(),t.YNc(14,on,2,1,"mat-hint",11),t.YNc(15,sn,2,0,"mat-error",11),t.YNc(16,ln,2,1,"mat-error",11),t.qZA(),t.YNc(17,cn,6,2,"mat-form-field",12),t.YNc(18,pn,3,2,"div",13),t.TgZ(19,"div",14)(20,"button",15),t.NdJ("click",function(){return i.resetData()}),t._uU(21,"Clear Fields"),t.qZA(),t.TgZ(22,"button",16),t.NdJ("click",function(){return i.onSendPayment()}),t._uU(23,"Send Payment"),t.qZA()()()()()()),2&e){const o=t.MAs(13);t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.paymentRequest),t.xp6(2),t.Q6J("ngIf",i.paymentRequest&&""!==i.paymentDecodedHint),t.xp6(1),t.Q6J("ngIf",!i.paymentRequest),t.xp6(1),t.Q6J("ngIf",null==o.errors?null:o.errors.decodeError),t.xp6(1),t.Q6J("ngIf",i.zeroAmtInvoice),t.xp6(1),t.Q6J("ngIf",""!==i.paymentError)}},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,D.ZT,T.dn,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,y.bx,y.TO,O.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();var H=_(1125);const dn=["scrollContainer"];function hn(n,a){if(1&n&&(t.TgZ(0,"div",9)(1,"div",1)(2,"h4",11),t._uU(3,"Description"),t.qZA(),t.TgZ(4,"span",12),t._uU(5),t.qZA()()()),2&n){const e=t.oxw();t.xp6(5),t.Oqu(e.description)}}function _n(n,a){1&n&&t._UZ(0,"mat-divider",14)}function fn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-expansion-panel",23),t.NdJ("opened",function(){return t.CHM(e),t.oxw().onExpansionOpen(!0)})("closed",function(){return t.CHM(e),t.oxw().onExpansionOpen(!1)}),t.TgZ(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"h4",24),t._uU(4),t.qZA(),t.TgZ(5,"h4",25),t._uU(6),t.ALo(7,"number"),t.qZA()()(),t.TgZ(8,"div",8)(9,"div",9)(10,"div",26)(11,"h4",11),t._uU(12,"Fees (mSats)"),t.qZA(),t.TgZ(13,"span",12),t._uU(14),t.ALo(15,"number"),t.qZA()(),t.TgZ(16,"div",26)(17,"h4",11),t._uU(18,"Date/Time"),t.qZA(),t.TgZ(19,"span",12),t._uU(20),t.ALo(21,"date"),t.qZA()()(),t._UZ(22,"mat-divider",14),t.TgZ(23,"div",9)(24,"div",1)(25,"h4",11),t._uU(26,"ID"),t.qZA(),t.TgZ(27,"span",27),t._uU(28),t.qZA()()(),t._UZ(29,"mat-divider",14),t.TgZ(30,"div",9)(31,"div",1)(32,"h4",11),t._uU(33,"To Channel"),t.qZA(),t.TgZ(34,"span",27),t._uU(35),t.qZA()()()()()}if(2&n){const e=a.$implicit,i=a.index,o=t.oxw();t.Q6J("expanded",o.expansionOpen),t.xp6(4),t.hij("Part ",i+1,""),t.xp6(2),t.hij("",t.lcZ(7,7,e.amount)," (Sats)"),t.xp6(8),t.Oqu(t.lcZ(15,9,e.feesPaid)),t.xp6(6),t.Oqu(t.xi3(21,11,e.timestamp,"dd/MMM/y HH:mm")),t.xp6(8),t.Oqu(e.id),t.xp6(7),t.Oqu(e.toChannelAlias)}}let gn=(()=>{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)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-payment-information"]],viewQuery:function(e,i){if(1&e&&t.Gf(dn,5),2&e){let o;t.iGM(o=t.CRH())&&(i.scrollContainer=o.first)}},decls:66,vars:15,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"h-40","padding-gap-x-large",3,"perfectScrollbar"],["scrollContainer",""],["fxLayout","column"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],["fxFlex","70"],[1,"w-100","my-1"],["fxLayout","row",4,"ngIf"],["class","w-100 my-1",4,"ngIf"],["class","flat-expansion-panel my-1",3,"expanded","opened","closed",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start end",1,"btn-sticky-container","padding-gap-x-large"],["mat-mini-fab","","aria-label","Scroll Down","fxLayoutAlign","center center",3,"click"],["fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","end center",1,"padding-gap-x-large","padding-gap-bottom-large"],["fxLayoutAlign","center center","tabindex","1","mat-button","","color","primary","type","button","default","",1,"mr-1",3,"mat-dialog-close"],[1,"flat-expansion-panel","my-1",3,"expanded","opened","closed"],["fxFlex","30","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","70","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Payment Information"),t.qZA()(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6,7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h4",11),t._uU(14,"Amount (Sats)"),t.qZA(),t.TgZ(15,"span",12),t._uU(16),t.ALo(17,"number"),t.qZA()(),t.TgZ(18,"div",13)(19,"h4",11),t._uU(20,"Date/Time"),t.qZA(),t.TgZ(21,"span",12),t._uU(22),t.ALo(23,"date"),t.qZA()()(),t._UZ(24,"mat-divider",14),t.TgZ(25,"div",9)(26,"div",1)(27,"h4",11),t._uU(28,"ID"),t.qZA(),t.TgZ(29,"span",12),t._uU(30),t.qZA()()(),t._UZ(31,"mat-divider",14),t.TgZ(32,"div",9)(33,"div",1)(34,"h4",11),t._uU(35,"Payment Hash"),t.qZA(),t.TgZ(36,"span",12),t._uU(37),t.qZA()()(),t._UZ(38,"mat-divider",14),t.TgZ(39,"div",9)(40,"div",1)(41,"h4",11),t._uU(42,"Payment Preimage"),t.qZA(),t.TgZ(43,"span",12),t._uU(44),t.qZA()()(),t._UZ(45,"mat-divider",14),t.TgZ(46,"div",9)(47,"div",1)(48,"h4",11),t._uU(49,"Recipient Node"),t.qZA(),t.TgZ(50,"span",12),t._uU(51),t.qZA()()(),t._UZ(52,"mat-divider",14),t.YNc(53,hn,6,1,"div",15),t.YNc(54,_n,1,0,"mat-divider",16),t.TgZ(55,"div",9)(56,"div",1)(57,"mat-accordion"),t.YNc(58,fn,36,14,"mat-expansion-panel",17),t.qZA()()()()(),t.TgZ(59,"div",18)(60,"button",19),t.NdJ("click",function(){return i.onScrollDown()}),t.TgZ(61,"mat-icon",20),t._uU(62,"arrow_downward"),t.qZA()()(),t.TgZ(63,"div",21)(64,"button",22),t._uU(65,"OK"),t.qZA()()()()),2&e&&(t.xp6(16),t.Oqu(t.lcZ(17,10,i.payment.recipientAmount)),t.xp6(6),t.Oqu(t.xi3(23,12,i.payment.firstPartTimestamp,"dd/MMM/y HH:mm")),t.xp6(8),t.Oqu(i.payment.id),t.xp6(7),t.Oqu(i.payment.paymentHash),t.xp6(7),t.Oqu(i.payment.paymentPreimage),t.xp6(7),t.Oqu(i.payment.recipientNodeAlias),t.xp6(2),t.Q6J("ngIf",i.description),t.xp6(1),t.Q6J("ngIf",i.description),t.xp6(4),t.Q6J("ngForOf",i.payment.parts),t.xp6(6),t.Q6J("mat-dialog-close",!1))},directives:[p.xw,p.Wh,p.yH,T.dk,I.lW,T.dn,Q.$V,G.d,u.O5,H.pp,u.sg,H.ib,H.yz,H.yK,dt.Hw,D.ZT],pipes:[u.JJ,u.uU],styles:[""]}),n})();var K=_(3093);const Cn=["sendPaymentForm"];function xn(n,a){if(1&n&&(t.TgZ(0,"mat-hint"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function yn(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment request is required."),t.qZA())}function Ln(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"textarea",7,8),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),t.qZA(),t.YNc(5,xn,2,1,"mat-hint",9),t.YNc(6,yn,2,0,"mat-error",9),t.qZA(),t.TgZ(7,"div",10)(8,"button",11),t.NdJ("click",function(){return t.CHM(e),t.oxw().resetData()}),t._uU(9,"Clear Field"),t.qZA(),t.TgZ(10,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSendPayment()}),t._uU(11,"Send Payment"),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.paymentRequest),t.xp6(2),t.Q6J("ngIf",e.paymentRequest&&""!==e.paymentDecodedHint),t.xp6(1),t.Q6J("ngIf",!e.paymentRequest)}}function Tn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",13)(1,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw().openSendPaymentModal()}),t._uU(2,"Send Payment"),t.qZA()()}}function vn(n,a){1&n&&t._UZ(0,"mat-progress-bar",49)}function bn(n,a){1&n&&(t.TgZ(0,"th",50),t._uU(1,"Date/Time"),t.qZA())}function An(n,a){if(1&n&&(t.TgZ(0,"td",51),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,null==e?null:e.firstPartTimestamp,"dd/MMM/y HH:mm"))}}function Zn(n,a){1&n&&(t.TgZ(0,"th",50),t._uU(1,"ID"),t.qZA())}const W=function(n){return{"max-width":n}};function Sn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"div",52)(2,"span",53),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id)}}function wn(n,a){1&n&&(t.TgZ(0,"th",50),t._uU(1,"Destination"),t.qZA())}function En(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"div",52)(2,"span",53),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.recipientNodeAlias)}}function In(n,a){1&n&&(t.TgZ(0,"th",54),t._uU(1,"Amount (Sats)"),t.qZA())}function On(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"span",55),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.recipientAmount))}}function Fn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",56)(1,"div",57)(2,"mat-select",58),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",59),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function qn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",60)(1,"button",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onPaymentClick(s)}),t._uU(2,"View Info"),t.qZA()()}}function Rn(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No payment available."),t.qZA())}function Nn(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting payments..."),t.qZA())}function kn(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Pn(n,a){if(1&n&&(t.TgZ(0,"td",62),t.YNc(1,Rn,2,0,"p",9),t.YNc(2,Nn,2,0,"p",9),t.YNc(3,kn,2,1,"p",9),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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 Dn(n,a){if(1&n&&(t.TgZ(0,"span",65),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.timestamp,"dd/MMM/y HH:mm")," ")}}function Un(n,a){if(1&n&&(t.ynx(0),t.YNc(1,Dn,3,4,"span",64),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Mn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"span",63),t._uU(2),t.qZA(),t.YNc(3,Un,2,1,"ng-container",9),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" Total Attempts: ",null==e||null==e.parts?null:e.parts.length," "),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Jn(n,a){if(1&n&&(t.TgZ(0,"span",63)(1,"span",66)(2,"span",53),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id)}}function Qn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Jn,4,4,"span",67),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Yn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"div",66)(2,"span",53),t._uU(3),t.qZA()(),t.YNc(4,Qn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(3,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Hn(n,a){if(1&n&&(t.TgZ(0,"span",63)(1,"span",66)(2,"span",53),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.toChannelAlias)}}function Bn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Hn,4,4,"span",67),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function zn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"div",66)(2,"span",53),t._uU(3),t.qZA()(),t.YNc(4,Bn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(3,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(null==e?null:e.recipientNodeAlias),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Vn(n,a){if(1&n&&(t.TgZ(0,"span",68),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.amount,"1.0-0")," ")}}function Gn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Vn,3,4,"span",69),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Xn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"span",68),t._uU(2),t.ALo(3,"number"),t.qZA(),t.YNc(4,Gn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.xi3(3,2,null==e?null:e.recipientAmount,"1.0-0")),t.xp6(2),t.Q6J("ngIf",e.is_expanded)}}function $n(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",71)(1,"button",74),t.NdJ("click",function(){const s=t.CHM(e).$implicit,c=t.oxw(2).$implicit;return t.oxw(2).onPartClick(s,c)}),t._uU(2),t.qZA()()}if(2&n){const e=a.index;t.xp6(2),t.hij("View ",e+1,"")}}function Wn(n,a){if(1&n&&(t.TgZ(0,"div"),t.YNc(1,$n,3,1,"div",73),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Kn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",70)(1,"span",71)(2,"button",72),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return s.is_expanded=!s.is_expanded}),t._uU(3),t.qZA()(),t.YNc(4,Wn,2,1,"div",9),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(3),t.Oqu(e.is_expanded?"Hide":"Show"),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function jn(n,a){1&n&&t._UZ(0,"tr",75)}const ti=function(n){return{"display-none":n}};function ei(n,a){if(1&n&&t._UZ(0,"tr",76),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,ti,(null==e.payments?null:e.payments.data)&&(null==e.payments||null==e.payments.data?null:e.payments.data.length)>0))}}function ni(n,a){1&n&&t._UZ(0,"tr",77)}function ii(n,a){1&n&&t._UZ(0,"tr",75)}const ai=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},oi=function(){return["no_payment"]};function si(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",14)(1,"div",15)(2,"div",16),t._UZ(3,"fa-icon",17),t.TgZ(4,"span",18),t._uU(5,"Payments History"),t.qZA()(),t.TgZ(6,"mat-form-field",19)(7,"input",20),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().selFilter=o}),t.qZA()()(),t.TgZ(8,"div",21)(9,"div",22),t.YNc(10,vn,1,0,"mat-progress-bar",23),t.TgZ(11,"table",24,25),t.ynx(13,26),t.YNc(14,bn,2,0,"th",27),t.YNc(15,An,3,4,"td",28),t.BQk(),t.ynx(16,29),t.YNc(17,Zn,2,0,"th",27),t.YNc(18,Sn,4,4,"td",28),t.BQk(),t.ynx(19,30),t.YNc(20,wn,2,0,"th",27),t.YNc(21,En,4,4,"td",28),t.BQk(),t.ynx(22,31),t.YNc(23,In,2,0,"th",32),t.YNc(24,On,4,3,"td",28),t.BQk(),t.ynx(25,33),t.YNc(26,Fn,6,0,"th",34),t.YNc(27,qn,3,0,"td",35),t.BQk(),t.ynx(28,36),t.YNc(29,Pn,4,3,"td",37),t.BQk(),t.ynx(30,38),t.YNc(31,Mn,4,2,"td",28),t.BQk(),t.ynx(32,39),t.YNc(33,Yn,5,5,"td",28),t.BQk(),t.ynx(34,40),t.YNc(35,zn,5,5,"td",28),t.BQk(),t.ynx(36,41),t.YNc(37,Xn,5,5,"td",28),t.BQk(),t.ynx(38,42),t.YNc(39,Kn,5,2,"td",43),t.BQk(),t.YNc(40,jn,1,0,"tr",44),t.YNc(41,ei,1,3,"tr",45),t.YNc(42,ni,1,0,"tr",46),t.YNc(43,ii,1,0,"tr",47),t.qZA()()(),t._UZ(44,"mat-paginator",48),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("icon",e.faHistory),t.xp6(4),t.Q6J("ngModel",e.selFilter),t.xp6(3),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.payments)("ngClass",t.VKq(14,ai,""!==e.errorMessage)),t.xp6(29),t.Q6J("matRowDefColumns",e.partColumns)("matRowDefWhen",e.is_group),t.xp6(1),t.Q6J("matFooterRowDef",t.DdM(16,oi)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let gt=(()=>{class n{constructor(e,i,o,s,c,f,F){this.logger=e,this.commonService=i,this.store=o,this.rtlEffects=s,this.decimalPipe=c,this.dataService=f,this.datePipe=F,this.calledFrom="transactions",this.faHistory=L.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.paymentJSONArr=[],this.paymentDecoded={},this.displayedColumns=[],this.partColumns=[],this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","actions"],this.partColumns=["groupTotal","groupAction"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","recipientAmount","actions"],this.partColumns=["groupTotal","groupAmount","groupAction"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","id","recipientAmount","actions"],this.partColumns=["groupTotal","groupId","groupAmount","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["firstPartTimestamp","id","recipientNodeAlias","recipientAmount","actions"],this.partColumns=["groupTotal","groupId","groupChannelAlias","groupAmount","groupAction"])}ngOnInit(){this.store.select(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.PP).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="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.loadPaymentsTable(this.paymentJSONArr),this.logger.info(e)})}ngAfterViewInit(){this.loadPaymentsTable(this.paymentJSONArr)}loadPaymentsTable(e){this.payments=new r.by(e?[...e]:[]),this.payments.sort=this.sort,this.payments.sortingDataAccessor=(i,o)=>{switch(o){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[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null}},this.payments.filterPredicate=(i,o)=>((i.firstPartTimestamp?this.datePipe.transform(new Date(i.firstPartTimestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.payments.paginator=this.paginator,this.applyFilter()}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,B.q)(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,Z.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:50,type:l.Gi.DATE_TIME},{key:"amount",value:this.paymentDecoded.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:l.Gi.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,B.q)(1)).subscribe(i=>{i&&(this.store.dispatch((0,N.oV)({payload:{invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,Z.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:40,type:l.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:l.Gi.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",getInputs:[{placeholder:"Amount (Sats)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,B.q)(1)).subscribe(o=>{o&&(this.paymentDecoded.amount=o[0].inputValue,this.store.dispatch((0,N.oV)({payload:{invoice:this.paymentRequest,amountMsat:1e3*o[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(e){this.paymentRequest=e,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,B.q)(1)).subscribe(i=>{this.paymentDecoded=i,this.paymentDecoded.amount?this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description:this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description})}openSendPaymentModal(){this.store.dispatch((0,Z.qR)({payload:{data:{component:mn}}}))}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,B.q)(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,Z.qR)({payload:{data:{sentPaymentInfo:i,payment:e,component:gn}}}))}onPartClick(e,i){i.paymentHash&&""!==i.paymentHash.trim()?this.dataService.decodePayments(i.paymentHash).pipe((0,B.q)(1)).subscribe({next:o=>{setTimeout(()=>{this.showPartView(e,i,o.length&&o.length>0?o[0]:[])},0)},error:o=>{this.showPartView(e,i,[])}}):this.showPartView(e,i,[])}showPartView(e,i,o){const s=[[{key:"paymentHash",value:i.paymentHash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"paymentPreimage",value:i.paymentPreimage,title:"Payment Preimage",width:100,type:l.Gi.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"Channel",width:100,type:l.Gi.STRING}],[{key:"id",value:e.id,title:"Part ID",width:50,type:l.Gi.STRING},{key:"timestamp",value:e.timestamp,title:"Time",width:50,type:l.Gi.DATE_TIME}],[{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER},{key:"feesPaid",value:e.feesPaid,title:"Fee (Sats)",width:50,type:l.Gi.NUMBER}]];o.length>0&&o[0].paymentRequest&&o[0].paymentRequest.description&&""!==o[0].paymentRequest.description&&s.splice(3,0,[{key:"description",value:o[0].paymentRequest.description,title:"Description",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Payment Part Information",message:s}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const e=JSON.parse(JSON.stringify(this.payments.data)),i=e.reduce((o,s)=>(s.paymentHash&&""!==s.paymentHash.trim()&&(o=""===o?s.paymentHash:o+","+s.paymentHash),o),"");this.dataService.decodePayments(i).pipe((0,h.R)(this.unSubs[4])).subscribe(o=>{o.forEach((c,f)=>{c.length>0&&c[0].paymentRequest&&c[0].paymentRequest.description&&""!==c[0].paymentRequest.description&&(e[f].description=c[0].paymentRequest.description)});const s=e.reduce((c,f)=>c.concat(f),[]);this.commonService.downloadFile(s,"Payments")})}}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh),t.Y36(K.V),t.Y36(u.JJ),t.Y36(ft.D),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-payments"]],viewQuery:function(e,i){if(1&e&&(t.Gf(Cn,5),t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first),t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","firstPartTimestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","recipientNodeAlias"],["matColumnDef","recipientAmount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","groupTotal"],["matColumnDef","groupId"],["matColumnDef","groupChannelAlias"],["matColumnDef","groupAmount"],["matColumnDef","groupAction"],["mat-cell","","class","px-3",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"part-row-span"],["fxLayoutAlign","start center","class","part-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"part-row-span","pl-3"],["fxLayoutAlign","start center",1,"ellipsis-parent","part-row-span",3,"ngStyle"],["fxLayoutAlign","start center","class","part-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"part-row-span"],["fxLayoutAlign","end center","class","part-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["fxLayoutAlign","end start"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-part-expand",3,"click"],["fxLayoutAlign","end start",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-part-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ln,12,3,"form",1),t.YNc(2,Tn,3,0,"div",2),t.YNc(3,si,45,17,"div",3),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf","home"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,m.Q7,Q.$V,m.JJ,m.On,y.bx,y.TO,I.lW,O.BN,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,P.gD,P.$L,Y.ey,r.mD,r.yh,u.sg,r.nj,r.Gk,r.Ke,r.Q2,r.as,r.XQ,A.NW],pipes:[u.uU,u.JJ],styles:[".mat-column-id[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%], .mat-column-groupChannelAlias[_ngcontent-%COMP%]{padding:0 1rem;flex:0 0 25%;width:25%}.mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupChannelAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%], .mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-part-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-part-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.part-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:15rem}"]}),n})();function li(n,a){if(1&n&&(t.TgZ(0,"button",26)(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA()()),2&n){t.oxw();const e=t.MAs(11);t.Q6J("matMenuTriggerFor",e)}}function ri(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",27),t.NdJ("click",function(){const s=t.CHM(e).index,c=t.oxw().$implicit;return t.oxw(2).onNavigateTo(c.links[s])}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}function ci(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",27),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).onsortChannelsBy()}),t._uU(1),t.qZA()}if(2&n){const e=t.oxw(3);t.xp6(1),t.hij("Sort By ","Balance Score"===e.sortField?"Capacity":"Balance Score","")}}function ui(n,a){1&n&&t._UZ(0,"mat-progress-bar",28)}function pi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-node-info",29),2&n){const e=t.oxw(3);t.Q6J("information",e.information)("showColorFieldSeparately",!1)}}function mi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-balances-info",30),2&n){const e=t.oxw(3);t.Q6J("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function di(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-capacity-info",31),2&n){const e=t.oxw(3);t.Q6J("sortBy",e.sortField)("channelBalances",e.channelBalances)("allChannels",e.allChannelsCapacity)("errorMessage",e.errorMessages[2])}}function hi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-fee-info",32),2&n){const e=t.oxw(3);t.Q6J("fees",e.fees)("errorMessage",e.errorMessages[1])}}function _i(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-status-info",33),2&n){const e=t.oxw(3);t.Q6J("channelsStatus",e.channelsStatus)("errorMessage",e.errorMessages[2])}}function fi(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find information!"),t.qZA())}const Ct=function(n){return{"dashboard-card-content":!0,"error-border":n}};function gi(n,a){if(1&n&&(t.TgZ(0,"mat-grid-tile",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-title",10)(4,"div"),t._UZ(5,"fa-icon",11),t.TgZ(6,"span"),t._uU(7),t.qZA()(),t.TgZ(8,"div"),t.YNc(9,li,3,1,"button",12),t.TgZ(10,"mat-menu",13,14),t.YNc(12,ri,2,1,"button",15),t.YNc(13,ci,2,1,"button",16),t.qZA()()()(),t.TgZ(14,"mat-card-content",17),t.YNc(15,ui,1,0,"mat-progress-bar",18),t.TgZ(16,"div",19),t.YNc(17,pi,1,2,"rtl-ecl-node-info",20),t.YNc(18,mi,1,2,"rtl-ecl-balances-info",21),t.YNc(19,di,1,4,"rtl-ecl-channel-capacity-info",22),t.YNc(20,hi,1,2,"rtl-ecl-fee-info",23),t.YNc(21,_i,1,2,"rtl-ecl-channel-status-info",24),t.YNc(22,fi,2,0,"h3",25),t.qZA()()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("colspan",e.cols)("rowspan",e.rows),t.xp6(5),t.Q6J("icon",e.icon),t.xp6(2),t.Oqu(e.title),t.xp6(2),t.Q6J("ngIf",e.links[0]),t.xp6(3),t.Q6J("ngForOf",e.goToOptions),t.xp6(1),t.Q6J("ngIf","capacity"===e.id),t.xp6(1),t.s9C("fxFlex","capacity"===e.id?90:70),t.Q6J("ngClass",t.VKq(16,Ct,"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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("ngSwitch",e.id),t.xp6(1),t.Q6J("ngSwitchCase","node"),t.xp6(1),t.Q6J("ngSwitchCase","balance"),t.xp6(1),t.Q6J("ngSwitchCase","capacity"),t.xp6(1),t.Q6J("ngSwitchCase","fee"),t.xp6(1),t.Q6J("ngSwitchCase","status")}}function Ci(n,a){if(1&n&&(t.TgZ(0,"div",2)(1,"div",3),t._UZ(2,"fa-icon",4),t.TgZ(3,"span",5),t._uU(4),t.qZA()(),t.TgZ(5,"mat-grid-list",6),t.YNc(6,gi,23,18,"mat-grid-tile",7),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("icon",e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.ERROR?e.faFrown:e.faSmile),t.xp6(2),t.Oqu(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.xp6(1),t.Q6J("rowHeight",e.operatorCardHeight),t.xp6(1),t.Q6J("ngForOf",e.operatorCards)}}function xi(n,a){if(1&n&&(t.TgZ(0,"button",26)(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA()()),2&n){t.oxw();const e=t.MAs(9);t.Q6J("matMenuTriggerFor",e)}}function yi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",27),t.NdJ("click",function(){const s=t.CHM(e).index,c=t.oxw(2).$implicit;return t.oxw(2).onNavigateTo(c.links[s])}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}function Li(n,a){if(1&n&&(t.TgZ(0,"mat-card-header")(1,"mat-card-title",10)(2,"div"),t._UZ(3,"fa-icon",11),t.TgZ(4,"span"),t._uU(5),t.qZA()(),t.TgZ(6,"div"),t.YNc(7,xi,3,1,"button",12),t.TgZ(8,"mat-menu",13,42),t.YNc(10,yi,2,1,"button",15),t.qZA()()()()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.Q6J("icon",e.icon),t.xp6(2),t.Oqu(e.title),t.xp6(2),t.Q6J("ngIf",e.links[0]),t.xp6(3),t.Q6J("ngForOf",e.goToOptions)}}function Ti(n,a){1&n&&t._UZ(0,"mat-progress-bar",28)}function vi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-node-info",43),2&n){const e=t.oxw(3);t.Q6J("information",e.information)}}function bi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-balances-info",30),2&n){const e=t.oxw(3);t.Q6J("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function Ai(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-liquidity-info",44),2&n){const e=t.oxw(3);t.Q6J("direction","In")("totalLiquidity",e.totalInboundLiquidity)("allChannels",e.allInboundChannels)("errorMessage",e.errorMessages[2])}}function Zi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-liquidity-info",44),2&n){const e=t.oxw(3);t.Q6J("direction","Out")("totalLiquidity",e.totalOutboundLiquidity)("allChannels",e.allOutboundChannels)("errorMessage",e.errorMessages[2])}}function Si(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",27),t.NdJ("click",function(){const s=t.CHM(e).index,c=t.oxw(3).$implicit;return t.oxw(2).onNavigateTo(c.links[s])}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}function wi(n,a){if(1&n&&(t.TgZ(0,"button",26)(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA()(),t.TgZ(3,"mat-menu",13,53),t.YNc(5,Si,2,1,"button",15),t.qZA()),2&n){const e=t.MAs(4),i=t.oxw(2).$implicit;t.Q6J("matMenuTriggerFor",e),t.xp6(5),t.Q6J("ngForOf",i.goToOptions)}}function Ei(n,a){1&n&&(t.TgZ(0,"span",45)(1,"mat-tab-group",46)(2,"mat-tab",47),t._UZ(3,"rtl-ecl-lightning-invoices",48),t.qZA(),t.TgZ(4,"mat-tab",49),t._UZ(5,"rtl-ecl-lightning-payments",50),t.qZA(),t.TgZ(6,"mat-tab",51),t.YNc(7,wi,6,2,"ng-template",52),t.qZA()()()),2&n&&(t.xp6(3),t.Q6J("calledFrom","home"),t.xp6(2),t.Q6J("calledFrom","home"),t.xp6(1),t.Q6J("disabled",!0))}function Ii(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find information!"),t.qZA())}const Oi=function(n){return{"p-0":n}};function Fi(n,a){if(1&n&&(t.TgZ(0,"mat-grid-tile",8)(1,"mat-card",36),t.YNc(2,Li,11,4,"mat-card-header",37),t.TgZ(3,"mat-card-content",38),t.YNc(4,Ti,1,0,"mat-progress-bar",18),t.TgZ(5,"div",19),t.YNc(6,vi,1,1,"rtl-ecl-node-info",39),t.YNc(7,bi,1,2,"rtl-ecl-balances-info",21),t.YNc(8,Ai,1,4,"rtl-ecl-channel-liquidity-info",40),t.YNc(9,Zi,1,4,"rtl-ecl-channel-liquidity-info",40),t.YNc(10,Ei,8,3,"span",41),t.YNc(11,Ii,2,0,"h3",25),t.qZA()()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("colspan",e.cols)("rowspan",e.rows),t.xp6(1),t.Q6J("ngClass",t.VKq(13,Oi,"transactions"===e.id)),t.xp6(1),t.Q6J("ngIf","transactions"!==e.id),t.xp6(1),t.s9C("fxFlex","transactions"===e.id?100:"balance"===e.id?70:90),t.Q6J("ngClass",t.VKq(15,Ct,"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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("ngSwitch",e.id),t.xp6(1),t.Q6J("ngSwitchCase","node"),t.xp6(1),t.Q6J("ngSwitchCase","balance"),t.xp6(1),t.Q6J("ngSwitchCase","inboundLiq"),t.xp6(1),t.Q6J("ngSwitchCase","outboundLiq"),t.xp6(1),t.Q6J("ngSwitchCase","transactions")}}function qi(n,a){if(1&n&&(t.TgZ(0,"div",34),t._UZ(1,"fa-icon",4),t.TgZ(2,"span",5),t._uU(3),t.qZA()(),t.TgZ(4,"mat-grid-list",35),t.YNc(5,Fi,12,17,"mat-grid-tile",7),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faSmile),t.xp6(2),t.hij("Welcome ",e.information.alias,"! Your node is up and running."),t.xp6(1),t.Q6J("rowHeight",e.merchantCardHeight),t.xp6(1),t.Q6J("ngForOf",e.merchantCards)}}let Ri=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.commonService=o,this.router=s,this.faSmile=pt.ctA,this.faFrown=pt.KfU,this.faAngleDoubleDown=L.Sbq,this.faAngleDoubleUp=L.Vfw,this.faChartPie=L.OS1,this.faBolt=L.BDt,this.faServer=L.xf3,this.faNetworkWired=L.kXW,this.userPersonaEnum=l.ol,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.channels=[],this.onchainBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.channelsStatus={},this.allChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="330px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.errorMessages=["","","",""],this.apiCallStatusNodeInfo={status:l.Bn.COMPLETED},this.apiCallStatusFees={status:l.Bn.COMPLETED},this.apiCallStatusOCBal={status:l.Bn.COMPLETED},this.apiCallStatusAllChannels={status:l.Bn.COMPLETED},this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.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.cu.SM||this.screenSize===l.cu.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(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.T$).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=e.apiCallStatus,this.apiCallStatusNodeInfo.status===l.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.information=e.information}),this.store.select(C.JG).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessages[1]="",this.apiCallStatusFees=e.apiCallStatus,this.apiCallStatusFees.status===l.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=e.fees}),this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[3]),(0,et.M)(this.store.select(C.kY))).subscribe(([e,i])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusAllChannels=e.apiCallStatus,this.apiCallStatusOCBal=i.apiCallStatus,this.apiCallStatusAllChannels.status===l.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusAllChannels.message?JSON.stringify(this.apiCallStatusAllChannels.message):this.apiCallStatusAllChannels.message),this.apiCallStatusOCBal.status===l.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusOCBal.message?JSON.stringify(this.apiCallStatusOCBal.message):this.apiCallStatusOCBal.message),this.channels=e.activeChannels,this.onchainBalance=i.onchainBalance,this.balances.onchain=this.onchainBalance.total,this.balances.lightning=e.lightningBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const o=e.lightningBalance.localBalance?+e.lightningBalance.localBalance:0,s=e.lightningBalance.remoteBalance?+e.lightningBalance.remoteBalance:0;this.channelBalances={localBalance:o,remoteBalance:s,balancedness:+(1-Math.abs((o-s)/(o+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(f=>f.toRemote>0),"toRemote"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels.filter(f=>f.toLocal>0),"toLocal"))),this.channels.forEach(f=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(f.toRemote),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(f.toLocal)}),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 o=+e.toLocal+ +e.toRemote,s=+i.toLocal+ +i.toRemote;return o>s?-1:o{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(R.v),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-0"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10",3,"rowHeight"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click",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-0"],["cols","6",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start"],["fxLayout","column",1,"w-100","dashboard-tabs-group"],["label","Receive"],[1,"h-100",3,"calledFrom"],["label","Pay"],[3,"calledFrom"],[3,"disabled"],["mat-tab-label",""],["menuTransactions","matMenu"]],template:function(e,i){if(1&e&&(t.YNc(0,Ci,7,4,"div",0),t.YNc(1,qi,6,4,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",(null==i.selNode?null:i.selNode.userPersona)===i.userPersonaEnum.OPERATOR)("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,O.BN,mt.Il,u.sg,mt.DX,T.a8,p.yH,T.dk,T.n5,I.lW,nt.p6,dt.Hw,nt.VK,nt.OP,T.dn,u.mk,w.oO,M.pW,u.RF,u.n9,Jt,Ht,Kt,ee,ae,u.ED,Ce,k.SP,k.uX,_t,gt,k.uD],styles:[""]}),n})();var Ni=_(8377);const ki=["form"];function Pi(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Bitcoin address is required."),t.qZA())}function Di(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.amountError)}}function Ui(n,a){if(1&n&&(t.TgZ(0,"mat-option",29),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(e)}}function Mi(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Target Confirmation Blocks is required."),t.qZA())}function Ji(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.sendFundError)}}function Qi(n,a){if(1&n&&(t.TgZ(0,"div",30),t._UZ(1,"fa-icon",31),t.YNc(2,Ji,2,1,"span",12),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.sendFundError)}}let xt=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.logger=i,this.store=o,this.commonService=s,this.decimalPipe=c,this.actions=f,this.faExclamationTriangle=L.eHv,this.selNode={},this.addressTypes=[],this.selectedAddress=l._t[1],this.blockchainBalance={},this.information={},this.newAddress="",this.transaction={},this.sendFundError="",this.fiatConversion=!1,this.amountUnits=l.uA,this.selAmountUnit=l.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=l.Xz,this.amountError="Amount is Required.",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select(Ni.dT).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.fiatConversion=e.settings.fiatConversion,this.amountUnits=e.settings.currencyUnits,this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL||e.type===l.lr.SEND_ONCHAIN_FUNDS_RES_ECL)).subscribe(e=>{e.type===l.lr.SEND_ONCHAIN_FUNDS_RES_ECL&&(this.store.dispatch((0,Z.jW)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"SendOnchainFunds"===e.payload.action&&(this.sendFundError=e.payload.message)})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="",this.transaction.amount&&this.selAmountUnit!==l.NT.SATS?this.commonService.convertCurrency(this.transaction.amount,this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit,l.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe({next:e=>{this.transaction.amount=parseInt(e[l.NT.SATS]),this.selAmountUnit=l.NT.SATS,this.store.dispatch((0,N.Iy)({payload:this.transaction}))},error:e=>{this.transaction.amount=null,this.selAmountUnit=l.NT.SATS,this.amountError="Conversion Error: "+e}}):this.store.dispatch((0,N.Iy)({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,o=this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit;let s=e.value===this.amountUnits[2]?l.NT.OTHER:e.value;this.transaction.amount&&this.selAmountUnit!==e.value&&this.commonService.convertCurrency(this.transaction.amount,o,s,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:c=>{this.selAmountUnit=e.value,i.transaction.amount=+i.decimalPipe.transform(c[s],i.currencyUnitFormats[s]).replace(/,/g,"")},error:c=>{i.transaction.amount=null,this.amountError="Conversion Error: "+c,this.selAmountUnit=o,s=o}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(q.mQ),t.Y36(S.yh),t.Y36(R.v),t.Y36(u.JJ),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-send-modal"]],viewQuery:function(e,i){if(1&e&&t.Gf(ki,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:36,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between start",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","addr","required","",3,"ngModel","ngModelChange"],["addrs","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amt","type","number","tabindex","2","required","",3,"ngModel","step","min","ngModelChange"],["amnt","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","60","fxLayoutAlign","space-between stretch","fxLayout","row wrap"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","placeholder","Target Confirmation Blocks","type","number","name","blocks","tabindex","8","required","true",3,"ngModel","step","min","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-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(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Send Payment"),t.qZA()(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"form",7,8),t.NdJ("submit",function(){return i.onSendFunds()})("reset",function(){return i.resetData()}),t.TgZ(11,"mat-form-field",9)(12,"input",10,11),t.NdJ("ngModelChange",function(s){return i.transaction.address=s}),t.qZA(),t.YNc(14,Pi,2,0,"mat-error",12),t.qZA(),t.TgZ(15,"mat-form-field",13)(16,"input",14,15),t.NdJ("ngModelChange",function(s){return i.transaction.amount=s}),t.qZA(),t.TgZ(18,"span",16),t._uU(19),t.qZA(),t.YNc(20,Di,2,1,"mat-error",12),t.qZA(),t.TgZ(21,"mat-form-field",17)(22,"mat-select",18),t.NdJ("selectionChange",function(s){return i.onAmountUnitChange(s)}),t.YNc(23,Ui,2,2,"mat-option",19),t.qZA()(),t.TgZ(24,"div",20)(25,"mat-form-field",21)(26,"input",22,23),t.NdJ("ngModelChange",function(s){return i.transaction.blocks=s}),t.qZA(),t.YNc(28,Mi,2,0,"mat-error",12),t.qZA()(),t._UZ(29,"div",24),t.YNc(30,Qi,3,2,"div",25),t.TgZ(31,"div",26)(32,"button",27),t._uU(33,"Clear Fields"),t.qZA(),t.TgZ(34,"button",28),t._uU(35,"Send Funds"),t.qZA()()()()()()),2&e&&(t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.transaction.address),t.xp6(2),t.Q6J("ngIf",!i.transaction.address),t.xp6(2),t.Q6J("ngModel",i.transaction.amount)("step",100)("min",0),t.xp6(3),t.hij(" ",i.selAmountUnit," "),t.xp6(1),t.Q6J("ngIf",!i.transaction.amount),t.xp6(2),t.Q6J("value",i.selAmountUnit),t.xp6(1),t.Q6J("ngForOf",i.amountUnits),t.xp6(3),t.Q6J("ngModel",i.transaction.blocks)("step",1)("min",0),t.xp6(2),t.Q6J("ngIf",!i.transaction.blocks),t.xp6(2),t.Q6J("ngIf",""!==i.sendFundError))},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,D.ZT,T.dn,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,y.TO,m.wV,m.qQ,$.q,y.R9,P.gD,u.sg,Y.ey,O.BN],styles:[""]}),n})();var ot=_(1203);function Yi(n,a){1&n&&t._UZ(0,"mat-progress-bar",31)}function Hi(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Date/Time "),t.qZA())}function Bi(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,1e3*e.timestamp,"dd/MMM/y HH:mm"))}}function zi(n,a){1&n&&(t.TgZ(0,"th",34),t._uU(1," Amount (Sats) "),t.qZA())}function Vi(n,a){if(1&n&&(t.TgZ(0,"span",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.amount))}}function Gi(n,a){if(1&n&&(t.TgZ(0,"span",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("(",t.lcZ(2,1,-1*e.amount),")")}}function Xi(n,a){if(1&n&&(t.TgZ(0,"td",33),t.YNc(1,Vi,3,3,"span",35),t.YNc(2,Gi,3,3,"span",36),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",e.amount>0||0===e.amount),t.xp6(1),t.Q6J("ngIf",e.amount<0)}}function $i(n,a){1&n&&(t.TgZ(0,"th",34),t._uU(1," Fees (Sats) "),t.qZA())}function Wi(n,a){if(1&n&&(t.TgZ(0,"td",33)(1,"span",37),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.fees))}}function Ki(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Confirmations "),t.qZA())}function ji(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",37),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.lcZ(3,1,null==e?null:e.confirmations)," ")}}function ta(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Address "),t.qZA())}function ea(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e.address)}}function na(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",41)(1,"div",42)(2,"mat-select",43),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",44),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function ia(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",45)(1,"button",46),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onTransactionClick(c,o)}),t._uU(2,"View Info"),t.qZA()()}}function aa(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No transaction available."),t.qZA())}function oa(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting transactions..."),t.qZA())}function sa(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function la(n,a){if(1&n&&(t.TgZ(0,"td",47),t.YNc(1,aa,2,0,"p",48),t.YNc(2,oa,2,0,"p",48),t.YNc(3,sa,2,1,"p",48),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const ra=function(n){return{"display-none":n}};function ca(n,a){if(1&n&&t._UZ(0,"tr",49),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,ra,(null==e.listTransactions?null:e.listTransactions.data)&&(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)>0))}}function ua(n,a){1&n&&t._UZ(0,"tr",50)}function pa(n,a){1&n&&t._UZ(0,"tr",51)}const ma=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},da=function(){return["no_transaction"]};let ha=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.datePipe=s,this.faHistory=L.qO$,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unsub=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","confirmations","fees","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","fees","confirmations","address","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","amount","fees","confirmations","address","actions"])}ngOnInit(){this.store.dispatch((0,N.mC)()),this.store.select(C.dx).pipe((0,h.R)(this.unsub[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),e.transactions&&this.loadTransactionsTable(e.transactions),this.logger.info(e)})}applyFilter(){this.listTransactions.filter=this.selFilter.trim().toLowerCase()}onTransactionClick(e,i){this.store.dispatch((0,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Transaction Information",message:[[{key:"blockHash",value:e.blockHash,title:"Block Hash",width:100}],[{key:"txid",value:e.txid,title:"Transaction ID",width:100}],[{key:"timestamp",value:e.timestamp,title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"confirmations",value:e.confirmations,title:"Number of Confirmations",width:50,type:l.Gi.NUMBER}],[{key:"fees",value:e.fees,title:"Fees (Sats)",width:50,type:l.Gi.NUMBER},{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"address",value:e.address,title:"Address",width:100,type:l.Gi.STRING}]]}}}))}loadTransactionsTable(e){this.listTransactions=new r.by([...e]),this.listTransactions.sort=this.sort,this.listTransactions.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.listTransactions.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(1e3*i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.listTransactions.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listTransactions)}onDownloadCSV(){this.listTransactions.data&&this.listTransactions.data.length>0&&this.commonService.downloadFile(this.listTransactions.data,"Transactions")}ngOnDestroy(){this.unsub.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-transaction-history"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Transactions")}])],decls:37,vars:15,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource","ngClass"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","fees"],["matColumnDef","confirmations"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-2",4,"matHeaderCellDef"],["mat-cell","","class","pr-2",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_transaction"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",1,"red"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-2"],["mat-cell","",1,"pr-2"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"fa-icon",3),t.TgZ(4,"span",4),t._uU(5,"Transaction History"),t.qZA()(),t.TgZ(6,"mat-form-field",5)(7,"input",6),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()(),t.TgZ(8,"div",7)(9,"div",8),t.YNc(10,Yi,1,0,"mat-progress-bar",9),t.TgZ(11,"table",10,11),t.ynx(13,12),t.YNc(14,Hi,2,0,"th",13),t.YNc(15,Bi,3,4,"td",14),t.BQk(),t.ynx(16,15),t.YNc(17,zi,2,0,"th",16),t.YNc(18,Xi,3,2,"td",14),t.BQk(),t.ynx(19,17),t.YNc(20,$i,2,0,"th",16),t.YNc(21,Wi,4,3,"td",14),t.BQk(),t.ynx(22,18),t.YNc(23,Ki,2,0,"th",19),t.YNc(24,ji,4,3,"td",20),t.BQk(),t.ynx(25,21),t.YNc(26,ta,2,0,"th",13),t.YNc(27,ea,2,1,"td",14),t.BQk(),t.ynx(28,22),t.YNc(29,na,6,0,"th",23),t.YNc(30,ia,3,0,"td",24),t.BQk(),t.ynx(31,25),t.YNc(32,la,4,3,"td",26),t.BQk(),t.YNc(33,ca,1,3,"tr",27),t.YNc(34,ua,1,0,"tr",28),t.YNc(35,pa,1,0,"tr",29),t.qZA(),t._UZ(36,"mat-paginator",30),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("icon",i.faHistory),t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(3),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.listTransactions)("ngClass",t.VKq(12,ma,""!==i.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,da)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,O.BN,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,P.gD,P.$L,Y.ey,I.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.uU,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function _a(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",12),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let fa=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.selNode={},this.faExchangeAlt=L.Ssp,this.faChartPie=L.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}}),this.store.select(C.pg).pipe((0,h.R)(this.unSubs[1])).subscribe(i=>{this.selNode=i}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[2])).subscribe(i=>{this.balances=[{title:"Total Balance",dataValue:i.onchainBalance.total||0},{title:"Confirmed",dataValue:i.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:i.onchainBalance.unconfirmed}]})}openSendFundsModal(){this.store.dispatch((0,Z.qR)({payload:{data:{component:xt}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain"]],decls:21,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large","mt-2"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"On-chain Balance"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA()()(),t.TgZ(8,"div",0),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"On-chain Transactions"),t.qZA()(),t.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",7),t.YNc(16,_a,2,3,"div",8),t.qZA(),t.TgZ(17,"div",9),t._UZ(18,"router-outlet"),t.qZA(),t.TgZ(19,"div",10),t._UZ(20,"rtl-ecl-on-chain-transaction-history",11),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faExchangeAlt),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,ot.D,k.BU,u.sg,k.Nj,x.rH,p.yH,x.lC,ha],styles:[""]}),n})();var yt=_(7544);function ga(n,a){if(1&n&&(t.TgZ(0,"span",10),t._uU(1,"Channels"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.activeChannels)}}function Ca(n,a){if(1&n&&(t.TgZ(0,"span",10),t._uU(1,"Peers"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.activePeers)}}let xa=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.activePeers=0,this.activeChannels=0,this.faUsers=L.FVb,this.faChartPie=L.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e instanceof x.Av)).subscribe({next:e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.activePeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.Xz).pipe((0,h.R)(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.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.balances=[{title:"Total Balance",dataValue:e.onchainBalance.total||0},{title:"Confirmed",dataValue:e.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:e.onchainBalance.unconfirmed}]})}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({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"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"On-chain Balance"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA()()(),t.TgZ(8,"div",0),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"Connections"),t.qZA()(),t.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"mat-tab-group",7),t.NdJ("selectedIndexChange",function(s){return i.activeLink=s})("selectedTabChange",function(s){return i.onSelectedTabChange(s)}),t.TgZ(16,"mat-tab"),t.YNc(17,ga,2,1,"ng-template",8),t.qZA(),t.TgZ(18,"mat-tab"),t.YNc(19,Ca,2,1,"ng-template",8),t.qZA()(),t.TgZ(20,"div",9),t._UZ(21,"router-outlet"),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faUsers),t.xp6(6),t.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,ot.D,k.SP,k.uX,k.uD,yt.k,p.yH,x.lC],styles:[""]}),n})();function ya(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let La=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.router=o,this.faExchangeAlt=L.Ssp,this.faChartPie=L.OS1,this.currencyUnits=[],this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}}),this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[1]),(0,et.M)(this.store.select(C.pg))).subscribe(([i,o])=>{this.currencyUnits=o.currencyUnits,this.balances=o.userPersona===l.ol.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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Lightning Balance"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA()()(),t.TgZ(8,"div",6),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"Lightning Transactions"),t.qZA()(),t.TgZ(12,"div",7)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",8),t.YNc(16,ya,2,3,"div",9),t.qZA(),t.TgZ(17,"div",10),t._UZ(18,"router-outlet"),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faExchangeAlt),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,ot.D,k.BU,u.sg,k.Nj,x.rH,p.yH,x.lC],styles:[""]}),n})();function Ta(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let va=(()=>{class n{constructor(e){this.router=e,this.faMapSigns=L.SuH,this.events=[],this.flgLoading=[!0],this.errorMessage="",this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"peers",name:"Routing Peers"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x]}ngOnInit(){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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-routing"]],decls:13,vars:2,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"fa-icon",2),t.TgZ(3,"span",3),t._uU(4,"Routing"),t.qZA()(),t.TgZ(5,"div",4)(6,"mat-card",5)(7,"mat-card-content",6)(8,"div",7)(9,"nav",8),t.YNc(10,Ta,2,3,"div",9),t.qZA()(),t.TgZ(11,"div",10),t._UZ(12,"router-outlet"),t.qZA()()()()()),2&e&&(t.xp6(2),t.Q6J("icon",i.faMapSigns),t.xp6(8),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,p.yH,T.a8,T.dn,k.BU,u.sg,k.Nj,x.rH,x.lC],styles:[""]}),n})();var j=_(9814),Lt=_(7261),Tt=_(6895);function ba(n,a){if(1&n&&(t.TgZ(0,"span",9)(1,"div"),t._uU(2),t.ALo(3,"titlecase"),t.qZA()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.AsE("",i.nodeFeaturesEnum[e.key]||e.key,": ",t.lcZ(3,2,e.value),"")}}function Aa(n,a){1&n&&(t.TgZ(0,"th",24),t._uU(1,"Address"),t.qZA())}function Za(n,a){if(1&n&&(t.TgZ(0,"td",25),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",e," ")}}function Sa(n,a){1&n&&(t.TgZ(0,"th",26)(1,"span",27),t._uU(2,"Actions"),t.qZA()())}function wa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",28)(1,"span",27)(2,"button",29),t.NdJ("copied",function(o){return t.CHM(e),t.oxw(2).onCopyNodeURI(o)}),t._uU(3,"Copy Node URI"),t.qZA()()()}if(2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("payload",(null==i.lookupResult?null:i.lookupResult.nodeId)+"@"+e)}}function Ea(n,a){1&n&&t._UZ(0,"tr",30)}function Ia(n,a){1&n&&t._UZ(0,"tr",31)}const Oa=function(n){return{"background-color":n}};function Fa(n,a){if(1&n&&(t.TgZ(0,"div",1),t._UZ(1,"mat-divider",2),t.TgZ(2,"div",3)(3,"div",4)(4,"h4",5),t._uU(5,"Alias"),t.qZA(),t.TgZ(6,"span",6),t._uU(7),t.TgZ(8,"span",7),t._uU(9),t.qZA()()(),t.TgZ(10,"div",8)(11,"h4",5),t._uU(12,"Pub Key"),t.qZA(),t.TgZ(13,"span",9),t._uU(14),t.qZA()()(),t._UZ(15,"mat-divider",2),t.TgZ(16,"div",3)(17,"div",4)(18,"h4",5),t._uU(19,"Date/Time"),t.qZA(),t.TgZ(20,"span",6),t._uU(21),t.ALo(22,"date"),t.qZA()(),t.TgZ(23,"div",8)(24,"h4",5),t._uU(25,"Features"),t.qZA(),t.YNc(26,ba,4,4,"span",10),t.ALo(27,"keyvalue"),t.qZA()(),t._UZ(28,"mat-divider",2),t.TgZ(29,"div",3)(30,"div",11)(31,"h4",5),t._uU(32,"Signature"),t.qZA(),t.TgZ(33,"span",6),t._uU(34),t.qZA()()(),t._UZ(35,"mat-divider",2),t.TgZ(36,"div",1)(37,"h4",12),t._uU(38,"Addresses"),t.qZA(),t.TgZ(39,"div",13)(40,"table",14,15),t.ynx(42,16),t.YNc(43,Aa,2,0,"th",17),t.YNc(44,Za,2,1,"td",18),t.BQk(),t.ynx(45,19),t.YNc(46,Sa,3,0,"th",20),t.YNc(47,wa,4,1,"td",21),t.BQk(),t.YNc(48,Ea,1,0,"tr",22),t.YNc(49,Ia,1,0,"tr",23),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(null==e.lookupResult?null:e.lookupResult.alias),t.xp6(1),t.Q6J("ngStyle",t.VKq(19,Oa,null==e.lookupResult?null:e.lookupResult.rgbColor)),t.xp6(1),t.Oqu(null!=e.lookupResult&&e.lookupResult.rgbColor?null==e.lookupResult?null:e.lookupResult.rgbColor:""),t.xp6(5),t.Oqu(null==e.lookupResult?null:e.lookupResult.nodeId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.xi3(22,14,1e3*(null==e.lookupResult?null:e.lookupResult.timestamp),"dd/MMM/y HH:mm")),t.xp6(5),t.Q6J("ngForOf",t.lcZ(27,17,null==e.lookupResult?null:e.lookupResult.features.activated)),t.xp6(2),t.Q6J("inset",!0),t.xp6(6),t.Oqu(null==e.lookupResult?null:e.lookupResult.signature),t.xp6(1),t.Q6J("inset",!0),t.xp6(5),t.Q6J("dataSource",e.addresses),t.xp6(8),t.Q6J("matHeaderRowDef",e.displayedColumns),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns)}}let qa=(()=>{class n{constructor(e,i){this.logger=e,this.snackBar=i,this.lookupResult={},this.displayedColumns=["address","actions"],this.nodeFeaturesEnum=l.H_}ngOnInit(){this.addresses=new r.by(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}onCopyNodeURI(e){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(Lt.ux))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-node-lookup"]],viewQuery:function(e,i){if(1&e&&t.Gf(v.YE,5),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first)}},inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["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","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","address"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","1","rtlClipboard","",3,"payload","copied"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&t.YNc(0,Fa,50,21,"div",0),2&e&&t.Q6J("ngIf",i.lookupResult)},directives:[u.O5,p.xw,G.d,p.yH,p.Wh,u.PC,w.Zl,u.sg,Q.$V,r.BZ,v.YE,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,I.lW,Tt.y,r.as,r.XQ,r.nj,r.Gk],pipes:[u.uU,u.Nd,u.rS],styles:[""]}),n})();const Ra=["form"];function Na(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder," is required.")}}function ka(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Invalid ",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder,".")}}function Pa(n,a){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"rtl-ecl-node-lookup",25),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("lookupResult",e.nodeLookupValue)}}function Da(n,a){if(1&n&&(t.TgZ(0,"span",23),t.YNc(1,Pa,2,1,"div",24),t.qZA()),2&n){const e=t.oxw(2),i=t.MAs(21);t.xp6(1),t.Q6J("ngIf",e.nodeLookupValue.nodeId)("ngIfElse",i)}}function Ua(n,a){1&n&&(t.TgZ(0,"span",23)(1,"h3"),t._uU(2,"Error! Unable to find details!"),t.qZA()())}function Ma(n,a){if(1&n&&(t.TgZ(0,"div",17)(1,"div",18)(2,"span",19),t._uU(3),t.qZA()(),t.TgZ(4,"div",20),t.YNc(5,Da,2,2,"span",21),t.YNc(6,Ua,3,0,"span",22),t.qZA()()),2&n){const e=t.oxw();t.xp6(3),t.hij("",e.lookupFields[e.selectedFieldId].name," Details"),t.xp6(1),t.Q6J("ngSwitch",e.selectedFieldId),t.xp6(1),t.Q6J("ngSwitchCase",0)}}function Ja(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find details!"),t.qZA())}const Qa=function(n){return{"mt-1":!0,"mt-2":n}};let Ya=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.actions=s,this.lookupKeyCtrl=new m.NI,this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Node ID"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=L.wn1,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e.type===l.lr.SET_LOOKUP_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{if(e.type===l.lr.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.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"Lookup"===e.payload.action&&(this.flgLoading[0]="error")}),this.lookupKeyCtrl.valueChanges.pipe((0,h.R)(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,N.Sf)({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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lookups"]],viewQuery:function(e,i){if(1&e&&t.Gf(Ra,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:22,vars:9,consts:[["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"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField"],["checked","",1,"mr-4",3,"value"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"formControl","placeholder"],["key",""],[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"],["errorBlock",""],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[4,"ngIf","ngIfElse"],[3,"lookupResult"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-content",2)(3,"form",3,4)(5,"div",5)(6,"mat-radio-group",6)(7,"mat-radio-button",7),t._uU(8,"Node"),t.qZA()()(),t.TgZ(9,"mat-form-field",8),t._UZ(10,"input",9,10),t.YNc(12,Na,2,1,"mat-error",11),t.YNc(13,ka,2,1,"mat-error",11),t.qZA(),t.TgZ(14,"div",12)(15,"button",13),t.NdJ("click",function(){return i.resetData()}),t._uU(16,"Clear"),t.qZA(),t.TgZ(17,"button",14),t.NdJ("click",function(){return i.onLookup()}),t._uU(18,"Lookup"),t.qZA()()(),t.YNc(19,Ma,7,3,"div",15),t.qZA()()(),t.YNc(20,Ja,2,0,"ng-template",null,16,t.W1O)),2&e&&(t.xp6(7),t.Q6J("value",0),t.xp6(2),t.Q6J("ngClass",t.VKq(7,Qa,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM)),t.xp6(1),t.Q6J("formControl",i.lookupKeyCtrl)("placeholder",(null==i.lookupFields[i.selectedFieldId]?null:i.lookupFields[i.selectedFieldId].placeholder)||"Lookup Key"),t.xp6(2),t.Q6J("ngIf",null==i.lookupKeyCtrl.errors?null:i.lookupKeyCtrl.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.lookupKeyCtrl.errors?null:i.lookupKeyCtrl.errors.invalid),t.xp6(6),t.Q6J("ngIf",i.flgSetLookupValue))},directives:[p.xw,p.yH,p.Wh,T.dn,m._Y,m.JL,m.F,j.VQ,j.U0,y.KE,u.mk,w.oO,U.Nt,m.Fj,m.Q7,m.JJ,m.oH,u.O5,y.TO,I.lW,u.RF,u.n9,qa,u.ED],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}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})();var Ha=_(9122);let Ba=(()=>{class n{constructor(e,i){this.store=e,this.eclEffects=i,this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,N._E)()),this.eclEffects.setNewAddress.pipe((0,B.q)(1)).subscribe(e=>{this.newAddress=e,setTimeout(()=>{this.store.dispatch((0,Z.qR)({payload:{data:{address:this.newAddress,addressType:"",component:Ha.n}}}))},0)})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(at.o))},n.\u0275cmp=t.Xpm({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(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"button",2),t.NdJ("click",function(){return i.onGenerateAddress()}),t._uU(3,"Generate Address"),t.qZA()()())},directives:[p.xw,p.yH,p.Wh,I.lW],styles:[""]}),n})(),za=(()=>{class n{constructor(e,i){this.store=e,this.activatedRoute=i,this.sweepAll=!1,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.activatedRoute.data.pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.sweepAll=e.sweepAll})}openSendFundsModal(){this.store.dispatch((0,Z.qR)({payload:{data:{sweepAll:this.sweepAll,component:xt}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(x.gz))},n.\u0275cmp=t.Xpm({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(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"button",2),t.NdJ("click",function(){return i.openSendFundsModal()}),t._uU(3),t.qZA()()()),2&e&&(t.xp6(3),t.Oqu(i.sweepAll?"Sweep All":"Send Funds"))},directives:[p.xw,p.yH,p.Wh,I.lW],styles:[""]}),n})();var Va=_(8675),vt=_(4004),bt=_(1079),Ga=_(9843),At=_(2368);const Xa=["form"];function $a(n,a){if(1&n&&(t.TgZ(0,"mat-option",34),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(e.alias?e.alias:e.nodeId?e.nodeId:"")}}function Wa(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Peer alias is required."),t.qZA())}function Ka(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Peer not found in the list."),t.qZA())}function ja(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-form-field",1)(1,"input",30),t.NdJ("change",function(){return t.CHM(e),t.oxw().onSelectedPeerChanged()}),t.qZA(),t.TgZ(2,"mat-autocomplete",31,32),t.NdJ("optionSelected",function(){return t.CHM(e),t.oxw().onSelectedPeerChanged()}),t.YNc(4,$a,2,2,"mat-option",33),t.ALo(5,"async"),t.qZA(),t.YNc(6,Wa,2,0,"mat-error",17),t.YNc(7,Ka,2,0,"mat-error",17),t.qZA()}if(2&n){const e=t.MAs(3),i=t.oxw();t.xp6(1),t.Q6J("formControl",i.selectedPeer)("matAutocomplete",e),t.xp6(1),t.Q6J("displayWith",i.displayFn),t.xp6(2),t.Q6J("ngForOf",t.lcZ(5,6,i.filteredPeers)),t.xp6(2),t.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.notfound)}}function to(n,a){1&n&&t.GkF(0)}function eo(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function no(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function io(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.channelConnectionError)}}function ao(n,a){if(1&n&&(t.TgZ(0,"div",35),t._UZ(1,"fa-icon",36),t.YNc(2,io,2,1,"span",17),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.channelConnectionError)}}function oo(n,a){if(1&n&&(t.TgZ(0,"mat-expansion-panel",38)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),t._uU(4,"Peer: \xa0"),t.qZA(),t.TgZ(5,"strong",39),t._uU(6),t.qZA()()(),t.TgZ(7,"div",9)(8,"div",0)(9,"div",1)(10,"h4",40),t._uU(11,"Pubkey"),t.qZA(),t.TgZ(12,"span",41),t._uU(13),t.qZA()()(),t._UZ(14,"mat-divider",42),t.TgZ(15,"div",0)(16,"div",43)(17,"h4",40),t._uU(18,"Address"),t.qZA(),t.TgZ(19,"span",44),t._uU(20),t.qZA()(),t.TgZ(21,"div",43)(22,"h4",40),t._uU(23,"State"),t.qZA(),t.TgZ(24,"span",44),t._uU(25),t.ALo(26,"titlecase"),t.qZA()()()()()),2&n){const e=t.oxw(2);t.xp6(6),t.Oqu((null==e.peer?null:e.peer.alias)||(null==e.peer?null:e.peer.nodeId)),t.xp6(7),t.Oqu(e.peer.nodeId),t.xp6(7),t.Oqu(null==e.peer?null:e.peer.address),t.xp6(5),t.Oqu(t.lcZ(26,4,null==e.peer?null:e.peer.state))}}function so(n,a){if(1&n&&t.YNc(0,oo,27,6,"mat-expansion-panel",37),2&n){const e=t.oxw();t.Q6J("ngIf",e.peer)}}let Zt=(()=>{class n{constructor(e,i,o,s){this.dialogRef=e,this.data=i,this.store=o,this.actions=s,this.selectedPeer=new m.NI,this.faExclamationTriangle=L.eHv,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.selectedPubkey="",this.isPrivate=!1,this.feeRate=null,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(o=>o.type===l.lr.UPDATE_API_CALL_STATUS_ECL||o.type===l.lr.FETCH_CHANNELS_ECL)).subscribe(o=>{o.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&o.payload.status===l.Bn.ERROR&&"SaveNewChannel"===o.payload.action&&(this.channelConnectionError=o.payload.message),o.type===l.lr.FETCH_CHANNELS_ECL&&this.dialogRef.close()});let e="",i="";this.sortedPeers=this.peers.sort((o,s)=>(e=o.alias?o.alias.toLowerCase():o.nodeId?o.nodeId.toLowerCase():"",i=s.alias?s.alias.toLowerCase():o.nodeId.toLowerCase(),ei?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,h.R)(this.unSubs[1]),(0,Va.O)(""),(0,vt.U)(o=>"string"==typeof o?o:o.alias?o.alias:o.nodeId),(0,vt.U)(o=>o?this.filterPeers(o):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=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(e){this.advancedTitle=e&&this.feeRate&&this.feeRate>0?"Advanced Options | Fee (Sats/vByte): "+this.feeRate:"Advanced Options"}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0)return!0;this.store.dispatch((0,N.YX)({payload:{nodeId:this.peer&&this.peer.nodeId?this.peer.nodeId:this.selectedPubkey,amount:this.fundingAmount,private:this.isPrivate,feeRate:this.feeRate}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(S.yh),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-open-channel"]],viewQuery:function(e,i){if(1&e&&t.Gf(Xa,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:48,vars:18,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","70","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amount",3,"ngModel","step","min","max","ngModelChange"],["amount","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","25","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","placeholder","Fee (Sats/vByte)","type","number","name","fee","tabindex","7",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5),t.qZA()(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"form",7,8),t.NdJ("submit",function(){return i.onOpenChannel()})("reset",function(){return i.resetData()}),t.TgZ(11,"div",9),t.YNc(12,ja,8,8,"mat-form-field",10),t.qZA(),t.YNc(13,to,1,0,"ng-container",11),t.TgZ(14,"div",9)(15,"div",12)(16,"mat-form-field",13)(17,"input",14,15),t.NdJ("ngModelChange",function(s){return i.fundingAmount=s}),t.qZA(),t.TgZ(19,"mat-hint"),t._uU(20),t.ALo(21,"number"),t.qZA(),t.TgZ(22,"span",16),t._uU(23," Sats "),t.qZA(),t.YNc(24,eo,2,0,"mat-error",17),t.YNc(25,no,2,1,"mat-error",17),t.qZA(),t.TgZ(26,"div",18)(27,"mat-slide-toggle",19),t.NdJ("ngModelChange",function(s){return i.isPrivate=s}),t._uU(28,"Private Channel"),t.qZA()()(),t.TgZ(29,"mat-expansion-panel",20),t.NdJ("closed",function(){return i.onAdvancedPanelToggle(!0)})("opened",function(){return i.onAdvancedPanelToggle(!1)}),t.TgZ(30,"mat-expansion-panel-header")(31,"mat-panel-title")(32,"span"),t._uU(33),t.qZA()()(),t.TgZ(34,"div",21)(35,"div",12)(36,"div",22)(37,"mat-form-field",1)(38,"input",23,24),t.NdJ("ngModelChange",function(s){return i.feeRate=s}),t.qZA()()()()()()(),t.YNc(40,ao,3,2,"div",25),t.TgZ(41,"div",26)(42,"button",27),t._uU(43,"Clear Fields"),t.qZA(),t.TgZ(44,"button",28),t._uU(45,"Open Channel"),t.qZA()()()()()(),t.YNc(46,so,1,1,"ng-template",null,29,t.W1O)),2&e){const o=t.MAs(18),s=t.MAs(47);t.xp6(5),t.Oqu(i.alertTitle),t.xp6(7),t.Q6J("ngIf",!i.peer&&i.peers&&i.peers.length>0),t.xp6(1),t.Q6J("ngTemplateOutlet",s),t.xp6(4),t.Q6J("ngModel",i.fundingAmount)("step",1e3)("min",1)("max",i.totalBalance),t.xp6(3),t.hij("Remaining Bal: ",t.lcZ(21,16,i.totalBalance-(i.fundingAmount?i.fundingAmount:0)),""),t.xp6(4),t.Q6J("ngIf",null==o.errors?null:o.errors.required),t.xp6(1),t.Q6J("ngIf",null==o.errors?null:o.errors.max),t.xp6(2),t.Q6J("ngModel",i.isPrivate),t.xp6(6),t.Oqu(i.advancedTitle),t.xp6(5),t.Q6J("ngModel",i.feeRate)("step",1)("min",0),t.xp6(2),t.Q6J("ngIf",""!==i.channelConnectionError)}},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,T.dn,m._Y,m.JL,m.F,u.O5,y.KE,U.Nt,m.Fj,bt.ZL,m.Q7,m.JJ,m.oH,bt.XC,u.sg,Y.ey,y.TO,u.tP,m.wV,m.qQ,m.Fd,$.q,Ga.F,m.On,y.bx,y.R9,At.Rr,H.ib,H.yz,H.yK,O.BN,X.h,G.d],pipes:[u.Ov,u.JJ,u.rS],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),n})();function lo(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Open"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfOpenChannels)}}function ro(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Pending"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfPendingChannels)}}function co(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Inactive"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfInactiveChannels)}}let uo=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.router=o,this.numOfOpenChannels=0,this.numOfPendingChannels=0,this.numOfInactiveChannels=0,this.selNode={},this.information={},this.peers=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending"},{link:"inactive",name:"Inactive"}],this.activeLink=0,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e instanceof x.Av)).subscribe({next:e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.Xz).pipe((0,h.R)(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(C.pg).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.selNode=e}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[4])).subscribe(e=>{this.peers=e.peers}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[5])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}onOpenChannel(){this.store.dispatch((0,Z.qR)({payload:{data:{alertTitle:"Open Channel",message:{peers:this.peers,information:this.information,balance:this.totalBalance},component:Zt}}}))}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/channels/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({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,"my-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"button",2),t.NdJ("click",function(){return i.onOpenChannel()}),t._uU(3,"Open Channel"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-tab-group",4),t.NdJ("selectedIndexChange",function(s){return i.activeLink=s})("selectedTabChange",function(s){return i.onSelectedTabChange(s)}),t.TgZ(6,"mat-tab"),t.YNc(7,lo,2,1,"ng-template",5),t.qZA(),t.TgZ(8,"mat-tab"),t.YNc(9,ro,2,1,"ng-template",5),t.qZA(),t.TgZ(10,"mat-tab"),t.YNc(11,co,2,1,"ng-template",5),t.qZA()(),t.TgZ(12,"div",6),t._UZ(13,"router-outlet"),t.qZA()()()),2&e&&(t.xp6(5),t.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.yH,p.Wh,I.lW,k.SP,k.uX,k.uD,yt.k,x.lC],styles:[""]}),n})();function po(n,a){if(1&n&&(t.TgZ(0,"div",11)(1,"h4",12),t._uU(2,"Short Channel ID"),t.qZA(),t.TgZ(3,"span",13),t._uU(4),t.qZA()()),2&n){const e=t.oxw();t.xp6(4),t.Oqu(e.channel.shortChannelId)}}function mo(n,a){if(1&n&&(t.TgZ(0,"div",11)(1,"h4",12),t._uU(2,"State"),t.qZA(),t.TgZ(3,"span",15),t._uU(4),t.ALo(5,"titlecase"),t.qZA()()),2&n){const e=t.oxw();t.xp6(4),t.Oqu(t.lcZ(5,1,e.channel.state))}}function ho(n,a){if(1&n&&(t.TgZ(0,"div")(1,"div",9)(2,"div",11)(3,"h4",12),t._uU(4,"Local Balance (Sats)"),t.qZA(),t.TgZ(5,"span",15),t._uU(6),t.ALo(7,"number"),t.qZA()(),t.TgZ(8,"div",11)(9,"h4",12),t._uU(10,"Remote Balance (Sats)"),t.qZA(),t.TgZ(11,"span",15),t._uU(12),t.ALo(13,"number"),t.qZA()()(),t._UZ(14,"mat-divider",14),t.TgZ(15,"div",9)(16,"div",11)(17,"h4",12),t._uU(18,"Base Fee (mSats)"),t.qZA(),t.TgZ(19,"span",15),t._uU(20),t.ALo(21,"number"),t.qZA()(),t.TgZ(22,"div",11)(23,"h4",12),t._uU(24,"Fee Rate (mili mSats)"),t.qZA(),t.TgZ(25,"span",15),t._uU(26),t.ALo(27,"number"),t.qZA()()(),t._UZ(28,"mat-divider",14),t.qZA()),2&n){const e=t.oxw();t.xp6(6),t.Oqu(t.lcZ(7,6,e.channel.toLocal)),t.xp6(6),t.Oqu(t.lcZ(13,8,e.channel.toRemote)),t.xp6(2),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.lcZ(21,10,e.channel.feeBaseMsat)),t.xp6(6),t.Oqu(t.lcZ(27,12,e.channel.feeProportionalMillionths)),t.xp6(2),t.Q6J("inset",!0)}}function _o(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Show Advanced"),t.qZA())}function fo(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Hide Advanced"),t.qZA())}function go(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",21),t.NdJ("click",function(){return t.CHM(e),t.oxw().onShowAdvanced()}),t.YNc(1,_o,2,0,"p",22),t.YNc(2,fo,2,0,"ng-template",null,23,t.W1O),t.qZA()}if(2&n){const e=t.MAs(3),i=t.oxw();t.xp6(1),t.Q6J("ngIf",!i.showAdvanced)("ngIfElse",e)}}function Co(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("copied",function(o){return t.CHM(e),t.oxw().onCopyChanID(o)}),t._uU(1,"Copy Short Channel ID"),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("payload",e.channel.shortChannelId)}}function xo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",25),t.NdJ("copied",function(o){return t.CHM(e),t.oxw().onCopyChanID(o)}),t._uU(1,"Copy Channel ID"),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("payload",e.channel.channelId)}}const yo=function(n){return{"xs-scroll-y":n}},Lo=function(n,a){return{"mt-2":n,"mt-1":a}};let st=(()=>{class n{constructor(e,i,o,s,c){this.dialogRef=e,this.data=i,this.logger=o,this.commonService=s,this.snackBar=c,this.faReceipt=L.dLy,this.showAdvanced=!1,this.channelsType="open",this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.channel=this.data.channel,this.channelsType=this.data.channelsType,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(e){this.snackBar.open("open"===this.channelsType?"Short channel ID "+e+" copied.":"Channel ID copied."),this.logger.info("Copied Text: "+e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(q.mQ),t.Y36(R.v),t.Y36(Lt.ux))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-information"]],decls:64,vars:28,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50",4,"ngIf"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","1","class","mr-1",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3),t._UZ(4,"fa-icon",4),t.TgZ(5,"span",5),t._uU(6,"Channel Information"),t.qZA()(),t.TgZ(7,"button",6),t.NdJ("click",function(){return i.onClose()}),t._uU(8,"X"),t.qZA()(),t.TgZ(9,"mat-card-content",7)(10,"div",8)(11,"div",9),t.YNc(12,po,5,1,"div",10),t.TgZ(13,"div",11)(14,"h4",12),t._uU(15,"Peer Alias"),t.qZA(),t.TgZ(16,"span",13),t._uU(17),t.qZA()(),t.YNc(18,mo,6,3,"div",10),t.qZA(),t._UZ(19,"mat-divider",14),t.TgZ(20,"div",9)(21,"div",1)(22,"h4",12),t._uU(23,"Channel ID"),t.qZA(),t.TgZ(24,"span",13),t._uU(25),t.qZA()()(),t._UZ(26,"mat-divider",14),t.TgZ(27,"div",9)(28,"div",1)(29,"h4",12),t._uU(30,"Peer Public Key"),t.qZA(),t.TgZ(31,"span",13),t._uU(32),t.qZA()()(),t._UZ(33,"mat-divider",14),t.TgZ(34,"div",9)(35,"div",11)(36,"h4",12),t._uU(37,"Private"),t.qZA(),t.TgZ(38,"span",15),t._uU(39),t.qZA()(),t.TgZ(40,"div",11)(41,"h4",12),t._uU(42,"Funder"),t.qZA(),t.TgZ(43,"span",15),t._uU(44),t.qZA()()(),t._UZ(45,"mat-divider",14),t.TgZ(46,"div",9)(47,"div",11)(48,"h4",12),t._uU(49,"State"),t.qZA(),t.TgZ(50,"span",15),t._uU(51),t.ALo(52,"titlecase"),t.qZA()(),t.TgZ(53,"div",11)(54,"h4",12),t._uU(55,"Buried"),t.qZA(),t.TgZ(56,"span",15),t._uU(57),t.qZA()()(),t._UZ(58,"mat-divider",14),t.YNc(59,ho,29,14,"div",16),t.TgZ(60,"div",17),t.YNc(61,go,4,2,"button",18),t.YNc(62,Co,2,1,"button",19),t.YNc(63,xo,2,1,"button",20),t.qZA()()()()()),2&e&&(t.xp6(4),t.Q6J("icon",i.faReceipt),t.xp6(5),t.Q6J("ngClass",t.VKq(23,yo,i.screenSize===i.screenSizeEnum.XS)),t.xp6(3),t.Q6J("ngIf","open"===i.channelsType),t.xp6(5),t.Oqu(i.channel.alias),t.xp6(1),t.Q6J("ngIf","open"!==i.channelsType),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(i.channel.channelId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(i.channel.nodeId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(0===i.channel.channelFlags?"Yes":"No"),t.xp6(5),t.Oqu(i.channel.isFunder?"Yes":"No"),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.lcZ(52,21,i.channel.state)),t.xp6(6),t.Oqu(i.channel.buried?"Yes":"No"),t.xp6(1),t.Q6J("inset",!0),t.xp6(1),t.Q6J("ngIf",i.showAdvanced&&"open"===i.channelsType),t.xp6(1),t.Q6J("ngClass",t.WLB(25,Lo,!i.showAdvanced,i.showAdvanced)),t.xp6(1),t.Q6J("ngIf","open"===i.channelsType),t.xp6(1),t.Q6J("ngIf","open"===i.channelsType),t.xp6(1),t.Q6J("ngIf","open"!==i.channelsType))},directives:[p.xw,p.Wh,p.yH,T.dk,O.BN,I.lW,T.dn,u.mk,w.oO,u.O5,G.d,X.h,Tt.y],pipes:[u.rS,u.JJ],styles:[""]}),n})();function To(n,a){1&n&&t._UZ(0,"mat-progress-bar",30)}function vo(n,a){1&n&&(t.TgZ(0,"th",31),t._uU(1," Short Channel ID "),t.qZA())}function bo(n,a){if(1&n&&(t.TgZ(0,"span",37),t._UZ(1,"fa-icon",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEyeSlash)}}function Ao(n,a){if(1&n&&(t.TgZ(0,"span",39),t._UZ(1,"fa-icon",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEye)}}const St=function(n){return{"max-width":n}};function Zo(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"div",33),t.YNc(2,bo,2,1,"span",34),t.YNc(3,Ao,2,1,"span",35),t.TgZ(4,"span",36),t._uU(5),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(4,St,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),t.xp6(1),t.Q6J("ngIf",0===e.channelFlags),t.xp6(1),t.Q6J("ngIf",0!==e.channelFlags),t.xp6(2),t.Oqu(null==e?null:e.shortChannelId)}}function So(n,a){1&n&&(t.TgZ(0,"th",31),t._uU(1," Alias "),t.qZA())}function wo(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"div",33)(2,"span",36),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(2,St,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),t.xp6(2),t.Oqu(e.alias)}}function Eo(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Base Fee (mSats) "),t.qZA())}function Io(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.feeBaseMsat,"1.0-0")," ")}}function Oo(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Fee Rate (mili mSats) "),t.qZA())}function Fo(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.feeProportionalMillionths,"1.0-0")," ")}}function qo(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Local Balance (Sats) "),t.qZA())}function Ro(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function No(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Remote Balance (Sats) "),t.qZA())}function ko(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function Po(n,a){1&n&&(t.TgZ(0,"th",42),t._uU(1,"Balance Score "),t.qZA())}function Do(n,a){if(1&n&&(t.TgZ(0,"td",43)(1,"div",44)(2,"mat-hint",45),t._uU(3),t.ALo(4,"number"),t.qZA()(),t._UZ(5,"mat-progress-bar",46),t.qZA()),2&n){const e=a.$implicit;t.xp6(3),t.Oqu(t.lcZ(4,2,(null==e?null:e.balancedness)||0)),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function Uo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",47)(1,"div",48)(2,"mat-select",49),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",50),t.NdJ("click",function(){return t.CHM(e),t.oxw().onChannelUpdate("all")}),t._uU(5,"Update Fee Policy"),t.qZA(),t.TgZ(6,"mat-option",50),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(7,"Download CSV"),t.qZA()()()()}}function Mo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",51)(1,"div",52)(2,"mat-select",53),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",50),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelUpdate(s)}),t._uU(7,"Update Fee Policy"),t.qZA(),t.TgZ(8,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!1)}),t._uU(9,"Close Channel"),t.qZA(),t.TgZ(10,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!0)}),t._uU(11,"Force Close"),t.qZA()()()()}}function Jo(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No peers connected. Add a peer in order to open a channel."),t.qZA())}function Qo(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No channel available."),t.qZA())}function Yo(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting channels..."),t.qZA())}function Ho(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function Bo(n,a){if(1&n&&(t.TgZ(0,"td",54),t.YNc(1,Jo,2,0,"p",55),t.YNc(2,Qo,2,0,"p",55),t.YNc(3,Yo,2,0,"p",55),t.YNc(4,Ho,2,1,"p",55),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const zo=function(n){return{"display-none":n}};function Vo(n,a){if(1&n&&t._UZ(0,"tr",56),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,zo,e.numPeers>0&&(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function Go(n,a){1&n&&t._UZ(0,"tr",57)}function Xo(n,a){1&n&&t._UZ(0,"tr",58)}const $o=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Wo=function(){return["no_peer"]};let Ko=(()=>{class n{constructor(e,i,o,s,c){var f,F,g,b;this.logger=e,this.store=i,this.rtlEffects=o,this.commonService=s,this.router=c,this.faEye=L.Mdf,this.faEyeSlash=L.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","balancedness","actions"]),this.selFilter=(null===(F=null===(f=this.router.getCurrentNavigation().extras)||void 0===f?void 0:f.state)||void 0===F?void 0:F.filter)?null===(b=null===(g=this.router.getCurrentNavigation().extras)||void 0===g?void 0:g.state)||void 0===b?void 0:b.filter:""}ngOnInit(){this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message),this.activeChannels=e.activeChannels,this.activeChannels.length>0&&this.sort&&this.paginator&&this.loadChannelsTable(),this.logger.info(e)}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.activeChannels.length>0&&this.sort&&this.paginator&&this.loadChannelsTable()}onChannelUpdate(e){"all"!==e&&"NORMAL"!==e.state||(this.store.dispatch((0,Z.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:[],titleMessage:"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:"number",inputValue:e&&void 0!==e.feeBaseMsat?e.feeBaseMsat:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:e&&void 0!==e.feeProportionalMillionths?e.feeProportionalMillionths:100,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(s=>{if(s){const c=s[0].inputValue,f=s[1].inputValue;let F=null;if(this.commonService.isVersionCompatible(this.information.version,"0.6.2")){let g="";"all"===e?(this.activeChannels.forEach(b=>{g=g+","+b.nodeId}),g=g.substring(1),F={baseFeeMsat:c,feeRate:f,nodeIds:g}):F={baseFeeMsat:c,feeRate:f,nodeId:e.nodeId}}else{let g="";"all"===e?(this.activeChannels.forEach(b=>{g=g+","+b.channelId}),g=g.substring(1),F={baseFeeMsat:c,feeRate:f,channelIds:g}):F={baseFeeMsat:c,feeRate:f,channelId:e.channelId}}this.store.dispatch((0,N.pW)({payload:F}))}}),this.applyFilter())}percentHintFunction(e){return(e/1e4).toString()+"%"}onChannelClose(e,i){this.store.dispatch((0,Z.c1)({payload:{data:{type:l.n_.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,h.R)(this.unSubs[5])).subscribe(f=>{f&&this.store.dispatch((0,N.BL)({payload:{channelId:e.channelId,force:i}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,i){this.store.dispatch((0,Z.qR)({payload:{data:{channel:e,channelsType:"open",component:st}}}))}loadChannelsTable(){this.activeChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...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.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(K.V),t.Y36(R.v),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-open-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Channels")}])],decls:39,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","shortChannelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","feeBaseMsat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","feeProportionalMillionths"],["matColumnDef","toLocal"],["matColumnDef","toRemote"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3)(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()(),t.TgZ(5,"div",5),t.YNc(6,To,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,vo,2,0,"th",10),t.YNc(11,Zo,6,6,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,So,2,0,"th",10),t.YNc(14,wo,4,4,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,Eo,2,0,"th",14),t.YNc(17,Io,4,4,"td",11),t.BQk(),t.ynx(18,15),t.YNc(19,Oo,2,0,"th",14),t.YNc(20,Fo,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,qo,2,0,"th",14),t.YNc(23,Ro,4,4,"td",11),t.BQk(),t.ynx(24,17),t.YNc(25,No,2,0,"th",14),t.YNc(26,ko,4,4,"td",11),t.BQk(),t.ynx(27,18),t.YNc(28,Po,2,0,"th",19),t.YNc(29,Do,6,4,"td",20),t.BQk(),t.ynx(30,21),t.YNc(31,Uo,8,0,"th",22),t.YNc(32,Mo,12,0,"td",23),t.BQk(),t.ynx(33,24),t.YNc(34,Bo,5,4,"td",25),t.BQk(),t.YNc(35,Vo,1,3,"tr",26),t.YNc(36,Go,1,0,"tr",27),t.YNc(37,Xo,1,0,"tr",28),t.qZA()(),t._UZ(38,"mat-paginator",29),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,$o,""!==i.errorMessage)),t.xp6(28),t.Q6J("matFooterRowDef",t.DdM(13,Wo)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,V.gM,O.BN,y.bx,P.gD,P.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.JJ],styles:[".mat-column-shortChannelId[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-shortChannelId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{padding-left:1rem;flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:2rem;flex:0 0 17%;width:17%}.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 10%;width:10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 56.25em){.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset;flex:1 1 20%;width:20%}}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 56.25em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 90%}}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})();function jo(n,a){1&n&&t._UZ(0,"mat-progress-bar",25)}function ts(n,a){1&n&&(t.TgZ(0,"th",26),t._uU(1," State "),t.qZA())}function es(n,a){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"titlecase"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,null==e?null:e.state),"")}}function ns(n,a){1&n&&(t.TgZ(0,"th",26),t._uU(1," Alias "),t.qZA())}function is(n,a){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(null==e?null:e.alias)}}function as(n,a){1&n&&(t.TgZ(0,"th",28),t._uU(1," Local Balance (Sats) "),t.qZA())}function os(n,a){if(1&n&&(t.TgZ(0,"td",27)(1,"span",29),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function ss(n,a){1&n&&(t.TgZ(0,"th",28),t._uU(1," Remote Balance (Sats) "),t.qZA())}function ls(n,a){if(1&n&&(t.TgZ(0,"td",27)(1,"span",29),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function rs(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",30)(1,"div",31)(2,"mat-select",32),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",33),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function cs(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",34)(1,"button",35),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(2,"View Info"),t.qZA()()}}function us(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No pending channel available."),t.qZA())}function ps(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting pending channels..."),t.qZA())}function ms(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function ds(n,a){if(1&n&&(t.TgZ(0,"td",36),t.YNc(1,us,2,0,"p",37),t.YNc(2,ps,2,0,"p",37),t.YNc(3,ms,2,1,"p",37),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const hs=function(n){return{"display-none":n}};function _s(n,a){if(1&n&&t._UZ(0,"tr",38),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,hs,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function fs(n,a){1&n&&t._UZ(0,"tr",39)}function gs(n,a){1&n&&t._UZ(0,"tr",40)}const Cs=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},xs=function(){return["no_channel"]};let ys=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.commonService=o,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["state","alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","alias","toLocal","toRemote","actions"])}ngOnInit(){this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="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.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[4])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[5])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.pendingChannels.length>0&&this.loadChannelsTable()}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,i){this.store.dispatch((0,Z.qR)({payload:{data:{channel:e,channelsType:"pending",component:st}}}))}loadChannelsTable(){this.pendingChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...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.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-pending-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Channels")}])],decls:30,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3)(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()(),t.TgZ(5,"div",5),t.YNc(6,jo,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,ts,2,0,"th",10),t.YNc(11,es,3,3,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,ns,2,0,"th",10),t.YNc(14,is,2,1,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,as,2,0,"th",14),t.YNc(17,os,4,4,"td",11),t.BQk(),t.ynx(18,15),t.YNc(19,ss,2,0,"th",14),t.YNc(20,ls,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,rs,6,0,"th",17),t.YNc(23,cs,3,0,"td",18),t.BQk(),t.ynx(24,19),t.YNc(25,ds,4,3,"td",20),t.BQk(),t.YNc(26,_s,1,3,"tr",21),t.YNc(27,fs,1,0,"tr",22),t.YNc(28,gs,1,0,"tr",23),t.qZA()(),t._UZ(29,"mat-paginator",24),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,Cs,""!==i.errorMessage)),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(13,xs)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,P.gD,P.$L,Y.ey,I.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.rS,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var lt=_(5615);const Ls=["peersForm"],Ts=["stepper"];function vs(n,a){if(1&n&&t._uU(0),2&n){const e=t.oxw();t.Oqu(e.peerFormLabel)}}function bs(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Address is required."),t.qZA())}function As(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",34),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(2),t.Oqu(e.peerConnectionError)}}function Zs(n,a){if(1&n&&t._uU(0),2&n){const e=t.oxw();t.Oqu(e.channelFormLabel)}}function Ss(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function ws(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount must be a positive number."),t.qZA())}function Es(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function Is(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",34),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(2),t.Oqu(e.channelConnectionError)}}let Os=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.data=i,this.store=o,this.formBuilder=s,this.actions=c,this.logger=f,this.faExclamationTriangle=L.eHv,this.peerAddress="",this.totalBalance=0,this.flgChannelOpened=!1,this.channelOpenStatus=null,this.newlyAddedPeer=null,this.flgEditable=!0,this.peerConnectionError="",this.channelConnectionError="",this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)",this.unSubs=[new d.x,new d.x]}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.nodeId&&this.data.message.peer.address?this.data.message.peer.nodeId+"@"+this.data.message.peer.address:this.data.message.peer&&this.data.message.peer.nodeId&&!this.data.message.peer.address?this.data.message.peer.nodeId:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[m.kI.required]],peerAddress:[this.peerAddress,[m.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[m.kI.required,m.kI.min(1),m.kI.max(this.totalBalance)]],isPrivate:[!1],feeRate:[null],hiddenAmount:["",[m.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.NEWLY_ADDED_PEER_ECL||e.type===l.lr.FETCH_CHANNELS_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.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.lr.FETCH_CHANNELS_ECL&&this.dialogRef.close(),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&("SaveNewPeer"===e.payload.action?this.peerConnectionError=e.payload.message:"SaveNewChannel"===e.payload.action&&(this.channelConnectionError=e.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch((0,N.El)({payload:{id:this.peerFormGroup.controls.peerAddress.value}}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0)return!0;this.channelConnectionError="",this.store.dispatch((0,N.YX)({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.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(S.yh),t.Y36(m.qu),t.Y36(z.eX),t.Y36(q.mQ))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-connect-peer"]],viewQuery:function(e,i){if(1&e&&(t.Gf(Ls,5),t.Gf(Ts,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first),t.iGM(o=t.CRH())&&(i.stepper=o.first)}},decls:50,vars:20,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","button",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mb-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","autoFocus","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","formControlName","feeRate","placeholder","Fee (Sats/vByte)","type","number","name","feeRate","tabindex","7",3,"step","min"],["mat-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"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Connect to a new peer"),t.qZA()(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"div",7)(10,"mat-vertical-stepper",8,9),t.NdJ("selectionChange",function(s){return i.stepSelectionChanged(s)}),t.TgZ(12,"mat-step",10)(13,"form",11),t.YNc(14,vs,1,1,"ng-template",12),t.TgZ(15,"mat-form-field",1),t._UZ(16,"input",13),t.YNc(17,bs,2,0,"mat-error",14),t.qZA(),t.YNc(18,As,4,2,"div",15),t.TgZ(19,"div",16)(20,"button",17),t.NdJ("click",function(){return i.onConnectPeer()}),t._uU(21),t.qZA()()()(),t.TgZ(22,"mat-step",10)(23,"form",18),t.YNc(24,Zs,1,1,"ng-template",19),t.TgZ(25,"div",20)(26,"div",21)(27,"mat-form-field",22),t._UZ(28,"input",23),t.TgZ(29,"mat-hint"),t._uU(30),t.qZA(),t.TgZ(31,"span",24),t._uU(32," Sats "),t.qZA(),t.YNc(33,Ss,2,0,"mat-error",14),t.YNc(34,ws,2,0,"mat-error",14),t.YNc(35,Es,2,1,"mat-error",14),t.qZA(),t.TgZ(36,"div",25)(37,"mat-slide-toggle",26),t._uU(38,"Private Channel"),t.qZA()()(),t.TgZ(39,"div",27)(40,"div",28)(41,"mat-form-field",1),t._UZ(42,"input",29),t.qZA()()()(),t.YNc(43,Is,4,2,"div",15),t.TgZ(44,"div",16)(45,"button",30),t.NdJ("click",function(){return i.onOpenChannel()}),t._uU(46),t.qZA()()()()(),t.TgZ(47,"div",31)(48,"button",32),t.NdJ("click",function(){return i.onClose()}),t._uU(49),t.qZA()()()()()()),2&e&&(t.xp6(10),t.Q6J("linear",!0),t.xp6(2),t.Q6J("stepControl",i.peerFormGroup)("editable",i.flgEditable),t.xp6(1),t.Q6J("formGroup",i.peerFormGroup),t.xp6(4),t.Q6J("ngIf",null==i.peerFormGroup.controls.peerAddress.errors?null:i.peerFormGroup.controls.peerAddress.errors.required),t.xp6(1),t.Q6J("ngIf",""!==i.peerConnectionError),t.xp6(3),t.Oqu(""!==i.peerConnectionError?"Retry":"Add Peer"),t.xp6(1),t.Q6J("stepControl",i.channelFormGroup)("editable",i.flgEditable),t.xp6(1),t.Q6J("formGroup",i.channelFormGroup),t.xp6(5),t.Q6J("step",1e3),t.xp6(2),t.hij("Remaining Bal: ",i.totalBalance-(i.channelFormGroup.controls.fundingAmount.value?i.channelFormGroup.controls.fundingAmount.value:0),""),t.xp6(3),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.min),t.xp6(1),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.max),t.xp6(7),t.Q6J("step",1)("min",0),t.xp6(1),t.Q6J("ngIf",""!==i.channelConnectionError),t.xp6(3),t.Oqu(""!==i.channelConnectionError?"Retry":"Open Channel"),t.xp6(3),t.Oqu(null!=i.newlyAddedPeer&&i.newlyAddedPeer.nodeId?"Do It Later":"Close"))},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,T.dn,lt.Vq,lt.C0,m._Y,m.JL,m.sg,lt.VY,y.KE,U.Nt,m.Fj,X.h,m.JJ,m.u,m.Q7,u.O5,y.TO,O.BN,m.wV,y.bx,y.R9,At.Rr,m.qQ,$.q],styles:[""]}),n})();function Fs(n,a){1&n&&t._UZ(0,"mat-progress-bar",37)}function qs(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1," ID "),t.qZA())}const rt=function(n){return{"max-width":n}};function Rs(n,a){if(1&n&&(t.TgZ(0,"td",39),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(2,rt,i.screenSize===i.screenSizeEnum.XS?"10rem":"30rem")),t.xp6(1),t.hij(" ",null==e?null:e.nodeId," ")}}function Ns(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Alias "),t.qZA())}const wt=function(n){return{"mr-0":n}};function ks(n,a){if(1&n&&t._UZ(0,"span",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,wt,e.screenSize===e.screenSizeEnum.XS))}}function Ps(n,a){if(1&n&&t._UZ(0,"span",45),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,wt,e.screenSize===e.screenSizeEnum.XS))}}function Ds(n,a){if(1&n&&(t.TgZ(0,"td",41),t.YNc(1,ks,1,3,"span",42),t.YNc(2,Ps,1,3,"span",43),t._uU(3),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(4,rt,i.screenSize===i.screenSizeEnum.XS?"10rem":"25rem")),t.xp6(1),t.Q6J("ngIf","CONNECTED"===e.state),t.xp6(1),t.Q6J("ngIf","DISCONNECTED"===e.state),t.xp6(1),t.hij(" ",null==e?null:e.alias," ")}}function Us(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1," State "),t.qZA())}function Ms(n,a){if(1&n&&(t.TgZ(0,"td",46),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.state," ")}}function Js(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1," Network Address "),t.qZA())}function Qs(n,a){if(1&n&&(t.TgZ(0,"td",39),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(2,rt,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.hij(" ",null==e?null:e.address," ")}}function Ys(n,a){1&n&&(t.TgZ(0,"th",47),t._uU(1," Channels "),t.qZA())}function Hs(n,a){if(1&n&&(t.TgZ(0,"td",48),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.channels," ")}}function Bs(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",49)(1,"div",50)(2,"mat-select",51),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",52),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function zs(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-option",52),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw().onPeerDetach(o)}),t._uU(1,"Disconnect"),t.qZA()}}function Vs(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-option",52),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw().onConnectPeer(o)}),t._uU(1,"Reconnect"),t.qZA()}}function Gs(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",53)(1,"div",50)(2,"mat-select",51),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",52),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onPeerClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",52),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onOpenChannel(s)}),t._uU(7,"Open Channel"),t.qZA(),t.YNc(8,zs,2,0,"mat-option",54),t.YNc(9,Vs,2,0,"mat-option",54),t.qZA()()()}if(2&n){const e=a.$implicit;t.xp6(8),t.Q6J("ngIf","CONNECTED"===e.state),t.xp6(1),t.Q6J("ngIf","DISCONNECTED"===e.state)}}function Xs(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No connected peer."),t.qZA())}function $s(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting peers..."),t.qZA())}function Ws(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function Ks(n,a){if(1&n&&(t.TgZ(0,"td",55),t.YNc(1,Xs,2,0,"p",56),t.YNc(2,$s,2,0,"p",56),t.YNc(3,Ws,2,1,"p",56),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const js=function(n){return{"display-none":n}};function tl(n,a){if(1&n&&t._UZ(0,"tr",57),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,js,(null==e.peers?null:e.peers.data)&&(null==e.peers||null==e.peers.data?null:e.peers.data.length)>0))}}function el(n,a){1&n&&t._UZ(0,"tr",58)}function nl(n,a){1&n&&t._UZ(0,"tr",59)}const il=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},al=function(){return["no_peer"]};let ol=(()=>{class n{constructor(e,i,o,s,c){this.logger=e,this.store=i,this.rtlEffects=o,this.actions=s,this.commonService=c,this.faUsers=L.FVb,this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","channels","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","address","channels","actions"])}ngOnInit(){this.store.select(C.yD).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="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.kY).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.availableBalance=e.onchainBalance.total||0}),this.actions.pipe((0,h.R)(this.unSubs[3]),(0,J.h)(e=>e.type===l.lr.SET_PEERS_ECL)).subscribe(e=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(e,i){const o=[[{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,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:e.nodeId,message:o}}}))}onConnectPeer(e){this.store.dispatch((0,Z.qR)({payload:{data:{message:{peer:e.nodeId?e:null,information:this.information,balance:this.availableBalance},component:Os}}}))}onOpenChannel(e){this.store.dispatch((0,Z.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:e,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:Zt}}}))}onPeerDetach(e){this.store.dispatch(e.channels>0?(0,Z.qR)({payload:{data:{type:l.n_.ERROR,alertTitle:"Disconnect Not Allowed",titleMessage:"Channel active with this peer."}}}):(0,Z.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(e.alias?e.alias:e.nodeId),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(i=>{i&&this.store.dispatch((0,N.GD)({payload:{nodeId:e.nodeId}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(e){this.peers=new r.by(e?[...e]:[]),this.peers.sort=this.sort,this.peers.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.peers.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.peers.paginator=this.paginator,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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(K.V),t.Y36(z.eX),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-peers"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Peers")}])],decls:42,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["peersForm","ngForm"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","nodeId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","state"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","channels"],["mat-header-cell","","class","px-2","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","px-2",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],["class","dot green","matTooltip","Connected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Disconnected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Connected","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Disconnected","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-cell",""],["mat-header-cell","","mat-sort-header","",1,"px-2"],["mat-cell","",1,"px-2"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"form",1,2)(3,"button",3),t.NdJ("click",function(){return i.onConnectPeer({})}),t._uU(4,"Add Peer"),t.qZA()(),t.TgZ(5,"div",4)(6,"div",5)(7,"div",6),t._UZ(8,"fa-icon",7),t.TgZ(9,"span",8),t._uU(10,"Peers"),t.qZA()(),t.TgZ(11,"mat-form-field",9)(12,"div",10)(13,"input",11),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()()(),t.TgZ(14,"div",12),t.YNc(15,Fs,1,0,"mat-progress-bar",13),t.TgZ(16,"table",14,15),t.ynx(18,16),t.YNc(19,qs,2,0,"th",17),t.YNc(20,Rs,2,4,"td",18),t.BQk(),t.ynx(21,19),t.YNc(22,Ns,2,0,"th",20),t.YNc(23,Ds,4,6,"td",21),t.BQk(),t.ynx(24,22),t.YNc(25,Us,2,0,"th",17),t.YNc(26,Ms,2,1,"td",23),t.BQk(),t.ynx(27,24),t.YNc(28,Js,2,0,"th",17),t.YNc(29,Qs,2,4,"td",18),t.BQk(),t.ynx(30,25),t.YNc(31,Ys,2,0,"th",26),t.YNc(32,Hs,2,1,"td",27),t.BQk(),t.ynx(33,28),t.YNc(34,Bs,6,0,"th",29),t.YNc(35,Gs,10,2,"td",30),t.BQk(),t.ynx(36,31),t.YNc(37,Ks,4,3,"td",32),t.BQk(),t.YNc(38,tl,1,3,"tr",33),t.YNc(39,el,1,0,"tr",34),t.YNc(40,nl,1,0,"tr",35),t.qZA()(),t._UZ(41,"mat-paginator",36),t.qZA()()),2&e&&(t.xp6(8),t.Q6J("icon",i.faUsers),t.xp6(5),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.peers)("ngClass",t.VKq(12,il,""!==i.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,al)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,m._Y,m.JL,m.F,I.lW,O.BN,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,V.gM,P.gD,P.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-nodeId[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:2rem}.mat-column-address[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const sl=["queryRoutesForm"];function ll(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Destination Node ID is required."),t.qZA())}function rl(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function cl(n,a){1&n&&t._UZ(0,"mat-progress-bar",21)}function ul(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Alias "),t.qZA())}function pl(n,a){if(1&n&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.alias," ")}}function ml(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," ID "),t.qZA())}function dl(n,a){if(1&n&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.nodeId," ")}}function hl(n,a){1&n&&(t.TgZ(0,"th",42)(1,"span",43),t._uU(2,"Actions"),t.qZA()())}function _l(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",44)(1,"button",45),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onHopClick(s)}),t._uU(2,"View Info"),t.qZA()()}}function fl(n,a){1&n&&t._UZ(0,"tr",46)}function gl(n,a){1&n&&t._UZ(0,"tr",47)}const Cl=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}};function xl(n,a){if(1&n&&(t.TgZ(0,"div",22)(1,"mat-expansion-panel",23)(2,"mat-expansion-panel-header")(3,"mat-panel-title",24)(4,"span",25),t._uU(5),t.qZA(),t.TgZ(6,"span",26),t._uU(7),t.ALo(8,"number"),t.qZA()()(),t.TgZ(9,"mat-panel-description",27)(10,"div",28)(11,"table",29,30),t.ynx(13,31),t.YNc(14,ul,2,0,"th",32),t.YNc(15,pl,2,1,"td",33),t.BQk(),t.ynx(16,34),t.YNc(17,ml,2,0,"th",32),t.YNc(18,dl,2,1,"td",33),t.BQk(),t.ynx(19,35),t.YNc(20,hl,3,0,"th",36),t.YNc(21,_l,3,0,"td",37),t.BQk(),t.YNc(22,fl,1,0,"tr",38),t.YNc(23,gl,1,0,"tr",39),t.qZA()()()()()),2&n){const e=a.$implicit,i=a.index,o=t.oxw();t.xp6(5),t.hij("Route ",i+1,""),t.xp6(2),t.Oqu(t.lcZ(8,7,e.amount/1e3)),t.xp6(4),t.Q6J("dataSource",o.qrHops[i])("ngClass",t.VKq(9,Cl,"error"===o.flgLoading[0])),t.xp6(11),t.Q6J("matHeaderRowDef",o.displayedColumns)("matHeaderRowDefSticky",o.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",o.displayedColumns)}}let yl=(()=>{class n{constructor(e,i,o){this.store=e,this.eclEffects=i,this.commonService=o,this.allQRoutes=[],this.nodeId="",this.amount=0,this.qrHops=[],this.flgSticky=!1,this.flgLoading=[!1],this.faRoute=L.FpQ,this.faExclamationTriangle=L.eHv,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","actions"])}ngOnInit(){this.qrHops[0]=new r.by([]),this.qrHops[0].data=[],this.eclEffects.setQueryRoutes.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{e&&e.routes&&e.routes.length?(this.flgLoading[0]=!1,this.allQRoutes=e.routes,this.allQRoutes.forEach((i,o)=>{this.qrHops[o]=new r.by([...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,N.WO)({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,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"alias",value:e.alias,title:"Alias",width:100,type:l.Gi.STRING}],[{key:"nodeId",value:e.nodeId,title:"Node ID",width:100,type:l.Gi.STRING}]]}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(at.o),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-query-routes"]],viewQuery:function(e,i){if(1&e&&t.Gf(sl,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:28,vars:10,consts:[["fxLayout","column","fxFlex","100"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Node ID","name","nodeId","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-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","row","fxLayoutAlign","start center",1,"page-sub-title-container","mt-2","mb-1"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["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"],["table[i]",""],["matColumnDef","alias"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","nodeId"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","",1,"pl-4","pr-3"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-4"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(e,i){if(1&e){const o=t.EpF();t.TgZ(0,"div",0)(1,"form",1,2),t.NdJ("ngSubmit",function(){return t.CHM(o),t.MAs(2).form.valid&&i.onQueryRoutes()}),t.TgZ(3,"div",3),t._UZ(4,"fa-icon",4),t.TgZ(5,"span"),t._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),t.qZA()(),t.TgZ(7,"mat-form-field",5)(8,"input",6,7),t.NdJ("ngModelChange",function(c){return i.nodeId=c}),t.qZA(),t.YNc(10,ll,2,0,"mat-error",8),t.qZA(),t.TgZ(11,"mat-form-field",9)(12,"input",10),t.NdJ("ngModelChange",function(c){return i.amount=c}),t.qZA(),t.YNc(13,rl,2,0,"mat-error",8),t.qZA(),t.TgZ(14,"div",11)(15,"button",12),t.NdJ("click",function(){return i.resetData()}),t._uU(16,"Clear"),t.qZA(),t.TgZ(17,"button",13),t._uU(18,"Query Route"),t.qZA()()(),t.TgZ(19,"div",14)(20,"div",15),t._UZ(21,"fa-icon",16),t.TgZ(22,"span",17),t._uU(23,"Transaction Route"),t.qZA()()(),t.YNc(24,cl,1,0,"mat-progress-bar",18),t.TgZ(25,"div",19)(26,"div",0),t.YNc(27,xl,24,11,"div",20),t.qZA()()()}2&e&&(t.xp6(4),t.Q6J("icon",i.faExclamationTriangle),t.xp6(4),t.Q6J("ngModel",i.nodeId),t.xp6(2),t.Q6J("ngIf",!i.nodeId),t.xp6(2),t.Q6J("ngModel",i.amount)("step",1e3)("min",0),t.xp6(1),t.Q6J("ngIf",!i.amount),t.xp6(8),t.Q6J("icon",i.faRoute),t.xp6(3),t.Q6J("ngIf",!0===i.flgLoading[0]),t.xp6(3),t.Q6J("ngForOf",i.allQRoutes))},directives:[p.xw,p.yH,m._Y,m.JL,m.F,p.Wh,O.BN,y.KE,U.Nt,m.Fj,m.Q7,m.JJ,m.On,u.O5,y.TO,m.wV,m.qQ,$.q,I.lW,M.pW,u.sg,H.ib,H.yz,H.yK,H.u4,Q.$V,r.BZ,u.mk,w.oO,r.w1,r.fO,r.ge,r.Dz,r.ev,r.as,r.XQ,r.nj,r.Gk],pipes:[u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{flex:0 0 5%;width:5%}.mat-column-pubkey_alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Ll(n,a){1&n&&t._UZ(0,"mat-progress-bar",29)}function Tl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," State "),t.qZA())}function vl(n,a){if(1&n&&(t.TgZ(0,"span",36),t._UZ(1,"fa-icon",37),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEyeSlash)}}function bl(n,a){if(1&n&&(t.TgZ(0,"span",38),t._UZ(1,"fa-icon",37),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEye)}}const Et=function(n){return{"max-width":n}};function Al(n,a){if(1&n&&(t.TgZ(0,"td",31)(1,"div",32),t.YNc(2,vl,2,1,"span",33),t.YNc(3,bl,2,1,"span",34),t.TgZ(4,"span",35),t._uU(5),t.ALo(6,"titlecase"),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(6,Et,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Q6J("ngIf",0===e.channelFlags),t.xp6(1),t.Q6J("ngIf",0!==e.channelFlags),t.xp6(2),t.Oqu(t.lcZ(6,4,null==e?null:e.state))}}function Zl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," Short Channel ID "),t.qZA())}function Sl(n,a){if(1&n&&(t.TgZ(0,"td",31),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(null==e?null:e.shortChannelId)}}function wl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," Alias "),t.qZA())}function El(n,a){if(1&n&&(t.TgZ(0,"td",31)(1,"div",32)(2,"span",35),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(2,Et,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(2),t.Oqu(e.alias)}}function Il(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Local Balance (Sats) "),t.qZA())}function Ol(n,a){if(1&n&&(t.TgZ(0,"td",31)(1,"span",40),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function Fl(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Remote Balance (Sats) "),t.qZA())}function ql(n,a){if(1&n&&(t.TgZ(0,"td",31)(1,"span",40),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function Rl(n,a){1&n&&(t.TgZ(0,"th",41),t._uU(1,"Balance Score "),t.qZA())}function Nl(n,a){if(1&n&&(t.TgZ(0,"td",42)(1,"div",43)(2,"mat-hint",44),t._uU(3),t.ALo(4,"number"),t.qZA()(),t._UZ(5,"mat-progress-bar",45),t.qZA()),2&n){const e=a.$implicit;t.xp6(3),t.Oqu(t.lcZ(4,2,(null==e?null:e.balancedness)||0)),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function kl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",46)(1,"div",47)(2,"mat-select",48),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",49),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function Pl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",50)(1,"div",51)(2,"mat-select",52),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",49),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",49),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!0)}),t._uU(7,"Force Close"),t.qZA()()()()}}function Dl(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No inactive channel available."),t.qZA())}function Ul(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting inactive channels..."),t.qZA())}function Ml(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function Jl(n,a){if(1&n&&(t.TgZ(0,"td",53),t.YNc(1,Dl,2,0,"p",54),t.YNc(2,Ul,2,0,"p",54),t.YNc(3,Ml,2,1,"p",54),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const Ql=function(n){return{"display-none":n}};function Yl(n,a){if(1&n&&t._UZ(0,"tr",55),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Ql,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function Hl(n,a){1&n&&t._UZ(0,"tr",56)}function Bl(n,a){1&n&&t._UZ(0,"tr",57)}const zl=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Vl=function(){return["no_channel"]};let Gl=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.rtlEffects=o,this.commonService=s,this.faEye=L.Mdf,this.faEyeSlash=L.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS||this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","balancedness","actions"])}ngOnInit(){this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="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.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.inactiveChannels.length>0&&this.loadChannelsTable()}onChannelClose(e,i){this.store.dispatch((0,Z.c1)({payload:{data:{type:l.n_.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,h.R)(this.unSubs[4])).subscribe(f=>{f&&this.store.dispatch((0,N.BL)({payload:{channelId:e.channelId,force:i}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLocaleLowerCase()}onChannelClick(e,i){this.store.dispatch((0,Z.qR)({payload:{data:{channel:e,channelsType:"inactive",component:st}}}))}loadChannelsTable(){this.inactiveChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...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.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(K.V),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-inactive-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Channels")}])],decls:36,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","shortChannelId"],["matColumnDef","alias"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3)(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()(),t.TgZ(5,"div",5),t.YNc(6,Ll,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,Tl,2,0,"th",10),t.YNc(11,Al,7,8,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,Zl,2,0,"th",10),t.YNc(14,Sl,2,1,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,wl,2,0,"th",10),t.YNc(17,El,4,4,"td",11),t.BQk(),t.ynx(18,14),t.YNc(19,Il,2,0,"th",15),t.YNc(20,Ol,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,Fl,2,0,"th",15),t.YNc(23,ql,4,4,"td",11),t.BQk(),t.ynx(24,17),t.YNc(25,Rl,2,0,"th",18),t.YNc(26,Nl,6,4,"td",19),t.BQk(),t.ynx(27,20),t.YNc(28,kl,6,0,"th",21),t.YNc(29,Pl,8,0,"td",22),t.BQk(),t.ynx(30,23),t.YNc(31,Jl,4,3,"td",24),t.BQk(),t.YNc(32,Yl,1,3,"tr",25),t.YNc(33,Hl,1,0,"tr",26),t.YNc(34,Bl,1,0,"tr",27),t.qZA()(),t._UZ(35,"mat-paginator",28),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,zl,""!==i.errorMessage)),t.xp6(25),t.Q6J("matFooterRowDef",t.DdM(13,Vl)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,V.gM,O.BN,y.bx,P.gD,P.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.rS,u.JJ],styles:[".mat-column-state[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-state[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 20%;width:20%}.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})(),Xl=(()=>{class n{transform(e,i){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(o,s)=>o.toUpperCase()).replace(/\s+/g,"").replace(/-/g," ")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=t.Yjl({name:"camelcase",type:n,pure:!0}),n})();function $l(n,a){if(1&n&&(t.TgZ(0,"div",5),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function Wl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",6),t._UZ(1,"div",7),t.TgZ(2,"mat-form-field",8)(3,"input",9),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().filterValue=o})("input",function(){return t.CHM(e),t.oxw().applyFilter()})("keyup",function(){return t.CHM(e),t.oxw().applyFilter()}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.filterValue)}}function Kl(n,a){1&n&&t._UZ(0,"mat-progress-bar",32)}function jl(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"Date/Time"),t.qZA())}const tr=function(n){return{"ml-0":n}};function er(n,a){if(1&n&&(t._UZ(0,"span",36),t.ALo(1,"camelcase")),2&n){const e=t.oxw().$implicit,i=t.oxw(2);t.s9C("matTooltip",t.lcZ(1,2,null==e?null:e.type)),t.Q6J("ngClass",t.VKq(4,tr,i.screenSize===i.screenSizeEnum.XS))}}function nr(n,a){if(1&n&&(t.TgZ(0,"td",34),t.YNc(1,er,2,6,"span",35),t._uU(2),t.ALo(3,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf","payment-relayed"!==(null==e?null:e.type)),t.xp6(1),t.hij(" ",t.xi3(3,2,null==e?null:e.timestamp,"dd/MMM/y HH:mm")," ")}}function ir(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"In Channel"),t.qZA())}const It=function(n){return{"max-width":n}};function ar(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,It,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Oqu(null==e?null:e.fromChannelAlias)}}function or(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"Out Channel"),t.qZA())}function sr(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,It,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Oqu(null==e?null:e.toChannelAlias)}}function lr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount In (Sats)"),t.qZA())}function rr(n,a){if(1&n&&(t.TgZ(0,"td",34)(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.amountIn))}}function cr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount Out (Sats)"),t.qZA())}function ur(n,a){if(1&n&&(t.TgZ(0,"td",34)(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.amountOut))}}function pr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Fee Earned (Sats)"),t.qZA())}function mr(n,a){if(1&n&&(t.TgZ(0,"td",34)(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,(null==e?null:e.amountIn)-(null==e?null:e.amountOut)))}}function dr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",40)(1,"div",41)(2,"mat-select",42),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",43),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function hr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",44)(1,"button",45),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw(2).onForwardingEventClick(c,o)}),t._uU(2,"View Info"),t.qZA()()}}function _r(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No forwarding history available."),t.qZA())}function fr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting forwarding history..."),t.qZA())}function gr(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Cr(n,a){if(1&n&&(t.TgZ(0,"td",46),t.YNc(1,_r,2,0,"p",47),t.YNc(2,fr,2,0,"p",47),t.YNc(3,gr,2,1,"p",47),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const xr=function(n){return{"display-none":n}};function yr(n,a){if(1&n&&t._UZ(0,"tr",48),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,xr,(null==e.forwardingHistoryEvents?null:e.forwardingHistoryEvents.data)&&(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)>0))}}function Lr(n,a){1&n&&t._UZ(0,"tr",49)}function Tr(n,a){1&n&&t._UZ(0,"tr",50)}const vr=function(){return["no_event"]};function br(n,a){if(1&n&&(t.TgZ(0,"div",10),t.YNc(1,Kl,1,0,"mat-progress-bar",11),t.TgZ(2,"table",12,13),t.ynx(4,14),t.YNc(5,jl,2,0,"th",15),t.YNc(6,nr,4,5,"td",16),t.BQk(),t.ynx(7,17),t.YNc(8,ir,2,0,"th",15),t.YNc(9,ar,2,4,"td",18),t.BQk(),t.ynx(10,19),t.YNc(11,or,2,0,"th",15),t.YNc(12,sr,2,4,"td",18),t.BQk(),t.ynx(13,20),t.YNc(14,lr,2,0,"th",21),t.YNc(15,rr,4,3,"td",16),t.BQk(),t.ynx(16,22),t.YNc(17,cr,2,0,"th",21),t.YNc(18,ur,4,3,"td",16),t.BQk(),t.ynx(19,23),t.YNc(20,pr,2,0,"th",21),t.YNc(21,mr,4,3,"td",16),t.BQk(),t.ynx(22,24),t.YNc(23,dr,6,0,"th",25),t.YNc(24,hr,3,0,"td",26),t.BQk(),t.ynx(25,27),t.YNc(26,Cr,4,3,"td",28),t.BQk(),t.YNc(27,yr,1,3,"tr",29),t.YNc(28,Lr,1,0,"tr",30),t.YNc(29,Tr,1,0,"tr",31),t.qZA()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.forwardingHistoryEvents),t.xp6(25),t.Q6J("matFooterRowDef",t.DdM(6,vr)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns)}}function Ar(n,a){if(1&n&&t._UZ(0,"mat-paginator",51),2&n){const e=t.oxw();t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let Ot=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.datePipe=s,this.eventsData=[],this.filterValue="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","fee","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","amountOut","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","fromChannelAlias","toChannelAlias","amountIn","amountOut","fee","actions"])}ngOnInit(){this.store.select(C.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{0===this.eventsData.length&&(this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="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.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.eventsData),this.logger.info(this.eventsData))})}ngAfterViewInit(){this.eventsData.length>0&&this.loadForwardingEventsTable(this.eventsData)}ngOnChanges(e){e.eventsData&&(this.apiCallStatus={status:l.Bn.COMPLETED,action:"FetchPayments"},this.eventsData=e.eventsData.currentValue,e.eventsData.firstChange||this.loadForwardingEventsTable(this.eventsData)),e.filterValue&&!e.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(e,i){const o=[[{key:"paymentHash",value:e.paymentHash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"timestamp",value:Math.round(e.timestamp/1e3),title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"fee",value:e.amountIn-e.amountOut,title:"Fee Earned (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"amountIn",value:e.amountIn,title:"Amount In (Sats)",width:50,type:l.Gi.NUMBER},{key:"amountOut",value:e.amountOut,title:"Amount Out (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"fromChannelAlias",value:e.fromChannelAlias,title:"From Channel Alias",width:50,type:l.Gi.STRING},{key:"fromShortChannelId",value:e.fromShortChannelId,title:"From Short Channel ID",width:50,type:l.Gi.STRING}],[{key:"fromChannelId",value:e.fromChannelId,title:"From Channel Id",width:100,type:l.Gi.STRING}],[{key:"toChannelAlias",value:e.toChannelAlias,title:"To Channel Alias",width:50,type:l.Gi.STRING},{key:"toShortChannelId",value:e.toShortChannelId,title:"To Short Channel ID",width:50,type:l.Gi.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"To Channel Id",width:100,type:l.Gi.STRING}]];"payment-relayed"!==e.type&&o.unshift([{key:"type",value:this.commonService.camelCase(e.type),title:"Relay Type",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Event Information",message:o}}}))}loadForwardingEventsTable(e){this.forwardingHistoryEvents=new r.by([...e]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(i,o)=>"fee"===o?i.amountIn-i.amountOut:i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.forwardingHistoryEvents.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.forwardingHistoryEvents.paginator=this.paginator,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")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-forwarding-history"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Events")}]),t.TTD],decls:5,vars:4,consts:[["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","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["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,"dataSource"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromChannelAlias"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","toChannelAlias"],["matColumnDef","amountIn"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amountOut"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot yellow","matTooltipPosition","right",3,"matTooltip","ngClass",4,"ngIf"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip","ngClass"],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,$l,2,1,"div",1),t.YNc(2,Wl,4,1,"div",2),t.YNc(3,br,30,7,"div",3),t.YNc(4,Ar,1,3,"mat-paginator",4),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",""!==i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,M.pW,r.BZ,v.YE,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,V.gM,u.mk,w.oO,u.PC,w.Zl,P.gD,P.$L,Y.ey,I.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[Xl,u.uU,u.JJ],styles:[".mat-column-fromAlias[_ngcontent-%COMP%]{padding-left:2rem;flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-toAlias[_ngcontent-%COMP%]{padding-left:1rem;flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const Zr=["tableIn"],Sr=["tableOut"],wr=["paginatorIn"],Er=["paginatorOut"];function Ir(n,a){if(1&n&&(t.TgZ(0,"div",3),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function Or(n,a){1&n&&t._UZ(0,"mat-progress-bar",36)}function Fr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Channel ID"),t.qZA())}const tt=function(n){return{"max-width":n}};function qr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,tt,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.channelId)}}function Rr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Peer Alias"),t.qZA())}function Nr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,tt,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.alias)}}function kr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Events"),t.qZA())}function Pr(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.events))}}function Dr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Amount (Sats)"),t.qZA())}function Ur(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalAmount))}}function Mr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Fee (Sats)"),t.qZA())}function Jr(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalFee))}}function Qr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No incoming routing peer available."),t.qZA())}function Yr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting incoming routing peers..."),t.qZA())}function Hr(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Br(n,a){if(1&n&&(t.TgZ(0,"td",42),t.YNc(1,Qr,2,0,"p",43),t.YNc(2,Yr,2,0,"p",43),t.YNc(3,Hr,2,1,"p",43),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const Ft=function(n){return{"display-none":n}};function zr(n,a){if(1&n&&t._UZ(0,"tr",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Ft,(null==e.RoutingPeersIncoming?null:e.RoutingPeersIncoming.data)&&(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)>0))}}function Vr(n,a){1&n&&t._UZ(0,"tr",45)}function Gr(n,a){1&n&&t._UZ(0,"tr",46)}function Xr(n,a){1&n&&t._UZ(0,"mat-progress-bar",36)}function $r(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Channel ID"),t.qZA())}function Wr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,tt,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.channelId)}}function Kr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Peer Alias"),t.qZA())}function jr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,tt,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.alias)}}function tc(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Events"),t.qZA())}function ec(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.events))}}function nc(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Amount (Sats)"),t.qZA())}function ic(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalAmount))}}function ac(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Fee (Sats)"),t.qZA())}function oc(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalFee))}}function sc(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No outgoing routing peer available."),t.qZA())}function lc(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting outgoing routing peers..."),t.qZA())}function rc(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function cc(n,a){if(1&n&&(t.TgZ(0,"td",42),t.YNc(1,sc,2,0,"p",43),t.YNc(2,lc,2,0,"p",43),t.YNc(3,rc,2,1,"p",43),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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 uc(n,a){if(1&n&&t._UZ(0,"tr",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Ft,(null==e.RoutingPeersOutgoing?null:e.RoutingPeersOutgoing.data)&&(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)>0))}}function pc(n,a){1&n&&t._UZ(0,"tr",45)}function mc(n,a){1&n&&t._UZ(0,"tr",46)}const dc=function(n,a){return{"mt-2":n,"mt-1":a}},hc=function(){return["no_incoming_event"]},_c=function(n){return{"mt-2":n}},fc=function(){return["no_outgoing_event"]};function gc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7),t._uU(4,"Incoming"),t.qZA(),t.TgZ(5,"mat-form-field",8)(6,"input",9),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyIncomingFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().filterIn=o}),t.qZA()()(),t.TgZ(7,"div",10),t.YNc(8,Or,1,0,"mat-progress-bar",11),t.TgZ(9,"table",12,13),t.ynx(11,14),t.YNc(12,Fr,2,0,"th",15),t.YNc(13,qr,2,4,"td",16),t.BQk(),t.ynx(14,17),t.YNc(15,Rr,2,0,"th",15),t.YNc(16,Nr,2,4,"td",16),t.BQk(),t.ynx(17,18),t.YNc(18,kr,2,0,"th",19),t.YNc(19,Pr,4,3,"td",20),t.BQk(),t.ynx(20,21),t.YNc(21,Dr,2,0,"th",19),t.YNc(22,Ur,4,3,"td",20),t.BQk(),t.ynx(23,22),t.YNc(24,Mr,2,0,"th",19),t.YNc(25,Jr,4,3,"td",20),t.BQk(),t.ynx(26,23),t.YNc(27,Br,4,3,"td",24),t.BQk(),t.YNc(28,zr,1,3,"tr",25),t.YNc(29,Vr,1,0,"tr",26),t.YNc(30,Gr,1,0,"tr",27),t.qZA()(),t._UZ(31,"mat-paginator",28,29),t.qZA(),t.TgZ(33,"div",30)(34,"div",6)(35,"div",7),t._uU(36,"Outgoing"),t.qZA(),t.TgZ(37,"mat-form-field",8)(38,"input",9),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyOutgoingFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().filterOut=o}),t.qZA()()(),t.TgZ(39,"div",31),t.YNc(40,Xr,1,0,"mat-progress-bar",11),t.TgZ(41,"table",32,33),t.ynx(43,14),t.YNc(44,$r,2,0,"th",15),t.YNc(45,Wr,2,4,"td",16),t.BQk(),t.ynx(46,17),t.YNc(47,Kr,2,0,"th",15),t.YNc(48,jr,2,4,"td",16),t.BQk(),t.ynx(49,18),t.YNc(50,tc,2,0,"th",19),t.YNc(51,ec,4,3,"td",20),t.BQk(),t.ynx(52,21),t.YNc(53,nc,2,0,"th",19),t.YNc(54,ic,4,3,"td",20),t.BQk(),t.ynx(55,22),t.YNc(56,ac,2,0,"th",19),t.YNc(57,oc,4,3,"td",20),t.BQk(),t.ynx(58,34),t.YNc(59,cc,4,3,"td",24),t.BQk(),t.YNc(60,uc,1,3,"tr",25),t.YNc(61,pc,1,0,"tr",26),t.YNc(62,mc,1,0,"tr",27),t.qZA(),t._UZ(63,"mat-paginator",28,35),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngClass",t.WLB(22,dc,e.screenSize===e.screenSizeEnum.XS,e.screenSize===e.screenSizeEnum.SM)),t.xp6(4),t.Q6J("ngModel",e.filterIn),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.RoutingPeersIncoming),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(25,hc)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS),t.xp6(3),t.Q6J("ngClass",t.VKq(26,_c,e.screenSize!==e.screenSizeEnum.LG)),t.xp6(4),t.Q6J("ngModel",e.filterOut),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.RoutingPeersOutgoing),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(28,fc)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let Cc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.routingPeersData=[],this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","totalFee"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalFee"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalAmount","totalFee"]):(this.flgSticky=!0,this.displayedColumns=["channelId","alias","events","totalAmount","totalFee"])}ngOnInit(){this.store.select(C.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage="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)}loadRoutingPeersTable(e){if(e.length>0){const i=this.groupRoutingPeers(e);this.RoutingPeersIncoming=new r.by(i[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new r.by(i[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter()}groupRoutingPeers(e){const i=[],o=[];return e.forEach(s=>{const c=i.find(F=>F.channelId===s.fromChannelId),f=o.find(F=>F.channelId===s.toChannelId);c?(c.events++,c.totalAmount=+c.totalAmount+ +s.amountIn,c.totalFee=s.amountIn-s.amountOut+ +c.totalFee):i.push({channelId:s.fromChannelId,alias:s.fromChannelAlias,events:1,totalAmount:+s.amountIn,totalFee:s.amountIn-s.amountOut}),f?(f.events++,f.totalAmount=+f.totalAmount+ +s.amountOut,f.totalFee=s.amountIn-s.amountOut+ +f.totalFee):o.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(o,"totalFee")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-routing-peers"]],viewQuery:function(e,i){if(1&e&&(t.Gf(Zr,5,v.YE),t.Gf(Sr,5,v.YE),t.Gf(wr,5),t.Gf(Er,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sortIn=o.first),t.iGM(o=t.CRH())&&(i.sortOut=o.first),t.iGM(o=t.CRH())&&(i.paginatorIn=o.first),t.iGM(o=t.CRH())&&(i.paginatorOut=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Peers")}])],decls:3,vars:2,consts:[["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",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"],["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","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource"],["tableIn",""],["matColumnDef","channelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalAmount"],["matColumnDef","totalFee"],["matColumnDef","no_incoming_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","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,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ir,2,1,"div",1),t.YNc(2,gc,65,29,"div",2),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",""!==i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,u.mk,w.oO,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,M.pW,r.BZ,v.YE,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.JJ],styles:[".mat-column-channelId[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function xc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",7),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let yc=(()=>{class n{constructor(e){this.router=e,this.faChartBar=L.koM,this.links=[{link:"routingreport",name:"Routing"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Reports"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),t.YNc(8,xc,2,3,"div",6),t.qZA(),t._UZ(9,"router-outlet"),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartBar),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,k.BU,u.sg,k.Nj,x.rH,x.lC],styles:[""]}),n})();var qt=_(7772),Rt=_(7671),Nt=_(1210);function Lc(n,a){if(1&n&&(t.TgZ(0,"div",13),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw();t.Q6J("@fadeIn",e.totalFeeSat),t.xp6(1),t.AsE("",t.xi3(2,3,e.totalFeeSat||0,"1.0-2")," Sats/",t.lcZ(3,6,e.filteredEventsBySelectedPeriod.length||0)," Events")}}function Tc(n,a){1&n&&(t.TgZ(0,"div",14),t._uU(1,"No routing report for the selected period"),t.qZA())}function vc(n,a){if(1&n&&(t.TgZ(0,"span")(1,"span",17),t._uU(2),t.ALo(3,"number"),t.qZA(),t.TgZ(4,"span",17),t._uU(5),t.ALo(6,"number"),t.qZA()()),2&n){const e=a.model,i=t.oxw(2);t.xp6(2),t.hij("Events: ",t.lcZ(3,2,(i.selReportBy===i.reportBy.EVENTS?e.value:e.extra.totalEvents)||0),""),t.xp6(3),t.hij("Fee: ",t.xi3(6,4,(i.selReportBy===i.reportBy.EVENTS?e.extra.totalFees:e.value)||0,"1.0-2"),"")}}function bc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ngx-charts-bar-vertical",15),t.NdJ("select",function(o){return t.CHM(e),t.oxw().onChartBarSelected(o)})("mouseup",function(o){return t.CHM(e),t.oxw().onChartMouseUp(o)}),t.YNc(1,vc,7,7,"ng-template",null,16,t.W1O),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("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 Ac(n,a){if(1&n&&t._UZ(0,"rtl-ecl-forwarding-history",18),2&n){const e=t.oxw();t.Q6J("eventsData",e.filteredEventsBySelectedPeriod)("filterValue",e.eventFilterValue)}}let Zc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.reportBy=l.Xr,this.selReportBy=l.Xr.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.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(C.PP).pipe((0,h.R)(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,h.R)(this.unSubs[1])).subscribe(e=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=e.width/10;break;case l.cu.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 o=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(c=>{Math.floor(c.timestamp/1e3)>=o&&Math.floor(c.timestamp/1e3)0&&"ngx-charts"===e.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(e){this.eventFilterValue=this.reportPeriod===l.op[1]?e.name+"/"+this.startDate.getFullYear():e.name.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(e){const i=Math.round(e.getTime()/1e3),o=[];if(this.totalFeeSat=0,this.logger.info("Fee Report Prepare Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()),this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(s=>{const c=new Date(s.timestamp).getMonth();return o[c].value=o[c].value+(s.amountIn-s.amountOut),o[c].extra.totalEvents=o[c].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}else{for(let s=0;s{const c=Math.floor((Math.floor(s.timestamp/1e3)-i)/this.secondsInADay);return o[c].value=o[c].value+(s.amountIn-s.amountOut),o[c].extra.totalEvents=o[c].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}return this.logger.info("Fee Report Prepare Finished at "+new Date(Date.now()).toLocaleString()),o}prepareEventsReport(e){const i=Math.round(e.getTime()/1e3),o=[];if(this.totalFeeSat=0,this.logger.info("Events Report Prepare Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()),this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalFees:0}});this.filteredEventsBySelectedPeriod.map(s=>{const c=new Date(s.timestamp).getMonth();return o[c].value=o[c].value+1,o[c].extra.totalFees=o[c].extra.totalFees+(s.amountIn-s.amountOut),this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}else{for(let s=0;s{const c=Math.floor((Math.floor(s.timestamp/1e3)-i)/this.secondsInADay);return o[c].value=o[c].value+1,o[c].extra.totalFees=o[c].extra.totalFees+(s.amountIn-s.amountOut),this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}return this.logger.info("Events Report Prepare Finished at "+new Date(Date.now()).toLocaleString()),o}onSelectionChange(e){const i=e.selDate.getMonth(),o=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(e,i){return 1===e&&i%4==0?l.gg[e].days+1:l.gg[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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-routing-report"]],hostBindings:function(e,i){1&e&&t.NdJ("mouseup",function(s){return i.onChartMouseUp(s)})},decls:17,vars:7,consts:[["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 start",1,"my-1",3,"ngModel","ngModelChange","change"],[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,"eventsData","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),t.NdJ("stepChanged",function(s){return i.onSelectionChange(s)}),t.qZA(),t.TgZ(2,"div",2)(3,"mat-radio-group",3),t.NdJ("ngModelChange",function(s){return i.selReportBy=s})("change",function(){return i.onSelReportByChange()}),t.TgZ(4,"span",4),t._uU(5,"Report By: "),t.qZA(),t.TgZ(6,"mat-radio-button",5),t._uU(7,"Fees"),t.qZA(),t.TgZ(8,"mat-radio-button",6),t._uU(9,"Events"),t.qZA()()(),t.TgZ(10,"div",7),t.YNc(11,Lc,4,8,"div",8),t.YNc(12,Tc,2,0,"div",9),t.TgZ(13,"div",10),t.YNc(14,bc,3,11,"ngx-charts-bar-vertical",11),t.qZA(),t.TgZ(15,"div",10),t.YNc(16,Ac,1,2,"rtl-ecl-forwarding-history",12),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ngModel",i.selReportBy),t.xp6(3),t.s9C("value",i.reportBy.FEES),t.xp6(2),t.s9C("value",i.reportBy.EVENTS),t.xp6(3),t.Q6J("ngIf",i.routingReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),t.xp6(1),t.Q6J("ngIf",i.routingReportData.length<=0||i.filteredEventsBySelectedPeriod.length<=0),t.xp6(2),t.Q6J("ngIf",i.routingReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),t.xp6(2),t.Q6J("ngIf",i.filteredEventsBySelectedPeriod.length>0))},directives:[p.xw,p.Wh,p.yH,Rt.D,j.VQ,m.JJ,m.On,j.U0,u.O5,Nt.K$,Ot],pipes:[u.JJ],styles:[""],data:{animation:[qt.J]}}),n})();var Sc=_(165);function wc(n,a){if(1&n&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.AsE(" Paid ",t.xi3(2,2,e.transactionsReportSummary.amountPaidSelectedPeriod||0,"1.0-2")," Sats/",t.lcZ(3,5,e.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function Ec(n,a){if(1&n&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.AsE(" Received ",t.xi3(2,2,e.transactionsReportSummary.amountReceivedSelectedPeriod||0,"1.0-2")," Sats/",t.lcZ(3,5,e.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function Ic(n,a){if(1&n&&(t.TgZ(0,"div",8),t.YNc(1,wc,4,7,"div",9),t.YNc(2,Ec,4,7,"div",9),t.qZA()),2&n){const e=t.oxw();t.Q6J("@fadeIn",e.transactionsReportSummary),t.xp6(1),t.Q6J("ngIf",e.transactionsReportSummary.paymentsSelectedPeriod),t.xp6(1),t.Q6J("ngIf",e.transactionsReportSummary.invoicesSelectedPeriod)}}function Oc(n,a){1&n&&(t.TgZ(0,"div",11),t._uU(1,"No transactions report for the selected period"),t.qZA())}function Fc(n,a){if(1&n&&(t.TgZ(0,"span",14),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=a.model;t.xp6(1),t.HOy("",e.name,": ",t.xi3(2,4,e.value||0,"1.0-2"),"/# ","Paid"===e.name?"Payments":"Invoices",": ",t.lcZ(3,7,(null==e.extra?null:e.extra.total)||0),"")}}function qc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ngx-charts-bar-vertical-2d",12),t.NdJ("select",function(o){return t.CHM(e),t.oxw().onChartBarSelected(o)})("mouseup",function(o){return t.CHM(e),t.oxw().onChartMouseUp(o)}),t.YNc(1,Fc,4,9,"ng-template",null,13,t.W1O),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("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 Rc(n,a){if(1&n&&t._UZ(0,"rtl-transactions-report-table",15),2&n){const e=t.oxw();t.Q6J("dataList",e.transactionsNonZeroReportData)("dataRange",e.reportPeriod)("filterValue",e.transactionFilterValue)}}let Nc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.scrollRanges=l.op,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[],this.transactionsNonZeroReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Amount (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(C.PP).pipe((0,h.R)(this.unSubs[0]),(0,et.M)(this.store.select(C.Ef))).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,h.R)(this.unSubs[1])).subscribe(e=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=e.width/10;break;case l.cu.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.op[1]?e.series.toString()+"/"+this.startDate.getFullYear():e.series.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(e,i){const o=Math.round(e.getTime()/1e3),s=Math.round(i.getTime()/1e3),c=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const f=this.payments.filter(g=>Math.floor(g.firstPartTimestamp/1e3)>=o&&Math.floor(g.firstPartTimestamp/1e3)"received"===g.status&&g.timestamp>=o&&g.timestamp{const b=new Date(g.firstPartTimestamp).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+g.recipientAmount,c[b].series[0].value=c[b].series[0].value+g.recipientAmount,c[b].series[0].extra.total=c[b].series[0].extra.total+1,this.transactionsReportSummary}),F.map(g=>{const b=new Date(1e3*g.timestamp).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+g.amountSettled,c[b].series[1].value=c[b].series[1].value+g.amountSettled,c[b].series[1].extra.total=c[b].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let g=0;g{const b=Math.floor((Math.floor(g.firstPartTimestamp/1e3)-o)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+g.recipientAmount,c[b].series[0].value=c[b].series[0].value+g.recipientAmount,c[b].series[0].extra.total=c[b].series[0].extra.total+1,this.transactionsReportSummary}),F.map(g=>{const b=Math.floor((g.timestamp-o)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+g.amountSettled,c[b].series[1].value=c[b].series[1].value+g.amountSettled,c[b].series[1].extra.total=c[b].series[1].extra.total+1,this.transactionsReportSummary})}return c}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(),o=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),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.gg[e].days+1:l.gg[e].days}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-transactions-report"]],hostBindings:function(e,i){1&e&&t.NdJ("mouseup",function(s){return i.onChartMouseUp(s)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[3,"dataList","dataRange","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"dataList","dataRange","filterValue"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),t.NdJ("stepChanged",function(s){return i.onSelectionChange(s)}),t.qZA(),t.TgZ(2,"div",2),t.YNc(3,Ic,3,3,"div",3),t.YNc(4,Oc,2,0,"div",4),t.TgZ(5,"div",5),t.YNc(6,qc,3,13,"ngx-charts-bar-vertical-2d",6),t.qZA(),t.TgZ(7,"div",5),t.YNc(8,Rc,1,3,"rtl-transactions-report-table",7),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),t.xp6(1),t.Q6J("ngIf",i.transactionsNonZeroReportData.length<=0),t.xp6(2),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),t.xp6(2),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0))},directives:[p.xw,p.Wh,p.yH,Rt.D,u.O5,Nt.H5,Sc.g],pipes:[u.JJ],styles:[""],data:{animation:[qt.J]}}),n})();var E=_(1643),kc=_(9442);function Pc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",8),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}const Mc=x.Bz.forChild([{path:"",component:ut,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:Ri,canActivate:[E.fY]},{path:"onchain",component:fa,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"receive"},{path:"receive",component:Ba,canActivate:[E.fY]},{path:"send",component:za,canActivate:[E.fY]}]},{path:"connections",component:xa,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:uo,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:Ko,canActivate:[E.fY]},{path:"pending",component:ys,canActivate:[E.fY]},{path:"inactive",component:Gl,canActivate:[E.fY]}]},{path:"peers",component:ol,data:{sweepAll:!1},canActivate:[E.fY]}]},{path:"transactions",component:La,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:gt,canActivate:[E.fY]},{path:"invoices",component:_t,canActivate:[E.fY]}]},{path:"routing",component:va,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:Ot,canActivate:[E.fY]},{path:"peers",component:Cc,canActivate:[E.fY]}]},{path:"reports",component:yc,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"routingreport"},{path:"routingreport",component:Zc,canActivate:[E.fY]},{path:"transactions",component:Nc,canActivate:[E.fY]}]},{path:"graph",component:(()=>{class n{constructor(e){this.router=e,this.faSearch=L.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-graph"]],decls:11,vars:2,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Graph Lookups"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),t.YNc(8,Pc,2,3,"div",6),t.qZA(),t.TgZ(9,"div",7),t._UZ(10,"router-outlet"),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faSearch),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,k.BU,u.sg,k.Nj,x.rH,p.yH,x.lC],styles:[""]}),n})(),canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:Ya,canActivate:[E.fY]},{path:"queryroutes",component:yl,canActivate:[E.fY]}]},{path:"**",component:kc.w}]}]);var Jc=_(8750);let Qc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n,bootstrap:[ut]}),n.\u0275inj=t.cJS({providers:[E.fY],imports:[[u.ez,Jc.m,Mc]]}),n})()}}]); \ No newline at end of file diff --git a/frontend/924.6a3e6171c436f405.js b/frontend/924.6a3e6171c436f405.js new file mode 100644 index 00000000..7c498455 --- /dev/null +++ b/frontend/924.6a3e6171c436f405.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[924],{7924:(Bc,pt,_)=>{_.r(pt),_.d(pt,{ECLModule:()=>Hc});var u=_(9808),x=_(1402),Dt=_(8878),t=_(5e3),p=_(7093),M=_(5899);function Ut(n,a){1&n&&t._UZ(0,"mat-progress-bar",3)}let mt=(()=>{class n{constructor(e){this.router=e,this.loading=!1,this.router.events.subscribe(i=>{switch(!0){case i instanceof x.OD:this.loading=!0;break;case i instanceof x.m2:case i instanceof x.gk:case i instanceof x.Q3:this.loading=!1}})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-root"]],decls:4,vars:1,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"inner-sidenav-content"],["color","primary","mode","indeterminate",4,"ngIf"],["outlet","outlet"],["color","primary","mode","indeterminate"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Ut,1,0,"mat-progress-bar",1),t._UZ(2,"router-outlet",null,2),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",i.loading))},directives:[p.xw,p.yH,p.Wh,u.O5,M.pW,x.lC],styles:[""],data:{animation:[Dt.g]}}),n})();var d=_(7579),h=_(2722),et=_(1365),dt=_(534),L=_(801),l=_(7731),C=_(2501),q=_(5043),S=_(5620),R=_(62),O=_(9444),ht=_(3954),T=_(9224),I=_(7423),nt=_(2181),_t=_(5245),w=_(3322);const ft=function(n){return{backgroundColor:n}};function Mt(n,a){if(1&n&&t._UZ(0,"span",6),2&n){const e=t.oxw();t.Q6J("ngStyle",t.VKq(1,ft,null==e.information?null:e.information.color))}}function Jt(n,a){if(1&n&&(t.TgZ(0,"div")(1,"h4",1),t._uU(2,"Color"),t.qZA(),t.TgZ(3,"div",2),t._UZ(4,"span",7),t._uU(5),t.ALo(6,"uppercase"),t.qZA()()),2&n){const e=t.oxw();t.xp6(4),t.Q6J("ngStyle",t.VKq(4,ft,null==e.information?null:e.information.color)),t.xp6(1),t.hij(" ",t.lcZ(6,2,null==e.information?null:e.information.color)," ")}}function Qt(n,a){if(1&n&&(t.TgZ(0,"span",2),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}let Yt=(()=>{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"))}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-node-info"]],inputs:{information:"information",showColorFieldSeparately:"showColorFieldSeparately"},features:[t.TTD],decls:17,vars:5,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],[1,"dashboard-info-title"],[1,"overflow-wrap","dashboard-info-value"],["class","dashboard-node-dot dot",3,"ngStyle",4,"ngIf"],[4,"ngIf"],["class","overflow-wrap dashboard-info-value",4,"ngFor","ngForOf"],[1,"dashboard-node-dot","dot",3,"ngStyle"],[1,"dashboard-node-square",3,"ngStyle"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div")(2,"h4",1),t._uU(3,"Alias"),t.qZA(),t.TgZ(4,"div",2),t._uU(5),t.YNc(6,Mt,1,3,"span",3),t.qZA()(),t.YNc(7,Jt,7,6,"div",4),t.TgZ(8,"div")(9,"h4",1),t._uU(10,"Implementation"),t.qZA(),t.TgZ(11,"div",2),t._uU(12),t.qZA()(),t.TgZ(13,"div")(14,"h4",1),t._uU(15,"Chain"),t.qZA(),t.YNc(16,Qt,2,1,"span",5),t.qZA()()),2&e&&(t.xp6(5),t.hij(" ",null==i.information?null:i.information.alias," "),t.xp6(1),t.Q6J("ngIf",!i.showColorFieldSeparately),t.xp6(1),t.Q6J("ngIf",i.showColorFieldSeparately),t.xp6(5),t.Oqu(null!=i.information&&i.information.lnImplementation||null!=i.information&&i.information.version?(null==i.information?null:i.information.lnImplementation)+" "+(null==i.information?null:i.information.version):""),t.xp6(4),t.Q6J("ngForOf",i.chains))},directives:[p.xw,p.yH,p.Wh,u.O5,u.PC,w.Zl,u.sg],pipes:[u.gd],styles:[""]}),n})();function Ht(n,a){if(1&n&&(t.TgZ(0,"div",2)(1,"div")(2,"h4",3),t._uU(3,"Lightning"),t.qZA(),t.TgZ(4,"div",4),t._uU(5),t.ALo(6,"number"),t.qZA(),t._UZ(7,"mat-progress-bar",5),t.qZA(),t.TgZ(8,"div")(9,"h4",3),t._uU(10,"On-chain"),t.qZA(),t.TgZ(11,"div",4),t._uU(12),t.ALo(13,"number"),t.qZA(),t._UZ(14,"mat-progress-bar",5),t.qZA(),t.TgZ(15,"div")(16,"h4",3),t._uU(17,"Total"),t.qZA(),t.TgZ(18,"div",4),t._uU(19),t.ALo(20,"number"),t.qZA()()()),2&n){const e=t.oxw();t.xp6(5),t.hij("",t.lcZ(6,5,e.balances.lightning)," Sats"),t.xp6(2),t.s9C("value",e.balances.lightning/e.balances.total*100),t.xp6(5),t.hij("",t.lcZ(13,7,e.balances.onchain)," Sats"),t.xp6(2),t.s9C("value",e.balances.onchain/e.balances.total*100),t.xp6(5),t.hij("",t.lcZ(20,9,e.balances.total)," Sats")}}function Bt(n,a){if(1&n&&(t.TgZ(0,"div",6)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let zt=(()=>{class n{constructor(){this.balances={onchain:0,lightning:0,total:0}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-balances-info"]],inputs:{balances:"balances",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(e,i){if(1&e&&(t.YNc(0,Ht,21,11,"div",0),t.YNc(1,Bt,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh,M.pW],pipes:[u.JJ],styles:[""]}),n})();var y=_(7322),V=_(7238),G=_(4834),Q=_(8129);const Vt=function(){return["../connections/channels/open"]},Gt=function(n){return{filter:n}};function Xt(n,a){if(1&n&&(t.TgZ(0,"div",19)(1,"a",20),t._uU(2),t.ALo(3,"slice"),t.qZA(),t.TgZ(4,"div",6)(5,"mat-hint",21)(6,"strong",8),t._uU(7,"Local:"),t.qZA(),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"mat-hint",22),t._UZ(11,"fa-icon",23),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"mat-hint",24)(15,"strong",8),t._uU(16,"Remote:"),t.qZA(),t._uU(17),t.ALo(18,"number"),t.qZA()(),t._UZ(19,"mat-progress-bar",25),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(1),t.s9C("matTooltip",e.alias||e.shortChannelId),t.s9C("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.Q6J("routerLink",t.DdM(23,Vt))("state",t.VKq(24,Gt,e.channelId)),t.xp6(1),t.AsE(" ",t.Dn7(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.xp6(6),t.hij("",t.xi3(9,15,(null==e?null:e.toLocal)||0,"1.0-0")," Sats"),t.xp6(3),t.Q6J("icon",i.faBalanceScale),t.xp6(1),t.hij(" (",t.lcZ(13,18,(null==e?null:e.balancedness)||0),") "),t.xp6(5),t.hij("",t.xi3(18,20,(null==e?null:e.toRemote)||0,"1.0-0")," Sats"),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function $t(n,a){if(1&n&&(t.TgZ(0,"div",17),t.YNc(1,Xt,20,26,"div",18),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.allChannels)}}function Wt(n,a){if(1&n&&(t.TgZ(0,"div",3)(1,"div",4)(2,"span",5),t._uU(3,"Total Capacity"),t.qZA(),t.TgZ(4,"div",6)(5,"mat-hint",7)(6,"strong",8),t._uU(7,"Local:"),t.qZA(),t._uU(8),t.ALo(9,"number"),t.qZA(),t.TgZ(10,"mat-hint",9),t._UZ(11,"fa-icon",10),t._uU(12),t.ALo(13,"number"),t.qZA(),t.TgZ(14,"mat-hint",11)(15,"strong",8),t._uU(16,"Remote:"),t.qZA(),t._uU(17),t.ALo(18,"number"),t.qZA()(),t._UZ(19,"mat-progress-bar",12),t.qZA(),t.TgZ(20,"div",13),t._UZ(21,"mat-divider",14),t.qZA(),t.TgZ(22,"div",15),t.YNc(23,$t,2,1,"div",16),t.qZA()()),2&n){const e=t.oxw(),i=t.MAs(2);t.xp6(8),t.hij("",t.xi3(9,7,(null==e.channelBalances?null:e.channelBalances.localBalance)||0,"1.0-0")," Sats"),t.xp6(3),t.Q6J("icon",e.faBalanceScale),t.xp6(1),t.hij(" (",t.lcZ(13,10,(null==e.channelBalances?null:e.channelBalances.balancedness)||0),") "),t.xp6(5),t.hij("",t.xi3(18,12,(null==e.channelBalances?null:e.channelBalances.remoteBalance)||0,"1.0-0")," Sats"),t.xp6(2),t.s9C("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.xp6(4),t.Q6J("ngIf",e.allChannels&&(null==e.allChannels?null:e.allChannels.length)>0)("ngIfElse",i)}}function Kt(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",26),t._uU(1," No channels available. "),t.TgZ(2,"button",27),t.NdJ("click",function(){return t.CHM(e),t.oxw().goToChannels()}),t._uU(3,"Open Channel"),t.qZA()()}}function jt(n,a){if(1&n&&(t.TgZ(0,"div",28)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let te=(()=>{class n{constructor(e){this.router=e,this.faBalanceScale=L.DL8,this.faDumbbell=L.FlN,this.sortBy="Balance Score"}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-capacity-info"]],inputs:{channelBalances:"channelBalances",allChannels:"allChannels",sortBy:"sortBy",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],["fxLayout","row","fxLayoutAlign","space-between start",1,"w-100"],["fxFlex","40","fxLayoutAlign","start center",1,"font-size-90"],[1,"font-weight-900","mr-5px"],["fxFlex","20","fxLayoutAlign","center center",1,"font-size-90"],["matTooltip","Balance Score",1,"mr-3px",3,"icon"],["fxFlex","40","fxLayoutAlign","end center",1,"font-size-90"],["mode","determinate","color","accent",1,"dashboard-progress-bar","this-channel-bar",3,"value"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],[1,"channels-capacity-scroll",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100",4,"ngIf","ngIfElse"],["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(e,i){if(1&e&&(t.YNc(0,Wt,24,15,"div",0),t.YNc(1,Kt,4,0,"ng-template",null,1,t.W1O),t.YNc(3,jt,3,1,"ng-template",null,2,t.W1O)),2&e){const o=t.MAs(4);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,y.bx,O.BN,V.gM,M.pW,G.d,Q.$V,u.sg,x.yS,I.lW],pipes:[u.JJ,u.OU],styles:[".channels-capacity-scroll[_ngcontent-%COMP%]{width:100%;height:100%;overflow-y:hidden}"]}),n})();function ee(n,a){if(1&n&&(t.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),t._uU(4,"Daily"),t.qZA(),t.TgZ(5,"div",5),t._uU(6),t.ALo(7,"number"),t.qZA()(),t.TgZ(8,"div")(9,"h4",4),t._uU(10,"Weekly"),t.qZA(),t.TgZ(11,"div",5),t._uU(12),t.ALo(13,"number"),t.qZA()(),t.TgZ(14,"div")(15,"h4",4),t._uU(16,"Monthly"),t.qZA(),t.TgZ(17,"div",5),t._uU(18),t.ALo(19,"number"),t.qZA()()(),t.TgZ(20,"div",3)(21,"div")(22,"h4",4),t._uU(23,"Transactions"),t.qZA(),t.TgZ(24,"div",5),t._uU(25),t.ALo(26,"number"),t.qZA()(),t.TgZ(27,"div")(28,"h4",4),t._uU(29,"Transactions"),t.qZA(),t.TgZ(30,"div",5),t._uU(31),t.ALo(32,"number"),t.qZA()(),t.TgZ(33,"div")(34,"h4",4),t._uU(35,"Transactions"),t.qZA(),t.TgZ(36,"div",5),t._uU(37),t.ALo(38,"number"),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(6),t.hij("",t.lcZ(7,6,null==e.fees?null:e.fees.daily_fee)," Sats"),t.xp6(6),t.hij("",t.lcZ(13,8,null==e.fees?null:e.fees.weekly_fee)," Sats"),t.xp6(6),t.hij("",t.lcZ(19,10,null==e.fees?null:e.fees.monthly_fee)," Sats"),t.xp6(7),t.Oqu(t.lcZ(26,12,null==e.fees?null:e.fees.daily_txs)),t.xp6(6),t.Oqu(t.lcZ(32,14,null==e.fees?null:e.fees.weekly_txs)),t.xp6(6),t.Oqu(t.lcZ(38,16,null==e.fees?null:e.fees.monthly_txs))}}function ne(n,a){if(1&n&&(t.TgZ(0,"div",6)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(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(){var e;if(null===(e=this.fees)||void 0===e?void 0:e.monthly_fee){this.totalFees=[{name:"Monthly",value:this.fees.monthly_fee},{name:"Weekly",value:this.fees.weekly_fee},{name:"Daily ",value:this.fees.daily_fee}];const i=Math.ceil(Math.log(this.fees.monthly_fee+1)/Math.LN10),o=Math.pow(10,i-1);this.maxFeeValue=Math.ceil(this.fees.monthly_fee/o)*o/5||100,Object.assign(this,this.totalFees)}else this.totalFees=[{name:"Monthly",value:0},{name:"Weekly",value:0},{name:"Daily",value:0}],this.maxFeeValue=100,Object.assign(this,this.totalFees)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-fee-info"]],inputs:{fees:"fees",errorMessage:"errorMessage"},features:[t.TTD],decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(e,i){if(1&e&&(t.YNc(0,ee,39,18,"div",0),t.YNc(1,ne,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function ae(n,a){if(1&n&&(t.TgZ(0,"div",2)(1,"div",3)(2,"div")(3,"h4",4),t._uU(4,"Active"),t.qZA(),t.TgZ(5,"div",5),t._UZ(6,"span",6),t._uU(7),t.ALo(8,"number"),t.qZA()(),t.TgZ(9,"div")(10,"h4",4),t._uU(11,"Pending"),t.qZA(),t.TgZ(12,"div",5),t._UZ(13,"span",7),t._uU(14),t.ALo(15,"number"),t.qZA()(),t.TgZ(16,"div")(17,"h4",4),t._uU(18,"Inactive"),t.qZA(),t.TgZ(19,"div",5),t._UZ(20,"span",8),t._uU(21),t.ALo(22,"number"),t.qZA()()(),t.TgZ(23,"div",3)(24,"div")(25,"h4",4),t._uU(26,"Capacity"),t.qZA(),t.TgZ(27,"div",5),t._uU(28),t.ALo(29,"number"),t.qZA()(),t.TgZ(30,"div")(31,"h4",4),t._uU(32,"Capacity"),t.qZA(),t.TgZ(33,"div",5),t._uU(34),t.ALo(35,"number"),t.qZA()(),t.TgZ(36,"div")(37,"h4",4),t._uU(38,"Capacity"),t.qZA(),t.TgZ(39,"div",5),t._uU(40),t.ALo(41,"number"),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(7),t.Oqu(t.lcZ(8,6,(null==e.channelsStatus.active?null:e.channelsStatus.active.channels)||0)),t.xp6(7),t.Oqu(t.lcZ(15,8,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.channels)||0)),t.xp6(7),t.Oqu(t.lcZ(22,10,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.channels)||0)),t.xp6(7),t.hij("",t.lcZ(29,12,(null==e.channelsStatus.active?null:e.channelsStatus.active.capacity)||0)," Sats"),t.xp6(6),t.hij("",t.lcZ(35,14,(null==e.channelsStatus.pending?null:e.channelsStatus.pending.capacity)||0)," Sats"),t.xp6(6),t.hij("",t.lcZ(41,16,(null==e.channelsStatus.inactive?null:e.channelsStatus.inactive.capacity)||0)," Sats")}}function oe(n,a){if(1&n&&(t.TgZ(0,"div",9)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let se=(()=>{class n{constructor(){this.channelsStatus={}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-status-info"]],inputs:{channelsStatus:"channelsStatus",errorMessage:"errorMessage"},decls:3,vars:2,consts:[["fxLayout","row","fxFlex","100","fxLayoutAlign","start stretch",4,"ngIf","ngIfElse"],["errorBlock",""],["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(e,i){if(1&e&&(t.YNc(0,ae,42,18,"div",0),t.YNc(1,oe,3,1,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.yH,p.Wh],pipes:[u.JJ],styles:[""]}),n})();function le(n,a){if(1&n&&(t.TgZ(0,"mat-hint",19)(1,"strong",20),t._uU(2,"Capacity: "),t.qZA(),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij("",t.xi3(4,1,e.toRemote||0,"1.0-0")," Sats")}}function re(n,a){if(1&n&&(t.TgZ(0,"mat-hint",19)(1,"strong",20),t._uU(2,"Capacity: "),t.qZA(),t._uU(3),t.ALo(4,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.hij("",t.xi3(4,1,e.toLocal||0,"1.0-0")," Sats")}}function ce(n,a){if(1&n&&t._UZ(0,"mat-progress-bar",21),2&n){const e=t.oxw().$implicit,i=t.oxw(3);t.s9C("value",i.totalLiquidity>0?(+e.toRemote||0)/i.totalLiquidity*100:0)}}function ue(n,a){if(1&n&&t._UZ(0,"mat-progress-bar",21),2&n){const e=t.oxw().$implicit,i=t.oxw(3);t.s9C("value",i.totalLiquidity>0?(+e.toLocal||0)/i.totalLiquidity*100:0)}}const pe=function(){return["../connections/channels/open"]},me=function(n){return{filter:n}};function de(n,a){if(1&n&&(t.TgZ(0,"div",14)(1,"a",15),t._uU(2),t.ALo(3,"slice"),t.qZA(),t.TgZ(4,"div",16),t.YNc(5,le,5,4,"mat-hint",17),t.YNc(6,re,5,4,"mat-hint",17),t.qZA(),t.YNc(7,ce,1,1,"mat-progress-bar",18),t.YNc(8,ue,1,1,"mat-progress-bar",18),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(3);t.xp6(1),t.s9C("matTooltip",e.alias||e.shortChannelId),t.s9C("matTooltipDisabled",(e.alias||e.shortChannelId).length<26),t.Q6J("routerLink",t.DdM(14,pe))("state",t.VKq(15,me,e.channelId)),t.xp6(1),t.AsE(" ",t.Dn7(3,10,e.alias||e.shortChannelId,0,24),"",(e.alias||e.shortChannelId).length>25?"...":""," "),t.xp6(3),t.Q6J("ngIf","In"===i.direction),t.xp6(1),t.Q6J("ngIf","Out"===i.direction),t.xp6(1),t.Q6J("ngIf","In"===i.direction),t.xp6(1),t.Q6J("ngIf","Out"===i.direction)}}function he(n,a){if(1&n&&(t.TgZ(0,"div",12),t.YNc(1,de,9,17,"div",13),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("ngForOf",e.allChannels)}}const _e=function(n,a,e){return{"mb-4":n,"mb-2":a,"mb-1":e}};function fe(n,a){if(1&n&&(t.TgZ(0,"div",3)(1,"div",4)(2,"span",5),t._uU(3,"Total Capacity"),t.qZA(),t.TgZ(4,"mat-hint",6),t._uU(5),t.ALo(6,"number"),t.qZA(),t._UZ(7,"mat-progress-bar",7),t.qZA(),t.TgZ(8,"div",8),t._UZ(9,"mat-divider",9),t.qZA(),t.TgZ(10,"div",10),t.YNc(11,he,2,1,"div",11),t.qZA()()),2&n){const e=t.oxw(),i=t.MAs(2);t.Q6J("ngClass",t.kEZ(7,_e,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.xp6(5),t.hij("",t.xi3(6,4,e.totalLiquidity,"1.0-0")," Sats"),t.xp6(6),t.Q6J("ngIf",e.allChannels&&e.allChannels.length>0)("ngIfElse",i)}}function ge(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).goToChannels()}),t._uU(1,"Open Channel"),t.qZA()}}function Ce(n,a){if(1&n&&(t.TgZ(0,"div",22),t._uU(1," No channels available. "),t.YNc(2,ge,2,0,"button",23),t.qZA()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngIf","Out"===e.direction)}}function xe(n,a){if(1&n&&(t.TgZ(0,"div",25)(1,"p"),t._uU(2),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Oqu(e.errorMessage)}}let ye=(()=>{class n{constructor(e,i){this.router=e,this.commonService=i,this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.screenSize=this.commonService.getScreenSize()}goToChannels(){this.router.navigateByUrl("/ecl/connections")}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-liquidity-info"]],inputs:{direction:"direction",totalLiquidity:"totalLiquidity",allChannels:"allChannels",errorMessage:"errorMessage"},decls:5,vars:2,consts:[["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass",4,"ngIf","ngIfElse"],["noChannelBlock",""],["errorBlock",""],["fxLayout","column","fxLayoutAlign","space-between stretch","fxFlex","100",3,"ngClass"],["fxLayout","column","fxFlex","9","fxLayoutAlign","end start"],[1,"dashboard-capacity-header","this-channel-capacity"],[1,"font-size-90"],["mode","determinate","color","accent","value","100",1,"dashboard-progress-bar","this-channel-bar"],["fxLayout","column","fxFlex","3","fxLayoutAlign","end stretch"],[1,"dashboard-divider"],["fxLayout","column","fxFlex.gt-sm","88","fxFlex","84","fxLayoutAlign","start start",3,"perfectScrollbar"],["fxLayout","column","fxFlex","100","class","w-100",4,"ngIf","ngIfElse"],["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 center",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(e,i){if(1&e&&(t.YNc(0,fe,12,11,"div",0),t.YNc(1,Ce,3,1,"ng-template",null,1,t.W1O),t.YNc(3,xe,3,1,"ng-template",null,2,t.W1O)),2&e){const o=t.MAs(4);t.Q6J("ngIf",""===(null==i.errorMessage?null:i.errorMessage.trim()))("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,p.yH,u.mk,w.oO,y.bx,M.pW,G.d,Q.$V,u.sg,x.yS,V.gM,I.lW],pipes:[u.JJ,u.OU],styles:[""]}),n})();var k=_(3251),J=_(9300),A=_(6087),v=_(4847),r=_(2075),D=_(8966),N=_(2994),z=_(6642),m=_(3075),U=_(7531),X=_(3390),$=_(6534),P=_(4107),Y=_(508);function Le(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Description is required."),t.qZA())}function Te(n,a){if(1&n&&(t.TgZ(0,"mat-option",25),t._uU(1),t.ALo(2,"titlecase"),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(t.lcZ(2,2,e))}}function ve(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.invoiceError)}}function be(n,a){if(1&n&&(t.TgZ(0,"div",26),t._UZ(1,"fa-icon",27),t.YNc(2,ve,2,1,"span",11),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.invoiceError)}}let Ae=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.data=i,this.store=o,this.decimalPipe=s,this.commonService=c,this.actions=f,this.faExclamationTriangle=L.eHv,this.selNode={},this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.invoicePaymentReq="",this.information={},this.private=!1,this.expiryStep=100,this.pageSize=l.IV,this.timeUnitEnum=l.Qk,this.timeUnits=l.LO,this.selTimeUnit=l.Qk.SECS,this.invoiceError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.actions.pipe((0,h.R)(this.unSubs[2]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&"CreateInvoice"===e.payload.action&&(e.payload.status===l.Bn.ERROR&&(this.invoiceError=e.payload.message),e.payload.status===l.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(e){if(this.invoiceError="",!this.description)return!0;let i=this.expiry?this.expiry:3600;this.selTimeUnit!==l.Qk.SECS&&(i=this.commonService.convertTime(this.expiry,this.selTimeUnit,l.Qk.SECS));let o=null;o=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,N.Z$)({payload:o}))}resetData(){this.description="",this.invoiceValue=null,this.private=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=l.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,l.Xz.OTHER)+" "+e.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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(S.yh),t.Y36(u.JJ),t.Y36(R.v),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-create-invoices"]],decls:35,vars:16,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxLayoutAlign","start space-between","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","autoFocus","","placeholder","Description","tabindex","2","name","description","required","",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","space-between start","fxFlex","100"],["fxFlex","40"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["matSuffix",""],["fxFlex","30"],["matInput","","placeholder","Expiry","type","number","name","exp","tabindex","4",3,"ngModel","step","min","ngModelChange"],["fxFlex","26"],["tabindex","5","name","timeUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","8",3,"click"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(e,i){if(1&e){const o=t.EpF();t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Create Invoice"),t.qZA()(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",9)(12,"input",10),t.NdJ("ngModelChange",function(c){return i.description=c}),t.qZA(),t.YNc(13,Le,2,0,"mat-error",11),t.qZA(),t.TgZ(14,"div",12)(15,"mat-form-field",13)(16,"input",14),t.NdJ("ngModelChange",function(c){return i.invoiceValue=c})("keyup",function(){return i.onInvoiceValueChange()}),t.qZA(),t.TgZ(17,"span",15),t._uU(18," Sats "),t.qZA(),t.TgZ(19,"mat-hint"),t._uU(20),t.qZA()(),t.TgZ(21,"mat-form-field",16)(22,"input",17),t.NdJ("ngModelChange",function(c){return i.expiry=c}),t.qZA(),t.TgZ(23,"span",15),t._uU(24),t.ALo(25,"titlecase"),t.qZA()(),t.TgZ(26,"mat-form-field",18)(27,"mat-select",19),t.NdJ("selectionChange",function(c){return i.onTimeUnitChange(c)}),t.YNc(28,Te,3,4,"mat-option",20),t.qZA()()(),t.YNc(29,be,3,2,"div",21),t.TgZ(30,"div",22)(31,"button",23),t.NdJ("click",function(){return i.resetData()}),t._uU(32,"Clear Field"),t.qZA(),t.TgZ(33,"button",24),t.NdJ("click",function(){t.CHM(o);const c=t.MAs(10);return i.onAddInvoice(c)}),t._uU(34,"Create Invoice"),t.qZA()()()()()()}2&e&&(t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.description),t.xp6(1),t.Q6J("ngIf",!i.description),t.xp6(3),t.Q6J("ngModel",i.invoiceValue)("step",100)("min",1),t.xp6(4),t.Oqu(i.invoiceValueHint),t.xp6(2),t.Q6J("ngModel",i.expiry)("step",i.selTimeUnit===i.timeUnitEnum.SECS?300:i.selTimeUnit===i.timeUnitEnum.MINS?10:i.selTimeUnit===i.timeUnitEnum.HOURS?2:1)("min",1),t.xp6(2),t.hij(" ",t.lcZ(25,14,i.selTimeUnit)," "),t.xp6(3),t.Q6J("value",i.selTimeUnit),t.xp6(1),t.Q6J("ngForOf",i.timeUnits),t.xp6(1),t.Q6J("ngIf",""!==i.invoiceError))},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,D.ZT,T.dn,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,y.TO,m.wV,m.qQ,$.q,y.R9,y.bx,P.gD,u.sg,Y.ey,O.BN],pipes:[u.rS],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var Ze=_(7766),Z=_(7861);function Se(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Description is required."),t.qZA())}function we(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"input",7),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().description=o}),t.qZA(),t.YNc(4,Se,2,0,"mat-error",8),t.qZA(),t.TgZ(5,"mat-form-field",9)(6,"input",10,11),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().invoiceValue=o})("keyup",function(){return t.CHM(e),t.oxw().onInvoiceValueChange()}),t.qZA(),t.TgZ(8,"span",12),t._uU(9," Sats "),t.qZA(),t.TgZ(10,"mat-hint"),t._uU(11),t.qZA()(),t.TgZ(12,"div",13)(13,"button",14),t.NdJ("click",function(){return t.CHM(e),t.oxw().resetData()}),t._uU(14,"Clear Field"),t.qZA(),t.TgZ(15,"button",15),t.NdJ("click",function(){t.CHM(e);const o=t.MAs(1);return t.oxw().onAddInvoice(o)}),t._uU(16,"Create Invoice"),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.description),t.xp6(1),t.Q6J("ngIf",!e.description),t.xp6(2),t.Q6J("ngModel",e.invoiceValue)("step",100)("min",1),t.xp6(5),t.Oqu(e.invoiceValueHint)}}function Ee(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",16)(1,"button",17),t.NdJ("click",function(){return t.CHM(e),t.oxw().openCreateInvoiceModal()}),t._uU(2,"Create Invoice"),t.qZA()()}}function Ie(n,a){1&n&&t._UZ(0,"mat-progress-bar",47)}function Oe(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Date Created "),t.qZA())}const it=function(n){return{"mr-0":n}};function Fe(n,a){if(1&n&&t._UZ(0,"span",53),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,it,e.screenSize===e.screenSizeEnum.XS))}}function qe(n,a){if(1&n&&t._UZ(0,"span",54),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,it,e.screenSize===e.screenSizeEnum.XS))}}function Re(n,a){if(1&n&&t._UZ(0,"span",55),2&n){const e=t.oxw(3);t.Q6J("ngClass",t.VKq(1,it,e.screenSize===e.screenSizeEnum.XS))}}function Ne(n,a){if(1&n&&(t.TgZ(0,"td",49),t.YNc(1,Fe,1,3,"span",50),t.YNc(2,qe,1,3,"span",51),t.YNc(3,Re,1,3,"span",52),t._uU(4),t.ALo(5,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf","received"===e.status),t.xp6(1),t.Q6J("ngIf","unpaid"===e.status),t.xp6(1),t.Q6J("ngIf",!e.status||"expired"===e.status||"unknown"===e.status),t.xp6(1),t.hij(" ",t.xi3(5,4,1e3*e.timestamp,"dd/MMM/y HH:mm")," ")}}function ke(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Date Settled "),t.qZA())}function Pe(n,a){if(1&n&&(t.TgZ(0,"td",49),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,1e3*e.receivedAt,"dd/MMM/y HH:mm")||"-")}}function De(n,a){1&n&&(t.TgZ(0,"th",48),t._uU(1," Description "),t.qZA())}const Ue=function(n){return{"max-width":n}};function Me(n,a){if(1&n&&(t.TgZ(0,"td",49)(1,"div",56)(2,"span",57),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,Ue,i.screenSize===i.screenSizeEnum.XS?"10rem":"32rem")),t.xp6(2),t.Oqu(e.description)}}function Je(n,a){1&n&&(t.TgZ(0,"th",58),t._uU(1," Amount (Sats) "),t.qZA())}function Qe(n,a){if(1&n&&(t.TgZ(0,"td",59)(1,"span",60),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",e.amount?t.xi3(3,1,e.amount,"1.0-0"):"-","")}}function Ye(n,a){1&n&&(t.TgZ(0,"th",58),t._uU(1," Amount Settled (Sats) "),t.qZA())}function He(n,a){if(1&n&&(t.TgZ(0,"td",59)(1,"span",60),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",e.amountSettled?t.xi3(3,1,e.amountSettled,"1.0-0"):"-","")}}function Be(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",61)(1,"div",62)(2,"mat-select",63),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",64),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}const ze=function(n){return{"px-3":n}};function Ve(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",65)(1,"div",66)(2,"mat-select",67),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",64),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onInvoiceClick(s)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",64),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onRefreshInvoice(s)}),t._uU(7,"Refresh"),t.qZA()()()()}if(2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,ze,e.screenSize!==e.screenSizeEnum.XS))}}function Ge(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No invoice available."),t.qZA())}function Xe(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting invoices..."),t.qZA())}function $e(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function We(n,a){if(1&n&&(t.TgZ(0,"td",68),t.YNc(1,Ge,2,0,"p",8),t.YNc(2,Xe,2,0,"p",8),t.YNc(3,$e,2,1,"p",8),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const Ke=function(n){return{"display-none":n}};function je(n,a){if(1&n&&t._UZ(0,"tr",69),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Ke,(null==e.invoices?null:e.invoices.data)&&(null==e.invoices||null==e.invoices.data?null:e.invoices.data.length)>0))}}function tn(n,a){1&n&&t._UZ(0,"tr",70)}function en(n,a){1&n&&t._UZ(0,"tr",71)}const nn=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},an=function(){return["no_invoice"]};function on(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",18)(1,"div",19)(2,"div",20),t._UZ(3,"fa-icon",21),t.TgZ(4,"span",22),t._uU(5,"Invoices History"),t.qZA()(),t.TgZ(6,"mat-form-field",23)(7,"input",24),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().selFilter=o}),t.qZA()()(),t.TgZ(8,"div",25),t.YNc(9,Ie,1,0,"mat-progress-bar",26),t.TgZ(10,"table",27,28),t.ynx(12,29),t.YNc(13,Oe,2,0,"th",30),t.YNc(14,Ne,6,7,"td",31),t.BQk(),t.ynx(15,32),t.YNc(16,ke,2,0,"th",30),t.YNc(17,Pe,3,4,"td",31),t.BQk(),t.ynx(18,33),t.YNc(19,De,2,0,"th",30),t.YNc(20,Me,4,4,"td",31),t.BQk(),t.ynx(21,34),t.YNc(22,Je,2,0,"th",35),t.YNc(23,Qe,4,4,"td",36),t.BQk(),t.ynx(24,37),t.YNc(25,Ye,2,0,"th",35),t.YNc(26,He,4,4,"td",36),t.BQk(),t.ynx(27,38),t.YNc(28,Be,6,0,"th",39),t.YNc(29,Ve,8,3,"td",40),t.BQk(),t.ynx(30,41),t.YNc(31,We,4,3,"td",42),t.BQk(),t.YNc(32,je,1,3,"tr",43),t.YNc(33,tn,1,0,"tr",44),t.YNc(34,en,1,0,"tr",45),t.qZA()(),t._UZ(35,"mat-paginator",46),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("icon",e.faHistory),t.xp6(4),t.Q6J("ngModel",e.selFilter),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.invoices)("ngClass",t.VKq(12,nn,""!==e.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,an)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let gt=(()=>{class n{constructor(e,i,o,s,c,f){this.logger=e,this.store=i,this.decimalPipe=o,this.commonService=s,this.datePipe=c,this.actions=f,this.calledFrom="transactions",this.faHistory=L.qO$,this.selNode={},this.newlyAddedInvoiceMemo="",this.newlyAddedInvoiceValue=0,this.description="",this.invoiceValue=null,this.invoiceValueHint="",this.displayedColumns=[],this.invoicePaymentReq="",this.invoiceJSONArr=[],this.information={},this.flgSticky=!1,this.selFilter="",this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","amountSettled","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","receivedAt","description","amount","amountSettled","actions"])}ngOnInit(){this.store.select(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.Ef).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.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.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr),this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[3]),(0,J.h)(e=>e.type===l.lr.SET_LOOKUP_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.SET_LOOKUP_ECL&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&e.payload&&(this.updateInvoicesData(JSON.parse(JSON.stringify(e.payload))),this.loadInvoicesTable(this.invoiceJSONArr))})}ngAfterViewInit(){this.invoiceJSONArr&&this.invoiceJSONArr.length>0&&this.sort&&this.paginator&&this.loadInvoicesTable(this.invoiceJSONArr)}openCreateInvoiceModal(){this.store.dispatch((0,Z.qR)({payload:{data:{pageSize:this.pageSize,component:Ae}}}))}onAddInvoice(e){if(!this.description)return!0;const i=this.expiry?this.expiry:3600;this.newlyAddedInvoiceMemo="ulbl"+Math.random().toString(36).slice(2)+Date.now(),this.newlyAddedInvoiceValue=this.invoiceValue;let o=null;o=this.invoiceValue?{description:this.description,expireIn:i,amountMsat:1e3*this.invoiceValue}:{description:this.description,expireIn:i},this.store.dispatch((0,N.Z$)({payload:o})),this.resetData()}onInvoiceClick(e){this.store.dispatch((0,Z.qR)({payload:{data:{invoice:e,newlyAdded:!1,component:Ze.R}}}))}onRefreshInvoice(e){this.store.dispatch((0,N.n7)({payload:e.paymentHash}))}updateInvoicesData(e){this.invoiceJSONArr=this.invoiceJSONArr.map(i=>i.paymentHash===e.paymentHash?e:i)}loadInvoicesTable(e){this.invoices=new r.by(e?[...e]:[]),this.invoices.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.invoices.sort=this.sort,this.invoices.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(1e3*i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.invoices.paginator=this.paginator,this.applyFilter()}resetData(){this.description="",this.invoiceValue=null,this.expiry=null,this.invoiceValueHint=""}applyFilter(){this.invoices.filter=this.selFilter.trim().toLowerCase()}onInvoiceValueChange(){this.selNode.fiatConversion&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[4])).subscribe({next:e=>{this.invoiceValueHint="= "+e.symbol+this.decimalPipe.transform(e.OTHER,l.Xz.OTHER)+" "+e.unit},error:e=>{this.invoiceValueHint="Conversion Error: "+e}}))}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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(u.JJ),t.Y36(R.v),t.Y36(u.uU),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-invoices"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Invoices")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","row wrap","fxLayoutAlign","stretch start","fxFlex","100"],["addInvoiceForm","ngForm"],["fxFlex","100","fxLayoutAlign","space-between stretch"],["matInput","","placeholder","Description","tabindex","2","name","description","required","true",3,"ngModel","ngModelChange"],[4,"ngIf"],["fxFlex","100","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","3","name","invValue",3,"ngModel","step","min","ngModelChange","keyup"],["invcVal","ngModel"],["matSuffix",""],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","9","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","10",3,"click"],["fxLayout","row"],["mat-flat-button","","color","primary","tabindex","8",3,"click"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","receivedAt"],["matColumnDef","description"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pr-3",4,"matCellDef"],["matColumnDef","amountSettled"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass",4,"matCellDef"],["matColumnDef","no_invoice"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot green","matTooltip","Received","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot yellow","matTooltip","Unpaid","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Expired/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"],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-3"],["mat-cell","",1,"pr-3"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",3,"ngClass"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","4",1,"mr-0"],["mat-footer-cell","","colspan","4"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,we,17,6,"form",1),t.YNc(2,Ee,3,0,"div",2),t.YNc(3,on,36,15,"div",3),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf","home"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,m.Q7,m.JJ,m.On,y.TO,m.wV,m.qQ,$.q,y.R9,y.bx,I.lW,O.BN,Q.$V,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,V.gM,u.PC,w.Zl,P.gD,P.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.uU,u.JJ],styles:[".mat-column-description[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-description[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var B=_(5698),at=_(3289),Ct=_(8104);const sn=["paymentReq"];function ln(n,a){if(1&n&&(t.TgZ(0,"mat-hint"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function rn(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment request is required."),t.qZA())}function cn(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function un(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment amount is required."),t.qZA())}function pn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-form-field",1)(1,"input",17,18),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().paymentAmount=o})("change",function(o){return t.CHM(e),t.oxw().onAmountChange(o)}),t.qZA(),t.TgZ(3,"mat-hint"),t._uU(4,"It is a zero amount invoice, enter amount to be paid."),t.qZA(),t.YNc(5,un,2,0,"mat-error",11),t.qZA()}if(2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngModel",e.paymentAmount),t.xp6(4),t.Q6J("ngIf",!e.paymentAmount)}}function mn(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.paymentError)}}function dn(n,a){if(1&n&&(t.TgZ(0,"div",19),t._UZ(1,"fa-icon",20),t.YNc(2,mn,2,1,"span",11),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.paymentError)}}let hn=(()=>{class n{constructor(e,i,o,s,c,f,F,g){this.dialogRef=e,this.store=i,this.eclEffects=o,this.logger=s,this.commonService=c,this.decimalPipe=f,this.actions=F,this.dataService=g,this.faExclamationTriangle=L.eHv,this.selNode={},this.paymentDecoded={},this.zeroAmtInvoice=!1,this.paymentAmount=null,this.paymentRequest="",this.paymentDecodedHint="",this.selActiveChannel={},this.activeChannels={},this.feeLimit=null,this.selFeeLimitType=l.Vc[0],this.feeLimitTypes=l.Vc,this.paymentError="",this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.activeChannels=e.activeChannels,this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL||e.type===l.lr.SEND_PAYMENT_STATUS_ECL)).subscribe(e=>{e.type===l.lr.SEND_PAYMENT_STATUS_ECL&&this.dialogRef.close(),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.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.paymentDecodedHint="",this.paymentReq.control.setErrors(null),this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,B.q)(1)).subscribe({next:e=>{this.paymentDecoded=e,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe({next:i=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+i.symbol+this.decimalPipe.transform(i.OTHER?i.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:i=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount/1e3:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description)},error:e=>{this.logger.error(e),this.paymentDecodedHint="ERROR: "+(e.message?e.message:"string"==typeof e?e:JSON.stringify(e)),this.paymentReq.control.setErrors({decodeError:!0})}}))}sendPayment(){this.store.dispatch((0,N.oV)(this.zeroAmtInvoice?{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.paymentDecodedHint="",this.zeroAmtInvoice=!1,this.paymentRequest&&this.paymentRequest.length>100&&(this.paymentReq.control.setErrors(null),this.zeroAmtInvoice=!1,this.dataService.decodePayment(this.paymentRequest,!0).pipe((0,B.q)(1)).subscribe({next:i=>{this.paymentDecoded=i,this.paymentDecoded.timestamp&&!this.paymentDecoded.amount?(this.paymentDecoded.amount=0,this.zeroAmtInvoice=!0,this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description):(this.zeroAmtInvoice=!1,this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description)},error:i=>{this.logger.error(i),this.paymentDecodedHint="ERROR: "+(i.message?i.message:"string"==typeof i?i:JSON.stringify(i)),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.Vc[0],this.paymentReq.control.setErrors(null),this.paymentError="",this.paymentDecodedHint="",this.zeroAmtInvoice=!1}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(S.yh),t.Y36(at.o),t.Y36(q.mQ),t.Y36(R.v),t.Y36(u.JJ),t.Y36(z.eX),t.Y36(Ct.D))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-send-payments"]],viewQuery:function(e,i){if(1&e&&t.Gf(sn,5),2&e){let o;t.iGM(o=t.CRH())&&(i.paymentReq=o.first)}},decls:24,vars:7,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayoutAlign","space-between stretch","fxLayout","column"],["sendPaymentForm","ngForm"],["autoFocus","","matInput","","placeholder","Payment Request","name","paymentRequest","rows","4","tabindex","1","required","",3,"ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxFlex","100",4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-button","","color","primary","tabindex","3",3,"click"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","required","",3,"ngModel","ngModelChange","change"],["paymentAmt","ngModel"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Send Payment"),t.qZA()(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"form",7,8)(11,"mat-form-field",1)(12,"textarea",9,10),t.NdJ("ngModelChange",function(s){return i.onPaymentRequestEntry(s)})("matTextareaAutosize",function(){return!0}),t.qZA(),t.YNc(14,ln,2,1,"mat-hint",11),t.YNc(15,rn,2,0,"mat-error",11),t.YNc(16,cn,2,1,"mat-error",11),t.qZA(),t.YNc(17,pn,6,2,"mat-form-field",12),t.YNc(18,dn,3,2,"div",13),t.TgZ(19,"div",14)(20,"button",15),t.NdJ("click",function(){return i.resetData()}),t._uU(21,"Clear Fields"),t.qZA(),t.TgZ(22,"button",16),t.NdJ("click",function(){return i.onSendPayment()}),t._uU(23,"Send Payment"),t.qZA()()()()()()),2&e){const o=t.MAs(13);t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.paymentRequest),t.xp6(2),t.Q6J("ngIf",i.paymentRequest&&""!==i.paymentDecodedHint),t.xp6(1),t.Q6J("ngIf",!i.paymentRequest),t.xp6(1),t.Q6J("ngIf",null==o.errors?null:o.errors.decodeError),t.xp6(1),t.Q6J("ngIf",i.zeroAmtInvoice),t.xp6(1),t.Q6J("ngIf",""!==i.paymentError)}},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,D.ZT,T.dn,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,y.bx,y.TO,O.BN],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-payment_hash[_ngcontent-%COMP%]{flex:1 1 20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();var H=_(1125);const _n=["scrollContainer"];function fn(n,a){if(1&n&&(t.TgZ(0,"div",9)(1,"div",1)(2,"h4",11),t._uU(3,"Description"),t.qZA(),t.TgZ(4,"span",12),t._uU(5),t.qZA()()()),2&n){const e=t.oxw();t.xp6(5),t.Oqu(e.description)}}function gn(n,a){1&n&&t._UZ(0,"mat-divider",14)}function Cn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-expansion-panel",23),t.NdJ("opened",function(){return t.CHM(e),t.oxw().onExpansionOpen(!0)})("closed",function(){return t.CHM(e),t.oxw().onExpansionOpen(!1)}),t.TgZ(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"h4",24),t._uU(4),t.qZA(),t.TgZ(5,"h4",25),t._uU(6),t.ALo(7,"number"),t.qZA()()(),t.TgZ(8,"div",8)(9,"div",9)(10,"div",26)(11,"h4",11),t._uU(12,"Fees (mSats)"),t.qZA(),t.TgZ(13,"span",12),t._uU(14),t.ALo(15,"number"),t.qZA()(),t.TgZ(16,"div",26)(17,"h4",11),t._uU(18,"Date/Time"),t.qZA(),t.TgZ(19,"span",12),t._uU(20),t.ALo(21,"date"),t.qZA()()(),t._UZ(22,"mat-divider",14),t.TgZ(23,"div",9)(24,"div",1)(25,"h4",11),t._uU(26,"ID"),t.qZA(),t.TgZ(27,"span",27),t._uU(28),t.qZA()()(),t._UZ(29,"mat-divider",14),t.TgZ(30,"div",9)(31,"div",1)(32,"h4",11),t._uU(33,"To Channel"),t.qZA(),t.TgZ(34,"span",27),t._uU(35),t.qZA()()()()()}if(2&n){const e=a.$implicit,i=a.index,o=t.oxw();t.Q6J("expanded",o.expansionOpen),t.xp6(4),t.hij("Part ",i+1,""),t.xp6(2),t.hij("",t.lcZ(7,7,e.amount)," (Sats)"),t.xp6(8),t.Oqu(t.lcZ(15,9,e.feesPaid)),t.xp6(6),t.Oqu(t.xi3(21,11,e.timestamp,"dd/MMM/y HH:mm")),t.xp6(8),t.Oqu(e.id),t.xp6(7),t.Oqu(e.toChannelAlias)}}let xn=(()=>{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)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-payment-information"]],viewQuery:function(e,i){if(1&e&&t.Gf(_n,5),2&e){let o;t.iGM(o=t.CRH())&&(i.scrollContainer=o.first)}},decls:66,vars:15,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"h-40","padding-gap-x-large",3,"perfectScrollbar"],["scrollContainer",""],["fxLayout","column"],["fxLayout","row"],["fxFlex","30"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],["fxFlex","70"],[1,"w-100","my-1"],["fxLayout","row",4,"ngIf"],["class","w-100 my-1",4,"ngIf"],["class","flat-expansion-panel my-1",3,"expanded","opened","closed",4,"ngFor","ngForOf"],["fxLayout","row","fxLayoutAlign","start end",1,"btn-sticky-container","padding-gap-x-large"],["mat-mini-fab","","aria-label","Scroll Down","fxLayoutAlign","center center",3,"click"],["fxLayoutAlign","center center"],["fxLayout","row","fxLayoutAlign","end center",1,"padding-gap-x-large","padding-gap-bottom-large"],["fxLayoutAlign","center center","tabindex","1","mat-button","","color","primary","type","button","default","",1,"mr-1",3,"mat-dialog-close"],[1,"flat-expansion-panel","my-1",3,"expanded","opened","closed"],["fxFlex","30","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","70","fxLayoutAlign","start",1,"font-bold-500"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Payment Information"),t.qZA()(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6,7)(10,"div",8)(11,"div",9)(12,"div",10)(13,"h4",11),t._uU(14,"Amount (Sats)"),t.qZA(),t.TgZ(15,"span",12),t._uU(16),t.ALo(17,"number"),t.qZA()(),t.TgZ(18,"div",13)(19,"h4",11),t._uU(20,"Date/Time"),t.qZA(),t.TgZ(21,"span",12),t._uU(22),t.ALo(23,"date"),t.qZA()()(),t._UZ(24,"mat-divider",14),t.TgZ(25,"div",9)(26,"div",1)(27,"h4",11),t._uU(28,"ID"),t.qZA(),t.TgZ(29,"span",12),t._uU(30),t.qZA()()(),t._UZ(31,"mat-divider",14),t.TgZ(32,"div",9)(33,"div",1)(34,"h4",11),t._uU(35,"Payment Hash"),t.qZA(),t.TgZ(36,"span",12),t._uU(37),t.qZA()()(),t._UZ(38,"mat-divider",14),t.TgZ(39,"div",9)(40,"div",1)(41,"h4",11),t._uU(42,"Payment Preimage"),t.qZA(),t.TgZ(43,"span",12),t._uU(44),t.qZA()()(),t._UZ(45,"mat-divider",14),t.TgZ(46,"div",9)(47,"div",1)(48,"h4",11),t._uU(49,"Recipient Node"),t.qZA(),t.TgZ(50,"span",12),t._uU(51),t.qZA()()(),t._UZ(52,"mat-divider",14),t.YNc(53,fn,6,1,"div",15),t.YNc(54,gn,1,0,"mat-divider",16),t.TgZ(55,"div",9)(56,"div",1)(57,"mat-accordion"),t.YNc(58,Cn,36,14,"mat-expansion-panel",17),t.qZA()()()()(),t.TgZ(59,"div",18)(60,"button",19),t.NdJ("click",function(){return i.onScrollDown()}),t.TgZ(61,"mat-icon",20),t._uU(62,"arrow_downward"),t.qZA()()(),t.TgZ(63,"div",21)(64,"button",22),t._uU(65,"OK"),t.qZA()()()()),2&e&&(t.xp6(16),t.Oqu(t.lcZ(17,10,i.payment.recipientAmount)),t.xp6(6),t.Oqu(t.xi3(23,12,i.payment.firstPartTimestamp,"dd/MMM/y HH:mm")),t.xp6(8),t.Oqu(i.payment.id),t.xp6(7),t.Oqu(i.payment.paymentHash),t.xp6(7),t.Oqu(i.payment.paymentPreimage),t.xp6(7),t.Oqu(i.payment.recipientNodeAlias),t.xp6(2),t.Q6J("ngIf",i.description),t.xp6(1),t.Q6J("ngIf",i.description),t.xp6(4),t.Q6J("ngForOf",i.payment.parts),t.xp6(6),t.Q6J("mat-dialog-close",!1))},directives:[p.xw,p.Wh,p.yH,T.dk,I.lW,T.dn,Q.$V,G.d,u.O5,H.pp,u.sg,H.ib,H.yz,H.yK,_t.Hw,D.ZT],pipes:[u.JJ,u.uU],styles:[""]}),n})();var K=_(3093);const yn=["sendPaymentForm"];function Ln(n,a){if(1&n&&(t.TgZ(0,"mat-hint"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.paymentDecodedHint)}}function Tn(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Payment request is required."),t.qZA())}function vn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"form",4,5)(2,"mat-form-field",6)(3,"textarea",7,8),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().onPaymentRequestEntry(o)})("matTextareaAutosize",function(){return!0}),t.qZA(),t.YNc(5,Ln,2,1,"mat-hint",9),t.YNc(6,Tn,2,0,"mat-error",9),t.qZA(),t.TgZ(7,"div",10)(8,"button",11),t.NdJ("click",function(){return t.CHM(e),t.oxw().resetData()}),t._uU(9,"Clear Field"),t.qZA(),t.TgZ(10,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw().onSendPayment()}),t._uU(11,"Send Payment"),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.paymentRequest),t.xp6(2),t.Q6J("ngIf",e.paymentRequest&&""!==e.paymentDecodedHint),t.xp6(1),t.Q6J("ngIf",!e.paymentRequest)}}function bn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",13)(1,"button",12),t.NdJ("click",function(){return t.CHM(e),t.oxw().openSendPaymentModal()}),t._uU(2,"Send Payment"),t.qZA()()}}function An(n,a){1&n&&t._UZ(0,"mat-progress-bar",49)}function Zn(n,a){1&n&&(t.TgZ(0,"th",50),t._uU(1,"Date/Time"),t.qZA())}function Sn(n,a){if(1&n&&(t.TgZ(0,"td",51),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,null==e?null:e.firstPartTimestamp,"dd/MMM/y HH:mm"))}}function wn(n,a){1&n&&(t.TgZ(0,"th",50),t._uU(1,"ID"),t.qZA())}const W=function(n){return{"max-width":n}};function En(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"div",52)(2,"span",53),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id)}}function In(n,a){1&n&&(t.TgZ(0,"th",50),t._uU(1,"Destination"),t.qZA())}function On(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"div",52)(2,"span",53),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.recipientNodeAlias)}}function Fn(n,a){1&n&&(t.TgZ(0,"th",54),t._uU(1,"Amount (Sats)"),t.qZA())}function qn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"span",55),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.recipientAmount))}}function Rn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",56)(1,"div",57)(2,"mat-select",58),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",59),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function Nn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",60)(1,"button",61),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onPaymentClick(s)}),t._uU(2,"View Info"),t.qZA()()}}function kn(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No payment available."),t.qZA())}function Pn(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting payments..."),t.qZA())}function Dn(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Un(n,a){if(1&n&&(t.TgZ(0,"td",62),t.YNc(1,kn,2,0,"p",9),t.YNc(2,Pn,2,0,"p",9),t.YNc(3,Dn,2,1,"p",9),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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 Mn(n,a){if(1&n&&(t.TgZ(0,"span",65),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.timestamp,"dd/MMM/y HH:mm")," ")}}function Jn(n,a){if(1&n&&(t.ynx(0),t.YNc(1,Mn,3,4,"span",64),t.BQk()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Qn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"span",63),t._uU(2),t.qZA(),t.YNc(3,Jn,2,1,"ng-container",9),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" Total Attempts: ",null==e||null==e.parts?null:e.parts.length," "),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Yn(n,a){if(1&n&&(t.TgZ(0,"span",63)(1,"span",66)(2,"span",53),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id)}}function Hn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Yn,4,4,"span",67),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Bn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"div",66)(2,"span",53),t._uU(3),t.qZA()(),t.YNc(4,Hn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(3,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.id),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function zn(n,a){if(1&n&&(t.TgZ(0,"span",63)(1,"span",66)(2,"span",53),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw(4);t.xp6(1),t.Q6J("ngStyle",t.VKq(2,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(e.toChannelAlias)}}function Vn(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,zn,4,4,"span",67),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Gn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"div",66)(2,"span",53),t._uU(3),t.qZA()(),t.YNc(4,Vn,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(1),t.Q6J("ngStyle",t.VKq(3,W,i.screenSize===i.screenSizeEnum.XS?"10rem":"22rem")),t.xp6(2),t.Oqu(null==e?null:e.recipientNodeAlias),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function Xn(n,a){if(1&n&&(t.TgZ(0,"span",68),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.xi3(2,1,e.amount,"1.0-0")," ")}}function $n(n,a){if(1&n&&(t.TgZ(0,"span"),t.YNc(1,Xn,3,4,"span",69),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function Wn(n,a){if(1&n&&(t.TgZ(0,"td",51)(1,"span",68),t._uU(2),t.ALo(3,"number"),t.qZA(),t.YNc(4,$n,2,1,"span",9),t.qZA()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.xi3(3,2,null==e?null:e.recipientAmount,"1.0-0")),t.xp6(2),t.Q6J("ngIf",e.is_expanded)}}function Kn(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",71)(1,"button",74),t.NdJ("click",function(){const s=t.CHM(e).$implicit,c=t.oxw(2).$implicit;return t.oxw(2).onPartClick(s,c)}),t._uU(2),t.qZA()()}if(2&n){const e=a.index;t.xp6(2),t.hij("View ",e+1,"")}}function jn(n,a){if(1&n&&(t.TgZ(0,"div"),t.YNc(1,Kn,3,1,"div",73),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngForOf",null==e?null:e.parts)}}function ti(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",70)(1,"span",71)(2,"button",72),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return s.is_expanded=!s.is_expanded}),t._uU(3),t.qZA()(),t.YNc(4,jn,2,1,"div",9),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(3),t.Oqu(e.is_expanded?"Hide":"Show"),t.xp6(1),t.Q6J("ngIf",e.is_expanded)}}function ei(n,a){1&n&&t._UZ(0,"tr",75)}const ni=function(n){return{"display-none":n}};function ii(n,a){if(1&n&&t._UZ(0,"tr",76),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,ni,(null==e.payments?null:e.payments.data)&&(null==e.payments||null==e.payments.data?null:e.payments.data.length)>0))}}function ai(n,a){1&n&&t._UZ(0,"tr",77)}function oi(n,a){1&n&&t._UZ(0,"tr",75)}const si=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},li=function(){return["no_payment"]};function ri(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",14)(1,"div",15)(2,"div",16),t._UZ(3,"fa-icon",17),t.TgZ(4,"span",18),t._uU(5,"Payments History"),t.qZA()(),t.TgZ(6,"mat-form-field",19)(7,"input",20),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().selFilter=o}),t.qZA()()(),t.TgZ(8,"div",21)(9,"div",22),t.YNc(10,An,1,0,"mat-progress-bar",23),t.TgZ(11,"table",24,25),t.ynx(13,26),t.YNc(14,Zn,2,0,"th",27),t.YNc(15,Sn,3,4,"td",28),t.BQk(),t.ynx(16,29),t.YNc(17,wn,2,0,"th",27),t.YNc(18,En,4,4,"td",28),t.BQk(),t.ynx(19,30),t.YNc(20,In,2,0,"th",27),t.YNc(21,On,4,4,"td",28),t.BQk(),t.ynx(22,31),t.YNc(23,Fn,2,0,"th",32),t.YNc(24,qn,4,3,"td",28),t.BQk(),t.ynx(25,33),t.YNc(26,Rn,6,0,"th",34),t.YNc(27,Nn,3,0,"td",35),t.BQk(),t.ynx(28,36),t.YNc(29,Un,4,3,"td",37),t.BQk(),t.ynx(30,38),t.YNc(31,Qn,4,2,"td",28),t.BQk(),t.ynx(32,39),t.YNc(33,Bn,5,5,"td",28),t.BQk(),t.ynx(34,40),t.YNc(35,Gn,5,5,"td",28),t.BQk(),t.ynx(36,41),t.YNc(37,Wn,5,5,"td",28),t.BQk(),t.ynx(38,42),t.YNc(39,ti,5,2,"td",43),t.BQk(),t.YNc(40,ei,1,0,"tr",44),t.YNc(41,ii,1,3,"tr",45),t.YNc(42,ai,1,0,"tr",46),t.YNc(43,oi,1,0,"tr",47),t.qZA()()(),t._UZ(44,"mat-paginator",48),t.qZA()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("icon",e.faHistory),t.xp6(4),t.Q6J("ngModel",e.selFilter),t.xp6(3),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.payments)("ngClass",t.VKq(14,si,""!==e.errorMessage)),t.xp6(29),t.Q6J("matRowDefColumns",e.partColumns)("matRowDefWhen",e.is_group),t.xp6(1),t.Q6J("matFooterRowDef",t.DdM(16,li)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let xt=(()=>{class n{constructor(e,i,o,s,c,f,F){this.logger=e,this.commonService=i,this.store=o,this.rtlEffects=s,this.decimalPipe=c,this.dataService=f,this.datePipe=F,this.calledFrom="transactions",this.faHistory=L.qO$,this.newlyAddedPayment="",this.selNode={},this.information={},this.paymentJSONArr=[],this.paymentDecoded={},this.displayedColumns=[],this.partColumns=[],this.paymentRequest="",this.paymentDecodedHint="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","actions"],this.partColumns=["groupTotal","groupAction"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","recipientAmount","actions"],this.partColumns=["groupTotal","groupAmount","groupAction"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["firstPartTimestamp","id","recipientAmount","actions"],this.partColumns=["groupTotal","groupId","groupAmount","groupAction"]):(this.flgSticky=!0,this.displayedColumns=["firstPartTimestamp","id","recipientNodeAlias","recipientAmount","actions"],this.partColumns=["groupTotal","groupId","groupChannelAlias","groupAmount","groupAction"])}ngOnInit(){this.store.select(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.PP).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.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.loadPaymentsTable(this.paymentJSONArr),this.logger.info(e)})}ngAfterViewInit(){this.loadPaymentsTable(this.paymentJSONArr)}loadPaymentsTable(e){this.payments=new r.by(e?[...e]:[]),this.payments.sort=this.sort,this.payments.sortingDataAccessor=(i,o)=>{switch(o){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[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null}},this.payments.filterPredicate=(i,o)=>((i.firstPartTimestamp?this.datePipe.transform(new Date(i.firstPartTimestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.payments.paginator=this.paginator,this.applyFilter()}onSendPayment(){if(!this.paymentRequest)return!0;this.paymentDecoded.timestamp?this.sendPayment():this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,B.q)(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,Z.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Confirm Send Payment",noBtnText:"Cancel",yesBtnText:"Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:50,type:l.Gi.DATE_TIME},{key:"amount",value:this.paymentDecoded.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:50,type:l.Gi.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:50}]]}}})),this.rtlEffects.closeConfirm.pipe((0,B.q)(1)).subscribe(i=>{i&&(this.store.dispatch((0,N.oV)({payload:{invoice:this.paymentRequest,fromDialog:!1}})),this.resetData())})):(this.store.dispatch((0,Z.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Enter Amount and Confirm Send Payment",message:[[{key:"paymentHash",value:this.paymentDecoded.paymentHash,title:"Payment Hash",width:100}],[{key:"nodeId",value:this.paymentDecoded.nodeId,title:"Payee",width:100}],[{key:"description",value:this.paymentDecoded.description,title:"Description",width:100}],[{key:"timestamp",value:this.paymentDecoded.timestamp,title:"Creation Date",width:40,type:l.Gi.DATE_TIME},{key:"expiry",value:this.paymentDecoded.expiry,title:"Expiry",width:30,type:l.Gi.NUMBER},{key:"minFinalCltvExpiry",value:this.paymentDecoded.minFinalCltvExpiry,title:"CLTV Expiry",width:30}]],noBtnText:"Cancel",yesBtnText:"Send Payment",flgShowInput:!0,titleMessage:"It is a zero amount invoice. Enter the amount (Sats) to pay.",getInputs:[{placeholder:"Amount (Sats)",inputType:l.Gi.NUMBER.toLowerCase(),inputValue:"",width:30}]}}})),this.rtlEffects.closeConfirm.pipe((0,B.q)(1)).subscribe(o=>{o&&(this.paymentDecoded.amount=o[0].inputValue,this.store.dispatch((0,N.oV)({payload:{invoice:this.paymentRequest,amountMsat:1e3*o[0].inputValue,fromDialog:!1}})),this.resetData())}))}onPaymentRequestEntry(e){this.paymentRequest=e,this.paymentDecodedHint="",this.paymentRequest&&this.paymentRequest.length>100&&this.dataService.decodePayment(this.paymentRequest,!1).pipe((0,B.q)(1)).subscribe(i=>{this.paymentDecoded=i,this.paymentDecoded.amount?this.selNode.fiatConversion?this.commonService.convertCurrency(+this.paymentDecoded.amount,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits[2],this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats ("+o.symbol+this.decimalPipe.transform(o.OTHER?o.OTHER:0,l.Xz.OTHER)+") | Memo: "+this.paymentDecoded.description},error:o=>{this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description+". Unable to convert currency."}}):this.paymentDecodedHint="Sending: "+this.decimalPipe.transform(this.paymentDecoded.amount?this.paymentDecoded.amount:0)+" Sats | Memo: "+this.paymentDecoded.description:this.paymentDecodedHint="Zero Amount Invoice | Memo: "+this.paymentDecoded.description})}openSendPaymentModal(){this.store.dispatch((0,Z.qR)({payload:{data:{component:hn}}}))}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,B.q)(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,Z.qR)({payload:{data:{sentPaymentInfo:i,payment:e,component:xn}}}))}onPartClick(e,i){i.paymentHash&&""!==i.paymentHash.trim()?this.dataService.decodePayments(i.paymentHash).pipe((0,B.q)(1)).subscribe({next:o=>{setTimeout(()=>{this.showPartView(e,i,o.length&&o.length>0?o[0]:[])},0)},error:o=>{this.showPartView(e,i,[])}}):this.showPartView(e,i,[])}showPartView(e,i,o){const s=[[{key:"paymentHash",value:i.paymentHash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"paymentPreimage",value:i.paymentPreimage,title:"Payment Preimage",width:100,type:l.Gi.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"Channel",width:100,type:l.Gi.STRING}],[{key:"id",value:e.id,title:"Part ID",width:50,type:l.Gi.STRING},{key:"timestamp",value:e.timestamp,title:"Time",width:50,type:l.Gi.DATE_TIME}],[{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER},{key:"feesPaid",value:e.feesPaid,title:"Fee (Sats)",width:50,type:l.Gi.NUMBER}]];o.length>0&&o[0].paymentRequest&&o[0].paymentRequest.description&&""!==o[0].paymentRequest.description&&s.splice(3,0,[{key:"description",value:o[0].paymentRequest.description,title:"Description",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Payment Part Information",message:s}}}))}applyFilter(){this.payments.filter=this.selFilter.trim().toLowerCase()}onDownloadCSV(){if(this.payments.data&&this.payments.data.length>0){const e=JSON.parse(JSON.stringify(this.payments.data)),i=e.reduce((o,s)=>(s.paymentHash&&""!==s.paymentHash.trim()&&(o=""===o?s.paymentHash:o+","+s.paymentHash),o),"");this.dataService.decodePayments(i).pipe((0,h.R)(this.unSubs[4])).subscribe(o=>{o.forEach((c,f)=>{c.length>0&&c[0].paymentRequest&&c[0].paymentRequest.description&&""!==c[0].paymentRequest.description&&(e[f].description=c[0].paymentRequest.description)});const s=e.reduce((c,f)=>c.concat(f),[]);this.commonService.downloadFile(s,"Payments")})}}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh),t.Y36(K.V),t.Y36(u.JJ),t.Y36(Ct.D),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lightning-payments"]],viewQuery:function(e,i){if(1&e&&(t.Gf(yn,5),t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first),t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{calledFrom:"calledFrom"},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Payments")}])],decls:4,vars:3,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",4,"ngIf"],["fxLayout","row",4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",4,"ngIf"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["sendPaymentForm","ngForm"],["fxFlex","100"],["matInput","","placeholder","Payment Request","name","paymentRequest","tabindex","1","required","",3,"perfectScrollbar","ngModel","ngModelChange","matTextareaAutosize"],["paymentReq","ngModel"],[4,"ngIf"],["fxLayout","row",1,"mt-1"],["mat-stroked-button","","color","primary","tabindex","2","type","reset",1,"mr-1",3,"click"],["mat-flat-button","","color","primary","tabindex","3",3,"click"],["fxLayout","row"],["fxLayout","column","fxLayoutAlign","start stretch"],["fxLayout","column","fxLayoutAlign","start stretch","fxLayout.gt-sm","row wrap",1,"page-sub-title-container","mt-1"],["fxFlex","70","fxLayoutAlign","start start","fxLayoutAlign.gt-sm","start center"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30","fxLayoutAlign","start end"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","row","fxLayoutAlign","start start"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","firstPartTimestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","id"],["matColumnDef","recipientNodeAlias"],["matColumnDef","recipientAmount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_payment"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["matColumnDef","groupTotal"],["matColumnDef","groupId"],["matColumnDef","groupChannelAlias"],["matColumnDef","groupAmount"],["matColumnDef","groupAction"],["mat-cell","","class","px-3",4,"matCellDef"],["mat-row","",4,"matRowDef","matRowDefColumns","matRowDefWhen"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],[1,"ellipsis-child"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],["fxLayoutAlign","start center",1,"part-row-span"],["fxLayoutAlign","start center","class","part-row-span pl-3",4,"ngFor","ngForOf"],["fxLayoutAlign","start center",1,"part-row-span","pl-3"],["fxLayoutAlign","start center",1,"ellipsis-parent","part-row-span",3,"ngStyle"],["fxLayoutAlign","start center","class","part-row-span",4,"ngFor","ngForOf"],["fxLayoutAlign","end center",1,"part-row-span"],["fxLayoutAlign","end center","class","part-row-span",4,"ngFor","ngForOf"],["mat-cell","",1,"px-3"],["fxLayoutAlign","end start"],["mat-flat-button","","color","primary","type","button","tabindex","5",1,"btn-part-expand",3,"click"],["fxLayoutAlign","end start",4,"ngFor","ngForOf"],["mat-stroked-button","","color","primary","type","button","tabindex","6",1,"btn-part-info",3,"click"],["mat-row",""],["mat-footer-row","",3,"ngClass"],["mat-header-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,vn,12,3,"form",1),t.YNc(2,bn,3,0,"div",2),t.YNc(3,ri,45,17,"div",3),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf","home"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom),t.xp6(1),t.Q6J("ngIf","transactions"===i.calledFrom))},directives:[p.xw,p.yH,p.Wh,u.O5,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,m.Q7,Q.$V,m.JJ,m.On,y.bx,y.TO,I.lW,O.BN,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,P.gD,P.$L,Y.ey,r.mD,r.yh,u.sg,r.nj,r.Gk,r.Ke,r.Q2,r.as,r.XQ,A.NW],pipes:[u.uU,u.JJ],styles:[".mat-column-id[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%], .mat-column-groupChannelAlias[_ngcontent-%COMP%]{padding:0 1rem;flex:0 0 25%;width:25%}.mat-column-id[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-recipientNodeAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%], .mat-column-groupChannelAlias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-actions[_ngcontent-%COMP%], .mat-column-groupAction[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-part-expand[_ngcontent-%COMP%]{width:9rem}.mat-column-groupAction[_ngcontent-%COMP%] .btn-part-info[_ngcontent-%COMP%]{margin-top:.5rem;width:9rem}.part-row-span[_ngcontent-%COMP%]{min-height:4.2rem;place-content:center flex-start;align-items:center}.mat-column-groupTotal[_ngcontent-%COMP%]{min-width:15rem}"]}),n})();function ci(n,a){if(1&n&&(t.TgZ(0,"button",26)(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA()()),2&n){t.oxw();const e=t.MAs(11);t.Q6J("matMenuTriggerFor",e)}}function ui(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",27),t.NdJ("click",function(){const s=t.CHM(e).index,c=t.oxw().$implicit;return t.oxw(2).onNavigateTo(c.links[s])}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}function pi(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",27),t.NdJ("click",function(){return t.CHM(e),t.oxw(3).onsortChannelsBy()}),t._uU(1),t.qZA()}if(2&n){const e=t.oxw(3);t.xp6(1),t.hij("Sort By ","Balance Score"===e.sortField?"Capacity":"Balance Score","")}}function mi(n,a){1&n&&t._UZ(0,"mat-progress-bar",28)}function di(n,a){if(1&n&&t._UZ(0,"rtl-ecl-node-info",29),2&n){const e=t.oxw(3);t.Q6J("information",e.information)("showColorFieldSeparately",!1)}}function hi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-balances-info",30),2&n){const e=t.oxw(3);t.Q6J("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function _i(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-capacity-info",31),2&n){const e=t.oxw(3);t.Q6J("sortBy",e.sortField)("channelBalances",e.channelBalances)("allChannels",e.allChannelsCapacity)("errorMessage",e.errorMessages[2])}}function fi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-fee-info",32),2&n){const e=t.oxw(3);t.Q6J("fees",e.fees)("errorMessage",e.errorMessages[1])}}function gi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-status-info",33),2&n){const e=t.oxw(3);t.Q6J("channelsStatus",e.channelsStatus)("errorMessage",e.errorMessages[2])}}function Ci(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find information!"),t.qZA())}const yt=function(n){return{"dashboard-card-content":!0,"error-border":n}};function xi(n,a){if(1&n&&(t.TgZ(0,"mat-grid-tile",8)(1,"mat-card",9)(2,"mat-card-header")(3,"mat-card-title",10)(4,"div"),t._UZ(5,"fa-icon",11),t.TgZ(6,"span"),t._uU(7),t.qZA()(),t.TgZ(8,"div"),t.YNc(9,ci,3,1,"button",12),t.TgZ(10,"mat-menu",13,14),t.YNc(12,ui,2,1,"button",15),t.YNc(13,pi,2,1,"button",16),t.qZA()()()(),t.TgZ(14,"mat-card-content",17),t.YNc(15,mi,1,0,"mat-progress-bar",18),t.TgZ(16,"div",19),t.YNc(17,di,1,2,"rtl-ecl-node-info",20),t.YNc(18,hi,1,2,"rtl-ecl-balances-info",21),t.YNc(19,_i,1,4,"rtl-ecl-channel-capacity-info",22),t.YNc(20,fi,1,2,"rtl-ecl-fee-info",23),t.YNc(21,gi,1,2,"rtl-ecl-channel-status-info",24),t.YNc(22,Ci,2,0,"h3",25),t.qZA()()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("colspan",e.cols)("rowspan",e.rows),t.xp6(5),t.Q6J("icon",e.icon),t.xp6(2),t.Oqu(e.title),t.xp6(2),t.Q6J("ngIf",e.links[0]),t.xp6(3),t.Q6J("ngForOf",e.goToOptions),t.xp6(1),t.Q6J("ngIf","capacity"===e.id),t.xp6(1),t.s9C("fxFlex","capacity"===e.id?90:70),t.Q6J("ngClass",t.VKq(16,yt,"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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("ngSwitch",e.id),t.xp6(1),t.Q6J("ngSwitchCase","node"),t.xp6(1),t.Q6J("ngSwitchCase","balance"),t.xp6(1),t.Q6J("ngSwitchCase","capacity"),t.xp6(1),t.Q6J("ngSwitchCase","fee"),t.xp6(1),t.Q6J("ngSwitchCase","status")}}function yi(n,a){if(1&n&&(t.TgZ(0,"div",2)(1,"div",3),t._UZ(2,"fa-icon",4),t.TgZ(3,"span",5),t._uU(4),t.qZA()(),t.TgZ(5,"mat-grid-list",6),t.YNc(6,xi,23,18,"mat-grid-tile",7),t.qZA()()),2&n){const e=t.oxw();t.xp6(2),t.Q6J("icon",e.apiCallStatusNodeInfo.status===e.apiCallStatusEnum.ERROR?e.faFrown:e.faSmile),t.xp6(2),t.Oqu(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.xp6(1),t.Q6J("rowHeight",e.operatorCardHeight),t.xp6(1),t.Q6J("ngForOf",e.operatorCards)}}function Li(n,a){if(1&n&&(t.TgZ(0,"button",26)(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA()()),2&n){t.oxw();const e=t.MAs(9);t.Q6J("matMenuTriggerFor",e)}}function Ti(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",27),t.NdJ("click",function(){const s=t.CHM(e).index,c=t.oxw(2).$implicit;return t.oxw(2).onNavigateTo(c.links[s])}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}function vi(n,a){if(1&n&&(t.TgZ(0,"mat-card-header")(1,"mat-card-title",10)(2,"div"),t._UZ(3,"fa-icon",11),t.TgZ(4,"span"),t._uU(5),t.qZA()(),t.TgZ(6,"div"),t.YNc(7,Li,3,1,"button",12),t.TgZ(8,"mat-menu",13,42),t.YNc(10,Ti,2,1,"button",15),t.qZA()()()()),2&n){const e=t.oxw().$implicit;t.xp6(3),t.Q6J("icon",e.icon),t.xp6(2),t.Oqu(e.title),t.xp6(2),t.Q6J("ngIf",e.links[0]),t.xp6(3),t.Q6J("ngForOf",e.goToOptions)}}function bi(n,a){1&n&&t._UZ(0,"mat-progress-bar",28)}function Ai(n,a){if(1&n&&t._UZ(0,"rtl-ecl-node-info",43),2&n){const e=t.oxw(3);t.Q6J("information",e.information)}}function Zi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-balances-info",30),2&n){const e=t.oxw(3);t.Q6J("balances",e.balances)("errorMessage",e.errorMessages[2]+" "+e.errorMessages[3])}}function Si(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-liquidity-info",44),2&n){const e=t.oxw(3);t.Q6J("direction","In")("totalLiquidity",e.totalInboundLiquidity)("allChannels",e.allInboundChannels)("errorMessage",e.errorMessages[2])}}function wi(n,a){if(1&n&&t._UZ(0,"rtl-ecl-channel-liquidity-info",44),2&n){const e=t.oxw(3);t.Q6J("direction","Out")("totalLiquidity",e.totalOutboundLiquidity)("allChannels",e.allOutboundChannels)("errorMessage",e.errorMessages[2])}}function Ei(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",27),t.NdJ("click",function(){const s=t.CHM(e).index,c=t.oxw(3).$implicit;return t.oxw(2).onNavigateTo(c.links[s])}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e)}}function Ii(n,a){if(1&n&&(t.TgZ(0,"button",26)(1,"mat-icon"),t._uU(2,"more_vert"),t.qZA()(),t.TgZ(3,"mat-menu",13,53),t.YNc(5,Ei,2,1,"button",15),t.qZA()),2&n){const e=t.MAs(4),i=t.oxw(2).$implicit;t.Q6J("matMenuTriggerFor",e),t.xp6(5),t.Q6J("ngForOf",i.goToOptions)}}function Oi(n,a){1&n&&(t.TgZ(0,"span",45)(1,"mat-tab-group",46)(2,"mat-tab",47),t._UZ(3,"rtl-ecl-lightning-invoices",48),t.qZA(),t.TgZ(4,"mat-tab",49),t._UZ(5,"rtl-ecl-lightning-payments",50),t.qZA(),t.TgZ(6,"mat-tab",51),t.YNc(7,Ii,6,2,"ng-template",52),t.qZA()()()),2&n&&(t.xp6(3),t.Q6J("calledFrom","home"),t.xp6(2),t.Q6J("calledFrom","home"),t.xp6(1),t.Q6J("disabled",!0))}function Fi(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find information!"),t.qZA())}const qi=function(n){return{"p-0":n}};function Ri(n,a){if(1&n&&(t.TgZ(0,"mat-grid-tile",8)(1,"mat-card",36),t.YNc(2,vi,11,4,"mat-card-header",37),t.TgZ(3,"mat-card-content",38),t.YNc(4,bi,1,0,"mat-progress-bar",18),t.TgZ(5,"div",19),t.YNc(6,Ai,1,1,"rtl-ecl-node-info",39),t.YNc(7,Zi,1,2,"rtl-ecl-balances-info",21),t.YNc(8,Si,1,4,"rtl-ecl-channel-liquidity-info",40),t.YNc(9,wi,1,4,"rtl-ecl-channel-liquidity-info",40),t.YNc(10,Oi,8,3,"span",41),t.YNc(11,Fi,2,0,"h3",25),t.qZA()()()()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("colspan",e.cols)("rowspan",e.rows),t.xp6(1),t.Q6J("ngClass",t.VKq(13,qi,"transactions"===e.id)),t.xp6(1),t.Q6J("ngIf","transactions"!==e.id),t.xp6(1),t.s9C("fxFlex","transactions"===e.id?100:"balance"===e.id?70:90),t.Q6J("ngClass",t.VKq(15,yt,"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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("ngSwitch",e.id),t.xp6(1),t.Q6J("ngSwitchCase","node"),t.xp6(1),t.Q6J("ngSwitchCase","balance"),t.xp6(1),t.Q6J("ngSwitchCase","inboundLiq"),t.xp6(1),t.Q6J("ngSwitchCase","outboundLiq"),t.xp6(1),t.Q6J("ngSwitchCase","transactions")}}function Ni(n,a){if(1&n&&(t.TgZ(0,"div",34),t._UZ(1,"fa-icon",4),t.TgZ(2,"span",5),t._uU(3),t.qZA()(),t.TgZ(4,"mat-grid-list",35),t.YNc(5,Ri,12,17,"mat-grid-tile",7),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faSmile),t.xp6(2),t.hij("Welcome ",e.information.alias,"! Your node is up and running."),t.xp6(1),t.Q6J("rowHeight",e.merchantCardHeight),t.xp6(1),t.Q6J("ngForOf",e.merchantCards)}}let ki=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.commonService=o,this.router=s,this.faSmile=dt.ctA,this.faFrown=dt.KfU,this.faAngleDoubleDown=L.Sbq,this.faAngleDoubleUp=L.Vfw,this.faChartPie=L.OS1,this.faBolt=L.BDt,this.faServer=L.xf3,this.faNetworkWired=L.kXW,this.userPersonaEnum=l.ol,this.channelBalances={localBalance:0,remoteBalance:0,balancedness:0},this.selNode={},this.information={},this.channels=[],this.onchainBalance={},this.balances={onchain:-1,lightning:-1,total:0},this.channelsStatus={},this.allChannelsCapacity=[],this.allInboundChannels=[],this.allOutboundChannels=[],this.totalInboundLiquidity=0,this.totalOutboundLiquidity=0,this.operatorCards=[],this.merchantCards=[],this.screenSize="",this.operatorCardHeight="330px",this.merchantCardHeight="65px",this.sortField="Balance Score",this.errorMessages=["","","",""],this.apiCallStatusNodeInfo={status:l.Bn.COMPLETED},this.apiCallStatusFees={status:l.Bn.COMPLETED},this.apiCallStatusOCBal={status:l.Bn.COMPLETED},this.apiCallStatusAllChannels={status:l.Bn.COMPLETED},this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.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.cu.SM||this.screenSize===l.cu.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(C.pg).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.selNode=e}),this.store.select(C.T$).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.errorMessages[0]="",this.apiCallStatusNodeInfo=e.apiCallStatus,this.apiCallStatusNodeInfo.status===l.Bn.ERROR&&(this.errorMessages[0]="object"==typeof this.apiCallStatusNodeInfo.message?JSON.stringify(this.apiCallStatusNodeInfo.message):this.apiCallStatusNodeInfo.message),this.information=e.information}),this.store.select(C.JG).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.errorMessages[1]="",this.apiCallStatusFees=e.apiCallStatus,this.apiCallStatusFees.status===l.Bn.ERROR&&(this.errorMessages[1]="object"==typeof this.apiCallStatusFees.message?JSON.stringify(this.apiCallStatusFees.message):this.apiCallStatusFees.message),this.fees=e.fees}),this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[3]),(0,et.M)(this.store.select(C.kY))).subscribe(([e,i])=>{this.errorMessages[2]="",this.errorMessages[3]="",this.apiCallStatusAllChannels=e.apiCallStatus,this.apiCallStatusOCBal=i.apiCallStatus,this.apiCallStatusAllChannels.status===l.Bn.ERROR&&(this.errorMessages[2]="object"==typeof this.apiCallStatusAllChannels.message?JSON.stringify(this.apiCallStatusAllChannels.message):this.apiCallStatusAllChannels.message),this.apiCallStatusOCBal.status===l.Bn.ERROR&&(this.errorMessages[3]="object"==typeof this.apiCallStatusOCBal.message?JSON.stringify(this.apiCallStatusOCBal.message):this.apiCallStatusOCBal.message),this.channels=e.activeChannels,this.onchainBalance=i.onchainBalance,this.balances.onchain=this.onchainBalance.total,this.balances.lightning=e.lightningBalance.localBalance,this.balances.total=this.balances.lightning+this.balances.onchain,this.balances=Object.assign({},this.balances);const o=e.lightningBalance.localBalance?+e.lightningBalance.localBalance:0,s=e.lightningBalance.remoteBalance?+e.lightningBalance.remoteBalance:0;this.channelBalances={localBalance:o,remoteBalance:s,balancedness:+(1-Math.abs((o-s)/(o+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(f=>f.toRemote>0),"toRemote"))),this.allOutboundChannels=JSON.parse(JSON.stringify(this.commonService.sortDescByKey(this.channels.filter(f=>f.toLocal>0),"toLocal"))),this.channels.forEach(f=>{this.totalInboundLiquidity=this.totalInboundLiquidity+Math.ceil(f.toRemote),this.totalOutboundLiquidity=this.totalOutboundLiquidity+Math.floor(f.toLocal)}),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 o=+e.toLocal+ +e.toRemote,s=+i.toLocal+ +i.toRemote;return o>s?-1:o{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(R.v),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-home"]],decls:3,vars:2,consts:[["fxLayout","column",4,"ngIf","ngIfElse"],["merchantDashboard",""],["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start start",1,"page-title-container","mb-0"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["cols","10",3,"rowHeight"],[3,"colspan","rowspan",4,"ngFor","ngForOf"],[3,"colspan","rowspan"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4"],["fxLayoutAlign","space-between center"],[1,"mr-1",3,"icon"],["mat-icon-button","","class","more-button","aria-label","Toggle menu",3,"matMenuTriggerFor",4,"ngIf"],["xPosition","before",1,"dashboard-vert-menu"],["menuOperator","matMenu"],["mat-menu-item","",3,"click",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-0"],["cols","6",3,"rowHeight"],["fxFlex","100","fxLayout","column","fxLayoutAlign","start stretch",1,"h-100","dashboard-card","mt-4",3,"ngClass"],[4,"ngIf"],["fxLayout","column","fxLayoutAlign","start stretch",3,"fxFlex","ngClass"],["fxFlex","100",3,"information",4,"ngSwitchCase"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage",4,"ngSwitchCase"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start",4,"ngSwitchCase"],["menuMerchant","matMenu"],["fxFlex","100",3,"information"],["fxFlex","100",3,"direction","totalLiquidity","allChannels","errorMessage"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between start"],["fxLayout","column",1,"w-100","dashboard-tabs-group"],["label","Receive"],[1,"h-100",3,"calledFrom"],["label","Pay"],[3,"calledFrom"],[3,"disabled"],["mat-tab-label",""],["menuTransactions","matMenu"]],template:function(e,i){if(1&e&&(t.YNc(0,yi,7,4,"div",0),t.YNc(1,Ni,6,4,"ng-template",null,1,t.W1O)),2&e){const o=t.MAs(2);t.Q6J("ngIf",(null==i.selNode?null:i.selNode.userPersona)===i.userPersonaEnum.OPERATOR)("ngIfElse",o)}},directives:[u.O5,p.xw,p.Wh,O.BN,ht.Il,u.sg,ht.DX,T.a8,p.yH,T.dk,T.n5,I.lW,nt.p6,_t.Hw,nt.VK,nt.OP,T.dn,u.mk,w.oO,M.pW,u.RF,u.n9,Yt,zt,te,ie,se,u.ED,ye,k.SP,k.uX,gt,xt,k.uD],styles:[""]}),n})();var Pi=_(8377);const Di=["form"];function Ui(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Bitcoin address is required."),t.qZA())}function Mi(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.amountError)}}function Ji(n,a){if(1&n&&(t.TgZ(0,"mat-option",29),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(e)}}function Qi(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Target Confirmation Blocks is required."),t.qZA())}function Yi(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.sendFundError)}}function Hi(n,a){if(1&n&&(t.TgZ(0,"div",30),t._UZ(1,"fa-icon",31),t.YNc(2,Yi,2,1,"span",12),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.sendFundError)}}let Lt=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.logger=i,this.store=o,this.commonService=s,this.decimalPipe=c,this.actions=f,this.faExclamationTriangle=L.eHv,this.selNode={},this.addressTypes=[],this.selectedAddress=l._t[1],this.blockchainBalance={},this.information={},this.newAddress="",this.transaction={},this.sendFundError="",this.fiatConversion=!1,this.amountUnits=l.uA,this.selAmountUnit=l.uA[0],this.currConvertorRate={},this.unitConversionValue=0,this.currencyUnitFormats=l.Xz,this.amountError="Amount is Required.",this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.store.select(Pi.dT).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.fiatConversion=e.settings.fiatConversion,this.amountUnits=e.settings.currencyUnits,this.logger.info(e)}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.UPDATE_API_CALL_STATUS_ECL||e.type===l.lr.SEND_ONCHAIN_FUNDS_RES_ECL)).subscribe(e=>{e.type===l.lr.SEND_ONCHAIN_FUNDS_RES_ECL&&(this.store.dispatch((0,Z.jW)({payload:"Fund Sent Successfully!"})),this.dialogRef.close()),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"SendOnchainFunds"===e.payload.action&&(this.sendFundError=e.payload.message)})}onSendFunds(){if(this.invalidValues)return!0;this.sendFundError="",this.transaction.amount&&this.selAmountUnit!==l.NT.SATS?this.commonService.convertCurrency(this.transaction.amount,this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit,l.NT.SATS,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[2])).subscribe({next:e=>{this.transaction.amount=parseInt(e[l.NT.SATS]),this.selAmountUnit=l.NT.SATS,this.store.dispatch((0,N.Iy)({payload:this.transaction}))},error:e=>{this.transaction.amount=null,this.selAmountUnit=l.NT.SATS,this.amountError="Conversion Error: "+e}}):this.store.dispatch((0,N.Iy)({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,o=this.selAmountUnit===this.amountUnits[2]?l.NT.OTHER:this.selAmountUnit;let s=e.value===this.amountUnits[2]?l.NT.OTHER:e.value;this.transaction.amount&&this.selAmountUnit!==e.value&&this.commonService.convertCurrency(this.transaction.amount,o,s,this.amountUnits[2],this.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:c=>{this.selAmountUnit=e.value,i.transaction.amount=+i.decimalPipe.transform(c[s],i.currencyUnitFormats[s]).replace(/,/g,"")},error:c=>{i.transaction.amount=null,this.amountError="Conversion Error: "+c,this.selAmountUnit=o,s=o}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(q.mQ),t.Y36(S.yh),t.Y36(R.v),t.Y36(u.JJ),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-send-modal"]],viewQuery:function(e,i){if(1&e&&t.Gf(Di,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:36,vars:15,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","default","","mat-button","",1,"btn-close-x","p-0",3,"mat-dialog-close"],[1,"padding-gap-x-large"],["fxLayout","row wrap","fxFlex","100","fxLayoutAlign","space-between start",1,"overflow-x-hidden",3,"submit","reset"],["form","ngForm"],["fxFlex","55"],["matInput","","autoFocus","","placeholder","Bitcoin Address","tabindex","1","name","addr","required","",3,"ngModel","ngModelChange"],["addrs","ngModel"],[4,"ngIf"],["fxFlex","30"],["matInput","","placeholder","Amount","name","amt","type","number","tabindex","2","required","",3,"ngModel","step","min","ngModelChange"],["amnt","ngModel"],["matSuffix",""],["fxFlex","10","fxLayoutAlign","start end"],["tabindex","3","required","","name","amountUnit",3,"value","selectionChange"],[3,"value",4,"ngFor","ngForOf"],["fxFlex","60","fxLayoutAlign","space-between stretch","fxLayout","row wrap"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","placeholder","Target Confirmation Blocks","type","number","name","blocks","tabindex","8","required","true",3,"ngModel","step","min","ngModelChange"],["blocks","ngModel"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","end center"],["mat-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(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Send Payment"),t.qZA()(),t.TgZ(6,"button",5),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"form",7,8),t.NdJ("submit",function(){return i.onSendFunds()})("reset",function(){return i.resetData()}),t.TgZ(11,"mat-form-field",9)(12,"input",10,11),t.NdJ("ngModelChange",function(s){return i.transaction.address=s}),t.qZA(),t.YNc(14,Ui,2,0,"mat-error",12),t.qZA(),t.TgZ(15,"mat-form-field",13)(16,"input",14,15),t.NdJ("ngModelChange",function(s){return i.transaction.amount=s}),t.qZA(),t.TgZ(18,"span",16),t._uU(19),t.qZA(),t.YNc(20,Mi,2,1,"mat-error",12),t.qZA(),t.TgZ(21,"mat-form-field",17)(22,"mat-select",18),t.NdJ("selectionChange",function(s){return i.onAmountUnitChange(s)}),t.YNc(23,Ji,2,2,"mat-option",19),t.qZA()(),t.TgZ(24,"div",20)(25,"mat-form-field",21)(26,"input",22,23),t.NdJ("ngModelChange",function(s){return i.transaction.blocks=s}),t.qZA(),t.YNc(28,Qi,2,0,"mat-error",12),t.qZA()(),t._UZ(29,"div",24),t.YNc(30,Hi,3,2,"div",25),t.TgZ(31,"div",26)(32,"button",27),t._uU(33,"Clear Fields"),t.qZA(),t.TgZ(34,"button",28),t._uU(35,"Send Funds"),t.qZA()()()()()()),2&e&&(t.xp6(6),t.Q6J("mat-dialog-close",!1),t.xp6(6),t.Q6J("ngModel",i.transaction.address),t.xp6(2),t.Q6J("ngIf",!i.transaction.address),t.xp6(2),t.Q6J("ngModel",i.transaction.amount)("step",100)("min",0),t.xp6(3),t.hij(" ",i.selAmountUnit," "),t.xp6(1),t.Q6J("ngIf",!i.transaction.amount),t.xp6(2),t.Q6J("value",i.selAmountUnit),t.xp6(1),t.Q6J("ngForOf",i.amountUnits),t.xp6(3),t.Q6J("ngModel",i.transaction.blocks)("step",1)("min",0),t.xp6(2),t.Q6J("ngIf",!i.transaction.blocks),t.xp6(2),t.Q6J("ngIf",""!==i.sendFundError))},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,D.ZT,T.dn,m._Y,m.JL,m.F,y.KE,U.Nt,m.Fj,X.h,m.Q7,m.JJ,m.On,u.O5,y.TO,m.wV,m.qQ,$.q,y.R9,P.gD,u.sg,Y.ey,O.BN],styles:[""]}),n})();var ot=_(1203);function Bi(n,a){1&n&&t._UZ(0,"mat-progress-bar",31)}function zi(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Date/Time "),t.qZA())}function Vi(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.ALo(2,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(t.xi3(2,1,1e3*e.timestamp,"dd/MMM/y HH:mm"))}}function Gi(n,a){1&n&&(t.TgZ(0,"th",34),t._uU(1," Amount (Sats) "),t.qZA())}function Xi(n,a){if(1&n&&(t.TgZ(0,"span",37),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.Oqu(t.lcZ(2,1,e.amount))}}function $i(n,a){if(1&n&&(t.TgZ(0,"span",38),t._uU(1),t.ALo(2,"number"),t.qZA()),2&n){const e=t.oxw().$implicit;t.xp6(1),t.hij("(",t.lcZ(2,1,-1*e.amount),")")}}function Wi(n,a){if(1&n&&(t.TgZ(0,"td",33),t.YNc(1,Xi,3,3,"span",35),t.YNc(2,$i,3,3,"span",36),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf",e.amount>0||0===e.amount),t.xp6(1),t.Q6J("ngIf",e.amount<0)}}function Ki(n,a){1&n&&(t.TgZ(0,"th",34),t._uU(1," Fees (Sats) "),t.qZA())}function ji(n,a){if(1&n&&(t.TgZ(0,"td",33)(1,"span",37),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.fees))}}function ta(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Confirmations "),t.qZA())}function ea(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",37),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.lcZ(3,1,null==e?null:e.confirmations)," ")}}function na(n,a){1&n&&(t.TgZ(0,"th",32),t._uU(1," Address "),t.qZA())}function ia(n,a){if(1&n&&(t.TgZ(0,"td",33),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(e.address)}}function aa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",41)(1,"div",42)(2,"mat-select",43),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",44),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function oa(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",45)(1,"button",46),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onTransactionClick(c,o)}),t._uU(2,"View Info"),t.qZA()()}}function sa(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No transaction available."),t.qZA())}function la(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting transactions..."),t.qZA())}function ra(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function ca(n,a){if(1&n&&(t.TgZ(0,"td",47),t.YNc(1,sa,2,0,"p",48),t.YNc(2,la,2,0,"p",48),t.YNc(3,ra,2,1,"p",48),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const ua=function(n){return{"display-none":n}};function pa(n,a){if(1&n&&t._UZ(0,"tr",49),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,ua,(null==e.listTransactions?null:e.listTransactions.data)&&(null==e.listTransactions||null==e.listTransactions.data?null:e.listTransactions.data.length)>0))}}function ma(n,a){1&n&&t._UZ(0,"tr",50)}function da(n,a){1&n&&t._UZ(0,"tr",51)}const ha=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},_a=function(){return["no_transaction"]};let fa=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.datePipe=s,this.faHistory=L.qO$,this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unsub=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","confirmations","fees","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amount","fees","confirmations","address","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","amount","fees","confirmations","address","actions"])}ngOnInit(){this.store.dispatch((0,N.mC)()),this.store.select(C.dx).pipe((0,h.R)(this.unsub[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.ERROR&&(this.errorMessage=this.apiCallStatus.message?"object"==typeof this.apiCallStatus.message?JSON.stringify(this.apiCallStatus.message):this.apiCallStatus.message:""),e.transactions&&this.loadTransactionsTable(e.transactions),this.logger.info(e)})}applyFilter(){this.listTransactions.filter=this.selFilter.trim().toLowerCase()}onTransactionClick(e,i){this.store.dispatch((0,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Transaction Information",message:[[{key:"blockHash",value:e.blockHash,title:"Block Hash",width:100}],[{key:"txid",value:e.txid,title:"Transaction ID",width:100}],[{key:"timestamp",value:e.timestamp,title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"confirmations",value:e.confirmations,title:"Number of Confirmations",width:50,type:l.Gi.NUMBER}],[{key:"fees",value:e.fees,title:"Fees (Sats)",width:50,type:l.Gi.NUMBER},{key:"amount",value:e.amount,title:"Amount (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"address",value:e.address,title:"Address",width:100,type:l.Gi.STRING}]]}}}))}loadTransactionsTable(e){this.listTransactions=new r.by([...e]),this.listTransactions.sort=this.sort,this.listTransactions.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.listTransactions.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(1e3*i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.listTransactions.paginator=this.paginator,this.applyFilter(),this.logger.info(this.listTransactions)}onDownloadCSV(){this.listTransactions.data&&this.listTransactions.data.length>0&&this.commonService.downloadFile(this.listTransactions.data,"Transactions")}ngOnDestroy(){this.unsub.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain-transaction-history"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Transactions")}])],decls:37,vars:15,consts:[["fxLayout","row wrap","fxLayoutAlign","start start","fxLayout.gt-sm","column","fxFlex","100","fxLayoutAlign.gt-sm","start stretch"],["fxLayout","column","fxLayout.gt-xs","row wrap","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource","ngClass"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","amount"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","fees"],["matColumnDef","confirmations"],["mat-header-cell","","mat-sort-header","","arrowPosition","before","class","pr-2",4,"matHeaderCellDef"],["mat-cell","","class","pr-2",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_transaction"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center",4,"ngIf"],["fxLayoutAlign","end center","class","red",4,"ngIf"],["fxLayoutAlign","end center"],["fxLayoutAlign","end center",1,"red"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",1,"pr-2"],["mat-cell","",1,"pr-2"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2),t._UZ(3,"fa-icon",3),t.TgZ(4,"span",4),t._uU(5,"Transaction History"),t.qZA()(),t.TgZ(6,"mat-form-field",5)(7,"input",6),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()(),t.TgZ(8,"div",7)(9,"div",8),t.YNc(10,Bi,1,0,"mat-progress-bar",9),t.TgZ(11,"table",10,11),t.ynx(13,12),t.YNc(14,zi,2,0,"th",13),t.YNc(15,Vi,3,4,"td",14),t.BQk(),t.ynx(16,15),t.YNc(17,Gi,2,0,"th",16),t.YNc(18,Wi,3,2,"td",14),t.BQk(),t.ynx(19,17),t.YNc(20,Ki,2,0,"th",16),t.YNc(21,ji,4,3,"td",14),t.BQk(),t.ynx(22,18),t.YNc(23,ta,2,0,"th",19),t.YNc(24,ea,4,3,"td",20),t.BQk(),t.ynx(25,21),t.YNc(26,na,2,0,"th",13),t.YNc(27,ia,2,1,"td",14),t.BQk(),t.ynx(28,22),t.YNc(29,aa,6,0,"th",23),t.YNc(30,oa,3,0,"td",24),t.BQk(),t.ynx(31,25),t.YNc(32,ca,4,3,"td",26),t.BQk(),t.YNc(33,pa,1,3,"tr",27),t.YNc(34,ma,1,0,"tr",28),t.YNc(35,da,1,0,"tr",29),t.qZA(),t._UZ(36,"mat-paginator",30),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("icon",i.faHistory),t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(3),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.listTransactions)("ngClass",t.VKq(12,ha,""!==i.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,_a)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,O.BN,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,P.gD,P.$L,Y.ey,I.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.uU,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();function ga(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",12),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let Ca=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.selNode={},this.faExchangeAlt=L.Ssp,this.faChartPie=L.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"receive",name:"Receive"},{link:"send",name:"Send"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}}),this.store.select(C.pg).pipe((0,h.R)(this.unSubs[1])).subscribe(i=>{this.selNode=i}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[2])).subscribe(i=>{this.balances=[{title:"Total Balance",dataValue:i.onchainBalance.total||0},{title:"Confirmed",dataValue:i.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:i.onchainBalance.unconfirmed}]})}openSendFundsModal(){this.store.dispatch((0,Z.qR)({payload:{data:{component:Lt}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-on-chain"]],decls:21,vars:4,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large","mt-2"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["fxLayout","row","fxFlex","100"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"On-chain Balance"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA()()(),t.TgZ(8,"div",0),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"On-chain Transactions"),t.qZA()(),t.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",7),t.YNc(16,ga,2,3,"div",8),t.qZA(),t.TgZ(17,"div",9),t._UZ(18,"router-outlet"),t.qZA(),t.TgZ(19,"div",10),t._UZ(20,"rtl-ecl-on-chain-transaction-history",11),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faExchangeAlt),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,ot.D,k.BU,u.sg,k.Nj,x.rH,p.yH,x.lC,fa],styles:[""]}),n})();var Tt=_(7544);function xa(n,a){if(1&n&&(t.TgZ(0,"span",10),t._uU(1,"Channels"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.activeChannels)}}function ya(n,a){if(1&n&&(t.TgZ(0,"span",10),t._uU(1,"Peers"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.activePeers)}}let La=(()=>{class n{constructor(e,i){this.store=e,this.router=i,this.activePeers=0,this.activeChannels=0,this.faUsers=L.FVb,this.faChartPie=L.OS1,this.balances=[{title:"Total Balance",dataValue:0},{title:"Confirmed",dataValue:0},{title:"Unconfirmed",dataValue:0}],this.links=[{link:"channels",name:"Channels"},{link:"peers",name:"Peers"}],this.activeLink=0,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e instanceof x.Av)).subscribe({next:e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.activePeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.Xz).pipe((0,h.R)(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.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.balances=[{title:"Total Balance",dataValue:e.onchainBalance.total||0},{title:"Confirmed",dataValue:e.onchainBalance.confirmed},{title:"Unconfirmed",dataValue:e.onchainBalance.unconfirmed}]})}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({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"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"On-chain Balance"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA()()(),t.TgZ(8,"div",0),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"Connections"),t.qZA()(),t.TgZ(12,"div",6)(13,"mat-card")(14,"mat-card-content",4)(15,"mat-tab-group",7),t.NdJ("selectedIndexChange",function(s){return i.activeLink=s})("selectedTabChange",function(s){return i.onSelectedTabChange(s)}),t.TgZ(16,"mat-tab"),t.YNc(17,xa,2,1,"ng-template",8),t.qZA(),t.TgZ(18,"mat-tab"),t.YNc(19,ya,2,1,"ng-template",8),t.qZA()(),t.TgZ(20,"div",9),t._UZ(21,"router-outlet"),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faUsers),t.xp6(6),t.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,ot.D,k.SP,k.uX,k.uD,Tt.k,p.yH,x.lC],styles:[""]}),n})();function Ta(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let va=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.router=o,this.faExchangeAlt=L.Ssp,this.faChartPie=L.OS1,this.currencyUnits=[],this.balances=[{title:"Local Capacity",dataValue:0,tooltip:"Amount you can send"},{title:"Remote Capacity",dataValue:0,tooltip:"Amount you can receive"}],this.links=[{link:"payments",name:"Payments"},{link:"invoices",name:"Invoices"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}}),this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[1]),(0,et.M)(this.store.select(C.pg))).subscribe(([i,o])=>{this.currencyUnits=o.currencyUnits,this.balances=o.userPersona===l.ol.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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-transactions"]],decls:19,vars:4,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x","mb-4"],["fxLayout","column"],[3,"values"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],["fxLayout","column",1,"padding-gap-x"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Lightning Balance"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4),t._UZ(7,"rtl-currency-unit-converter",5),t.qZA()()(),t.TgZ(8,"div",6),t._UZ(9,"fa-icon",1),t.TgZ(10,"span",2),t._uU(11,"Lightning Transactions"),t.qZA()(),t.TgZ(12,"div",7)(13,"mat-card")(14,"mat-card-content",4)(15,"nav",8),t.YNc(16,Ta,2,3,"div",9),t.qZA(),t.TgZ(17,"div",10),t._UZ(18,"router-outlet"),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartPie),t.xp6(6),t.Q6J("values",i.balances),t.xp6(2),t.Q6J("icon",i.faExchangeAlt),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,ot.D,k.BU,u.sg,k.Nj,x.rH,p.yH,x.lC],styles:[""]}),n})();function ba(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",11),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let Aa=(()=>{class n{constructor(e){this.router=e,this.faMapSigns=L.SuH,this.events=[],this.flgLoading=[!0],this.errorMessage="",this.links=[{link:"forwardinghistory",name:"Forwarding History"},{link:"peers",name:"Routing Peers"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x]}ngOnInit(){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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-routing"]],decls:13,vars:2,consts:[["fxLayout","column"],["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxLayout","row","fxFlex","100"],["mat-tab-nav-bar","","fxFlex","100"],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch",1,"padding-gap-x-large"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"fa-icon",2),t.TgZ(3,"span",3),t._uU(4,"Routing"),t.qZA()(),t.TgZ(5,"div",4)(6,"mat-card",5)(7,"mat-card-content",6)(8,"div",7)(9,"nav",8),t.YNc(10,ba,2,3,"div",9),t.qZA()(),t.TgZ(11,"div",10),t._UZ(12,"router-outlet"),t.qZA()()()()()),2&e&&(t.xp6(2),t.Q6J("icon",i.faMapSigns),t.xp6(8),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,p.yH,T.a8,T.dn,k.BU,u.sg,k.Nj,x.rH,x.lC],styles:[""]}),n})();var j=_(9814),vt=_(7261),bt=_(6895);function Za(n,a){if(1&n&&(t.TgZ(0,"span",9)(1,"div"),t._uU(2),t.ALo(3,"titlecase"),t.qZA()()),2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.AsE("",i.nodeFeaturesEnum[e.key]||e.key,": ",t.lcZ(3,2,e.value),"")}}function Sa(n,a){1&n&&(t.TgZ(0,"th",24),t._uU(1,"Address"),t.qZA())}function wa(n,a){if(1&n&&(t.TgZ(0,"td",25),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",e," ")}}function Ea(n,a){1&n&&(t.TgZ(0,"th",26)(1,"span",27),t._uU(2,"Actions"),t.qZA()())}function Ia(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",28)(1,"span",27)(2,"button",29),t.NdJ("copied",function(o){return t.CHM(e),t.oxw(2).onCopyNodeURI(o)}),t._uU(3,"Copy Node URI"),t.qZA()()()}if(2&n){const e=a.$implicit,i=t.oxw(2);t.xp6(2),t.Q6J("payload",(null==i.lookupResult?null:i.lookupResult.nodeId)+"@"+e)}}function Oa(n,a){1&n&&t._UZ(0,"tr",30)}function Fa(n,a){1&n&&t._UZ(0,"tr",31)}const qa=function(n){return{"background-color":n}};function Ra(n,a){if(1&n&&(t.TgZ(0,"div",1),t._UZ(1,"mat-divider",2),t.TgZ(2,"div",3)(3,"div",4)(4,"h4",5),t._uU(5,"Alias"),t.qZA(),t.TgZ(6,"span",6),t._uU(7),t.TgZ(8,"span",7),t._uU(9),t.qZA()()(),t.TgZ(10,"div",8)(11,"h4",5),t._uU(12,"Pub Key"),t.qZA(),t.TgZ(13,"span",9),t._uU(14),t.qZA()()(),t._UZ(15,"mat-divider",2),t.TgZ(16,"div",3)(17,"div",4)(18,"h4",5),t._uU(19,"Date/Time"),t.qZA(),t.TgZ(20,"span",6),t._uU(21),t.ALo(22,"date"),t.qZA()(),t.TgZ(23,"div",8)(24,"h4",5),t._uU(25,"Features"),t.qZA(),t.YNc(26,Za,4,4,"span",10),t.ALo(27,"keyvalue"),t.qZA()(),t._UZ(28,"mat-divider",2),t.TgZ(29,"div",3)(30,"div",11)(31,"h4",5),t._uU(32,"Signature"),t.qZA(),t.TgZ(33,"span",6),t._uU(34),t.qZA()()(),t._UZ(35,"mat-divider",2),t.TgZ(36,"div",1)(37,"h4",12),t._uU(38,"Addresses"),t.qZA(),t.TgZ(39,"div",13)(40,"table",14,15),t.ynx(42,16),t.YNc(43,Sa,2,0,"th",17),t.YNc(44,wa,2,1,"td",18),t.BQk(),t.ynx(45,19),t.YNc(46,Ea,3,0,"th",20),t.YNc(47,Ia,4,1,"td",21),t.BQk(),t.YNc(48,Oa,1,0,"tr",22),t.YNc(49,Fa,1,0,"tr",23),t.qZA()()()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(null==e.lookupResult?null:e.lookupResult.alias),t.xp6(1),t.Q6J("ngStyle",t.VKq(19,qa,null==e.lookupResult?null:e.lookupResult.rgbColor)),t.xp6(1),t.Oqu(null!=e.lookupResult&&e.lookupResult.rgbColor?null==e.lookupResult?null:e.lookupResult.rgbColor:""),t.xp6(5),t.Oqu(null==e.lookupResult?null:e.lookupResult.nodeId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.xi3(22,14,1e3*(null==e.lookupResult?null:e.lookupResult.timestamp),"dd/MMM/y HH:mm")),t.xp6(5),t.Q6J("ngForOf",t.lcZ(27,17,null==e.lookupResult?null:e.lookupResult.features.activated)),t.xp6(2),t.Q6J("inset",!0),t.xp6(6),t.Oqu(null==e.lookupResult?null:e.lookupResult.signature),t.xp6(1),t.Q6J("inset",!0),t.xp6(5),t.Q6J("dataSource",e.addresses),t.xp6(8),t.Q6J("matHeaderRowDef",e.displayedColumns),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns)}}let Na=(()=>{class n{constructor(e,i){this.logger=e,this.snackBar=i,this.lookupResult={},this.displayedColumns=["address","actions"],this.nodeFeaturesEnum=l.H_}ngOnInit(){this.addresses=new r.by(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}onCopyNodeURI(e){this.snackBar.open("Node URI copied."),this.logger.info("Copied Text: "+e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(vt.ux))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-node-lookup"]],viewQuery:function(e,i){if(1&e&&t.Gf(v.YE,5),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first)}},inputs:{lookupResult:"lookupResult"},decls:1,vars:1,consts:[["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","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mat-table","","matSort","",1,"overflow-auto",3,"dataSource"],["table",""],["matColumnDef","address"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","",1,"pl-1"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","1","rtlClipboard","",3,"payload","copied"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&t.YNc(0,Ra,50,21,"div",0),2&e&&t.Q6J("ngIf",i.lookupResult)},directives:[u.O5,p.xw,G.d,p.yH,p.Wh,u.PC,w.Zl,u.sg,Q.$V,r.BZ,v.YE,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,I.lW,bt.y,r.as,r.XQ,r.nj,r.Gk],pipes:[u.uU,u.Nd,u.rS],styles:[""]}),n})();const ka=["form"];function Pa(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder," is required.")}}function Da(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Invalid ",null==e.lookupFields[e.selectedFieldId]?null:e.lookupFields[e.selectedFieldId].placeholder,".")}}function Ua(n,a){if(1&n&&(t.TgZ(0,"div"),t._UZ(1,"rtl-ecl-node-lookup",25),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Q6J("lookupResult",e.nodeLookupValue)}}function Ma(n,a){if(1&n&&(t.TgZ(0,"span",23),t.YNc(1,Ua,2,1,"div",24),t.qZA()),2&n){const e=t.oxw(2),i=t.MAs(21);t.xp6(1),t.Q6J("ngIf",e.nodeLookupValue.nodeId)("ngIfElse",i)}}function Ja(n,a){1&n&&(t.TgZ(0,"span",23)(1,"h3"),t._uU(2,"Error! Unable to find details!"),t.qZA()())}function Qa(n,a){if(1&n&&(t.TgZ(0,"div",17)(1,"div",18)(2,"span",19),t._uU(3),t.qZA()(),t.TgZ(4,"div",20),t.YNc(5,Ma,2,2,"span",21),t.YNc(6,Ja,3,0,"span",22),t.qZA()()),2&n){const e=t.oxw();t.xp6(3),t.hij("",e.lookupFields[e.selectedFieldId].name," Details"),t.xp6(1),t.Q6J("ngSwitch",e.selectedFieldId),t.xp6(1),t.Q6J("ngSwitchCase",0)}}function Ya(n,a){1&n&&(t.TgZ(0,"h3"),t._uU(1,"Error! Unable to find details!"),t.qZA())}const Ha=function(n){return{"mt-1":!0,"mt-2":n}};let Ba=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.actions=s,this.lookupKeyCtrl=new m.NI,this.nodeLookupValue={},this.channelLookupValue=[],this.flgSetLookupValue=!1,this.messageObj=[],this.selectedFieldId=0,this.lookupFields=[{id:0,name:"Node",placeholder:"Node ID"},{id:1,name:"Channel",placeholder:"Short Channel ID"}],this.flgLoading=[!0],this.faSearch=L.wn1,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize()}ngOnInit(){this.actions.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e.type===l.lr.SET_LOOKUP_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{if(e.type===l.lr.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.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&"Lookup"===e.payload.action&&(this.flgLoading[0]="error")}),this.lookupKeyCtrl.valueChanges.pipe((0,h.R)(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,N.Sf)({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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-lookups"]],viewQuery:function(e,i){if(1&e&&t.Gf(ka,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:22,vars:9,consts:[["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"],["form","ngForm"],["fxFlex","100","fxLayoutAlign","start end"],["color","primary","tabindex","1","name","lookupField"],["checked","",1,"mr-4",3,"value"],["fxFlex","100","fxLayoutAlign","start end",3,"ngClass"],["matInput","","name","lookupKey","tabindex","2","required","",3,"formControl","placeholder"],["key",""],[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"],["errorBlock",""],["fxFlex","100","fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign.gt-sm","space-between center","fxLayoutAlign","start stretch",1,"w-100","mt-2"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center"],[1,"page-title","font-bold-500"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start center",3,"ngSwitch"],["fxFlex","100",4,"ngSwitchCase"],["fxFlex","100",4,"ngSwitchDefault"],["fxFlex","100"],[4,"ngIf","ngIfElse"],[3,"lookupResult"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-content",2)(3,"form",3,4)(5,"div",5)(6,"mat-radio-group",6)(7,"mat-radio-button",7),t._uU(8,"Node"),t.qZA()()(),t.TgZ(9,"mat-form-field",8),t._UZ(10,"input",9,10),t.YNc(12,Pa,2,1,"mat-error",11),t.YNc(13,Da,2,1,"mat-error",11),t.qZA(),t.TgZ(14,"div",12)(15,"button",13),t.NdJ("click",function(){return i.resetData()}),t._uU(16,"Clear"),t.qZA(),t.TgZ(17,"button",14),t.NdJ("click",function(){return i.onLookup()}),t._uU(18,"Lookup"),t.qZA()()(),t.YNc(19,Qa,7,3,"div",15),t.qZA()()(),t.YNc(20,Ya,2,0,"ng-template",null,16,t.W1O)),2&e&&(t.xp6(7),t.Q6J("value",0),t.xp6(2),t.Q6J("ngClass",t.VKq(7,Ha,i.screenSize===i.screenSizeEnum.XS||i.screenSize===i.screenSizeEnum.SM)),t.xp6(1),t.Q6J("formControl",i.lookupKeyCtrl)("placeholder",(null==i.lookupFields[i.selectedFieldId]?null:i.lookupFields[i.selectedFieldId].placeholder)||"Lookup Key"),t.xp6(2),t.Q6J("ngIf",null==i.lookupKeyCtrl.errors?null:i.lookupKeyCtrl.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.lookupKeyCtrl.errors?null:i.lookupKeyCtrl.errors.invalid),t.xp6(6),t.Q6J("ngIf",i.flgSetLookupValue))},directives:[p.xw,p.yH,p.Wh,T.dn,m._Y,m.JL,m.F,j.VQ,j.U0,y.KE,u.mk,w.oO,U.Nt,m.Fj,m.Q7,m.JJ,m.oH,u.O5,y.TO,I.lW,u.RF,u.n9,Na,u.ED],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}.pl-3[_ngcontent-%COMP%]{padding-left:3rem}"]}),n})();var za=_(9122);let Va=(()=>{class n{constructor(e,i){this.store=e,this.eclEffects=i,this.newAddress=""}onGenerateAddress(){this.store.dispatch((0,N._E)()),this.eclEffects.setNewAddress.pipe((0,B.q)(1)).subscribe(e=>{this.newAddress=e,setTimeout(()=>{this.store.dispatch((0,Z.qR)({payload:{data:{address:this.newAddress,addressType:"",component:za.n}}}))},0)})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(at.o))},n.\u0275cmp=t.Xpm({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(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"button",2),t.NdJ("click",function(){return i.onGenerateAddress()}),t._uU(3,"Generate Address"),t.qZA()()())},directives:[p.xw,p.yH,p.Wh,I.lW],styles:[""]}),n})(),Ga=(()=>{class n{constructor(e,i){this.store=e,this.activatedRoute=i,this.sweepAll=!1,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.activatedRoute.data.pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.sweepAll=e.sweepAll})}openSendFundsModal(){this.store.dispatch((0,Z.qR)({payload:{data:{sweepAll:this.sweepAll,component:Lt}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(x.gz))},n.\u0275cmp=t.Xpm({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(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"button",2),t.NdJ("click",function(){return i.openSendFundsModal()}),t._uU(3),t.qZA()()()),2&e&&(t.xp6(3),t.Oqu(i.sweepAll?"Sweep All":"Send Funds"))},directives:[p.xw,p.yH,p.Wh,I.lW],styles:[""]}),n})();var Xa=_(8675),At=_(4004),Zt=_(1079),$a=_(9843),St=_(2368);const Wa=["form"];function Ka(n,a){if(1&n&&(t.TgZ(0,"mat-option",34),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.Q6J("value",e),t.xp6(1),t.Oqu(e.alias?e.alias:e.nodeId?e.nodeId:"")}}function ja(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Peer alias is required."),t.qZA())}function to(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Peer not found in the list."),t.qZA())}function eo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-form-field",1)(1,"input",30),t.NdJ("change",function(){return t.CHM(e),t.oxw().onSelectedPeerChanged()}),t.qZA(),t.TgZ(2,"mat-autocomplete",31,32),t.NdJ("optionSelected",function(){return t.CHM(e),t.oxw().onSelectedPeerChanged()}),t.YNc(4,Ka,2,2,"mat-option",33),t.ALo(5,"async"),t.qZA(),t.YNc(6,ja,2,0,"mat-error",17),t.YNc(7,to,2,0,"mat-error",17),t.qZA()}if(2&n){const e=t.MAs(3),i=t.oxw();t.xp6(1),t.Q6J("formControl",i.selectedPeer)("matAutocomplete",e),t.xp6(1),t.Q6J("displayWith",i.displayFn),t.xp6(2),t.Q6J("ngForOf",t.lcZ(5,6,i.filteredPeers)),t.xp6(2),t.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.selectedPeer.errors?null:i.selectedPeer.errors.notfound)}}function no(n,a){1&n&&t.GkF(0)}function io(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function ao(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function oo(n,a){if(1&n&&(t.TgZ(0,"span"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.channelConnectionError)}}function so(n,a){if(1&n&&(t.TgZ(0,"div",35),t._UZ(1,"fa-icon",36),t.YNc(2,oo,2,1,"span",17),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(1),t.Q6J("ngIf",""!==e.channelConnectionError)}}function lo(n,a){if(1&n&&(t.TgZ(0,"mat-expansion-panel",38)(1,"mat-expansion-panel-header")(2,"mat-panel-title")(3,"span"),t._uU(4,"Peer: \xa0"),t.qZA(),t.TgZ(5,"strong",39),t._uU(6),t.qZA()()(),t.TgZ(7,"div",9)(8,"div",0)(9,"div",1)(10,"h4",40),t._uU(11,"Pubkey"),t.qZA(),t.TgZ(12,"span",41),t._uU(13),t.qZA()()(),t._UZ(14,"mat-divider",42),t.TgZ(15,"div",0)(16,"div",43)(17,"h4",40),t._uU(18,"Address"),t.qZA(),t.TgZ(19,"span",44),t._uU(20),t.qZA()(),t.TgZ(21,"div",43)(22,"h4",40),t._uU(23,"State"),t.qZA(),t.TgZ(24,"span",44),t._uU(25),t.ALo(26,"titlecase"),t.qZA()()()()()),2&n){const e=t.oxw(2);t.xp6(6),t.Oqu((null==e.peer?null:e.peer.alias)||(null==e.peer?null:e.peer.nodeId)),t.xp6(7),t.Oqu(e.peer.nodeId),t.xp6(7),t.Oqu(null==e.peer?null:e.peer.address),t.xp6(5),t.Oqu(t.lcZ(26,4,null==e.peer?null:e.peer.state))}}function ro(n,a){if(1&n&&t.YNc(0,lo,27,6,"mat-expansion-panel",37),2&n){const e=t.oxw();t.Q6J("ngIf",e.peer)}}let wt=(()=>{class n{constructor(e,i,o,s){this.dialogRef=e,this.data=i,this.store=o,this.actions=s,this.selectedPeer=new m.NI,this.faExclamationTriangle=L.eHv,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.totalBalance=0,this.selectedPubkey="",this.isPrivate=!1,this.feeRate=null,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.information=this.data.message.information,this.totalBalance=this.data.message.balance,this.alertTitle=this.data.alertTitle,this.peer=this.data.message.peer||null,this.peers=this.data.message.peers||[],this.actions.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(o=>o.type===l.lr.UPDATE_API_CALL_STATUS_ECL||o.type===l.lr.FETCH_CHANNELS_ECL)).subscribe(o=>{o.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&o.payload.status===l.Bn.ERROR&&"SaveNewChannel"===o.payload.action&&(this.channelConnectionError=o.payload.message),o.type===l.lr.FETCH_CHANNELS_ECL&&this.dialogRef.close()});let e="",i="";this.sortedPeers=this.peers.sort((o,s)=>(e=o.alias?o.alias.toLowerCase():o.nodeId?o.nodeId.toLowerCase():"",i=s.alias?s.alias.toLowerCase():o.nodeId.toLowerCase(),ei?1:0)),this.filteredPeers=this.selectedPeer.valueChanges.pipe((0,h.R)(this.unSubs[1]),(0,Xa.O)(""),(0,At.U)(o=>"string"==typeof o?o:o.alias?o.alias:o.nodeId),(0,At.U)(o=>o?this.filterPeers(o):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=!1,this.channelConnectionError="",this.advancedTitle="Advanced Options",this.form.resetForm()}onAdvancedPanelToggle(e){this.advancedTitle=e&&this.feeRate&&this.feeRate>0?"Advanced Options | Fee (Sats/vByte): "+this.feeRate:"Advanced Options"}onOpenChannel(){if(!this.peer&&!this.selectedPubkey||!this.fundingAmount||this.totalBalance-this.fundingAmount<0)return!0;this.store.dispatch((0,N.YX)({payload:{nodeId:this.peer&&this.peer.nodeId?this.peer.nodeId:this.selectedPubkey,amount:this.fundingAmount,private:this.isPrivate,feeRate:this.feeRate}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(S.yh),t.Y36(z.eX))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-open-channel"]],viewQuery:function(e,i){if(1&e&&t.Gf(Wa,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:48,vars:18,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column",3,"submit","reset"],["form","ngForm"],["fxLayout","column"],["fxFlex","100",4,"ngIf"],[4,"ngTemplateOutlet"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","70","fxLayoutAlign","start end"],["matInput","","placeholder","Amount","type","number","tabindex","1","required","","name","amount",3,"ngModel","step","min","max","ngModelChange"],["amount","ngModel"],["matSuffix",""],[4,"ngIf"],["fxFlex","25","fxLayoutAlign","start center"],["tabindex","2","color","primary","name","isPrivate",3,"ngModel","ngModelChange"],["expanded","false",1,"flat-expansion-panel","mt-2",3,"closed","opened"],["fxLayout","column","fxFlex","100","fxLayoutAlign","start stretch"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","placeholder","Fee (Sats/vByte)","type","number","name","fee","tabindex","7",3,"ngModel","step","min","ngModelChange"],["fee","ngModel"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center",1,"mt-2"],["mat-button","","color","primary","tabindex","7","type","reset",1,"mr-1"],["autoFocus","","mat-button","","color","primary","type","submit","tabindex","9"],["peerDetailsExpansionBlock",""],["type","text","placeholder","Peer Alias","aria-label","Peers","matInput","","tabindex","1","required","",3,"formControl","matAutocomplete","change"],[3,"displayWith","optionSelected"],["auto","matAutocomplete"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],["fxFlex","100",1,"alert","alert-danger","mt-1"],[1,"mr-1","alert-icon",3,"icon"],["class","flat-expansion-panel my-1","expanded","false",4,"ngIf"],["expanded","false",1,"flat-expansion-panel","my-1"],[1,"font-weight-900"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"w-100","my-1"],["fxFlex","50"],[1,"overflow-wrap","foreground-secondary-text"]],template:function(e,i){if(1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5),t.qZA()(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"form",7,8),t.NdJ("submit",function(){return i.onOpenChannel()})("reset",function(){return i.resetData()}),t.TgZ(11,"div",9),t.YNc(12,eo,8,8,"mat-form-field",10),t.qZA(),t.YNc(13,no,1,0,"ng-container",11),t.TgZ(14,"div",9)(15,"div",12)(16,"mat-form-field",13)(17,"input",14,15),t.NdJ("ngModelChange",function(s){return i.fundingAmount=s}),t.qZA(),t.TgZ(19,"mat-hint"),t._uU(20),t.ALo(21,"number"),t.qZA(),t.TgZ(22,"span",16),t._uU(23," Sats "),t.qZA(),t.YNc(24,io,2,0,"mat-error",17),t.YNc(25,ao,2,1,"mat-error",17),t.qZA(),t.TgZ(26,"div",18)(27,"mat-slide-toggle",19),t.NdJ("ngModelChange",function(s){return i.isPrivate=s}),t._uU(28,"Private Channel"),t.qZA()()(),t.TgZ(29,"mat-expansion-panel",20),t.NdJ("closed",function(){return i.onAdvancedPanelToggle(!0)})("opened",function(){return i.onAdvancedPanelToggle(!1)}),t.TgZ(30,"mat-expansion-panel-header")(31,"mat-panel-title")(32,"span"),t._uU(33),t.qZA()()(),t.TgZ(34,"div",21)(35,"div",12)(36,"div",22)(37,"mat-form-field",1)(38,"input",23,24),t.NdJ("ngModelChange",function(s){return i.feeRate=s}),t.qZA()()()()()()(),t.YNc(40,so,3,2,"div",25),t.TgZ(41,"div",26)(42,"button",27),t._uU(43,"Clear Fields"),t.qZA(),t.TgZ(44,"button",28),t._uU(45,"Open Channel"),t.qZA()()()()()(),t.YNc(46,ro,1,1,"ng-template",null,29,t.W1O)),2&e){const o=t.MAs(18),s=t.MAs(47);t.xp6(5),t.Oqu(i.alertTitle),t.xp6(7),t.Q6J("ngIf",!i.peer&&i.peers&&i.peers.length>0),t.xp6(1),t.Q6J("ngTemplateOutlet",s),t.xp6(4),t.Q6J("ngModel",i.fundingAmount)("step",1e3)("min",1)("max",i.totalBalance),t.xp6(3),t.hij("Remaining Bal: ",t.lcZ(21,16,i.totalBalance-(i.fundingAmount?i.fundingAmount:0)),""),t.xp6(4),t.Q6J("ngIf",null==o.errors?null:o.errors.required),t.xp6(1),t.Q6J("ngIf",null==o.errors?null:o.errors.max),t.xp6(2),t.Q6J("ngModel",i.isPrivate),t.xp6(6),t.Oqu(i.advancedTitle),t.xp6(5),t.Q6J("ngModel",i.feeRate)("step",1)("min",0),t.xp6(2),t.Q6J("ngIf",""!==i.channelConnectionError)}},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,T.dn,m._Y,m.JL,m.F,u.O5,y.KE,U.Nt,m.Fj,Zt.ZL,m.Q7,m.JJ,m.oH,Zt.XC,u.sg,Y.ey,y.TO,u.tP,m.wV,m.qQ,m.Fd,$.q,$a.F,m.On,y.bx,y.R9,St.Rr,H.ib,H.yz,H.yK,O.BN,X.h,G.d],pipes:[u.Ov,u.JJ,u.rS],styles:[".open-inputs-box[_ngcontent-%COMP%]{padding:1.2rem 2.4rem .8rem!important}"]}),n})();function co(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Open"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfOpenChannels)}}function uo(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Pending"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfPendingChannels)}}function po(n,a){if(1&n&&(t.TgZ(0,"span",7),t._uU(1,"Inactive"),t.qZA()),2&n){const e=t.oxw();t.s9C("matBadge",e.numOfInactiveChannels)}}let mo=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.router=o,this.numOfOpenChannels=0,this.numOfPendingChannels=0,this.numOfInactiveChannels=0,this.selNode={},this.information={},this.peers=[],this.totalBalance=0,this.links=[{link:"open",name:"Open"},{link:"pending",name:"Pending"},{link:"inactive",name:"Inactive"}],this.activeLink=0,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x]}ngOnInit(){this.activeLink=this.links.findIndex(e=>e.link===this.router.url.substring(this.router.url.lastIndexOf("/")+1)),this.router.events.pipe((0,h.R)(this.unSubs[0]),(0,J.h)(e=>e instanceof x.Av)).subscribe({next:e=>{this.activeLink=this.links.findIndex(i=>i.link===e.urlAfterRedirects.substring(e.urlAfterRedirects.lastIndexOf("/")+1))}}),this.store.select(C.Xz).pipe((0,h.R)(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(C.pg).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.selNode=e}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[4])).subscribe(e=>{this.peers=e.peers}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[5])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}onOpenChannel(){this.store.dispatch((0,Z.qR)({payload:{data:{alertTitle:"Open Channel",message:{peers:this.peers,information:this.information,balance:this.totalBalance},component:wt}}}))}onSelectedTabChange(e){this.router.navigateByUrl("/ecl/connections/channels/"+this.links[e.index].link)}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({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,"my-2","bordered-box"],[3,"selectedIndex","selectedIndexChange","selectedTabChange"],["mat-tab-label",""],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"padding-gap-x-large"],["matBadgeOverlap","false",1,"tab-badge",3,"matBadge"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"button",2),t.NdJ("click",function(){return i.onOpenChannel()}),t._uU(3,"Open Channel"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-tab-group",4),t.NdJ("selectedIndexChange",function(s){return i.activeLink=s})("selectedTabChange",function(s){return i.onSelectedTabChange(s)}),t.TgZ(6,"mat-tab"),t.YNc(7,co,2,1,"ng-template",5),t.qZA(),t.TgZ(8,"mat-tab"),t.YNc(9,uo,2,1,"ng-template",5),t.qZA(),t.TgZ(10,"mat-tab"),t.YNc(11,po,2,1,"ng-template",5),t.qZA()(),t.TgZ(12,"div",6),t._UZ(13,"router-outlet"),t.qZA()()()),2&e&&(t.xp6(5),t.Q6J("selectedIndex",i.activeLink))},directives:[p.xw,p.yH,p.Wh,I.lW,k.SP,k.uX,k.uD,Tt.k,x.lC],styles:[""]}),n})();function ho(n,a){if(1&n&&(t.TgZ(0,"div",11)(1,"h4",12),t._uU(2,"Short Channel ID"),t.qZA(),t.TgZ(3,"span",13),t._uU(4),t.qZA()()),2&n){const e=t.oxw();t.xp6(4),t.Oqu(e.channel.shortChannelId)}}function _o(n,a){if(1&n&&(t.TgZ(0,"div",11)(1,"h4",12),t._uU(2,"State"),t.qZA(),t.TgZ(3,"span",15),t._uU(4),t.ALo(5,"titlecase"),t.qZA()()),2&n){const e=t.oxw();t.xp6(4),t.Oqu(t.lcZ(5,1,e.channel.state))}}function fo(n,a){if(1&n&&(t.TgZ(0,"div")(1,"div",9)(2,"div",11)(3,"h4",12),t._uU(4,"Local Balance (Sats)"),t.qZA(),t.TgZ(5,"span",15),t._uU(6),t.ALo(7,"number"),t.qZA()(),t.TgZ(8,"div",11)(9,"h4",12),t._uU(10,"Remote Balance (Sats)"),t.qZA(),t.TgZ(11,"span",15),t._uU(12),t.ALo(13,"number"),t.qZA()()(),t._UZ(14,"mat-divider",14),t.TgZ(15,"div",9)(16,"div",11)(17,"h4",12),t._uU(18,"Base Fee (mSats)"),t.qZA(),t.TgZ(19,"span",15),t._uU(20),t.ALo(21,"number"),t.qZA()(),t.TgZ(22,"div",11)(23,"h4",12),t._uU(24,"Fee Rate (mili mSats)"),t.qZA(),t.TgZ(25,"span",15),t._uU(26),t.ALo(27,"number"),t.qZA()()(),t._UZ(28,"mat-divider",14),t.qZA()),2&n){const e=t.oxw();t.xp6(6),t.Oqu(t.lcZ(7,6,e.channel.toLocal)),t.xp6(6),t.Oqu(t.lcZ(13,8,e.channel.toRemote)),t.xp6(2),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.lcZ(21,10,e.channel.feeBaseMsat)),t.xp6(6),t.Oqu(t.lcZ(27,12,e.channel.feeProportionalMillionths)),t.xp6(2),t.Q6J("inset",!0)}}function go(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Show Advanced"),t.qZA())}function Co(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Hide Advanced"),t.qZA())}function xo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",21),t.NdJ("click",function(){return t.CHM(e),t.oxw().onShowAdvanced()}),t.YNc(1,go,2,0,"p",22),t.YNc(2,Co,2,0,"ng-template",null,23,t.W1O),t.qZA()}if(2&n){const e=t.MAs(3),i=t.oxw();t.xp6(1),t.Q6J("ngIf",!i.showAdvanced)("ngIfElse",e)}}function yo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",24),t.NdJ("copied",function(o){return t.CHM(e),t.oxw().onCopyChanID(o)}),t._uU(1,"Copy Short Channel ID"),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("payload",e.channel.shortChannelId)}}function Lo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"button",25),t.NdJ("copied",function(o){return t.CHM(e),t.oxw().onCopyChanID(o)}),t._uU(1,"Copy Channel ID"),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("payload",e.channel.channelId)}}const To=function(n){return{"xs-scroll-y":n}},vo=function(n,a){return{"mt-2":n,"mt-1":a}};let st=(()=>{class n{constructor(e,i,o,s,c){this.dialogRef=e,this.data=i,this.logger=o,this.commonService=s,this.snackBar=c,this.faReceipt=L.dLy,this.showAdvanced=!1,this.channelsType="open",this.screenSize="",this.screenSizeEnum=l.cu}ngOnInit(){this.channel=this.data.channel,this.channelsType=this.data.channelsType,this.screenSize=this.commonService.getScreenSize()}onClose(){this.dialogRef.close(!1)}onShowAdvanced(){this.showAdvanced=!this.showAdvanced}onCopyChanID(e){this.snackBar.open("open"===this.channelsType?"Short channel ID "+e+" copied.":"Channel ID copied."),this.logger.info("Copied Text: "+e)}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(q.mQ),t.Y36(R.v),t.Y36(vt.ux))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-information"]],decls:64,vars:28,consts:[["fxLayout","column","fxLayout.gt-sm","row","fxLayoutAlign","space-between stretch"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["tabindex","3","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large",3,"ngClass"],["fxLayout","column"],["fxLayout","row"],["fxFlex","50",4,"ngIf"],["fxFlex","50"],["fxLayoutAlign","start",1,"font-bold-500"],[1,"foreground-secondary-text"],[1,"my-1",3,"inset"],[1,"overflow-wrap","foreground-secondary-text"],[4,"ngIf"],["fxLayout","row","fxLayoutAlign","end center","fxFlex","100",3,"ngClass"],["mat-button","","color","primary","type","reset","tabindex","1","class","mr-1",3,"click",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied",4,"ngIf"],["mat-button","","color","primary","type","reset","tabindex","1",1,"mr-1",3,"click"],[4,"ngIf","ngIfElse"],["hideAdvancedText",""],["autoFocus","","mat-button","","color","primary","tabindex","2","type","submit","rtlClipboard","",3,"payload","copied"],["autoFocus","","mat-button","","color","primary","tabindex","3","type","submit","rtlClipboard","",3,"payload","copied"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3),t._UZ(4,"fa-icon",4),t.TgZ(5,"span",5),t._uU(6,"Channel Information"),t.qZA()(),t.TgZ(7,"button",6),t.NdJ("click",function(){return i.onClose()}),t._uU(8,"X"),t.qZA()(),t.TgZ(9,"mat-card-content",7)(10,"div",8)(11,"div",9),t.YNc(12,ho,5,1,"div",10),t.TgZ(13,"div",11)(14,"h4",12),t._uU(15,"Peer Alias"),t.qZA(),t.TgZ(16,"span",13),t._uU(17),t.qZA()(),t.YNc(18,_o,6,3,"div",10),t.qZA(),t._UZ(19,"mat-divider",14),t.TgZ(20,"div",9)(21,"div",1)(22,"h4",12),t._uU(23,"Channel ID"),t.qZA(),t.TgZ(24,"span",13),t._uU(25),t.qZA()()(),t._UZ(26,"mat-divider",14),t.TgZ(27,"div",9)(28,"div",1)(29,"h4",12),t._uU(30,"Peer Public Key"),t.qZA(),t.TgZ(31,"span",13),t._uU(32),t.qZA()()(),t._UZ(33,"mat-divider",14),t.TgZ(34,"div",9)(35,"div",11)(36,"h4",12),t._uU(37,"Private"),t.qZA(),t.TgZ(38,"span",15),t._uU(39),t.qZA()(),t.TgZ(40,"div",11)(41,"h4",12),t._uU(42,"Funder"),t.qZA(),t.TgZ(43,"span",15),t._uU(44),t.qZA()()(),t._UZ(45,"mat-divider",14),t.TgZ(46,"div",9)(47,"div",11)(48,"h4",12),t._uU(49,"State"),t.qZA(),t.TgZ(50,"span",15),t._uU(51),t.ALo(52,"titlecase"),t.qZA()(),t.TgZ(53,"div",11)(54,"h4",12),t._uU(55,"Buried"),t.qZA(),t.TgZ(56,"span",15),t._uU(57),t.qZA()()(),t._UZ(58,"mat-divider",14),t.YNc(59,fo,29,14,"div",16),t.TgZ(60,"div",17),t.YNc(61,xo,4,2,"button",18),t.YNc(62,yo,2,1,"button",19),t.YNc(63,Lo,2,1,"button",20),t.qZA()()()()()),2&e&&(t.xp6(4),t.Q6J("icon",i.faReceipt),t.xp6(5),t.Q6J("ngClass",t.VKq(23,To,i.screenSize===i.screenSizeEnum.XS)),t.xp6(3),t.Q6J("ngIf","open"===i.channelsType),t.xp6(5),t.Oqu(i.channel.alias),t.xp6(1),t.Q6J("ngIf","open"!==i.channelsType),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(i.channel.channelId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(i.channel.nodeId),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(0===i.channel.channelFlags?"Yes":"No"),t.xp6(5),t.Oqu(i.channel.isFunder?"Yes":"No"),t.xp6(1),t.Q6J("inset",!0),t.xp6(6),t.Oqu(t.lcZ(52,21,i.channel.state)),t.xp6(6),t.Oqu(i.channel.buried?"Yes":"No"),t.xp6(1),t.Q6J("inset",!0),t.xp6(1),t.Q6J("ngIf",i.showAdvanced&&"open"===i.channelsType),t.xp6(1),t.Q6J("ngClass",t.WLB(25,vo,!i.showAdvanced,i.showAdvanced)),t.xp6(1),t.Q6J("ngIf","open"===i.channelsType),t.xp6(1),t.Q6J("ngIf","open"===i.channelsType),t.xp6(1),t.Q6J("ngIf","open"!==i.channelsType))},directives:[p.xw,p.Wh,p.yH,T.dk,O.BN,I.lW,T.dn,u.mk,w.oO,u.O5,G.d,X.h,bt.y],pipes:[u.rS,u.JJ],styles:[""]}),n})();function bo(n,a){1&n&&t._UZ(0,"mat-progress-bar",30)}function Ao(n,a){1&n&&(t.TgZ(0,"th",31),t._uU(1," Short Channel ID "),t.qZA())}function Zo(n,a){if(1&n&&(t.TgZ(0,"span",37),t._UZ(1,"fa-icon",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEyeSlash)}}function So(n,a){if(1&n&&(t.TgZ(0,"span",39),t._UZ(1,"fa-icon",38),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEye)}}const Et=function(n){return{"max-width":n}};function wo(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"div",33),t.YNc(2,Zo,2,1,"span",34),t.YNc(3,So,2,1,"span",35),t.TgZ(4,"span",36),t._uU(5),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(4,Et,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),t.xp6(1),t.Q6J("ngIf",0===e.channelFlags),t.xp6(1),t.Q6J("ngIf",0!==e.channelFlags),t.xp6(2),t.Oqu(null==e?null:e.shortChannelId)}}function Eo(n,a){1&n&&(t.TgZ(0,"th",31),t._uU(1," Alias "),t.qZA())}function Io(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"div",33)(2,"span",36),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(2,Et,i.screenSize===i.screenSizeEnum.XS?"12rem":"22rem")),t.xp6(2),t.Oqu(e.alias)}}function Oo(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Base Fee (mSats) "),t.qZA())}function Fo(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.feeBaseMsat,"1.0-0")," ")}}function qo(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Fee Rate (mili mSats) "),t.qZA())}function Ro(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.feeProportionalMillionths,"1.0-0")," ")}}function No(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Local Balance (Sats) "),t.qZA())}function ko(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function Po(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Remote Balance (Sats) "),t.qZA())}function Do(n,a){if(1&n&&(t.TgZ(0,"td",32)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function Uo(n,a){1&n&&(t.TgZ(0,"th",42),t._uU(1,"Balance Score "),t.qZA())}function Mo(n,a){if(1&n&&(t.TgZ(0,"td",43)(1,"div",44)(2,"mat-hint",45),t._uU(3),t.ALo(4,"number"),t.qZA()(),t._UZ(5,"mat-progress-bar",46),t.qZA()),2&n){const e=a.$implicit;t.xp6(3),t.Oqu(t.lcZ(4,2,(null==e?null:e.balancedness)||0)),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function Jo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",47)(1,"div",48)(2,"mat-select",49),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",50),t.NdJ("click",function(){return t.CHM(e),t.oxw().onChannelUpdate("all")}),t._uU(5,"Update Fee Policy"),t.qZA(),t.TgZ(6,"mat-option",50),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(7,"Download CSV"),t.qZA()()()()}}function Qo(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",51)(1,"div",52)(2,"mat-select",53),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",50),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelUpdate(s)}),t._uU(7,"Update Fee Policy"),t.qZA(),t.TgZ(8,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!1)}),t._uU(9,"Close Channel"),t.qZA(),t.TgZ(10,"mat-option",50),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!0)}),t._uU(11,"Force Close"),t.qZA()()()()}}function Yo(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No peers connected. Add a peer in order to open a channel."),t.qZA())}function Ho(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No channel available."),t.qZA())}function Bo(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting channels..."),t.qZA())}function zo(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function Vo(n,a){if(1&n&&(t.TgZ(0,"td",54),t.YNc(1,Yo,2,0,"p",55),t.YNc(2,Ho,2,0,"p",55),t.YNc(3,Bo,2,0,"p",55),t.YNc(4,zo,2,1,"p",55),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const Go=function(n){return{"display-none":n}};function Xo(n,a){if(1&n&&t._UZ(0,"tr",56),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Go,e.numPeers>0&&(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function $o(n,a){1&n&&t._UZ(0,"tr",57)}function Wo(n,a){1&n&&t._UZ(0,"tr",58)}const Ko=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},jo=function(){return["no_peer"]};let ts=(()=>{class n{constructor(e,i,o,s,c){var f,F,g,b,ct,ut;this.logger=e,this.store=i,this.rtlEffects=o,this.commonService=s,this.router=c,this.faEye=L.Mdf,this.faEyeSlash=L.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["shortChannelId","alias","feeBaseMsat","feeProportionalMillionths","toLocal","toRemote","balancedness","actions"]),this.selFilter=(null===(g=null===(F=null===(f=this.router.getCurrentNavigation())||void 0===f?void 0:f.extras)||void 0===F?void 0:F.state)||void 0===g?void 0:g.filter)?null===(ut=null===(ct=null===(b=this.router.getCurrentNavigation())||void 0===b?void 0:b.extras)||void 0===ct?void 0:ct.state)||void 0===ut?void 0:ut.filter:""}ngOnInit(){this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.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.length>0&&this.sort&&this.paginator&&this.loadChannelsTable(),this.logger.info(e)}),this.store.select(C.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.totalBalance=e.onchainBalance.total||0})}ngAfterViewInit(){this.activeChannels.length>0&&this.sort&&this.paginator&&this.loadChannelsTable()}onChannelUpdate(e){"all"!==e&&"NORMAL"!==e.state||(this.store.dispatch((0,Z.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Update Fee Policy",noBtnText:"Cancel",yesBtnText:"Update",message:[],titleMessage:"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:"number",inputValue:e&&void 0!==e.feeBaseMsat?e.feeBaseMsat:1e3,width:48},{placeholder:"Fee Rate (mili mSats)",inputType:"number",inputValue:e&&void 0!==e.feeProportionalMillionths?e.feeProportionalMillionths:100,min:1,width:48,hintFunction:this.percentHintFunction}]}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(s=>{if(s){const c=s[0].inputValue,f=s[1].inputValue;let F=null;if(this.commonService.isVersionCompatible(this.information.version,"0.6.2")){let g="";"all"===e?(this.activeChannels.forEach(b=>{g=g+","+b.nodeId}),g=g.substring(1),F={baseFeeMsat:c,feeRate:f,nodeIds:g}):F={baseFeeMsat:c,feeRate:f,nodeId:e.nodeId}}else{let g="";"all"===e?(this.activeChannels.forEach(b=>{g=g+","+b.channelId}),g=g.substring(1),F={baseFeeMsat:c,feeRate:f,channelIds:g}):F={baseFeeMsat:c,feeRate:f,channelId:e.channelId}}this.store.dispatch((0,N.pW)({payload:F}))}}),this.applyFilter())}percentHintFunction(e){return(e/1e4).toString()+"%"}onChannelClose(e,i){this.store.dispatch((0,Z.c1)({payload:{data:{type:l.n_.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,h.R)(this.unSubs[5])).subscribe(f=>{f&&this.store.dispatch((0,N.BL)({payload:{channelId:e.channelId,force:i}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,i){this.store.dispatch((0,Z.qR)({payload:{data:{channel:e,channelsType:"open",component:st}}}))}loadChannelsTable(){this.activeChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...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.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(K.V),t.Y36(R.v),t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-open-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Channels")}])],decls:39,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","shortChannelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","feeBaseMsat"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","feeProportionalMillionths"],["matColumnDef","toLocal"],["matColumnDef","toRemote"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","pl-1",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3)(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()(),t.TgZ(5,"div",5),t.YNc(6,bo,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,Ao,2,0,"th",10),t.YNc(11,wo,6,6,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,Eo,2,0,"th",10),t.YNc(14,Io,4,4,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,Oo,2,0,"th",14),t.YNc(17,Fo,4,4,"td",11),t.BQk(),t.ynx(18,15),t.YNc(19,qo,2,0,"th",14),t.YNc(20,Ro,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,No,2,0,"th",14),t.YNc(23,ko,4,4,"td",11),t.BQk(),t.ynx(24,17),t.YNc(25,Po,2,0,"th",14),t.YNc(26,Do,4,4,"td",11),t.BQk(),t.ynx(27,18),t.YNc(28,Uo,2,0,"th",19),t.YNc(29,Mo,6,4,"td",20),t.BQk(),t.ynx(30,21),t.YNc(31,Jo,8,0,"th",22),t.YNc(32,Qo,12,0,"td",23),t.BQk(),t.ynx(33,24),t.YNc(34,Vo,5,4,"td",25),t.BQk(),t.YNc(35,Xo,1,3,"tr",26),t.YNc(36,$o,1,0,"tr",27),t.YNc(37,Wo,1,0,"tr",28),t.qZA()(),t._UZ(38,"mat-paginator",29),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,Ko,""!==i.errorMessage)),t.xp6(28),t.Q6J("matFooterRowDef",t.DdM(13,jo)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,V.gM,O.BN,y.bx,P.gD,P.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.JJ],styles:[".mat-column-shortChannelId[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-shortChannelId[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{padding-left:1rem;flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:2rem;flex:0 0 17%;width:17%}.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 10%;width:10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 56.25em){.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset;flex:1 1 20%;width:20%}}@media only screen and (max-width: 37.5em){.mat-column-state[_ngcontent-%COMP%], .mat-column-feeBaseMsat[_ngcontent-%COMP%], .mat-column-feeProportionalMillionths[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 56.25em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 90%}}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})();function es(n,a){1&n&&t._UZ(0,"mat-progress-bar",25)}function ns(n,a){1&n&&(t.TgZ(0,"th",26),t._uU(1," State "),t.qZA())}function is(n,a){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.ALo(2,"titlecase"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",t.lcZ(2,1,null==e?null:e.state),"")}}function as(n,a){1&n&&(t.TgZ(0,"th",26),t._uU(1," Alias "),t.qZA())}function os(n,a){if(1&n&&(t.TgZ(0,"td",27),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(null==e?null:e.alias)}}function ss(n,a){1&n&&(t.TgZ(0,"th",28),t._uU(1," Local Balance (Sats) "),t.qZA())}function ls(n,a){if(1&n&&(t.TgZ(0,"td",27)(1,"span",29),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function rs(n,a){1&n&&(t.TgZ(0,"th",28),t._uU(1," Remote Balance (Sats) "),t.qZA())}function cs(n,a){if(1&n&&(t.TgZ(0,"td",27)(1,"span",29),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function us(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",30)(1,"div",31)(2,"mat-select",32),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",33),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function ps(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",34)(1,"button",35),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(2,"View Info"),t.qZA()()}}function ms(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No pending channel available."),t.qZA())}function ds(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting pending channels..."),t.qZA())}function hs(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function _s(n,a){if(1&n&&(t.TgZ(0,"td",36),t.YNc(1,ms,2,0,"p",37),t.YNc(2,ds,2,0,"p",37),t.YNc(3,hs,2,1,"p",37),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const fs=function(n){return{"display-none":n}};function gs(n,a){if(1&n&&t._UZ(0,"tr",38),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,fs,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function Cs(n,a){1&n&&t._UZ(0,"tr",39)}function xs(n,a){1&n&&t._UZ(0,"tr",40)}const ys=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Ls=function(){return["no_channel"]};let Ts=(()=>{class n{constructor(e,i,o){this.logger=e,this.store=i,this.commonService=o,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["state","alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","alias","toLocal","toRemote","actions"])}ngOnInit(){this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.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.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[4])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[5])).subscribe(e=>{this.totalBalance=e.onchainBalance.total})}ngAfterViewInit(){this.pendingChannels.length>0&&this.loadChannelsTable()}applyFilter(){this.channels.filter=this.selFilter.trim().toLowerCase()}onChannelClick(e,i){this.store.dispatch((0,Z.qR)({payload:{data:{channel:e,channelsType:"pending",component:st}}}))}loadChannelsTable(){this.pendingChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...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.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-pending-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Channels")}])],decls:30,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3)(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()(),t.TgZ(5,"div",5),t.YNc(6,es,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,ns,2,0,"th",10),t.YNc(11,is,3,3,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,as,2,0,"th",10),t.YNc(14,os,2,1,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,ss,2,0,"th",14),t.YNc(17,ls,4,4,"td",11),t.BQk(),t.ynx(18,15),t.YNc(19,rs,2,0,"th",14),t.YNc(20,cs,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,us,6,0,"th",17),t.YNc(23,ps,3,0,"td",18),t.BQk(),t.ynx(24,19),t.YNc(25,_s,4,3,"td",20),t.BQk(),t.YNc(26,gs,1,3,"tr",21),t.YNc(27,Cs,1,0,"tr",22),t.YNc(28,xs,1,0,"tr",23),t.qZA()(),t._UZ(29,"mat-paginator",24),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,ys,""!==i.errorMessage)),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(13,Ls)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,P.gD,P.$L,Y.ey,I.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.rS,u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();var lt=_(5615);const vs=["peersForm"],bs=["stepper"];function As(n,a){if(1&n&&t._uU(0),2&n){const e=t.oxw();t.Oqu(e.peerFormLabel)}}function Zs(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Address is required."),t.qZA())}function Ss(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",34),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(2),t.Oqu(e.peerConnectionError)}}function ws(n,a){if(1&n&&t._uU(0),2&n){const e=t.oxw();t.Oqu(e.channelFormLabel)}}function Es(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function Is(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount must be a positive number."),t.qZA())}function Os(n,a){if(1&n&&(t.TgZ(0,"mat-error"),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.hij("Amount must be less than or equal to ",e.totalBalance,".")}}function Fs(n,a){if(1&n&&(t.TgZ(0,"div",33),t._UZ(1,"fa-icon",34),t.TgZ(2,"span"),t._uU(3),t.qZA()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("icon",e.faExclamationTriangle),t.xp6(2),t.Oqu(e.channelConnectionError)}}let qs=(()=>{class n{constructor(e,i,o,s,c,f){this.dialogRef=e,this.data=i,this.store=o,this.formBuilder=s,this.actions=c,this.logger=f,this.faExclamationTriangle=L.eHv,this.peerAddress="",this.totalBalance=0,this.flgChannelOpened=!1,this.channelOpenStatus=null,this.newlyAddedPeer=null,this.flgEditable=!0,this.peerConnectionError="",this.channelConnectionError="",this.peerFormLabel="Peer Details",this.channelFormLabel="Open Channel (Optional)",this.unSubs=[new d.x,new d.x]}ngOnInit(){this.totalBalance=this.data.message.balance,this.peerAddress=this.data.message.peer&&this.data.message.peer.nodeId&&this.data.message.peer.address?this.data.message.peer.nodeId+"@"+this.data.message.peer.address:this.data.message.peer&&this.data.message.peer.nodeId&&!this.data.message.peer.address?this.data.message.peer.nodeId:"",this.peerFormGroup=this.formBuilder.group({hiddenAddress:["",[m.kI.required]],peerAddress:[this.peerAddress,[m.kI.required]]}),this.channelFormGroup=this.formBuilder.group({fundingAmount:["",[m.kI.required,m.kI.min(1),m.kI.max(this.totalBalance)]],isPrivate:[!1],feeRate:[null],hiddenAmount:["",[m.kI.required]]}),this.statusFormGroup=this.formBuilder.group({}),this.actions.pipe((0,h.R)(this.unSubs[1]),(0,J.h)(e=>e.type===l.lr.NEWLY_ADDED_PEER_ECL||e.type===l.lr.FETCH_CHANNELS_ECL||e.type===l.lr.UPDATE_API_CALL_STATUS_ECL)).subscribe(e=>{e.type===l.lr.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.lr.FETCH_CHANNELS_ECL&&this.dialogRef.close(),e.type===l.lr.UPDATE_API_CALL_STATUS_ECL&&e.payload.status===l.Bn.ERROR&&("SaveNewPeer"===e.payload.action?this.peerConnectionError=e.payload.message:"SaveNewChannel"===e.payload.action&&(this.channelConnectionError=e.payload.message))})}onConnectPeer(){if(!this.peerFormGroup.controls.peerAddress.value)return!0;this.peerConnectionError="",this.store.dispatch((0,N.El)({payload:{id:this.peerFormGroup.controls.peerAddress.value}}))}onOpenChannel(){if(!this.channelFormGroup.controls.fundingAmount.value||this.totalBalance-this.channelFormGroup.controls.fundingAmount.value<0)return!0;this.channelConnectionError="",this.store.dispatch((0,N.YX)({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.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(D.so),t.Y36(D.WI),t.Y36(S.yh),t.Y36(m.qu),t.Y36(z.eX),t.Y36(q.mQ))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-connect-peer"]],viewQuery:function(e,i){if(1&e&&(t.Gf(vs,5),t.Gf(bs,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first),t.iGM(o=t.CRH())&&(i.stepper=o.first)}},decls:50,vars:20,consts:[["fxLayout","row"],["fxFlex","100"],["fxLayout","row","fxLayoutAlign","space-between center",1,"modal-info-header"],["fxFlex","95","fxLayoutAlign","start start"],[1,"page-title"],["tabindex","8","fxFlex","5","fxLayoutAlign","center","mat-button","",1,"btn-close-x","p-0",3,"click"],[1,"padding-gap-x-large"],["fxLayout","column"],[3,"linear","selectionChange"],["stepper",""],[3,"stepControl","editable"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"my-1",3,"formGroup"],["matStepLabel",""],["autoFocus","","matInput","","placeholder","Lightning Address (pubkey OR pubkey@ip:port)","formControlName","peerAddress","tabindex","1","required",""],[4,"ngIf"],["fxFlex","100","class","alert alert-danger mt-1",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start center","fxFlex","100",1,"mt-2"],["mat-button","","color","primary","tabindex","3","type","button",3,"click"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxLayoutAlign","start","fxLayoutAlign.gt-sm","space-between",1,"mb-1",3,"formGroup"],["matStepLabel","","disabled","true"],["fxLayout","column","fxLayout.gt-sm","row wrap","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center"],["fxFlex","60","fxLayoutAlign","start end"],["matInput","","autoFocus","","formControlName","fundingAmount","placeholder","Amount","type","number","tabindex","1","required","",3,"step"],["matSuffix",""],["fxFlex","35","fxLayoutAlign","start center"],["tabindex","2","color","primary","formControlName","isPrivate","name","isPrivate"],["fxLayout","row","fxFlex","100","fxLayoutAlign","space-between center",1,"mt-1"],["fxFlex","48","fxLayout","row","fxLayoutAlign","start center"],["matInput","","formControlName","feeRate","placeholder","Fee (Sats/vByte)","type","number","name","feeRate","tabindex","7",3,"step","min"],["mat-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"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1)(2,"mat-card-header",2)(3,"div",3)(4,"span",4),t._uU(5,"Connect to a new peer"),t.qZA()(),t.TgZ(6,"button",5),t.NdJ("click",function(){return i.onClose()}),t._uU(7,"X"),t.qZA()(),t.TgZ(8,"mat-card-content",6)(9,"div",7)(10,"mat-vertical-stepper",8,9),t.NdJ("selectionChange",function(s){return i.stepSelectionChanged(s)}),t.TgZ(12,"mat-step",10)(13,"form",11),t.YNc(14,As,1,1,"ng-template",12),t.TgZ(15,"mat-form-field",1),t._UZ(16,"input",13),t.YNc(17,Zs,2,0,"mat-error",14),t.qZA(),t.YNc(18,Ss,4,2,"div",15),t.TgZ(19,"div",16)(20,"button",17),t.NdJ("click",function(){return i.onConnectPeer()}),t._uU(21),t.qZA()()()(),t.TgZ(22,"mat-step",10)(23,"form",18),t.YNc(24,ws,1,1,"ng-template",19),t.TgZ(25,"div",20)(26,"div",21)(27,"mat-form-field",22),t._UZ(28,"input",23),t.TgZ(29,"mat-hint"),t._uU(30),t.qZA(),t.TgZ(31,"span",24),t._uU(32," Sats "),t.qZA(),t.YNc(33,Es,2,0,"mat-error",14),t.YNc(34,Is,2,0,"mat-error",14),t.YNc(35,Os,2,1,"mat-error",14),t.qZA(),t.TgZ(36,"div",25)(37,"mat-slide-toggle",26),t._uU(38,"Private Channel"),t.qZA()()(),t.TgZ(39,"div",27)(40,"div",28)(41,"mat-form-field",1),t._UZ(42,"input",29),t.qZA()()()(),t.YNc(43,Fs,4,2,"div",15),t.TgZ(44,"div",16)(45,"button",30),t.NdJ("click",function(){return i.onOpenChannel()}),t._uU(46),t.qZA()()()()(),t.TgZ(47,"div",31)(48,"button",32),t.NdJ("click",function(){return i.onClose()}),t._uU(49),t.qZA()()()()()()),2&e&&(t.xp6(10),t.Q6J("linear",!0),t.xp6(2),t.Q6J("stepControl",i.peerFormGroup)("editable",i.flgEditable),t.xp6(1),t.Q6J("formGroup",i.peerFormGroup),t.xp6(4),t.Q6J("ngIf",null==i.peerFormGroup.controls.peerAddress.errors?null:i.peerFormGroup.controls.peerAddress.errors.required),t.xp6(1),t.Q6J("ngIf",""!==i.peerConnectionError),t.xp6(3),t.Oqu(""!==i.peerConnectionError?"Retry":"Add Peer"),t.xp6(1),t.Q6J("stepControl",i.channelFormGroup)("editable",i.flgEditable),t.xp6(1),t.Q6J("formGroup",i.channelFormGroup),t.xp6(5),t.Q6J("step",1e3),t.xp6(2),t.hij("Remaining Bal: ",i.totalBalance-(i.channelFormGroup.controls.fundingAmount.value?i.channelFormGroup.controls.fundingAmount.value:0),""),t.xp6(3),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.required),t.xp6(1),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.min),t.xp6(1),t.Q6J("ngIf",null==i.channelFormGroup.controls.fundingAmount.errors?null:i.channelFormGroup.controls.fundingAmount.errors.max),t.xp6(7),t.Q6J("step",1)("min",0),t.xp6(1),t.Q6J("ngIf",""!==i.channelConnectionError),t.xp6(3),t.Oqu(""!==i.channelConnectionError?"Retry":"Open Channel"),t.xp6(3),t.Oqu(null!=i.newlyAddedPeer&&i.newlyAddedPeer.nodeId?"Do It Later":"Close"))},directives:[p.xw,p.yH,T.dk,p.Wh,I.lW,T.dn,lt.Vq,lt.C0,m._Y,m.JL,m.sg,lt.VY,y.KE,U.Nt,m.Fj,X.h,m.JJ,m.u,m.Q7,u.O5,y.TO,O.BN,m.wV,y.bx,y.R9,St.Rr,m.qQ,$.q],styles:[""]}),n})();function Rs(n,a){1&n&&t._UZ(0,"mat-progress-bar",37)}function Ns(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1," ID "),t.qZA())}const rt=function(n){return{"max-width":n}};function ks(n,a){if(1&n&&(t.TgZ(0,"td",39),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(2,rt,i.screenSize===i.screenSizeEnum.XS?"10rem":"30rem")),t.xp6(1),t.hij(" ",null==e?null:e.nodeId," ")}}function Ps(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Alias "),t.qZA())}const It=function(n){return{"mr-0":n}};function Ds(n,a){if(1&n&&t._UZ(0,"span",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,It,e.screenSize===e.screenSizeEnum.XS))}}function Us(n,a){if(1&n&&t._UZ(0,"span",45),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,It,e.screenSize===e.screenSizeEnum.XS))}}function Ms(n,a){if(1&n&&(t.TgZ(0,"td",41),t.YNc(1,Ds,1,3,"span",42),t.YNc(2,Us,1,3,"span",43),t._uU(3),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(4,rt,i.screenSize===i.screenSizeEnum.XS?"10rem":"25rem")),t.xp6(1),t.Q6J("ngIf","CONNECTED"===e.state),t.xp6(1),t.Q6J("ngIf","DISCONNECTED"===e.state),t.xp6(1),t.hij(" ",null==e?null:e.alias," ")}}function Js(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1," State "),t.qZA())}function Qs(n,a){if(1&n&&(t.TgZ(0,"td",46),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.state," ")}}function Ys(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1," Network Address "),t.qZA())}function Hs(n,a){if(1&n&&(t.TgZ(0,"td",39),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw();t.Q6J("ngStyle",t.VKq(2,rt,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.hij(" ",null==e?null:e.address," ")}}function Bs(n,a){1&n&&(t.TgZ(0,"th",47),t._uU(1," Channels "),t.qZA())}function zs(n,a){if(1&n&&(t.TgZ(0,"td",48),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.channels," ")}}function Vs(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",49)(1,"div",50)(2,"mat-select",51),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",52),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function Gs(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-option",52),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw().onPeerDetach(o)}),t._uU(1,"Disconnect"),t.qZA()}}function Xs(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"mat-option",52),t.NdJ("click",function(){t.CHM(e);const o=t.oxw().$implicit;return t.oxw().onConnectPeer(o)}),t._uU(1,"Reconnect"),t.qZA()}}function $s(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",53)(1,"div",50)(2,"mat-select",51),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",52),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onPeerClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",52),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onOpenChannel(s)}),t._uU(7,"Open Channel"),t.qZA(),t.YNc(8,Gs,2,0,"mat-option",54),t.YNc(9,Xs,2,0,"mat-option",54),t.qZA()()()}if(2&n){const e=a.$implicit;t.xp6(8),t.Q6J("ngIf","CONNECTED"===e.state),t.xp6(1),t.Q6J("ngIf","DISCONNECTED"===e.state)}}function Ws(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No connected peer."),t.qZA())}function Ks(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting peers..."),t.qZA())}function js(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function tl(n,a){if(1&n&&(t.TgZ(0,"td",55),t.YNc(1,Ws,2,0,"p",56),t.YNc(2,Ks,2,0,"p",56),t.YNc(3,js,2,1,"p",56),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const el=function(n){return{"display-none":n}};function nl(n,a){if(1&n&&t._UZ(0,"tr",57),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,el,(null==e.peers?null:e.peers.data)&&(null==e.peers||null==e.peers.data?null:e.peers.data.length)>0))}}function il(n,a){1&n&&t._UZ(0,"tr",58)}function al(n,a){1&n&&t._UZ(0,"tr",59)}const ol=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},sl=function(){return["no_peer"]};let ll=(()=>{class n{constructor(e,i,o,s,c){this.logger=e,this.store=i,this.rtlEffects=o,this.actions=s,this.commonService=c,this.faUsers=L.FVb,this.newlyAddedPeer="",this.displayedColumns=[],this.peerAddress="",this.peersData=[],this.information={},this.availableBalance=0,this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.selFilter="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","address","channels","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","address","channels","actions"])}ngOnInit(){this.store.select(C.yD).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.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.kY).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.availableBalance=e.onchainBalance.total||0}),this.actions.pipe((0,h.R)(this.unSubs[3]),(0,J.h)(e=>e.type===l.lr.SET_PEERS_ECL)).subscribe(e=>{this.peerAddress=null})}ngAfterViewInit(){this.peersData.length>0&&this.loadPeersTable(this.peersData)}onPeerClick(e,i){const o=[[{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,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Peer Information",showQRName:"Public Key",showQRField:e.nodeId,message:o}}}))}onConnectPeer(e){this.store.dispatch((0,Z.qR)({payload:{data:{message:{peer:e.nodeId?e:null,information:this.information,balance:this.availableBalance},component:qs}}}))}onOpenChannel(e){this.store.dispatch((0,Z.qR)({payload:{data:{alertTitle:"Open Channel",message:{peer:e,information:this.information,balance:this.availableBalance},newlyAdded:!1,component:wt}}}))}onPeerDetach(e){this.store.dispatch(e.channels>0?(0,Z.qR)({payload:{data:{type:l.n_.ERROR,alertTitle:"Disconnect Not Allowed",titleMessage:"Channel active with this peer."}}}):(0,Z.c1)({payload:{data:{type:l.n_.CONFIRM,alertTitle:"Disconnect Peer",titleMessage:"Disconnect peer: "+(e.alias?e.alias:e.nodeId),noBtnText:"Cancel",yesBtnText:"Disconnect"}}})),this.rtlEffects.closeConfirm.pipe((0,h.R)(this.unSubs[4])).subscribe(i=>{i&&this.store.dispatch((0,N.GD)({payload:{nodeId:e.nodeId}}))})}applyFilter(){this.peers.filter=this.selFilter.trim().toLowerCase()}loadPeersTable(e){this.peers=new r.by(e?[...e]:[]),this.peers.sort=this.sort,this.peers.sortingDataAccessor=(i,o)=>i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.peers.filterPredicate=(i,o)=>JSON.stringify(i).toLowerCase().includes(o),this.peers.paginator=this.paginator,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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(K.V),t.Y36(z.eX),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-peers"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Peers")}])],decls:42,vars:15,consts:[["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap"],["peersForm","ngForm"],["mat-flat-button","","color","primary","type","submit","tabindex","1",3,"click"],["fxLayout","column"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxFlex","30"],["fxLayout","row","fxLayoutAlign","start start"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","nodeId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["mat-header-cell","","mat-sort-header","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3",3,"ngStyle",4,"matCellDef"],["matColumnDef","state"],["mat-cell","",4,"matCellDef"],["matColumnDef","address"],["matColumnDef","channels"],["mat-header-cell","","class","px-2","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","","class","px-2",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","fxLayoutAlign","end center","class","px-3",4,"matCellDef"],["matColumnDef","no_peer"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","",1,"px-3"],["mat-cell","",1,"px-3",3,"ngStyle"],["class","dot green","matTooltip","Connected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["class","dot red","matTooltip","Disconnected","matTooltipPosition","right",3,"ngClass",4,"ngIf"],["matTooltip","Connected","matTooltipPosition","right",1,"dot","green",3,"ngClass"],["matTooltip","Disconnected","matTooltipPosition","right",1,"dot","red",3,"ngClass"],["mat-cell",""],["mat-header-cell","","mat-sort-header","",1,"px-2"],["mat-cell","",1,"px-2"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],[3,"click",4,"ngIf"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"form",1,2)(3,"button",3),t.NdJ("click",function(){return i.onConnectPeer({})}),t._uU(4,"Add Peer"),t.qZA()(),t.TgZ(5,"div",4)(6,"div",5)(7,"div",6),t._UZ(8,"fa-icon",7),t.TgZ(9,"span",8),t._uU(10,"Peers"),t.qZA()(),t.TgZ(11,"mat-form-field",9)(12,"div",10)(13,"input",11),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()()(),t.TgZ(14,"div",12),t.YNc(15,Rs,1,0,"mat-progress-bar",13),t.TgZ(16,"table",14,15),t.ynx(18,16),t.YNc(19,Ns,2,0,"th",17),t.YNc(20,ks,2,4,"td",18),t.BQk(),t.ynx(21,19),t.YNc(22,Ps,2,0,"th",20),t.YNc(23,Ms,4,6,"td",21),t.BQk(),t.ynx(24,22),t.YNc(25,Js,2,0,"th",17),t.YNc(26,Qs,2,1,"td",23),t.BQk(),t.ynx(27,24),t.YNc(28,Ys,2,0,"th",17),t.YNc(29,Hs,2,4,"td",18),t.BQk(),t.ynx(30,25),t.YNc(31,Bs,2,0,"th",26),t.YNc(32,zs,2,1,"td",27),t.BQk(),t.ynx(33,28),t.YNc(34,Vs,6,0,"th",29),t.YNc(35,$s,10,2,"td",30),t.BQk(),t.ynx(36,31),t.YNc(37,tl,4,3,"td",32),t.BQk(),t.YNc(38,nl,1,3,"tr",33),t.YNc(39,il,1,0,"tr",34),t.YNc(40,al,1,0,"tr",35),t.qZA()(),t._UZ(41,"mat-paginator",36),t.qZA()()),2&e&&(t.xp6(8),t.Q6J("icon",i.faUsers),t.xp6(5),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.peers)("ngClass",t.VKq(12,ol,""!==i.errorMessage)),t.xp6(22),t.Q6J("matFooterRowDef",t.DdM(14,sl)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.yH,p.Wh,m._Y,m.JL,m.F,I.lW,O.BN,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,V.gM,P.gD,P.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],styles:[".mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-nodeId[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:2rem}.mat-column-address[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const rl=["queryRoutesForm"];function cl(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Destination Node ID is required."),t.qZA())}function ul(n,a){1&n&&(t.TgZ(0,"mat-error"),t._uU(1,"Amount is required."),t.qZA())}function pl(n,a){1&n&&t._UZ(0,"mat-progress-bar",21)}function ml(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," Alias "),t.qZA())}function dl(n,a){if(1&n&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.alias," ")}}function hl(n,a){1&n&&(t.TgZ(0,"th",40),t._uU(1," ID "),t.qZA())}function _l(n,a){if(1&n&&(t.TgZ(0,"td",41),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.hij(" ",null==e?null:e.nodeId," ")}}function fl(n,a){1&n&&(t.TgZ(0,"th",42)(1,"span",43),t._uU(2,"Actions"),t.qZA()())}function gl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",44)(1,"button",45),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw(2).onHopClick(s)}),t._uU(2,"View Info"),t.qZA()()}}function Cl(n,a){1&n&&t._UZ(0,"tr",46)}function xl(n,a){1&n&&t._UZ(0,"tr",47)}const yl=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}};function Ll(n,a){if(1&n&&(t.TgZ(0,"div",22)(1,"mat-expansion-panel",23)(2,"mat-expansion-panel-header")(3,"mat-panel-title",24)(4,"span",25),t._uU(5),t.qZA(),t.TgZ(6,"span",26),t._uU(7),t.ALo(8,"number"),t.qZA()()(),t.TgZ(9,"mat-panel-description",27)(10,"div",28)(11,"table",29,30),t.ynx(13,31),t.YNc(14,ml,2,0,"th",32),t.YNc(15,dl,2,1,"td",33),t.BQk(),t.ynx(16,34),t.YNc(17,hl,2,0,"th",32),t.YNc(18,_l,2,1,"td",33),t.BQk(),t.ynx(19,35),t.YNc(20,fl,3,0,"th",36),t.YNc(21,gl,3,0,"td",37),t.BQk(),t.YNc(22,Cl,1,0,"tr",38),t.YNc(23,xl,1,0,"tr",39),t.qZA()()()()()),2&n){const e=a.$implicit,i=a.index,o=t.oxw();t.xp6(5),t.hij("Route ",i+1,""),t.xp6(2),t.Oqu(t.lcZ(8,7,e.amount/1e3)),t.xp6(4),t.Q6J("dataSource",o.qrHops[i])("ngClass",t.VKq(9,yl,"error"===o.flgLoading[0])),t.xp6(11),t.Q6J("matHeaderRowDef",o.displayedColumns)("matHeaderRowDefSticky",o.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",o.displayedColumns)}}let Tl=(()=>{class n{constructor(e,i,o){this.store=e,this.eclEffects=i,this.commonService=o,this.allQRoutes=[],this.nodeId="",this.amount=0,this.qrHops=[],this.flgSticky=!1,this.flgLoading=[!1],this.faRoute=L.FpQ,this.faExclamationTriangle=L.eHv,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","actions"]):this.screenSize===l.cu.SM||this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","nodeId","actions"]):(this.flgSticky=!0,this.displayedColumns=["alias","nodeId","actions"])}ngOnInit(){this.qrHops[0]=new r.by([]),this.qrHops[0].data=[],this.eclEffects.setQueryRoutes.pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{e&&e.routes&&e.routes.length?(this.flgLoading[0]=!1,this.allQRoutes=e.routes,this.allQRoutes.forEach((i,o)=>{this.qrHops[o]=new r.by([...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,N.WO)({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,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Route Information",message:[[{key:"alias",value:e.alias,title:"Alias",width:100,type:l.Gi.STRING}],[{key:"nodeId",value:e.nodeId,title:"Node ID",width:100,type:l.Gi.STRING}]]}}}))}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(S.yh),t.Y36(at.o),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-query-routes"]],viewQuery:function(e,i){if(1&e&&t.Gf(rl,7),2&e){let o;t.iGM(o=t.CRH())&&(i.form=o.first)}},decls:28,vars:10,consts:[["fxLayout","column","fxFlex","100"],["fxLayout","column","fxLayoutAlign","space-between stretch","fxLayout.gt-sm","row wrap",3,"ngSubmit"],["queryRoutesForm","ngForm"],["fxFlex","100",1,"alert","alert-warn"],[1,"mr-1","alert-icon",3,"icon"],["fxFlex","69","fxLayoutAlign","start end"],["matInput","","placeholder","Destination Node ID","name","nodeId","tabindex","1","required","",3,"ngModel","ngModelChange"],["destPubkey","ngModel"],[4,"ngIf"],["fxFlex","29","fxLayoutAlign","start end"],["matInput","","placeholder","Amount (Sats)","name","amount","tabindex","2","type","number","required","",3,"ngModel","step","min","ngModelChange"],["fxLayout","row",1,"mt-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","row","fxLayoutAlign","start center",1,"page-sub-title-container","mt-2","mb-1"],["fxFlex","70"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["mode","indeterminate",4,"ngIf"],["fxLayout","row","fxFlex","100","fxLayoutAlign","start start",1,"padding-gap-x"],["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"],["table[i]",""],["matColumnDef","alias"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","nodeId"],["matColumnDef","actions"],["mat-header-cell","","class","pl-4 pr-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-4",4,"matCellDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-header-cell","",1,"pl-4","pr-3"],["fxLayoutAlign","end center"],["mat-cell","",1,"pl-4"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(e,i){if(1&e){const o=t.EpF();t.TgZ(0,"div",0)(1,"form",1,2),t.NdJ("ngSubmit",function(){return t.CHM(o),t.MAs(2).form.valid&&i.onQueryRoutes()}),t.TgZ(3,"div",3),t._UZ(4,"fa-icon",4),t.TgZ(5,"span"),t._uU(6,"The actual routing fee on a payment can be different from the fee shown on query routes."),t.qZA()(),t.TgZ(7,"mat-form-field",5)(8,"input",6,7),t.NdJ("ngModelChange",function(c){return i.nodeId=c}),t.qZA(),t.YNc(10,cl,2,0,"mat-error",8),t.qZA(),t.TgZ(11,"mat-form-field",9)(12,"input",10),t.NdJ("ngModelChange",function(c){return i.amount=c}),t.qZA(),t.YNc(13,ul,2,0,"mat-error",8),t.qZA(),t.TgZ(14,"div",11)(15,"button",12),t.NdJ("click",function(){return i.resetData()}),t._uU(16,"Clear"),t.qZA(),t.TgZ(17,"button",13),t._uU(18,"Query Route"),t.qZA()()(),t.TgZ(19,"div",14)(20,"div",15),t._UZ(21,"fa-icon",16),t.TgZ(22,"span",17),t._uU(23,"Transaction Route"),t.qZA()()(),t.YNc(24,pl,1,0,"mat-progress-bar",18),t.TgZ(25,"div",19)(26,"div",0),t.YNc(27,Ll,24,11,"div",20),t.qZA()()()}2&e&&(t.xp6(4),t.Q6J("icon",i.faExclamationTriangle),t.xp6(4),t.Q6J("ngModel",i.nodeId),t.xp6(2),t.Q6J("ngIf",!i.nodeId),t.xp6(2),t.Q6J("ngModel",i.amount)("step",1e3)("min",0),t.xp6(1),t.Q6J("ngIf",!i.amount),t.xp6(8),t.Q6J("icon",i.faRoute),t.xp6(3),t.Q6J("ngIf",!0===i.flgLoading[0]),t.xp6(3),t.Q6J("ngForOf",i.allQRoutes))},directives:[p.xw,p.yH,m._Y,m.JL,m.F,p.Wh,O.BN,y.KE,U.Nt,m.Fj,m.Q7,m.JJ,m.On,u.O5,y.TO,m.wV,m.qQ,$.q,I.lW,M.pW,u.sg,H.ib,H.yz,H.yK,H.u4,Q.$V,r.BZ,u.mk,w.oO,r.w1,r.fO,r.ge,r.Dz,r.ev,r.as,r.XQ,r.nj,r.Gk],pipes:[u.JJ],styles:[".mat-column-actions[_ngcontent-%COMP%]{flex:0 0 5%;width:5%}.mat-column-pubkey_alias[_ngcontent-%COMP%]{flex:1 1 25%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function vl(n,a){1&n&&t._UZ(0,"mat-progress-bar",29)}function bl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," State "),t.qZA())}function Al(n,a){if(1&n&&(t.TgZ(0,"span",36),t._UZ(1,"fa-icon",37),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEyeSlash)}}function Zl(n,a){if(1&n&&(t.TgZ(0,"span",38),t._UZ(1,"fa-icon",37),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("icon",e.faEye)}}const Ot=function(n){return{"max-width":n}};function Sl(n,a){if(1&n&&(t.TgZ(0,"td",31)(1,"div",32),t.YNc(2,Al,2,1,"span",33),t.YNc(3,Zl,2,1,"span",34),t.TgZ(4,"span",35),t._uU(5),t.ALo(6,"titlecase"),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(6,Ot,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Q6J("ngIf",0===e.channelFlags),t.xp6(1),t.Q6J("ngIf",0!==e.channelFlags),t.xp6(2),t.Oqu(t.lcZ(6,4,null==e?null:e.state))}}function wl(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," Short Channel ID "),t.qZA())}function El(n,a){if(1&n&&(t.TgZ(0,"td",31),t._uU(1),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Oqu(null==e?null:e.shortChannelId)}}function Il(n,a){1&n&&(t.TgZ(0,"th",30),t._uU(1," Alias "),t.qZA())}function Ol(n,a){if(1&n&&(t.TgZ(0,"td",31)(1,"div",32)(2,"span",35),t._uU(3),t.qZA()()()),2&n){const e=a.$implicit,i=t.oxw();t.xp6(1),t.Q6J("ngStyle",t.VKq(2,Ot,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(2),t.Oqu(e.alias)}}function Fl(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Local Balance (Sats) "),t.qZA())}function ql(n,a){if(1&n&&(t.TgZ(0,"td",31)(1,"span",40),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toLocal,"1.0-0")," ")}}function Rl(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1," Remote Balance (Sats) "),t.qZA())}function Nl(n,a){if(1&n&&(t.TgZ(0,"td",31)(1,"span",40),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.hij(" ",t.xi3(3,1,null==e?null:e.toRemote,"1.0-0")," ")}}function kl(n,a){1&n&&(t.TgZ(0,"th",41),t._uU(1,"Balance Score "),t.qZA())}function Pl(n,a){if(1&n&&(t.TgZ(0,"td",42)(1,"div",43)(2,"mat-hint",44),t._uU(3),t.ALo(4,"number"),t.qZA()(),t._UZ(5,"mat-progress-bar",45),t.qZA()),2&n){const e=a.$implicit;t.xp6(3),t.Oqu(t.lcZ(4,2,(null==e?null:e.balancedness)||0)),t.xp6(2),t.s9C("value",e.toLocal&&e.toLocal>0?+e.toLocal/(+e.toLocal+ +e.toRemote)*100:0)}}function Dl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",46)(1,"div",47)(2,"mat-select",48),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",49),t.NdJ("click",function(){return t.CHM(e),t.oxw().onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function Ul(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",50)(1,"div",51)(2,"mat-select",52),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",49),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw().onChannelClick(c,o)}),t._uU(5,"View Info"),t.qZA(),t.TgZ(6,"mat-option",49),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().onChannelClose(s,!0)}),t._uU(7,"Force Close"),t.qZA()()()()}}function Ml(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No inactive channel available."),t.qZA())}function Jl(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting inactive channels..."),t.qZA())}function Ql(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Oqu(e.errorMessage)}}function Yl(n,a){if(1&n&&(t.TgZ(0,"td",53),t.YNc(1,Ml,2,0,"p",54),t.YNc(2,Jl,2,0,"p",54),t.YNc(3,Ql,2,1,"p",54),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const Hl=function(n){return{"display-none":n}};function Bl(n,a){if(1&n&&t._UZ(0,"tr",55),2&n){const e=t.oxw();t.Q6J("ngClass",t.VKq(1,Hl,(null==e.channels?null:e.channels.data)&&(null==e.channels||null==e.channels.data?null:e.channels.data.length)>0))}}function zl(n,a){1&n&&t._UZ(0,"tr",56)}function Vl(n,a){1&n&&t._UZ(0,"tr",57)}const Gl=function(n){return{"overflow-auto error-border":n,"overflow-auto":!0}},Xl=function(){return["no_channel"]};let $l=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.store=i,this.rtlEffects=o,this.commonService=s,this.faEye=L.Mdf,this.faEyeSlash=L.Aq,this.totalBalance=0,this.displayedColumns=[],this.myChanPolicy={},this.information={},this.numPeers=-1,this.feeRateTypes=l.vn,this.selFilter="",this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS||this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["state","alias","toLocal","toRemote","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","actions"]):(this.flgSticky=!0,this.displayedColumns=["state","shortChannelId","alias","toLocal","toRemote","balancedness","actions"])}ngOnInit(){this.store.select(C.Xz).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.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.yD).pipe((0,h.R)(this.unSubs[1])).subscribe(e=>{this.information=e}),this.store.select(C.Bo).pipe((0,h.R)(this.unSubs[2])).subscribe(e=>{this.numPeers=e.peers&&e.peers.length?e.peers.length:0}),this.store.select(C.kY).pipe((0,h.R)(this.unSubs[3])).subscribe(e=>{this.totalBalance=e.onchainBalance.total||0})}ngAfterViewInit(){this.inactiveChannels.length>0&&this.loadChannelsTable()}onChannelClose(e,i){this.store.dispatch((0,Z.c1)({payload:{data:{type:l.n_.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,h.R)(this.unSubs[4])).subscribe(f=>{f&&this.store.dispatch((0,N.BL)({payload:{channelId:e.channelId||"",force:i}}))})}applyFilter(){this.channels.filter=this.selFilter.trim().toLocaleLowerCase()}onChannelClick(e,i){this.store.dispatch((0,Z.qR)({payload:{data:{channel:e,channelsType:"inactive",component:st}}}))}loadChannelsTable(){this.inactiveChannels.sort((e,i)=>e.alias===i.alias?0:i.alias?1:-1),this.channels=new r.by([...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.filterPredicate=(e,i)=>JSON.stringify(e).toLowerCase().includes(i),this.channels.paginator=this.paginator,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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(S.yh),t.Y36(K.V),t.Y36(R.v))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-channel-inactive-table"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Channels")}])],decls:36,vars:14,consts:[["fxLayout","column",1,"padding-gap"],["fxLayout","column","fxLayout.gt-xs","row","fxLayoutAlign.gt-xs","start center","fxLayoutAlign","start stretch",1,"page-sub-title-container"],["fxFlex","70"],["fxFlex","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["fxLayout","column","fxLayoutAlign","start center","fxFlex","100",1,"table-container",3,"perfectScrollbar"],["mode","indeterminate",4,"ngIf"],["mat-table","","fxFlex","100","matSort","",3,"dataSource","ngClass"],["table",""],["matColumnDef","state"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","shortChannelId"],["matColumnDef","alias"],["matColumnDef","toLocal"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","toRemote"],["matColumnDef","balancedness"],["mat-header-cell","","mat-sort-header","","class","pl-3",4,"matHeaderCellDef"],["mat-cell","","class","pl-3",4,"matCellDef"],["matColumnDef","actions"],["mat-header-cell","","class","pl-1",4,"matHeaderCellDef"],["mat-cell","","class","pl-1","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_channel"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],[1,"ellipsis-parent",3,"ngStyle"],["class","mr-1","matTooltip","Private","matTooltipPosition","right",4,"ngIf"],["class","mr-1","matTooltip","Public","matTooltipPosition","right",4,"ngIf"],[1,"ellipsis-child"],["matTooltip","Private","matTooltipPosition","right",1,"mr-1"],[3,"icon"],["matTooltip","Public","matTooltipPosition","right",1,"mr-1"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","","mat-sort-header","",1,"pl-3"],["mat-cell","",1,"pl-3"],["fxLayout","row"],["fxFlex","100","fxLayoutAlign","center center",1,"font-size-80"],["mode","determinate",3,"value"],["mat-header-cell","",1,"pl-1"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"pl-1"],["fxLayoutAlign","center center",1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","2",1,"mr-0"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"div",1),t._UZ(2,"div",2),t.TgZ(3,"mat-form-field",3)(4,"input",4),t.NdJ("keyup",function(){return i.applyFilter()})("ngModelChange",function(s){return i.selFilter=s}),t.qZA()()(),t.TgZ(5,"div",5),t.YNc(6,vl,1,0,"mat-progress-bar",6),t.TgZ(7,"table",7,8),t.ynx(9,9),t.YNc(10,bl,2,0,"th",10),t.YNc(11,Sl,7,8,"td",11),t.BQk(),t.ynx(12,12),t.YNc(13,wl,2,0,"th",10),t.YNc(14,El,2,1,"td",11),t.BQk(),t.ynx(15,13),t.YNc(16,Il,2,0,"th",10),t.YNc(17,Ol,4,4,"td",11),t.BQk(),t.ynx(18,14),t.YNc(19,Fl,2,0,"th",15),t.YNc(20,ql,4,4,"td",11),t.BQk(),t.ynx(21,16),t.YNc(22,Rl,2,0,"th",15),t.YNc(23,Nl,4,4,"td",11),t.BQk(),t.ynx(24,17),t.YNc(25,kl,2,0,"th",18),t.YNc(26,Pl,6,4,"td",19),t.BQk(),t.ynx(27,20),t.YNc(28,Dl,6,0,"th",21),t.YNc(29,Ul,8,0,"td",22),t.BQk(),t.ynx(30,23),t.YNc(31,Yl,4,3,"td",24),t.BQk(),t.YNc(32,Bl,1,3,"tr",25),t.YNc(33,zl,1,0,"tr",26),t.YNc(34,Vl,1,0,"tr",27),t.qZA()(),t._UZ(35,"mat-paginator",28),t.qZA()),2&e&&(t.xp6(4),t.Q6J("ngModel",i.selFilter),t.xp6(2),t.Q6J("ngIf",i.apiCallStatus.status===i.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",i.channels)("ngClass",t.VKq(11,Gl,""!==i.errorMessage)),t.xp6(25),t.Q6J("matFooterRowDef",t.DdM(13,Xl)),t.xp6(1),t.Q6J("matHeaderRowDef",i.displayedColumns)("matHeaderRowDefSticky",i.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",i.displayedColumns),t.xp6(1),t.Q6J("pageSize",i.pageSize)("pageSizeOptions",i.pageSizeOptions)("showFirstLastButtons",i.screenSize!==i.screenSizeEnum.XS))},directives:[p.xw,p.Wh,p.yH,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,u.O5,M.pW,r.BZ,v.YE,u.mk,w.oO,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,V.gM,O.BN,y.bx,P.gD,P.$L,Y.ey,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.rS,u.JJ],styles:[".mat-column-state[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-state[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-alias[_ngcontent-%COMP%]{flex:0 0 15%;width:15%}.mat-column-alias[_ngcontent-%COMP%] .ellipsis-parent[_ngcontent-%COMP%]{display:flex}.mat-column-balancedness[_ngcontent-%COMP%]{padding-left:3rem;flex:0 0 20%;width:20%}.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{flex:1 1 15%;width:15%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@media only screen and (max-width: 37.5em){.mat-column-shortChannelId[_ngcontent-%COMP%], .mat-column-toLocal[_ngcontent-%COMP%], .mat-column-toRemote[_ngcontent-%COMP%]{white-space:unset}}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 100%}@media only screen and (max-width: 37.5em){.mat-column-actions[_ngcontent-%COMP%] .bordered-box.table-actions-select[_ngcontent-%COMP%]{flex:0 0 80%}}"]}),n})(),Wl=(()=>{class n{transform(e,i){return e.replace(/(?:^\w|[A-Z]|\b\w)/g,(o,s)=>o.toUpperCase()).replace(/\s+/g,"").replace(/-/g," ")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=t.Yjl({name:"camelcase",type:n,pure:!0}),n})();function Kl(n,a){if(1&n&&(t.TgZ(0,"div",5),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function jl(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",6),t._UZ(1,"div",7),t.TgZ(2,"mat-form-field",8)(3,"input",9),t.NdJ("ngModelChange",function(o){return t.CHM(e),t.oxw().filterValue=o})("input",function(){return t.CHM(e),t.oxw().applyFilter()})("keyup",function(){return t.CHM(e),t.oxw().applyFilter()}),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(3),t.Q6J("ngModel",e.filterValue)}}function tr(n,a){1&n&&t._UZ(0,"mat-progress-bar",32)}function er(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"Date/Time"),t.qZA())}const nr=function(n){return{"ml-0":n}};function ir(n,a){if(1&n&&(t._UZ(0,"span",36),t.ALo(1,"camelcase")),2&n){const e=t.oxw().$implicit,i=t.oxw(2);t.s9C("matTooltip",t.lcZ(1,2,null==e?null:e.type)),t.Q6J("ngClass",t.VKq(4,nr,i.screenSize===i.screenSizeEnum.XS))}}function ar(n,a){if(1&n&&(t.TgZ(0,"td",34),t.YNc(1,ir,2,6,"span",35),t._uU(2),t.ALo(3,"date"),t.qZA()),2&n){const e=a.$implicit;t.xp6(1),t.Q6J("ngIf","payment-relayed"!==(null==e?null:e.type)),t.xp6(1),t.hij(" ",t.xi3(3,2,null==e?null:e.timestamp,"dd/MMM/y HH:mm")," ")}}function or(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"In Channel"),t.qZA())}const Ft=function(n){return{"max-width":n}};function sr(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,Ft,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Oqu(null==e?null:e.fromChannelAlias)}}function lr(n,a){1&n&&(t.TgZ(0,"th",33),t._uU(1,"Out Channel"),t.qZA())}function rr(n,a){if(1&n&&(t.TgZ(0,"td",37),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,Ft,i.screenSize===i.screenSizeEnum.XS?"10rem":"20rem")),t.xp6(1),t.Oqu(null==e?null:e.toChannelAlias)}}function cr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount In (Sats)"),t.qZA())}function ur(n,a){if(1&n&&(t.TgZ(0,"td",34)(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.amountIn))}}function pr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Amount Out (Sats)"),t.qZA())}function mr(n,a){if(1&n&&(t.TgZ(0,"td",34)(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,null==e?null:e.amountOut))}}function dr(n,a){1&n&&(t.TgZ(0,"th",38),t._uU(1,"Fee Earned (Sats)"),t.qZA())}function hr(n,a){if(1&n&&(t.TgZ(0,"td",34)(1,"span",39),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,(null==e?null:e.amountIn)-(null==e?null:e.amountOut)))}}function _r(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"th",40)(1,"div",41)(2,"mat-select",42),t._UZ(3,"mat-select-trigger"),t.TgZ(4,"mat-option",43),t.NdJ("click",function(){return t.CHM(e),t.oxw(2).onDownloadCSV()}),t._uU(5,"Download CSV"),t.qZA()()()()}}function fr(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"td",44)(1,"button",45),t.NdJ("click",function(o){const c=t.CHM(e).$implicit;return t.oxw(2).onForwardingEventClick(c,o)}),t._uU(2,"View Info"),t.qZA()()}}function gr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No forwarding history available."),t.qZA())}function Cr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting forwarding history..."),t.qZA())}function xr(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function yr(n,a){if(1&n&&(t.TgZ(0,"td",46),t.YNc(1,gr,2,0,"p",47),t.YNc(2,Cr,2,0,"p",47),t.YNc(3,xr,2,1,"p",47),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const Lr=function(n){return{"display-none":n}};function Tr(n,a){if(1&n&&t._UZ(0,"tr",48),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Lr,(null==e.forwardingHistoryEvents?null:e.forwardingHistoryEvents.data)&&(null==e.forwardingHistoryEvents||null==e.forwardingHistoryEvents.data?null:e.forwardingHistoryEvents.data.length)>0))}}function vr(n,a){1&n&&t._UZ(0,"tr",49)}function br(n,a){1&n&&t._UZ(0,"tr",50)}const Ar=function(){return["no_event"]};function Zr(n,a){if(1&n&&(t.TgZ(0,"div",10),t.YNc(1,tr,1,0,"mat-progress-bar",11),t.TgZ(2,"table",12,13),t.ynx(4,14),t.YNc(5,er,2,0,"th",15),t.YNc(6,ar,4,5,"td",16),t.BQk(),t.ynx(7,17),t.YNc(8,or,2,0,"th",15),t.YNc(9,sr,2,4,"td",18),t.BQk(),t.ynx(10,19),t.YNc(11,lr,2,0,"th",15),t.YNc(12,rr,2,4,"td",18),t.BQk(),t.ynx(13,20),t.YNc(14,cr,2,0,"th",21),t.YNc(15,ur,4,3,"td",16),t.BQk(),t.ynx(16,22),t.YNc(17,pr,2,0,"th",21),t.YNc(18,mr,4,3,"td",16),t.BQk(),t.ynx(19,23),t.YNc(20,dr,2,0,"th",21),t.YNc(21,hr,4,3,"td",16),t.BQk(),t.ynx(22,24),t.YNc(23,_r,6,0,"th",25),t.YNc(24,fr,3,0,"td",26),t.BQk(),t.ynx(25,27),t.YNc(26,yr,4,3,"td",28),t.BQk(),t.YNc(27,Tr,1,3,"tr",29),t.YNc(28,vr,1,0,"tr",30),t.YNc(29,br,1,0,"tr",31),t.qZA()()),2&n){const e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.forwardingHistoryEvents),t.xp6(25),t.Q6J("matFooterRowDef",t.DdM(6,Ar)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns)}}function Sr(n,a){if(1&n&&t._UZ(0,"mat-paginator",51),2&n){const e=t.oxw();t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let qt=(()=>{class n{constructor(e,i,o,s){this.logger=e,this.commonService=i,this.store=o,this.datePipe=s,this.eventsData=[],this.filterValue="",this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","actions"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","fee","actions"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["timestamp","amountIn","amountOut","fee","actions"]):(this.flgSticky=!0,this.displayedColumns=["timestamp","fromChannelAlias","toChannelAlias","amountIn","amountOut","fee","actions"])}ngOnInit(){this.store.select(C.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{0===this.eventsData.length&&(this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.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.length>0&&this.sort&&this.paginator&&this.loadForwardingEventsTable(this.eventsData),this.logger.info(this.eventsData))})}ngAfterViewInit(){this.eventsData.length>0&&this.loadForwardingEventsTable(this.eventsData)}ngOnChanges(e){e.eventsData&&(this.apiCallStatus={status:l.Bn.COMPLETED,action:"FetchPayments"},this.eventsData=e.eventsData.currentValue,e.eventsData.firstChange||this.loadForwardingEventsTable(this.eventsData)),e.filterValue&&!e.filterValue.firstChange&&this.applyFilter()}onForwardingEventClick(e,i){const o=[[{key:"paymentHash",value:e.paymentHash,title:"Payment Hash",width:100,type:l.Gi.STRING}],[{key:"timestamp",value:Math.round(e.timestamp/1e3),title:"Date/Time",width:50,type:l.Gi.DATE_TIME},{key:"fee",value:e.amountIn-e.amountOut,title:"Fee Earned (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"amountIn",value:e.amountIn,title:"Amount In (Sats)",width:50,type:l.Gi.NUMBER},{key:"amountOut",value:e.amountOut,title:"Amount Out (Sats)",width:50,type:l.Gi.NUMBER}],[{key:"fromChannelAlias",value:e.fromChannelAlias,title:"From Channel Alias",width:50,type:l.Gi.STRING},{key:"fromShortChannelId",value:e.fromShortChannelId,title:"From Short Channel ID",width:50,type:l.Gi.STRING}],[{key:"fromChannelId",value:e.fromChannelId,title:"From Channel Id",width:100,type:l.Gi.STRING}],[{key:"toChannelAlias",value:e.toChannelAlias,title:"To Channel Alias",width:50,type:l.Gi.STRING},{key:"toShortChannelId",value:e.toShortChannelId,title:"To Short Channel ID",width:50,type:l.Gi.STRING}],[{key:"toChannelId",value:e.toChannelId,title:"To Channel Id",width:100,type:l.Gi.STRING}]];"payment-relayed"!==e.type&&o.unshift([{key:"type",value:this.commonService.camelCase(e.type),title:"Relay Type",width:100,type:l.Gi.STRING}]),this.store.dispatch((0,Z.qR)({payload:{data:{type:l.n_.INFORMATION,alertTitle:"Event Information",message:o}}}))}loadForwardingEventsTable(e){this.forwardingHistoryEvents=new r.by([...e]),this.forwardingHistoryEvents.sort=this.sort,this.forwardingHistoryEvents.sortingDataAccessor=(i,o)=>"fee"===o?i.amountIn-i.amountOut:i[o]&&isNaN(i[o])?i[o].toLocaleLowerCase():i[o]?+i[o]:null,this.forwardingHistoryEvents.filterPredicate=(i,o)=>((i.timestamp?this.datePipe.transform(new Date(i.timestamp),"dd/MMM/YYYY HH:mm").toLowerCase():"")+JSON.stringify(i).toLowerCase()).includes(o),this.forwardingHistoryEvents.paginator=this.paginator,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")}applyFilter(){this.forwardingHistoryEvents&&(this.forwardingHistoryEvents.filter=this.filterValue.trim().toLowerCase())}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh),t.Y36(u.uU))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-forwarding-history"]],viewQuery:function(e,i){if(1&e&&(t.Gf(v.YE,5),t.Gf(A.NW,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sort=o.first),t.iGM(o=t.CRH())&&(i.paginator=o.first)}},inputs:{eventsData:"eventsData",filterValue:"filterValue"},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Events")}]),t.TTD],decls:5,vars:4,consts:[["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","30"],["matInput","","name","filter","placeholder","Filter",3,"ngModel","ngModelChange","input","keyup"],["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,"dataSource"],["table",""],["matColumnDef","timestamp"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","fromChannelAlias"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","toChannelAlias"],["matColumnDef","amountIn"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["matColumnDef","amountOut"],["matColumnDef","fee"],["matColumnDef","actions"],["mat-header-cell","","class","px-3",4,"matHeaderCellDef"],["mat-cell","","class","px-3","fxLayoutAlign","end center",4,"matCellDef"],["matColumnDef","no_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell",""],["class","dot yellow","matTooltipPosition","right",3,"matTooltip","ngClass",4,"ngIf"],["matTooltipPosition","right",1,"dot","yellow",3,"matTooltip","ngClass"],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["fxLayoutAlign","end center"],["mat-header-cell","",1,"px-3"],[1,"bordered-box","table-actions-select"],["placeholder","Actions","tabindex","1",1,"mr-0"],[3,"click"],["mat-cell","","fxLayoutAlign","end center",1,"px-3"],["mat-stroked-button","","color","primary","type","button","tabindex","4",3,"click"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Kl,2,1,"div",1),t.YNc(2,jl,4,1,"div",2),t.YNc(3,Zr,30,7,"div",3),t.YNc(4,Sr,1,3,"mat-paginator",4),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",""!==i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,M.pW,r.BZ,v.YE,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,V.gM,u.mk,w.oO,u.PC,w.Zl,P.gD,P.$L,Y.ey,I.lW,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[Wl,u.uU,u.JJ],styles:[".mat-column-fromAlias[_ngcontent-%COMP%]{padding-left:2rem;flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-toAlias[_ngcontent-%COMP%]{padding-left:1rem;flex:1 1 20%;width:20%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-column-actions[_ngcontent-%COMP%]{min-height:4.8rem}"]}),n})();const wr=["tableIn"],Er=["tableOut"],Ir=["paginatorIn"],Or=["paginatorOut"];function Fr(n,a){if(1&n&&(t.TgZ(0,"div",3),t._uU(1),t.qZA()),2&n){const e=t.oxw();t.xp6(1),t.Oqu(e.errorMessage)}}function qr(n,a){1&n&&t._UZ(0,"mat-progress-bar",36)}function Rr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Channel ID"),t.qZA())}const tt=function(n){return{"max-width":n}};function Nr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,tt,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.channelId)}}function kr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Peer Alias"),t.qZA())}function Pr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,tt,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.alias)}}function Dr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Events"),t.qZA())}function Ur(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.events))}}function Mr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Amount (Sats)"),t.qZA())}function Jr(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalAmount))}}function Qr(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Fee (Sats)"),t.qZA())}function Yr(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalFee))}}function Hr(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No incoming routing peer available."),t.qZA())}function Br(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting incoming routing peers..."),t.qZA())}function zr(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function Vr(n,a){if(1&n&&(t.TgZ(0,"td",42),t.YNc(1,Hr,2,0,"p",43),t.YNc(2,Br,2,0,"p",43),t.YNc(3,zr,2,1,"p",43),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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)}}const Rt=function(n){return{"display-none":n}};function Gr(n,a){if(1&n&&t._UZ(0,"tr",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Rt,(null==e.RoutingPeersIncoming?null:e.RoutingPeersIncoming.data)&&(null==e.RoutingPeersIncoming||null==e.RoutingPeersIncoming.data?null:e.RoutingPeersIncoming.data.length)>0))}}function Xr(n,a){1&n&&t._UZ(0,"tr",45)}function $r(n,a){1&n&&t._UZ(0,"tr",46)}function Wr(n,a){1&n&&t._UZ(0,"mat-progress-bar",36)}function Kr(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Channel ID"),t.qZA())}function jr(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,tt,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.channelId)}}function tc(n,a){1&n&&(t.TgZ(0,"th",37),t._uU(1,"Peer Alias"),t.qZA())}function ec(n,a){if(1&n&&(t.TgZ(0,"td",38),t._uU(1),t.qZA()),2&n){const e=a.$implicit,i=t.oxw(2);t.Q6J("ngStyle",t.VKq(2,tt,i.screenSize===i.screenSizeEnum.XS?"5rem":"10rem")),t.xp6(1),t.Oqu(e.alias)}}function nc(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Events"),t.qZA())}function ic(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.events))}}function ac(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Amount (Sats)"),t.qZA())}function oc(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalAmount))}}function sc(n,a){1&n&&(t.TgZ(0,"th",39),t._uU(1,"Fee (Sats)"),t.qZA())}function lc(n,a){if(1&n&&(t.TgZ(0,"td",40)(1,"span",41),t._uU(2),t.ALo(3,"number"),t.qZA()()),2&n){const e=a.$implicit;t.xp6(2),t.Oqu(t.lcZ(3,1,e.totalFee))}}function rc(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"No outgoing routing peer available."),t.qZA())}function cc(n,a){1&n&&(t.TgZ(0,"p"),t._uU(1,"Getting outgoing routing peers..."),t.qZA())}function uc(n,a){if(1&n&&(t.TgZ(0,"p"),t._uU(1),t.qZA()),2&n){const e=t.oxw(3);t.xp6(1),t.Oqu(e.errorMessage)}}function pc(n,a){if(1&n&&(t.TgZ(0,"td",42),t.YNc(1,rc,2,0,"p",43),t.YNc(2,cc,2,0,"p",43),t.YNc(3,uc,2,1,"p",43),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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.xp6(1),t.Q6J("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 mc(n,a){if(1&n&&t._UZ(0,"tr",44),2&n){const e=t.oxw(2);t.Q6J("ngClass",t.VKq(1,Rt,(null==e.RoutingPeersOutgoing?null:e.RoutingPeersOutgoing.data)&&(null==e.RoutingPeersOutgoing||null==e.RoutingPeersOutgoing.data?null:e.RoutingPeersOutgoing.data.length)>0))}}function dc(n,a){1&n&&t._UZ(0,"tr",45)}function hc(n,a){1&n&&t._UZ(0,"tr",46)}const _c=function(n,a){return{"mt-2":n,"mt-1":a}},fc=function(){return["no_incoming_event"]},gc=function(n){return{"mt-2":n}},Cc=function(){return["no_outgoing_event"]};function xc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7),t._uU(4,"Incoming"),t.qZA(),t.TgZ(5,"mat-form-field",8)(6,"input",9),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyIncomingFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().filterIn=o}),t.qZA()()(),t.TgZ(7,"div",10),t.YNc(8,qr,1,0,"mat-progress-bar",11),t.TgZ(9,"table",12,13),t.ynx(11,14),t.YNc(12,Rr,2,0,"th",15),t.YNc(13,Nr,2,4,"td",16),t.BQk(),t.ynx(14,17),t.YNc(15,kr,2,0,"th",15),t.YNc(16,Pr,2,4,"td",16),t.BQk(),t.ynx(17,18),t.YNc(18,Dr,2,0,"th",19),t.YNc(19,Ur,4,3,"td",20),t.BQk(),t.ynx(20,21),t.YNc(21,Mr,2,0,"th",19),t.YNc(22,Jr,4,3,"td",20),t.BQk(),t.ynx(23,22),t.YNc(24,Qr,2,0,"th",19),t.YNc(25,Yr,4,3,"td",20),t.BQk(),t.ynx(26,23),t.YNc(27,Vr,4,3,"td",24),t.BQk(),t.YNc(28,Gr,1,3,"tr",25),t.YNc(29,Xr,1,0,"tr",26),t.YNc(30,$r,1,0,"tr",27),t.qZA()(),t._UZ(31,"mat-paginator",28,29),t.qZA(),t.TgZ(33,"div",30)(34,"div",6)(35,"div",7),t._uU(36,"Outgoing"),t.qZA(),t.TgZ(37,"mat-form-field",8)(38,"input",9),t.NdJ("keyup",function(){return t.CHM(e),t.oxw().applyOutgoingFilter()})("ngModelChange",function(o){return t.CHM(e),t.oxw().filterOut=o}),t.qZA()()(),t.TgZ(39,"div",31),t.YNc(40,Wr,1,0,"mat-progress-bar",11),t.TgZ(41,"table",32,33),t.ynx(43,14),t.YNc(44,Kr,2,0,"th",15),t.YNc(45,jr,2,4,"td",16),t.BQk(),t.ynx(46,17),t.YNc(47,tc,2,0,"th",15),t.YNc(48,ec,2,4,"td",16),t.BQk(),t.ynx(49,18),t.YNc(50,nc,2,0,"th",19),t.YNc(51,ic,4,3,"td",20),t.BQk(),t.ynx(52,21),t.YNc(53,ac,2,0,"th",19),t.YNc(54,oc,4,3,"td",20),t.BQk(),t.ynx(55,22),t.YNc(56,sc,2,0,"th",19),t.YNc(57,lc,4,3,"td",20),t.BQk(),t.ynx(58,34),t.YNc(59,pc,4,3,"td",24),t.BQk(),t.YNc(60,mc,1,3,"tr",25),t.YNc(61,dc,1,0,"tr",26),t.YNc(62,hc,1,0,"tr",27),t.qZA(),t._UZ(63,"mat-paginator",28,35),t.qZA()()()}if(2&n){const e=t.oxw();t.xp6(2),t.Q6J("ngClass",t.WLB(22,_c,e.screenSize===e.screenSizeEnum.XS,e.screenSize===e.screenSizeEnum.SM)),t.xp6(4),t.Q6J("ngModel",e.filterIn),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.RoutingPeersIncoming),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(25,fc)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS),t.xp6(3),t.Q6J("ngClass",t.VKq(26,gc,e.screenSize!==e.screenSizeEnum.LG)),t.xp6(4),t.Q6J("ngModel",e.filterOut),t.xp6(2),t.Q6J("ngIf",e.apiCallStatus.status===e.apiCallStatusEnum.INITIATED),t.xp6(1),t.Q6J("dataSource",e.RoutingPeersOutgoing),t.xp6(19),t.Q6J("matFooterRowDef",t.DdM(28,Cc)),t.xp6(1),t.Q6J("matHeaderRowDef",e.displayedColumns)("matHeaderRowDefSticky",e.flgSticky),t.xp6(1),t.Q6J("matRowDefColumns",e.displayedColumns),t.xp6(1),t.Q6J("pageSize",e.pageSize)("pageSizeOptions",e.pageSizeOptions)("showFirstLastButtons",e.screenSize!==e.screenSizeEnum.XS)}}let yc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.routingPeersData=[],this.displayedColumns=[],this.flgSticky=!1,this.pageSize=l.IV,this.pageSizeOptions=l.TJ,this.screenSize="",this.screenSizeEnum=l.cu,this.errorMessage="",this.filterIn="",this.filterOut="",this.apiCallStatus=null,this.apiCallStatusEnum=l.Bn,this.unSubs=[new d.x,new d.x,new d.x],this.screenSize=this.commonService.getScreenSize(),this.screenSize===l.cu.XS?(this.flgSticky=!1,this.displayedColumns=["alias","totalFee"]):this.screenSize===l.cu.SM?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalFee"]):this.screenSize===l.cu.MD?(this.flgSticky=!1,this.displayedColumns=["alias","events","totalAmount","totalFee"]):(this.flgSticky=!0,this.displayedColumns=["channelId","alias","events","totalAmount","totalFee"])}ngOnInit(){this.store.select(C.PP).pipe((0,h.R)(this.unSubs[0])).subscribe(e=>{this.errorMessage="",this.apiCallStatus=e.apiCallStatus,this.apiCallStatus.status===l.Bn.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)}loadRoutingPeersTable(e){if(e.length>0){const i=this.groupRoutingPeers(e);this.RoutingPeersIncoming=new r.by(i[0]),this.RoutingPeersIncoming.sort=this.sortIn,this.RoutingPeersIncoming.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersIncoming.paginator=this.paginatorIn,this.logger.info(this.RoutingPeersIncoming),this.RoutingPeersOutgoing=new r.by(i[1]),this.RoutingPeersOutgoing.sort=this.sortOut,this.RoutingPeersOutgoing.filterPredicate=(o,s)=>JSON.stringify(o).toLowerCase().includes(s),this.RoutingPeersOutgoing.paginator=this.paginatorOut,this.logger.info(this.RoutingPeersOutgoing)}else this.RoutingPeersIncoming=new r.by([]),this.RoutingPeersOutgoing=new r.by([]);this.applyIncomingFilter(),this.applyOutgoingFilter()}groupRoutingPeers(e){const i=[],o=[];return e.forEach(s=>{const c=i.find(F=>F.channelId===s.fromChannelId),f=o.find(F=>F.channelId===s.toChannelId);c?(c.events++,c.totalAmount=+c.totalAmount+ +s.amountIn,c.totalFee=s.amountIn-s.amountOut+ +c.totalFee):i.push({channelId:s.fromChannelId,alias:s.fromChannelAlias,events:1,totalAmount:+s.amountIn,totalFee:s.amountIn-s.amountOut}),f?(f.events++,f.totalAmount=+f.totalAmount+ +s.amountOut,f.totalFee=s.amountIn-s.amountOut+ +f.totalFee):o.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(o,"totalFee")]}applyIncomingFilter(){this.RoutingPeersIncoming.filter=this.filterIn.toLowerCase()}applyOutgoingFilter(){this.RoutingPeersOutgoing.filter=this.filterOut.toLowerCase()}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-routing-peers"]],viewQuery:function(e,i){if(1&e&&(t.Gf(wr,5,v.YE),t.Gf(Er,5,v.YE),t.Gf(Ir,5),t.Gf(Or,5)),2&e){let o;t.iGM(o=t.CRH())&&(i.sortIn=o.first),t.iGM(o=t.CRH())&&(i.sortOut=o.first),t.iGM(o=t.CRH())&&(i.paginatorIn=o.first),t.iGM(o=t.CRH())&&(i.paginatorOut=o.first)}},features:[t._Bn([{provide:A.ye,useValue:(0,l.pt)("Peers")}])],decls:3,vars:2,consts:[["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",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"],["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","30"],["matInput","","placeholder","Filter",3,"ngModel","keyup","ngModelChange"],["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,"dataSource"],["tableIn",""],["matColumnDef","channelId"],["mat-header-cell","","mat-sort-header","",4,"matHeaderCellDef"],["mat-cell","",3,"ngStyle",4,"matCellDef"],["matColumnDef","alias"],["matColumnDef","events"],["mat-header-cell","","mat-sort-header","","arrowPosition","before",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","totalAmount"],["matColumnDef","totalFee"],["matColumnDef","no_incoming_event"],["mat-footer-cell","","colspan","4",4,"matFooterCellDef"],["mat-footer-row","",3,"ngClass",4,"matFooterRowDef"],["mat-header-row","",4,"matHeaderRowDef","matHeaderRowDefSticky"],["mat-row","",4,"matRowDef","matRowDefColumns"],[1,"mb-1",3,"pageSize","pageSizeOptions","showFirstLastButtons"],["paginatorIn",""],["fxLayout","column","fxFlex","49","fxLayoutAlign","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,"dataSource"],["tableOut",""],["matColumnDef","no_outgoing_event"],["paginatorOut",""],["mode","indeterminate"],["mat-header-cell","","mat-sort-header",""],["mat-cell","",3,"ngStyle"],["mat-header-cell","","mat-sort-header","","arrowPosition","before"],["mat-cell",""],["fxLayoutAlign","end center"],["mat-footer-cell","","colspan","4"],[4,"ngIf"],["mat-footer-row","",3,"ngClass"],["mat-header-row",""],["mat-row",""]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t.YNc(1,Fr,2,1,"div",1),t.YNc(2,xc,65,29,"div",2),t.qZA()),2&e&&(t.xp6(1),t.Q6J("ngIf",""!==i.errorMessage),t.xp6(1),t.Q6J("ngIf",""===i.errorMessage))},directives:[p.xw,p.Wh,u.O5,p.yH,u.mk,w.oO,y.KE,U.Nt,m.Fj,m.JJ,m.On,Q.$V,M.pW,r.BZ,v.YE,r.w1,r.fO,r.ge,v.nU,r.Dz,r.ev,u.PC,w.Zl,r.mD,r.yh,r.Ke,r.Q2,r.as,r.XQ,r.nj,r.Gk,A.NW],pipes:[u.JJ],styles:[".mat-column-channelId[_ngcontent-%COMP%], .mat-column-alias[_ngcontent-%COMP%]{flex:1 1 10%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}"]}),n})();function Lc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",7),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}let Tc=(()=>{class n{constructor(e){this.router=e,this.faChartBar=L.koM,this.links=[{link:"routingreport",name:"Routing"},{link:"transactions",name:"Transactions"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-reports"]],decls:10,vars:2,consts:[["fxLayout","row","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Reports"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),t.YNc(8,Lc,2,3,"div",6),t.qZA(),t._UZ(9,"router-outlet"),t.qZA()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faChartBar),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,k.BU,u.sg,k.Nj,x.rH,x.lC],styles:[""]}),n})();var Nt=_(7772),kt=_(7671),Pt=_(1210);function vc(n,a){if(1&n&&(t.TgZ(0,"div",13),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw();t.Q6J("@fadeIn",e.totalFeeSat),t.xp6(1),t.AsE("",t.xi3(2,3,e.totalFeeSat||0,"1.0-2")," Sats/",t.lcZ(3,6,e.filteredEventsBySelectedPeriod.length||0)," Events")}}function bc(n,a){1&n&&(t.TgZ(0,"div",14),t._uU(1,"No routing report for the selected period"),t.qZA())}function Ac(n,a){if(1&n&&(t.TgZ(0,"span")(1,"span",17),t._uU(2),t.ALo(3,"number"),t.qZA(),t.TgZ(4,"span",17),t._uU(5),t.ALo(6,"number"),t.qZA()()),2&n){const e=a.model,i=t.oxw(2);t.xp6(2),t.hij("Events: ",t.lcZ(3,2,(i.selReportBy===i.reportBy.EVENTS?e.value:e.extra.totalEvents)||0),""),t.xp6(3),t.hij("Fee: ",t.xi3(6,4,(i.selReportBy===i.reportBy.EVENTS?e.extra.totalFees:e.value)||0,"1.0-2"),"")}}function Zc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ngx-charts-bar-vertical",15),t.NdJ("select",function(o){return t.CHM(e),t.oxw().onChartBarSelected(o)})("mouseup",function(o){return t.CHM(e),t.oxw().onChartMouseUp(o)}),t.YNc(1,Ac,7,7,"ng-template",null,16,t.W1O),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("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 Sc(n,a){if(1&n&&t._UZ(0,"rtl-ecl-forwarding-history",18),2&n){const e=t.oxw();t.Q6J("eventsData",e.filteredEventsBySelectedPeriod)("filterValue",e.eventFilterValue)}}let wc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.events=[],this.filteredEventsBySelectedPeriod=[],this.eventFilterValue="",this.reportBy=l.Xr,this.selReportBy=l.Xr.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.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(C.PP).pipe((0,h.R)(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,h.R)(this.unSubs[1])).subscribe(e=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=e.width/10;break;case l.cu.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 o=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(c=>{Math.floor(c.timestamp/1e3)>=o&&Math.floor(c.timestamp/1e3)0&&"ngx-charts"===e.srcElement.classList[0]&&(this.eventFilterValue="")}onChartBarSelected(e){this.eventFilterValue=this.reportPeriod===l.op[1]?e.name+"/"+this.startDate.getFullYear():e.name.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}prepareFeeReport(e){const i=Math.round(e.getTime()/1e3),o=[];if(this.totalFeeSat=0,this.logger.info("Fee Report Prepare Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()),this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalEvents:0}});this.filteredEventsBySelectedPeriod.map(s=>{const c=new Date(s.timestamp).getMonth();return o[c].value=o[c].value+(s.amountIn-s.amountOut),o[c].extra.totalEvents=o[c].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}else{for(let s=0;s{const c=Math.floor((Math.floor(s.timestamp/1e3)-i)/this.secondsInADay);return o[c].value=o[c].value+(s.amountIn-s.amountOut),o[c].extra.totalEvents=o[c].extra.totalEvents+1,this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}return this.logger.info("Fee Report Prepare Finished at "+new Date(Date.now()).toLocaleString()),o}prepareEventsReport(e){const i=Math.round(e.getTime()/1e3),o=[];if(this.totalFeeSat=0,this.logger.info("Events Report Prepare Starting at "+new Date(Date.now()).toLocaleString()+" From "+e.toLocaleString()),this.reportPeriod===l.op[1]){for(let s=0;s<12;s++)o.push({name:l.gg[s].name,value:0,extra:{totalFees:0}});this.filteredEventsBySelectedPeriod.map(s=>{const c=new Date(s.timestamp).getMonth();return o[c].value=o[c].value+1,o[c].extra.totalFees=o[c].extra.totalFees+(s.amountIn-s.amountOut),this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}else{for(let s=0;s{const c=Math.floor((Math.floor(s.timestamp/1e3)-i)/this.secondsInADay);return o[c].value=o[c].value+1,o[c].extra.totalFees=o[c].extra.totalFees+(s.amountIn-s.amountOut),this.totalFeeSat=(this.totalFeeSat?this.totalFeeSat:0)+(s.amountIn-s.amountOut),this.filteredEventsBySelectedPeriod})}return this.logger.info("Events Report Prepare Finished at "+new Date(Date.now()).toLocaleString()),o}onSelectionChange(e){const i=e.selDate.getMonth(),o=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),23,59,59)),this.filterForwardingEvents(this.startDate,this.endDate),this.eventFilterValue=""}getMonthDays(e,i){return 1===e&&i%4==0?l.gg[e].days+1:l.gg[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()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-routing-report"]],hostBindings:function(e,i){1&e&&t.NdJ("mouseup",function(s){return i.onChartMouseUp(s)})},decls:17,vars:7,consts:[["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 start",1,"my-1",3,"ngModel","ngModelChange","change"],[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,"eventsData","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"one-color",3,"view","results","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"eventsData","filterValue"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),t.NdJ("stepChanged",function(s){return i.onSelectionChange(s)}),t.qZA(),t.TgZ(2,"div",2)(3,"mat-radio-group",3),t.NdJ("ngModelChange",function(s){return i.selReportBy=s})("change",function(){return i.onSelReportByChange()}),t.TgZ(4,"span",4),t._uU(5,"Report By: "),t.qZA(),t.TgZ(6,"mat-radio-button",5),t._uU(7,"Fees"),t.qZA(),t.TgZ(8,"mat-radio-button",6),t._uU(9,"Events"),t.qZA()()(),t.TgZ(10,"div",7),t.YNc(11,vc,4,8,"div",8),t.YNc(12,bc,2,0,"div",9),t.TgZ(13,"div",10),t.YNc(14,Zc,3,11,"ngx-charts-bar-vertical",11),t.qZA(),t.TgZ(15,"div",10),t.YNc(16,Sc,1,2,"rtl-ecl-forwarding-history",12),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ngModel",i.selReportBy),t.xp6(3),t.s9C("value",i.reportBy.FEES),t.xp6(2),t.s9C("value",i.reportBy.EVENTS),t.xp6(3),t.Q6J("ngIf",i.routingReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),t.xp6(1),t.Q6J("ngIf",i.routingReportData.length<=0||i.filteredEventsBySelectedPeriod.length<=0),t.xp6(2),t.Q6J("ngIf",i.routingReportData.length>0&&i.filteredEventsBySelectedPeriod.length>0),t.xp6(2),t.Q6J("ngIf",i.filteredEventsBySelectedPeriod.length>0))},directives:[p.xw,p.Wh,p.yH,kt.D,j.VQ,m.JJ,m.On,j.U0,u.O5,Pt.K$,qt],pipes:[u.JJ],styles:[""],data:{animation:[Nt.J]}}),n})();var Ec=_(165);function Ic(n,a){if(1&n&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.AsE(" Paid ",t.xi3(2,2,e.transactionsReportSummary.amountPaidSelectedPeriod||0,"1.0-2")," Sats/",t.lcZ(3,5,e.transactionsReportSummary.paymentsSelectedPeriod)," Payments ")}}function Oc(n,a){if(1&n&&(t.TgZ(0,"div",10),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=t.oxw(2);t.xp6(1),t.AsE(" Received ",t.xi3(2,2,e.transactionsReportSummary.amountReceivedSelectedPeriod||0,"1.0-2")," Sats/",t.lcZ(3,5,e.transactionsReportSummary.invoicesSelectedPeriod)," Invoices ")}}function Fc(n,a){if(1&n&&(t.TgZ(0,"div",8),t.YNc(1,Ic,4,7,"div",9),t.YNc(2,Oc,4,7,"div",9),t.qZA()),2&n){const e=t.oxw();t.Q6J("@fadeIn",e.transactionsReportSummary),t.xp6(1),t.Q6J("ngIf",e.transactionsReportSummary.paymentsSelectedPeriod),t.xp6(1),t.Q6J("ngIf",e.transactionsReportSummary.invoicesSelectedPeriod)}}function qc(n,a){1&n&&(t.TgZ(0,"div",11),t._uU(1,"No transactions report for the selected period"),t.qZA())}function Rc(n,a){if(1&n&&(t.TgZ(0,"span",14),t._uU(1),t.ALo(2,"number"),t.ALo(3,"number"),t.qZA()),2&n){const e=a.model;t.xp6(1),t.HOy("",e.name,": ",t.xi3(2,4,e.value||0,"1.0-2"),"/# ","Paid"===e.name?"Payments":"Invoices",": ",t.lcZ(3,7,(null==e.extra?null:e.extra.total)||0),"")}}function Nc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"ngx-charts-bar-vertical-2d",12),t.NdJ("select",function(o){return t.CHM(e),t.oxw().onChartBarSelected(o)})("mouseup",function(o){return t.CHM(e),t.oxw().onChartMouseUp(o)}),t.YNc(1,Rc,4,9,"ng-template",null,13,t.W1O),t.qZA()}if(2&n){const e=t.oxw();t.Q6J("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 kc(n,a){if(1&n&&t._UZ(0,"rtl-transactions-report-table",15),2&n){const e=t.oxw();t.Q6J("dataList",e.transactionsNonZeroReportData)("dataRange",e.reportPeriod)("filterValue",e.transactionFilterValue)}}let Pc=(()=>{class n{constructor(e,i,o){this.logger=e,this.commonService=i,this.store=o,this.scrollRanges=l.op,this.reportPeriod=l.op[0],this.secondsInADay=86400,this.payments=[],this.invoices=[],this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0},this.transactionFilterValue="",this.today=new Date(Date.now()),this.startDate=new Date(this.today.getFullYear(),this.today.getMonth(),1,0,0,0),this.endDate=new Date(this.today.getFullYear(),this.today.getMonth(),this.getMonthDays(this.today.getMonth(),this.today.getFullYear()),23,59,59),this.transactionsReportData=[],this.transactionsNonZeroReportData=[],this.view=[350,350],this.screenPaddingX=100,this.gradient=!0,this.xAxisLabel="Date",this.yAxisLabel="Amount (Sats)",this.showYAxisLabel=!0,this.screenSize="",this.screenSizeEnum=l.cu,this.unSubs=[new d.x,new d.x]}ngOnInit(){this.screenSize=this.commonService.getScreenSize(),this.showYAxisLabel=!(this.screenSize===l.cu.XS||this.screenSize===l.cu.SM),this.store.select(C.PP).pipe((0,h.R)(this.unSubs[0]),(0,et.M)(this.store.select(C.Ef))).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,h.R)(this.unSubs[1])).subscribe(e=>{switch(this.screenSize){case l.cu.MD:this.screenPaddingX=e.width/10;break;case l.cu.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.op[1]?e.series.toString()+"/"+this.startDate.getFullYear():e.series.toString().padStart(2,"0")+"/"+l.gg[this.startDate.getMonth()].name+"/"+this.startDate.getFullYear()}filterTransactionsForSelectedPeriod(e,i){const o=Math.round(e.getTime()/1e3),s=Math.round(i.getTime()/1e3),c=[];this.transactionsReportSummary={paymentsSelectedPeriod:0,invoicesSelectedPeriod:0,amountPaidSelectedPeriod:0,amountReceivedSelectedPeriod:0};const f=this.payments.filter(g=>Math.floor(g.firstPartTimestamp/1e3)>=o&&Math.floor(g.firstPartTimestamp/1e3)"received"===g.status&&g.timestamp>=o&&g.timestamp{const b=new Date(g.firstPartTimestamp).getMonth();return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+g.recipientAmount,c[b].series[0].value=c[b].series[0].value+g.recipientAmount,c[b].series[0].extra.total=c[b].series[0].extra.total+1,this.transactionsReportSummary}),F.map(g=>{const b=new Date(1e3*g.timestamp).getMonth();return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+g.amountSettled,c[b].series[1].value=c[b].series[1].value+g.amountSettled,c[b].series[1].extra.total=c[b].series[1].extra.total+1,this.transactionsReportSummary})}else{for(let g=0;g{const b=Math.floor((Math.floor(g.firstPartTimestamp/1e3)-o)/this.secondsInADay);return this.transactionsReportSummary.amountPaidSelectedPeriod=this.transactionsReportSummary.amountPaidSelectedPeriod+g.recipientAmount,c[b].series[0].value=c[b].series[0].value+g.recipientAmount,c[b].series[0].extra.total=c[b].series[0].extra.total+1,this.transactionsReportSummary}),F.map(g=>{const b=Math.floor((g.timestamp-o)/this.secondsInADay);return this.transactionsReportSummary.amountReceivedSelectedPeriod=this.transactionsReportSummary.amountReceivedSelectedPeriod+g.amountSettled,c[b].series[1].value=c[b].series[1].value+g.amountSettled,c[b].series[1].extra.total=c[b].series[1].extra.total+1,this.transactionsReportSummary})}return c}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(),o=e.selDate.getFullYear();this.reportPeriod=e.selScrollRange,this.reportPeriod===l.op[1]?(this.startDate=new Date(o,0,1,0,0,0),this.endDate=new Date(o,11,31,23,59,59)):(this.startDate=new Date(o,i,1,0,0,0),this.endDate=new Date(o,i,this.getMonthDays(i,o),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.gg[e].days+1:l.gg[e].days}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(q.mQ),t.Y36(R.v),t.Y36(S.yh))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-transactions-report"]],hostBindings:function(e,i){1&e&&t.NdJ("mouseup",function(s){return i.onChartMouseUp(s)})},decls:9,vars:4,consts:[["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x-large"],[3,"stepChanged"],["fxLayout","column","fxLayoutAlign","start stretch","fxFlex","100",1,"padding-gap-x"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 font-bold-700 mt-1",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100","class","font-size-120 mt-1",4,"ngIf"],[1,"mt-1"],["class","two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup",4,"ngIf"],[3,"dataList","dataRange","filterValue",4,"ngIf"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","font-bold-700","mt-1"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100",4,"ngIf"],["fxLayout","row","fxLayoutAlign","start stretch","fxFlex","100"],["fxLayout","column","fxLayoutAlign","center center","fxFlex","100",1,"font-size-120","mt-1"],[1,"two-color",3,"view","results","noBarWhenZero","gradient","xAxis","yAxis","showXAxisLabel","showYAxisLabel","xAxisLabel","yAxisLabel","showGridLines","showDataLabel","groupPadding","select","mouseup"],["tooltipTemplate",""],[1,"tooltip-label"],[3,"dataList","dataRange","filterValue"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0)(1,"rtl-horizontal-scroller",1),t.NdJ("stepChanged",function(s){return i.onSelectionChange(s)}),t.qZA(),t.TgZ(2,"div",2),t.YNc(3,Fc,3,3,"div",3),t.YNc(4,qc,2,0,"div",4),t.TgZ(5,"div",5),t.YNc(6,Nc,3,13,"ngx-charts-bar-vertical-2d",6),t.qZA(),t.TgZ(7,"div",5),t.YNc(8,kc,1,3,"rtl-transactions-report-table",7),t.qZA()()()),2&e&&(t.xp6(3),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),t.xp6(1),t.Q6J("ngIf",i.transactionsNonZeroReportData.length<=0),t.xp6(2),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0),t.xp6(2),t.Q6J("ngIf",i.transactionsNonZeroReportData.length>0))},directives:[p.xw,p.Wh,p.yH,kt.D,u.O5,Pt.H5,Ec.g],pipes:[u.JJ],styles:[""],data:{animation:[Nt.J]}}),n})();var E=_(1643),Dc=_(9442);function Uc(n,a){if(1&n){const e=t.EpF();t.TgZ(0,"div",8),t.NdJ("click",function(){const s=t.CHM(e).$implicit;return t.oxw().activeLink=s.link}),t._uU(1),t.qZA()}if(2&n){const e=a.$implicit,i=t.oxw();t.s9C("routerLink",e.link),t.Q6J("active",i.activeLink===e.link),t.xp6(1),t.Oqu(e.name)}}const Qc=x.Bz.forChild([{path:"",component:mt,children:[{path:"",pathMatch:"full",redirectTo:"home"},{path:"home",component:ki,canActivate:[E.fY]},{path:"onchain",component:Ca,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"receive"},{path:"receive",component:Va,canActivate:[E.fY]},{path:"send",component:Ga,canActivate:[E.fY]}]},{path:"connections",component:La,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"channels"},{path:"channels",component:mo,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"open"},{path:"open",component:ts,canActivate:[E.fY]},{path:"pending",component:Ts,canActivate:[E.fY]},{path:"inactive",component:$l,canActivate:[E.fY]}]},{path:"peers",component:ll,data:{sweepAll:!1},canActivate:[E.fY]}]},{path:"transactions",component:va,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"payments"},{path:"payments",component:xt,canActivate:[E.fY]},{path:"invoices",component:gt,canActivate:[E.fY]}]},{path:"routing",component:Aa,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"forwardinghistory"},{path:"forwardinghistory",component:qt,canActivate:[E.fY]},{path:"peers",component:yc,canActivate:[E.fY]}]},{path:"reports",component:Tc,canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"routingreport"},{path:"routingreport",component:wc,canActivate:[E.fY]},{path:"transactions",component:Pc,canActivate:[E.fY]}]},{path:"graph",component:(()=>{class n{constructor(e){this.router=e,this.faSearch=L.wn1,this.links=[{link:"lookups",name:"Lookup"},{link:"queryroutes",name:"Query Routes"}],this.activeLink=this.links[0].link,this.unSubs=[new d.x,new d.x,new d.x,new d.x]}ngOnInit(){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,h.R)(this.unSubs[0]),(0,J.h)(i=>i instanceof x.Av)).subscribe({next:i=>{const o=this.links.find(s=>i.urlAfterRedirects.includes(s.link));this.activeLink=o?o.link:this.links[0].link}})}ngOnDestroy(){this.unSubs.forEach(e=>{e.next(null),e.complete()})}}return n.\u0275fac=function(e){return new(e||n)(t.Y36(x.F0))},n.\u0275cmp=t.Xpm({type:n,selectors:[["rtl-ecl-graph"]],decls:11,vars:2,consts:[["fxLayout","row wrap","fxLayoutAlign","start center",1,"page-title-container"],[1,"page-title-img","mr-1",3,"icon"],[1,"page-title"],["fxLayout","column",1,"padding-gap-x"],["fxLayout","column"],["mat-tab-nav-bar",""],["role","tab","mat-tab-link","","class","mat-tab-label",3,"active","routerLink","click",4,"ngFor","ngForOf"],["fxLayout","column","fxFlex","100","fxLayoutAlign","space-between stretch",1,"mat-tab-body-wrapper"],["role","tab","mat-tab-link","",1,"mat-tab-label",3,"active","routerLink","click"]],template:function(e,i){1&e&&(t.TgZ(0,"div",0),t._UZ(1,"fa-icon",1),t.TgZ(2,"span",2),t._uU(3,"Graph Lookups"),t.qZA()(),t.TgZ(4,"div",3)(5,"mat-card")(6,"mat-card-content",4)(7,"nav",5),t.YNc(8,Uc,2,3,"div",6),t.qZA(),t.TgZ(9,"div",7),t._UZ(10,"router-outlet"),t.qZA()()()()),2&e&&(t.xp6(1),t.Q6J("icon",i.faSearch),t.xp6(7),t.Q6J("ngForOf",i.links))},directives:[p.xw,p.Wh,O.BN,T.a8,T.dn,k.BU,u.sg,k.Nj,x.rH,p.yH,x.lC],styles:[""]}),n})(),canActivate:[E.fY],children:[{path:"",pathMatch:"full",redirectTo:"lookups"},{path:"lookups",component:Ba,canActivate:[E.fY]},{path:"queryroutes",component:Tl,canActivate:[E.fY]}]},{path:"**",component:Dc.w}]}]);var Yc=_(8750);let Hc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=t.oAB({type:n,bootstrap:[mt]}),n.\u0275inj=t.cJS({providers:[E.fY],imports:[[u.ez,Yc.m,Qc]]}),n})()}}]); \ No newline at end of file diff --git a/frontend/index.html b/frontend/index.html index a6825064..b132a595 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -13,6 +13,6 @@ - + \ No newline at end of file diff --git a/frontend/runtime.aaa2a40c5f2b2f06.js b/frontend/runtime.379f748f82de1ce5.js similarity index 95% rename from frontend/runtime.aaa2a40c5f2b2f06.js rename to frontend/runtime.379f748f82de1ce5.js index e4e53b63..bd506504 100644 --- a/frontend/runtime.aaa2a40c5f2b2f06.js +++ b/frontend/runtime.379f748f82de1ce5.js @@ -1 +1 @@ -(()=>{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(n,t,f,o)=>{if(!t){var a=1/0;for(i=0;i=o)&&Object.keys(r.O).every(b=>r.O[b](t[u]))?t.splice(u--,1):(c=!1,o0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[t,f,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>e+"."+{564:"5eb6603768afa44f",636:"2179ed55de2143bc",893:"9a615c46b89a5a79",924:"5f21f58ee3917b8b"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="RTLApp:";r.l=(t,f,o,i)=>{if(e[t])e[t].push(f);else{var a,c;if(void 0!==o)for(var u=document.getElementsByTagName("script"),d=0;d{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(b)),m)return m(b)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),c&&document.head.appendChild(a)}}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(f,o)=>{var i=r.o(e,f)?e[f]:void 0;if(0!==i)if(i)o.push(i[2]);else if(666!=f){var a=new Promise((l,s)=>i=e[f]=[l,s]);o.push(i[2]=a);var c=r.p+r.u(f),u=new Error;r.l(c,l=>{if(r.o(e,f)&&(0!==(i=e[f])&&(e[f]=void 0),i)){var s=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;u.message="Loading chunk "+f+" failed.\n("+s+": "+p+")",u.name="ChunkLoadError",u.type=s,u.request=p,i[1](u)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,o)=>{var u,d,[i,a,c]=o,l=0;if(i.some(p=>0!==e[p])){for(u in a)r.o(a,u)&&(r.m[u]=a[u]);if(c)var s=c(r)}for(f&&f(o);l{"use strict";var e,v={},g={};function r(e){var n=g[e];if(void 0!==n)return n.exports;var t=g[e]={id:e,loaded:!1,exports:{}};return v[e].call(t.exports,t,t.exports,r),t.loaded=!0,t.exports}r.m=v,e=[],r.O=(n,t,f,o)=>{if(!t){var a=1/0;for(i=0;i=o)&&Object.keys(r.O).every(b=>r.O[b](t[u]))?t.splice(u--,1):(c=!1,o0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[t,f,o]},r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var t in n)r.o(n,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((n,t)=>(r.f[t](e,n),n),[])),r.u=e=>e+"."+{564:"d224f537513d1972",636:"d70da2a07ddfc5b5",893:"9a615c46b89a5a79",924:"6a3e6171c436f405"}[e]+".js",r.miniCssF=e=>{},r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),(()=>{var e={},n="RTLApp:";r.l=(t,f,o,i)=>{if(e[t])e[t].push(f);else{var a,c;if(void 0!==o)for(var u=document.getElementsByTagName("script"),d=0;d{a.onerror=a.onload=null,clearTimeout(p);var h=e[t];if(delete e[t],a.parentNode&&a.parentNode.removeChild(a),h&&h.forEach(_=>_(b)),m)return m(b)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=s.bind(null,a.onerror),a.onload=s.bind(null,a.onload),c&&document.head.appendChild(a)}}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:n=>n},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("angular#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="",(()=>{var e={666:0};r.f.j=(f,o)=>{var i=r.o(e,f)?e[f]:void 0;if(0!==i)if(i)o.push(i[2]);else if(666!=f){var a=new Promise((l,s)=>i=e[f]=[l,s]);o.push(i[2]=a);var c=r.p+r.u(f),u=new Error;r.l(c,l=>{if(r.o(e,f)&&(0!==(i=e[f])&&(e[f]=void 0),i)){var s=l&&("load"===l.type?"missing":l.type),p=l&&l.target&&l.target.src;u.message="Loading chunk "+f+" failed.\n("+s+": "+p+")",u.name="ChunkLoadError",u.type=s,u.request=p,i[1](u)}},"chunk-"+f,f)}else e[f]=0},r.O.j=f=>0===e[f];var n=(f,o)=>{var u,d,[i,a,c]=o,l=0;if(i.some(p=>0!==e[p])){for(u in a)r.o(a,u)&&(r.m[u]=a[u]);if(c)var s=c(r)}for(f&&f(o);l
{{errorMessage}}
-
-
- - - +
+
+ + Maximum 1,000 failed transactions only. +
+
+
+ + + +
diff --git a/src/app/cln/routing/failed-transactions/failed-transactions.component.ts b/src/app/cln/routing/failed-transactions/failed-transactions.component.ts index 07a90a0c..a6820b64 100644 --- a/src/app/cln/routing/failed-transactions/failed-transactions.component.ts +++ b/src/app/cln/routing/failed-transactions/failed-transactions.component.ts @@ -18,6 +18,7 @@ import { RTLState } from '../../../store/rtl.state'; import { openAlert } from '../../../store/rtl.actions'; import { getForwardingHistory } from '../../store/cln.actions'; import { failedForwardingHistory } from '../../store/cln.selector'; +import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; @Component({ selector: 'rtl-cln-failed-history', @@ -31,6 +32,7 @@ export class CLNFailedTransactionsComponent implements OnInit, AfterViewInit, On @ViewChild(MatSort, { static: false }) sort: MatSort | undefined; @ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined; + public faExclamationTriangle = faExclamationTriangle; public failedEvents: any; public errorMessage = ''; public displayedColumns: any[] = []; diff --git a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.html b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.html index 75aaf9c8..ceb8418f 100644 --- a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.html +++ b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.html @@ -1,10 +1,16 @@
{{errorMessage}}
-
-
- - - +
+
+ + Maximum 1,000 local failed transactions only. +
+
+
+ + + +
diff --git a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts index ee2d0af1..0f1b4a1c 100644 --- a/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts +++ b/src/app/cln/routing/local-failed-transactions/local-failed-transactions.component.ts @@ -18,6 +18,7 @@ import { RTLState } from '../../../store/rtl.state'; import { openAlert } from '../../../store/rtl.actions'; import { getForwardingHistory } from '../../store/cln.actions'; import { localFailedForwardingHistory } from '../../store/cln.selector'; +import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; @Component({ selector: 'rtl-cln-local-failed-history', @@ -31,6 +32,7 @@ export class CLNLocalFailedTransactionsComponent implements OnInit, AfterViewIni @ViewChild(MatSort, { static: false }) sort: MatSort | undefined; @ViewChild(MatPaginator, { static: false }) paginator: MatPaginator | undefined; + public faExclamationTriangle = faExclamationTriangle; public CLNFailReason = CLNFailReason; public failedLocalEvents: any; public errorMessage = ''; diff --git a/src/app/lnd/transactions/send-payment-modal/send-payment.component.ts b/src/app/lnd/transactions/send-payment-modal/send-payment.component.ts index df8d6d36..e88f3029 100644 --- a/src/app/lnd/transactions/send-payment-modal/send-payment.component.ts +++ b/src/app/lnd/transactions/send-payment-modal/send-payment.component.ts @@ -89,10 +89,10 @@ export class LightningSendPaymentsComponent implements OnInit, OnDestroy { } private filterChannels(): Channel[] { - return this.activeChannels.filter((channel) => { + return this.activeChannels && this.activeChannels.length ? this.activeChannels.filter((channel) => { const alias = channel.remote_alias ? channel.remote_alias.toLowerCase() : channel.chan_id ? channel.chan_id.toLowerCase() : ''; return alias.indexOf(this.selectedChannelCtrl.value ? this.selectedChannelCtrl.value.toLowerCase() : '') === 0 && (channel.local_balance || 0) >= +(this.paymentDecoded.num_satoshis ? this.paymentDecoded.num_satoshis : 0); - }); + }) : []; } displayFn(channel: Channel): string { @@ -101,10 +101,10 @@ export class LightningSendPaymentsComponent implements OnInit, OnDestroy { onSelectedChannelChanged() { if (this.selectedChannelCtrl.value && this.selectedChannelCtrl.value.length > 0 && typeof this.selectedChannelCtrl.value === 'string') { - const foundChannels = this.activeChannels.filter((channel) => { + const foundChannels = this.activeChannels && this.activeChannels.length ? this.activeChannels.filter((channel) => { const alias = channel.remote_alias ? channel.remote_alias.toLowerCase() : channel.chan_id ? channel.chan_id.toLowerCase() : ''; return alias.length === this.selectedChannelCtrl.value.length && alias.indexOf(this.selectedChannelCtrl.value ? this.selectedChannelCtrl.value.toLowerCase() : '') === 0; - }); + }) : []; if (foundChannels && foundChannels.length > 0) { this.selectedChannelCtrl.setValue(foundChannels[0]); this.selectedChannelCtrl.setErrors(null);