import{K as Qe,c as X,ct as Pt,cQ as Xe,cR as qe,p as Ue,cS as Ze,cT as Je,u as se,t as $t,aS as yt,o as we,af as Lt,d6 as gt,d5 as Ae,eu as Rt,ev as Gt,j as l,bB as xt,C as jt,bC as bt,bz as Mt,aN as vt,F as ge,n as te,b6 as Et,cU as We,av as Oe,cV as St,cd as Ut,am as _t,G as ee,Q as Ce,a1 as Ve,bA as It,c7 as Vt,bP as je,b0 as Ht,Z as wt,B as Se,cx as Te,ew as Qt,r as E,de as fe,bp as be,S as xe,bx as Pe,ch as Ct,A as Ke,ex as Ye,ey as Wt,ez as Ft,V as Kt,ce as Be,cP as Tt,J as ye,aZ as kt,by as Yt,bY as Dt,L as Xt,T as qt,x as Zt,a as Jt,ac as Bt,bE as es,eA as ts,eB as et,k as tt,al as ss,D as ls,ei as He,b7 as ns}from"./index-26FXPGkN.js";import{H as De}from"./tasks-BMVBejH2.js";import{T as st}from"./TasksSearchInput-DiDFGVKK.js";import{I as os,G as is}from"./GenericViewSettings-RgMoqYIF.js";import{a as ze}from"./IconUser-CkQmhwMi.js";import{u as rs,I as cs,a as as}from"./useTaskTypesData-CFzDcAWE.js";import{r as ds}from"./const-DPIqUBWr.js";import{u as us}from"./useTasksData-DXijVek8.js";/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ps=[["path",{d:"M12 5l0 14",key:"svg-0"}],["path",{d:"M16 15l-4 4",key:"svg-1"}],["path",{d:"M8 15l4 4",key:"svg-2"}]],Nt=Qe("outline","arrow-narrow-down","ArrowNarrowDown",ps);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const fs=[["path",{d:"M4 6h16",key:"svg-0"}],["path",{d:"M6 12h12",key:"svg-1"}],["path",{d:"M9 18h6",key:"svg-2"}]],hs=Qe("outline","filter-2","Filter2",fs);/**
 * @license @tabler/icons-react v3.36.1 - MIT
 *
 * This source code is licensed under the MIT license.
 * See the LICENSE file in the root directory of this source tree.
 */const ms=[["path",{d:"M5 5a5 5 0 0 1 7 0a5 5 0 0 0 7 0v9a5 5 0 0 1 -7 0a5 5 0 0 0 -7 0v-9",key:"svg-0"}],["path",{d:"M5 21v-7",key:"svg-1"}]],At=Qe("outline","flag","Flag",ms),Jl=()=>{const s=X.c(18),e=Pt("sprintId");let i;s[0]===Symbol.for("react.memo_cache_sentinel")?(i={States:qe(!0),ReturnDataType:Xe.ProjectReturnDataType.Projects},s[0]=i):i=s[0];const{data:o,isFetching:t}=Ue.useFetchProjectsQuery(i);let c;s[1]===Symbol.for("react.memo_cache_sentinel")?(c={States:qe(),ReturnDataType:Xe.ProjectReturnDataType.Projects},s[1]=c):c=s[1];const{data:n,isFetching:r}=Ue.useFetchProjectsQuery(c);o==null||o.Projects;let a;s[2]!==(o==null?void 0:o.Projects)?(a=(o==null?void 0:o.Projects)||[],s[2]=o==null?void 0:o.Projects,s[3]=a):a=s[3];let p;s[4]!==a?(p=Ze(a),s[4]=a,s[5]=p):p=s[5];const u=p;let h;s[6]!==e||s[7]!==u?(h=Je(e)&&u.sprintEntities[e]||null,s[6]=e,s[7]=u,s[8]=h):h=s[8];const f=h;let g;s[9]!==(n==null?void 0:n.Projects)||s[10]!==e?(g=()=>{const d=Ze((n==null?void 0:n.Projects)||[]);return Je(e)&&d.sprintEntities[e]||null},s[9]=n==null?void 0:n.Projects,s[10]=e,s[11]=g):g=s[11],n==null||n.Projects;let S;s[12]!==g?(S=g(),s[12]=g,s[13]=S):S=s[13];const b=S,y=t||r;let I;return s[14]!==f||s[15]!==b||s[16]!==y?(I={factSprint:f,sprint:b,isFetching:y},s[14]=f,s[15]=b,s[16]=y,s[17]=I):I=s[17],I},lt=[{type:"type",Icon:gt},{type:"priority",Icon:os},{type:"status",Icon:Ae},{type:"performer",Icon:ze},{type:"author",Icon:ze}],Fe={typeIds:[],statusIds:[],priorities:[],performerIds:[],authorIds:[]},ys=(s,e,i,o)=>{const t=X.c(102);let c;t[0]!==o?(c=o===void 0?[]:o,t[0]=o,t[1]=c):c=t[1];const n=c,{t:r}=se(),{taskTypes:a,isFetching:p}=rs(s==null?void 0:s.rootProjectId),{statuses:u,isFetching:h}=$t(s);let f;t[2]!==u?(f=u===void 0?[]:u,t[2]=u,t[3]=f):f=t[3];const g=f;let S;t[4]!==(e==null?void 0:e.UserIds)?(S=(e==null?void 0:e.UserIds)||[],t[4]=e==null?void 0:e.UserIds,t[5]=S):S=t[5];const b=S;let y;t[6]!==b?(y={ids:b},t[6]=b,t[7]=y):y=t[7];const I=!b.length;let d;t[8]!==I?(d={skip:I},t[8]=I,t[9]=d):d=t[9];const{data:m,isFetching:x}=yt.useGetByIdQuery(y,d);let j;t[10]!==m?(j=m===void 0?[]:m,t[10]=m,t[11]=j):j=t[11];const F=j,_=we(gs);let N;if(t[12]!==_||t[13]!==F){let ae;t[15]!==_?(ae=Ie=>({...Ie,isCurrent:Ie.Id===_}),t[15]=_,t[16]=ae):ae=t[16];const ve=F.map(ae);N=Lt(ve,["isCurrent","Name"],["desc","asc"]),t[12]=_,t[13]=F,t[14]=N}else N=t[14];const w=N;let v;t[17]!==r?(v=r("sprintFilters.types"),t[17]=r,t[18]=v):v=t[18];let C;t[19]!==r?(C=r("sprintFilters.statuses"),t[19]=r,t[20]=C):C=t[20];let B;t[21]!==r?(B=r("sprintFilters.priorities"),t[21]=r,t[22]=B):B=t[22];let k;t[23]!==r?(k=r("sprintFilters.performers"),t[23]=r,t[24]=k):k=t[24];let A;t[25]!==r?(A=r("sprintFilters.authors"),t[25]=r,t[26]=A):A=t[26];let T;t[27]!==v||t[28]!==C||t[29]!==B||t[30]!==k||t[31]!==A?(T={type:v,status:C,priority:B,performer:k,author:A},t[27]=v,t[28]=C,t[29]=B,t[30]=k,t[31]=A,t[32]=T):T=t[32];const z=T;let R;t[33]!==r?(R=r("sprintFilters.valueLabel.types"),t[33]=r,t[34]=R):R=t[34];let G;t[35]!==r?(G=r("sprintFilters.valueLabel.statuses"),t[35]=r,t[36]=G):G=t[36];let L;t[37]!==r?(L=r("sprintFilters.valueLabel.priorities"),t[37]=r,t[38]=L):L=t[38];let M;t[39]!==r?(M=r("sprintFilters.valueLabel.performers"),t[39]=r,t[40]=M):M=t[40];let V;t[41]!==r?(V=r("sprintFilters.valueLabel.authors"),t[41]=r,t[42]=V):V=t[42];let D;t[43]!==R||t[44]!==G||t[45]!==L||t[46]!==M||t[47]!==V?(D={type:R,status:G,priority:L,performer:M,author:V},t[43]=R,t[44]=G,t[45]=L,t[46]=M,t[47]=V,t[48]=D):D=t[48];const U=D;let K;if(t[49]!==z||t[50]!==n.length||t[51]!==U){const ae=n.length>0?lt.filter(xs):lt;let ve;t[53]!==z||t[54]!==U?(ve=Ie=>({...Ie,label:z[Ie.type],valueName:U[Ie.type]}),t[53]=z,t[54]=U,t[55]=ve):ve=t[55],K=ae.map(ve),t[49]=z,t[50]=n.length,t[51]=U,t[52]=K}else K=t[52];const H=K;let W;t[56]!==i?(W=i.map(js).filter(Boolean),t[56]=i,t[57]=W):W=t[57];const Z=W;let he;if(t[58]!==H||t[59]!==Z){let ae;t[61]!==Z?(ae=ve=>!Z.includes(ve.type),t[61]=Z,t[62]=ae):ae=t[62],he=H.filter(ae),t[58]=H,t[59]=Z,t[60]=he}else he=t[60];const re=he;let oe;t[63]!==a?(oe=a||[],t[63]=a,t[64]=oe):oe=t[64];let le;t[65]!==oe?(le=oe.map(bs),t[65]=oe,t[66]=le):le=t[66];const ie=le;let de;t[67]!==g?(de=g.map(vs),t[67]=g,t[68]=de):de=t[68];const ue=de;let ne;t[69]===Symbol.for("react.memo_cache_sentinel")?(ne=Rt.map(Ss),t[69]=ne):ne=t[69];const pe=ne;let ce;t[70]!==w?(ce=w.map(_s),t[70]=w,t[71]=ce):ce=t[71];const q=ce;let $;t[72]===Symbol.for("react.memo_cache_sentinel")?($=l.jsx(vt,{size:34}),t[72]=$):$=t[72];let P;t[73]!==r?(P=r("members.notAssigned"),t[73]=r,t[74]=P):P=t[74];let Q;t[75]!==P?(Q=l.jsxs(ge,{align:"center",gap:8,pl:0,w:"100%",children:[$,l.jsx(te,{fz:14,lh:"18px",truncate:!0,children:P})]}),t[75]=P,t[76]=Q):Q=t[76];let Y;t[77]!==r?(Y=r("members.notAssigned").toLowerCase(),t[77]=r,t[78]=Y):Y=t[78];let J;t[79]!==Q||t[80]!==Y?(J={value:"-1",node:Q,searchText:Y},t[79]=Q,t[80]=Y,t[81]=J):J=t[81];const me=J;let _e;t[82]!==me||t[83]!==q?(_e=[me,...q],t[82]=me,t[83]=q,t[84]=_e):_e=t[84];const $e=_e,Le=i.length<5&&re.length>0;let Re;e:{if(i.length===0){Re=!1;break e}let ae;t[85]!==i?(ae=i.every(Is),t[85]=i,t[86]=ae):ae=t[86],Re=ae}const Ge=Re,Ot=ks;let ke;return t[87]!==Ge||t[88]!==re||t[89]!==Le||t[90]!==H||t[91]!==h||t[92]!==p||t[93]!==x||t[94]!==$e||t[95]!==F||t[96]!==ue||t[97]!==g||t[98]!==a||t[99]!==ie||t[100]!==q?(ke={taskTypes:a,statuses:g,projectUsers:F,filterTypeOptions:H,availableTypeOptions:re,typeOptions:ie,statusOptions:ue,priorityOptions:pe,performerOptions:$e,userOptionsList:q,canAddFilter:Le,allFiltersHaveValues:Ge,isTaskTypesLoading:p,isStatusesLoading:h,isUsersLoading:x,buildPayload:Ot},t[87]=Ge,t[88]=re,t[89]=Le,t[90]=H,t[91]=h,t[92]=p,t[93]=x,t[94]=$e,t[95]=F,t[96]=ue,t[97]=g,t[98]=a,t[99]=ie,t[100]=q,t[101]=ke):ke=t[101],ke};function gs(s){return s[Gt.reducerPath].currentUser.Id}function xs(s){return s.type!=="performer"}function js(s){return s.type}function bs(s){return{value:s.Id.toString(),node:l.jsx(xt,{type:s})}}function vs(s){var e;return{value:s.Id.toString(),node:l.jsx(jt,{status:s,withLabel:!0,filled:!1,truncate:!0,iconSize:20}),searchText:((e=s.Name)==null?void 0:e.toLowerCase())||""}}function Ss(s){return{value:s.toString(),node:l.jsx(bt,{priority:s,withLabel:!0})}}function _s(s){return{value:s.Id.toString(),node:l.jsx(Mt,{user:s,fullInfo:!0}),searchText:`${s.Name} ${s.Email}`.toLowerCase()}}function Is(s){return s.type&&s.values.length>0}function ws(s){return s.values}function Cs(s){return Number(s)}function Fs(s){return!Number.isNaN(s)}function Ts(s){return s.map(Cs).filter(Fs)}function ks(s){const e=o=>s.filter(t=>t.type===o).flatMap(ws),i=Ts;return{typeIds:i(e("type")),statusIds:i(e("status")),priorities:i(e("priority")),performerIds:i(e("performer")),authorIds:i(e("author"))}}const en=s=>{const e=X.c(5),{sprint:i}=s,{t:o}=se(),{taskKey:t}=we(Bs),{data:c}=Et(t),n=c?c.Title:i.Name;let r;e[0]!==o?(r=o("appName."+We),e[0]=o,e[1]=r):r=e[1];let a;return e[2]!==n||e[3]!==r?(a=l.jsx(De,{children:l.jsxs("title",{children:[n," | ",r]})}),e[2]=n,e[3]=r,e[4]=a):a=e[4],a};function Bs(s){return s.taskModalSlice}const tn=()=>{const s=X.c(16),{t:e}=se();let i;s[0]!==e?(i=e("appName."+We),s[0]=e,s[1]=i):i=s[1];let o;s[2]!==i?(o=l.jsx(De,{children:l.jsxs("title",{children:["403 | ",i]})}),s[2]=i,s[3]=o):o=s[3];let t;s[4]!==e?(t=e("archived.description"),s[4]=e,s[5]=t):t=s[5];let c;s[6]!==e?(c=e("404.goHome"),s[6]=e,s[7]=c):c=s[7];let n;s[8]!==c?(n=[{buttonText:c,handleClick:Ns}],s[8]=c,s[9]=n):n=s[9];let r;s[10]!==t||s[11]!==n?(r=l.jsx(Oe,{description:t,illustration:"noAccess",buttons:n}),s[10]=t,s[11]=n,s[12]=r):r=s[12];let a;return s[13]!==o||s[14]!==r?(a=l.jsxs(l.Fragment,{children:[o,r]}),s[13]=o,s[14]=r,s[15]=a):a=s[15],a};function Ns(){return St.navigate("/")}const sn=s=>{const e=X.c(13),{onClick:i}=s,{t:o}=se();let t;e[0]!==o?(t=o("nodata.noResults.title"),e[0]=o,e[1]=t):t=e[1];let c;e[2]!==o?(c=o("nodata.noResults.description"),e[2]=o,e[3]=c):c=e[3];let n;e[4]!==o?(n=o("nodata.noResults.action"),e[4]=o,e[5]=n):n=e[5];let r;e[6]!==i||e[7]!==n?(r=[{buttonText:n,handleClick:i}],e[6]=i,e[7]=n,e[8]=r):r=e[8];let a;return e[9]!==t||e[10]!==c||e[11]!==r?(a=l.jsx(Oe,{illustration:"noResults",title:t,description:c,buttons:r}),e[9]=t,e[10]=c,e[11]=r,e[12]=a):a=e[12],a},ln=()=>{const s=X.c(19),{t:e}=se();let i;s[0]!==e?(i=e("appName."+We),s[0]=e,s[1]=i):i=s[1];let o;s[2]!==i?(o=l.jsx(De,{children:l.jsxs("title",{children:["404 | ",i]})}),s[2]=i,s[3]=o):o=s[3];let t;s[4]!==e?(t=e("404.title"),s[4]=e,s[5]=t):t=s[5];let c;s[6]!==e?(c=e("404.description",{entity:e("404.entities.page")}),s[6]=e,s[7]=c):c=s[7];let n;s[8]!==e?(n=e("404.goHome"),s[8]=e,s[9]=n):n=s[9];let r;s[10]!==n?(r=[{buttonText:n,handleClick:As}],s[10]=n,s[11]=r):r=s[11];let a;s[12]!==t||s[13]!==c||s[14]!==r?(a=l.jsx(Oe,{title:t,description:c,illustration:"404",buttons:r}),s[12]=t,s[13]=c,s[14]=r,s[15]=a):a=s[15];let p;return s[16]!==o||s[17]!==a?(p=l.jsxs(l.Fragment,{children:[o,a]}),s[16]=o,s[17]=a,s[18]=p):p=s[18],p};function As(){return St.navigate("/")}const nn=s=>{const e=X.c(12),{onClick:i}=s,{t:o}=se(),t=Ut();let c;e[0]!==o?(c=o("nodata.noTasks2.title"),e[0]=o,e[1]=c):c=e[1];let n;e[2]!==o?(n=o("nodata.noTasks2.description"),e[2]=o,e[3]=n):n=e[3];let r;e[4]!==t.tasks.create||e[5]!==i||e[6]!==o?(r=t.tasks.create?[{buttonText:o("nodata.noTasks2.action"),handleClick:i}]:[],e[4]=t.tasks.create,e[5]=i,e[6]=o,e[7]=r):r=e[7];let a;return e[8]!==c||e[9]!==n||e[10]!==r?(a=l.jsx(Oe,{illustration:"noTasks",title:c,description:n,buttons:r}),e[8]=c,e[9]=n,e[10]=r,e[11]=a):a=e[11],a},zs=s=>{const e=X.c(16),{projectId:i,selected:o,onSelect:t}=s,c=we(Os),{project:n}=_t(i);let r;e[0]!==(n==null?void 0:n.UserIds)?(r=(n==null?void 0:n.UserIds)||[],e[0]=n==null?void 0:n.UserIds,e[1]=r):r=e[1];let a;e[2]!==r?(a={ids:r},e[2]=r,e[3]=a):a=e[3];let p;if(e[4]===Symbol.for("react.memo_cache_sentinel")?(p={refetchOnFocus:!0},e[4]=p):p=e[4],yt.useGetByIdQuery(a,p),!n)return;let u;e[5]!==c.Id||e[6]!==t||e[7]!==o?(u=()=>t==null?void 0:t(Vt(o,[c.Id])),e[5]=c.Id,e[6]=t,e[7]=o,e[8]=u):u=e[8];let h;e[9]!==c.Id||e[10]!==o?(h=o!=null&&o.includes(c.Id)?{boxShadow:"0 0 0 2px var(--mantine-color-blue-5)",cursor:"pointer",zIndex:1}:{cursor:"pointer"},e[9]=c.Id,e[10]=o,e[11]=h):h=e[11];let f;return e[12]!==c||e[13]!==u||e[14]!==h?(f=l.jsx(ee,{gap:12,wrap:"nowrap",pt:2,children:l.jsx(Ce.Group,{openDelay:300,closeDelay:100,children:l.jsx(Ve.Group,{spacing:"sm",children:l.jsx(It,{size:32,onClick:u,user:c,style:h},c.Id)})})}),e[12]=c,e[13]=u,e[14]=h,e[15]=f):f=e[15],f};function Os(s){return s.usersCache.currentUser}const Ps=s=>{const e=X.c(14),{sprint:i,canCreate:o}=s,{t}=se(),c=je("(max-width: 576px)");let n;e[0]!==i?(n=()=>{Ht({defaultValues:{sprint:i}})},e[0]=i,e[1]=n):n=e[1];const r=n;if(!o)return null;if(c){let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(wt,{size:16}),e[2]=u):u=e[2];let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h={position:"fixed",bottom:16,right:16,zIndex:1e3},e[3]=h):h=e[3];let f;e[4]!==t?(f=t("common.action.add"),e[4]=t,e[5]=f):f=e[5];let g;return e[6]!==r||e[7]!==f?(g=l.jsx(Se,{leftSection:u,onClick:r,radius:"xl",style:h,children:f}),e[6]=r,e[7]=f,e[8]=g):g=e[8],g}let a;e[9]!==t?(a=t("sidebar.action.addTask"),e[9]=t,e[10]=a):a=e[10];let p;return e[11]!==r||e[12]!==a?(p=l.jsx(Se,{onClick:r,children:a}),e[11]=r,e[12]=a,e[13]=p):p=e[13],p},$s="_groupButton_835h1_1",Ls="_active_835h1_10",nt={groupButton:$s,active:Ls},ot=s=>{const e=X.c(16),{groupBy:i,handleToggle:o}=s,{t}=se();let c;e[0]!==i||e[1]!==t?(c=t(i?`sprintGrouping.${i}`:"sprintGrouping.title"),e[0]=i,e[1]=t,e[2]=c):c=e[2];const n=c,r=i!=="status",a=r&&nt.active;let p;e[3]!==a?(p=Te(nt.groupButton,a),e[3]=a,e[4]=p):p=e[4];let u;e[5]!==t?(u=t("sprintGrouping.title"),e[5]=t,e[6]=u):u=e[6];let h;e[7]===Symbol.for("react.memo_cache_sentinel")?(h={inner:{justifyContent:"flex-start"}},e[7]=h):h=e[7];const f=r?"#339AF0":"#31394A";let g;e[8]!==f?(g=l.jsx(Qt,{size:16,color:f}),e[8]=f,e[9]=g):g=e[9];let S;return e[10]!==o||e[11]!==n||e[12]!==p||e[13]!==u||e[14]!==g?(S=l.jsx(Se,{variant:"default",size:"sm",className:p,"aria-label":u,styles:h,leftSection:g,onClick:o,children:n}),e[10]=o,e[11]=n,e[12]=p,e[13]=u,e[14]=g,e[15]=S):S=e[15],S},Rs="_filterButton_191ol_1",Gs="_active_191ol_10",Ms="_activeFilters_191ol_25",Es="_title_191ol_36",Us="_filterRow_191ol_41",Vs="_filterRowContent_191ol_47",Hs="_filterRowMain_191ol_55",Qs="_filterRowDelete_191ol_60",Ws="_chip_191ol_70",Ks="_filterControls_191ol_86",Ys="_filterTypeCol_191ol_93",Ds="_filterValueCol_191ol_97",Xs="_chipWrapper_191ol_127",qs="_chipIcons_191ol_133",Zs="_chipPlaceholder_191ol_167",Js="_chipSelected_191ol_171",el="_deleteButton_191ol_208",tl="_addButton_191ol_212",sl="_resetButton_191ol_231",ll="_dropdown_191ol_244",nl="_dropdownHeader_191ol_257",ol="_selectAllButton_191ol_264",il="_optionList_191ol_273",rl="_option_191ol_273",cl="_optionLabel_191ol_295",al="_dropdownFooter_191ol_301",dl="_applyButton_191ol_308",ul="_searchInput_191ol_312",O={filterButton:Rs,active:Gs,activeFilters:Ms,title:Es,filterRow:Us,filterRowContent:Vs,filterRowMain:Hs,filterRowDelete:Qs,chip:Ws,filterControls:Ks,filterTypeCol:Ys,filterValueCol:Ds,chipWrapper:Xs,chipIcons:qs,chipPlaceholder:Zs,chipSelected:Js,deleteButton:el,addButton:tl,resetButton:sl,dropdown:ll,dropdownHeader:nl,selectAllButton:ol,optionList:il,option:rl,optionLabel:cl,dropdownFooter:al,applyButton:dl,searchInput:ul},Ne=s=>{const e=X.c(65),{options:i,placeholder:o,onSelect:t,selectedType:c,id:n,isGrouping:r}=s,a=n===void 0?0:n,[p,u]=E.useState(!1),h=je("(max-width: 576px)");let f,g,S,b,y,I,d,m,x,j,F,_,N,w,v;if(e[0]!==a||e[1]!==r||e[2]!==h||e[3]!==t||e[4]!==p||e[5]!==i||e[6]!==o||e[7]!==c){const U=c?r?i.find(W=>W.value===c):i.find(W=>W.type===c):null,K=h?"100%":175;d=h?16:12,m=h?"20px":"16px",I=h?20:16,f=U?U.Icon:null,x=U?U.label:o;let H;e[23]!==a||e[24]!==r||e[25]!==t?(H=W=>{r?t(W.value):t(W.type,a),u(!1)},e[23]=a,e[24]=r,e[25]=t,e[26]=H):H=e[26],y=H,b=fe,_=p,N=u,w="bottom-start",v=h,S=fe.Target,g=be,j=K,F=Te(O.chip,O.chipPlaceholder,U&&O.chipSelected),e[0]=a,e[1]=r,e[2]=h,e[3]=t,e[4]=p,e[5]=i,e[6]=o,e[7]=c,e[8]=f,e[9]=g,e[10]=S,e[11]=b,e[12]=y,e[13]=I,e[14]=d,e[15]=m,e[16]=x,e[17]=j,e[18]=F,e[19]=_,e[20]=N,e[21]=w,e[22]=v}else f=e[8],g=e[9],S=e[10],b=e[11],y=e[12],I=e[13],d=e[14],m=e[15],x=e[16],j=e[17],F=e[18],_=e[19],N=e[20],w=e[21],v=e[22];let C;e[27]===Symbol.for("react.memo_cache_sentinel")?(C=()=>u(pl),e[27]=C):C=e[27];let B;e[28]===Symbol.for("react.memo_cache_sentinel")?(B={width:"100%"},e[28]=B):B=e[28];let k;e[29]!==f||e[30]!==I?(k=f&&l.jsx(f,{size:I,style:{flexShrink:0}}),e[29]=f,e[30]=I,e[31]=k):k=e[31];let A;e[32]===Symbol.for("react.memo_cache_sentinel")?(A={flex:1,textAlign:"left"},e[32]=A):A=e[32];let T;e[33]!==d||e[34]!==m||e[35]!==x?(T=l.jsx(te,{fz:d,lh:m,style:A,children:x}),e[33]=d,e[34]=m,e[35]=x,e[36]=T):T=e[36];let z;e[37]===Symbol.for("react.memo_cache_sentinel")?(z=l.jsx(Pe,{size:16,style:{flexShrink:0}}),e[37]=z):z=e[37];let R;e[38]!==T||e[39]!==k?(R=l.jsxs(ee,{gap:8,align:"center",wrap:"nowrap",style:B,children:[k,T,z]}),e[38]=T,e[39]=k,e[40]=R):R=e[40];let G;e[41]!==g||e[42]!==p||e[43]!==j||e[44]!==R||e[45]!==F?(G=l.jsx(g,{w:j,className:F,"data-opened":p,onClick:C,children:R}),e[41]=g,e[42]=p,e[43]=j,e[44]=R,e[45]=F,e[46]=G):G=e[46];let L;e[47]!==S||e[48]!==G?(L=l.jsx(S,{children:G}),e[47]=S,e[48]=G,e[49]=L):L=e[49];let M;e[50]!==y||e[51]!==r||e[52]!==i||e[53]!==o?(M=i.length?i.map(U=>{const K=r?U.value??"null":U.type,H=U.label,W=U.Icon;return l.jsx(be,{className:O.option,onClick:()=>y(U),children:l.jsxs(ee,{gap:10,align:"center",children:[l.jsx(W,{size:20}),l.jsx(te,{fz:14,children:H})]})},K)}):l.jsx(ge,{mih:80,align:"center",justify:"center",children:l.jsx(te,{c:"gray.6",size:"sm",children:o})}),e[50]=y,e[51]=r,e[52]=i,e[53]=o,e[54]=M):M=e[54];let V;e[55]!==M?(V=l.jsx(fe.Dropdown,{w:260,className:O.dropdown,onClick:fl,children:l.jsx(xe,{gap:0,children:M})}),e[55]=M,e[56]=V):V=e[56];let D;return e[57]!==b||e[58]!==L||e[59]!==V||e[60]!==_||e[61]!==N||e[62]!==w||e[63]!==v?(D=l.jsxs(b,{opened:_,onChange:N,position:w,withinPortal:v,children:[L,V]}),e[57]=b,e[58]=L,e[59]=V,e[60]=_,e[61]=N,e[62]=w,e[63]=v,e[64]=D):D=e[64],D};function pl(s){return!s}function fl(s){return s.stopPropagation()}const hl=s=>{const e=X.c(38),{options:i,placeholder:o,onSelect:t,selectedOrder:c,disabled:n}=s,r=n===void 0?!1:n,[a,p]=E.useState(!1),u=je("(max-width: 576px)");let h;if(e[0]!==i||e[1]!==c){let T;e[3]!==c?(T=z=>z.value===c,e[3]=c,e[4]=T):T=e[4],h=i.find(T),e[0]=i,e[1]=c,e[2]=h}else h=e[2];const f=h,g=u?"100%":175,S=u?16:12,b=u?"20px":"16px",y=u?20:16,I=f&&O.chipSelected;let d;e[5]!==I?(d=Te(O.chip,O.chipPlaceholder,I),e[5]=I,e[6]=d):d=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=()=>p(ml),e[7]=m):m=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x={width:"100%"},e[8]=x):x=e[8];let j;e[9]!==y||e[10]!==f?(j=f&&l.jsx(f.Icon,{size:y,style:{flexShrink:0}}),e[9]=y,e[10]=f,e[11]=j):j=e[11];let F;e[12]===Symbol.for("react.memo_cache_sentinel")?(F={flex:1,textAlign:"left"},e[12]=F):F=e[12];const _=f?f.label:o;let N;e[13]!==S||e[14]!==b||e[15]!==_?(N=l.jsx(te,{fz:S,lh:b,style:F,children:_}),e[13]=S,e[14]=b,e[15]=_,e[16]=N):N=e[16];let w;e[17]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx(Pe,{size:16,style:{flexShrink:0}}),e[17]=w):w=e[17];let v;e[18]!==N||e[19]!==j?(v=l.jsxs(ee,{gap:8,align:"center",wrap:"nowrap",style:x,children:[j,N,w]}),e[18]=N,e[19]=j,e[20]=v):v=e[20];let C;e[21]!==g||e[22]!==r||e[23]!==a||e[24]!==v||e[25]!==d?(C=l.jsx(fe.Target,{children:l.jsx(be,{w:g,className:d,disabled:r,"data-opened":a,onClick:m,children:v})}),e[21]=g,e[22]=r,e[23]=a,e[24]=v,e[25]=d,e[26]=C):C=e[26];let B;e[27]!==t||e[28]!==i||e[29]!==o?(B=i.length?i.map(T=>l.jsx(be,{className:O.option,onClick:()=>{t(T.value),p(!1)},children:l.jsxs(ee,{gap:10,align:"center",children:[l.jsx(T.Icon,{size:20}),l.jsx(te,{fz:14,children:T.label})]})},T.value)):l.jsx(ge,{mih:80,align:"center",justify:"center",children:l.jsx(te,{c:"gray.6",size:"sm",children:o})}),e[27]=t,e[28]=i,e[29]=o,e[30]=B):B=e[30];let k;e[31]!==B?(k=l.jsx(fe.Dropdown,{w:260,className:O.dropdown,onClick:yl,children:l.jsx(xe,{gap:0,children:B})}),e[31]=B,e[32]=k):k=e[32];let A;return e[33]!==u||e[34]!==a||e[35]!==C||e[36]!==k?(A=l.jsxs(fe,{opened:a,onChange:p,position:"bottom-start",withinPortal:u,children:[C,k]}),e[33]=u,e[34]=a,e[35]=C,e[36]=k,e[37]=A):A=e[37],A};function ml(s){return!s}function yl(s){return s.stopPropagation()}const it=s=>{const e=X.c(73),{groupings:i,onGroupingsChange:o,isMobileLayout:t,isKanban:c}=s,{t:n}=se();let r;e[0]!==n?(r=n("sprintGrouping.type"),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==r?(a={value:"type",label:r,Icon:Ae},e[2]=r,e[3]=a):a=e[3];let p;e[4]!==n?(p=n("sprintGrouping.priority"),e[4]=n,e[5]=p):p=e[5];let u;e[6]!==p?(u={value:"priority",label:p,Icon:At},e[6]=p,e[7]=u):u=e[7];let h;e[8]!==n?(h=n("sprintGrouping.status"),e[8]=n,e[9]=h):h=e[9];let f;e[10]!==h?(f={value:"status",label:h,Icon:Ae},e[10]=h,e[11]=f):f=e[11];let g;e[12]!==n?(g=n("sprintGrouping.performer"),e[12]=n,e[13]=g):g=e[13];let S;e[14]!==g?(S={value:"performer",label:g,Icon:ze},e[14]=g,e[15]=S):S=e[15];let b;e[16]!==a||e[17]!==u||e[18]!==f||e[19]!==S?(b=[a,u,f,S],e[16]=a,e[17]=u,e[18]=f,e[19]=S,e[20]=b):b=e[20];const y=b;let I;e[21]!==n?(I=n("sprintGrouping.ascending"),e[21]=n,e[22]=I):I=e[22];let d;e[23]!==I?(d={value:"asc",label:I,Icon:cs},e[23]=I,e[24]=d):d=e[24];let m;e[25]!==n?(m=n("sprintGrouping.descending"),e[25]=n,e[26]=m):m=e[26];let x;e[27]!==m?(x={value:"desc",label:m,Icon:as},e[27]=m,e[28]=x):x=e[28];let j;e[29]!==d||e[30]!==x?(j=[d,x],e[29]=d,e[30]=x,e[31]=j):j=e[31];const F=j;let _;e[32]!==o?(_=Z=>{Z&&o({groupBy:Z,sortOrder:"asc"})},e[32]=o,e[33]=_):_=e[33];const N=_;let w;e[34]!==i||e[35]!==o?(w=Z=>{o({...i,sortOrder:Z})},e[34]=i,e[35]=o,e[36]=w):w=e[36];const v=w;let C;e[37]!==o?(C=()=>{o({groupBy:null,sortOrder:null})},e[37]=o,e[38]=C):C=e[38];const B=C,k=i.groupBy===null;let A;e[39]!==t||e[40]!==n?(A=!t&&l.jsx(te,{size:"sm",className:O.title,children:n("sprintGrouping.title")}),e[39]=t,e[40]=n,e[41]=A):A=e[41];let T;e[42]!==n?(T=n("sprintGrouping.placeholder"),e[42]=n,e[43]=T):T=e[43];let z;e[44]!==i.groupBy||e[45]!==N||e[46]!==T||e[47]!==y?(z=l.jsx("div",{className:O.filterTypeCol,children:l.jsx(Ne,{isGrouping:!0,options:y,placeholder:T,onSelect:N,selectedType:i.groupBy})}),e[44]=i.groupBy,e[45]=N,e[46]=T,e[47]=y,e[48]=z):z=e[48];let R;e[49]!==n?(R=n("sprintGrouping.orderPlaceholder"),e[49]=n,e[50]=R):R=e[50];let G;e[51]!==k||e[52]!==i.sortOrder||e[53]!==v||e[54]!==F||e[55]!==R?(G=l.jsx("div",{className:O.filterValueCol,children:l.jsx(hl,{options:F,placeholder:R,onSelect:v,selectedOrder:i.sortOrder,disabled:k})}),e[51]=k,e[52]=i.sortOrder,e[53]=v,e[54]=F,e[55]=R,e[56]=G):G=e[56];let L;e[57]!==z||e[58]!==G?(L=l.jsx("div",{className:O.filterRowMain,children:l.jsxs("div",{className:O.filterControls,children:[z,G]})}),e[57]=z,e[58]=G,e[59]=L):L=e[59];const M=c?void 0:B,V=c||k;let D;e[60]!==c?(D=c?{opacity:.5,cursor:"not-allowed"}:void 0,e[60]=c,e[61]=D):D=e[61];let U;e[62]===Symbol.for("react.memo_cache_sentinel")?(U=l.jsx(Ct,{size:18}),e[62]=U):U=e[62];let K;e[63]!==M||e[64]!==V||e[65]!==D?(K=l.jsx("div",{className:O.filterRowDelete,children:l.jsx(Ke,{variant:"subtle",color:"red",size:30,onClick:M,className:O.deleteButton,disabled:V,style:D,children:U})}),e[63]=M,e[64]=V,e[65]=D,e[66]=K):K=e[66];let H;e[67]!==L||e[68]!==K?(H=l.jsx(xe,{gap:8,children:l.jsx("div",{className:O.filterRow,children:l.jsxs("div",{className:O.filterRowContent,children:[L,K]})})}),e[67]=L,e[68]=K,e[69]=H):H=e[69];let W;return e[70]!==A||e[71]!==H?(W=l.jsxs(xe,{gap:0,children:[A,H]}),e[70]=A,e[71]=H,e[72]=W):W=e[72],W},gl={content:{borderBottomLeftRadius:0,borderBottomRightRadius:0},body:{paddingTop:8}},rt=s=>{const e=X.c(38),{groupBy:i,sortOrder:o,onGroupChange:t,isKanban:c}=s,{t:n}=se(),r=je("(max-width: 576px)"),[a,p]=E.useState(!1),u=E.useRef(!1);let h;e[0]!==i||e[1]!==o?(h=()=>({groupBy:i,sortOrder:o}),e[0]=i,e[1]=o,e[2]=h):h=e[2];const[f,g]=E.useState(h);let S,b;e[3]!==i||e[4]!==o?(S=()=>{u.current||g({groupBy:i,sortOrder:o}),u.current=!1},b=[i,o],e[3]=i,e[4]=o,e[5]=S,e[6]=b):(S=e[5],b=e[6]),E.useEffect(S,b);let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=()=>p(xl),e[7]=y):y=e[7];const I=y;let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=()=>p(!1),e[8]=d):d=e[8];const m=d;let x;e[9]!==r||e[10]!==t?(x=w=>{u.current=!0,g(w),t(w.groupBy,w.sortOrder),r&&m()},e[9]=r,e[10]=t,e[11]=x):x=e[11];const j=x;if(r){let w;e[12]!==i?(w=l.jsx(ee,{gap:8,justify:"flex-start",children:l.jsx(ot,{groupBy:i,handleToggle:I})}),e[12]=i,e[13]=w):w=e[13];let v;e[14]!==n?(v=n("sprintGrouping.title"),e[14]=n,e[15]=v):v=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C={opacity:.35,blur:2},e[16]=C):C=e[16];let B;e[17]!==f||e[18]!==j||e[19]!==c?(B=l.jsx(it,{groupings:f,onGroupingsChange:j,isMobileLayout:!0,isKanban:c}),e[17]=f,e[18]=j,e[19]=c,e[20]=B):B=e[20];let k;e[21]!==a||e[22]!==B||e[23]!==v?(k=l.jsx(Ye,{opened:a,onClose:m,position:"bottom",size:250,title:v,withCloseButton:!0,padding:"md",radius:"lg",overlayProps:C,styles:gl,children:B}),e[21]=a,e[22]=B,e[23]=v,e[24]=k):k=e[24];let A;return e[25]!==k||e[26]!==w?(A=l.jsxs(l.Fragment,{children:[w,k]}),e[25]=k,e[26]=w,e[27]=A):A=e[27],A}let F;e[28]!==i?(F=l.jsx(fe.Target,{children:l.jsx("div",{children:l.jsx(ot,{groupBy:i,handleToggle:I})})}),e[28]=i,e[29]=F):F=e[29];let _;e[30]!==f||e[31]!==j||e[32]!==c?(_=l.jsx(fe.Dropdown,{w:420,maw:"100%",px:16,pt:8,pb:16,children:l.jsx(it,{groupings:f,onGroupingsChange:j,isKanban:c})}),e[30]=f,e[31]=j,e[32]=c,e[33]=_):_=e[33];let N;return e[34]!==a||e[35]!==F||e[36]!==_?(N=l.jsxs(fe,{opened:a,onChange:p,position:"bottom-start",width:400,withinPortal:!1,children:[F,_]}),e[34]=a,e[35]=F,e[36]=_,e[37]=N):N=e[37],N};function xl(s){return!s}const jl="_sortButton_1x51a_1",bl="_active_1x51a_11",ct={sortButton:jl,active:bl},at=s=>{const e=X.c(17),{sortBy:i,sortByOrder:o,handleToggle:t}=s,{t:c}=se();let n;e[0]!==i||e[1]!==c?(n=c(i?`sprintSorting.${i}`:"sprintSorting.title"),e[0]=i,e[1]=c,e[2]=n):n=e[2];const r=n,a=i!==null;let p;e:{if(i===null){let y;e[3]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Wt,{size:16,color:"#31394A"}),e[3]=y):y=e[3],p=y;break e}if(o==="asc"){let y;e[4]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Ft,{size:16,color:"#339AF0"}),e[4]=y):y=e[4],p=y;break e}if(o==="desc"){let y;e[5]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Nt,{size:16,color:"#339AF0"}),e[5]=y):y=e[5],p=y;break e}p=void 0}const u=p,h=a&&ct.active;let f;e[6]!==h?(f=Te(ct.sortButton,h),e[6]=h,e[7]=f):f=e[7];let g;e[8]!==c?(g=c("sprintSorting.title"),e[8]=c,e[9]=g):g=e[9];let S;e[10]===Symbol.for("react.memo_cache_sentinel")?(S={inner:{justifyContent:"flex-start"}},e[10]=S):S=e[10];let b;return e[11]!==t||e[12]!==r||e[13]!==u||e[14]!==f||e[15]!==g?(b=l.jsx(Se,{variant:"default",size:"sm",className:f,"aria-label":g,styles:S,leftSection:u,onClick:t,children:r}),e[11]=t,e[12]=r,e[13]=u,e[14]=f,e[15]=g,e[16]=b):b=e[16],b},vl="_menuList_1vsp6_7",Sl="_menuItem_1vsp6_11",Me={menuList:vl,menuItem:Sl},dt=s=>{const e=X.c(38),{groupBy:i,sorting:o,onSortingChange:t,isMobileLayout:c}=s,{t:n}=se();let r;if(e[0]!==i||e[1]!==n){if(r=[],i!=="type"){let d;e[3]!==n?(d=n("sprintSorting.type"),e[3]=n,e[4]=d):d=e[4];let m;e[5]!==d?(m={value:"type",label:d,Icon:gt},e[5]=d,e[6]=m):m=e[6],r.push(m)}if(i!=="priority"){let d;e[7]!==n?(d=n("sprintSorting.priority"),e[7]=n,e[8]=d):d=e[8];let m;e[9]!==d?(m={value:"priority",label:d,Icon:At},e[9]=d,e[10]=m):m=e[10],r.push(m)}if(i!=="status"){let d;e[11]!==n?(d=n("sprintSorting.status"),e[11]=n,e[12]=d):d=e[12];let m;e[13]!==d?(m={value:"status",label:d,Icon:Ae},e[13]=d,e[14]=m):m=e[14],r.push(m)}if(i!=="performer"){let d;e[15]!==n?(d=n("sprintSorting.performer"),e[15]=n,e[16]=d):d=e[16];let m;e[17]!==d?(m={value:"performer",label:d,Icon:ze},e[17]=d,e[18]=m):m=e[18],r.push(m)}e[0]=i,e[1]=n,e[2]=r}else r=e[2];const a=r;let p;e[19]!==o?(p=d=>o.sortBy!==d?null:o.sortByOrder,e[19]=o,e[20]=p):p=e[20];const u=p;let h;e[21]!==u||e[22]!==a?(h=d=>{const m=u(d),x=a.find(j=>j.value===d);return x?m==="asc"?Ft:m==="desc"?Nt:x.Icon:null},e[21]=u,e[22]=a,e[23]=h):h=e[23];const f=h;let g;e[24]!==u||e[25]!==t?(g=d=>{const m=u(d);t(m===null?{sortBy:d,sortByOrder:"asc"}:m==="asc"?{sortBy:d,sortByOrder:"desc"}:{sortBy:null,sortByOrder:null})},e[24]=u,e[25]=t,e[26]=g):g=e[26];const S=g;let b;e[27]!==f||e[28]!==S||e[29]!==c||e[30]!==o?(b=d=>{const m=f(d.value),x=o.sortBy===d.value,j=l.jsxs(ee,{gap:10,justify:"space-between",style:{width:"100%"},wrap:"nowrap",children:[l.jsxs(ee,{gap:10,wrap:"nowrap",children:[l.jsx(ge,{w:20,h:20,justify:"center",style:{backgroundColor:x?"#E7F5FF":void 0,borderRadius:10},children:m&&l.jsx(m,{size:x?14:20,color:x?"#339AF0":void 0})}),l.jsx(te,{fz:14,children:d.label})]}),x&&l.jsx(Kt,{size:16,style:{opacity:.5}})]});return c?l.jsx(be,{className:Me.menuItem,"data-active":x,onClick:()=>S(d.value),style:{width:"100%"},children:j},d.value??"null"):l.jsx(Be.Item,{className:Me.menuItem,"data-active":x,onClick:()=>S(d.value),children:j},d.value??"null")},e[27]=f,e[28]=S,e[29]=c,e[30]=o,e[31]=b):b=e[31];const y=b;if(c){let d;return e[32]!==y||e[33]!==a?(d=l.jsx(xe,{gap:0,className:Me.menuList,children:a.map(y)}),e[32]=y,e[33]=a,e[34]=d):d=e[34],d}let I;return e[35]!==y||e[36]!==a?(I=l.jsx(l.Fragment,{children:a.map(y)}),e[35]=y,e[36]=a,e[37]=I):I=e[37],I},_l={content:{borderBottomLeftRadius:0,borderBottomRightRadius:0},body:{paddingTop:8}},ut=s=>{const e=X.c(40),{groupBy:i,sortBy:o,sortByOrder:t,onSortChange:c}=s,{t:n}=se(),r=je("(max-width: 576px)"),[a,p]=E.useState(!1),u=E.useRef(!1);let h;e[0]!==o||e[1]!==t?(h=()=>({sortBy:o,sortByOrder:t}),e[0]=o,e[1]=t,e[2]=h):h=e[2];const[f,g]=E.useState(h);let S,b;e[3]!==o||e[4]!==t?(S=()=>{u.current||g({sortBy:o,sortByOrder:t}),u.current=!1},b=[o,t],e[3]=o,e[4]=t,e[5]=S,e[6]=b):(S=e[5],b=e[6]),E.useEffect(S,b);let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=()=>p(Il),e[7]=y):y=e[7];const I=y;let d;e[8]===Symbol.for("react.memo_cache_sentinel")?(d=()=>p(!1),e[8]=d):d=e[8];const m=d;let x;e[9]!==r||e[10]!==c?(x=w=>{u.current=!0,g(w),c(w.sortBy,w.sortByOrder),r&&m()},e[9]=r,e[10]=c,e[11]=x):x=e[11];const j=x;if(r){let w;e[12]!==o||e[13]!==t?(w=l.jsx(at,{sortBy:o,sortByOrder:t,handleToggle:I}),e[12]=o,e[13]=t,e[14]=w):w=e[14];let v;e[15]!==n?(v=n("sprintSorting.title"),e[15]=n,e[16]=v):v=e[16];let C;e[17]===Symbol.for("react.memo_cache_sentinel")?(C={opacity:.35,blur:2},e[17]=C):C=e[17];let B;e[18]!==i||e[19]!==j||e[20]!==f?(B=l.jsx(dt,{groupBy:i,sorting:f,onSortingChange:j,isMobileLayout:!0}),e[18]=i,e[19]=j,e[20]=f,e[21]=B):B=e[21];let k;e[22]!==a||e[23]!==B||e[24]!==v?(k=l.jsx(Ye,{opened:a,onClose:m,position:"bottom",size:250,title:v,withCloseButton:!0,padding:"md",radius:"lg",overlayProps:C,styles:_l,children:B}),e[22]=a,e[23]=B,e[24]=v,e[25]=k):k=e[25];let A;return e[26]!==k||e[27]!==w?(A=l.jsxs(l.Fragment,{children:[w,k]}),e[26]=k,e[27]=w,e[28]=A):A=e[28],A}let F;e[29]!==o||e[30]!==t?(F=l.jsx(Be.Target,{children:l.jsx("div",{children:l.jsx(at,{sortBy:o,sortByOrder:t,handleToggle:I})})}),e[29]=o,e[30]=t,e[31]=F):F=e[31];let _;e[32]!==i||e[33]!==j||e[34]!==f?(_=l.jsx(Be.Dropdown,{w:260,px:0,py:8,children:l.jsx(dt,{groupBy:i,sorting:f,onSortingChange:j})}),e[32]=i,e[33]=j,e[34]=f,e[35]=_):_=e[35];let N;return e[36]!==a||e[37]!==F||e[38]!==_?(N=l.jsxs(Be,{opened:a,onChange:p,position:"bottom-start",withinPortal:!1,closeOnItemClick:!1,children:[F,_]}),e[36]=a,e[37]=F,e[38]=_,e[39]=N):N=e[39],N};function Il(s){return!s}const zt=s=>{const e=X.c(15),{option:i,selected:o,onToggle:t}=s;let c;e[0]!==i.node?(c=l.jsx("div",{className:O.optionLabel,children:i.node}),e[0]=i.node,e[1]=c):c=e[1];let n;e[2]!==t?(n=h=>{h.stopPropagation(),t()},e[2]=t,e[3]=n):n=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r={input:{cursor:"pointer"}},e[4]=r):r=e[4];let a;e[5]!==o||e[6]!==n?(a=l.jsx(Tt,{checked:o,onChange:wl,onClick:n,size:"sm",styles:r}),e[5]=o,e[6]=n,e[7]=a):a=e[7];let p;e[8]!==c||e[9]!==a?(p=l.jsxs(ee,{justify:"space-between",align:"center",gap:12,wrap:"nowrap",children:[c,a]}),e[8]=c,e[9]=a,e[10]=p):p=e[10];let u;return e[11]!==t||e[12]!==i.value||e[13]!==p?(u=l.jsx(be,{className:O.option,onClick:t,children:p},i.value),e[11]=t,e[12]=i.value,e[13]=p,e[14]=u):u=e[14],u};function wl(){}const Cl={[ye.IStatusType.BeExecuted]:10,[ye.IStatusType.Active]:20,[ye.IStatusType.Done]:30,[ye.IStatusType.Closed]:40},Fl=(s,e)=>{const i={[ye.IStatusType.BeExecuted]:[],[ye.IStatusType.Active]:[],[ye.IStatusType.Done]:[],[ye.IStatusType.Closed]:[]},o=s.reduce((t,c)=>{let n=c.Type===ye.IStatusType.Custom?ye.IStatusType.BeExecuted:c.Type;if(n===ye.IStatusType.NotStarted&&(n=ye.IStatusType.BeExecuted),ds.includes(n)){const r=e.find(a=>a.value===c.Id.toString());if(r){const a=t[n]??[];a.push({status:c,option:r}),t[n]=a}}return t},i);return Object.entries(o).map(([t,c=[]])=>{const n=Number(t);return{type:n,order:Cl[n]??0,items:c.sort((r,a)=>r.status.Order-a.status.Order)}}).filter(t=>t.items.length>0).sort((t,c)=>t.order-c.order)},Tl=s=>{const e=X.c(22),{options:i,statuses:o,draft:t,setDraft:c,normalizedQuery:n}=s,{t:r}=se();let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];const[p,u]=E.useState(a);let h;if(e[1]!==n||e[2]!==i||e[3]!==o||e[4]!==r){e:{const x=Fl(o,i);if(n){let j;e[6]!==n||e[7]!==r?(j=F=>{const N=r(`enum.statusType.${F.type}`).toLowerCase().includes(n),w=F.items.filter(v=>{var C;return(C=v.option.searchText)==null?void 0:C.toLowerCase().includes(n)});return N||w.length>0?{...F,items:N?F.items:w}:null},e[6]=n,e[7]=r,e[8]=j):j=e[8],h=x.map(j).filter(kl);break e}h=x.length?x:null}e[1]=n,e[2]=i,e[3]=o,e[4]=r,e[5]=h}else h=e[5];const f=h;let g;e:{if(!n||!f){g=p;break e}let x;e[9]!==p||e[10]!==f?(x={...p},f.forEach(j=>{x[j.type]=!0}),e[9]=p,e[10]=f,e[11]=x):x=e[11],g=x}const S=g;let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=x=>{u(j=>({...j,[x]:!j[x]}))},e[12]=b):b=e[12];const y=b;let I;e[13]!==c?(I=x=>{c(j=>j.includes(x)?j.filter(F=>F!==x):[...j,x])},e[13]=c,e[14]=I):I=e[14];const d=I;let m;return e[15]!==t||e[16]!==S||e[17]!==c||e[18]!==f||e[19]!==r||e[20]!==d?(m=l.jsx(kt,{type:"hover",children:f&&f.length>0?l.jsx("div",{className:O.optionList,children:f.map(x=>{const j=!!S[x.type],F=x.items.map(Bl),_=F.every(v=>t.includes(v.value)),N=F.some(v=>t.includes(v.value)),w=()=>{c(_?v=>v.filter(C=>!F.some(B=>B.value===C)):v=>{const C=F.map(Nl).filter(B=>!v.includes(B));return[...v,...C]})};return l.jsxs("div",{children:[l.jsx(be,{className:O.option,onClick:()=>y(x.type),style:{padding:"8px 16px"},children:l.jsxs(ee,{justify:"space-between",align:"center",gap:12,wrap:"nowrap",children:[l.jsxs(ee,{gap:8,align:"center",wrap:"nowrap",children:[l.jsx(Ke,{size:20,variant:"transparent",color:"#343A40",onClick:v=>{v.stopPropagation(),y(x.type)},children:j?l.jsx(Pe,{size:20}):l.jsx(Yt,{size:20})}),l.jsx(te,{fz:14,fw:400,c:"#343A40",children:r(`enum.statusType.${x.type}`)})]}),l.jsx(Tt,{checked:_,indeterminate:N&&!_,onChange:Al,onClick:v=>{v.stopPropagation(),w()},size:"sm",styles:{input:{cursor:"pointer"}}})]})}),l.jsx(Dt,{in:j,children:x.items.map(v=>{const C=t.includes(v.option.value);return l.jsx("div",{style:{paddingLeft:"40px"},children:l.jsx(zt,{option:v.option,selected:C,onToggle:()=>d(v.option.value)})},v.option.value)})})]},x.type)})}):l.jsx(ge,{mih:120,justify:"center",align:"center",children:l.jsx(te,{c:"gray.6",size:"sm",children:r("sprintFilters.empty")})})}),e[15]=t,e[16]=S,e[17]=c,e[18]=f,e[19]=r,e[20]=d,e[21]=m):m=e[21],m};function kl(s){return s!==null&&s.items.length>0}function Bl(s){return s.option}function Nl(s){return s.value}function Al(){}const zl=s=>{const e=X.c(48),{options:i,draft:o,setDraft:t,searchable:c,loading:n,searchPlaceholder:r,type:a,statuses:p}=s,{t:u}=se(),[h,f]=E.useState("");let g;e[0]!==h?(g=h.trim().toLowerCase(),e[0]=h,e[1]=g):g=e[1];const S=g;let b;e:{if(!S){b=i;break e}let T;if(e[2]!==S||e[3]!==i){let z;e[5]!==S?(z=R=>{var G;return(G=R.searchText)==null?void 0:G.includes(S)},e[5]=S,e[6]=z):z=e[6],T=i.filter(z),e[2]=S,e[3]=i,e[4]=T}else T=e[4];b=T}const y=b;let I;e[7]!==t?(I=T=>{t(z=>z.includes(T)?z.filter(R=>R!==T):[...z,T])},e[7]=t,e[8]=I):I=e[8];const d=I;let m;e[9]!==o||e[10]!==y?(m=y.length>0&&y.every(T=>o.includes(T.value)),e[9]=o,e[10]=y,e[11]=m):m=e[11];const x=m;let j;e[12]!==y||e[13]!==x||e[14]!==t?(j=()=>{t(x?[]:y.map(Ol))},e[12]=y,e[13]=x,e[14]=t,e[15]=j):j=e[15];const F=j;let _;e[16]!==h||e[17]!==r||e[18]!==c?(_=c&&l.jsx(qt,{value:h,onChange:T=>f(T.currentTarget.value),placeholder:r,size:"xs",radius:4,className:O.searchInput,mb:4}),e[16]=h,e[17]=r,e[18]=c,e[19]=_):_=e[19];const N=`sprintFilters.valuePlural.${a}`;let w;e[20]!==u||e[21]!==N?(w=u(N),e[20]=u,e[21]=N,e[22]=w):w=e[22];let v;e[23]!==w?(v=l.jsx(te,{fz:11,c:"gray.6",fw:400,tt:"uppercase",children:w}),e[23]=w,e[24]=v):v=e[24];let C;e[25]!==y.length||e[26]!==F||e[27]!==x||e[28]!==u?(C=y.length>0&&l.jsx(be,{onClick:F,className:O.selectAllButton,children:l.jsx(te,{fz:12,c:"blue.6",fw:500,children:u(x?"sprintFilters.deselectAll":"sprintFilters.selectAll")})}),e[25]=y.length,e[26]=F,e[27]=x,e[28]=u,e[29]=C):C=e[29];let B;e[30]!==C||e[31]!==v?(B=l.jsxs("div",{className:O.dropdownHeader,children:[v,C]}),e[30]=C,e[31]=v,e[32]=B):B=e[32];let k;e[33]!==o||e[34]!==y||e[35]!==n||e[36]!==S||e[37]!==i||e[38]!==t||e[39]!==p||e[40]!==u||e[41]!==d||e[42]!==a?(k=n&&!i.length?l.jsx(ge,{mih:120,justify:"center",align:"center",children:l.jsx(Xt,{size:20})}):a==="status"&&p?l.jsx(Tl,{options:i,statuses:p,draft:o,setDraft:t,normalizedQuery:S}):l.jsx(kt,{type:"hover",children:y.length?l.jsx("div",{className:O.optionList,children:y.map(T=>{const z=o.includes(T.value);return l.jsx(zt,{option:T,selected:z,onToggle:()=>d(T.value)},T.value)})}):l.jsx(ge,{mih:120,justify:"center",align:"center",children:l.jsx(te,{c:"gray.6",size:"sm",children:u("sprintFilters.empty")})})}),e[33]=o,e[34]=y,e[35]=n,e[36]=S,e[37]=i,e[38]=t,e[39]=p,e[40]=u,e[41]=d,e[42]=a,e[43]=k):k=e[43];let A;return e[44]!==B||e[45]!==k||e[46]!==_?(A=l.jsxs(xe,{gap:0,children:[_,B,k]}),e[44]=B,e[45]=k,e[46]=_,e[47]=A):A=e[47],A};function Ol(s){return s.value}const Ee=5,pt=9,Pl=s=>{const e=X.c(90),{filter:i,filterOption:o,options:t,loading:c,searchable:n,searchPlaceholder:r,onValuesChange:a,taskTypes:p,statuses:u,projectUsers:h}=s;let f;e[0]!==p?(f=p===void 0?[]:p,e[0]=p,e[1]=f):f=e[1];const g=f;let S;e[2]!==u?(S=u===void 0?[]:u,e[2]=u,e[3]=S):S=e[3];const b=S;let y;e[4]!==h?(y=h===void 0?[]:h,e[4]=h,e[5]=y):y=e[5];const I=y,{t:d}=se(),[m,x]=E.useState(!1),[j,F]=E.useState(i.values),_=je("(max-width: 576px)");let N,w;e[6]!==i.values||e[7]!==m?(N=()=>{m||F(i.values)},w=[m,i.values],e[6]=i.values,e[7]=m,e[8]=N,e[9]=w):(N=e[8],w=e[9]),E.useEffect(N,w);let v;e[10]!==j||e[11]!==i.type||e[12]!==a?(v=()=>{i.type&&(a(i.type,j,!0),x(!1))},e[10]=j,e[11]=i.type,e[12]=a,e[13]=v):v=e[13];const C=v,B=i.values.length;let k;e[14]!==t?(k=t.map($l),e[14]=t,e[15]=k):k=e[15];const A=k,T=_?20:16,z=_?20:18;let R;e:{if(!i.values.length){R=null;break e}if(["author","performer"].includes(o.type)){let q;if(e[16]!==z||e[17]!==i.values||e[18]!==I||e[19]!==d){let Q;e[21]!==z||e[22]!==I||e[23]!==d?(Q=Y=>{if(Y==="-1")return l.jsx(Ce,{label:d("members.notAssigned"),withArrow:!0,children:l.jsx(vt,{size:z})},Y);const J=I.find(me=>me.Id.toString()===Y);return J?l.jsx(It,{size:z,user:J},Y):null},e[21]=z,e[22]=I,e[23]=d,e[24]=Q):Q=e[24],q=i.values.slice(0,pt).map(Q),e[16]=z,e[17]=i.values,e[18]=I,e[19]=d,e[20]=q}else q=e[20];let $;e[25]!==z||e[26]!==i.values.length?($=i.values.length>pt&&l.jsx(Ve,{style:{borderColor:"#4DABF7",background:"#FFFFFF"},size:z,color:"#4DABF7",children:"..."}),e[25]=z,e[26]=i.values.length,e[27]=$):$=e[27];let P;e[28]!==q||e[29]!==$?(P=l.jsxs(Ve.Group,{spacing:7,children:[q,$]}),e[28]=q,e[29]=$,e[30]=P):P=e[30],R=P;break e}let ne;if(e[31]!==i.values||e[32]!==o.type||e[33]!==T||e[34]!==b||e[35]!==d||e[36]!==g){let q;e[38]!==o.type||e[39]!==T||e[40]!==b||e[41]!==d||e[42]!==g?(q=$=>{switch(o.type){case"status":{const P=b.find(Q=>Q.Id.toString()===$);return P?l.jsx(Ce,{label:P.Name,children:l.jsx(jt,{status:P,withLabel:!1,filled:!1,iconSize:T},$)},P.Name):null}case"priority":{const P=Number($);return l.jsx(Ce,{label:d("taskPriorities."+P),children:l.jsx(bt,{priority:P,withLabel:!1,iconSize:T},$)},P)}case"type":{const P=g==null?void 0:g.find(Q=>Q.Id.toString()===$);return P?l.jsx(Ce,{label:P.Name,children:l.jsx(xt,{type:P,withLabel:!1,iconSize:T},$)},P.Name):null}default:return null}},e[38]=o.type,e[39]=T,e[40]=b,e[41]=d,e[42]=g,e[43]=q):q=e[43],ne=i.values.slice(0,Ee).map(q).filter(Boolean),e[31]=i.values,e[32]=o.type,e[33]=T,e[34]=b,e[35]=d,e[36]=g,e[37]=ne}else ne=e[37];let pe;e[44]!==i.values.length?(pe=i.values.length>Ee?l.jsx(te,{fz:12,c:"#343A40",children:`+${i.values.length-Ee}`}):null,e[44]=i.values.length,e[45]=pe):pe=e[45];let ce;e[46]!==ne||e[47]!==pe?(ce=l.jsxs(l.Fragment,{children:[ne,pe]}),e[46]=ne,e[47]=pe,e[48]=ce):ce=e[48],R=ce}const G=R,L=_?"100%":175,M=_?16:12,V=_?"20px":"16px",D=i.type&&["performer","author"].includes(i.type)?300:260;let U;e[49]===Symbol.for("react.memo_cache_sentinel")?(U=()=>x(Ll),e[49]=U):U=e[49];let K;e[50]!==A.length||e[51]!==o.type||e[52]!==o.valueName||e[53]!==M||e[54]!==V||e[55]!==B||e[56]!==G||e[57]!==d?(K=A.length===B?l.jsx(te,{fz:M,lh:V,c:"#343A40",children:d(`sprintFilters.allValue.${o.type}`)}):B>0&&G?l.jsx(ee,{gap:4,align:"center",wrap:"nowrap",className:O.chipIcons,style:{flex:1},children:G}):l.jsx(te,{fz:M,lh:V,truncate:"end",c:"#A4B0C2E5",style:{flex:1},children:o.valueName}),e[50]=A.length,e[51]=o.type,e[52]=o.valueName,e[53]=M,e[54]=V,e[55]=B,e[56]=G,e[57]=d,e[58]=K):K=e[58];let H;e[59]===Symbol.for("react.memo_cache_sentinel")?(H=l.jsx(ge,{gap:0,ml:"auto",children:l.jsx(Pe,{size:16})}),e[59]=H):H=e[59];let W;e[60]!==K?(W=l.jsxs(ee,{gap:8,align:"center",wrap:"nowrap",w:"100%",children:[K,H]}),e[60]=K,e[61]=W):W=e[61];let Z;e[62]!==L||e[63]!==m||e[64]!==W?(Z=l.jsx(fe.Target,{children:l.jsx(be,{className:O.chip,size:32,w:L,"data-opened":m,onClick:U,children:W})}),e[62]=L,e[63]=m,e[64]=W,e[65]=Z):Z=e[65];const he=o.type==="status"?b:void 0;let re;e[66]!==j||e[67]!==o.type||e[68]!==c||e[69]!==t||e[70]!==r||e[71]!==n||e[72]!==he?(re=l.jsx(zl,{options:t,draft:j,setDraft:F,searchable:n,loading:c,searchPlaceholder:r,type:o.type,statuses:he}),e[66]=j,e[67]=o.type,e[68]=c,e[69]=t,e[70]=r,e[71]=n,e[72]=he,e[73]=re):re=e[73];let oe;e[74]!==d?(oe=d("sprintFilters.apply"),e[74]=d,e[75]=oe):oe=e[75];let le;e[76]!==C||e[77]!==oe?(le=l.jsx("div",{className:O.dropdownFooter,children:l.jsx(Se,{size:"xs",onClick:C,className:O.applyButton,children:oe})}),e[76]=C,e[77]=oe,e[78]=le):le=e[78];let ie;e[79]!==re||e[80]!==le?(ie=l.jsxs(xe,{gap:0,children:[re,le]}),e[79]=re,e[80]=le,e[81]=ie):ie=e[81];let de;e[82]!==D||e[83]!==ie?(de=l.jsx(fe.Dropdown,{w:D,className:O.dropdown,onClick:Rl,children:ie}),e[82]=D,e[83]=ie,e[84]=de):de=e[84];let ue;return e[85]!==_||e[86]!==m||e[87]!==Z||e[88]!==de?(ue=l.jsx("div",{className:O.chipWrapper,children:l.jsxs(fe,{opened:m,onChange:x,position:"bottom-start",withinPortal:_,shadow:"md",children:[Z,de]})}),e[85]=_,e[86]=m,e[87]=Z,e[88]=de,e[89]=ue):ue=e[89],ue};function $l(s){return s.value}function Ll(s){return!s}function Rl(s){return s.stopPropagation()}const ft=s=>{const e=X.c(78),{sprint:i,project:o,filters:t,onFiltersChange:c,onApply:n,performerIds:r}=s;let a;e[0]!==r?(a=r===void 0?[]:r,e[0]=r,e[1]=a):a=e[1];const p=a,{t:u}=se(),h=je("(max-width: 576px)"),{taskTypes:f,statuses:g,projectUsers:S,filterTypeOptions:b,typeOptions:y,statusOptions:I,priorityOptions:d,performerOptions:m,userOptionsList:x,canAddFilter:j,allFiltersHaveValues:F,isTaskTypesLoading:_,isStatusesLoading:N,isUsersLoading:w,buildPayload:v}=ys(i,o,t,p);let C;e[2]!==t?(C=t.map(Gl).filter(Boolean),e[2]=t,e[3]=C):C=e[3];const B=C;let k;if(e[4]!==b||e[5]!==B){let $;e[7]!==B?($=P=>!B.includes(P.type),e[7]=B,e[8]=$):$=e[8],k=b.filter($),e[4]=b,e[5]=B,e[6]=k}else k=e[6];const A=k;let T;e[9]!==b||e[10]!==t?(T=$=>{const P=t.map((Q,Y)=>Y!==$?Q.type:null).filter(Boolean);return b.filter(Q=>!P.includes(Q.type))},e[9]=b,e[10]=t,e[11]=T):T=e[11];const z=T;let R;e[12]!==v||e[13]!==n||e[14]!==c?(R=$=>{c(P=>{const Q=P.filter((Y,J)=>J!==$);return n==null||n(v(Q),!1),Q})},e[12]=v,e[13]=n,e[14]=c,e[15]=R):R=e[15];const G=R;let L;e[16]!==j||e[17]!==c?(L=()=>{j&&c(Ml)},e[16]=j,e[17]=c,e[18]=L):L=e[18];const M=L;let V;e[19]!==c?(V=$=>{c(P=>[...P,{type:$,values:[]}])},e[19]=c,e[20]=V):V=e[20];const D=V;let U;e[21]!==c?(U=($,P)=>{const Q=P===void 0?0:P;c(Y=>Y.map((J,me)=>me===Q?{type:$,values:[]}:J))},e[21]=c,e[22]=U):U=e[22];const K=U;let H;e[23]!==v||e[24]!==t||e[25]!==n||e[26]!==c?(H=($,P,Q)=>{const Y=t.map(J=>J.type===$?{...J,values:P}:J);c(Y),Q&&(n==null||n(v(Y),!1))},e[23]=v,e[24]=t,e[25]=n,e[26]=c,e[27]=H):H=e[27];const W=H;let Z;e[28]!==n||e[29]!==c?(Z=()=>{c([]),n==null||n(Fe,!1)},e[28]=n,e[29]=c,e[30]=Z):Z=e[30];const he=Z;let re;e[31]!==A||e[32]!==b||e[33]!==z||e[34]!==W||e[35]!==G||e[36]!==K||e[37]!==N||e[38]!==_||e[39]!==w||e[40]!==m||e[41]!==d||e[42]!==S||e[43]!==I||e[44]!==g||e[45]!==u||e[46]!==f||e[47]!==y||e[48]!==x?(re=($,P)=>{const Q=$.type?b.find(_e=>_e.type===$.type):null;let Y=[],J=!1,me=!1;if($.type)e:switch($.type){case"type":{Y=y,J=_;break e}case"status":{Y=I,J=N,me=!0;break e}case"priority":{Y=d;break e}case"performer":{Y=m,J=w,me=!0;break e}case"author":{Y=x,J=w,me=!0;break e}}return l.jsx("div",{className:O.filterRow,children:l.jsxs("div",{className:O.filterRowContent,children:[l.jsx("div",{className:O.filterRowMain,children:$.type?Q?l.jsxs("div",{className:O.filterControls,children:[l.jsx("div",{className:O.filterTypeCol,children:l.jsx(Ne,{id:P,options:z(P),placeholder:Q.label,onSelect:K,selectedType:$.type})}),l.jsx("div",{className:O.filterValueCol,children:l.jsx(Pl,{filter:$,filterOption:Q,options:Y,taskTypes:f??[],statuses:g??[],projectUsers:S,loading:J,searchable:me,searchPlaceholder:u("sprintFilters.search"),onValuesChange:W})})]}):null:l.jsx(Ne,{id:P,options:A,placeholder:u("sprintFilters.placeholder"),onSelect:K})}),$.type&&l.jsx("div",{className:O.filterRowDelete,children:l.jsx(Ke,{variant:"subtle",color:"red",size:30,onClick:()=>G(P),className:O.deleteButton,children:l.jsx(Ct,{size:18})})})]})},P)},e[31]=A,e[32]=b,e[33]=z,e[34]=W,e[35]=G,e[36]=K,e[37]=N,e[38]=_,e[39]=w,e[40]=m,e[41]=d,e[42]=S,e[43]=I,e[44]=g,e[45]=u,e[46]=f,e[47]=y,e[48]=x,e[49]=re):re=e[49];const oe=re;let le;e[50]!==h||e[51]!==u?(le=!h&&l.jsx(te,{size:"sm",className:O.title,children:u("sprintFilters.title")}),e[50]=h,e[51]=u,e[52]=le):le=e[52];let ie;e[53]!==b||e[54]!==t||e[55]!==D||e[56]!==oe||e[57]!==u?(ie=t.length>0?l.jsx(xe,{gap:8,children:t.map(($,P)=>oe($,P))}):l.jsx("div",{className:O.filterRow,children:l.jsx(Ne,{options:b,placeholder:u("sprintFilters.placeholder"),onSelect:D})}),e[53]=b,e[54]=t,e[55]=D,e[56]=oe,e[57]=u,e[58]=ie):ie=e[58];const de=h?8:5;let ue;e[59]!==F||e[60]!==j||e[61]!==M||e[62]!==u?(ue=j&&l.jsx(Se,{variant:"default",size:"compact-md",leftSection:l.jsx(wt,{size:15}),className:O.addButton,onClick:M,disabled:!F,children:u("sprintFilters.add")}),e[59]=F,e[60]=j,e[61]=M,e[62]=u,e[63]=ue):ue=e[63];let ne;e[64]!==ue?(ne=l.jsx(Zt,{children:ue}),e[64]=ue,e[65]=ne):ne=e[65];let pe;e[66]!==t.length||e[67]!==he||e[68]!==u?(pe=t.length>0&&l.jsx(ge,{justify:"flex-end",children:l.jsx(Se,{variant:"subtle",size:"compact-md",className:O.resetButton,onClick:he,color:"red",children:u("sprintFilters.deleteAll")})}),e[66]=t.length,e[67]=he,e[68]=u,e[69]=pe):pe=e[69];let ce;e[70]!==de||e[71]!==ne||e[72]!==pe?(ce=l.jsxs(ge,{my:de,justify:"space-between",children:[ne,pe]}),e[70]=de,e[71]=ne,e[72]=pe,e[73]=ce):ce=e[73];let q;return e[74]!==le||e[75]!==ie||e[76]!==ce?(q=l.jsxs(xe,{gap:0,children:[le,ie,ce]}),e[74]=le,e[75]=ie,e[76]=ce,e[77]=q):q=e[77],q};function Gl(s){return s.type}function Ml(s){return[...s,{values:[]}]}const ht=s=>{const e=X.c(24),{filters:i,handleToggleFilters:o,resetFilters:t}=s,{t:c}=se(),[n,r]=E.useState(!1);let a;e[0]!==i?(a=i.filter(El),e[0]=i,e[1]=a):a=e[1];const p=a.length,u=p&&O.active;let h;e[2]!==u?(h=Te(O.filterButton,u),e[2]=u,e[3]=h):h=e[3];let f;e[4]!==c?(f=c("sprintFilters.title"),e[4]=c,e[5]=f):f=e[5];let g;e[6]===Symbol.for("react.memo_cache_sentinel")?(g={inner:{justifyContent:"flex-start"}},e[6]=g):g=e[6];const S=p?"#339AF0":"#31394A";let b;e[7]!==S?(b=l.jsx(hs,{size:16,color:S}),e[7]=S,e[8]=b):b=e[8];let y;e[9]!==p||e[10]!==n||e[11]!==t?(y=n&&p?l.jsx(Jt,{size:16,onClick:j=>{t(),j.stopPropagation()}}):p>0&&l.jsx(te,{className:O.activeFilters,children:p}),e[9]=p,e[10]=n,e[11]=t,e[12]=y):y=e[12];let I,d;e[13]===Symbol.for("react.memo_cache_sentinel")?(d=()=>r(!0),I=()=>r(!1),e[13]=I,e[14]=d):(I=e[13],d=e[14]);let m;e[15]!==c?(m=c("sprintFilters.title"),e[15]=c,e[16]=m):m=e[16];let x;return e[17]!==o||e[18]!==m||e[19]!==h||e[20]!==f||e[21]!==b||e[22]!==y?(x=l.jsx(Se,{variant:"default",size:"sm",className:h,"aria-label":f,styles:g,leftSection:b,rightSection:y,onMouseEnter:d,onMouseLeave:I,onClick:o,children:m}),e[17]=o,e[18]=m,e[19]=h,e[20]=f,e[21]=b,e[22]=y,e[23]=x):x=e[23],x};function El(s){return s.values.length>0}const mt=s=>{const e=X.c(43),{sprint:i,project:o,filters:t,onFiltersChange:c,onApply:n,resetFilters:r,performerIds:a}=s;let p;e[0]!==a?(p=a===void 0?[]:a,e[0]=a,e[1]=p):p=e[1];const u=p,{t:h}=se(),f=je("(max-width: 576px)"),[g,S]=E.useState(!1);let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=()=>S(Ul),e[2]=b):b=e[2];const y=b;let I;e[3]===Symbol.for("react.memo_cache_sentinel")?(I=()=>S(!1),e[3]=I):I=e[3];const d=I;let m;e[4]!==n?(m=(v,C)=>{n(v,C),C&&d()},e[4]=n,e[5]=m):m=e[5];const x=m;let j;e[6]!==r?(j=()=>{r(),d()},e[6]=r,e[7]=j):j=e[7];const F=j;if(f){let v;e[8]!==t||e[9]!==F?(v=l.jsx(ee,{gap:8,justify:"flex-start",children:l.jsx(ht,{filters:t,handleToggleFilters:y,resetFilters:F})}),e[8]=t,e[9]=F,e[10]=v):v=e[10];let C;e[11]!==h?(C=h("sprintFilters.title"),e[11]=h,e[12]=C):C=e[12];let B,k;e[13]===Symbol.for("react.memo_cache_sentinel")?(k={opacity:.35,blur:2},B={content:{borderBottomLeftRadius:0,borderBottomRightRadius:0},body:{paddingTop:8}},e[13]=B,e[14]=k):(B=e[13],k=e[14]);let A;e[15]!==t||e[16]!==x||e[17]!==c||e[18]!==u||e[19]!==o||e[20]!==i?(A=l.jsx(ft,{sprint:i,project:o,filters:t,onFiltersChange:c,onApply:x,performerIds:u}),e[15]=t,e[16]=x,e[17]=c,e[18]=u,e[19]=o,e[20]=i,e[21]=A):A=e[21];let T;e[22]!==g||e[23]!==A||e[24]!==C?(T=l.jsx(Ye,{opened:g,onClose:d,position:"bottom",size:"70%",title:C,withCloseButton:!0,padding:"md",radius:"lg",overlayProps:k,styles:B,children:A}),e[22]=g,e[23]=A,e[24]=C,e[25]=T):T=e[25];let z;return e[26]!==T||e[27]!==v?(z=l.jsxs(l.Fragment,{children:[v,T]}),e[26]=T,e[27]=v,e[28]=z):z=e[28],z}let _;e[29]!==t||e[30]!==F?(_=l.jsx(fe.Target,{children:l.jsx("div",{children:l.jsx(ht,{filters:t,handleToggleFilters:y,resetFilters:F})})}),e[29]=t,e[30]=F,e[31]=_):_=e[31];let N;e[32]!==t||e[33]!==x||e[34]!==c||e[35]!==u||e[36]!==o||e[37]!==i?(N=l.jsx(fe.Dropdown,{w:420,maw:"100%",px:16,py:8,children:l.jsx(ft,{sprint:i,project:o,filters:t,onFiltersChange:c,onApply:x,performerIds:u})}),e[32]=t,e[33]=x,e[34]=c,e[35]=u,e[36]=o,e[37]=i,e[38]=N):N=e[38];let w;return e[39]!==g||e[40]!==_||e[41]!==N?(w=l.jsxs(fe,{opened:g,onChange:S,position:"bottom-start",width:400,withinPortal:!1,children:[_,N]}),e[39]=g,e[40]=_,e[41]=N,e[42]=w):w=e[42],w};function Ul(s){return!s}const on=({sprintData:s,search:e,setSearch:i,performerIds:o,setPerformerIds:t,loading:c,onFiltersApply:n,filters:r,setFilters:a})=>{const p=Bt(),u=es(s.rootProjectId),h=ts(),f=!!et(tt.sprintTimeline,h.pathname),g=!!et(tt.sprintKanban,h.pathname),S=je("(max-width: 768px)"),b=je("(max-width: 576px)"),{project:y}=_t(s.ProjectId),{data:I}=ss.useGetCountersQuery(),d=E.useMemo(()=>ls(I,["Id",s.Id]),[I,s.Id]),m=((d==null?void 0:d.TotalCount)??0)>0,x=r.length>0,j=m||x,F=!b||m,_=we(L=>{var M;return(M=L.settingsSlice.sprints)==null?void 0:M[s.Id]}),N=_==null?void 0:_.groupBy,w=g?N??"status":N===void 0?"status":N,v=(_==null?void 0:_.sortOrder)??"asc",C=(_==null?void 0:_.sortBy)??null,B=(_==null?void 0:_.sortByOrder)??"asc";E.useEffect(()=>{a([])},[s.Id,a]),E.useEffect(()=>{(o==null?void 0:o.length)>0&&a(L=>L.some(V=>V.type==="performer")?L.filter(V=>V.type!=="performer"):L)},[o]);const k=E.useCallback(L=>{n(L)},[n]),A=E.useCallback((L,M)=>{p(He({sprintId:s.Id.toString(),settings:{groupBy:L,sortOrder:M}}))},[p,s.Id]),T=E.useCallback((L,M)=>{p(He({sprintId:s.Id.toString(),settings:{sortBy:L,sortByOrder:M}}))},[p,s.Id]),z=E.useCallback(L=>{t(L),a([]),k(Fe)},[t,a,k]),R=E.useCallback(()=>{a([]),k(Fe)},[a,k]),G=E.useMemo(()=>l.jsxs(l.Fragment,{children:[(y==null?void 0:y.rootProjectId)&&l.jsx(zs,{projectId:y.rootProjectId,selected:o,onSelect:z}),F&&l.jsx(Ps,{sprint:s,canCreate:u.tasks.create}),!f&&l.jsx(is,{})]}),[u.tasks.create,f,o,y==null?void 0:y.rootProjectId,z,s,F]);return S?l.jsx(xe,{gap:12,children:l.jsxs(xe,{gap:12,children:[l.jsxs(ee,{gap:8,align:"center",wrap:"nowrap",justify:"space-between",children:[l.jsx(st,{value:e,onChange:i,loading:c,size:"sm",style:{maxWidth:"300px",minWidth:0,flexShrink:1}}),l.jsx(ee,{gap:8,align:"center",wrap:"nowrap",children:G})]}),j&&l.jsxs(ge,{style:{overflow:"auto"},children:[l.jsx(ut,{groupBy:f?null:w,sortBy:C,sortByOrder:B,onSortChange:T}),!f&&l.jsx(rt,{groupBy:w,sortOrder:v,onGroupChange:A,isKanban:g}),l.jsx(mt,{sprint:s,project:y,filters:r,onFiltersChange:a,onApply:k,resetFilters:R,performerIds:o})]})]})}):l.jsxs(ee,{justify:"space-between",gap:16,align:"center",children:[l.jsx(ee,{style:{gap:"16px 24px"},flex:1,children:l.jsx(st,{value:e,onChange:i,loading:c})}),l.jsxs(ee,{gap:12,align:"center",wrap:"nowrap",children:[j&&l.jsxs(l.Fragment,{children:[l.jsx(ut,{groupBy:f?null:w,sortBy:C,sortByOrder:B,onSortChange:T}),!f&&l.jsx(rt,{groupBy:w,sortOrder:v,onGroupChange:A,isKanban:g}),l.jsx(mt,{sprint:s,project:y,filters:r,onFiltersChange:a,onApply:k,resetFilters:R,performerIds:o})]}),G]})]})},Vl=s=>Ue.useGetAvailableStatusesQuery({entityType:(s==null?void 0:s.statusesEntityType)||0,entityIds:[(s==null?void 0:s.statusesEntityId)||0]},{skip:!s}),rn=({sprintData:s,projectData:e})=>{const i=Bt(),o=we(m=>m.usersCache.currentUser.Id),t=we(m=>{var x,j;return((j=(x=m.settingsSlice.sprints)==null?void 0:x[s.Id])==null?void 0:j.performerIds)??Hl}),[c,n]=ns(""),[r,a]=E.useState(Fe),{groupedBySprint:p,error:u,isError:h,isLoading:f,isFetching:g,isSearching:S}=us({sprintId:s.Id,...r,performerIds:r.performerIds.length?r.performerIds:t,search:c}),b=E.useMemo(()=>S||!!t.length||Object.values(r).some(m=>m.length),[r,S,t.length]),y=E.useMemo(()=>p[s.Id]??[],[p,s.Id]),I=E.useCallback(m=>{i(He({sprintId:s.Id.toString(),settings:{performerIds:m}}))},[i,s.Id]),d=a;return E.useEffect(()=>{a(Fe)},[s.Id]),E.useEffect(()=>{t.length&&(t.includes(o)?I([o]):I([]))},[]),Vl(e),E.useMemo(()=>({sprintData:s,sprintTasks:y,search:c,setSearch:n,error:u,performerIds:t,handleAssign:I,handleFiltersApply:d,appliedFilters:r,isFetching:g,isError:h,isLoading:f,withFilters:b}),[u,y,r,I,d,h,g,f,t,c,n,s,b])},Hl=[];export{tn as A,Fe as E,ln as N,en as S,rn as a,on as b,sn as c,nn as d,Jl as u};
