1import{a8 as de,el as et,db as n,e as tt,dc as m,aA as it,F as nt,c as De,h as Le,em as rt,ek as ot,P as Oe}from"./index-CmSfgMPc.js";import{P as lt}from"./Page-DJs2_DnW.js";import{H as st}from"./HeaderBreadcrumbs-C37Lb678.js";import{bf as at,bb as ct,b1 as Q,e as S,m as mt,A as dt,aE as I,aj as P,at as je,av as pe,ar as j,aq as Ve,g as He,a0 as Qe,ay as pt,a5 as ht,aD as Te,d as We,N as ft,o as Ue,p as ut}from"./ui-u4xJzAJX.js";import{u as bt,R as qe,E as gt,D as xt,c as vt}from"./reportCells-BKh3qG9e.js";import{u as _t,R as yt}from"./ReportViewToggle-gMaQTVPN.js";import{a as St}from"./useTeamEvents-CBXR1-Eb.js";import{S as Me}from"./AttendancePills-DalOp7ng.js";import{E as kt}from"./EventDetailsDialog-Iaxxo1Iv.js";import{E as Et}from"./EventFormDialog-DlsTbGwo.js";import{E as wt,s as ze,e as Xe,f as Ye,A as Ge}from"./eventUtils-2hToJwnU.js";import{r as Tt}from"./reportsMeta-Bb5tLx_a.js";import"./media-UejkmJrh.js";import"./editor-WYCba1gG.js";import"./auth-CAQqEDmo.js";import"./Breadcrumbs-DLl0Yyid.js";import"./ArrowBack-DW5Rw6nZ.js";import"./arrayQueryData-Dbd0Vq1O.js";import"./index-D71MChHd.js";import"./EventDetailsContent-BoE2kQru.js";import"./index-CJRF5krZ.js";import"./PracticeEventActionsDropdown-Bt2OwgkC.js";import"./TableRowActionCheckbox-bF_IpQeh.js";import"./FormProvider-DnDUJPhm.js";import"./ConfirmationDialog-R5z214uq.js";import"./PracticePlanOutput-D5lKsQ59.js";import"./plate-editor-BaakbyIW.js";import"./PlayOutput-AZFLiRVd.js";import"./Phase-CKzTdf-G.js";import"./useDimensions-DmCYnqMc.js";import"./ResizeObserver.es-BS4_j6we.js";import"./phases-D5vuSKXE.js";import"./_baseIteratee-DLZas4sG.js";import"./redux-toolkit.modern-C_3cW4ZS.js";import"./ImageTable-DG1yZaYr.js";import"./uppy_dashboard-DBRda8Tb.js";import"./debounce-EtspMjWp.js";import"./style.min-2_hb6s1z.js";import"./MediaDragPreview-ByvUhh25.js";import"./FolderTableRow-DBEc7N-3.js";import"./VirtualizedTable-CdxK8FqE.js";import"./StatusLabel-DQu7jmAq.js";import"./Label-CRbSig1w.js";import"./NestedMenuItem-D35wE-fw.js";import"./useTags-C9AI7So1.js";import"./MyAvatar-cR1nsHSO.js";import"./createAvatar-CgGTnP9k.js";import"./Avatar-DXzv_PDd.js";import"./TeamAvatar-B26t3vgX.js";import"./formatTime-C4LvR0l9.js";import"./utils-C_81NVtf.js";import"./MenuPopover-BhhsVT9r.js";import"./useDeleteFileUpload-BP-mgE7c.js";import"./useTable-D_wBxHhD.js";import"./Thumbnail-B511Goxn.js";import"./useTabs-BLoPfCsz.js";import"./ClipsFilter-Dl1w7VrN.js";import"./TagsFilterList-oE9g_N-H.js";import"./StyledSimpleBar-BBJMU75N.js";import"./simplebar-react.esm-BEXqbx-c.js";import"./index-DTVaLiQt.js";import"./settings-Ss96qd0q.js";import"./PlatejsContextProvider-CZfjqL4u.js";import"./createFullPlayAnimation-B4_7WyRe.js";import"./index-CN7p4I9l.js";import"./utils-F2tmHSVX.js";import"./PlayDialog-BAYKfgkW.js";import"./usePlay-BykHhVGn.js";import"./MobileItemTitle-B977gVqN.js";import"./is-empty-content-CaH9SNmP.js";import"./useFilteredPlays-DA6m05K6.js";import"./PhaseThumbnail-YFQbd3pN.js";import"./ScrollRootContext-D4rEBX8N.js";import"./PlaySkeleton-XHVeGGQV.js";import"./MobileItemDate-CJzO65ws.js";import"./PlayActionsDropdown-Bpq906fO.js";import"./SavingTeamPicker-BKfijbSp.js";import"./PlaygroundSelect-C4Zms5eu.js";import"./FolderPickerDialog-DK4NpHzb.js";import"./fetch-DBwU5uzv.js";import"./useIsPayingUserV2-1ea6Mwe4.js";import"./PlaysTableSelectedActions-DDgI0u9V.js";import"./usePickerFolderNav-BH6jrFUl.js";import"./PlaysFilter-1QZZ_4Mn.js";import"./tslib.es6-DNoqNiN7.js";import"./index-3IwWtNql.js";import"./FilterChips-k03CiDlL.js";import"./FolderBreadcrumbs-B1nSx_1h.js";import"./InlineNumberInput-eky7Hdko.js";import"./Add-Dq0VXF9j.js";import"./NumberInput-B25CIogc.js";import"./useSafeAreaInset-BvbIwqWm.js";import"./DragIndicator-Dr_15w3-.js";import"./index-C78RJQGl.js";import"./practicePlan-Bwg4B7JK.js";import"./v4-Bg-q7VAD.js";import"./PlayerProfileDialog-Bho75fpA.js";import"./useTeamMembers-XvDZ6czZ.js";import"./conversationDraft-CtDzc5OA.js";import"./RsvpControl-CLuegZ3U.js";import"./CloseRounded-C9lUJRsm.js";import"./SectionLabel-LDJ4y_Gk.js";import"./dashboard-constants-BT1-1P_A.js";import"./useTeamDetails-BLrsU1y_.js";import"./AddPracticePlanDialog-D37F4lYf.js";import"./useFilteredRotations-CLNJ4X7m.js";import"./RotationActionsDropdown-BzUxXdK9.js";import"./ShareRotationDialog-Dwh3Vb_K.js";
1import"./Helper-gg0VhJVF.js";import"./MobileItemInfo-BeYlsNx1.js";import"./useFilteredPlaybooks-CkDrAjC1.js";import"./PlaybookActionsDropdown-C6S7B_sf.js";import"./SavePlaybookDialog-DVNH3Mi6.js";import"./useFilteredPracticePlans-UWiv5veq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="5819eb5e-7ded-4bd7-a469-b7795d53d474",e._sentryDebugIdIdentifier="sentry-dbid-5819eb5e-7ded-4bd7-a469-b7795d53d474")}catch{}})();function Be(e){const t=e.total-e.not_marked;return t===0?"â":`${Math.round(e.attending/t*100)}%`}function Je(e){const t=new Map;return e.forEach(i=>{i.events.forEach(r=>{t.has(r.event_id)||t.set(r.event_id,r)})}),[...t.values()].sort((i,r)=>i.start_datetime>r.start_datetime?-1:1)}function Ke(e){const t=new Map;return e.forEach(i=>{i.events.forEach(r=>{t.set(`${i.team_member_id}:${r.event_id}`,r)})}),t}function At(e){const t=Ge.find(i=>i.value===(e==null?void 0:e.status));return(t==null?void 0:t.label)??"Not marked"}function It(e){return[["Player","Tracked events","Attending","Present","Late","Absent","Excused","Not marked","Attendance rate"],...e.map(t=>[t.name,t.total,t.attending,t.present,t.late,t.absent,t.excused,t.not_marked,t.total-t.not_marked>0?Be(t):""])]}function Ct(e){const t=Je(e),i=Ke(e);return[["Date",...t.map(r=>vt(ze(r.start_datetime)))],["Player",...t.map(r=>r.title)],...e.map(r=>[r.name,...t.map(s=>{const o=i.get(`${r.team_member_id}:${s.event_id}`);return o?At(o):""})])]}function Pt({overview:e,onOpenEvent:t}){const i=Q.useMemo(()=>Je(e.players),[e]),r=Q.useMemo(()=>Ke(e.players),[e]),s={position:"sticky",left:0,zIndex:2,bgcolor:"background.paper",borderRight:o=>`1px solid ${o.palette.divider}`};return m(qe,{maxWidth:"100%",fitContent:!0,children:[n(je,{children:m(pe,{sx:{bgcolor:"background.neutral"},children:[n(j,{sx:{...s,bgcolor:"background.neutral"},children:"Player"}),i.map(o=>n(j,{align:"center",onClick:()=>t(o.event_id),sx:{cursor:"pointer",px:1},children:n(Te,{title:`${o.title} (${Ye(o.type)})`,children:m(P,{alignItems:"center",spacing:.25,children:[n(I,{variant:"caption",sx:{whiteSpace:"nowrap"},children:ze(o.start_datetime).toLocaleDateString(void 0,{month:"short",day:"numeric"})}),n(S,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:Xe(o.type)}})]})})},o.event_id))]})}),n(Ve,{children:e.players.map(o=>m(pe,{hover:!0,children:[n(j,{sx:s,children:m(P,{direction:"row",spacing:1.5,alignItems:"center",children:[n(We,{src:o.picture??void 0,sx:{width:28,height:28},children:(o.name??"?").charAt(0)}),n(I,{variant:"body2",noWrap:!0,sx:{maxWidth:160},children:o.name})]})}),i.map(a=>{const p=r.get(`${o.team_member_id}:${a.event_id}`),d=Ge.find(h=>h.value===(p==null?void 0:p.status));return n(j,{align:"center",onClick:()=>t(a.event_id),sx:{cursor:"pointer",px:1},children:p?n(Te,{title:`${(d==null?void 0:d.label)??"Not marked"}${p.note?`: ${p.note}`:""}`,children:n(S,{sx:{width:12,height:12,borderRadius:"50%",display:"inline-block",...d?{bgcolor:h=>h.palette[d.color].main}:{border:h=>`2px solid ${h.palette.divider}`}}})}):n(I,{variant:"caption",color:"text.disabled",children:"â"})},a.event_id)})]},o.team_member_id))})]})}function Ze({events:e,onOpenEvent:t}){const i=Q.useMemo(()=>[...e].sort((r,s)=>r.start_datetime>s.start_datetime?-1:1),[e]);return n(S,{sx:{bgcolor:r=>r.palette.grey[5008],py:1},children:n(P,{children:i.map(r=>m(P,{direction:"row",spacing:1.5,alignItems:"center",onClick:()=>t(r.event_id),sx:{py:.5,px:2,cursor:"pointer","&:hover":{bgcolor:"action.hover"}},children:[n(Te,{title:Ye(r.type),children:n(S,{sx:{width:8,height:8,borderRadius:"50%",flexShrink:0,bgcolor:Xe(r.type)}})}),n(I,{variant:"body2",noWrap:!0,sx:{minWidth:0},children:r.title}),r.note?n(Te,{title:r.note,children:n(S,{sx:{display:"inline-flex",flexShrink:0},children:n(Me,{value:r.status})})}):n(Me,{value:r.status}),n(S,{sx:{flex:1}}),n(I,{variant:"caption",color:"text.secondary",sx:{flexShrink:0,whiteSpace:"nowrap"},children:ze(r.start_datetime).toLocaleDateString(void 0,{dateStyle:"medium"})})]},r.event_id))})})}const Ne=[{value:"summary",label:"Summary"},{value:"matrix",label:"By Event"}],Ae=[{key:"present",label:"Present",color:"success.main"},{key:"late",label:"Late",color:"warning.main"},{key:"absent",label:"Absent",color:"error.main"},{key:"excused",label:"Excused",color:"info.main"}];function Fe(e){const t=de.c(3),{color:i,size:r}=e,s=r===void 0?7:r;let o;return t[0]!==i||t[1]!==s?(o=n(S,{component:"span",sx:{width:s,height:s,borderRadius:"50%",bgcolor:i,display:"inline-block",flexShrink:0}}),t[0]=i,t[1]=s,t[2]=o):o=t[2],o}function $e(e){const t=de.c(10);let i,r;t[0]!==e?({value:r,...i}=e,t[0]=e,t[1]=i,t[2]=r):(i=t[1],r=t[2]);const s=r>0?"text.primary":"text.disabled";let o;t[3]!==i.sx||t[4]!==s?(o={...i.sx,color:s},t[3]=i.sx,t[4]=s,t[5]=o):o=t[5];let a;return t[6]!==i||t[7]!==o||t[8]!==r?(a=n(I,{...i,sx:o,children:r}),t[6]=i,t[7]=o,t[8]=r,t[9]=a):a=t[9],a}function Rt(e){const t=de.c(57),{player:i,expanded:r,onToggle:s,onOpenEvent:o}=e,a=i.total>0,p=a?s:void 0,d=a?"pointer":"default";let h;t[0]!==d?(h={cursor:d},t[0]=d,t[1]=h):h=t[1];const c=!a;let z;t[2]===Symbol.for("react.memo_cache_sentinel")?(z={p:.25},t[2]=z):z=t[2];const R=r?"eva:chevron-down-fill":"eva:chevron-right-fill";let $;t[3]!==R?($=n(Le,{icon:R,width:18,height:18}),t[3]=R,t[4]=$):$=t[4];let u;t[5]!==c||t[6]!==$?(u=n(ft,{size:"small",disabled:c,sx:z,children:$}),t[5]=c,t[6]=$,t[7]=u):u=t[7];const x=i.picture??void 0;let B;t[8]===Symbol.for("react.memo_cache_sentinel")?(B={width:32,height:32},t[8]=B):B=t[8];const k=i.name??"?";let E;t[9]!==k?(E=k.charAt(0),t[9]=k,t[10]=E):E=t[10];let v;t[11]!==E||t[12]!==x?(v=n(We,{src:x,sx:B,children:E}),t[11]=E,t[12]=x,t[13]=v):v=t[13];let C;t[14]===Symbol.for("react.memo_cache_sentinel")?(C={maxWidth:{xs:110,sm:240}},t[14]=C):C=t[14];let _;
1t[15]!==i.name?(_=n(I,{variant:"body2",noWrap:!0,sx:C,children:i.name}),t[15]=i.name,t[16]=_):_=t[16];let w;t[17]!==v||t[18]!==_||t[19]!==u?(w=n(j,{children:m(P,{direction:"row",spacing:1.5,alignItems:"center",children:[u,v,_]})}),t[17]=v,t[18]=_,t[19]=u,t[20]=w):w=t[20];let T;t[21]===Symbol.for("react.memo_cache_sentinel")?(T={whiteSpace:"nowrap"},t[21]=T):T=t[21];let A;t[22]===Symbol.for("react.memo_cache_sentinel")?(A={fontWeight:700},t[22]=A):A=t[22];let y;t[23]!==i.attending||t[24]!==i.total?(y=m(I,{variant:"body2",component:"span",sx:A,children:[i.attending,"/",i.total]}),t[23]=i.attending,t[24]=i.total,t[25]=y):y=t[25];let g;t[26]!==i?(g=Be(i),t[26]=i,t[27]=g):g=t[27];let f;t[28]!==g?(f=m(I,{variant:"body2",component:"span",color:"text.secondary",children:["(",g,")"]}),t[28]=g,t[29]=f):f=t[29];let l;t[30]===Symbol.for("react.memo_cache_sentinel")?(l={display:{xs:"flex",sm:"none"},mt:.5},t[30]=l):l=t[30];let F;t[31]!==i?(F=Ae.map(L=>m(P,{direction:"row",spacing:.5,alignItems:"center",children:[n(Fe,{color:L.color,size:6}),n($e,{variant:"caption",value:i[L.key]})]},L.key)),t[31]=i,t[32]=F):F=t[32];let O;t[33]!==F?(O=n(P,{direction:"row",spacing:1.25,justifyContent:"flex-end",alignItems:"center",sx:l,children:F}),t[33]=F,t[34]=O):O=t[34];let H;t[35]!==y||t[36]!==f||t[37]!==O?(H=m(j,{align:"right",sx:T,children:[y," ",f,O]}),t[35]=y,t[36]=f,t[37]=O,t[38]=H):H=t[38];let D;t[39]!==i?(D=Ae.map(L=>n(j,{align:"right",sx:{display:{xs:"none",sm:"table-cell"}},children:n($e,{variant:"body2",value:i[L.key]})},L.key)),t[39]=i,t[40]=D):D=t[40];let M;t[41]!==p||t[42]!==w||t[43]!==H||t[44]!==D||t[45]!==h?(M=m(pe,{onClick:p,sx:h,children:[w,H,D]}),t[41]=p,t[42]=w,t[43]=H,t[44]=D,t[45]=h,t[46]=M):M=t[46];let U;t[47]===Symbol.for("react.memo_cache_sentinel")?(U={p:0,border:0},t[47]=U):U=t[47];let V;t[48]!==o||t[49]!==i.events?(V=n(Ze,{events:i.events,onOpenEvent:o}),t[48]=o,t[49]=i.events,t[50]=V):V=t[50];let W;t[51]!==r||t[52]!==V?(W=n(pe,{children:n(j,{colSpan:6,sx:U,children:n(Ue,{in:r,unmountOnExit:!0,children:V})})}),t[51]=r,t[52]=V,t[53]=W):W=t[53];let N;return t[54]!==M||t[55]!==W?(N=m(De,{children:[M,W]}),t[54]=M,t[55]=W,t[56]=N):N=t[56],N}function $t(e){const t=de.c(42),{player:i,expanded:r,onToggle:s,onOpenEvent:o}=e,a=i.total>0;let p;t[0]===Symbol.for("react.memo_cache_sentinel")?(p={border:Dt,borderRadius:2,overflow:"hidden"},t[0]=p):p=t[0];const d=a?s:void 0,h=a?"pointer":"default";let c;t[1]!==h?(c={p:2,cursor:h},t[1]=h,t[2]=c):c=t[2];const z=i.picture??void 0;let R;t[3]===Symbol.for("react.memo_cache_sentinel")?(R={width:40,height:40},t[3]=R):R=t[3];const $=i.name??"?";let u;t[4]!==$?(u=$.charAt(0),t[4]=$,t[5]=u):u=t[5];let x;t[6]!==z||t[7]!==u?(x=n(We,{src:z,sx:R,children:u}),t[6]=z,t[7]=u,t[8]=x):x=t[8];let B;t[9]===Symbol.for("react.memo_cache_sentinel")?(B={flex:1,minWidth:0},t[9]=B):B=t[9];let k;t[10]!==i.name?(k=n(I,{variant:"subtitle2",noWrap:!0,children:i.name}),t[10]=i.name,t[11]=k):k=t[11];const E=a?`${i.total} tracked event${i.total===1?"":"s"}`:"No tracked events";let v;t[12]!==E?(v=n(I,{variant:"caption",color:"text.secondary",children:E}),t[12]=E,t[13]=v):v=t[13];let C;t[14]!==k||t[15]!==v?(C=m(S,{sx:B,children:[k,v]}),t[14]=k,t[15]=v,t[16]=C):C=t[16];let _;t[17]!==r||t[18]!==a||t[19]!==i?(_=a&&m(De,{children:[m(S,{sx:{textAlign:"right"},children:[m(I,{variant:"subtitle1",sx:{fontWeight:700},children:[i.attending,"/",i.total]}),n(I,{variant:"caption",color:"text.secondary",children:Be(i)})]}),n(Le,{icon:r?"eva:chevron-up-fill":"eva:chevron-down-fill",width:20,height:20,sx:{color:"text.secondary",flexShrink:0}})]}),t[17]=r,t[18]=a,t[19]=i,t[20]=_):_=t[20];let w;t[21]!==C||t[22]!==_||t[23]!==x?(w=m(P,{direction:"row",spacing:1.5,alignItems:"center",children:[x,C,_]}),t[21]=C,t[22]=_,t[23]=x,t[24]=w):w=t[24];let T;t[25]!==a||t[26]!==i?(T=a&&n(P,{direction:"row",sx:{mt:2},children:Ae.map(l=>m(S,{sx:{flex:1,textAlign:"center"},children:[n($e,{variant:"subtitle2",value:i[l.key],sx:{lineHeight:1.2}}),m(P,{direction:"row",spacing:.5,alignItems:"center",justifyContent:"center",children:[n(Fe,{color:l.color,size:6}
1),n(I,{variant:"caption",color:"text.secondary",children:l.label})]})]},l.key))}),t[25]=a,t[26]=i,t[27]=T):T=t[27];let A;t[28]!==w||t[29]!==T||t[30]!==d||t[31]!==c?(A=m(S,{onClick:d,sx:c,children:[w,T]}),t[28]=w,t[29]=T,t[30]=d,t[31]=c,t[32]=A):A=t[32];let y;t[33]!==o||t[34]!==i.events?(y=n(Ze,{events:i.events,onOpenEvent:o}),t[33]=o,t[34]=i.events,t[35]=y):y=t[35];let g;t[36]!==r||t[37]!==y?(g=n(Ue,{in:r,unmountOnExit:!0,children:y}),t[36]=r,t[37]=y,t[38]=g):g=t[38];let f;return t[39]!==A||t[40]!==g?(f=m(S,{sx:p,children:[A,g]}),t[39]=A,t[40]=g,t[41]=f):f=t[41],f}function Dt(e){return`1px solid ${e.palette.divider}`}function Wt(){const e=de.c(100),t=at();let i;e[0]!==t.breakpoints?(i=t.breakpoints.down("sm"),e[0]=t.breakpoints,e[1]=i):i=e[1];const r=ct(i),s=et(Ot),o=bt(),{from:a,to:p}=o,[d,h]=Q.useState(""),[c,z]=_t(Ne),[R,$]=Q.useState(null),u=o.count+(d?1:0),[x,B]=Q.useState(null),[k,E]=Q.useState(null),[v,C]=Q.useState(!1),[_,w]=Q.useState(null),T=a||void 0,A=p||void 0,y=d||void 0;let g;e[2]!==T||e[3]!==A||e[4]!==y||e[5]!==s?(g={teamId:s,from:T,to:A,type:y},e[2]=T,e[3]=A,e[4]=y,e[5]=s,e[6]=g):g=e[6];const f=St(g),l=f.data;let F;e[7]!==(l==null?void 0:l.players)?(F=(l==null?void 0:l.players)??[],e[7]=l==null?void 0:l.players,e[8]=F):F=e[8];const O=F;let H;e[9]===Symbol.for("react.memo_cache_sentinel")?(H={mb:2},e[9]=H):H=e[9];let D;e[10]!==z||e[11]!==c?(D=n(yt,{views:Ne,value:c,onChange:z}),e[10]=z,e[11]=c,e[12]=D):D=e[12];let M;e[13]===Symbol.for("react.memo_cache_sentinel")?(M=n(S,{sx:{flex:1}}),e[13]=M):M=e[13];const U=`attendance-${c==="matrix"?"by-event":"summary"}`,V=!l||l.tracked_events===0;let W;e[14]!==O||e[15]!==c?(W=()=>c==="matrix"?Ct(O):It(O),e[14]=O,e[15]=c,e[16]=W):W=e[16];let N;e[17]!==a||e[18]!==V||e[19]!==W||e[20]!==U||e[21]!==p?(N=n(gt,{name:U,from:a,to:p,disabled:V,buildRows:W}),e[17]=a,e[18]=V,e[19]=W,e[20]=U,e[21]=p,e[22]=N):N=e[22];let L;e[23]===Symbol.for("react.memo_cache_sentinel")?(L={".MuiButton-startIcon":{ml:-.5,mr:1},fontWeight:500,height:40,minWidth:0},e[23]=L):L=e[23];let he,fe;e[24]===Symbol.for("react.memo_cache_sentinel")?(he=n(nt,{style:{fontSize:16},icon:it}),fe=b=>$(b.currentTarget),e[24]=he,e[25]=fe):(he=e[24],fe=e[25]);let X;e[26]!==u?(X=u>0&&n(S,{sx:Ft,children:u}),e[26]=u,e[27]=X):X=e[27];let Y;e[28]!==X?(Y=m(He,{sx:L,color:"inherit",variant:"outlined",startIcon:he,onClick:fe,children:["Filter",X]}),e[28]=X,e[29]=Y):Y=e[29];let G;e[30]!==N||e[31]!==Y||e[32]!==D?(G=m(P,{direction:"row",spacing:1,alignItems:"center",sx:H,children:[D,M,N,Y]}),e[30]=N,e[31]=Y,e[32]=D,e[33]=G):G=e[33];const Ie=!!R;let ue,be,ge,xe;e[34]===Symbol.for("react.memo_cache_sentinel")?(ue=()=>$(null),be={vertical:"bottom",horizontal:"right"},ge={vertical:"top",horizontal:"right"},xe={paper:{sx:{p:2,width:300}}},e[34]=ue,e[35]=be,e[36]=ge,e[37]=xe):(ue=e[34],be=e[35],ge=e[36],xe=e[37]);let J;e[38]!==o?(J=n(xt,{state:o,hint:"By event date."}),e[38]=o,e[39]=J):J=e[39];let ve,_e,ye;e[40]===Symbol.for("react.memo_cache_sentinel")?(ve=b=>h(b.target.value),_e=n(Qe,{value:"",children:"All types"}),ye=wt.map(Bt),e[40]=ve,e[41]=_e,e[42]=ye):(ve=e[40],_e=e[41],ye=e[42]);let K;e[43]!==d?(K=m(pt,{select:!0,fullWidth:!0,size:"small",label:"Event type",value:d,onChange:ve,children:[_e,ye]}),e[43]=d,e[44]=K):K=e[44];const Ce=u===0;let Z;e[45]!==o?(Z=()=>{o.reset(),h("")},e[45]=o,e[46]=Z):Z=e[46];let ee;e[47]!==Ce||e[48]!==Z?(ee=n(He,{size:"small",color:"inherit",disabled:Ce,onClick:Z,children:"Clear filters"}),e[47]=Ce,e[48]=Z,e[49]=ee):ee=e[49];let te;e[50]!==J||e[51]!==K||e[52]!==ee?(te=m(P,{spacing:2,children:[J,K,ee]}),e[50]=J,e[51]=K,e[52]=ee,e[53]=te):te=e[53];let ie;e[54]!==R||e[55]!==Ie||e[56]!==te?(ie=n(ht,{open:Ie,anchorEl:R,onClose:ue,anchorOrigin:be,transformOrigin:ge,slotProps:xe,children:te}),e[54]=R,e[55]=Ie,e[56]=te,e[57]=ie):ie=e[57];let ne;e[58]!==f.isPending?(ne=f.isPending&&n(S,{sx:{display:"flex",justifyContent:"center",py:6},children:n(mt,{size:28})}),e[58]=f.isPending,e[59]=ne):ne=e[59];let re;e[60]!==f.error||e[61]!==f.isError?(re=f.isError&&n(dt,{severity:"error",children:tt.printError(f.error)}),e[60]=f.error,e[61]=f.isError,e[62]=re):re=e[62];let oe;e[63]!==l?(oe=l&&l.tracked_events===0&&n(I,{variant:"body2",color:"text.secondary",sx:{py:4,textAlign:"center"},children:"No tracked events yet. Attendance appears here once a coach starts tracking an event."}),e[63]=l,e[64]=oe):oe=e[64];let le;e[65]!==l||e[66]!==c?(le=l&&l.tracked_events>0&&c==="matrix"&&n(Pt,{overview:l,onOpenEvent:b=>E(b)}),e[65]=l,e[66]=c,e[67]=le):le=e[67];let se;e[68]!==x||e[69]!==r||e[70]!==l||e[71]!==c?(se=l&&l.tracked_events>0&&c==="summary"&&r&&n(P,{spacing:2,children:l.players.map(b=>n($t,{player:b,expanded:x===b.team_member_id,onToggle:()=>B(q=>q===b.team_member_id?null:b.team_member_id),onOpenEvent:q=>E(q)},b.team_member_id))}),e[68]=x,e[69]=r,e[70]=l,e[71]=c,e[72]=se):se=e[72];let ae;e[73]!==x||e[74]!==r||e[75]!==l||e[76]!==c?(ae=l&&l.tracked_events>0&&c==="summary"&&!r&&m(qe,{maxWidth:800,children:[n(je,{children:m(pe,{sx:{bgcolor:"background.neutral","& th":{whiteSpace:"nowrap"}},children:[n(j,{children:"Player"}),n(j,{align:"right",children:"Attendance"}),Ae.map(zt)]})}),n(Ve,{children:l.players.map(b=>n(Rt,{player:b,expanded:x===b.team_member_id,onToggle:()=>B(q=>q===b.team_member_id?null:b.team_member_id),onOpenEvent:q=>E(q)},b.team_member_id))})]}),e[73]=x,e[74]=r,e[75]=l,e[76]=c,e[77]=ae):ae=e[77];const Pe=k!=null;let Se;e[78]===Symbol.for("react.memo_cache_sentinel")?(Se=()=>E(null),e[78]=Se):Se=e[78];let ke;e[79]===Symbol.for("react.memo_cache_sentinel")?(ke=b=>{w(b),C(!0)},e[79]=ke):ke=e[79];let ce;e[80]!==k||e[81]!==Pe||e[82]!==s?(ce=n(kt,{open:Pe,onClose:Se,teamId:s,eventId:k,onEdit:ke}),e[80]=k,e[81]=Pe,e[82]=s,e[83]=ce):ce=e[83];let Ee;e[84]===Symbol.for("react.memo_cache_sentinel")?(Ee=()=>C(!1),e[84]=Ee):Ee=e[84];let me;e[85]!==_||e[86]!==v||e[87]!==s?(me=n(Et,{open:v,onClose:Ee,teamId:s,event:_}),e[85]=_,e[86]=v,e[87]=s,e[88]=me):me=e[88];let we;return e[89]!==G||e[90]!==ie||e[91]!==ne||e[92]!==re||e[93]!==oe||e[94]!==le||e[95]!==se||e[96]!==ae||e[97]!==ce||e[98]!==me?(we=m(De,{children:[G,ie,ne,re,oe,le,se,ae,ce,me]}),e[89]=G,e[90]=ie,e[91]=ne,e[92]=re,e[93]=oe,e[94]=le,e[95]=se,e[96]=ae,e[97]=ce,e[98]=me,e[99]=we):we=e[99],we}
1function zt(e){return n(j,{align:"right",sx:{display:{xs:"none",sm:"table-cell"}},children:m(P,{direction:"row",spacing:.75,alignItems:"center",justifyContent:"flex-end",children:[n(Fe,{color:e.color,size:6}),n(S,{component:"span",children:e.label})]})},e.key)}function Bt(e){return m(Qe,{value:e.value,children:[n(S,{component:"span",sx:{display:"inline-block",width:8,height:8,borderRadius:"50%",bgcolor:e.color,mr:1}}),e.label]},e.value)}function Ft(e){return{display:"inline-block",fontSize:12,ml:1,mr:-.5,width:20,height:20,borderRadius:10,background:e.palette.primary.main,color:"#fff",lineHeight:"20px"}}function Ot(e){return e==null?void 0:e.reduxUser.selectedTeamId}const Re=Tt("attendance");function Un(){const e=de.c(10),{themeStretch:t}=rt(),i=ot(),r=t?!1:"lg",s=i?i.name:"Team";let o;e[0]!==s?(o={name:s,href:Oe.root},e[0]=s,e[1]=o):o=e[1];let a,p;e[2]===Symbol.for("react.memo_cache_sentinel")?(a={name:"Reports",href:Oe.reports.reports},p={name:Re.title},e[2]=a,e[3]=p):(a=e[2],p=e[3]);let d;e[4]!==o?(d=n(st,{heading:Re.title,links:[o,a,p]}),e[4]=o,e[5]=d):d=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=n(Wt,{}),e[6]=h):h=e[6];let c;return e[7]!==r||e[8]!==d?(c=n(lt,{title:Re.title,children:m(ut,{maxWidth:r,children:[d,h]})}),e[7]=r,e[8]=d,e[9]=c):c=e[9],c}export{Un as default}; 2//# sourceMappingURL=AttendanceReportPage-D62b3Qiw.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.