1 2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="116ea068-2782-5646-8349-9b89c2cac302")}catch(e){}}(); 3import{a as c,p as e}from"./chunk-6CSD65Y2-DjtNb_ff.js";import{L as b,T as x,C as y}from"./ClickableLogo-BMdMziT0.js";import{a0 as k}from"./debug-build-BtUWSgWk.js";import{u as w,k as E,b as T,T as u}from"./useAuthentication-X70MRig0.js";import{d as j,M as C}from"./MenuItem-CBE-RBp8.js";import{a as I,B as A}from"./urls-D3qjKvID.js";import{B as v,S as L}from"./Alert-HT4MFi6a.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};o.SENTRY_RELEASE={id:"2a3b4ea4db4c495d724e88e0b293f68b57fd7294"}}catch{}})();const S=async(o="")=>(await I.get(`${o}/organizations/api/v2/team-info/`,{withCredentials:!0})).data,M={elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5,"&::before":{content:'""',display:"block",position:"absolute",top:0,right:14,width:10,height:10,bgcolor:"background.paper",transform:"translateY(-50%) rotate(45deg)",zIndex:0}}},D=({anchorEl:o,open:t,onClose:n,handlers:a})=>{const{t:i,i18n:d}=w(),l=c.useMemo(()=>[{key:"dashboard",label:i("components.userDropdown.dashboard"),onClick:a.onDashboard},{key:"settings",label:i("components.userDropdown.settings"),onClick:a.onAccountSettings},{key:"logout",label:i("components.userDropdown.logout"),onClick:a.onLogout}],[a,d.language]),p=c.useCallback(r=>{n(),r()},[n]);return e.jsx(j,{anchorEl:o,open:t,onClose:n,onClick:n,transformOrigin:{horizontal:"right",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"bottom"},slotProps:{paper:M},children:l.map(r=>e.jsx(C,{onClick:()=>p(r.onClick),children:e.jsx(b,{children:r.label})},r.key))})},N=E(e.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z"})),U={textTransform:"none",color:"white"},_=({user:o,baseUrl:t="",captureException:n,onDashboard:a,onAccountSettings:i,onLogout:d,buttonSx:l})=>{const[p,r]=c.useState(null),{data:m}=T({queryKey:["team-info",t,o.userId],queryFn:async()=>{try{return await S(t)}catch(s){throw s._handledByAuthRefresh||(console.error("Error with API request:",s),n?.(s)),s}},enabled:!!o.isGroupLicense,staleTime:300*1e3,retry:!1}),h=m?.pitch?.group_name,f=c.useCallback(s=>{r(s.currentTarget)},[]),g=c.useCallback(()=>{r(null)},[]);return e.jsxs(e.Fragment,{children:[e.jsx(v,{variant:"text",color:"white",onClick:f,sx:[U,...Array.isArray(l)?l:[l]],endIcon:e.jsx(N,{}),children:e.jsxs(L,{spacing:0,alignItems:"flex-start",children:[e.jsx(u,{sx:{color:"inherit",fontSize:"inherit",fontWeight:"inherit",lineHeight:1.3},children:`${o.firstName} ${o.lastName}`}),h&&e.jsx(u,{variant:"caption",sx:{color:"inherit",opacity:.7,lineHeight:1.2},children:h})]})}),e.jsx(D,{anchorEl:p,open:!!p,onClose:g,handlers:{onDashboard:a,onAccountSettings:i,onLogout:d}})]})},$=({rightContent:o,logoHref:t,logoColor:n})=>e.jsxs(x,{component:"header",disableGutters:!0,sx:{justifyContent:"space-between",width:"100%",px:{mobile:2,tablet:4,desktop:8}},children:[e.jsx(y,{href:t,fill:n}),o]}),q=o=>e.jsx(_,{...o,baseUrl:A,captureException:k});export{$ as H,N as K,q as U}; 4 5//# debugId=116ea068-2782-5646-8349-9b89c2cac302
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.