Ride-The-Lightning-RTL/frontend/636.b883c00cebb300aa.js

1 line
672 KiB
JavaScript
Raw Normal View History

"use strict";(self.webpackChunkRTLApp=self.webpackChunkRTLApp||[]).push([[636],{1636:(cC,Pe,C)=>{C.r(Pe),C.d(Pe,{LNDModule:()=>lC});var m=C(6895),b=C(9116),ct=C(8878),e=C(4650),d=C(1576),Q=C(3162);function ut(t,o){1&t&&e._UZ(0,"mat-progress-bar",3)}let Re=(()=>{var t;class o{constructor(i){this.router=i,this.loading=!1,this.router.events.subscribe(a=>{switch(!0){case a instanceof b.OD:this.loading=!0;break;case a instanceof b.m2:case a instanceof b.gk:case a instanceof b.Q3:this.loading=!1}})}}return(t=o).\u0275fac=function(i){return new(i||t)(e.Y36(b.F0))},t.\u0275cmp=e.Xpm({type:t,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(i,a){1&i&&(e.TgZ(0,"div",0),e.YNc(1,ut,1,0,"mat-progress-bar",1),e._UZ(2,"router-outlet",null,2),e.qZA()),2&i&&(e.xp6(1),e.Q6J("ngIf",a.loading))},dependencies:[m.O5,d.xw,d.Wh,d.yH,Q.pW,b.lC],data:{animation:[ct.g]}}),o})();var p=C(7579),h=C(2722),B=C(9300),Me=C(3396),T=C(2687),l=C(7731),f=C(6529),U=C(5043),N=C(9653),X=C(493),R=C(62),D=C(2216),F=C(5829),O=C(4859),v=C(3546),de=C(782),ie=C(7392),be=C(8255),P=C(3848),k=C(8739),S=C(6308),c=C(671),E=C(5412),Z=C(6523),u=C(4006),M=C(4144),g=C(9549),L=C(4385),Y=C(3238),he=C(455),K=C(266),$=C(3390),te=C(6534);function pt(t,o){if(1&t&&(e.TgZ(0,"mat-option",28),e._uU(1),e.ALo(2,"titlecase"),e.qZA()),2&t){const n=o.$implicit;e.Q6J("value",n),e.xp6(1),e.Oqu(e.lcZ(2,2,n))}}function mt(t,o){if(1&t&&(e.TgZ(0,"span"),e._uU(1),e.qZA()),2&t){const n=e.oxw(2);e.xp6(1),e.Oqu(n.invoiceError)}}function _t(t,o){if(1&t&&(e.TgZ(0,"div",29),e._UZ(1,"fa-icon",30),e.YNc(2,mt,2,1,"span",31),e.qZA()),2&t){const n=e.oxw();e.xp6(1),e.Q6J("icon",n.faExclamationTriangle),e.xp6(1),e.Q6J("ngIf",""!==n.invoiceError)}}let dt=(()=>{var t;class o{constructor(i,a,s,r,_,x){this.dialogRef=i,this.data=a,this.store=s,this.decimalPipe=r,this.commonService=_,this.actions=x,this.faExclamationTriangle=T.eHv,this.selNode={},this.memo="",this.isAmp=!1,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 p.x,new p.x,new p.x,new p.x,new p.x]}ngOnInit(){this.pageSize=this.data.pageSize,this.store.select(f.$k).pipe((0,h.R)(this.unSubs[0])).subscribe(i=>{this.selNode=i}),this.store.select(f.Q5).pipe((0,h.R)(this.unSubs[1])).subscribe(i=>{this.information=i}),this.actions.pipe((0,h.R)(this.unSubs[2]),(0,B.h)(i=>i.type===l.uR.UPDATE_API_CALL_STATUS_LND)).subscribe(i=>{i.type===l.uR.UPDATE_API_CALL_STATUS_LND&&"SaveNewInvoice"===i.payload.action&&(this.invoiceError=i.payload.message,i.payload.status===l.Bn.ERROR&&(this.invoiceError=i.payload.message),i.payload.status===l.Bn.COMPLETED&&this.dialogRef.close())})}onAddInvoice(i){this.invoiceError="";let a=0;a=this.expiry?this.selTimeUnit!==l.Qk.SECS?this.commonService.convertTime(this.expiry,this.selTimeUnit,l.Qk.SECS):this.expiry:l.$Y,this.store.dispatch((0,Z.Rd)({payload:{uiMessage:l.m6.ADD_INVOICE,memo:this.memo,value:this.invoiceValue,private:this.private,expiry:a,is_amp:this.isAmp,pageSize:this.pageSize,openModal:!0}}))}resetData(){this.memo="",this.invoiceValue=null,this.private=!1,this.isAmp=!1,this.expiry=null,this.invoiceValueHint="",this.selTimeUnit=l.Qk.SECS,this.invoiceError=""}onInvoiceValueChange(){this.selNode&&this.selNode.fiatConversion&&this.invoiceValue&&this.invoiceValue>99&&(this.invoiceValueHint="",this.commonService.convertCurrency(this.invoiceValue,l.NT.SATS,l.NT.OTHER,this.selNode.currencyUnits&&this.selNode.currencyUnits.length>2?this.selNode.currencyUnits[2]:"",this.selNode.fiatConversion).pipe((0,h.R)(this.unSubs[3])).subscribe({next:i=>{this.invoiceValueHint="= "+i.symbol+this.decimalPipe.transform(i.OTHER,l.Xz.OTHER)+" "+i.unit},error:i=>{this.invoiceValueHint="Conversion Error: "+i}}))}onTimeUnitChange(i){this.expiry&&t