1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="aae9dffd-26cc-4d80-8cab-f15194f57f68",e._sentryDebugIdIdentifier="sentry-dbid-aae9dffd-26cc-4d80-8cab-f15194f57f68")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1633],{56603:(e,t,n)=>{var r=n(24994);t.A=void 0;var s=r(n(44888)),o=n(74848);t.A=(0,s.default)((0,o.jsx)("path",{d:"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"}),"ArrowBack")},14167:(e,t,n)=>{var r=n(24994);t.A=void 0;var s=r(n(44888)),o=n(74848);t.A=(0,s.default)((0,o.jsx)("path",{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"}),"ArrowForward")},62647:(e,t,n)=>{var r=n(24994);t.A=void 0;var s=r(n(44888)),o=n(74848);t.A=(0,s.default)((0,o.jsx)("path",{d:"M3 17v2h6v-2zM3 5v2h10V5zm10 16v-2h8v-2h-8v-2h-2v6zM7 9v2H3v2h4v2h2V9zm14 4v-2H11v2zm-6-4h2V7h4V5h-4V3h-2z"}),"Tune")},45793:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(98587),s=n(58168),o=n(96540),a=n(34164),i=n(75659),l=n(3552),c=n(98301),d=n(38413),p=n(31609);function x(e){return(0,p.Ay)("MuiFormGroup",e)}(0,d.A)("MuiFormGroup",["root","row","error"]);var h=n(16620),u=n(47374),m=n(74848);let g=["className","row"],f=e=>{let{classes:t,row:n,error:r}=e;return(0,i.A)({root:["root",n&&"row",r&&"error"]},x,t)},A=(0,l.Ay)("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.row&&t.row]}})(e=>{let{ownerState:t}=e;return(0,s.A)({display:"flex",flexDirection:"column",flexWrap:"wrap"},t.row&&{flexDirection:"row"})}),j=o.forwardRef(function(e,t){let n=(0,c.b)({props:e,name:"MuiFormGroup"}),{className:o,row:i=!1}=n,l=(0,r.A)(n,g),d=(0,h.A)(),p=(0,u.A)({props:n,muiFormControl:d,states:["error"]}),x=(0,s.A)({},n,{row:i,error:p.error}),j=f(x);return(0,m.jsx)(A,(0,s.A)({className:(0,a.A)(j.root,o),ownerState:x,ref:t},l))})},21829:(e,t,n)=>{n.d(t,{A:()=>j});var r=n(58168),s=n(98587),o=n(96540),a=n(34164),i=n(75659),l=n(45793),c=n(38413),d=n(31609);function p(e){return(0,d.Ay)("MuiRadioGroup",e)}(0,c.A)("MuiRadioGroup",["root","row","error"]);var x=n(13372),h=n(19439),u=n(90654),m=n(12876),g=n(74848);let f=["actions","children","className","defaultValue","name","onChange","value"],A=e=>{let{classes:t,row:n,error:r}=e;return(0,i.A)({root:["root",n&&"row",r&&"error"]},p,t)},j=o.forwardRef(function(e,t){let{actions:n,children:i,className:c,defaultValue:d,name:p,onChange:j,value:y}=e,C=(0,s.A)(e,f),v=o.useRef(null),b=A(e),[w,F]=(0,h.A)({controlled:y,default:d,name:"RadioGroup"});o.useImperativeHandle(n,()=>({focus:()=>{let e=v.current.querySelector("input:not(:disabled):checked");e||(e=v.current.querySelector("input:not(:disabled)")),e&&e.focus()}}),[]);let k=(0,x.A)(t,v),N=(0,m.A)(p),T=o.useMemo(()=>({name:N,onChange(e){F(e.target.value),j&&j(e,e.target.value)},value:w}),[N,j,F,w]);return(0,g.jsx)(u.A.Provider,{value:T,children:(0,g.jsx)(l.A,(0,r.A)({role:"radiogroup",ref:k,className:(0,a.A)(b.root,c)},C,{children:i}))})})}
1,71633:(e,t,n)=>{n.r(t),n.d(t,{default:()=>J});var r=n(74848),s=n(4743),o=n(87093),a=n(36277),i=n(96540),l=n(85692),c=n(18826),d=n(69379),p=n(72233),x=n(32608),h=n(50332),u=n(46968),m=n(53384),g=n(35820),f=n(12515),A=n(42413),j=n(21829),y=n(12832),C=n(78463),v=n(88130),b=n(25928),w=n(58349),F=n(18151);let k=(0,c.n9)()(()=>({drawer:{width:"100%",borderRadius:"25px 25px 0px 0px",padding:"25px 25px 0px 25px",bottom:0},drawerTitle:{fontSize:"16px",fontWeight:700,color:"#000000"},selectRoot:{width:135,height:31,borderRadius:"3px",gap:"3px",padding:"1px"}})),N={desc:"Recent First",asc:"Oldest First"},T=(0,a.PA)(e=>{let{tournamentId:t,assignmentType:n}=e,{classes:s,cx:o}=k(),{contestStore:a}=(0,x.gy)(),[l,c]=(0,i.useState)(!1),d=()=>{c(!1)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(u.A,{className:s.selectRoot,value:a.contestSort,open:!1,onClose:d,onOpen:()=>{c(!0)},IconComponent:()=>null,renderValue:e=>(0,r.jsxs)(m.A,{direction:"row",alignItems:"center",gap:"1px",children:[(0,r.jsx)("span",{children:N[e]}),"desc"===e?(0,r.jsx)(v.A,{fontSize:"inherit"}):(0,r.jsx)(b.A,{fontSize:"inherit"})]}),children:Object.keys(N).map(e=>(0,r.jsxs)(g.A,{value:e,children:[N[e]," ","desc"===e?(0,r.jsx)(v.A,{fontSize:"inherit"}):(0,r.jsx)(b.A,{fontSize:"inherit"})]},e))}),(0,r.jsx)(f.Ay,{PaperProps:{className:s.drawer},anchor:"bottom",open:l,onClose:d,children:(0,r.jsxs)(m.A,{direction:"column",gap:"16px",children:[(0,r.jsxs)(m.A,{direction:"row",justifyContent:"space-between",children:[(0,r.jsx)(A.A,{className:s.drawerTitle,children:"Filter"}),(0,r.jsx)(w.A,{onClick:d})]}),(0,r.jsx)(m.A,{direction:"column",gap:"15px",sx:{overflowY:"auto"},children:(0,r.jsx)(j.A,{value:a.contestSort,onChange:e=>{a.handleSortChange(e.target.value),"desc"===e.target.value?(0,F.cj7)(t,n):(0,F.JQw)(t,n)},children:Object.keys(N).map(e=>(0,r.jsx)(y.A,{value:e,control:(0,r.jsx)(C.A,{color:"secondary"}),label:N[e]},N[e]))})})]})})]})});var I=n(2424),S=n(45793),z=n(54798),R=n(41917),P=n(62647),O=n(14167),W=n(56603);let E=(0,c.n9)()(e=>({drawer:{width:"100%",height:"auto",maxHeight:"90vh",borderRadius:"25px 25px 0px 0px",padding:"25px",bottom:0},drawerTitle:{fontSize:"18px",fontWeight:700,color:"#000000"},filterTypeItem:{display:"flex",flexDirection:"row",gap:"5px",alignItems:"center",padding:"11px 0",cursor:"pointer","&:hover":{backgroundColor:"#F9FAFB"}},filterTypeText:{fontSize:"16px",fontWeight:500,color:"#000000"},checkBoxWrapper:{display:"flex",flexDirection:"column",fontWeight:500,fontSize:"14px",lineHeight:"20px"},backButton:{display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",color:"#000000",fontSize:"14px",fontWeight:500},subtitle:{fontSize:"16px",fontWeight:600,color:"#000000",marginTop:"8px"}})),M={0:"Ongoing",1:"Expired",3:"Completed",2:"Redeemed"},D={ORG:"Organization",GROUP:"User Groups",CLINIC:"Clinic"},B=(0,a.PA)(e=>{let{tournamentId:t,assignmentType:n}=e,{classes:s}=E(),{contestStore:o}=(0,x.gy)(),[a,l]=(0,i.useState)(!1),[c,d]=(0,i.useState)("main"),p=()=>{l(!1),d("main")},h=e=>{o.handleFilterChange(e),0===e?(0,F.hGi)(t,n):1===e?(0,F.HPz)(t,n):2===e?(0,F.nXJ)(t,n):3===e&&(0,F.bDq)(t,n)},u=e=>{o.handleAssignmentTypeChange(e),"ORG"===e?(0,F.uvD)(t,n):"GROUP"===e?(0,F.I2Z)(t,n):"CLINIC"===e&&(0,F.QRm)(t,n)},g=Object.keys(D).every(e=>o.assignmentType.includes(e)),j=Object.keys(M).map(Number).every(e=>o.contestFilter.includes(e));return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(R.A,{variant:"contained",startIcon:(0,r.jsx)(P.A,{}),color:"secondary",onClick:()=>{l(!0),d("main")},children:"Filter"}),(0,r.jsxs)(f.Ay,{PaperProps:{className:s.drawer},anchor:"bottom",open:a,onClose:p,children:["main"===c&&(0,r.jsxs)(m.A,{direction:"column",gap:"0",children:[(0,r.jsxs)(m.A,{width:"100%",direction:"row",justifyContent:"space-between",alignItems:"center",mb:1,children:[(0,r.jsx)(A.A,{className:s.drawerTitle,children:"Please Select a Filter Type"}),(0,r.jsx)(I.A,{onClick:p,size:"small",children:(0,r.jsx)(w.A,{})})]}),(0,r.jsxs)("div",{className:s.filterTypeItem,onClick:()=>d("assignmentType"),children:[(0,r.jsx)(A.A,{className:s.filterTypeText,children:"Assignment Type"}),(0,r.jsx)(O.A,{sx:{fontSize:"16px",color:"#000000"}})]}),(0,r.jsxs)("div",{className:s.filterTypeItem,onClick:()=>d("contestStatus"),style:{borderBottom:"none"},children:[(0,r.jsx)(A.A,{className:s.filterTypeText,children:"Contest Status"}),(0,r.jsx)(O.A,{sx:{fontSize:"16px",color:"#000000"}})]})]}),"assignmentType"===c&&(0,r.jsxs)(m.A,{direction:"column",gap:"16px",children:[(0,r.jsxs)(m.A,{width:"100%",direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,r.jsxs)("div",{className:s.backButton,onClick:()=>d("main"),children:[(0,r.jsx)(W.A,{sx:{fontSize:"18px"}}),(0,r.jsx)("span",{children:"Back to filter type"})]}),(0,r.jsx)(I.A,{onClick:p,size:"small",children:(0,r.jsx)(w.A,{})})]}),(0,r.jsx)(A.A,{className:s.subtitle,children:"Filter by Assignment Type"}),(0,r.jsxs)(S.A,{className:s.checkBoxWrapper,children:[(0,r.jsx)(y.A,{control:(0,r.jsx)(z.A,{color:"secondary",checked:g,onChange:()=>{let e=Object.keys(D);e.every(e=>
1o.assignmentType.includes(e))?e.forEach(e=>{o.assignmentType.includes(e)&&u(e)}):e.forEach(e=>{o.assignmentType.includes(e)||u(e)})}}),label:"All"}),Object.entries(D).map(e=>{let[t,n]=e;return(0,r.jsx)(y.A,{control:(0,r.jsx)(z.A,{color:"secondary",checked:o.assignmentType.includes(t),onChange:()=>u(t)}),label:n},t)})]})]}),"contestStatus"===c&&(0,r.jsxs)(m.A,{direction:"column",gap:"16px",children:[(0,r.jsxs)(m.A,{width:"100%",direction:"row",justifyContent:"space-between",alignItems:"center",children:[(0,r.jsxs)("div",{className:s.backButton,onClick:()=>d("main"),children:[(0,r.jsx)(W.A,{sx:{fontSize:"18px"}}),(0,r.jsx)("span",{children:"Back to filter type"})]}),(0,r.jsx)(I.A,{onClick:p,size:"small",children:(0,r.jsx)(w.A,{})})]}),(0,r.jsx)(A.A,{className:s.subtitle,children:"Filter by Contest Status"}),(0,r.jsxs)(S.A,{className:s.checkBoxWrapper,children:[(0,r.jsx)(y.A,{control:(0,r.jsx)(z.A,{color:"secondary",checked:j,onChange:()=>{let e=Object.keys(M).map(Number);e.every(e=>o.contestFilter.includes(e))?e.forEach(e=>{o.contestFilter.includes(e)&&h(e)}):e.forEach(e=>{o.contestFilter.includes(e)||h(e)})}}),label:"All"}),Object.entries(M).map(e=>{let[t,n]=e,s=Number(t);return(0,r.jsx)(y.A,{control:(0,r.jsx)(z.A,{color:"secondary",checked:o.contestFilter.includes(s),onChange:()=>h(s)}),label:n},t)})]})]})]})]})}),G=(0,c.n9)()(()=>({container:{display:"flex",flexDirection:"row",gap:"20px",justifyContent:"space-between",alignItems:"center"},title:{fontWeight:700,fontSize:"18px",lineHeight:"23px"}})),_=(0,a.PA)(e=>{let{tournamentId:t,assignmentType:n}=e,{classes:o}=G(),{contestStore:a}=(0,x.gy)();return(0,r.jsxs)("div",{className:o.container,children:[(0,r.jsx)(s.A,{className:o.title,children:"My Contests"}),(0,r.jsxs)(m.A,{direction:"row",gap:"8px",children:[(0,r.jsx)(T,{tournamentId:t,assignmentType:n}),(0,r.jsx)(B,{tournamentId:t,assignmentType:n})]})]})});var H=n(29965),L=n.n(H);let V=(0,c.n9)()(()=>({NoContestPlaceholderContainer:{width:"stretch",borderRadius:"8px",padding:"20px",gap:"20px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",textAlign:"center",backgroundColor:" #FFFFFF"},description:{color:"#5C6469",textAlign:"center"},noContest:{backgroundColor:"#F9FCFF",border:"1px solid #B1C6E2"}})),q=(0,a.PA)(()=>{let{classes:e,cx:t}=V(),{contestStore:n}=(0,x.gy)(),o=n.allContests.length>0;return(0,r.jsxs)(s.A,{className:t(e.NoContestPlaceholderContainer,{[e.noContest]:o}),children:[(0,r.jsx)(L(),{src:o?"/images/no-data-2.svg":"/images/no-data.svg",alt:"No Data",height:187,width:233}),(0,r.jsxs)(s.A,{children:[(0,r.jsx)(A.A,{component:"h6",gutterBottom:!0,fontWeight:"700",className:e.description,children:"No Contests Available"}),(0,r.jsx)(A.A,{sx:{width:{xs:"80%",md:"400px"},margin:"auto"},variant:"h5",fontWeight:"400",gutterBottom:!0,className:e.description,children:o?"Adjust your filters or try different criteria to find what you're looking for.":"It looks like you haven't been assigned to any tournament yet. Once you're part of a tournament, you'll see all the details here. Please reach out to your admin or check back later for updates."})]})]})}),U=(0,c.n9)()(()=>({wrapper:{height:"100%",width:"stretch",position:"relative",display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start"},tournamentProgressWrapper:{backgroundColor:"#FFDA94",width:"stretch"},progressRoot:{width:"stretch",height:"100%",backgroundColor:"#FFF9EE",borderRadius:"24px 24px 0 0",padding:"16px"},contestWrapper:{backgroundColor:"#FFF9EE",width:"stretch"},contestRoot:{backgroundColor:"#FFFFFF",width:"stretch",display:"flex",flexDirection:"column",gap:"12px",padding:"10px",borderRadius:"24px 24px 0 0"},contestListContainer:{display:"grid",gridTemplateColumns:"repeat(auto-fill, minmax(140px,1fr))",gap:"12px"},contestCard:{flex:"0 0 calc(50% - 12px)",width:"161.5",minWidth:"140px"},loadMoreContainer:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",padding:"20px 0"},loadingOverlay:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",minHeight:"300px"}})),J=(0,a.PA)(e=>{let{onTournamentChange:t,selectedTournamentId:n,assignmentType:a}=e,{classes:c}=U(),{dtpointsStore:u,contestStore:m}=(0,x.gy)(),g=(0,i.useRef)(null),[f,A]=(0,i.useState)(!1),j=(0,i.useRef)(n),[y,C]=(0,l.Wx)({threshold:0,rootMargin:"100px",root:g.current}),v=m.filteredContests,b=m.allContests.length>0,w=m.isLoadingContests,k=m.hasMoreContests;return(0,i.useEffect)(()=>{j.current!==n&&(A(!0),j.current=n)},[n]),(0,i.useEffect)(()=>{n&&(0,F.Aeg)(n)},[n]),(0,i.useEffect)(()=>{f&&!w&&v.length>=0&&A(!1)},[f,w,v.length]),(0,i.useEffect)(()=>
1{C&&!w&&k&&n&&0!==v.length&&!f&&m.loadMoreContests({assignment_type:a,tournament_id:n})},[C,w,k,n,a,v.length,m,f]),(0,r.jsxs)(s.A,{className:c.wrapper,children:[(0,r.jsx)(d.A,{onTournamentChange:t,selectedTournamentId:n||"",assignmentType:a||""}),(0,r.jsx)(s.A,{className:c.tournamentProgressWrapper,children:b&&!f&&(0,r.jsx)(s.A,{className:c.progressRoot,children:(0,r.jsx)(p.A,{})})}),(0,r.jsx)(s.A,{className:c.contestWrapper,children:(0,r.jsxs)(s.A,{className:c.contestRoot,children:[b&&!f&&(0,r.jsx)(_,{tournamentId:n||"",assignmentType:a||""}),f?(0,r.jsx)(s.A,{className:c.loadingOverlay,children:(0,r.jsx)(o.A,{size:40})}):0!==v.length||w?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(s.A,{className:c.contestListContainer,children:v.map(e=>{var t;return(0,r.jsx)(s.A,{className:c.contestCard,children:(0,r.jsx)(h.A,{contest:e,availablePoints:null===(t=u.rewardStats)||void 0===t?void 0:t.total_earned_points})},e.questionnaire_id)})}),k&&v.length>0&&(0,r.jsxs)(s.A,{className:c.loadMoreContainer,children:[w&&(0,r.jsx)(o.A,{size:30}),(0,r.jsx)("div",{ref:g?y:null,style:{height:"20px",width:"100%"}})]})]}):(0,r.jsx)(q,{})]})})]})})}}]);
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.