- Redesign KPI cards to look like stock tickers - Add ticker ID (e.g. ВЫРУЧК:KPI, AOV:KPI) - Arrow up/down SVG indicators for change direction - Mini trend-line (50px) inside each card - Change color: green (#16a34a) for up, red (#e21d1d) for down - Remove sparkline background area, keep only line - Fix duplicate arrowUp variable naming (bArrowUp/bArrowDown/bArrowNeutral)
1 line
32 KiB
JavaScript
1 line
32 KiB
JavaScript
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2806],{44014:function(e,t,a){"use strict";a.d(t,{$I:function(){return h},If:function(){return k},JH:function(){return f},Jf:function(){return y},Np:function(){return _},Pe:function(){return u},TH:function(){return d},il:function(){return m},ue:function(){return p}});var r=a(53867),i=a(23324),n=a(48189),l=a(99464),o=a(48764).Buffer;let c=new i.Z({watchlistServiceUrl:"".concat("https://login.bloomberg.com","/watchlist-service")}),s=n.ff.getInstance();function u(e){let{bconnectId:t,watchlistId:a}=e;return c.getWatchlistCompare({bconnectId:t,watchlistId:a}).then(e=>e).catch(e=>{let t="Failed to fetch watchlist compare: ".concat(JSON.stringify(e));throw(0,l.H)(Error(t)),e})}function d(e){let{bconnectId:t,watchlistId:a,watchlistCompareData:r}=e;return c.updateWatchlistCompare({bconnectId:t,watchlistId:a,watchlistCompareData:r}).then(e=>e).catch(e=>{let t="Failed to update watchlist compare: ".concat(JSON.stringify(e));throw(0,l.H)(Error(t)),e})}async function h(e){let{bconnectId:t,subscription:a}=e;try{let e={};if(void 0!==a){let t=o.from(JSON.stringify({isSubscriber:"BBG"===a}),"utf-8").toString("base64");e["X-Request-Metadata"]=t}return{data:await s.getUserPreference(t,{headers:e}),status:200,message:"Success"}}catch(t){var i,n;(0,r.uH)("watchlistError","Get User Preferences Failure","error","watchlist");let e="Failed to fetch user preferences: ".concat(JSON.stringify(t));throw null===(n=window)||void 0===n||null===(i=n.newrelic)||void 0===i||i.noticeError(Error(e)),t}}function m(e){let{bconnectId:t,alertsNotificationsEnabled:a,alertsEmailsEnabled:i,dashboardView:n}=e;return c.updateUserPreferences({bconnectId:t,alertsNotificationsEnabled:a,alertsEmailsEnabled:i,dashboardView:n}).then(e=>e).catch(e=>{var t,a;(0,r.uH)("watchlistError","Update User Preferences Failure","error","watchlist");let i="Failed to update user preferences: ".concat(JSON.stringify(e));throw null===(a=window)||void 0===a||null===(t=a.newrelic)||void 0===t||t.noticeError(Error(i)),e})}function p(e){let{bconnectId:t,watchlistId:a}=e;return c.getUserWatchlists({bconnectId:t,watchlistId:a}).then(e=>e).catch(e=>{var t,a;(0,r.uH)("watchlistError","Get Default Watchlist Failure","error","watchlist");let i="Failed to fetch Default Watchlist data: ".concat(JSON.stringify(e));throw null===(a=window)||void 0===a||null===(t=a.newrelic)||void 0===t||t.noticeError(Error(i)),e})}function k(e,t){return c.getWatchlist({bconnectId:e,watchlistId:t}).then(e=>e).catch(e=>{var t,a;(0,r.uH)("watchlistError","Get Watchlist Failure","error","watchlist");let i="Failed to fetch Watchlist data: ".concat(JSON.stringify(e));throw null===(a=window)||void 0===a||null===(t=a.newrelic)||void 0===t||t.noticeError(Error(i)),e})}function f(e,t){return c.createWatchlist({bconnectId:e,watchlistData:t}).then(e=>((0,r.uH)("watchlistSubmitChanges","submit_changes","click","engagement"),e)).catch(e=>{var t,a;(0,r.uH)("watchlistError","Create Watchlist Failure","error","watchlist");let i="Failed to Create Watchlist: ".concat(JSON.stringify(e));throw null===(a=window)||void 0===a||null===(t=a.newrelic)||void 0===t||t.noticeError(Error(i)),e})}function y(e,t,a){return c.updateWatchlist({bconnectId:e,watchlistId:t,watchlistData:a}).then(e=>((0,r.uH)("watchlistSubmitChanges","submit_changes","success","watchlist"),e)).catch(e=>{var t,a;(0,r.uH)("watchlistError","Update Watchlist Failure","error","watchlist");let i="Failed to Update Watchlist: ".concat(JSON.stringify(e));throw null===(a=window)||void 0===a||null===(t=a.newrelic)||void 0===t||t.noticeError(Error(i)),e})}function _(e,t){return c.deleteWatchlist({bconnectId:e,watchlistId:t}).then(e=>((0,r.uH)("watchlistDelete","delete","success","watchlist"),e)).catch(e=>{var t,a;(0,r.uH)("watchlistError","Delete Watchlist Failure","error","watchlist");let i="Failed to Delete Watchlist: ".concat(JSON.stringify(e));throw null===(a=window)||void 0===a||null===(t=a.newrelic)||void 0===t||t.noticeError(Error(i)),e})}},48523:function(e,t,a){"use strict";a.d(t,{Z:function(){return h}});var r=a(85893),i=a(67294),n=a(9198),l=a.n(n),o=a(77536),c=a(71717);a(5843);var s=a(73319),u=a(3364),d=a.n(u);function h(e){let{className:t,dateFormat:a="MM/dd/yyyy",error:n,label:u,isJapanese:h,maxDate:m,native:p=!1,placeholder:k,popperPlacement:f,portalId:y,required:_=!1,value:b,onChange:S,variant:w="default"}=e,C=b?new Date(b):new Date,[L,A]=(0,i.useState)(C),P=(0,i.useMemo)(()=>{if(h)return s.Z},[h]),D=(0,o.RD)([t,d().datepickerInput,{[d().error]:!!n}]),g=(0,o.RD)([d().datepicker,{[d().refresh2025]:"refresh-2025"===w}]),N=(0,o.RD)([d().popper,{[d().refresh2025]:"refresh-2025"===w}]),E=(0,o.RD)([d().calendar,{[d().refresh2025]:"refresh-2025"===w}]),I=(0,o.RD)([d().day,{[d().refresh2025]:"refresh-2025"===w}]),v=(0,o.RD)([d().weekday,{[d().refresh2025]:"refresh-2025"===w}]),T=(0,i.useCallback)(e=>{e&&(A(e),S&&S(e))},[S]),M=(0,i.useCallback)(e=>I,[I]),B=(0,i.useCallback)(e=>v,[v]);return p?(0,r.jsx)(c.U,{className:D,type:"date",error:!!n,helperText:n,value:L.toISOString().split("T")[0],label:u,placeholder:k,onChange:e=>{if(!e.target.value)return;let t=new Date(e.target.value);t&&T(t)}}):(0,r.jsx)(l(),{className:D,calendarClassName:E,popperClassName:N,wrapperClassName:g,dayClassName:M,weekDayClassName:B,autoComplete:"off",locale:P,selected:L,placeholderText:k,required:_,dateFormat:a,onChange:T,maxDate:m,portalId:y,popperPlacement:f,closeOnScroll:()=>!0})}},32689:function(e,t,a){"use strict";a.d(t,{Z:function(){return s}});var r=a(85893);a(67294);var i=a(77536),n=a(99104),l=a(60006),o=a(35762),c=a.n(o);function s(e){let{text:t,actionIcon:a,actionText:o,variant:s,className:u,onActionClick:d}=e;return(0,r.jsxs)("div",{className:(0,i.RD)(c().notification,c()[s],u),children:[(0,r.jsx)("div",{className:(0,i.RD)(c().textWrapper,c()[s]),children:Array.isArray(t)?t.map((e,t)=>(0,r.jsx)("div",{children:e},t)):(0,r.jsx)("div",{children:t})}),(a||o)&&(0,r.jsxs)("div",{className:c().buttonWrapper,children:[(0,r.jsx)(n.K,{className:(0,i.RD)(c().button,c()[s]),Icon:a,color:"neutral",colorMode:"light",iconPosition:"left",size:"small",version:"phoenix",onClick:d,title:o,children:o}),(0,r.jsx)(l.h,{className:(0,i.RD)(c().buttonIcon,c()[s]),Icon:a,version:"phoenix",onClick:d})]})]})}},84034:function(e,t,a){"use strict";a.d(t,{Z:function(){return f}});var r=a(85893),i=a(67294),n=a(48388),l=a(93223),o=a(82112),c=a(77536),s=a(53867),u=a(64798),d=a(40589),h=a.n(d),m=a(42844),p=a(50797);let k=(0,i.memo)(o.l);function f(e){var t,a;let{searchURL:o,className:d,countryCode:f,disabled:y=!1,placeholder:_,onChange:b}=e,{abbaConfig:S}=(0,n._U)(),w=null!==(a=null==S?void 0:null===(t=S["watchlist-search"])||void 0===t?void 0:t.enableFuzziness)&&void 0!==a&&a,[C,L]=(0,i.useState)([]),A=(0,i.useCallback)(()=>{L([])},[]),P=(0,i.useMemo)(()=>new l.Z({baseUrl:o}),[o]),D=(0,i.useCallback)(e=>{if(e)return P.lookup({query:e,sites:["bbiz"],includeBlocklisted:!1,source:(0,m.Y)(),size:100,country:f,types:["company_public","Index","Fund","Currency","Commodity","Bond"],boostParents:!0,...w&&{fuzziness:"auto",popularity:"watchlist"}})},[P,w,f]),g=(0,u.Z)(e=>{var t;e||A(),(0,s.uH)("ticker search",e,"user entry","ticker search"),null==D||null===(t=D(e))||void 0===t||t.then(e=>{let{results:t}=e;if(!t){A();return}L(t.map(e=>{let{name:t,resource_id:a}=e;return{value:a,subText:t}}))})},300),N=(0,p.Q)(),E={noResults:N({id:"noResults",defaultMessage:"No Results"}),addSymbol:N({id:"addSymbol",defaultMessage:"Add Symbol..."})};return(0,r.jsx)(k,{className:(0,c.Sh)([h().tickerSearch,h().autocomplete,d]),onTextChange:g,onChange:b,id:"autocomplete",inputProps:{autocomplete:"off"},variant:"default",dropdownVariant:"markets",showDropdownPlusBtn:!0,disabled:y,placeholder:null!=_?_:E.addSymbol,noOptionsText:E.noResults,options:C})}},92950:function(e,t,a){"use strict";a.d(t,{s_:function(){return X},ZP:function(){return Y}});var r=a(85893),i=a(67294),n=a(77536),l=a(51434),o=a(68868),c=a(31361),s=a(96524),u=a.n(s),d=a(40281),h=a(62139),m=a(20567),p=a(70390),k=a(59628),f=a(53867),y=a(84514),_=a.n(y),b=a(51656),S=a(25022),w=a(41762),C=a(93075),L=a(1371),A=a(29545),P=a(47552),D=a(89089),g=a.n(D);function N(e){var t,a;let{disabled:n=!0,handleLoginRedirect:l,children:o,trackClick:s,allowedPlacements:u=["bottom-start","bottom-end"],overlayOffset:d=5}=e,{openSignUp:h,openOverlay:m,subscriberType:p,isLoggedIn:k,setOpenOverlay:f}=(0,w._P)(),y=!!(null!==(a=null===(t=(0,c.useFeatureGate)("watchlist_paywall"))||void 0===t?void 0:t.value)&&void 0!==a&&a),_=(0,i.useMemo)(()=>!n&&"BBG"!==p&&y,[n,p,y]),{refs:b,context:S,floatingStyles:D}=(0,C.YF)({middleware:[(0,L.cv)(d),(0,L.X5)({allowedPlacements:u,padding:5}),(0,L.uY)({})],whileElementsMounted:A.Me,strategy:"absolute"}),N=(0,C.qs)(S),{getFloatingProps:E}=(0,C.NI)([N]),I=(0,i.useMemo)(()=>Math.random().toString(20).slice(2),[]),v=m===I,T=(0,i.useCallback)(()=>{null==f||f(I)},[f,I]),M=(0,i.useCallback)(()=>{null==f||f(null)},[f]),B=(0,i.useCallback)(()=>{null==s||s("click","create-account-watchlist-bundle"),h&&(h(),M())},[h,M,s]),U=(0,i.useCallback)(()=>{null==s||s("click","sign-in-watchlist-bundle"),l&&(l(),M())},[M,s,l]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:g().paywallButtonContainer,onClickCapture:e=>{_&&(e.preventDefault(),e.stopPropagation(),T())},onKeyDownCapture:e=>{_&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),T())},tabIndex:n?-1:0,"aria-disabled":n,ref:b.setReference,children:o}),v&&(0,r.jsx)(C.ll,{id:"watchlist-bundle",children:(0,r.jsx)(C.wD,{initialFocus:-1,returnFocus:!1,closeOnFocusOut:!1,modal:!1,context:S,children:(0,r.jsx)("div",{className:g().floatingUI,ref:b.setFloating,style:{...D},...E(),children:(0,r.jsx)(P.c,{className:g().quickAddOverlay,disabled:!1,isSubscribed:"BBG"===p,isLoggedIn:!!k,canAddWatchlist:!1,onCreateAccountClick:B,onSignInClick:U,onClose:M,onSave:()=>null,onCreateNewWatchlist:()=>Promise.resolve(null),watchlists:[]})})})})]})}var E=a(49681),I=a(62881),v=a(99464);let T=()=>[{lotId:-1,shares:"0",buyPrice:"0",buyDate:new Date().getTime()}];function M(e){var t,a;let{headline:l,banner:o,securities:c,maxWatchlistCountReached:s,tariffBundlesFeatureEnabled:u,variant:d="default"}=e,{client:y,session:w}=(0,k.useRegUIClient)(),{upsertPortfolio:C}=(0,S.eP)(),[L,A]=(0,i.useState)(!1),P=(0,i.useCallback)(()=>A(!0),[]),D=(0,i.useCallback)(()=>A(!1),[]),g=(0,i.useMemo)(()=>X[l],[l]),M=(0,i.useMemo)(()=>({...E.kf,name:l,holdings:function(e){let t=T();return e.map(e=>({ticker:e.ticker,companyName:e.name,totalShares:0,costBasis:0,lots:t}))}(c)}),[l,c]),[B,U]=(0,i.useState)(!1),R=null!==(a=null==w?void 0:null===(t=w.userInfo)||void 0===t?void 0:t.userId)&&void 0!==a?a:"",{shouldWallAction:x,blockUserIfWalledActionIsAttempted:F}=(0,I.n)(),H=(0,i.useCallback)(()=>(null==w||!w.isLoggedIn)&&!!y&&(sessionStorage.setItem("createBundleAfterLogin",JSON.stringify({shouldCreate:!0,bundlePortfolio:M})),y.linkToSignIn(),(0,f.uH)("watchlistLogIn","login","click","watchlist"),!0),[null==w?void 0:w.isLoggedIn,y,M]),O=(0,i.useCallback)(()=>{if(D(),x){F();return}H()||(U(!0),(0,f.uH)(...g),(0,f.uH)("watchlistEdit","create_watchlist","click","watchlist"),(0,v.f)("watchlistBundleCreate",{bundleName:l}),(0,b.$)(M,R).then(C).catch(()=>{P(),setTimeout(()=>D(),E.jv)}).finally(()=>{U(!1)}))},[y,w,M,g,C,P,D,x,F]),G=(0,n.RD)(u?_().tariffBundle:_().watchlistBundle,{[_().wrappedBundleModifier]:"wrapped"===d}),j=(0,n.RD)(u?_().tariffButton:_().startListButton,{[_().wrappedButtonModifier]:"wrapped"===d}),W=(0,n.RD)(u?_().tariffButtonMobile:_().startListButtonMobile,{[_().wrappedButtonModifier]:"wrapped"===d});return(0,r.jsxs)("div",{className:G,children:[(0,r.jsx)("div",{className:_().bundleHeadline,children:l}),(0,r.jsx)("div",{className:_().bundleBanner,children:(0,r.jsx)("img",{alt:"",src:o})}),(0,r.jsx)("div",{className:_().bundleSecurities,children:null==c?void 0:c.map(e=>{let{ticker:t,name:a}=e;return(0,r.jsxs)("div",{className:_().securityRow,children:[(0,r.jsx)("span",{className:_().securityTicker,children:t}),(0,r.jsxs)("span",{className:_().securityName,title:a,children:[" ",a]})]},t)})}),(0,r.jsxs)(N,{disabled:"wrapped"!==d,handleLoginRedirect:H,children:[(0,r.jsx)(h.U,{title:"Start this list",ActionIcon:(0,r.jsx)(p.ol,{}),disabled:s,onClick:O,className:j,loading:B,children:(0,r.jsx)("span",{children:"Start this list"})}),(0,r.jsx)(h.U,{title:"Start this list",size:"small",ActionIcon:(0,r.jsx)(p.ol,{}),onClick:O,className:W,loading:B,children:(0,r.jsx)("span",{children:"Start this list"})})]}),L&&(0,r.jsx)(m.b,{open:!0,autoHideDuration:E.aP})]})}var B=a(61362);let U="https://".concat("assets.bwbx.io","/s3/bazaar/images"),R=10*E.Oe,x="Trending",F="Global Markets",H="Crypto",O="Automotive",G="Retail",j="Semiconductors",W="Critical Minerals",X={[x]:["watchlistCreate","create_watchlist_trending_bundle","click","watchlist"],[F]:["watchlistCreate","create_watchlist_global_markets_bundle","click","watchlist"],[H]:["watchlistCreate","create_watchlist_crypto_bundle","click","watchlist"],[O]:["watchlistCreate","create_watchlist_automotive_bundle","click","watchlist"],[G]:["watchlistCreate","create_watchlist_retail_bundle","click","watchlist"],[j]:["watchlistCreate","create_watchlist_semiconductors_bundle","click","watchlist"],[W]:["watchlistCreate","create_watchlist_critical_minerals_bundle","click","watchlist"]},V=[{headline:x,banner:"".concat(U,"/trending.jpg"),securities:B.l1},{headline:F,banner:"".concat(U,"/global_markets.jpg"),securities:B.SH},{headline:H,banner:"".concat(U,"/crypto.jpg"),securities:B.c6}],J=[{headline:O,banner:"".concat(U,"/automotive_bundle.jpg"),securities:B.mH},{headline:G,banner:"".concat(U,"/retail_bundle.jpg"),securities:B.Vx},{headline:j,banner:"".concat(U,"/semiconductors_bundle.jpg"),securities:B.BJ},{headline:W,banner:"".concat(U,"/minerals_bundle.jpg"),securities:B.bx}];function Y(e){var t;let{maxWatchlistCountReached:a,variant:s="default"}=e,h=(0,i.useContext)(d.z),m=(0,c.useLayer)("watchlist-dashboard-v2").get("enabled",!1)||!!(null==h?void 0:null===(t=h.pageData)||void 0===t?void 0:t.enableTariffBundles),p=V.map(e=>({...e,maxWatchlistCountReached:a})),k=(0,n.RD)(u().watchlistBundleContainer,{[u().wrappedContainerModifier]:"wrapped"===s}),f=(0,n.RD)({[u().bundleModule]:"default"===s,[u().wrappedBundleModule]:"wrapped"===s}),y=(0,n.RD)({[u().bundleMobileAndTablet]:"default"===s,[u().wrappedBundleMobileAndTablet]:"wrapped"===s}),_=(0,i.useMemo)(()=>"wrapped"===s?"Start a watchlist to view the daily trends of assets you care about.":m?"Track the impact of tariffs.":"Kickstart watchlists based on themes.",[s,m]),b=(0,i.useMemo)(()=>"wrapped"===s,[s]);return(0,r.jsx)(l.W,{rounded:!0,className:k,children:(0,r.jsxs)("div",{className:u().watchlistBundleContent,children:[b&&(0,r.jsx)("p",{className:u().subscriberOnlyLabel,children:"Subscriber Only"}),(0,r.jsx)("div",{className:u().themeText,children:_}),(0,r.jsx)("div",{className:u().easyAddText,children:"You can easily add or remove symbols later."}),(0,r.jsx)("div",{className:f,children:m?J.map(e=>(0,i.createElement)(M,{...e,key:e.headline,tariffBundlesFeatureEnabled:!0,variant:s})):p.map(e=>(0,i.createElement)(M,{...e,key:e.headline,variant:s}))}),(0,r.jsx)("div",{className:y,children:(0,r.jsx)(o.l,{limit:7,animatedTransition:!0,autoadvanceIntervalInMs:R,children:m?J.map(e=>(0,i.createElement)(M,{...e,key:e.headline,tariffBundlesFeatureEnabled:!0,variant:s})):V.map((e,t)=>(0,i.createElement)(M,{...e,key:t,variant:s}))})})]})})}},61362:function(e,t,a){"use strict";a.d(t,{BJ:function(){return P},C5:function(){return d},ENTRY_DATA_FORMAT:function(){return k},H$:function(){return o},KG:function(){return g},KJ:function(){return c},P7:function(){return h},ROW_TYPES:function(){return m},SH:function(){return C},Sw:function(){return u},V_:function(){return _},Vu:function(){return p},Vx:function(){return A},XS:function(){return i},Xy:function(){return s},a$:function(){return b},ao:function(){return n},bx:function(){return D},c6:function(){return S},l1:function(){return w},mH:function(){return L},oQ:function(){return f},qD:function(){return y},rX:function(){return r},tj:function(){return l}});let r="New List",i="WDSCIS",n="NO_COMPARISON",l=["There was a network error.","Please try again."],o={registered:10,subscribed:100},c="Unable to delete your watchlist due to a network error. Please try again.",s="Unable to save your watchlist due to a network error. Please try again.",u="We’re sorry, there’s been an issue loading your news.",d={lotId:-1,shares:"0",buyPrice:"0",buyDate:-1},h={currency:"USD",holdings:[],isDefault:!1,name:""},m={TICKER:"ticker",LOT:"lot"},p={INITIAL:"initial",LOADING:"loading",COMPLETE:"complete",FAILED:"failed",EMPTY:"empty"},k={PRICE_CHANGE:"formatPriceChange",PERCENT_CHANGE:"formatPercentChange",COMMAS_AND_DECIMALS:"formatWithCommasAndDecimals",BIG_NUMBER:"formatBigNumber"},f={REGISTERED:25,SUBSCRIBED:100},y={NEUTRAL:"neutral",INCREASING:"increasing",DECREASING:"decreasing"},_={CANCEL:"cancel",DELETE:"delete",SAVE:"save",DELETE_PERMANENTLY:"delete_permanently"},b=[{columnName:"SYMBOL",columnAriaLabel:"",alignment:"left",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"Lot last updated",tickerPrimaryLodashPath:"security.ticker",tickerPrimaryURL:e=>"/quote/".concat(e),tickerSecondaryLodashPath:"security.LONG_COMP_NAME",tickerTertiaryLodashPath:"",lotLodashPath:"shares.buydate",primaryDataFormat:"",secondaryDataFormat:"",lotDataFormat:"",enableSort:!0},{columnName:"LOTS",columnAriaLabel:"",alignment:"left",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"lots",tickerPrimaryURL:null,tickerSecondaryLodashPath:"shares.number",tickerTertiaryLodashPath:"",lotLodashPath:"shares.number",primaryDataFormat:"",secondaryDataFormat:"",lotDataFormat:"",enableSort:!0},{columnName:"PRICE",columnAriaLabel:"",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"Security last updated",lotAriaLabel:"",tickerPrimaryLodashPath:"marketData.PX_LAST",tickerPrimaryURL:null,tickerSecondaryLodashPath:"marketData.LAST_UPDATE",tickerTertiaryLodashPath:"",lotLodashPath:"shares.buyprice",primaryDataFormat:k.COMMAS_AND_DECIMALS,secondaryDataFormat:"",lotDataFormat:k.COMMAS_AND_DECIMALS,enableSort:!0},{columnName:"CHANGE",columnAriaLabel:"one day change",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"marketData.CHG_PCT_1D",tickerPrimaryURL:null,tickerSecondaryLodashPath:"marketData.CHG_NET_1D",tickerTertiaryLodashPath:"",lotLodashPath:"",primaryDataFormat:k.PERCENT_CHANGE,secondaryDataFormat:k.PRICE_CHANGE,lotDataFormat:k.PRICE_CHANGE,enableSort:!0},{columnName:"TOTAL GAIN",columnAriaLabel:"",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"marketValue.totalGainLoss.value",tickerPrimaryURL:null,tickerSecondaryLodashPath:"marketValue.totalGainLoss.pctChange",tickerTertiaryLodashPath:"",lotLodashPath:"marketValue.totalGainLoss.value",primaryDataFormat:k.PRICE_CHANGE,secondaryDataFormat:k.PERCENT_CHANGE,lotDataFormat:k.PRICE_CHANGE,enableSort:!0},{columnName:"1D GAIN",columnAriaLabel:"one day gain",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"marketValue.todayGainLoss.value",tickerPrimaryURL:null,tickerSecondaryLodashPath:"marketValue.todayGainLoss.pctChange",tickerTertiaryLodashPath:"",lotLodashPath:"marketValue.todayGainLoss.value",primaryDataFormat:k.PRICE_CHANGE,secondaryDataFormat:k.PERCENT_CHANGE,lotDataFormat:k.PRICE_CHANGE,enableSort:!0},{columnName:"OPEN",columnAriaLabel:"open price",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"marketData.PX_OPEN",tickerPrimaryURL:null,tickerSecondaryLodashPath:"",tickerTertiaryLodashPath:"",lotLodashPath:"",primaryDataFormat:k.BIG_NUMBER,secondaryDataFormat:"",lotDataFormat:"",enableSort:!0},{columnName:"PREV CLOSE",columnAriaLabel:"previous close",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"marketData.PX_CLOSE_1D",tickerPrimaryURL:null,tickerSecondaryLodashPath:"",tickerTertiaryLodashPath:"",lotLodashPath:"",primaryDataFormat:k.BIG_NUMBER,secondaryDataFormat:"",lotDataFormat:"",enableSort:!0},{columnName:"VOLUME",columnAriaLabel:"volume count",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"marketData.PX_VOLUME",tickerPrimaryURL:null,tickerSecondaryLodashPath:"",tickerTertiaryLodashPath:"",lotLodashPath:"",primaryDataFormat:k.COMMAS_AND_DECIMALS,secondaryDataFormat:"",lotDataFormat:"",enableSort:!0},{columnName:"MARKET CAP",columnAriaLabel:"",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"marketData.CUR_MKT_CAP",tickerPrimaryURL:null,tickerSecondaryLodashPath:"",tickerTertiaryLodashPath:"",lotLodashPath:"",primaryDataFormat:k.BIG_NUMBER,secondaryDataFormat:"",lotDataFormat:"",enableSort:!0},{columnName:"DAY RANGE",columnAriaLabel:"",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"marketData.PX_HIGH",tickerPrimaryURL:null,tickerSecondaryLodashPath:"marketData.PX_LOW",tickerTertiaryLodashPath:"marketData.PX_LAST",lotLodashPath:"",primaryDataFormat:"",secondaryDataFormat:"",lotDataFormat:"",enableSort:!1},{columnName:"52WK RANGE",columnAriaLabel:"52 week range",alignment:"right",tickerPrimaryAriaLabel:"",tickerSecondaryAriaLabel:"",lotAriaLabel:"",tickerPrimaryLodashPath:"marketData.HIGH_52WEEK",tickerPrimaryURL:null,tickerSecondaryLodashPath:"marketData.LOW_52WEEK",tickerTertiaryLodashPath:"marketData.PX_LAST",lotLodashPath:"",primaryDataFormat:"",secondaryDataFormat:"",lotDataFormat:"",enableSort:!1}],S=[{ticker:"XBT:CUR",name:"Bitcoin"},{ticker:"XET:CUR",name:"Ethereum"},{ticker:"XLC:CUR",name:"Litecoin"},{ticker:"XTH:CUR",name:"Ethereum Classic"},{ticker:"XEO:CUR",name:"EOS"},{ticker:"XDH:CUR",name:"Dash"},{ticker:"XBN:CUR",name:"Bitcoin Cash"},{ticker:"CRON:US",name:"Cronos Group"},{ticker:"LINK:SW",name:"Chainlink"},{ticker:"AXRP:SW",name:"21Shares XRP ETP"}],w=[{ticker:"AMZN:US",name:"Amazon"},{ticker:"TSLA:US",name:"Tesla"},{ticker:"AAPL:US",name:"Apple"},{ticker:"NVDA:US",name:"Nvidia"},{ticker:"SOFI:US",name:"SoFi Technologies"},{ticker:"AMD:US",name:"Advanced Micro Devices"},{ticker:"PYPL:US",name:"PayPal"},{ticker:"MSFT:US",name:"Microsoft"},{ticker:"META:US",name:"Meta Platforms"},{ticker:"GOOGL:US",name:"Alphabet Inc."}],C=[{ticker:"SPX:IND",name:"S&P 500"},{ticker:"INDU:IND",name:"Dow Jones"},{ticker:"CCMP:IND",name:"Nasdaq Composite"},{ticker:"NYA:IND",name:"NYSE Composite"},{ticker:"UKX:IND",name:"FTSE 100"},{ticker:"DAX:IND",name:"Dax Performance Index"},{ticker:"NKY:IND",name:"Nikkei 225"},{ticker:"HSI:IND",name:"Hang Seng Index"},{ticker:"TPX:IND",name:"Tokyo Stock Exchange"},{ticker:"BDIY:IND",name:"Baltic Exchange"}],L=[{ticker:"F:US",name:"Ford Motor"},{ticker:"RACE:US",name:"Ferrari NV"},{ticker:"GM:US",name:"General Motors"},{ticker:"TSLA:US",name:"Tesla"},{ticker:"STLA:US",name:"Stellantis NV"},{ticker:"PCAR:US",name:"PACCAR"},{ticker:"CMI:US",name:"Cummins"},{ticker:"LCID:US",name:"Lucid Group"},{ticker:"LI:US",name:"Li Auto"},{ticker:"RIVN:US",name:"Rivian Automotive"}],A=[{ticker:"WMT:US",name:"Walmart"},{ticker:"COST:US",name:"Costco Wholesale"},{ticker:"HD:US",name:"Home Depot"},{ticker:"TJX:US",name:"TJX Cos"},{ticker:"LOW:US",name:"Lowe's Cos"},{ticker:"TGT:US",name:"Target"},{ticker:"DG:US",name:"Dollar General"},{ticker:"DLTR:US",name:"Dollar Tree"},{ticker:"ROST:US",name:"Ross Stores"},{ticker:"TPR:US",name:"Tapestry"}],P=[{ticker:"NVDA:US",name:"NVIDIA"},{ticker:"AVGO:US",name:"Broadcom"},{ticker:"TSM:US",name:"Taiwan Semiconductor Manufacturing"},{ticker:"ASML:US",name:"ASML Holding NV"},{ticker:"AMD:US",name:"Advanced Micro Devices"},{ticker:"QCOM:US",name:"QUALCOMM"},{ticker:"TXN:US",name:"Texas Instruments"},{ticker:"ARM:US",name:"ARM Holdings PLC"},{ticker:"INTC:US",name:"Intel"},{ticker:"AMAT:US",name:"Applied Materials"}],D=[{ticker:"600111:CH",name:"China Northern Rare Earth Group High-Tech"},{ticker:"LYC:AU",name:"Lynas Rare Earths"},{ticker:"ALB:US",name:"Albemarle"},{ticker:"SQM:US",name:"Sociedad Quimica y Minera de Chile SA"},{ticker:"MP:US",name:"MP Materials"},{ticker:"PLS:AU",name:"Pilbara Minerals"},{ticker:"601958:CH",name:"Jinduicheng Molybdenum"},{ticker:"AMG:NA",name:"AMG Critical Materials NV"},{ticker:"LAC:CN",name:"Lithium Americas"},{ticker:"600456:CH",name:"Baoji Titanium Industry"}],g="https://bmedia.iad1.qualtrics.com/jfe/form/SV_6xOBCxI5WTQX3bU"},25022:function(e,t,a){"use strict";a.d(t,{Qt:function(){return h},eP:function(){return d}});var r=a(85893),i=a(67294),n=a(53867);let l=new(a(2595)).Z({userApiUrl:"".concat("https://login.bloomberg.com","/user-api/graphql")}),o={ADD_WATCHLIST_USER_UDST:"mutation updateUserInfo($user: UserIdentityInput) {\n upsertProfile (userIdentity: $user, profileInput: {\n dataOrigin: BCONNECT,\n relationships: [WatchlistUser]\n }) {\n id\n }\n}",DELETE_WATCHLIST_USER_UDST:"mutation updateUserInfo($user: UserIdentityInput) {\nupsertProfile (userIdentity: $user, profileInput: {\n dataOrigin: BCONNECT,\n relationshipDeletions: [WatchlistUser]\n}) {\n id\n}\n}"};function c(e){return l.request({includeCredentials:!0,document:o[e]}).then(e=>e).catch(e=>{console.log("failed to update Watchlist UDST"),(0,n.uH)("watchlistError","Update Watchlist User Relationship Failure","error","watchlist")})}var s=a(61362);let u=(0,i.createContext)(void 0),d=()=>{let e=(0,i.useContext)(u);if(!e)throw Error("usePortfolioPageData must be used within a PortfolioPageProvider");return e},h=e=>{let{children:t}=e,[a,l]=(0,i.useState)(!0),[o,d]=(0,i.useState)(a),[h,m]=(0,i.useState)(void 0),p=(0,i.useRef)(null),k=(0,i.useCallback)(()=>{p.current&&clearTimeout(p.current);let e=!a;if((0,n.uH)(e?"watchlistShow":"watchlistHide",e?"show_charts":"hide_charts","click","watchlist"),l(e),e){d(e);return}p.current=setTimeout(()=>{d(e),p.current=null},400)},[a]);(0,i.useEffect)(()=>{localStorage.setItem(s.XS,"".concat(a))},[a]),(0,i.useEffect)(()=>{l("false"!==localStorage.getItem(s.XS))},[]);let[f,y]=(0,i.useState)(void 0),[_,b]=(0,i.useState)([]),[S,w]=(0,i.useState)("DASH"),[C,L]=(0,i.useState)([]),[A,P]=(0,i.useState)(!1),[D,g]=(0,i.useState)(),[N,E]=(0,i.useState)(),I=(0,i.useCallback)((e,t)=>{if(m(t),!e){y(void 0);return}y({...e})},[]),v=(0,i.useCallback)(e=>{if(!e){g(void 0);return}g({...e})},[]),T=(0,i.useCallback)(e=>{I(e.portInfo),L(t=>t.length?-1===t.findIndex(t=>t.id===e.portInfo.id)?[...t,e.portInfo]:t.map(t=>t.id===e.portInfo.id?{...e.portInfo}:t):[e.portInfo]),g(e),b(t=>t.length?-1===t.findIndex(t=>t.portInfo.id===e.portInfo.id)?[...t,e]:t.map(t=>t.portInfo.id===e.portInfo.id?{...t,...e}:t):[e]),A||c("ADD_WATCHLIST_USER_UDST").then(()=>{P(!0)})},[A,I]),M=(0,i.useCallback)(e=>{L([...e])},[]),B=(0,i.useCallback)(e=>{if(!e){E(void 0);return}E({...e})},[]),U=(0,i.useCallback)(e=>{L(t=>{let a=t.filter(t=>t.id!==e),[r]=a;return a.length?I(r):I(r,"NEW"),[...a]}),b(t=>{let a=t.filter(t=>t.portInfo.id!==e),[r]=a;return v(r),0===a.length&&A&&c("DELETE_WATCHLIST_USER_UDST").then(()=>{P(!1)}),[...a]})},[A]);return(0,r.jsx)(u.Provider,{value:{portfolios:_,selectedPortInfo:f,selectedPortfolio:D,portfolioForm:N,portfolioInfos:C,removePortfolio:U,upsertPortfolio:T,updateSelectedPortInfo:I,updateSelectedPortfolio:v,updatePortfolioForm:B,updatePortfolioInfos:M,showCharts:a,renderingCharts:o,portfolioType:h,toggleCharts:k,dashboardView:S,updateDashboardView:w},children:t})}},62881:function(e,t,a){"use strict";a.d(t,{n:function(){return c}});var r=a(42977),i=a(59628),n=a(86896),l=a(67294);let o={articleInfo:{contentId:"watchlist",metadata:{isMetered:!0},resourceType:"watchlist",resourceSubType:"watchlist_hard_wall",type:"WATCHLIST"},paywallData:{type:"additive"}};function c(){let{session:e}=(0,i.useRegUIClient)(),{locale:t}=(0,n.Z)(),a=!!(null==e?void 0:e.isBBGSubscriber),{paywallStatus:c,checkPaywallState:s,fortressInViewState:u}=(0,r.Bx)(),[d,h]=(0,l.useState)(!1),m=(0,l.useMemo)(()=>!a,[a]),p=(0,l.useMemo)(()=>({...o,...o.articleInfo?{articleInfo:{...o.articleInfo,locale:t}}:void 0}),[t]);return{shouldWallAction:m,blockUserIfWalledActionIsAttempted:(0,l.useCallback)(()=>{if(!d&&!1===u&&"pending"===c){h(!0),s(p,!0);return}},[d,u,c,s,p])}}},51656:function(e,t,a){"use strict";a.d(t,{$:function(){return n}});var r=a(44014),i=a(51463);let n=async(e,t)=>{try{let a=(0,i.g4)(e);return await (0,r.JH)(t,a).then(e=>e.data.port)}catch(e){throw e}}},51463:function(e,t,a){"use strict";function r(e){let{currency:t,id:a=-1,isDefault:r,name:i}=e.portInfo;return{id:a,currency:t,holdings:e.positions.map(e=>{let t=0,a=0,r=e.lots.map(e=>(t+=e.shares.number,a+=e.shares.number*e.shares.buyprice,{lotId:e.lotId,buyDate:e.shares.buydate,shares:e.shares.number.toString(),buyPrice:e.shares.buyprice.toString()}));return t=Number.isInteger(t)?t:parseFloat(t.toFixed(4)),a=parseFloat(a.toFixed(4)),{ticker:e.security.ticker,companyName:e.security.LONG_COMP_NAME,totalShares:t,costBasis:a,lots:r}}),isDefault:r,name:i}}function i(e){return e.reduce((e,t,a)=>{let{ticker:r,lots:i}=t,n=i.map(e=>{let{buyDate:t,buyPrice:i,shares:n}=e;return{security:r,buydate:t,shares:Number(n)||0,buyprice:Number(i)||0,torder:a}});return e.concat(n)},[])}function n(e){let{name:t,currency:a,isDefault:r,holdings:n}=e;return{updatedAt:Date.now(),isChangedPortOverride:!0,portChanges:{name:t,currency:a,isDefault:r},holdingChanges:{isDeleteAllHoldingsPriorToUpdate:!0,adds:i(n)}}}function l(e){let{name:t,currency:a,isDefault:r,holdings:n}=e;return{portMeta:{name:t,currency:a,isDefault:r},holdings:i(n)}}a.d(t,{XA:function(){return r},g4:function(){return l},p5:function(){return n}})},3364:function(e){e.exports={datepicker:"styles_datepicker__J7FxC",datepickerInput:"styles_datepickerInput__xd4Ne",error:"styles_error__z0ddu",refresh2025:"styles_refresh2025__9He_H",calendar:"styles_calendar__fDsYY",day:"styles_day__Co7yF",weekday:"styles_weekday__opf7_",popper:"styles_popper__blMu7","react-datepicker__day--keyboard-selected":"styles_react-datepicker__day--keyboard-selected__qgVyi","react-datepicker__day":"styles_react-datepicker__day__L1VZG","react-datepicker__day--selected":"styles_react-datepicker__day--selected__7dbdW"}},35762:function(e){e.exports={notification:"styles_notification__cF2wr",lineBreak:"styles_lineBreak__uhNk2",textWrapper:"styles_textWrapper__iNFtG",button:"styles_button___5EpS",buttonIcon:"styles_buttonIcon__P7jK9"}},89089:function(e){e.exports={paywallButtonContainer:"paywallButtonContainer_paywallButtonContainer____eiY",quickAddOverlay:"paywallButtonContainer_quickAddOverlay__AFFBg",floatingUI:"paywallButtonContainer_floatingUI__f1jMY"}},40589:function(e){e.exports={tickerSearch:"styles_tickerSearch__feuxh"}},84514:function(e){e.exports={watchlistBundle:"watchlistBundle_watchlistBundle__s6ok_",bundleHeadline:"watchlistBundle_bundleHeadline__qWZHA",bundleBanner:"watchlistBundle_bundleBanner__P_mxI",startListButton:"watchlistBundle_startListButton__Re_BQ",startListButtonMobile:"watchlistBundle_startListButtonMobile__nPM4x",bundleSecurities:"watchlistBundle_bundleSecurities__3M1Fz",securityRow:"watchlistBundle_securityRow__oCd6B",securityName:"watchlistBundle_securityName__OWGF4",securityTicker:"watchlistBundle_securityTicker__o4fhT",tariffBundle:"watchlistBundle_tariffBundle__GkXbJ",tariffButton:"watchlistBundle_tariffButton__y4_Y1",tariffButtonMobile:"watchlistBundle_tariffButtonMobile__sBnSH",wrappedBundleModifier:"watchlistBundle_wrappedBundleModifier__I3mVH",wrappedButtonModifier:"watchlistBundle_wrappedButtonModifier__tKfz2"}},96524:function(e){e.exports={watchlistBundleContainer:"watchlistBundleContainer_watchlistBundleContainer__zUXot",watchlistBundleContent:"watchlistBundleContainer_watchlistBundleContent__tBfrE",themeText:"watchlistBundleContainer_themeText__zuQ9N",easyAddText:"watchlistBundleContainer_easyAddText__dZIDd",bundleModule:"watchlistBundleContainer_bundleModule__2jAwo",bundleMobileAndTablet:"watchlistBundleContainer_bundleMobileAndTablet__4DXhJ",subscriberOnlyLabel:"watchlistBundleContainer_subscriberOnlyLabel__65CYI",wrappedContainerModifier:"watchlistBundleContainer_wrappedContainerModifier__hMJti",wrappedBundleModule:"watchlistBundleContainer_wrappedBundleModule__4yWhZ",wrappedBundleMobileAndTablet:"watchlistBundleContainer_wrappedBundleMobileAndTablet__nV5Oz"}}}]); |