PageSourceSearch

https://tallo.com/talent/assets/TUIAvatar-gwdj2iHH.js

js tallo.com collected 2026-10-01 12:19:37 UTC 10,220 bytes, 1 lines download raw bytes

vendor: 6,624 bytes, line 1
1import{j as s}from"./jsx-runtime-BXHdZtXm.js";import{a as c,j as ae,L as ne,f as w}from"./react-router-BaecbKjl.js";import{U as se}from"./User-CYO5breL.js";import{c as b}from"./index-BVcvjUCF.js";import{c as F}from"./index-nIzbf_Em.js";import{b as ie,d as N,u as le,c as A,P as k,a as ce,D as ue}from"./index-CkdR9Gu8.js";import{P as R,u as T,a as pe}from"./index-QzbjxM1T.js";import{g as ve}from"./redux-C9EuXx-m.js";import{h as de,R as fe,u as ge,F as me}from"./index-30o2hKWb.js";import{u as he}from"./index-DDnIm1os.js";import{R as _e,A as M,c as z,C as Pe,a as xe}from"./index-C6QMYIF5.js";function Ce(){return ve.useSyncExternalStore(we,()=>!0,()=>!1)}function we(){return()=>{}}var y="Avatar",[Ae]=F(y),[Re,D]=Ae(y),$=c.forwardRef((e,o)=>{const{__scopeAvatar:r,...n}=e,[a,t]=c.useState("idle");return s.jsx(Re,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:t,children:s.jsx(R.span,{...n,ref:o})})});$.displayName=y;var G="AvatarImage",U=c.forwardRef((e,o)=>{const{__scopeAvatar:r,src:n,onLoadingStatusChange:a=()=>{},...t}=e,i=D(G,r),l=je(n,t),u=ie(p=>{a(p),i.onImageLoadingStatusChange(p)});return N(()=>{l!=="idle"&&u(l)},[l,u]),l==="loaded"?s.jsx(R.img,{...t,ref:o,src:n}):null});U.displayName=G;var V="AvatarFallback",H=c.forwardRef((e,o)=>{const{__scopeAvatar:r,delayMs:n,...a}=e,t=D(V,r),[i,l]=c.useState(n===void 0);return c.useEffect(()=>{if(n!==void 0){const u=window.setTimeout(()=>l(!0),n);return()=>window.clearTimeout(u)}},[n]),i&&t.imageLoadingStatus!=="loaded"?s.jsx(R.span,{...a,ref:o}):null});H.displayName=V;function L(e,o){return e?o?(e.src!==o&&(e.src=o),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function je(e,{referrerPolicy:o,crossOrigin:r}){const n=Ce(),a=c.useRef(null),t=n?(a.current||(a.current=new window.Image),a.current):null,[i,l]=c.useState(()=>L(t,e));return N(()=>{l(L(t,e))},[t,e]),N(()=>{const u=g=>()=>{l(g)};if(!t)return;const p=u("loaded"),f=u("error");return t.addEventListener("load",p),t.addEventListener("error",f),o&&(t.referrerPolicy=o),typeof r=="string"&&(t.crossOrigin=r),()=>{t.removeEventListener("load",p),t.removeEventListener("error",f)}},[t,r,o]),i}var Ee=$,Se=U,Oe=H,E="Popover",[W]=F(E,[z]),j=z(),[be,_]=W(E),K=e=>{const{__scopePopover:o,children:r,open:n,defaultOpen:a,onOpenChange:t,modal:i=!1}=e,l=j(o),u=c.useRef(null),[p,f]=c.useState(!1),[g,m]=le({prop:n,defaultProp:a??!1,onChange:t,caller:E});return s.jsx(_e,{...l,children:s.jsx(be,{scope:o,contentId:he(),triggerRef:u,open:g,onOpenChange:m,onOpenToggle:c.useCallback(()=>m(h=>!h),[m]),hasCustomAnchor:p,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:i,children:r})})};K.displayName=E;var B="PopoverAnchor",Ne=c.forwardRef((e,o)=>{const{__scopePopover:r,...n}=e,a=_(B,r),t=j(r),{onCustomAnchorAdd:i,onCustomAnchorRemove:l}=a;return c.useEffect(()=>(i(),()=>l()),[i,l]),s.jsx(M,{...t,...n,ref:o})});Ne.displayName=B;var Z="PopoverTrigger",q=c.forwardRef((e,o)=>{const{__scopePopover:r,...n}=e,a=_(Z,r),t=j(r),i=T(o,a.triggerRef),l=s.jsx(R.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":te(a.open),...n,ref:i,onClick:A(e.onClick,a.onOpenToggle)});return a.hasCustomAnchor?l:s.jsx(M,{asChild:!0,...t,children:l})});q.displayName=Z;var I="PopoverPortal",[ye,Ie]=W(I,{forceMount:void 0}),J=e=>{const{__scopePopover:o,forceMount:r,children:n,container:a}=e,t=_(I,o);return s.jsx(ye,{scope:o,forceMount:r,children:s.jsx(k,{present:r||t.open,children:s.jsx(ce,{asChild:!0,container:a,children:n})})})};J.displayName=I;var P="PopoverContent",Q=c.forwardRef((e,o)=>{const r=Ie(P,e.__scopePopover),{forceMount:n=r.forceMount,...a}=e,t=_(P,e.__scopePopover);return s.jsx(k,{present:n||t.open,children:t.modal?s.jsx(Fe,{...a,ref:o}):s.jsx(ke,{...a,ref:o})})});Q.displayName=P;var Le=pe("PopoverContent.RemoveScroll"),Fe=c.forwardRef((e,o)=>{const r=_(P,e.__scopePopover),n=c.useRef(null),a=T(o,n),t=c.useRef(!1);return c.useEffect(()=>{const i=n.current;if(i)return de(i)},[]),s.jsx(fe,{as:Le,allowPinchZoom:!0,children:s.jsx(X,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:A(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),t.current||(l=r.triggerRef.current)==null||l.focus()}),onPointerDownOutside:A(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,p=l.button===2||u;t.current=p},{checkForDefaultPrevented:!1}),onFocusOutside:A(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),ke=c.forwardRef((e,o)=>{const r=_(P,e.__scopePopover),n=c.useRef(!1),a=c.useRef(!1);return s.jsx(X,{...e,ref:o,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var i,l;(i=e.onCloseAutoFocus)==null||i.call(e,t),t.defaultPrevented||(n.current||(l=r.triggerRef.current)==null||l.focus(),t.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:t=>{var u,p;(u=e.onInteractOutside)==null||u.call(e,t),t.defaultPrevented||(n.current=!0,t.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=t.target;((p=r.triggerRef.current)==null?void 0:p.contains(i))&&t.preventDefault(),t.detail.originalEvent.type==="focusin"&&a.current&&t.preventDefault()}})}),X=c.forwardRef((e,o)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:t,disableOutsidePointerEvents:i,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:p,onInteractOutside:f,...g}=e,m=_(P,r),h=j(r);return ge(),s.jsx(me,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:t,children:s.jsx(ue,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:p,onDismiss:()=>m.onOpenChange(!1),children:s.jsx(Pe,{"data-state":te(m.open),role:"dialog",id:m.contentId,...h,...g,ref:o,style:{...g.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Y="PopoverClose",Te=c.forwardRef((e,o)=>{const{__scopePopover:r,...n}=e,a=_(Y,r);return s.jsx(R.button,{type:"button",...n,ref:o,onClick:A(e.onClick,()=>a.onOpenChange(!1))})});Te.displayName=Y;var Me="PopoverArrow",ee=c.forwardRef((e,o)=>{const{__scopePopover:r,...n}=e,a=j(r);return s.jsx(xe,{...a,...n,ref:o})});ee.displayName=Me;function te(e){return e?"open":"closed"}var ze=K,De=q,$e=J,Ge=Q,Ue=ee;const Ve=(e,o=!1)=>
1{if(typeof e!="string")return"";const r=e.trim().replace(/[^a-z0-9\s]/gim,"").split(" "),n=r[0].charAt(0);let a="";return r.length>1&&(a=o?r[1].charAt(0):r[r.length-1].charAt(0)),`${n}${a}`.toUpperCase()},He="_tiny_1tzag_16",We="_small_1tzag_49",Ke="_medium_1tzag_82",Be="_large_1tzag_115",v={"tui-avatar-wrapper":"_tui-avatar-wrapper_1tzag_1",tiny:He,"tui-avatar":"_tui-avatar_1tzag_1",small:We,medium:Ke,large:Be,"tui-avatar-group":"_tui-avatar-group_1tzag_148","tui-avatar-group-item":"_tui-avatar-group-item_1tzag_153","tui-avatar-overflow-wrapper":"_tui-avatar-overflow-wrapper_1tzag_166","tui-avatar-overflow-tiny":"_tui-avatar-overflow-tiny_1tzag_181","tui-avatar-overflow-small":"_tui-avatar-overflow-small_1tzag_189","tui-avatar-overflow-medium":"_tui-avatar-overflow-medium_1tzag_197","tui-avatar-overflow-large":"_tui-avatar-overflow-large_1tzag_205","tui-avatar-overflow-text":"_tui-avatar-overflow-text_1tzag_213","tui-avatar-group-overflow":"_tui-avatar-group-overflow_1tzag_217","tui-avatar-group-popover":"_tui-avatar-group-popover_1tzag_226","tui-avatar-group-popover-arrow":"_tui-avatar-group-popover-arrow_1tzag_236"},Ze=({className:e,name:o,url:r,to:n,nameType:a="person",size:t="medium",src:i,alt:l,dataTestId:u,...p})=>{const f=ae(),g=b(v["tui-avatar-wrapper"],{[v.tiny]:t==="tiny",[v.small]:t==="small",[v.medium]:t==="medium",[v.large]:t==="large"},e),m=l||(o?a==="organization"?`${o} logo`:o:a==="organization"?"Organization avatar":"User avatar"),h=s.jsxs(Ee,{className:v["tui-avatar"],...p,children:[s.jsx(Se,{src:i,alt:l??"","aria-hidden":"true"}),s.jsx(Oe,{children:o?Ve(o,a==="organization"):s.jsx(se,{"aria-hidden":!0,focusable:!1})})]}),x=u?`${u}-link`:void 0,C=o?`View ${o}'s profile`:"View profile";return s.jsx("div",{className:g,role:"img","aria-label":m,"data-testid":u,children:r?s.jsx("a",{href:r,target:"_blank",rel:"noreferrer","aria-label":C,"data-testid":x,children:h}):n&&f?s.jsx(ne,{to:n,"aria-label":C,"data-testid":x,children:h}):h})},qe=({children:e,className:o,maxCount:r,size:n})=>{const[a,t]=c.useState(!1),i=c.useRef(null),l=w.Children.toArray(e),u=l.length,p=r!==void 0&&u>r,f=p?l.slice(0,r):l,g=p?u-(r||0):0,m=p?l.slice(r):[],h=n||"small",x=()=>{i.current&&(clearTimeout(i.current),i.current=null),t(!0)},C=()=>{i.current=setTimeout(()=>{t(!1)},100)},re=d=>{i.current&&(clearTimeout(i.current),i.current=null),t(d)};c.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[]);const oe=p?s.jsxs(ze,{open:a,onOpenChange:re,children:[s.jsx(De,{asChild:!0,children:s.jsx("button",{type:"button",className:b(v["tui-avatar-group-item"],v["tui-avatar-overflow-wrapper"],v[`tui-avatar-overflow-${h}`]),"aria-label":`Show ${g} more`,onPointerEnter:x,onPointerLeave:C,children:s.jsxs("span",{className:v["tui-avatar-overflow-text"],children:["+",g]})})}),s.jsx($e,{children:s.jsxs(Ge,{className:v["tui-avatar-group-popover"],side:"top",sideOffset:5,align:"center",onPointerEnter:x,onPointerLeave:C,onCloseAutoFocus:d=>{d.preventDefault()},children:[s.jsx("div",{className:v["tui-avatar-group-overflow"],children:m.map((d,S)=>{if(w.isValidElement(d)){const O=n?w.cloneElement(d,{size:n}):d;return s.jsx("span",{className:v["tui-avatar-group-item"],children:O},S)}return d})}),s.jsx(Ue,{className:v["tui-avatar-group-popover-arrow"]})]})})]}):null;return s.jsxs("div",{className:b(v["tui-avatar-group"],o),children:[f.map((d,S)=>{if(w.isValidElement(d)){const O=n?w.cloneElement(d,{size:n}):d;return s.jsx("span",{className:v["tui-avatar-group-item"],children:O},S)}return d}),oe]})};Ze.Group=qe;export{Ge as C,$e as P,ze as R,Ze as T,De as a,Ce as u};

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.