(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1709],{23324:function(e,t,i){"use strict";i.d(t,{Z:function(){return s}});class r{watchlistServiceUrl;constructor({watchlistServiceUrl:e}){this.watchlistServiceUrl=e}getUserWatchlists({bconnectId:e,userToken:t,watchlistId:i}){let r=new URL(`${this.watchlistServiceUrl}/get/${e}`),s=new URLSearchParams;return void 0!==i&&s.append("portId",`${i}`),r.search=s.toString(),this.#e(r,{method:"GET",credentials:"include",headers:void 0!==t?{userKey:t}:void 0})}getUserHoldingsSummary({bconnectId:e,userToken:t,tickers:i=[]}){let r={...void 0!==t?{userKey:t}:void 0,"Content-Type":"application/json"};return this.#e(`${this.watchlistServiceUrl}/user-holdings-summary/${e}`,{method:"POST",credentials:"include",headers:r,body:JSON.stringify({tickers:i})})}getWatchlist({bconnectId:e,userToken:t,watchlistId:i}){return this.#e(`${this.watchlistServiceUrl}/get/${e}/${i}`,{method:"GET",credentials:"include",headers:void 0!==t?{userKey:t}:void 0})}createWatchlist({bconnectId:e,userToken:t,watchlistData:i}){let r={...void 0!==t?{userKey:t}:void 0,"Content-Type":"application/json"};return this.#e(`${this.watchlistServiceUrl}/create/${e}`,{method:"POST",credentials:"include",headers:r,body:JSON.stringify(i)})}addTickerToWatchlists({bconnectId:e,userToken:t,ticker:i,watchlistIds:r}){return this.#e(`${this.watchlistServiceUrl}/create/${e}/${r.join(",")}/${i}`,{method:"POST",credentials:"include",headers:void 0!==t?{userKey:t}:void 0})}removeTickerFromWatchlists({bconnectId:e,userToken:t,ticker:i,watchlistIds:r}){return this.#e(`${this.watchlistServiceUrl}/delete/${e}/${r.join(",")}/${i}`,{method:"DELETE",credentials:"include",headers:void 0!==t?{userKey:t}:void 0})}updateWatchlist({bconnectId:e,userToken:t,watchlistId:i,watchlistData:r}){let s={...void 0!==t?{userKey:t}:void 0,"Content-Type":"application/json"};return this.#e(`${this.watchlistServiceUrl}/update/${e}/${i}`,{method:"POST",credentials:"include",headers:s,body:JSON.stringify(r)})}deleteWatchlist({bconnectId:e,userToken:t,watchlistId:i}){return this.#e(`${this.watchlistServiceUrl}/delete/${e}/${i}`,{method:"DELETE",credentials:"include",headers:void 0!==t?{userKey:t}:void 0})}getUserPreferences({bconnectId:e,userToken:t}){return this.#e(`${this.watchlistServiceUrl}/user-preference/${e}/`,{method:"GET",credentials:"include",headers:void 0!==t?{userKey:t}:void 0})}updateUserPreferences({bconnectId:e,userToken:t,alertsNotificationsEnabled:i,alertsEmailsEnabled:r,dashboardView:s}){let n={...void 0!==t?{userKey:t}:void 0,"Content-Type":"application/json"},c=Object.entries({alertsNotificationsEnabled:i,alertsEmailsEnabled:r,dashboardView:s}).reduce((e,[t,i])=>void 0!==i?{...e,[t]:i}:e,{});return this.#e(`${this.watchlistServiceUrl}/user-preference/${e}/`,{method:"POST",credentials:"include",headers:n,body:JSON.stringify(c)})}getWatchlistCompare({bconnectId:e,userToken:t,watchlistId:i}){return this.#e(`${this.watchlistServiceUrl}/watchlist-compare/${e}/${i}`,{method:"GET",credentials:"include",headers:void 0!==t?{userKey:t}:void 0})}updateWatchlistCompare({bconnectId:e,userToken:t,watchlistId:i,watchlistCompareData:r}){let s={...void 0!==t?{userKey:t}:void 0,"Content-Type":"application/json"};return this.#e(`${this.watchlistServiceUrl}/watchlist-compare/${e}/${i}`,{method:"POST",credentials:"include",headers:s,body:JSON.stringify(r)})}getWatchlistLots({bconnectId:e,userToken:t,watchlistId:i}){return this.#e(`${this.watchlistServiceUrl}/get-lots/${e}/${i}`,{method:"GET",credentials:"include",headers:void 0!==t?{userKey:t}:void 0})}#e(...e){let[t,i]=e;return fetch(t,i).then(async e=>{let{status:t,ok:i,statusText:r}=e,s=e.clone(),n=await e.json().catch(()=>s.text());return i?Promise.resolve({status:t,data:n,message:r}):Promise.reject({status:t,data:n,message:r})})}}var s=r},36136:function(e,t,i){"use strict";i.d(t,{r:function(){return d}});var r=i(67294),s=i(25434),n=i(37018),c=i(77536);i(58848);var a={default:"media-ui-Link_default-KrHSq06NXRI-",_default:"media-ui-Link_default-KrHSq06NXRI-"};let o=["a","button"],d=r.forwardRef(function(e,t){let{as:i="a",variant:d="default",children:l,name:h="link",unstyled:u,...v}=e,f=(0,s.f)(h),S=(0,c.Sh)([a[d]],{...e,unstyled:u,name:h});return r.createElement(n.o,{...v,className:S,ref:t,"data-component":f,allowedTags:o,as:i},l)})},37018:function(e,t,i){"use strict";i.d(t,{o:function(){return c}});var r=i(67294),s=i(25434),n=i(77536);let c=r.forwardRef(function(e,t){let{allowedTags:i=["div"],as:c,children:a,...o}=e,{name:d}=o,l=c||"div";if(!i.includes(l))throw Error("Tag <".concat(c,"> is not allowed for this instance: allowed tags are ").concat(i));let h=c||"div",u=(0,s.f)(d||"");return r.createElement(h,{className:(0,n.Sh)([],o),"data-component":u,...o,ref:t},a)})},58848:function(){}}]);