1import{b as h}from"./chunk-M6UFZVBD.js";import{e as d}from"./chunk-BO35WQS6.js";import{Ba as s,G as r,U as c,n,o as p,ra as a,wa as m}from"./chunk-FD5XSWSL.js";var w=class o{constructor(e,t){this.http=e;this.socketIoService=t;this.socketIoService.getSocketData().subscribe(i=>{i.type=="private"&&i.channelName==`update-reward-prompt-channel.${this.memberAccountId}`&&i.eventName=="UpdateRewardPromptEvent"&&this.getRewardDetailsData()})}pagination;messages=new n;isSuccess;rewardDetails=new p(null);memberAccountId;getAll(){return this.http.get("/reward").pipe(a(e=>this.paginationInit(e.data.paginations)),r(e=>e.data.rows))}getWithQuery(e){return this.http.get(`/reward${e}`).pipe(a(t=>this.paginationInit(t.data.paginations)),r(t=>t.data.rows))}claim(e){return this.http.post("/reward/claim",e).pipe(a(t=>{this.messages.next(t.message),this.isSuccess=t.success,this.getRewardDetailsData()}),r(t=>t))}getRewardDetailsData(){return new Promise((e,t)=>{this.http.get("/getrewarddetails").pipe(a(i=>{i.data&&this.rewardDetails.next(i.data),e()}),c(i=>{throw e(),i})).subscribe()})}getRewardDetails(){return this.rewardDetails}updateShowRewards(e){return this.http.post("/showreward",e).pipe(r(t=>{}))}connectRewardDetailsWebsocket(e){this.memberAccountId=e,this.socketIoService.getPrivateSocket().then(t=>{t.joinChannel(`update-reward-prompt-channel.${this.memberAccountId}`).listenEvent("UpdateRewardPromptEvent")})}paginationInit(e){e&&(this.pagination=e)}getTargetByPromotionId(e){return this.http.get(`/promotion/${e}`).pipe(r(t=>t.data.rows))}static \u0275fac=function(t){return new(t||o)(s(d),s(h))};static \u0275prov=m({token:o,factory:o.\u0275fac,providedIn:"root"})};export{w 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.