PageSourceSearch

https://cdn.mercury.com/builds/5ae8add9e1b1cf7fc8d221a20f4e72a7e1903a7f/static/js/DSAvatar-DQb6QPlQ.js

js mercury.com collected 2026-09-24 17:11:31 UTC 5,941 bytes, 2 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{};e.SENTRY_RELEASE={id:`5ae8add9e1b1cf7fc8d221a20f4e72a7e1903a7f-app.mercury.com`};var t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`644b191a-312b-4ab3-a6ce-4b21a7823f90`,e._sentryDebugIdIdentifier=`sentry-dbid-644b191a-312b-4ab3-a6ce-4b21a7823f90`)}catch{}})();import{o as e}from"./rolldown-runtime-dXcnzKUm.js";import{t}from"./react-BzePN1c-.js";import{t as n}from"./splitEvery-BUvnH2r7.js";import"./Analytics-D2v_YXe6.js";import{Fa as r,f as i}from"./DSLoadingDots-GPhh9517.js";import{t as a}from"./jsx-runtime-DNHIfA0O.js";import{t as o}from"./classnames-yG-bS7LR.js";import{t as s}from"./utils-DofqhPc8.js";import{t as c}from"./diacritics-B6iWENlk.js";var l=e(t()),u=e(o()),d={circle:`_circle_299z2_4`,square:`_square_299z2_5`,withOverlayIcon:`_withOverlayIcon_299z2_36`,small:`_small_299z2_48`,large:`_large_299z2_56`,lastLetter:`_lastLetter_299z2_64`,offsetUpwards:`_offsetUpwards_299z2_71`,textAvatar:`_textAvatar_299z2_78`,noHover:`_noHover_299z2_93`,forceHover:`_forceHover_299z2_94`,iconAvatar:`_iconAvatar_299z2_102`,avatarImg:`_avatarImg_299z2_111`,backupColor:`_backupColor_299z2_122`,startsWith0:`_startsWith0_299z2_127`,startsWith1:`_startsWith1_299z2_128`,startsWith2:`_startsWith2_299z2_129`,startsWith3:`_startsWith3_299z2_130`,startsWith4:`_startsWith4_299z2_134`,startsWith5:`_startsWith5_299z2_135`,startsWith6:`_startsWith6_299z2_136`,startsWith7:`_startsWith7_299z2_144`,startsWith8:`_startsWith8_299z2_145`,startsWith9:`_startsWith9_299z2_146`,startsWithA:`_startsWithA_299z2_154`,startsWithB:`_startsWithB_299z2_155`,startsWithC:`_startsWithC_299z2_156`,startsWithD:`_startsWithD_299z2_164`,startsWithE:`_startsWithE_299z2_165`,startsWithF:`_startsWithF_299z2_166`,startsWithG:`_startsWithG_299z2_174`,startsWithH:`_startsWithH_299z2_175`,startsWithI:`_startsWithI_299z2_176`,startsWithJ:`_startsWithJ_299z2_180`,startsWithK:`_startsWithK_299z2_181`,startsWithL:`_startsWithL_299z2_182`,startsWithM:`_startsWithM_299z2_190`,startsWithN:`_startsWithN_299z2_191`,startsWithO:`_startsWithO_299z2_192`,startsWithP:`_startsWithP_299z2_200`,startsWithQ:`_startsWithQ_299z2_201`,startsWithR:`_startsWithR_299z2_202`,startsWithS:`_startsWithS_299z2_210`,startsWithT:`_startsWithT_299z2_211`,startsWithU:`_startsWithU_299z2_212`,startsWithV:`_startsWithV_299z2_213`,startsWithW:`_startsWithW_299z2_221`,startsWithX:`_startsWithX_299z2_222`,startsWithY:`_startsWithY_299z2_223`,startsWithZ:`_startsWithZ_299z2_224`},f={wrapper:`_wrapper_10c5w_1`,overlayIcon:`_overlayIcon_10c5w_2`,small:`_small_10c5w_21`,large:`_large_10c5w_32`,hovered:`_hovered_10c5w_56`},p=a(),m=l.forwardRef(({size:e=`large`,forceHover:t=!1,icon:n,wrapperClassName:r},a)=>(0,p.jsx)(`div`,{ref:a,className:(0,u.default)(f.wrapper,f[e],r),children:(0,p.jsx)(`div`,{className:(0,u.default)(f.overlayIcon,t&&f.hovered),children:(0,p.jsx)(i,{icon:n,size:e===`small`?`2xs`:`xs`})})}));m.displayName=`DSAvatarOverlayIcon`;var h=l.forwardRef(({children:e,classNames:t,forceHover:n,noHover:r,size:i=`small`,orgStyle:a,sessionReplayUnmask:o=!1,overlayIcon:s,onMouseEnter:c,onMouseLeave:f,...h},g)=>{let[_,v]=(0,l.useState)(!1),y=(n||_)&&!r;return(0,p.jsxs)(`div`,{...h,ref:g,className:(0,u.default)(i!==`custom`&&d[i],a?d.square:d.circle,r&&d.noHover,n&&d.forceHover,y&&t?.hoveredWrapper,t?.wrapper,s&&d.withOverlayIcon),onMouseEnter:e=>{v(!0),c?.(e)},onMouseLeave:e=>{v(!1),f?.(e)},children:[e(_),s&&(0,p.jsx)(m,{forceHover:y,size:i===`custom`?`large`:i,icon:s,wrapperClassName:t?.overlayIcon})]})});h.displayName=`DSAvatarBase`;var g=({src:e,imgHTMLAttributes:t,fallback:n})=>{let[a,o]=(0,l.useState)(!1),c=e=>{t?.onError?.(e),o(!0)};return a||!e?n??(0,p.jsx)(i,{icon:r,color:s(`icon-tertiary`),"aria-label":`Image did not load`}):(0,p.jsx)(`img`,{...t,src:e,alt:t?.alt??``,onError:c})},_=l.forwardRef(({avatarSrc:e,fallback:t,imgHTMLAttributes:n,sessionReplayUnmask:r=!1,...i},a)=>(0,p.jsx)(h,{...i,ref:a,classNames:{wrapper:(0,u.default)(i.classNames?.wrapper,!r&&`session-replay-block`),hoveredWrapper:i.classNames?.hoveredWrapper,overlayIcon:i.classNames?.overlayIcon},children:()=>(0,p.jsx)(g,{src:e,imgHTMLAttributes:{...n,className:(0,u.default)(d.avatarImg,i.orgStyle?d.square:d.circle),alt:``},fallback:t})}));_.displayName=`DSAvatarImage`;var v=e=>{if(!e.trim())return``;let t=c(e).toUpperCase().trim();t=t.replace(/[^\p{L}\p{N}\s]/gu,``);let n=new Set([`A`,`AN`,`THE`,`AND`,`OR`,`OF`,`IN`,`ON`,`AT`,`BY`,`INC`,`INCORPORATED`,`LLC`,`LTD`,`LIMITED`,`CO`,`CORP`,`CORPORATION`,`PP`,`SQ`,`CL`,`TST`]),r=t.split(/\s+/).filter(e=>e.length>0),i=r.filter(e=>!n.has(e)),a=(i.length>0?i:r).map(e=>e.charAt(0)).filter(e=>/\p{L}|\p{N}/u.test(e));return a.length>2?a.slice(0,1).join(``):a.slice(0,2).join(``)},y=new Set(n(1,`ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789`)),b=e=>{if(e===``)return`backupColor`;let t=c(e.charAt(0)).toUpperCase();return y.has(t)?`startsWith${t}`:`backupColor`},x=l.forwardRef(({name:e,sessionReplayUnmask:t=!1,...n},r)=>{let i=typeof e==`string`?e:`${e.firstName} ${e.lastName}`,a=n.orgStyle?v(i).at(0)??``:v(i),o=a.at(0)||`?`,s=a.at(1);return(0,p.jsx)(h,{...n,ref:r,classNames:{wrapper:(0,u.default)(d[b(i)],d.textAvatar,!t&&`session-replay-mask`,n.classNames?.wrapper),hoveredWrapper:n.classNames?.hoveredWrapper,overlayIcon:n.classNames?.overlayIcon},"aria-hidden":`true`,children:()=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(`span`,{className:(0,u.default)(s?``:d.lastLetter,d.offsetUpwards),children:o}),s&&(0,p.jsx)(`span`,{className:(0,u.default)(d.lastLetter,d.offsetUpwards),children:s})]})})});x.displayName=`DSAvatarText`;var S=l.forwardRef(({avatarSrc:e,name:t,...n},r)=>e?(0,p.jsx)(_,{ref:r,avatarSrc:e,...n}):t?(0,p.jsx)(x,{ref:r,name:t,...n}):null);S.displayName=`DSAvatar`;export{d as i,g as n,h as r,S as t};
2//# sourceMappingURL=DSAvatar-DQb6QPlQ.js.map

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.