1import{Ge as c,I as o,K as n,M as s,Qb as m,Xf as i,ge as h,il as f,jd as p,md as l,p as r}from"./chunk-S6Z2KS6P.js";var b=(()=>{class e{constructor(t,a){this.http=t,this.dialog=a}getRates(){return this.http.get(i).pipe(o(t=>{t.forEach(a=>this.setLastUpdateDateTime(a.date))}),r(t=>this.transformToExchangeResponse(t)))}getSummary(t){return this.http.post(i+"/summary",t)}openExchangeRateDetailsDialog(t){let a=new p;return a.data={details:t},a.panelClass=h.MEDIUM,this.dialog.open(f,a).afterClosed().pipe(r(g=>g.state))}setLastUpdateDateTime(t){(!this.lastUpDateTime||c.isAfter(t,this.lastUpDateTime))&&(this.lastUpDateTime=t)}transformToExchangeResponse(t){return{lastUpDateTime:this.lastUpDateTime,exchangeRates:this.transformExchangeRates(t)}}transformExchangeRates(t){return t.map(a=>this.transformExchangeRate(a))}transformExchangeRate(t){return{country:t.country,currency:t.currency,buy:t.buyExchange,sell:t.sellExchange,nbp:t.nbpExchange,buyCash:t.buyCashExchange,sellCash:t.sellCashExchange}}static{this.\u0275fac=function(a){return new(a||e)(s(m),s(l))}}static{this.\u0275prov=n({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();export{b as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.