cortex-react-components 2.13.12 → 2.13.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VV6ZNJS7.mjs → chunk-3AZ2XX4O.mjs} +1 -1
- package/dist/{chunk-XQ3XV5DH.mjs → chunk-6FHRZHAJ.mjs} +1 -1
- package/dist/{chunk-CJDUN6R4.mjs → chunk-DKRRVTCV.mjs} +1 -1
- package/dist/{chunk-MDBYZZXI.mjs → chunk-ESPA7NWT.mjs} +1 -1
- package/dist/{chunk-3E3GY7S2.mjs → chunk-FDRX3CL2.mjs} +1 -1
- package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
- package/dist/{chunk-CLGBBNRB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
- package/dist/{chunk-6VRPQKAK.mjs → chunk-MAZGVZJN.mjs} +1 -1
- package/dist/chunk-NAGBKKTZ.mjs +4 -0
- package/dist/{chunk-FMV74RKL.mjs → chunk-RRME4EHD.mjs} +1 -1
- package/dist/{chunk-T4WMPKZZ.mjs → chunk-RZET5RXO.mjs} +1 -1
- package/dist/{chunk-EUGA4BNN.mjs → chunk-TO7SVJIU.mjs} +1 -1
- package/dist/{chunk-ZGQC6O62.mjs → chunk-UEBQJNVT.mjs} +1 -1
- package/dist/{chunk-Y4TDZUJM.mjs → chunk-UPDEVKI7.mjs} +1 -1
- package/dist/{chunk-2UNIT7NC.mjs → chunk-UPRS7OYQ.mjs} +1 -1
- package/dist/{chunk-R5SXUWYU.mjs → chunk-W2UVMIWN.mjs} +1 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
- package/dist/components/DeliveryLead/index.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
- package/dist/components/Foundary/Views/index.js +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.js +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Projects/FileView.js +1 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.js +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +7 -7
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +11 -11
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-EJC6FIQT.mjs +0 -4
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
5
|
-
"use strict";"use client";var xr=Object.create;var ta=Object.defineProperty;var yr=Object.getOwnPropertyDescriptor;var wr=Object.getOwnPropertyNames;var Nr=Object.getPrototypeOf,Cr=Object.prototype.hasOwnProperty;var Sr=(e,t)=>{for(var a in t)ta(e,a,{get:t[a],enumerable:!0})},Ga=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of wr(t))!Cr.call(e,r)&&r!==a&&ta(e,r,{get:()=>t[r],enumerable:!(o=yr(t,r))||o.enumerable});return e};var ue=(e,t,a)=>(a=e!=null?xr(Nr(e)):{},Ga(t||!e||!e.__esModule?ta(a,"default",{value:e,enumerable:!0}):a,e)),kr=e=>Ga(ta({},"__esModule",{value:!0}),e);var Li={};Sr(Li,{default:()=>Qo});module.exports=kr(Li);var te=require("react");var st=require("lucide-react"),nt=require("react/jsx-runtime"),Dr=[{key:"kanban",icon:st.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:st.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:st.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:st.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:st.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],ja=({currentView:e,onViewChange:t,children:a})=>(0,nt.jsxs)("div",{className:"flex w-full h-screen",children:[(0,nt.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Dr.map(o=>{let r=o.icon,s=e===o.key;return(0,nt.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${s?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,nt.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,nt.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,nt.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,nt.jsx)("div",{className:"w-full h-full",children:a})})]});var Y=ue(require("react"));var eo=require("class-variance-authority");var Qa=require("clsx");var xa="-",Tr=e=>{let t=Rr(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:m=>{let n=m.split(xa);return n[0]===""&&n.length!==1&&n.shift(),Ka(n,t)||Pr(m)},getConflictingClassGroupIds:(m,n)=>{let u=a[m]||[];return n&&o[m]?[...u,...o[m]]:u}}},Ka=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Ka(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let s=e.join(xa);return t.validators.find(({validator:m})=>m(s))?.classGroupId},Wa=/^\[(.+)\]$/,Pr=e=>{if(Wa.test(e)){let t=Wa.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Rr=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Ar(Object.entries(e.classGroups),a).forEach(([s,m])=>{ha(m,o,s,t)}),o},ha=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let s=r===""?t:_a(t,r);s.classGroupId=a;return}if(typeof r=="function"){if(Er(r)){ha(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([s,m])=>{ha(m,_a(t,s),a,o)})})},_a=(e,t)=>{let a=e;return t.split(xa).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Er=e=>e.isThemeGetter,Ar=(e,t)=>t?e.map(([a,o])=>{let r=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([m,n])=>[t+m,n])):s);return[a,r]}):e,Mr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(s,m)=>{a.set(s,m),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let m=a.get(s);if(m!==void 0)return m;if((m=o.get(s))!==void 0)return r(s,m),m},set(s,m){a.has(s)?a.set(s,m):r(s,m)}}},qa="!",Ir=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],s=t.length,m=n=>{let u=[],p=0,c=0,g;for(let x=0;x<n.length;x++){let V=n[x];if(p===0){if(V===r&&(o||n.slice(x,x+s)===t)){u.push(n.slice(c,x)),c=x+s;continue}if(V==="/"){g=x;continue}}V==="["?p++:V==="]"&&p--}let R=u.length===0?n:n.substring(c),k=R.startsWith(qa),b=k?R.substring(1):R,I=g&&g>c?g-c:void 0;return{modifiers:u,hasImportantModifier:k,baseClassName:b,maybePostfixModifierPosition:I}};return a?n=>a({className:n,parseClassName:m}):m},Fr=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},Lr=e=>({cache:Mr(e.cacheSize),parseClassName:Ir(e),...Tr(e)}),Br=/\s+/,Or=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,s=[],m=e.trim().split(Br),n="";for(let u=m.length-1;u>=0;u-=1){let p=m[u],{modifiers:c,hasImportantModifier:g,baseClassName:R,maybePostfixModifierPosition:k}=a(p),b=!!k,I=o(b?R.substring(0,k):R);if(!I){if(!b){n=p+(n.length>0?" "+n:n);continue}if(I=o(R),!I){n=p+(n.length>0?" "+n:n);continue}b=!1}let x=Fr(c).join(":"),V=g?x+qa:x,q=V+I;if(s.includes(q))continue;s.push(q);let N=r(I,b);for(let F=0;F<N.length;++F){let ie=N[F];s.push(V+ie)}n=p+(n.length>0?" "+n:n)}return n};function zr(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ja(t))&&(o&&(o+=" "),o+=a);return o}var Ja=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ja(e[o]))&&(a&&(a+=" "),a+=t);return a};function Hr(e,...t){let a,o,r,s=m;function m(u){let p=t.reduce((c,g)=>g(c),e());return a=Lr(p),o=a.cache.get,r=a.cache.set,s=n,n(u)}function n(u){let p=o(u);if(p)return p;let c=Or(u,a);return r(u,c),c}return function(){return s(zr.apply(null,arguments))}}var ae=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Xa=/^\[(?:([a-z-]+):)?(.+)\]$/nt,Vr=/^\d+\/\d+$/,Ur=new Set(["px","full","screen"]),$r=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|nt|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)nt-?((\d+)?\.?(\d+)[a-z]+|0)/,_r=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,lt=e=>Lt(e)||Ur.has(e)||Vr.test(e),ft=e=>Bt(e,"length",ei),Lt=e=>!!e&&!Number.isNaN(Number(e)),ba=e=>Bt(e,"number",Lt),Kt=e=>!!e&&Number.isInteger(Number(e)),Kr=e=>e.endsWith("%")&&Lt(e.slice(0,-1)),H=e=>Xa.test(e),vt=e=>$r.test(e),qr=new Set(["length","size","percentage"]),Jr=e=>Bt(e,qr,Za),Xr=e=>Bt(e,"position",Za),Zr=new Set(["image","url"]),Yr=e=>Bt(e,Zr,ai),Qr=e=>Bt(e,"",ti),qt=()=>!0,Bt=(e,t,a)=>{let o=Xa.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},ei=e=>Gr.test(e)&&!jr.test(e),Za=()=>!1,ti=e=>Wr.test(e),ai=e=>_r.test(e);var oi=()=>{let e=ae("colors"),t=ae("spacing"),a=ae("blur"),o=ae("brightness"),r=ae("borderColor"),s=ae("borderRadius"),m=ae("borderSpacing"),n=ae("borderWidth"),u=ae("contrast"),p=ae("grayscale"),c=ae("hueRotate"),g=ae("invert"),R=ae("gap"),k=ae("gradientColorStops"),b=ae("gradientColorStopPositions"),I=ae("inset"),x=ae("margin"),V=ae("opacity"),q=ae("padding"),N=ae("saturate"),F=ae("scale"),ie=ae("sepia"),C=ae("skew"),G=ae("space"),Q=ae("translate"),z=()=>["auto","contain","none"],be=()=>["auto","hidden","clip","visible","scroll"],Pe=()=>["auto",H,t],A=()=>[H,t],Re=()=>["",lt,ft],ce=()=>["auto",Lt,H],Ye=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],he=()=>["solid","dashed","dotted","double","none"],rt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],et=()=>["start","end","center","between","around","evenly","stretch"],je=()=>["","0",H],We=()=>["auto","avoid","all","avoid-page","page","left","right","column"],h=()=>[Lt,H];return{cacheSize:500,separator:":",theme:{colors:[qt],spacing:[lt,ft],blur:["none","",vt,H],brightness:h(),borderColor:[e],borderRadius:["none","","full",vt,H],borderSpacing:A(),borderWidth:Re(),contrast:h(),grayscale:je(),hueRotate:h(),invert:je(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[Kr,ft],inset:Pe(),margin:Pe(),opacity:h(),padding:A(),saturate:h(),scale:h(),sepia:je(),skew:h(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",H]}],container:["container"],columns:[{columns:[vt]}],"break-after":[{"break-after":We()}],"break-before":[{"break-before":We()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ye(),H]}],overflow:[{overflow:be()}],"overflow-x":[{"overflow-x":be()}],"overflow-y":[{"overflow-y":be()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[I]}],"inset-x":[{"inset-x":[I]}],"inset-y":[{"inset-y":[I]}],start:[{start:[I]}],end:[{end:[I]}],top:[{top:[I]}],right:[{right:[I]}],bottom:[{bottom:[I]}],left:[{left:[I]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kt,H]}],basis:[{basis:Pe()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",H]}],grow:[{grow:je()}],shrink:[{shrink:je()}],order:[{order:["first","last","none",Kt,H]}],"grid-cols":[{"grid-cols":[qt]}],"col-start-end":[{col:["auto",{span:["full",Kt,H]},H]}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[qt]}],"row-start-end":[{row:["auto",{span:[Kt,H]},H]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",H]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",H]}],gap:[{gap:[R]}],"gap-x":[{"gap-x":[R]}],"gap-y":[{"gap-y":[R]}],"justify-content":[{justify:["normal",...et()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...et(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...et(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[q]}],px:[{px:[q]}],py:[{py:[q]}],ps:[{ps:[q]}],pe:[{pe:[q]}],pt:[{pt:[q]}],pr:[{pr:[q]}],pb:[{pb:[q]}],pl:[{pl:[q]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],te:[{te:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[G]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[G]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",H,t]}],"min-w":[{"min-w":[H,t,"min","max","fit"]}],"max-w":[{"max-w":[H,t,"none","full","min","max","fit","prose",{screen:[vt]},vt]}],h:[{h:[H,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[H,t,"auto","min","max","fit"]}],"font-size":[{text:["base",vt,ft]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ba]}],"font-family":[{font:[qt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",H]}],"line-clamp":[{"line-clamp":["none",Lt,ba]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",lt,H]}],"list-image":[{"list-image":["none",H]}],"list-style-type":[{list:["none","disc","decimal",H]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[V]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[V]}],"text-decoration":["underline","overline","line-through","eo-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",lt,ft]}],"underline-offset":[{"underline-offset":["auto",lt,H]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[V]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ye(),Xr]}],"bg-repeat":[{bg:["eo-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Jr]}],"bg-image":[{bg:["none",{"gradient-nt":["t","tr","r","br","b","bl","nt","tl"]},Yr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-nt-pos":[{nt:[b]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-nt":[{nt:[k]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-nt":[{"rounded-nt":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-nt":[{"rounded-nt":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-nt":[{"border-nt":[n]}],"border-opacity":[{"border-opacity":[V]}],"border-style":[{border:[...he(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[V]}],"divide-style":[{divide:he()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-nt":[{"border-nt":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...he()]}],"outline-offset":[{"outline-offset":[lt,H]}],"outline-w":[{outline:[lt,ft]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[V]}],"ring-offset-w":[{"ring-offset":[lt,ft]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",vt,Qr]}],"shadow-color":[{shadow:[qt]}],opacity:[{opacity:[V]}],"mix-blend":[{"mix-blend":[...rt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":rt()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",vt,H]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[g]}],saturate:[{saturate:[N]}],sepia:[{sepia:[ie]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[V]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[m]}],"border-spacing-x":[{"border-spacing-x":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",H]}],duration:[{duration:h()}],ease:[{ease:["linear","in","out","in-out",H]}],delay:[{delay:h()}],animate:[{animate:["none","spin","ping","pulse","bounce",H]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[F]}],"scale-x":[{"scale-x":[F]}],"scale-y":[{"scale-y":[F]}],rotate:[{rotate:[Kt,H]}],"translate-x":[{"translate-x":[Q]}],"translate-y":[{"translate-y":[Q]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",H]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","eo-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",H]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-te":[{"scroll-te":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",H]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[lt,ft,ba]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","te","mr","mb","ml"],mx:["mr","ml"],my:["te","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-nt","rounded-ss","rounded-se","rounded-nt","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-nt"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-nt":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-nt"],"border-w-x":["border-w-r","border-w-nt"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-nt"],"border-color-x":["border-color-r","border-color-nt"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-te","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-te","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ya=Hr(oi);function y(...e){return Ya((0,Qa.clsx)(e))}var ri=(0,eo.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function se({className:e,variant:t,...a}){return(0,nt.jsx)("div",{className:y(ri({variant:t}),e),...a})}var Ct=ue(require("react"));var oe=Ct.forwardRef(({className:e,...t},a)=>(0,nt.jsx)("div",{ref:a,className:y("rounded-xl border bg-card text-card-foreground shadow",e),...t}));oe.displayName="Card";var ii=Ct.forwardRef(({className:e,...t},a)=>(0,nt.jsx)("div",{ref:a,className:y("flex flex-col space-y-1.5 p-6",e),...t}));ii.displayName="CardHeader";var ni=Ct.forwardRef(({className:e,...t},a)=>(0,nt.jsx)("div",{ref:a,className:y("font-semibold leading-none tracking-tight",e),...t}));ni.displayName="CardTitle";var si=Ct.forwardRef(({className:e,...t},a)=>(0,nt.jsx)("div",{ref:a,className:y("text-sm text-muted-foreground",e),...t}));si.displayName="CardDescription";var Ot=Ct.forwardRef(({className:e,...t},a)=>(0,nt.jsx)("div",{ref:a,className:y("p-6 pt-0",e),...t}));Ot.displayName="CardContent";var li=Ct.forwardRef(({className:e,...t},a)=>(0,nt.jsx)("div",{ref:a,className:y("flex items-center p-6 pt-0",e),...t}));li.displayName="CardFooter";var ao=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:s=!1,height:m})=>{let n=c=>{c.preventDefault()},u=c=>{c.preventDefault(),r(t)};return(0,nt.jsxs)(oe,{className:`p-4 bg-card border-nt-4 ${(()=>{switch(t){case"todo":return"border-nt-gray-400";case"in-progress":return"border-nt-blue-500";case"review":return"border-nt-orange-500";case"done":return"border-nt-green-500";default:return"border-nt-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${s?"lg:max-w-xs":""}`,style:{height:m||"calc(100vh - 350px)"},onDragOver:n,onDrop:u,children:[(0,nt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,nt.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,nt.jsx)(se,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,nt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var Jt=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let s=c=>{a(e)},m=()=>{o(e)},n=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},u=()=>{switch(e.type){case"story":return(0,nt.jsx)(st.BookOpen,{className:"h-3 w-3"});case"bug":return(0,nt.jsx)(st.Bug,{className:"h-3 w-3"});case"spike":return(0,nt.jsx)(st.Zap,{className:"h-3 w-3"});case"task":default:return(0,nt.jsx)(st.AlertCircle,{className:"h-3 w-3"})}},p=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return r?(0,nt.jsx)(oe,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:m,children:(0,nt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,nt.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:u()}),(0,nt.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,nt.jsxs)(oe,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:s,onClick:m,children:[(0,nt.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,nt.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[u(),(0,nt.jsx)("span",{className:"capitalize",children:e.type})]}),(0,nt.jsxs)("div",{className:"flex gap-1",children:[(0,nt.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${n()}`,children:e.priority}),(0,nt.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,nt.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,nt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,nt.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-1",children:[(0,nt.jsx)(st.User,{className:"h-4 w-4"}),(0,nt.jsx)("span",{children:e.assignee?.value?.name})]}),(0,nt.jsxs)("div",{className:"flex items-center gap-1",children:[(0,nt.jsx)(st.Calendar,{className:"h-4 w-4"}),(0,nt.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var Xt=ue(require("react")),Ne=ue(require("@radix-ui/react-dialog"));var Ge=Ne.Root;var di=Ne.Portal;var ro=Xt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(Ne.Overlay,{ref:a,className:y("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ro.displayName=Ne.Overlay.displayName;var Oe=Xt.forwardRef(({className:e,children:t,...a},o)=>(0,$e.jsxs)(di,{children:[(0,$e.jsx)(ro,{}),(0,$e.jsxs)(Ne.Content,{ref:o,className:y("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-nt-left-1/2 data-[state=closed]:slide-out-nt-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,$e.jsxs)(Ne.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,$e.jsx)(st.X,{className:"h-4 w-4"}),(0,$e.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Oe.displayName=Ne.Content.displayName;var ze=({className:e,...t})=>(0,$e.jsx)("div",{className:y("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ze.displayName="DialogHeader";var Zt=({className:e,...t})=>(0,$e.jsx)("div",{className:y("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Zt.displayName="DialogFooter";var He=Xt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(Ne.Title,{ref:a,className:y("text-lg font-semibold leading-none tracking-tight",e),...t}));He.displayName=Ne.Title.displayName;var ci=Xt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(Ne.Description,{ref:a,className:y("text-sm text-muted-foreground",e),...t}));ci.displayName=Ne.Description.displayName;var io=require("@radix-ui/react-slot"),so=ue(require("react")),aa=(0,eo.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),S=so.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},s)=>(0,nt.jsx)(e?io.Slot:"button",{className:y(aa({className:t,size:a,variant:o})),ref:s,...r}));S.displayName="Button";var co=ue(require("react"));var X=co.forwardRef(({className:e,type:t,...a},o)=>(0,nt.jsx)("input",{type:t,className:y("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));X.displayName="Input";var po=ue(require("react")),De=po.forwardRef(({className:e,...t},a)=>(0,nt.jsx)("textarea",{className:y("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));De.displayName="Textarea";var U=ue(require("@radix-ui/react-select")),bt=ue(require("react")),Fe=U.Root;var Qe=U.Value,Ee=bt.forwardRef(({children:e,className:t,...a},o)=>(0,nt.jsxs)(U.Trigger,{className:y("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,nt.jsx)(U.Icon,{asChild:!0,children:(0,nt.jsx)(st.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ee.displayName=U.Trigger.displayName;var go=bt.forwardRef(({className:e,...t},a)=>(0,nt.jsx)(U.ScrollUpButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,nt.jsx)(st.ChevronUp,{className:"h-4 w-4"})}));go.displayName=U.ScrollUpButton.displayName;var fo=bt.forwardRef(({className:e,...t},a)=>(0,nt.jsx)(U.ScrollDownButton,{className:y("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,nt.jsx)(st.ChevronDown,{className:"h-4 w-4"})}));fo.displayName=U.ScrollDownButton.displayName;var Ae=bt.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,nt.jsx)(U.Portal,{children:(0,nt.jsxs)(U.Content,{className:y("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,nt.jsx)(go,{}),(0,nt.jsx)(U.Viewport,{className:y("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,nt.jsx)(fo,{})]})}));Ae.displayName=U.Content.displayName;var mi=bt.forwardRef(({className:e,...t},a)=>(0,nt.jsx)(U.Label,{className:y("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));mi.displayName=U.Label.displayName;var re=bt.forwardRef(({children:e,className:t,...a},o)=>(0,nt.jsxs)(U.Item,{className:y("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,nt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,nt.jsx)(U.ItemIndicator,{children:(0,nt.jsx)(st.Check,{className:"h-4 w-4"})})}),(0,nt.jsx)(U.ItemText,{children:e})]}));re.displayName=U.Item.displayName;var pi=bt.forwardRef(({className:e,...t},a)=>(0,nt.jsx)(U.Separator,{className:y("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));pi.displayName=U.Separator.displayName;var vo=ue(require("react")),ya=ue(require("@radix-ui/react-label"));var ui=(0,eo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),E=vo.forwardRef(({className:e,...t},a)=>(0,nt.jsx)(ya.Root,{ref:a,className:y(ui(),e),...t}));E.displayName=ya.Root.displayName;var Tt=ue(require("react")),zt=ue(require("@radix-ui/react-toggle-group"));var xo=ue(require("react")),wa=ue(require("@radix-ui/react-toggle"));var Na=(0,eo.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),gi=xo.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,nt.jsx)(wa.Root,{ref:r,className:y(Na({variant:t,size:a,className:e})),...o}));gi.displayName=wa.Root.displayName;var No=Tt.createContext({size:"default",variant:"default"}),Pt=Tt.forwardRef(({className:e,variant:t,size:a,children:o,...r},s)=>(0,nt.jsx)(zt.Root,{ref:s,className:y("flex items-center justify-center gap-1",e),...r,children:(0,nt.jsx)(No.Provider,{value:{variant:t,size:a},children:o})}));Pt.displayName=zt.Root.displayName;var Rt=Tt.forwardRef(({className:e,children:t,variant:a,size:o,...r},s)=>{let m=Tt.useContext(No);return(0,nt.jsx)(zt.Item,{ref:s,className:y(Na({variant:m.variant||a,size:m.size||o}),e),...r,children:t})});Rt.displayName=zt.Item.displayName;var fi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:st.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:st.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:st.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:st.Zap}],vi=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Ht=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:s,defaultEpicId:m})=>{let[n,u]=(0,te.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,te.useEffect)(()=>{e&&m&&u(g=>({...g,epic:m}))},[e,m]),(0,te.useEffect)(()=>{e&&u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:m||"",sprint:"none",assignee:""})},[e]);let p=g=>{g.preventDefault(),n.name.trim()&&(a({name:n.name.trim(),description:n.description.trim(),status:"todo",priority:n.priority,type:n.type,storyPoints:n.storyPoints,epic:Number(n.epic),sprint:Number(n.sprint),assignee:n.assignee.trim()?{relationTo:"digital-colleagues",value:Number(n.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:m||"",sprint:"",assignee:""}),t())},c=(g,R)=>{u(k=>({...k,[g]:R}))};return(0,nt.jsx)(Ge,{open:e,onOpenChange:t,children:(0,nt.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,nt.jsx)(ze,{children:(0,nt.jsx)(He,{children:"Add New Task"})}),(0,nt.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"name",children:"Task Title"}),(0,nt.jsx)(X,{id:"name",value:n.name,onChange:g=>c("name",g.target.value),placeholder:"Enter task title",required:!0})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"description",children:"Description"}),(0,nt.jsx)(De,{id:"description",value:n.description,onChange:g=>c("description",g.target.value),placeholder:"Enter task description",rows:3})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{children:"Type"}),(0,nt.jsx)(Pt,{type:"single",value:n.type||"",onValueChange:g=>g&&c("type",g),children:fi.map(g=>{let R=g.icon;return(0,nt.jsxs)(Rt,{value:g.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,nt.jsx)(R,{className:"h-4 w-4"}),g.label]},g.value)})})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{children:"Priority"}),(0,nt.jsx)(Pt,{type:"single",value:n.priority||"",onValueChange:g=>g&&c("priority",g),children:vi.map(g=>(0,nt.jsx)(Rt,{value:g.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:g.label},g.value))})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"points",children:"Story Points"}),(0,nt.jsx)(X,{id:"points",type:"number",min:"1",max:"100",value:n.storyPoints,onChange:g=>c("storyPoints",parseInt(g.target.value)||1),placeholder:"Enter story points",required:!0})]}),!m&&(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"epic",children:"Epic"}),(0,nt.jsxs)(Fe,{value:n.epic,onValueChange:g=>c("epic",g),children:[(0,nt.jsx)(Ee,{children:(0,nt.jsx)(Qe,{placeholder:"Select an epic"})}),(0,nt.jsx)(Ae,{children:o.map(g=>(0,nt.jsx)(re,{value:g.id.toString(),children:(0,nt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,nt.jsx)("div",{className:`w-3 h-3 rounded-full ${g.color}`}),g.name]})},g.id))})]})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,nt.jsxs)(Fe,{value:n.sprint,onValueChange:g=>c("sprint",g),children:[(0,nt.jsx)(Ee,{children:(0,nt.jsx)(Qe,{placeholder:"Select a sprint"})}),(0,nt.jsxs)(Ae,{children:[(0,nt.jsx)(re,{value:"none",children:"No Sprint"}),r.map(g=>(0,nt.jsx)(re,{value:g.id.toString(),children:(0,nt.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"sprint",children:"Assignee"}),(0,nt.jsxs)(Fe,{value:n.assignee,onValueChange:g=>c("assignee",g),children:[(0,nt.jsx)(Ee,{children:(0,nt.jsx)(Qe,{placeholder:"Select an Assignee"})}),(0,nt.jsxs)(Ae,{children:[(0,nt.jsx)(re,{value:"none",children:"No Assignee"}),s.map(g=>(0,nt.jsx)(re,{value:g.id.toString(),children:(0,nt.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,nt.jsxs)(Zt,{children:[(0,nt.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,nt.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Sa=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:s="",disabled:m=!1})=>{let[n,u]=(0,te.useState)(!1),[p,c]=(0,te.useState)(""),g=()=>{m||(u(!0),c(t))},R=async()=>{p!==t&&await r(e,p),u(!1)},k=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?R():b.key==="Escape"&&(u(!1),c(""))};return(0,nt.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,nt.jsx)(E,{children:a}),n?o?(0,nt.jsx)(De,{value:p,onChange:b=>c(b.target.value),onBlur:R,onKeyDown:k,autoFocus:!0,rows:4,className:"resize-none"}):(0,nt.jsx)(X,{value:p,onChange:b=>c(b.target.value),onBlur:R,onKeyPress:k,autoFocus:!0,className:"text-lg font-medium"}):(0,nt.jsxs)("div",{onClick:g,className:`${m?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,nt.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click nt edit..."}),!m&&(0,nt.jsx)(st.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var ra=ue(require("react")),ct=ue(require("@radix-ui/react-avatar"));var ka=ra.forwardRef(({className:e,...t},a)=>(0,nt.jsx)(ct.Root,{ref:a,className:y("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ka.displayName=ct.Root.displayName;var bi=ra.forwardRef(({className:e,...t},a)=>(0,nt.jsx)(ct.Image,{ref:a,className:y("aspect-square h-full w-full",e),...t}));bi.displayName=ct.Image.displayName;var Da=ra.forwardRef(({className:e,...t},a)=>(0,nt.jsx)(ct.Fallback,{ref:a,className:y("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Da.displayName=ct.Fallback.displayName;var ko=({comments:e,onAddComment:t})=>{let[a,o]=(0,te.useState)(""),r=m=>m.split(" ").map(n=>n[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),o(""))};return(0,nt.jsxs)("div",{className:"space-y-4",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,nt.jsx)(st.MessageSquare,{className:"h-5 w-5"}),(0,nt.jsx)(E,{className:"text-lg font-medium",children:"Comments"}),(0,nt.jsx)(se,{variant:"secondary",children:e.length})]}),(0,nt.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(m=>(0,nt.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,nt.jsx)(ka,{className:"h-8 w-8 te-1",children:(0,nt.jsx)(Da,{className:"text-xs bg-muted text-muted-foreground",children:r(m.author)})}),(0,nt.jsxs)("div",{className:"flex-1",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,nt.jsx)("span",{className:"font-medium text-sm",children:m.author}),(0,nt.jsxs)("span",{className:"text-xs text-muted-foreground",children:[m.createdAt.toLocaleDateString()," at ",m.createdAt.toLocaleTimeString()]})]}),(0,nt.jsx)("p",{className:"text-sm text-muted-foreground",children:m.text})]})]},m.id))}),(0,nt.jsxs)("div",{className:"flex gap-2",children:[(0,nt.jsx)(De,{value:a,onChange:m=>o(m.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,nt.jsx)(S,{onClick:s,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,nt.jsx)(st.Send,{className:"h-4 w-4"})})]})]})};var sa=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:s=!1})=>{let[m,n]=(0,te.useState)(!1),u=o.find(c=>c.value===t);return(0,nt.jsxs)("div",{className:"space-y-1",children:[(0,nt.jsx)(E,{className:"text-xs text-muted-foreground",children:e}),(0,nt.jsxs)(Fe,{value:t,onValueChange:a,open:m,onOpenChange:c=>{s||n(c)},disabled:s,children:[(0,nt.jsx)(Ee,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,nt.jsxs)(se,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&n(!m),children:[r&&u?.color&&(0,nt.jsx)("div",{className:`w-2 h-2 rounded-full ${u.color} mr-1`}),u?.label||"Select..."]})}),(0,nt.jsx)(Ae,{children:o.map(c=>(0,nt.jsx)(re,{value:c.value,children:r&&c.color?(0,nt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,nt.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.label]}):c.label},c.value))})]})]})};var To=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:s=!1,disabled:m=!1})=>{let[n,u]=(0,te.useState)(!1),[p,c]=(0,te.useState)(""),g=o.find(x=>x.value===t),R=o.filter(x=>x.label.toLowerCase().includes(p.toLowerCase())),k=x=>{a(x),u(!1),c("")},b=()=>{s&&p.trim()&&!o.find(x=>x.value===p.trim())&&(a(p.trim()),u(!1),c(""))};return(0,nt.jsxs)("div",{className:"space-y-1",children:[(0,nt.jsx)(E,{className:"text-xs text-muted-foreground",children:e}),(0,nt.jsxs)(Fe,{value:t,onValueChange:k,open:n,onOpenChange:x=>{m||u(x)},disabled:m,children:[(0,nt.jsx)(Ee,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,nt.jsx)(se,{variant:"secondary",className:`${m?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!m&&u(!n),children:g?.label||t||"Select..."})}),(0,nt.jsxs)(Ae,{children:[(0,nt.jsx)("div",{className:"p-2",children:(0,nt.jsx)(X,{placeholder:r,value:p,onChange:x=>c(x.target.value),onKeyDown:x=>{x.key==="Enter"&&s&&b()},className:"mb-2"})}),R.map(x=>(0,nt.jsx)(re,{value:x.value,children:x.label},x.value)),s&&p.trim()&&!R.find(x=>x.value===p.trim())&&(0,nt.jsxs)(re,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var ve=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var hi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:st.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:st.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:st.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:st.Zap}],xi=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var Po=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:s,onDelete:m,isUpdating:n=!1,isDeleting:u=!1,deleteState:p="idle",teamMembers:c})=>{let[g,R]=(0,te.useState)(e.storyPoints),k=(0,te.useRef)(null),[b,I]=(0,te.useState)(c);(0,te.useEffect)(()=>{I(c)},[c]);let x=(0,te.useCallback)((N,F)=>{k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{r(N,F)},500)},[r]);(0,te.useEffect)(()=>{x("storyPoints",g?.toString()||"1")},[g]);let V=N=>N.split(" ").map(F=>F[0]).join("").toUpperCase(),q=()=>p==="loading"?(0,nt.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,nt.jsx)(st.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,nt.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,nt.jsx)(st.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,nt.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,nt.jsx)(st.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,nt.jsxs)(S,{onClick:m,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:n||u,children:[(0,nt.jsx)(st.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,nt.jsxs)("div",{className:"flex flex-col h-full",children:[(0,nt.jsxs)("div",{className:"space-y-4",style:{opacity:n?.6:1},children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{className:"text-xs text-muted-foreground",children:"Status"}),(0,nt.jsx)(sa,{label:"",value:e.status,onValueChange:N=>r("status",N),options:[{value:"todo",label:"To te"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:n})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{className:"text-xs text-muted-foreground",children:"Type"}),(0,nt.jsx)(Pt,{type:"single",value:e.type||"",onValueChange:N=>N&&r("type",N),className:"grid grid-cols-2 gap-1",disabled:n,children:hi.map(N=>{let F=N.icon;return(0,nt.jsxs)(Rt,{value:N.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:n,children:[(0,nt.jsx)(F,{className:"h-3 w-3"}),N.label]},N.value)})})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,nt.jsx)(Pt,{type:"single",value:e.priority||"",onValueChange:N=>N&&r("priority",N),className:"grid grid-cols-3 gap-1",disabled:n,children:xi.map(N=>(0,nt.jsx)(Rt,{value:N.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:n,children:N.label},N.value))})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,nt.jsx)("input",{type:"number",min:"1",max:"100",value:g||1,onChange:N=>{let F=Number(N.target.value);F<1?R(1):F>100?R(100):R(F)},className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:n})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,nt.jsx)(sa,{label:"",value:ve(e.epic).toString(),onValueChange:N=>r("epic",N),options:(t||[]).map(N=>({value:N.id.toString(),label:N?.name,color:N.color})),showColor:!0,disabled:n})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,nt.jsx)(sa,{label:"",value:ve(e.sprint).toString()||"none",onValueChange:N=>r("sprint",N==="none"?"":N),options:[{value:"none",label:"No Sprint"},...(a||[]).map(N=>({value:N.id.toString(),label:`${N?.name}`}))],disabled:n})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,nt.jsx)(To,{label:"",value:e.assignee?.value?.name,onValueChange:N=>r("assignee",N),options:b.map(N=>({value:`${typeof N.email=="string"?"users":"digital-colleagues"}:${N.id}`,label:N?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:n})]})]}),(0,nt.jsxs)("div",{className:"te-auto pt-4 space-y-4",children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(S,{onClick:s,variant:"outline",className:"w-full h-8 text-xs",disabled:n||u,children:"Close"}),q()]}),(0,nt.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,nt.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,nt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,nt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,nt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,nt.jsx)(st.User,{className:"h-3 w-3"}),(0,nt.jsx)("span",{children:"System"})]})]}),(0,nt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,nt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,nt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,nt.jsx)(st.Calendar,{className:"h-3 w-3"}),(0,nt.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,nt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,nt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,nt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,nt.jsx)(st.Clock,{className:"h-3 w-3"}),(0,nt.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Ro=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:s,onDeleteTask:m,onAddComment:n,colleagues:u})=>{let[p,c]=(0,te.useState)(a),[g,R]=(0,te.useState)(new Date),[k,b]=(0,te.useState)("idle"),[I,x]=(0,te.useState)("idle"),[V,q]=(0,te.useState)([]),[N,F]=(0,te.useState)(u);(0,te.useEffect)(()=>{c(a)},[a]);let ie=async(A,Re)=>{if(Re!==p[A]){b("loading");try{await s(p.id.toString(),{[A]:Re}),R(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(ce){console.log("error",ce),b("error"),setTimeout(()=>b("idle"),3e3)}}},C=async(A,Re)=>{if(Re!==p[A]){b("loading");try{await s(p.id.toString(),{[A]:Re}),R(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(ce){console.log("error",ce),b("error"),setTimeout(()=>b("idle"),3e3)}}},G=async A=>{if(n){b("loading");try{await n?.({content:A,taskId:p.id.toString()}),R(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},Q=async()=>{x("loading");try{await m(p.id.toString()),x("success"),setTimeout(()=>{t(),x("idle")},1e3)}catch{x("error"),setTimeout(()=>x("idle"),3e3)}},z=k!=="loading"&&I!=="loading",be=()=>{z&&t()},Pe=()=>k==="loading"?(0,nt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,nt.jsx)(st.Loader2,{className:"h-4 w-4 animate-spin"}),(0,nt.jsx)("span",{children:"Updating..."})]}):k==="success"?(0,nt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,nt.jsx)(st.Check,{className:"h-4 w-4"}),(0,nt.jsx)("span",{children:"Updated successfully"})]}):k==="error"?(0,nt.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,nt.jsx)(st.X,{className:"h-4 w-4"}),(0,nt.jsx)("span",{children:"Update failed"})]}):null;return(0,nt.jsx)(Ge,{open:e,onOpenChange:be,children:(0,nt.jsxs)(Oe,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,nt.jsxs)(ze,{children:[(0,nt.jsx)(He,{className:"sr-only",children:p?.name}),(0,nt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,nt.jsx)("div",{className:"flex-1",children:Pe()}),!z&&(0,nt.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,nt.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,nt.jsx)(Sa,{fieldName:"name",value:p.name||"",label:"",onSave:ie,className:"border-b border-border pb-3",disabled:k==="loading"}),(0,nt.jsx)(Sa,{fieldName:"description",value:p.description||"",label:"Description",multiline:!0,onSave:ie,disabled:k==="loading"}),(0,nt.jsx)(ko,{comments:(p?.comments||[]).map(A=>({author:A.author.value.name||"",createdAt:new Date(A.timestamp),text:A.text,id:A.id||""})),onAddComment:G})]}),(0,nt.jsx)(Po,{task:p,epics:o,sprints:r,lastUpdated:g,onUpdateTask:C,onClose:be,onDelete:Q,isUpdating:k==="loading",isDeleting:I==="loading",deleteState:I,teamMembers:N})]})]})})};var Ut=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,te.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("nt")[0],endDate:new Date().toISOString().split("nt")[0],progress:0}),s=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],m=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],n=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],u=c=>{c.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},p=(c,g)=>{r(R=>({...R,[c]:g}))};return(0,nt.jsx)(Ge,{open:e,onOpenChange:t,children:(0,nt.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,nt.jsx)(ze,{children:(0,nt.jsx)(He,{children:"Add New Epic"})}),(0,nt.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"name",children:"Epic Name"}),(0,nt.jsx)(X,{id:"name",value:o.name,onChange:c=>p("name",c.target.value),placeholder:"Enter epic name",required:!0})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"description",children:"Description"}),(0,nt.jsx)(De,{id:"description",value:o.description,onChange:c=>p("description",c.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{children:"Color"}),(0,nt.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(c=>(0,nt.jsx)("button",{type:"button",onClick:()=>p("color",c),className:`w-8 h-8 rounded-full ${c} ${o.color===c?"ring-2 ring-gray-400":""}`},c))})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{children:"Confidence"}),(0,nt.jsxs)(Fe,{value:o.confidence,onValueChange:c=>p("confidence",c),children:[(0,nt.jsx)(Ee,{children:(0,nt.jsx)(Qe,{})}),(0,nt.jsx)(Ae,{children:m.map(c=>(0,nt.jsx)(re,{value:c.value,children:c.label},c.value))})]})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{children:"Phase"}),(0,nt.jsxs)(Fe,{value:o.phase.toString(),onValueChange:c=>p("phase",parseInt(c)),children:[(0,nt.jsx)(Ee,{children:(0,nt.jsx)(Qe,{})}),(0,nt.jsx)(Ae,{children:n.map(c=>(0,nt.jsx)(re,{value:c.value.toString(),children:c.label},c.value))})]})]})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{children:"Start Date"}),(0,nt.jsx)(X,{type:"date",value:o.startDate,onChange:c=>p("startDate",c.target.value)})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{children:"End Date"}),(0,nt.jsx)(X,{type:"date",value:o.endDate,onChange:c=>p("endDate",c.target.value)})]})]}),(0,nt.jsxs)(Zt,{children:[(0,nt.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,nt.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var Mo=require("motion/react");function Ao(e,t){let[a,o]=(0,te.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),r=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,te.useEffect)(()=>{r(a)},[]),[a,r]}var da=require("react-icons/fa");function at({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:s,children:m,className:n}){let[u,p]=Ao(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),c=!r&&!t||u;return(0,nt.jsxs)(Mo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${s} p-8 text-white ${n||""}`,children:[(0,nt.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,nt.jsx)(se,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,nt.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,nt.jsxs)("div",{className:"flex items-center gap-3",children:[c&&o&&(0,nt.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,nt.jsx)("button",{"aria-label":u?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!u),style:{lineHeight:0},children:u?(0,nt.jsx)(da.FaChevronDown,{size:22}):(0,nt.jsx)(da.FaChevronUp,{size:22})})]})]}),!c&&(0,nt.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,nt.jsxs)("div",{className:"space-y-4",children:[(0,nt.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,nt.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,nt.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,nt.jsx)(S,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),m&&(0,nt.jsx)("div",{className:"hidden lg:block",children:m})]})]})}var Io=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:s=[],onAddTask:m,onUpdateTask:n,onDeleteTask:u,onTaskClick:p,onAddEpic:c,onAddComment:g})=>{let[R,k]=(0,Y.useState)([]),[b,I]=(0,Y.useState)([]),[x,V]=(0,Y.useState)([]),[q,N]=(0,Y.useState)(!1),[F,ie]=(0,Y.useState)(!1),[C,G]=(0,Y.useState)(null),[Q,z]=(0,Y.useState)(null),[be,Pe]=(0,Y.useState)([]),[A,Re]=(0,Y.useState)([]),[ce,Ye]=(0,Y.useState)(0),he=(0,Y.useRef)(null),rt=(0,Y.useRef)(null),et=Y.default.useMemo(()=>[...b.map(w=>w.id),0],[b]),je=(0,Y.useRef)(""),We=(0,Y.useRef)(""),h=(0,Y.useRef)(""),W=(0,Y.useRef)(""),ne=w=>w.map(d=>`${d.id}-${new Date(d.createdAt).getTime()}-${new Date(d.updatedAt).getTime()}`).join("-");(0,Y.useEffect)(()=>{let w=ne(e);w!==je.current&&(k(e),C&&G(e.find(d=>d.id===C.id)||null),je.current=w)},[e]),(0,Y.useEffect)(()=>{let w=ne(t);w!==We.current&&(I(t),We.current=w)},[t]),(0,Y.useEffect)(()=>{let w=ne(a);w!==h.current&&(V(a),h.current=w)},[a]),(0,Y.useEffect)(()=>{let w=ne(r.map(d=>({id:d.id,updatedAt:d.updatedAt,createdAt:d.createdAt})));w!==W.current&&(Re(r),W.current=w)},[r]),(0,Y.useEffect)(()=>{let w=()=>{if(he.current){let L=he.current.offsetHeight;Ye(L)}};w();let d=new ResizeObserver(w);he.current&&d.observe(he.current);let f=()=>{setTimeout(w,100)};return window.addEventListener("storage",f),()=>{d.disconnect(),window.removeEventListener("storage",f)}},[]),(0,Y.useEffect)(()=>{let w=setTimeout(()=>{he.current&&Ye(he.current.offsetHeight)},300);return()=>clearTimeout(w)},[q,F]);let _e=R.filter(w=>!0),Z=w=>_e.filter(d=>d.status===w),Ue=w=>{let d={};return b.forEach(f=>{d[f.id]=w.filter(L=>ve(L.epic)===f.id)}),d["eo-epic"]=w.filter(f=>!ve(f.epic)),d},At=w=>{z(w)},it=w=>{Q&&(k(d=>d.map(f=>f.id===Q.id?{...f,status:w}:f)),n?.(Q.id.toString(),{status:w}),z(null))},Gt=w=>{let d={...w,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};k(f=>[...f,d]),m?.(w)},ut=async(w,d)=>{k(f=>f.map(L=>L.id===Number(w)?{...L,...d}:L)),n&&await n(w,d),C?.id===Number(w)&&G(f=>({...f,...d}))},wt=async w=>{k(d=>d.filter(f=>f.id!==Number(w))),C?.id===Number(w)&&G(null),u&&await u(w)},Mt=w=>{let d={...w,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};I(f=>[...f,d]),c?.(w)},gt=w=>{G(w),p?.(w)},It=[{id:"todo",title:"To te",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Ft=ce>0?`calc(100vh - ${ce+120}px)`:"calc(100vh - 12rem)";return(0,nt.jsxs)("div",{ref:rt,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,nt.jsx)("div",{ref:he,className:"flex-shrink-0",children:(0,nt.jsx)(at,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-nt-r from-purple-600 via-violet-600 nt-indigo-600",primaryAction:{label:"Add task",onClick:()=>N(!0)},secondaryAction:{label:"Add epic",onClick:()=>ie(!0)}})}),(0,nt.jsx)("div",{className:"flex-1 min-h-0 te-8",children:(0,nt.jsx)("div",{className:"h-full",style:{height:ce>0?`calc(100vh - ${ce+120}px)`:"calc(100vh - 12rem)"},children:(0,nt.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:It.map(w=>{let d=Z(w.status),f=Ue(d);return(0,nt.jsxs)(ao,{title:w.title,status:w.status,taskCount:d.length,onDrop:it,isCompact:w.status==="done",height:Ft,children:[f["eo-epic"].map(L=>(0,nt.jsx)(Jt,{epic:null,task:L,onDragStart:At,onTaskClick:gt,isCompact:w.status==="done"},L.id)),et.map(L=>{let j=b.find(me=>me.id===L),pe=f[L]||[];return pe.length===0?null:(0,nt.jsxs)("div",{className:"mb-6",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,nt.jsx)("div",{className:`w-3 h-3 rounded-full ${j?.color}`}),(0,nt.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:j?.name||"No Epic"}),(0,nt.jsx)(se,{variant:"secondary",className:"text-xs",children:pe.length})]})," ",(0,nt.jsx)("div",{className:"space-y-3",children:pe.map(me=>(0,nt.jsx)(Jt,{task:me,epic:j,onDragStart:At,onTaskClick:gt,isCompact:w.status==="done"},me.id))})]},L)})]},w.id)})})})}),(0,nt.jsx)(Ht,{isOpen:q,onClose:()=>N(!1),onAddTask:Gt,assignees:[...A,...be],epics:b,sprints:x}),(0,nt.jsx)(Ut,{isOpen:F,onClose:()=>ie(!1),onAddEpic:Mt}),C&&(0,nt.jsx)(Ro,{isOpen:!!C,onClose:()=>G(null),initialTask:C,epics:b,sprints:x,onUpdateTask:ut,onDeleteTask:wt,colleagues:A,onAddComment:g})]})};var Fo=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:s,onAddEpic:m,onUpdateEpic:n,onDeleteEpic:u})=>{let[p,c]=(0,te.useState)(t),[g,R]=(0,te.useState)(null),[k,b]=(0,te.useState)(null),[I,x]=(0,te.useState)({}),[V,q]=(0,te.useState)(0),[N,F]=(0,te.useState)(!1),[ie,C]=(0,te.useState)(!1),[G,Q]=(0,te.useState)(null),z=(0,te.useRef)(null),be=(0,te.useRef)(null);(0,te.useEffect)(()=>{c(t)},[t]),(0,te.useEffect)(()=>{let h=()=>{if(z.current){let _e=z.current.offsetHeight;q(_e)}};h();let W=new ResizeObserver(h);z.current&&W.observe(z.current);let ne=()=>{setTimeout(h,100)};return window.addEventListener("storage",ne),()=>{W.disconnect(),window.removeEventListener("storage",ne)}},[]),(0,te.useEffect)(()=>{let h=setTimeout(()=>{z.current&&q(z.current.offsetHeight)},300);return()=>clearTimeout(h)},[k]);let Pe=h=>{R(h)},A=h=>{h.preventDefault()},Re=(h,W)=>{h.preventDefault(),g&&ve(g.epic).toString()!==W&&(o(g.id.toString(),{epic:Number(W)}),R(null))},ce=h=>e.filter(W=>ve(W.epic).toString()===h),Ye=h=>{b(h.id.toString()),x({name:h.name,description:h.description,confidence:h.confidence,phase:h.phase})},he=async()=>{k&&I.name&&(await n(k.toString(),I),c(h=>h.map(W=>W.id.toString()===k?{...W,...I}:W)),b(null),x({}))},rt=()=>{b(null),x({})},et=async h=>{window.confirm("Are you sure you want nt delete this epic? This will also delete all associated tasks.")&&(await u(h),c(W=>W.filter(ne=>ne.id.toString()!==h)))},je=h=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[h]||`Phase ${h}`,We=h=>{switch(h){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)("div",{ref:be,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,nt.jsx)("div",{ref:z,className:"flex-shrink-0",children:(0,nt.jsx)(at,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-nt-r from-rose-600 via-pink-600 nt-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>F(!0)}})}),(0,nt.jsx)("div",{className:"flex-1 min-h-0 te-8",children:(0,nt.jsx)("div",{className:"h-full overflow-y-auto",style:{height:V>0?`calc(100vh - ${V+120}px)`:"calc(100vh - 12rem)"},children:(0,nt.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:p.map(h=>{let W=ce(h.id.toString()),ne=W.reduce((Z,Ue)=>Z+(Ue.storyPoints||0),0),_e=V>0?`calc(100vh - ${V+200}px)`:"calc(100vh - 14rem)";return(0,nt.jsxs)(oe,{className:`flex flex-col ${k===h.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:k===h.id.toString()?"auto":_e,minHeight:"400px"},onDragOver:A,onDrop:Z=>Re(Z,h.id.toString()),children:[(0,nt.jsx)("div",{className:"p-4 border-b border-border",children:k===h.id.toString()?(0,nt.jsxs)("div",{className:"space-y-4",children:[(0,nt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,nt.jsx)(X,{value:I.name||"",onChange:Z=>x({...I,name:Z.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,nt.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,nt.jsx)(S,{size:"sm",variant:"ghost",onClick:he,className:"p-1 h-8 w-8",children:(0,nt.jsx)(st.Check,{className:"h-4 w-4"})}),(0,nt.jsx)(S,{size:"sm",variant:"ghost",onClick:rt,className:"p-1 h-8 w-8",children:(0,nt.jsx)(st.X,{className:"h-4 w-4"})})]})]}),(0,nt.jsx)(De,{value:I.description||"",onChange:Z=>x({...I,description:Z.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,nt.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,nt.jsxs)("div",{children:[(0,nt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,nt.jsxs)("select",{value:I.confidence||h.confidence,onChange:Z=>x({...I,confidence:Z.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,nt.jsx)("option",{value:"low",children:"Low"}),(0,nt.jsx)("option",{value:"medium",children:"Medium"}),(0,nt.jsx)("option",{value:"high",children:"High"})]})]}),(0,nt.jsxs)("div",{children:[(0,nt.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,nt.jsx)("select",{value:I.phase?.toString()||h.phase.toString(),onChange:Z=>x({...I,phase:parseInt(Z.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(Z=>(0,nt.jsxs)("option",{value:Z.toString(),children:["Phase ",Z]},Z))})]})]})]}):(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,nt.jsx)("div",{className:`w-4 h-4 rounded-full ${h.color}`}),(0,nt.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:h.name}),(0,nt.jsxs)("div",{className:"flex gap-1",children:[(0,nt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Ye(h),className:"p-1 h-8 w-8",children:(0,nt.jsx)(st.Edit2,{className:"h-3 w-3"})}),(0,nt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>et(h.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,nt.jsx)(st.Trash2,{className:"h-3 w-3"})})]})]}),(0,nt.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,nt.jsxs)(se,{className:`text-xs ${We(h.confidence)}`,children:[h.confidence," confidence"]}),(0,nt.jsxs)(se,{variant:"outline",className:"text-xs",children:["Phase ",h.phase]}),(0,nt.jsxs)(se,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[W.length," tasks"]}),(0,nt.jsxs)(se,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ne," pts"]})]}),h.description&&(0,nt.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:h.description}),(0,nt.jsxs)(S,{onClick:()=>{C(!0),Q(h)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,nt.jsx)(st.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,nt.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,nt.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:W.length===0?(0,nt.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,nt.jsx)(st.Move,{className:"h-8 w-8 mb-2"}),(0,nt.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):W.map(Z=>(0,nt.jsx)(Jt,{task:Z,epic:h,onDragStart:Pe,onTaskClick:r,isCompact:!0},Z.id))})})]},h.id)})})})})]}),(0,nt.jsx)(Ut,{isOpen:N,onClose:()=>F(!1),onAddEpic:m}),(0,nt.jsx)(Ht,{isOpen:ie,onClose:()=>C(!1),onAddTask:s,assignees:[],epics:[],defaultEpicId:G?.id.toString()||"",sprints:a})]})};var Lo=require("react-day-picker");function ca({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,nt.jsx)(Lo.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:y("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:y(aa({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full te-2",cell:y("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-nt-md first:[&:has([aria-selected])]:rounded-nt-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:y(aa({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}ca.displayName="Calendar";var Oo=ue(require("react")),ot=ue(require("@radix-ui/react-popover"));var Ra=ot.Root,Ea=ot.Trigger;var ma=Oo.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,nt.jsx)(ot.Portal,{children:(0,nt.jsx)(ot.Content,{ref:r,align:t,sideOffset:a,className:y("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ma.displayName=ot.Content.displayName;var Ma=require("date-fns");var Ho=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,te.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),s=n=>{n.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},m=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,nt.jsx)(Ge,{open:e,onOpenChange:m,children:(0,nt.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,nt.jsx)(ze,{children:(0,nt.jsx)(He,{children:"Add New Sprint"})}),(0,nt.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"name",children:"Sprint Name *"}),(0,nt.jsx)(X,{id:"name",value:o.name,onChange:n=>r(u=>({...u,name:n.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{htmlFor:"description",children:"Description"}),(0,nt.jsx)(De,{id:"description",value:o.description,onChange:n=>r(u=>({...u,description:n.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{children:"Start Date *"}),(0,nt.jsxs)(Ra,{children:[(0,nt.jsx)(Ea,{asChild:!0,children:(0,nt.jsxs)(S,{variant:"outline",className:y("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,nt.jsx)(st.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,Ma.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,nt.jsx)(ma,{className:"w-auto p-0",align:"start",children:(0,nt.jsx)(ca,{mode:"single",selected:o.startDate,onSelect:n=>r(u=>({...u,startDate:n})),initialFocus:!0})})]})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)(E,{children:"End Date *"}),(0,nt.jsxs)(Ra,{children:[(0,nt.jsx)(Ea,{asChild:!0,children:(0,nt.jsxs)(S,{variant:"outline",className:y("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,nt.jsx)(st.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,Ma.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,nt.jsx)(ma,{className:"w-auto p-0",align:"start",children:(0,nt.jsx)(ca,{mode:"single",selected:o.endDate,onSelect:n=>r(u=>({...u,endDate:n})),initialFocus:!0,disabled:n=>o.startDate?n<o.startDate:!1})})]})]})]}),(0,nt.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,nt.jsx)(S,{type:"button",variant:"outline",onClick:m,children:"Cancel"}),(0,nt.jsx)(S,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Vo=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:s,onUpdateSprint:m,onDeleteSprint:n})=>{let[u,p]=(0,te.useState)([]),[c,g]=(0,te.useState)(new Set),[R,k]=(0,te.useState)(null),[b,I]=(0,te.useState)(!1),[x,V]=(0,te.useState)(null),[q,N]=(0,te.useState)(null),[F,ie]=(0,te.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[C,G]=(0,te.useState)([]),[Q,z]=(0,te.useState)("upcoming"),[be,Pe]=(0,te.useState)(!1),[A,Re]=(0,te.useState)(0),ce=(0,te.useRef)(null),Ye=(0,te.useRef)(null);(0,te.useEffect)(()=>{let d=()=>{ce.current&&Re(ce.current.offsetHeight)};d();let f=new ResizeObserver(d);return ce.current&&f.observe(ce.current),()=>f.disconnect()},[]);let he=d=>t.find(f=>f.id===Number(d)),rt=d=>a.find(f=>f.id===Number(d)),et=d=>{let f={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return f[d]||f.medium},je=d=>{if(!d||d?.length===0)return"";let f=d?.trim().split(" ");if(f?.length===1)return f[0];let L=f[0],j=f[f.length-1][0].toUpperCase();return`${L} ${j}`},We=d=>{let f={},L=[];return d.forEach(j=>{j.epic?(f[ve(j.epic)]||(f[ve(j.epic)]=[]),f[ve(j.epic)].push(j)):L.push(j)}),{tasksByEpic:f,unassignedTasks:L}};(0,te.useEffect)(()=>{G(a)},[a]);let h=C.filter(d=>{switch(Q){default:return!0}}),W=C.filter(d=>u.includes(d.id.toString())),ne=e.filter(d=>!d.sprint||d.status==="backlog"),_e=ne.reduce((d,f)=>d+(f.storyPoints||0),0),Z=d=>{p(f=>f.includes(d)?f.filter(L=>L!==d):f?.length<3?[...f,d]:f)},Ue=d=>{g(f=>{let L=new Set(f);return L.has(d)?L.delete(d):L.add(d),L})},At=d=>{s(d),I(!1)},it=d=>{N(d.id.toString()),ie({name:d.name,description:d.description||"",startDate:d.startDate?new Date(d.startDate).toISOString().split("nt")[0]:d.startDate,endDate:d.endDate?new Date(d.endDate).toISOString().split("nt")[0]:d.endDate,isActive:!1})},Gt=()=>{q&&(m(q,{name:F.name,description:F.description,startDate:F.startDate,endDate:F.endDate}),G(d=>d.map(f=>(f.id===Number(q)&&(f.name=F.name,f.description=F.description,f.startDate=F.startDate,f.endDate=F.endDate),f))),N(null))},ut=()=>{N(null),ie({name:"",description:"",startDate:"",endDate:"",isActive:!1})},wt=(d,f)=>{k(f),d.dataTransfer.effectAllowed="move"},Mt=d=>{d.preventDefault(),d.dataTransfer.dropEffect="move"},gt=d=>{V(d)},It=()=>{V(null)},Ft=(d,f)=>{if(d.preventDefault(),V(null),!R)return;(ve(R.sprint)||void 0)!==Number(f)&&o(R.id.toString(),{sprint:Number(f)}),k(null)},w=({task:d,showSprint:f=!1})=>{let L=d.epic?he(ve(d.epic).toString()):null,j=d.sprint?rt(ve(d.sprint).toString()):null;return(0,nt.jsx)(oe,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:Ie=>{Ie.dataTransfer.effectAllowed="move",Ie.dataTransfer.setData("text/plain",d.id.toString()),wt(Ie,d)},onClick:Ie=>{R===null&&r(d)},style:{userSelect:"none"},children:(0,nt.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,nt.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,nt.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:d.name}),(0,nt.jsx)(se,{className:`text-xs ${et(d.priority||"medium")}`,children:d.priority?.[0]?.toUpperCase()})]}),(0,nt.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-1",children:[L&&(0,nt.jsx)("div",{className:`w-2 h-2 rounded-full ${L.color}`}),(0,nt.jsx)("span",{className:"text-muted-foreground truncate",children:L?.name})]}),(0,nt.jsx)("span",{className:"text-muted-foreground",children:je(d.assignee?.value?.name)})]}),f&&j&&(0,nt.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,nt.jsx)(st.Calendar,{className:"h-3 w-3"}),(0,nt.jsx)("span",{children:j.name})]})]})})};return(0,nt.jsxs)("div",{ref:Ye,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,nt.jsx)("div",{ref:ce,className:"flex-shrink-0",children:(0,nt.jsx)(at,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-nt-r from-orange-600 via-amber-600 nt-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>I(!0)}})}),(0,nt.jsx)("div",{className:"flex-1 min-h-0 te-8",children:(0,nt.jsxs)("div",{className:"h-full",style:{height:A>0?`calc(100vh - ${A+120}px)`:"calc(100vh - 12rem)"},children:[(0,nt.jsxs)("div",{className:"mb-4",children:[(0,nt.jsx)(oe,{className:"p-3 bg-card shadow-sm",children:(0,nt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-3",children:[(0,nt.jsxs)("div",{children:[(0,nt.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,nt.jsxs)("p",{className:"text-xs text-muted-foreground",children:[u?.length,"/3 selected"]})]}),u?.length>0&&(0,nt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,nt.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,nt.jsx)("div",{className:"flex flex-wrap gap-1",children:W.map(d=>(0,nt.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,nt.jsx)("span",{className:"max-w-[80px] truncate",children:d.name}),(0,nt.jsx)("button",{onClick:()=>Z(d.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,nt.jsx)(st.X,{className:"h-4 w-4"})})]},d.id))})]})]}),(0,nt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,nt.jsxs)(S,{onClick:()=>I(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,nt.jsx)(st.Plus,{className:"h-3 w-3"}),"Add"]}),(0,nt.jsxs)(S,{onClick:()=>Pe(!be),variant:"outline",size:"sm",className:"gap-1",children:[(0,nt.jsx)(st.Calendar,{className:"h-3 w-3"}),be?"Close":"Select"]})]})]})}),be&&(0,nt.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>Pe(!1)}),(0,nt.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-nt shadow-xl z-10 transition-all duration-300 ease-in-out ${be?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,nt.jsxs)(oe,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,nt.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,nt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,nt.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,nt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>Pe(!1),className:"h-8 w-8 p-0",children:(0,nt.jsx)(st.X,{className:"h-4 w-4"})})]}),(0,nt.jsx)("p",{className:"text-sm text-muted-foreground te-1",children:"Choose up nt 3 sprints nt view in your planning board"})]}),(0,nt.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,nt.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(d=>(0,nt.jsxs)(S,{variant:Q===d.key?"default":"outline",size:"sm",onClick:()=>z(d.key),className:"text-xs h-8 px-3 flex-1",children:[d.label," (",d.count,")"]},d.key))}),(0,nt.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:h.length>0?h.map(d=>{let f=u.includes(d.id.toString()),L=e.filter(pe=>ve(pe.sprint)===d.id).length,j=!f&&u.length<3;return(0,nt.jsx)("div",{className:`p-3 rounded-lg border transition-all ${f?"bg-primary/10 border-primary/30":j?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:q===d.id.toString()?(0,nt.jsxs)("div",{className:"space-y-3",children:[(0,nt.jsx)(X,{value:F.name,onChange:pe=>ie(me=>({...me,name:pe.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,nt.jsx)(De,{value:F.description,onChange:pe=>ie(me=>({...me,description:pe.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,nt.jsxs)("div",{className:"flex gap-2",children:[(0,nt.jsxs)(S,{size:"sm",onClick:()=>Gt(),className:"flex-1",children:[(0,nt.jsx)(st.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,nt.jsxs)(S,{size:"sm",variant:"outline",onClick:ut,className:"flex-1",children:[(0,nt.jsx)(st.X,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,nt.jsxs)("div",{children:[(0,nt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,nt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,nt.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:d.name}),(0,nt.jsx)(se,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,nt.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:d.description}),(0,nt.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,nt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,nt.jsx)(st.CalendarDays,{className:"h-3 w-3"}),new Date(d.startDate).toLocaleDateString()]}),(0,nt.jsxs)("span",{className:"flex items-center gap-1",children:[(0,nt.jsx)(st.User,{className:"h-3 w-3"}),L," tasks"]})]})]}),(0,nt.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,nt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>it(d),className:"h-6 w-6 p-0",children:(0,nt.jsx)(st.Edit2,{className:"h-3 w-3"})}),(0,nt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>n(d.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,nt.jsx)(st.Trash2,{className:"h-3 w-3"})})]})]}),(0,nt.jsx)("div",{className:"flex items-center justify-between te-2",children:(0,nt.jsx)(S,{variant:f?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>Z(d.id.toString()),disabled:!f&&u?.length>=3,children:(0,nt.jsx)("span",{className:"pointer-events-none select-none",children:f?"Deselect":u?.length>=3?"Limit Reached":"Select"})})})]})},d.id)}):(0,nt.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,nt.jsx)(st.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,nt.jsxs)("p",{className:"text-sm",children:['No sprints found for "',Q,'" filter']}),(0,nt.jsx)(S,{variant:"link",size:"sm",onClick:()=>z("all"),className:"text-xs",children:"Show all sprints"})]})}),u?.length===0&&(0,nt.jsx)("div",{className:"te-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,nt.jsxs)("div",{className:"text-center",children:[(0,nt.jsx)(st.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,nt.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints nt start planning"}),(0,nt.jsx)("p",{className:"text-xs text-muted-foreground te-1",children:"Choose up nt 3 sprints nt view alongside your backlog"})]})})]})]})})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,nt.jsx)("div",{className:"lg:col-span-1",children:(0,nt.jsxs)(oe,{className:"p-4 h-full bg-card border-nt-4 border-nt-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Mt,onDragEnter:()=>gt("backlog"),onDragLeave:It,onDrop:d=>Ft(d,"backlog"),style:{height:A>0?`calc(100vh - ${A+200}px)`:"calc(100vh - 16rem)"},children:[(0,nt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,nt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,nt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,nt.jsxs)(se,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[ne?.length," tasks"]}),(0,nt.jsxs)(se,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[_e," pts"]})]})]}),(0,nt.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${x==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:d,unassignedTasks:f}=We(ne);return(0,nt.jsxs)(nt.Fragment,{children:[Object.entries(d).map(([L,j])=>{let pe=he(L);if(!pe)return null;let me=c.has(L);return(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue(L),children:[(0,nt.jsx)("div",{className:`w-3 h-3 rounded-full ${pe.color}`}),(0,nt.jsx)("span",{className:"font-medium text-muted-foreground",children:pe.name}),(0,nt.jsxs)("span",{className:"text-muted-foreground",children:["(",j?.length,")"]}),(0,nt.jsx)("div",{className:"ml-auto",children:me?(0,nt.jsx)(st.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,nt.jsx)(st.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!me&&(0,nt.jsx)("div",{className:"space-y-2 pl-2",children:j.map(Ie=>(0,nt.jsx)(w,{task:Ie},Ie.id))})]},L)}),f?.length>0&&(()=>{let L=c.has("eo-epic");return(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue("eo-epic"),children:[(0,nt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,nt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,nt.jsxs)("span",{className:"text-muted-foreground",children:["(",f?.length,")"]}),(0,nt.jsx)("div",{className:"ml-auto",children:L?(0,nt.jsx)(st.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,nt.jsx)(st.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!L&&(0,nt.jsx)("div",{className:"space-y-2 pl-2",children:f?.map(j=>(0,nt.jsx)(w,{task:j},j.id))})]})})(),ne?.length===0&&(0,nt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here nt move nt backlog"}),ne?.length>0&&Object.keys(d).length===0&&f.length===0&&(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),ne?.map(L=>(0,nt.jsx)(w,{task:L},L.id))]})]})})()})]})}),W.map(d=>{let f=e.filter(j=>ve(j?.sprint)===d.id),L=f.reduce((j,pe)=>j+(pe?.storyPoints||0),0);return(0,nt.jsxs)(oe,{className:"p-4 h-full bg-card border-nt-4 border-nt-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Mt,onDragEnter:()=>gt(d.id.toString()),onDragLeave:It,onDrop:j=>Ft(j,d.id.toString()),style:{height:A>0?`calc(100vh - ${A+200}px)`:"calc(100vh - 16rem)"},children:[(0,nt.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,nt.jsx)("div",{children:(0,nt.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:d.name})}),(0,nt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,nt.jsxs)(se,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[f?.length," tasks"]}),(0,nt.jsxs)(se,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[L," pts"]}),(0,nt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>{Pe(!0),it(d)},className:"h-6 px-2",children:(0,nt.jsx)(st.Edit2,{className:"h-3 w-3"})}),(0,nt.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>n(d.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,nt.jsx)(st.Trash2,{className:"h-3 w-3"})})]})]}),(0,nt.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:j,unassignedTasks:pe}=We(f);return(0,nt.jsxs)(nt.Fragment,{children:[Object.entries(j).map(([me,Ie])=>{let jt=he(me);if(!jt)return null;let Wt=c.has(me);return(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue(me),children:[(0,nt.jsx)("div",{className:`w-3 h-3 rounded-full ${jt.color}`}),(0,nt.jsx)("span",{className:"font-medium text-muted-foreground",children:jt.name}),(0,nt.jsxs)("span",{className:"text-muted-foreground",children:["(",Ie?.length,")"]}),(0,nt.jsx)("div",{className:"ml-auto",children:Wt?(0,nt.jsx)(st.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,nt.jsx)(st.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Wt&&(0,nt.jsx)("div",{className:"space-y-2 pl-2",children:Ie?.map(_t=>(0,nt.jsx)(w,{task:_t},_t.id))})]},me)}),pe?.length>0&&(()=>{let me=c.has("eo-epic");return(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue("eo-epic"),children:[(0,nt.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,nt.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,nt.jsxs)("span",{className:"text-muted-foreground",children:["(",pe?.length,")"]}),(0,nt.jsx)("div",{className:"ml-auto",children:me?(0,nt.jsx)(st.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,nt.jsx)(st.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!me&&(0,nt.jsx)("div",{className:"space-y-2 pl-2",children:pe?.map(Ie=>(0,nt.jsx)(w,{task:Ie},Ie.id))})]})})(),f?.length===0&&(0,nt.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},d.id)})]}),(0,nt.jsx)(Ho,{isOpen:b,onClose:()=>I(!1),onAddSprint:At})]})})]})};var yi=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),wi=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Ia=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,s]=t.split(":");o.setHours(parseInt(r),parseInt(s))}return o<a},Fa=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Ni=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Ci=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,s]=(0,te.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[m,n]=(0,te.useState)(!1),u=c=>{if(c.preventDefault(),!e.find(k=>k?.id.toString()===r.colleagueId.toString())){console.error("No valid colleague selected"),n(!0);return}n(!1);let R={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(R),o(!1),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,te.useEffect)(()=>{r.colleagueId&&n(!1)},[r.colleagueId]);let p=e.filter(Boolean);return(0,nt.jsx)(Ge,{open:a,onOpenChange:o,children:(0,nt.jsxs)(Oe,{className:"max-w-2xl",children:[(0,nt.jsx)(ze,{children:(0,nt.jsx)(He,{children:"Add New Reminder"})}),(0,nt.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,nt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"title",children:"Title"}),(0,nt.jsx)(X,{id:"title",value:r.title,onChange:c=>s({...r,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"description",children:"Description"}),(0,nt.jsx)(De,{id:"description",value:r.description,onChange:c=>s({...r,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"dueDate",children:"Due Date"}),(0,nt.jsx)(X,{id:"dueDate",type:"date",value:r.dueDate,onChange:c=>s({...r,dueDate:c.target.value}),required:!0})]}),(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,nt.jsx)(X,{id:"dueTime",type:"time",value:r.dueTime,onChange:c=>s({...r,dueTime:c.target.value})})]})]}),(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{className:`${m?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,nt.jsxs)(Fe,{value:r.colleagueId,onValueChange:c=>{s({...r,colleagueId:c})},required:!0,children:[(0,nt.jsx)(Ee,{className:`${m?"text-destructive border-red-500":""}`,children:(0,nt.jsx)(Qe,{className:`${m?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(c=>c?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,nt.jsx)(Ae,{children:p.map(c=>(0,nt.jsx)(re,{value:c.id.toString(),children:c.name},c.id))})]}),m&&(0,nt.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,nt.jsxs)("div",{className:"space-y-2",children:[(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:c=>s({...r,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,nt.jsx)(E,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,nt.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,nt.jsxs)(Fe,{value:r.recurrencePattern,onValueChange:c=>s({...r,recurrencePattern:c}),children:[(0,nt.jsx)(Ee,{children:(0,nt.jsx)(Qe,{})}),(0,nt.jsxs)(Ae,{children:[(0,nt.jsx)(re,{value:"daily",children:"Daily"}),(0,nt.jsx)(re,{value:"weekly",children:"Weekly"}),(0,nt.jsx)(re,{value:"monthly",children:"Monthly"}),(0,nt.jsx)(re,{value:"yearly",children:"Yearly"})]})]})]}),(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"recurrenceInterval",children:"Every"}),(0,nt.jsx)(X,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:c=>s({...r,recurrenceInterval:parseInt(c.target.value)})})]})]})]}),(0,nt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,nt.jsx)(S,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,nt.jsx)(S,{type:"submit",children:"Add Reminder"})]})]})]})})},Si=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[s,m]=(0,te.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("nt")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),n=p=>{p.preventDefault(),a(e.id.toString(),{title:s.title,description:s.description,dueDate:new Date(s.dueDate||"").toISOString(),dueTime:s.dueTime||void 0,isRecurring:s.isRecurring}),r()},u=t.filter(Boolean);return(0,nt.jsx)(Ge,{open:o,onOpenChange:r,children:(0,nt.jsxs)(Oe,{className:"max-w-2xl",children:[(0,nt.jsx)(ze,{children:(0,nt.jsx)(He,{children:"Edit Reminder"})}),(0,nt.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,nt.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"edit-title",children:"Title"}),(0,nt.jsx)(X,{id:"edit-title",value:s.title,onChange:p=>m({...s,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"edit-description",children:"Description"}),(0,nt.jsx)(De,{id:"edit-description",value:s.description||"",onChange:p=>m({...s,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,nt.jsx)(X,{id:"edit-dueDate",type:"date",value:s.dueDate,onChange:p=>m({...s,dueDate:p.target.value}),required:!0})]}),(0,nt.jsxs)("div",{children:[(0,nt.jsx)(E,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,nt.jsx)(X,{id:"edit-dueTime",type:"time",value:s.dueTime,onChange:p=>m({...s,dueTime:p.target.value})})]})]}),(0,nt.jsx)("div",{className:"space-y-2",children:(0,nt.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,nt.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:s.isRecurring||!1,onChange:p=>m({...s,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,nt.jsx)(E,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,nt.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,nt.jsx)(S,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,nt.jsx)(S,{type:"submit",children:"Save Changes"})]})]})]})})},ki=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,s]=(0,te.useState)(!1);if(!e||!e.id)return null;let m=Ia(new Date(e.dueDate||""),e.dueTime||""),n=Fa(new Date(e.dueDate||"")),u=Ni(new Date(e.dueDate||"")),p=()=>{a(e.id.toString(),{})},c=()=>n?"Today":u?"Tomorrow":yi(new Date(e.dueDate||""));return(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsx)(Si,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>s(!1)}),(0,nt.jsx)(oe,{children:(0,nt.jsx)(Ot,{className:"p-4",children:(0,nt.jsxs)("div",{className:"flex items-start justify-between",children:[(0,nt.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,nt.jsx)("button",{onClick:p,className:"te-1 text-primary hover:text-primary/80"}),(0,nt.jsxs)("div",{className:"flex-1",children:[(0,nt.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,nt.jsx)("h3",{children:e.title})}),(0,nt.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,nt.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,nt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,nt.jsx)(st.Calendar,{className:"h-4 w-4"}),(0,nt.jsx)("span",{className:m?"text-destructive font-medium":"",children:c()})]}),e.dueTime&&(0,nt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,nt.jsx)(st.Clock,{className:"h-4 w-4"}),(0,nt.jsx)("span",{children:wi(e.dueTime)})]}),(0,nt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,nt.jsx)(st.User,{className:"h-4 w-4"}),(0,nt.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,nt.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,nt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>s(!0),className:"h-8 w-8 p-0",children:(0,nt.jsx)(st.Edit2,{className:"h-4 w-4"})}),(0,nt.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,nt.jsx)(st.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Uo=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[s,m]=(0,te.useState)(e.filter(Boolean)),[n,u]=(0,te.useState)(t.filter(Boolean)),[p,c]=(0,te.useState)("all"),[g,R]=(0,te.useState)(""),[k,b]=(0,te.useState)(!1);(0,te.useEffect)(()=>{m(e.filter(Boolean))},[e]),(0,te.useEffect)(()=>{u(t.filter(Boolean))},[t]);let I=C=>{if(!C.title){console.error("Invalid reminder data:",C);return}let G={...C,id:Date.now(),createdAt:new Date().toISOString()};m(Q=>[...Q,G]),a?.(C)},x=(C,G)=>{if(!C){console.error("No reminder ID provided for update");return}m(Q=>Q.map(z=>z?.id.toString()===C?{...z,...G}:z)),o?.(C,G)},V=C=>{if(!C){console.error("No reminder ID provided for deletion");return}m(G=>G.filter(Q=>Q?.id.toString()!==C)),r?.(C)},N=s.filter(C=>{if(!C)return!1;if(g){let G=g.toLowerCase();if(!(C.title.toLowerCase().includes(G)||C.description?.toLowerCase().includes(G)))return!1}switch(p){case"pending":case"completed":case"overdue":return Ia(new Date(C.dueDate||""),C.dueTime||"");case"today":return Fa(new Date(C.dueDate||""));default:return!0}}).sort((C,G)=>{if(!C||!G)return 0;let Q={high:3,medium:2,low:1},z=0;return z!==0?z:new Date(C.dueDate||"").getTime()-new Date(G.dueDate||"").getTime()}),F={total:s.filter(Boolean).length,overdue:s.filter(C=>C&&Ia(new Date(C.dueDate||""),C.dueTime||"")).length,today:s.filter(C=>C&&Fa(new Date(C.dueDate||""))).length},ie=n.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,nt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,nt.jsx)(at,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-nt-r from-emerald-600 via-teal-600 nt-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,nt.jsxs)("div",{className:"h-full bg-background",children:[(0,nt.jsx)(Ci,{colleagues:n,onAddReminder:I,open:k,setOpen:b}),(0,nt.jsxs)("div",{className:"p-6",children:[(0,nt.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,nt.jsxs)("div",{children:[(0,nt.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,nt.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,nt.jsxs)(S,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,nt.jsx)(st.Plus,{className:"h-4 w-4"}),(0,nt.jsx)("span",{children:"Add Reminder"})]})]}),(0,nt.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,nt.jsxs)(oe,{className:"p-4",children:[(0,nt.jsx)("div",{className:"text-2xl font-bold text-foreground",children:F.total}),(0,nt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,nt.jsxs)(oe,{className:"p-4",children:[(0,nt.jsx)("div",{className:"text-2xl font-bold text-primary",children:F.overdue}),(0,nt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,nt.jsxs)(oe,{className:"p-4",children:[(0,nt.jsx)("div",{className:"text-2xl font-bold text-success",children:F.today}),(0,nt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,nt.jsxs)(oe,{className:"p-4",children:[(0,nt.jsx)("div",{className:"text-2xl font-bold text-destructive",children:F.overdue}),(0,nt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,nt.jsxs)(oe,{className:"p-4",children:[(0,nt.jsx)("div",{className:"text-2xl font-bold text-warning",children:F.today}),(0,nt.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,nt.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,nt.jsx)("div",{className:"flex-1",children:(0,nt.jsx)(X,{placeholder:"Search reminders...",value:g,onChange:C=>R(C.target.value),className:"max-w-md"})}),(0,nt.jsxs)(Fe,{value:p,onValueChange:C=>c(C),children:[(0,nt.jsx)(Ee,{className:"w-40",children:(0,nt.jsx)(Qe,{})}),(0,nt.jsxs)(Ae,{children:[(0,nt.jsxs)(re,{value:"all",children:["All (",F.total,")"]}),(0,nt.jsxs)(re,{value:"overdue",children:["Overdue (",F.overdue,")"]}),(0,nt.jsxs)(re,{value:"overdue",children:["Overdue (",F.overdue,")"]}),(0,nt.jsxs)(re,{value:"today",children:["Today (",F.today,")"]})]})]})]}),(0,nt.jsx)("div",{className:"space-y-4",children:N.length===0?(0,nt.jsxs)(oe,{className:"p-8 text-center",children:[(0,nt.jsx)("div",{className:"text-muted-foreground",children:g||p!=="all"?"No reminders match your filters":"No reminders yet"}),!g&&p==="all"&&(0,nt.jsx)("p",{className:"text-sm text-muted-foreground/60 te-2",children:"Create your first reminder nt get started"})]}):N.map(C=>C&&(0,nt.jsx)(ki,{reminder:C,colleagues:n,onUpdateReminder:x,onDeleteReminder:V},C.id))})]})]})]})};var Et=ue(require("@radix-ui/react-tabs"));function $o({className:e,...t}){return(0,nt.jsx)(Et.Root,{"data-slot":"tabs",className:y("flex flex-col gap-2",e),...t})}function Go({className:e,...t}){return(0,nt.jsx)(Et.List,{"data-slot":"tabs-list",className:y("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function jo({className:e,...t}){return(0,nt.jsx)(Et.Trigger,{"data-slot":"tabs-trigger",className:y("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var pt=ue(require("react")),$=ue(require("@radix-ui/react-dropdown-menu")),$t=require("@radix-ui/react-icons");var Wo=$.Root,_o=$.Trigger;var Di=pt.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,nt.jsxs)($.SubTrigger,{ref:r,className:y("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,nt.jsx)($t.ChevronRightIcon,{className:"ml-auto"})]}));Di.displayName=$.SubTrigger.displayName;var Ti=pt.forwardRef(({className:e,...t},a)=>(0,nt.jsx)($.SubContent,{ref:a,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ti.displayName=$.SubContent.displayName;var La=pt.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,nt.jsx)($.Portal,{children:(0,nt.jsx)($.Content,{ref:o,sideOffset:t,className:y("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));La.displayName=$.Content.displayName;var Ba=pt.forwardRef(({className:e,inset:t,...a},o)=>(0,nt.jsx)($.Item,{ref:o,className:y("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Ba.displayName=$.Item.displayName;var Pi=pt.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,nt.jsxs)($.CheckboxItem,{ref:r,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,nt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,nt.jsx)($.ItemIndicator,{children:(0,nt.jsx)($t.CheckIcon,{className:"h-4 w-4"})})}),t]}));Pi.displayName=$.CheckboxItem.displayName;var Ri=pt.forwardRef(({className:e,children:t,...a},o)=>(0,nt.jsxs)($.RadioItem,{ref:o,className:y("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,nt.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,nt.jsx)($.ItemIndicator,{children:(0,nt.jsx)($t.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Ri.displayName=$.RadioItem.displayName;var Ei=pt.forwardRef(({className:e,inset:t,...a},o)=>(0,nt.jsx)($.Label,{ref:o,className:y("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Ei.displayName=$.Label.displayName;var Ai=pt.forwardRef(({className:e,...t},a)=>(0,nt.jsx)($.Separator,{ref:a,className:y("-mx-1 my-1 h-px bg-muted",e),...t}));Ai.displayName=$.Separator.displayName;var Mi=({className:e,...t})=>(0,nt.jsx)("span",{className:y("ml-auto text-xs tracking-widest opacity-60",e),...t});Mi.displayName="DropdownMenuShortcut";function qo({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:s=6}){let m=a.find(n=>n.value===e);return(0,nt.jsxs)(Mo.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,nt.jsx)("div",{className:"hidden lg:block",children:(0,nt.jsx)($o,{value:e,onValueChange:t,children:(0,nt.jsx)(Go,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,nt.jsx)(Mo.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,nt.jsx)(jo,{value:n.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,nt.jsx)("div",{className:"lg:hidden",children:(0,nt.jsxs)(Wo,{children:[(0,nt.jsx)(_o,{asChild:!0,children:(0,nt.jsxs)(S,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[m?.label||"Select",(0,nt.jsx)(st.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,nt.jsx)(La,{align:"center",className:"w-[180px]",children:a.map(n=>(0,nt.jsx)(Ba,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}var Ii=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function ua({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:s}){return(0,nt.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${s||""}`,children:[r&&(0,nt.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,nt.jsx)("div",{className:"col-span-6",children:"Name"}),(0,nt.jsx)("div",{className:"col-span-2",children:"Size"}),(0,nt.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,nt.jsx)("div",{className:"divide-y",children:e.map(m=>(0,nt.jsxs)(Mo.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(m),children:[(0,nt.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,nt.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,nt.jsx)("div",{children:(0,nt.jsx)("p",{className:"font-medium",children:m.name})})]}),(0,nt.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:Ii(m.filesize)}),(0,nt.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,nt.jsx)("span",{className:"text-sm md:text-base",children:new Date(m.createdAt).toLocaleDateString()}),(0,nt.jsx)("div",{className:"flex gap-1",children:(0,nt.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:n=>{n.stopPropagation(),o?.(m)},children:(0,nt.jsx)(st.Trash2,{className:"h-4 w-4"})})})]})]},m.name))})]})}var Zo=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,r]=(0,te.useState)(null),[s,m]=(0,te.useState)(""),[n,u]=(0,te.useState)(""),[p,c]=(0,te.useState)(""),g=k=>{let b=k.target.files?.[0];b&&(r(b),s||m(b.name))},R=async k=>{if(k.preventDefault(),!o)return;let b=new FormData;b.append("file",o),b.append("name",s),n&&b.append("description",n),p&&b.append("tags",p),a?.(b),t(),r(null),m(""),u(""),c("")};return(0,nt.jsx)(Ge,{open:e,onOpenChange:t,children:(0,nt.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,nt.jsx)(ze,{children:(0,nt.jsx)(He,{children:"Add New File"})}),(0,nt.jsxs)("form",{onSubmit:R,className:"grid gap-4",children:[(0,nt.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,nt.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,nt.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,nt.jsx)(Fi,{className:"w-10 h-10 text-gray-400"}),(0,nt.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,nt.jsx)("span",{className:"font-semibold",children:"Click nt upload"})," or drag and drop"]}),(0,nt.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,nt.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:g})]})}),o&&(0,nt.jsxs)("div",{className:"flex items-center justify-between",children:[(0,nt.jsxs)("div",{children:[(0,nt.jsx)("p",{className:"font-medium",children:o.name}),(0,nt.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,nt.jsx)(S,{type:"submit",onClick:R,children:"Upload"})]})]})]})})};function Fi(e){return(0,nt.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,nt.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,nt.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,nt.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function za({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:s=!1,className:m}){let[n,u]=(0,te.useState)(e),[p,c]=(0,te.useState)(""),[g,R]=(0,te.useState)("all"),[k,b]=(0,te.useState)("all"),[I,x]=(0,te.useState)(!1);(0,te.useEffect)(()=>{u(e)},[e]);let V=n.filter(z=>z.name.toLowerCase().includes(p.toLowerCase())),q=V.slice(0,10),N=V.filter(Boolean),F=()=>{x(!0)},ie=z=>{a?.(z)},C=z=>{console.log("deleting file",z),u(be=>be.filter(Pe=>Pe.name!==z.name)),o?.(z.id.toString())},G=z=>{r?.(z)},Q=()=>{c(""),R("all")};return(0,nt.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,nt.jsx)(Mo.AnimatePresence,{mode:"wait",children:(0,nt.jsx)(Mo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,nt.jsxs)("div",{className:`space-y-6 ${m||""}`,children:[(0,nt.jsx)(at,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-nt-r from-blue-600 via-indigo-600 nt-purple-600",primaryAction:{label:"Upload file",onClick:F},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,nt.jsx)(oe,{children:(0,nt.jsx)(Ot,{className:"pt-6",children:(0,nt.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,nt.jsx)("div",{className:"flex-1",children:(0,nt.jsxs)("div",{className:"relative",children:[(0,nt.jsx)(st.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,nt.jsx)(X,{placeholder:"Search files...",value:p,onChange:z=>c(z.target.value),className:"pl-9"})]})}),(p||g!=="all")&&(0,nt.jsxs)(S,{variant:"outline",onClick:Q,className:"gap-2",children:[(0,nt.jsx)(st.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,nt.jsxs)("div",{className:"space-y-4",children:[(0,nt.jsx)(qo,{activeTab:k,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${V.length})`},{value:"recent",label:`Recent (${q.length})`}],maxWidth:"500px",gridCols:3}),k==="all"&&(0,nt.jsx)(ua,{files:V,onFileClick:G,onFileEdit:ie,onFileDelete:C,showHeader:!s}),k==="recent"&&(0,nt.jsx)(ua,{files:q,onFileClick:G,onFileEdit:ie,onFileDelete:C,showHeader:!s}),k==="shared"&&(0,nt.jsx)(ua,{files:N,onFileClick:G,onFileEdit:ie,onFileDelete:C,showHeader:!s})]}),V.length===0&&(0,nt.jsx)(oe,{children:(0,nt.jsx)(Ot,{className:"pt-6",children:(0,nt.jsxs)("div",{className:"text-center py-8",children:[(0,nt.jsx)(st.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,nt.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,nt.jsx)("p",{className:"text-muted-foreground mb-4",children:p||g!=="all"?"Try adjusting your filters nt see more results.":"Get started by uploading your first file."}),(0,nt.jsxs)(S,{onClick:F,className:"gap-2",children:[(0,nt.jsx)(st.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,nt.jsx)(Zo,{isOpen:I,onClose:()=>x(!1),onAddFile:t})]})}var Yo=require("next/navigation");function Qo({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:s=[],initialColleagues:m=[],initialUsers:n=[],initialFiles:u=[],initialView:p="kanban",onAddTask:c,onUpdateTask:g,onDeleteTask:R,onTaskClick:k,onAddEpic:b,onUpdateEpic:I,onDeleteEpic:x,onAddTaskToEpic:V,onAddSprint:q,onUpdateSprint:N,onDeleteSprint:F,onAddProject:ie,onUpdateProject:C,onDeleteProject:G,onFileAdd:Q,onFileEdit:z,onFileDelete:be,onFileClick:Pe,onAddReminder:A,onUpdateReminder:Re,onDeleteReminder:ce,onViewChange:Ye,onToggleMobileMenu:he,onTeamClick:rt,onTeamChange:et,onCopilotClick:je,handleAddComment:We}){let[h,W]=(0,te.useState)(t),[ne,_e]=(0,te.useState)(a),[Z,Ue]=(0,te.useState)(o),[At,it]=(0,te.useState)(r),[Gt,ut]=(0,te.useState)(s),[wt,Mt]=(0,te.useState)(m),[gt,It]=(0,te.useState)(n),[Ft,w]=(0,te.useState)(u),[d,f]=(0,te.useState)(!1),[L,j]=(0,te.useState)(!1),[pe,me]=(0,te.useState)(null),[Ie,jt]=(0,te.useState)(null),[Wt,_t]=(0,te.useState)(null),[Nt,Ha]=(0,te.useState)(p||"kanban"),[Bi,er]=(0,te.useState)(!1),tr=(0,Yo.useRouter)();(0,te.useEffect)(()=>{W(t)},[t]),(0,te.useEffect)(()=>{Ue(o)},[o]),(0,te.useEffect)(()=>{_e(a)},[a]),(0,te.useEffect)(()=>{it(r)},[r]),(0,te.useEffect)(()=>{w(u)},[u]),(0,te.useEffect)(()=>{It(n)},[n]),(0,te.useEffect)(()=>{Mt(m)},[m]),(0,te.useEffect)(()=>{ut(s)},[s]),(0,te.useEffect)(()=>{Ha(p)},[p]);let ar=h.filter(v=>{}),Oi=v=>ar.filter(M=>M.status===v),zi=v=>{let M={};return ne.forEach(B=>{}),M},Hi=v=>{_t(v)},Vi=v=>{Wt&&(W(M=>M.map(B=>B.id===Wt.id?{...B,status:v}:B)),_t(null))},Va=v=>{let M={...v,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};W(B=>[...B,M]),c?.(M)},ea=async(v,M)=>(W(B=>B.map(we=>we.id===Number(v)?{...we,...M}:we)),await g?.(v,M)),Ui=async(v,M)=>{ea(v,M)},Ua=v=>{W(M=>M.filter(B=>B.id!==Number(v))),pe?.id===Number(v)&&me(null),R?.(v)},$nt=async v=>{Ua(v)},Gi=v=>{let M={...v,id:Date.now()};it(B=>[...B,M]),ie?.(v)},ji=(v,M)=>{it(B=>B.map(we=>we.id===Number(v)?{...we,...M}:we)),C?.(v,M)},Wi=v=>{it(M=>M.filter(B=>B.id!==Number(v))),G?.(v)},$a=v=>{let M={...v,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};_e(B=>[...B,M]),b?.({...M})},or=()=>{j(!0)},rr=(v,M)=>{_e(B=>B.map(we=>we.id===Number(v)?{...we,...M}:we)),I?.(v,M)},ir=v=>{_e(M=>M.filter(B=>B.id!==Number(v))),W(M=>M.filter(B=>ve(B.epic)!==Number(v))),x?.(v)},nr=v=>{let M={...v,id:Date.now()};Ue(B=>[...B,M]),q?.(v)},sr=(v,M)=>{Ue(B=>B.map(we=>we.id===Number(v)?{...we,...M}:we)),N?.(v,M)},lr=v=>{v==="backlog"||v==="all-tasks"||(Ue(M=>M.filter(B=>B.id!==Number(v))),W(M=>M.map(B=>ve(B.sprint)===Number(v)?{...B,sprint:void 0}:B)),F?.(v))},fa=v=>{me(v)},dr=v=>{v==="planning"&&window.innerWidth<768||(Ha(v),Ye?.(v))},_i=()=>{er(v=>!v),he?.()},Ki=()=>{tr.push("/")},qi=v=>{console.log("Switching nt team:",v)},Ji=v=>{console.log("Switching nt team:",v)},cr=v=>{f(!0)},mr=()=>{f(!1),jt(null)},pr=v=>{let M={...v,id:Date.now(),createdAt:new Date().toISOString()};ut(B=>[...B,M]),A?.(v)},ur=(v,M)=>{ut(B=>B.map(we=>we.id===Number(v)?{...we,...M}:we)),Re?.(v,M)},gr=v=>{ut(M=>M.filter(B=>B.id!==Number(v))),ce?.(v)},fr=()=>{Q?.()},vr=v=>{z?.(v)},br=v=>{w(M=>M.filter(B=>B.name!==v)),be?.(v)},hr=v=>{Pe?.(v)},Xi=[{id:"todo",title:"To te",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Zi=()=>{switch(Nt){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},va=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Yi=va.sort((v,M)=>M.lastUsed.getTime()-v.lastUsed.getTime()).slice(0,3),Qi=va.length>3,en=va.slice(3);return(0,nt.jsxs)(ja,{currentView:Nt,onViewChange:dr,children:[Nt==="kanban"&&(0,nt.jsx)("div",{className:"h-full overflow-hidden",children:(0,nt.jsx)(Io,{initialProjects:At,initialEpics:ne,initialSprints:Z.map(v=>({...v,isSelected:!1})),initialTasks:h,initialColleagues:wt,initialUsers:gt,onAddTask:Va,onUpdateTask:ea,onDeleteTask:Ua,onTaskClick:fa,onAddEpic:$a,onAddComment:We})}),Nt==="planning"&&(0,nt.jsx)("div",{className:"hidden md:block h-full",children:(0,nt.jsx)(Vo,{tasks:h,epics:ne,sprints:Z,onUpdateTask:ea,onTaskClick:fa,onAddSprint:nr,onUpdateSprint:sr,onDeleteSprint:lr})}),Nt==="tasks"&&(0,nt.jsx)("div",{className:"h-full",children:(0,nt.jsx)(Uo,{initialReminders:Gt,initialColleagues:wt,onAddReminder:pr,onUpdateReminder:ur,onDeleteReminder:gr})}),Nt==="files"&&(0,nt.jsx)("div",{className:"h-full",children:(0,nt.jsx)(za,{initialFiles:Ft,onFileAdd:fr,onFileEdit:vr,onFileDelete:br,onFileClick:hr,compactView:!1})}),Nt==="epics"&&(0,nt.jsx)("div",{className:"h-full",children:(0,nt.jsx)(Fo,{tasks:h,epics:ne,sprints:Z,onUpdateTask:ea,onTaskClick:fa,onAddTaskToEpic:cr,onAddEpic:or,onUpdateEpic:rr,onDeleteEpic:ir})}),(0,nt.jsx)(Ht,{isOpen:d,onClose:mr,onAddTask:Va,epics:ne,sprints:Z,assignees:[...wt,...gt],defaultEpicId:Ie||void 0}),(0,nt.jsx)(Ut,{isOpen:L,onClose:()=>j(!1),onAddEpic:$a})]})}
|
|
5
|
+
"use strict";"use client";var xr=Object.create;var ta=Object.defineProperty;var yr=Object.getOwnPropertyDescriptor;var wr=Object.getOwnPropertyNames;var Nr=Object.getPrototypeOf,Cr=Object.prototype.hasOwnProperty;var Sr=(e,t)=>{for(var a in t)ta(e,a,{get:t[a],enumerable:!0})},Ga=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of wr(t))!Cr.call(e,r)&&r!==a&&ta(e,r,{get:()=>t[r],enumerable:!(o=yr(t,r))||o.enumerable});return e};var ge=(e,t,a)=>(a=e!=null?xr(Nr(e)):{},Ga(t||!e||!e.__esModule?ta(a,"default",{value:e,enumerable:!0}):a,e)),kr=e=>Ga(ta({},"__esModule",{value:!0}),e);var Li={};Sr(Li,{default:()=>Qo});module.exports=kr(Li);var ae=require("react");var lt=require("lucide-react"),st=require("react/jsx-runtime"),Dr=[{key:"kanban",icon:lt.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:lt.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:lt.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:lt.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:lt.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],ja=({currentView:e,onViewChange:t,children:a})=>(0,st.jsxs)("div",{className:"flex w-full h-screen",children:[(0,st.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:Dr.map(o=>{let r=o.icon,s=e===o.key;return(0,st.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${s?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,st.jsx)(r,{className:"h-4 w-4 flex-shrink-0"}),(0,st.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,st.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,st.jsx)("div",{className:"w-full h-full",children:a})})]});var ee=ge(require("react"));var eo=require("class-variance-authority");var Qa=require("clsx");var xa="-",Tr=e=>{let t=Rr(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:m=>{let n=m.split(xa);return n[0]===""&&n.length!==1&&n.shift(),Ka(n,t)||Pr(m)},getConflictingClassGroupIds:(m,n)=>{let u=a[m]||[];return n&&o[m]?[...u,...o[m]]:u}}},Ka=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Ka(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let s=e.join(xa);return t.validators.find(({validator:m})=>m(s))?.classGroupId},Wa=/^\[(.+)\]$/,Pr=e=>{if(Wa.test(e)){let t=Wa.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Rr=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Ar(Object.entries(e.classGroups),a).forEach(([s,m])=>{ha(m,o,s,t)}),o},ha=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let s=r===""?t:_a(t,r);s.classGroupId=a;return}if(typeof r=="function"){if(Er(r)){ha(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([s,m])=>{ha(m,_a(t,s),a,o)})})},_a=(e,t)=>{let a=e;return t.split(xa).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Er=e=>e.isThemeGetter,Ar=(e,t)=>t?e.map(([a,o])=>{let r=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([m,n])=>[t+m,n])):s);return[a,r]}):e,Mr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(s,m)=>{a.set(s,m),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let m=a.get(s);if(m!==void 0)return m;if((m=o.get(s))!==void 0)return r(s,m),m},set(s,m){a.has(s)?a.set(s,m):r(s,m)}}},qa="!",Ir=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],s=t.length,m=n=>{let u=[],p=0,c=0,g;for(let x=0;x<n.length;x++){let U=n[x];if(p===0){if(U===r&&(o||n.slice(x,x+s)===t)){u.push(n.slice(c,x)),c=x+s;continue}if(U==="/"){g=x;continue}}U==="["?p++:U==="]"&&p--}let E=u.length===0?n:n.substring(c),k=E.startsWith(qa),b=k?E.substring(1):E,I=g&&g>c?g-c:void 0;return{modifiers:u,hasImportantModifier:k,baseClassName:b,maybePostfixModifierPosition:I}};return a?n=>a({className:n,parseClassName:m}):m},Fr=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},Lr=e=>({cache:Mr(e.cacheSize),parseClassName:Ir(e),...Tr(e)}),Br=/\s+/,Or=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,s=[],m=e.trim().split(Br),n="";for(let u=m.length-1;u>=0;u-=1){let p=m[u],{modifiers:c,hasImportantModifier:g,baseClassName:E,maybePostfixModifierPosition:k}=a(p),b=!!k,I=o(b?E.substring(0,k):E);if(!I){if(!b){n=p+(n.length>0?" "+n:n);continue}if(I=o(E),!I){n=p+(n.length>0?" "+n:n);continue}b=!1}let x=Fr(c).join(":"),U=g?x+qa:x,J=U+I;if(s.includes(J))continue;s.push(J);let y=r(I,b);for(let F=0;F<y.length;++F){let pe=y[F];s.push(U+pe)}n=p+(n.length>0?" "+n:n)}return n};function zr(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ja(t))&&(o&&(o+=" "),o+=a);return o}var Ja=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ja(e[o]))&&(a&&(a+=" "),a+=t);return a};function Hr(e,...t){let a,o,r,s=m;function m(u){let p=t.reduce((c,g)=>g(c),e());return a=Lr(p),o=a.cache.get,r=a.cache.set,s=n,n(u)}function n(u){let p=o(u);if(p)return p;let c=Or(u,a);return r(u,c),c}return function(){return s(zr.apply(null,arguments))}}var oe=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Xa=/^\[(?:([a-z-]+):)?(.+)\]$/st,Vr=/^\d+\/\d+$/,Ur=new Set(["px","full","screen"]),$r=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Gr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|ae|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|st|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,jr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)st-?((\d+)?\.?(\d+)[a-z]+|0)/,_r=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dt=e=>Lt(e)||Ur.has(e)||Vr.test(e),vt=e=>Bt(e,"length",ei),Lt=e=>!!e&&!Number.isNaN(Number(e)),ba=e=>Bt(e,"number",Lt),Kt=e=>!!e&&Number.isInteger(Number(e)),Kr=e=>e.endsWith("%")&&Lt(e.slice(0,-1)),z=e=>Xa.test(e),bt=e=>$r.test(e),qr=new Set(["length","size","percentage"]),Jr=e=>Bt(e,qr,Za),Xr=e=>Bt(e,"position",Za),Zr=new Set(["image","url"]),Yr=e=>Bt(e,Zr,ai),Qr=e=>Bt(e,"",ti),qt=()=>!0,Bt=(e,t,a)=>{let o=Xa.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},ei=e=>Gr.test(e)&&!jr.test(e),Za=()=>!1,ti=e=>Wr.test(e),ai=e=>_r.test(e);var oi=()=>{let e=oe("colors"),t=oe("spacing"),a=oe("blur"),o=oe("brightness"),r=oe("borderColor"),s=oe("borderRadius"),m=oe("borderSpacing"),n=oe("borderWidth"),u=oe("contrast"),p=oe("grayscale"),c=oe("hueRotate"),g=oe("invert"),E=oe("gap"),k=oe("gradientColorStops"),b=oe("gradientColorStopPositions"),I=oe("inset"),x=oe("margin"),U=oe("opacity"),J=oe("padding"),y=oe("saturate"),F=oe("scale"),pe=oe("sepia"),C=oe("skew"),$=oe("space"),Y=oe("translate"),j=()=>["auto","contain","none"],we=()=>["auto","hidden","clip","visible","scroll"],q=()=>["auto",z,t],D=()=>[z,t],Ne=()=>["",dt,vt],ce=()=>["auto",Lt,z],Ye=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],he=()=>["solid","dashed","dotted","double","none"],it=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],et=()=>["start","end","center","between","around","evenly","stretch"],je=()=>["","0",z],We=()=>["auto","avoid","all","avoid-page","page","left","right","column"],h=()=>[Lt,z];return{cacheSize:500,separator:":",theme:{colors:[qt],spacing:[dt,vt],blur:["none","",bt,z],brightness:h(),borderColor:[e],borderRadius:["none","","full",bt,z],borderSpacing:D(),borderWidth:Ne(),contrast:h(),grayscale:je(),hueRotate:h(),invert:je(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[Kr,vt],inset:q(),margin:q(),opacity:h(),padding:D(),saturate:h(),scale:h(),sepia:je(),skew:h(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",z]}],container:["container"],columns:[{columns:[bt]}],"break-after":[{"break-after":We()}],"break-before":[{"break-before":We()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Ye(),z]}],overflow:[{overflow:we()}],"overflow-x":[{"overflow-x":we()}],"overflow-y":[{"overflow-y":we()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[I]}],"inset-x":[{"inset-x":[I]}],"inset-y":[{"inset-y":[I]}],start:[{start:[I]}],end:[{end:[I]}],top:[{top:[I]}],right:[{right:[I]}],bottom:[{bottom:[I]}],left:[{left:[I]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Kt,z]}],basis:[{basis:q()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",z]}],grow:[{grow:je()}],shrink:[{shrink:je()}],order:[{order:["first","last","none",Kt,z]}],"grid-cols":[{"grid-cols":[qt]}],"col-start-end":[{col:["auto",{span:["full",Kt,z]},z]}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":[qt]}],"row-start-end":[{row:["auto",{span:[Kt,z]},z]}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",z]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",z]}],gap:[{gap:[E]}],"gap-x":[{"gap-x":[E]}],"gap-y":[{"gap-y":[E]}],"justify-content":[{justify:["normal",...et()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...et(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...et(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[J]}],px:[{px:[J]}],py:[{py:[J]}],ps:[{ps:[J]}],pe:[{pe:[J]}],ae:[{ae:[J]}],pr:[{pr:[J]}],pb:[{pb:[J]}],pl:[{pl:[J]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[$]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[$]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",z,t]}],"min-w":[{"min-w":[z,t,"min","max","fit"]}],"max-w":[{"max-w":[z,t,"none","full","min","max","fit","prose",{screen:[bt]},bt]}],h:[{h:[z,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[z,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[z,t,"auto","min","max","fit"]}],"font-size":[{text:["base",bt,vt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ba]}],"font-family":[{font:[qt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",z]}],"line-clamp":[{"line-clamp":["none",Lt,ba]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",dt,z]}],"list-image":[{"list-image":["none",z]}],"list-style-type":[{list:["none","disc","decimal",z]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[U]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[U]}],"text-decoration":["underline","overline","line-through","eo-underline"],"text-decoration-style":[{decoration:[...he(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",dt,vt]}],"underline-offset":[{"underline-offset":["auto",dt,z]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",z]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",z]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[U]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Ye(),Xr]}],"bg-repeat":[{bg:["eo-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Jr]}],"bg-image":[{bg:["none",{"gradient-st":["t","tr","r","br","b","bl","st","tl"]},Yr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[b]}],"gradient-via-pos":[{via:[b]}],"gradient-st-pos":[{st:[b]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-st":[{st:[k]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-st":[{"rounded-st":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-b":[{"border-b":[n]}],"border-w-st":[{"border-st":[n]}],"border-opacity":[{"border-opacity":[U]}],"border-style":[{border:[...he(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[U]}],"divide-style":[{divide:he()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-st":[{"border-st":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...he()]}],"outline-offset":[{"outline-offset":[dt,z]}],"outline-w":[{outline:[dt,vt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ne()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[U]}],"ring-offset-w":[{"ring-offset":[dt,vt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",bt,Qr]}],"shadow-color":[{shadow:[qt]}],opacity:[{opacity:[U]}],"mix-blend":[{"mix-blend":[...it(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":it()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",bt,z]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[g]}],saturate:[{saturate:[y]}],sepia:[{sepia:[pe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[U]}],"backdrop-saturate":[{"backdrop-saturate":[y]}],"backdrop-sepia":[{"backdrop-sepia":[pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[m]}],"border-spacing-x":[{"border-spacing-x":[m]}],"border-spacing-y":[{"border-spacing-y":[m]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",z]}],duration:[{duration:h()}],ease:[{ease:["linear","in","out","in-out",z]}],delay:[{delay:h()}],animate:[{animate:["none","spin","ping","pulse","bounce",z]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[F]}],"scale-x":[{"scale-x":[F]}],"scale-y":[{"scale-y":[F]}],rotate:[{rotate:[Kt,z]}],"translate-x":[{"translate-x":[Y]}],"translate-y":[{"translate-y":[Y]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",z]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","eo-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",z]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-ae":[{"scroll-ae":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",z]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[dt,vt,ba]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","ae","pr","pb","pl"],px:["pr","pl"],py:["ae","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-st","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-st":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-st"],"border-w-x":["border-w-r","border-w-st"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-st"],"border-color-x":["border-color-r","border-color-st"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-ae","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-ae","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ya=Hr(oi);function w(...e){return Ya((0,Qa.clsx)(e))}var ri=(0,eo.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function se({className:e,variant:t,...a}){return(0,st.jsx)("div",{className:w(ri({variant:t}),e),...a})}var Ct=ge(require("react"));var re=Ct.forwardRef(({className:e,...t},a)=>(0,st.jsx)("div",{ref:a,className:w("rounded-xl border bg-card text-card-foreground shadow",e),...t}));re.displayName="Card";var ii=Ct.forwardRef(({className:e,...t},a)=>(0,st.jsx)("div",{ref:a,className:w("flex flex-col space-y-1.5 p-6",e),...t}));ii.displayName="CardHeader";var ni=Ct.forwardRef(({className:e,...t},a)=>(0,st.jsx)("div",{ref:a,className:w("font-semibold leading-none tracking-tight",e),...t}));ni.displayName="CardTitle";var si=Ct.forwardRef(({className:e,...t},a)=>(0,st.jsx)("div",{ref:a,className:w("text-sm text-muted-foreground",e),...t}));si.displayName="CardDescription";var Ot=Ct.forwardRef(({className:e,...t},a)=>(0,st.jsx)("div",{ref:a,className:w("p-6 ae-0",e),...t}));Ot.displayName="CardContent";var li=Ct.forwardRef(({className:e,...t},a)=>(0,st.jsx)("div",{ref:a,className:w("flex items-center p-6 ae-0",e),...t}));li.displayName="CardFooter";var ao=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:s=!1,height:m})=>{let n=c=>{c.preventDefault()},u=c=>{c.preventDefault(),r(t)};return(0,st.jsxs)(re,{className:`p-4 bg-card border-st-4 ${(()=>{switch(t){case"todo":return"border-st-gray-400";case"in-progress":return"border-st-blue-500";case"review":return"border-st-orange-500";case"done":return"border-st-green-500";default:return"border-st-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${s?"lg:max-w-xs":""}`,style:{height:m||"calc(100vh - 350px)"},onDragOver:n,onDrop:u,children:[(0,st.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,st.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${s?"text-base":"text-lg"}`,children:e}),(0,st.jsx)(se,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,st.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var Jt=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let s=c=>{a(e)},m=()=>{o(e)},n=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},u=()=>{switch(e.type){case"story":return(0,st.jsx)(lt.BookOpen,{className:"h-3 w-3"});case"bug":return(0,st.jsx)(lt.Bug,{className:"h-3 w-3"});case"spike":return(0,st.jsx)(lt.Zap,{className:"h-3 w-3"});case"task":default:return(0,st.jsx)(lt.AlertCircle,{className:"h-3 w-3"})}},p=()=>{switch(e.type){case"story":return"bg-primary/20 text-primary";case"bug":return"bg-destructive/20 text-destructive";case"spike":return"bg-accent/20 text-accent";case"task":default:return"bg-muted text-muted-foreground"}};return r?(0,st.jsx)(re,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:s,onClick:m,children:(0,st.jsxs)("div",{className:"flex items-center gap-2",children:[(0,st.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:u()}),(0,st.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,st.jsxs)(re,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:s,onClick:m,children:[(0,st.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,st.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[u(),(0,st.jsx)("span",{className:"capitalize",children:e.type})]}),(0,st.jsxs)("div",{className:"flex gap-1",children:[(0,st.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${n()}`,children:e.priority}),(0,st.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.storyPoints})]})]}),(0,st.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,st.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,st.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,st.jsxs)("div",{className:"flex items-center gap-1",children:[(0,st.jsx)(lt.User,{className:"h-4 w-4"}),(0,st.jsx)("span",{children:e.assignee?.value?.name})]}),(0,st.jsxs)("div",{className:"flex items-center gap-1",children:[(0,st.jsx)(lt.Calendar,{className:"h-4 w-4"}),(0,st.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var Xt=ge(require("react")),Se=ge(require("@radix-ui/react-dialog"));var Ge=Se.Root;var di=Se.Portal;var ro=Xt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(Se.Overlay,{ref:a,className:w("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ro.displayName=Se.Overlay.displayName;var Oe=Xt.forwardRef(({className:e,children:t,...a},o)=>(0,$e.jsxs)(di,{children:[(0,$e.jsx)(ro,{}),(0,$e.jsxs)(Se.Content,{ref:o,className:w("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-st-left-1/2 data-[state=closed]:slide-out-st-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,$e.jsxs)(Se.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,$e.jsx)(lt.st,{className:"h-4 w-4"}),(0,$e.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Oe.displayName=Se.Content.displayName;var ze=({className:e,...t})=>(0,$e.jsx)("div",{className:w("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ze.displayName="DialogHeader";var Zt=({className:e,...t})=>(0,$e.jsx)("div",{className:w("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Zt.displayName="DialogFooter";var He=Xt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(Se.Title,{ref:a,className:w("text-lg font-semibold leading-none tracking-tight",e),...t}));He.displayName=Se.Title.displayName;var ci=Xt.forwardRef(({className:e,...t},a)=>(0,$e.jsx)(Se.Description,{ref:a,className:w("text-sm text-muted-foreground",e),...t}));ci.displayName=Se.Description.displayName;var io=require("@radix-ui/react-slot"),so=ge(require("react")),aa=(0,eo.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),S=so.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},s)=>(0,st.jsx)(e?io.Slot:"button",{className:w(aa({className:t,size:a,variant:o})),ref:s,...r}));S.displayName="Button";var co=ge(require("react"));var Z=co.forwardRef(({className:e,type:t,...a},o)=>(0,st.jsx)("input",{type:t,className:w("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));Z.displayName="Input";var po=ge(require("react")),Pe=po.forwardRef(({className:e,...t},a)=>(0,st.jsx)("textarea",{className:w("flex min-h-[80px] w-full rounded border border-border bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:a,...t}));Pe.displayName="Textarea";var H=ge(require("@radix-ui/react-select")),ht=ge(require("react")),Fe=H.Root;var Qe=H.Value,Ee=ht.forwardRef(({children:e,className:t,...a},o)=>(0,st.jsxs)(H.Trigger,{className:w("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,st.jsx)(H.Icon,{asChild:!0,children:(0,st.jsx)(lt.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ee.displayName=H.Trigger.displayName;var go=ht.forwardRef(({className:e,...t},a)=>(0,st.jsx)(H.ScrollUpButton,{className:w("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,st.jsx)(lt.ChevronUp,{className:"h-4 w-4"})}));go.displayName=H.ScrollUpButton.displayName;var fo=ht.forwardRef(({className:e,...t},a)=>(0,st.jsx)(H.ScrollDownButton,{className:w("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,st.jsx)(lt.ChevronDown,{className:"h-4 w-4"})}));fo.displayName=H.ScrollDownButton.displayName;var Ae=ht.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,st.jsx)(H.Portal,{children:(0,st.jsxs)(H.Content,{className:w("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,st.jsx)(go,{}),(0,st.jsx)(H.Viewport,{className:w("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,st.jsx)(fo,{})]})}));Ae.displayName=H.Content.displayName;var mi=ht.forwardRef(({className:e,...t},a)=>(0,st.jsx)(H.Label,{className:w("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));mi.displayName=H.Label.displayName;var ie=ht.forwardRef(({children:e,className:t,...a},o)=>(0,st.jsxs)(H.Item,{className:w("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,st.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,st.jsx)(H.ItemIndicator,{children:(0,st.jsx)(lt.Check,{className:"h-4 w-4"})})}),(0,st.jsx)(H.ItemText,{children:e})]}));ie.displayName=H.Item.displayName;var pi=ht.forwardRef(({className:e,...t},a)=>(0,st.jsx)(H.Separator,{className:w("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));pi.displayName=H.Separator.displayName;var vo=ge(require("react")),ya=ge(require("@radix-ui/react-label"));var ui=(0,eo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),A=vo.forwardRef(({className:e,...t},a)=>(0,st.jsx)(ya.Root,{ref:a,className:w(ui(),e),...t}));A.displayName=ya.Root.displayName;var Tt=ge(require("react")),zt=ge(require("@radix-ui/react-toggle-group"));var xo=ge(require("react")),wa=ge(require("@radix-ui/react-toggle"));var Na=(0,eo.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),gi=xo.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,st.jsx)(wa.Root,{ref:r,className:w(Na({variant:t,size:a,className:e})),...o}));gi.displayName=wa.Root.displayName;var No=Tt.createContext({size:"default",variant:"default"}),Pt=Tt.forwardRef(({className:e,variant:t,size:a,children:o,...r},s)=>(0,st.jsx)(zt.Root,{ref:s,className:w("flex items-center justify-center gap-1",e),...r,children:(0,st.jsx)(No.Provider,{value:{variant:t,size:a},children:o})}));Pt.displayName=zt.Root.displayName;var Rt=Tt.forwardRef(({className:e,children:t,variant:a,size:o,...r},s)=>{let m=Tt.useContext(No);return(0,st.jsx)(zt.Item,{ref:s,className:w(Na({variant:m.variant||a,size:m.size||o}),e),...r,children:t})});Rt.displayName=zt.Item.displayName;var fi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:lt.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:lt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:lt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:lt.Zap}],vi=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}],Ht=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,assignees:s,defaultEpicId:m})=>{let[n,u]=(0,ae.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,ae.useEffect)(()=>{e&&m&&u(g=>({...g,epic:m}))},[e,m]),(0,ae.useEffect)(()=>{e&&u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:m||"",sprint:"none",assignee:""})},[e]);let p=g=>{g.preventDefault(),n.name.trim()&&(a({name:n.name.trim(),description:n.description.trim(),status:"todo",priority:n.priority,type:n.type,storyPoints:n.storyPoints,epic:Number(n.epic),sprint:Number(n.sprint),assignee:n.assignee.trim()?{relationTo:"digital-colleagues",value:Number(n.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:m||"",sprint:"",assignee:""}),t())},c=(g,E)=>{u(k=>({...k,[g]:E}))};return(0,st.jsx)(Ge,{open:e,onOpenChange:t,children:(0,st.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,st.jsx)(ze,{children:(0,st.jsx)(He,{children:"Add New Task"})}),(0,st.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"name",children:"Task Title"}),(0,st.jsx)(Z,{id:"name",value:n.name,onChange:g=>c("name",g.target.value),placeholder:"Enter task title",required:!0})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"description",children:"Description"}),(0,st.jsx)(Pe,{id:"description",value:n.description,onChange:g=>c("description",g.target.value),placeholder:"Enter task description",rows:3})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{children:"Type"}),(0,st.jsx)(Pt,{type:"single",value:n.type||"",onValueChange:g=>g&&c("type",g),children:fi.map(g=>{let E=g.icon;return(0,st.jsxs)(Rt,{value:g.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,st.jsx)(E,{className:"h-4 w-4"}),g.label]},g.value)})})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{children:"Priority"}),(0,st.jsx)(Pt,{type:"single",value:n.priority||"",onValueChange:g=>g&&c("priority",g),children:vi.map(g=>(0,st.jsx)(Rt,{value:g.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:g.label},g.value))})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"points",children:"Story Points"}),(0,st.jsx)(Z,{id:"points",type:"number",min:"1",max:"100",value:n.storyPoints,onChange:g=>c("storyPoints",parseInt(g.target.value)||1),placeholder:"Enter story points",required:!0})]}),!m&&(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"epic",children:"Epic"}),(0,st.jsxs)(Fe,{value:n.epic,onValueChange:g=>c("epic",g),children:[(0,st.jsx)(Ee,{children:(0,st.jsx)(Qe,{placeholder:"Select an epic"})}),(0,st.jsx)(Ae,{children:o.map(g=>(0,st.jsx)(ie,{value:g.id.toString(),children:(0,st.jsxs)("div",{className:"flex items-center gap-2",children:[(0,st.jsx)("div",{className:`w-3 h-3 rounded-full ${g.color}`}),g.name]})},g.id))})]})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,st.jsxs)(Fe,{value:n.sprint,onValueChange:g=>c("sprint",g),children:[(0,st.jsx)(Ee,{children:(0,st.jsx)(Qe,{placeholder:"Select a sprint"})}),(0,st.jsxs)(Ae,{children:[(0,st.jsx)(ie,{value:"none",children:"No Sprint"}),r.map(g=>(0,st.jsx)(ie,{value:g.id.toString(),children:(0,st.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"sprint",children:"Assignee"}),(0,st.jsxs)(Fe,{value:n.assignee,onValueChange:g=>c("assignee",g),children:[(0,st.jsx)(Ee,{children:(0,st.jsx)(Qe,{placeholder:"Select an Assignee"})}),(0,st.jsxs)(Ae,{children:[(0,st.jsx)(ie,{value:"none",children:"No Assignee"}),s.map(g=>(0,st.jsx)(ie,{value:g.id.toString(),children:(0,st.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,st.jsxs)(Zt,{children:[(0,st.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,st.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var Sa=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:s="",disabled:m=!1})=>{let[n,u]=(0,ae.useState)(!1),[p,c]=(0,ae.useState)(""),g=()=>{m||(u(!0),c(t))},E=async()=>{p!==t&&await r(e,p),u(!1)},k=b=>{b.key==="Enter"&&!o||b.key==="Enter"&&b.ctrlKey&&o?E():b.key==="Escape"&&(u(!1),c(""))};return(0,st.jsxs)("div",{className:`space-y-2 ${s}`,children:[(0,st.jsx)(A,{children:a}),n?o?(0,st.jsx)(Pe,{value:p,onChange:b=>c(b.target.value),onBlur:E,onKeyDown:k,autoFocus:!0,rows:4,className:"resize-none"}):(0,st.jsx)(Z,{value:p,onChange:b=>c(b.target.value),onBlur:E,onKeyPress:k,autoFocus:!0,className:"text-lg font-medium"}):(0,st.jsxs)("div",{onClick:g,className:`${m?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,st.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click st edit..."}),!m&&(0,st.jsx)(lt.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var ra=ge(require("react")),mt=ge(require("@radix-ui/react-avatar"));var ka=ra.forwardRef(({className:e,...t},a)=>(0,st.jsx)(mt.Root,{ref:a,className:w("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));ka.displayName=mt.Root.displayName;var bi=ra.forwardRef(({className:e,...t},a)=>(0,st.jsx)(mt.Image,{ref:a,className:w("aspect-square h-full w-full",e),...t}));bi.displayName=mt.Image.displayName;var Da=ra.forwardRef(({className:e,...t},a)=>(0,st.jsx)(mt.Fallback,{ref:a,className:w("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Da.displayName=mt.Fallback.displayName;var ko=({comments:e,onAddComment:t})=>{let[a,o]=(0,ae.useState)(""),r=m=>m.split(" ").map(n=>n[0]).join("").toUpperCase(),s=()=>{a.trim()&&(t(a),o(""))};return(0,st.jsxs)("div",{className:"space-y-4",children:[(0,st.jsxs)("div",{className:"flex items-center gap-2",children:[(0,st.jsx)(lt.MessageSquare,{className:"h-5 w-5"}),(0,st.jsx)(A,{className:"text-lg font-medium",children:"Comments"}),(0,st.jsx)(se,{variant:"secondary",children:e.length})]}),(0,st.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(m=>(0,st.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,st.jsx)(ka,{className:"h-8 w-8 mt-1",children:(0,st.jsx)(Da,{className:"text-xs bg-muted text-muted-foreground",children:r(m.author)})}),(0,st.jsxs)("div",{className:"flex-1",children:[(0,st.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,st.jsx)("span",{className:"font-medium text-sm",children:m.author}),(0,st.jsxs)("span",{className:"text-xs text-muted-foreground",children:[m.createdAt.toLocaleDateString()," at ",m.createdAt.toLocaleTimeString()]})]}),(0,st.jsx)("p",{className:"text-sm text-muted-foreground",children:m.text})]})]},m.id))}),(0,st.jsxs)("div",{className:"flex gap-2",children:[(0,st.jsx)(Pe,{value:a,onChange:m=>o(m.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,st.jsx)(S,{onClick:s,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,st.jsx)(lt.Send,{className:"h-4 w-4"})})]})]})};var sa=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:s=!1})=>{let[m,n]=(0,ae.useState)(!1),u=o.find(c=>c.value===t);return(0,st.jsxs)("div",{className:"space-y-1",children:[(0,st.jsx)(A,{className:"text-xs text-muted-foreground",children:e}),(0,st.jsxs)(Fe,{value:t,onValueChange:a,open:m,onOpenChange:c=>{s||n(c)},disabled:s,children:[(0,st.jsx)(Ee,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,st.jsxs)(se,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&n(!m),children:[r&&u?.color&&(0,st.jsx)("div",{className:`w-2 h-2 rounded-full ${u.color} mr-1`}),u?.label||"Select..."]})}),(0,st.jsx)(Ae,{children:o.map(c=>(0,st.jsx)(ie,{value:c.value,children:r&&c.color?(0,st.jsxs)("div",{className:"flex items-center gap-2",children:[(0,st.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.label]}):c.label},c.value))})]})]})};var To=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:s=!1,disabled:m=!1})=>{let[n,u]=(0,ae.useState)(!1),[p,c]=(0,ae.useState)(""),g=o.find(x=>x.value===t),E=o.filter(x=>x.label.toLowerCase().includes(p.toLowerCase())),k=x=>{a(x),u(!1),c("")},b=()=>{s&&p.trim()&&!o.find(x=>x.value===p.trim())&&(a(p.trim()),u(!1),c(""))};return(0,st.jsxs)("div",{className:"space-y-1",children:[(0,st.jsx)(A,{className:"text-xs text-muted-foreground",children:e}),(0,st.jsxs)(Fe,{value:t,onValueChange:k,open:n,onOpenChange:x=>{m||u(x)},disabled:m,children:[(0,st.jsx)(Ee,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,st.jsx)(se,{variant:"secondary",className:`${m?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!m&&u(!n),children:g?.label||t||"Select..."})}),(0,st.jsxs)(Ae,{children:[(0,st.jsx)("div",{className:"p-2",children:(0,st.jsx)(Z,{placeholder:r,value:p,onChange:x=>c(x.target.value),onKeyDown:x=>{x.key==="Enter"&&s&&b()},className:"mb-2"})}),E.map(x=>(0,st.jsx)(ie,{value:x.value,children:x.label},x.value)),s&&p.trim()&&!E.find(x=>x.value===p.trim())&&(0,st.jsxs)(ie,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var be=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var hi=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:lt.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:lt.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:lt.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:lt.Zap}],xi=[{value:"low",label:"Low",color:"bg-success/20 text-success"},{value:"medium",label:"Medium",color:"bg-warning/20 text-warning"},{value:"high",label:"High",color:"bg-destructive/20 text-destructive"}];var Po=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:s,onDelete:m,isUpdating:n=!1,isDeleting:u=!1,deleteState:p="idle",teamMembers:c})=>{let[g,E]=(0,ae.useState)(e.storyPoints),k=(0,ae.useRef)(null),[b,I]=(0,ae.useState)(c);(0,ae.useEffect)(()=>{I(c)},[c]);let x=(0,ae.useCallback)((y,F)=>{k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{r(y,F)},500)},[r]);(0,ae.useEffect)(()=>{x("storyPoints",g?.toString()||"1")},[g]);let U=y=>y.split(" ").map(F=>F[0]).join("").toUpperCase(),J=()=>p==="loading"?(0,st.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,st.jsx)(lt.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,st.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,st.jsx)(lt.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,st.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,st.jsx)(lt.st,{className:"h-3 w-3"}),"Delete failed"]}):(0,st.jsxs)(S,{onClick:m,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:n||u,children:[(0,st.jsx)(lt.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,st.jsxs)("div",{className:"flex flex-col h-full",children:[(0,st.jsxs)("div",{className:"space-y-4",style:{opacity:n?.6:1},children:[(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{className:"text-xs text-muted-foreground",children:"Status"}),(0,st.jsx)(sa,{label:"",value:e.status,onValueChange:y=>r("status",y),options:[{value:"todo",label:"To ae"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:n})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{className:"text-xs text-muted-foreground",children:"Type"}),(0,st.jsx)(Pt,{type:"single",value:e.type||"",onValueChange:y=>y&&r("type",y),className:"grid grid-cols-2 gap-1",disabled:n,children:hi.map(y=>{let F=y.icon;return(0,st.jsxs)(Rt,{value:y.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:n,children:[(0,st.jsx)(F,{className:"h-3 w-3"}),y.label]},y.value)})})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,st.jsx)(Pt,{type:"single",value:e.priority||"",onValueChange:y=>y&&r("priority",y),className:"grid grid-cols-3 gap-1",disabled:n,children:xi.map(y=>(0,st.jsx)(Rt,{value:y.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:n,children:y.label},y.value))})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,st.jsx)("input",{type:"number",min:"1",max:"100",value:g||1,onChange:y=>{let F=Number(y.target.value);F<1?E(1):F>100?E(100):E(F)},className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:n})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,st.jsx)(sa,{label:"",value:be(e.epic).toString(),onValueChange:y=>r("epic",y),options:(t||[]).map(y=>({value:y.id.toString(),label:y?.name,color:y.color})),showColor:!0,disabled:n})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,st.jsx)(sa,{label:"",value:be(e.sprint).toString()||"none",onValueChange:y=>r("sprint",y==="none"?"":y),options:[{value:"none",label:"No Sprint"},...(a||[]).map(y=>({value:y.id.toString(),label:`${y?.name}`}))],disabled:n})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,st.jsx)(To,{label:"",value:e.assignee?.value?.name,onValueChange:y=>r("assignee",y),options:b.map(y=>({value:`${typeof y.email=="string"?"users":"digital-colleagues"}:${y.id}`,label:y?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:n})]})]}),(0,st.jsxs)("div",{className:"mt-auto ae-4 space-y-4",children:[(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(S,{onClick:s,variant:"outline",className:"w-full h-8 text-xs",disabled:n||u,children:"Close"}),J()]}),(0,st.jsxs)("div",{className:"ae-4 border-t border-border space-y-2",children:[(0,st.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,st.jsxs)("div",{className:"flex items-center justify-between",children:[(0,st.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,st.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,st.jsx)(lt.User,{className:"h-3 w-3"}),(0,st.jsx)("span",{children:"System"})]})]}),(0,st.jsxs)("div",{className:"flex items-center justify-between",children:[(0,st.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,st.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,st.jsx)(lt.Calendar,{className:"h-3 w-3"}),(0,st.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,st.jsxs)("div",{className:"flex items-center justify-between",children:[(0,st.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,st.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,st.jsx)(lt.Clock,{className:"h-3 w-3"}),(0,st.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Ro=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:r,onUpdateTask:s,onDeleteTask:m,onAddComment:n,colleagues:u})=>{let[p,c]=(0,ae.useState)(a),[g,E]=(0,ae.useState)(new Date),[k,b]=(0,ae.useState)("idle"),[I,x]=(0,ae.useState)("idle"),[U,J]=(0,ae.useState)([]),[y,F]=(0,ae.useState)(u);(0,ae.useEffect)(()=>{c(a)},[a]);let pe=async(D,Ne)=>{if(Ne!==p[D]){b("loading");try{await s(p.id.toString(),{[D]:Ne}),E(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(ce){console.log("error",ce),b("error"),setTimeout(()=>b("idle"),3e3)}}},C=async(D,Ne)=>{if(Ne!==p[D]){b("loading");try{await s(p.id.toString(),{[D]:Ne}),E(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch(ce){console.log("error",ce),b("error"),setTimeout(()=>b("idle"),3e3)}}},$=async D=>{if(n){b("loading");try{await n?.({content:D,taskId:p.id.toString()}),E(new Date),b("success"),setTimeout(()=>b("idle"),1500)}catch{b("error"),setTimeout(()=>b("idle"),3e3)}}},Y=async()=>{x("loading");try{await m(p.id.toString()),x("success"),setTimeout(()=>{t(),x("idle")},1e3)}catch{x("error"),setTimeout(()=>x("idle"),3e3)}},j=k!=="loading"&&I!=="loading",we=()=>{j&&t()},q=()=>k==="loading"?(0,st.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,st.jsx)(lt.Loader2,{className:"h-4 w-4 animate-spin"}),(0,st.jsx)("span",{children:"Updating..."})]}):k==="success"?(0,st.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,st.jsx)(lt.Check,{className:"h-4 w-4"}),(0,st.jsx)("span",{children:"Updated successfully"})]}):k==="error"?(0,st.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,st.jsx)(lt.st,{className:"h-4 w-4"}),(0,st.jsx)("span",{children:"Update failed"})]}):null;return(0,st.jsx)(Ge,{open:e,onOpenChange:we,children:(0,st.jsxs)(Oe,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,st.jsxs)(ze,{children:[(0,st.jsx)(He,{className:"sr-only",children:p?.name}),(0,st.jsxs)("div",{className:"flex items-center justify-between",children:[(0,st.jsx)("div",{className:"flex-1",children:q()}),!j&&(0,st.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,st.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,st.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,st.jsx)(Sa,{fieldName:"name",value:p.name||"",label:"",onSave:pe,className:"border-b border-border pb-3",disabled:k==="loading"}),(0,st.jsx)(Sa,{fieldName:"description",value:p.description||"",label:"Description",multiline:!0,onSave:pe,disabled:k==="loading"}),(0,st.jsx)(ko,{comments:(p?.comments||[]).map(D=>({author:D.author.value.name||"",createdAt:new Date(D.timestamp),text:D.text,id:D.id||""})),onAddComment:$})]}),(0,st.jsx)(Po,{task:p,epics:o,sprints:r,lastUpdated:g,onUpdateTask:C,onClose:we,onDelete:Y,isUpdating:k==="loading",isDeleting:I==="loading",deleteState:I,teamMembers:y})]})]})})};var Ut=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,ae.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("st")[0],endDate:new Date().toISOString().split("st")[0],progress:0}),s=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],m=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],n=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],u=c=>{c.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),r({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},p=(c,g)=>{r(E=>({...E,[c]:g}))};return(0,st.jsx)(Ge,{open:e,onOpenChange:t,children:(0,st.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,st.jsx)(ze,{children:(0,st.jsx)(He,{children:"Add New Epic"})}),(0,st.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"name",children:"Epic Name"}),(0,st.jsx)(Z,{id:"name",value:o.name,onChange:c=>p("name",c.target.value),placeholder:"Enter epic name",required:!0})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"description",children:"Description"}),(0,st.jsx)(Pe,{id:"description",value:o.description,onChange:c=>p("description",c.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{children:"Color"}),(0,st.jsx)("div",{className:"flex gap-2 flex-wrap",children:s.map(c=>(0,st.jsx)("button",{type:"button",onClick:()=>p("color",c),className:`w-8 h-8 rounded-full ${c} ${o.color===c?"ring-2 ring-gray-400":""}`},c))})]}),(0,st.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{children:"Confidence"}),(0,st.jsxs)(Fe,{value:o.confidence,onValueChange:c=>p("confidence",c),children:[(0,st.jsx)(Ee,{children:(0,st.jsx)(Qe,{})}),(0,st.jsx)(Ae,{children:m.map(c=>(0,st.jsx)(ie,{value:c.value,children:c.label},c.value))})]})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{children:"Phase"}),(0,st.jsxs)(Fe,{value:o.phase.toString(),onValueChange:c=>p("phase",parseInt(c)),children:[(0,st.jsx)(Ee,{children:(0,st.jsx)(Qe,{})}),(0,st.jsx)(Ae,{children:n.map(c=>(0,st.jsx)(ie,{value:c.value.toString(),children:c.label},c.value))})]})]})]}),(0,st.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{children:"Start Date"}),(0,st.jsx)(Z,{type:"date",value:o.startDate,onChange:c=>p("startDate",c.target.value)})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{children:"End Date"}),(0,st.jsx)(Z,{type:"date",value:o.endDate,onChange:c=>p("endDate",c.target.value)})]})]}),(0,st.jsxs)(Zt,{children:[(0,st.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,st.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var Mo=require("motion/react");function Ao(e,t){let[a,o]=(0,ae.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),r=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,ae.useEffect)(()=>{r(a)},[]),[a,r]}var da=require("react-icons/fa");function at({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:s,children:m,className:n}){let[u,p]=Ao(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),c=!r&&!t||u;return(0,st.jsxs)(Mo.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${s} p-8 text-white ${n||""}`,children:[(0,st.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,st.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,st.jsx)(se,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,st.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,st.jsxs)("div",{className:"flex items-center gap-3",children:[c&&o&&(0,st.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,st.jsx)("button",{"aria-label":u?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!u),style:{lineHeight:0},children:u?(0,st.jsx)(da.FaChevronDown,{size:22}):(0,st.jsx)(da.FaChevronUp,{size:22})})]})]}),!c&&(0,st.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,st.jsxs)("div",{className:"space-y-4",children:[(0,st.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,st.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,st.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,st.jsx)(S,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),m&&(0,st.jsx)("div",{className:"hidden lg:block",children:m})]})]})}var Io=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:r=[],initialProjects:s=[],onAddTask:m,onUpdateTask:n,onDeleteTask:u,onTaskClick:p,onAddEpic:c,onAddComment:g})=>{let[E,k]=(0,ee.useState)([]),[b,I]=(0,ee.useState)([]),[x,U]=(0,ee.useState)([]),[J,y]=(0,ee.useState)(!1),[F,pe]=(0,ee.useState)(!1),[C,$]=(0,ee.useState)(null),[Y,j]=(0,ee.useState)(null),[we,q]=(0,ee.useState)([]),[D,Ne]=(0,ee.useState)([]),[ce,Ye]=(0,ee.useState)(0),he=(0,ee.useRef)(null),it=(0,ee.useRef)(null),et=ee.default.useMemo(()=>[...b.map(N=>N.id),0],[b]),je=(0,ee.useRef)(""),We=(0,ee.useRef)(""),h=(0,ee.useRef)(""),W=(0,ee.useRef)(""),ne=N=>N.map(d=>`${d.id}-${new Date(d.createdAt).getTime()}-${new Date(d.updatedAt).getTime()}`).join("-");(0,ee.useEffect)(()=>{let N=ne(e);N!==je.current&&(k(e),C&&$(e.find(d=>d.id===C.id)||null),je.current=N)},[e]),(0,ee.useEffect)(()=>{let N=ne(t);N!==We.current&&(I(t),We.current=N)},[t]),(0,ee.useEffect)(()=>{let N=ne(a);N!==h.current&&(U(a),h.current=N)},[a]),(0,ee.useEffect)(()=>{let N=ne(r.map(d=>({id:d.id,updatedAt:d.updatedAt,createdAt:d.createdAt})));N!==W.current&&(Ne(r),W.current=N)},[r]),(0,ee.useEffect)(()=>{let N=()=>{if(he.current){let L=he.current.offsetHeight;Ye(L)}};N();let d=new ResizeObserver(N);he.current&&d.observe(he.current);let f=()=>{setTimeout(N,100)};return window.addEventListener("storage",f),()=>{d.disconnect(),window.removeEventListener("storage",f)}},[]),(0,ee.useEffect)(()=>{let N=setTimeout(()=>{he.current&&Ye(he.current.offsetHeight)},300);return()=>clearTimeout(N)},[J,F]);let _e=E.filter(N=>!0),Q=N=>_e.filter(d=>d.status===N),Ue=N=>{let d={};return b.forEach(f=>{d[f.id]=N.filter(L=>be(L.epic)===f.id)}),d["eo-epic"]=N.filter(f=>!be(f.epic)),d},At=N=>{j(N)},nt=N=>{Y&&(k(d=>d.map(f=>f.id===Y.id?{...f,status:N}:f)),n?.(Y.id.toString(),{status:N}),j(null))},Gt=N=>{let d={...N,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};k(f=>[...f,d]),m?.(N)},gt=async(N,d)=>{k(f=>f.map(L=>L.id===Number(N)?{...L,...d}:L)),n&&await n(N,d),C?.id===Number(N)&&$(f=>({...f,...d}))},wt=async N=>{k(d=>d.filter(f=>f.id!==Number(N))),C?.id===Number(N)&&$(null),u&&await u(N)},Mt=N=>{let d={...N,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};I(f=>[...f,d]),c?.(N)},ft=N=>{$(N),p?.(N)},It=[{id:"todo",title:"To ae",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Ft=ce>0?`calc(100vh - ${ce+120}px)`:"calc(100vh - 12rem)";return(0,st.jsxs)("div",{ref:it,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,st.jsx)("div",{ref:he,className:"flex-shrink-0",children:(0,st.jsx)(at,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-st-r from-purple-600 via-violet-600 st-indigo-600",primaryAction:{label:"Add task",onClick:()=>y(!0)},secondaryAction:{label:"Add epic",onClick:()=>pe(!0)}})}),(0,st.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,st.jsx)("div",{className:"h-full",style:{height:ce>0?`calc(100vh - ${ce+120}px)`:"calc(100vh - 12rem)"},children:(0,st.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:It.map(N=>{let d=Q(N.status),f=Ue(d);return(0,st.jsxs)(ao,{title:N.title,status:N.status,taskCount:d.length,onDrop:nt,isCompact:N.status==="done",height:Ft,children:[f["eo-epic"].map(L=>(0,st.jsx)(Jt,{epic:null,task:L,onDragStart:At,onTaskClick:ft,isCompact:N.status==="done"},L.id)),et.map(L=>{let G=b.find(me=>me.id===L),ue=f[L]||[];return ue.length===0?null:(0,st.jsxs)("div",{className:"mb-6",children:[(0,st.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,st.jsx)("div",{className:`w-3 h-3 rounded-full ${G?.color}`}),(0,st.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:G?.name||"No Epic"}),(0,st.jsx)(se,{variant:"secondary",className:"text-xs",children:ue.length})]})," ",(0,st.jsx)("div",{className:"space-y-3",children:ue.map(me=>(0,st.jsx)(Jt,{task:me,epic:G,onDragStart:At,onTaskClick:ft,isCompact:N.status==="done"},me.id))})]},L)})]},N.id)})})})}),(0,st.jsx)(Ht,{isOpen:J,onClose:()=>y(!1),onAddTask:Gt,assignees:[...D,...we],epics:b,sprints:x}),(0,st.jsx)(Ut,{isOpen:F,onClose:()=>pe(!1),onAddEpic:Mt}),C&&(0,st.jsx)(Ro,{isOpen:!!C,onClose:()=>$(null),initialTask:C,epics:b,sprints:x,onUpdateTask:gt,onDeleteTask:wt,colleagues:D,onAddComment:g})]})};var Fo=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:s,onAddEpic:m,onUpdateEpic:n,onDeleteEpic:u})=>{let[p,c]=(0,ae.useState)(t),[g,E]=(0,ae.useState)(null),[k,b]=(0,ae.useState)(null),[I,x]=(0,ae.useState)({}),[U,J]=(0,ae.useState)(0),[y,F]=(0,ae.useState)(!1),[pe,C]=(0,ae.useState)(!1),[$,Y]=(0,ae.useState)(null),j=(0,ae.useRef)(null),we=(0,ae.useRef)(null);(0,ae.useEffect)(()=>{c(t)},[t]),(0,ae.useEffect)(()=>{let h=()=>{if(j.current){let _e=j.current.offsetHeight;J(_e)}};h();let W=new ResizeObserver(h);j.current&&W.observe(j.current);let ne=()=>{setTimeout(h,100)};return window.addEventListener("storage",ne),()=>{W.disconnect(),window.removeEventListener("storage",ne)}},[]),(0,ae.useEffect)(()=>{let h=setTimeout(()=>{j.current&&J(j.current.offsetHeight)},300);return()=>clearTimeout(h)},[k]);let q=h=>{E(h)},D=h=>{h.preventDefault()},Ne=(h,W)=>{h.preventDefault(),g&&be(g.epic).toString()!==W&&(o(g.id.toString(),{epic:Number(W)}),E(null))},ce=h=>e.filter(W=>be(W.epic).toString()===h),Ye=h=>{b(h.id.toString()),x({name:h.name,description:h.description,confidence:h.confidence,phase:h.phase})},he=async()=>{k&&I.name&&(await n(k.toString(),I),c(h=>h.map(W=>W.id.toString()===k?{...W,...I}:W)),b(null),x({}))},it=()=>{b(null),x({})},et=async h=>{window.confirm("Are you sure you want st delete this epic? This will also delete all associated tasks.")&&(await u(h),c(W=>W.filter(ne=>ne.id.toString()!==h)))},je=h=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[h]||`Phase ${h}`,We=h=>{switch(h){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,st.jsxs)(st.Fragment,{children:[(0,st.jsxs)("div",{ref:we,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,st.jsx)("div",{ref:j,className:"flex-shrink-0",children:(0,st.jsx)(at,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-st-r from-rose-600 via-pink-600 st-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>F(!0)}})}),(0,st.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,st.jsx)("div",{className:"h-full overflow-y-auto",style:{height:U>0?`calc(100vh - ${U+120}px)`:"calc(100vh - 12rem)"},children:(0,st.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:p.map(h=>{let W=ce(h.id.toString()),ne=W.reduce((Q,Ue)=>Q+(Ue.storyPoints||0),0),_e=U>0?`calc(100vh - ${U+200}px)`:"calc(100vh - 14rem)";return(0,st.jsxs)(re,{className:`flex flex-col ${k===h.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:k===h.id.toString()?"auto":_e,minHeight:"400px"},onDragOver:D,onDrop:Q=>Ne(Q,h.id.toString()),children:[(0,st.jsx)("div",{className:"p-4 border-b border-border",children:k===h.id.toString()?(0,st.jsxs)("div",{className:"space-y-4",children:[(0,st.jsxs)("div",{className:"flex items-center justify-between",children:[(0,st.jsx)(Z,{value:I.name||"",onChange:Q=>x({...I,name:Q.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,st.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,st.jsx)(S,{size:"sm",variant:"ghost",onClick:he,className:"p-1 h-8 w-8",children:(0,st.jsx)(lt.Check,{className:"h-4 w-4"})}),(0,st.jsx)(S,{size:"sm",variant:"ghost",onClick:it,className:"p-1 h-8 w-8",children:(0,st.jsx)(lt.st,{className:"h-4 w-4"})})]})]}),(0,st.jsx)(Pe,{value:I.description||"",onChange:Q=>x({...I,description:Q.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,st.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,st.jsxs)("div",{children:[(0,st.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,st.jsxs)("select",{value:I.confidence||h.confidence,onChange:Q=>x({...I,confidence:Q.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[(0,st.jsx)("option",{value:"low",children:"Low"}),(0,st.jsx)("option",{value:"medium",children:"Medium"}),(0,st.jsx)("option",{value:"high",children:"High"})]})]}),(0,st.jsxs)("div",{children:[(0,st.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,st.jsx)("select",{value:I.phase?.toString()||h.phase.toString(),onChange:Q=>x({...I,phase:parseInt(Q.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(Q=>(0,st.jsxs)("option",{value:Q.toString(),children:["Phase ",Q]},Q))})]})]})]}):(0,st.jsxs)(st.Fragment,{children:[(0,st.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,st.jsx)("div",{className:`w-4 h-4 rounded-full ${h.color}`}),(0,st.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:h.name}),(0,st.jsxs)("div",{className:"flex gap-1",children:[(0,st.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Ye(h),className:"p-1 h-8 w-8",children:(0,st.jsx)(lt.Edit2,{className:"h-3 w-3"})}),(0,st.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>et(h.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,st.jsx)(lt.Trash2,{className:"h-3 w-3"})})]})]}),(0,st.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,st.jsxs)(se,{className:`text-xs ${We(h.confidence)}`,children:[h.confidence," confidence"]}),(0,st.jsxs)(se,{variant:"outline",className:"text-xs",children:["Phase ",h.phase]}),(0,st.jsxs)(se,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[W.length," tasks"]}),(0,st.jsxs)(se,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ne," pts"]})]}),h.description&&(0,st.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:h.description}),(0,st.jsxs)(S,{onClick:()=>{C(!0),Y(h)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,st.jsx)(lt.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,st.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,st.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:W.length===0?(0,st.jsxs)("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[(0,st.jsx)(lt.Move,{className:"h-8 w-8 mb-2"}),(0,st.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):W.map(Q=>(0,st.jsx)(Jt,{task:Q,epic:h,onDragStart:q,onTaskClick:r,isCompact:!0},Q.id))})})]},h.id)})})})})]}),(0,st.jsx)(Ut,{isOpen:y,onClose:()=>F(!1),onAddEpic:m}),(0,st.jsx)(Ht,{isOpen:pe,onClose:()=>C(!1),onAddTask:s,assignees:[],epics:[],defaultEpicId:$?.id.toString()||"",sprints:a})]})};var Lo=require("react-day-picker");function ca({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,st.jsx)(Lo.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:w("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center ae-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:w(aa({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:w("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-st-md first:[&:has([aria-selected])]:rounded-st-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:w(aa({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}ca.displayName="Calendar";var Oo=ge(require("react")),ot=ge(require("@radix-ui/react-popover"));var Ra=ot.Root,Ea=ot.Trigger;var ma=Oo.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,st.jsx)(ot.Portal,{children:(0,st.jsx)(ot.Content,{ref:r,align:t,sideOffset:a,className:w("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));ma.displayName=ot.Content.displayName;var Ma=require("date-fns");var Ho=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,ae.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),s=n=>{n.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),r({name:"",description:"",startDate:void 0,endDate:void 0}),t())},m=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,st.jsx)(Ge,{open:e,onOpenChange:m,children:(0,st.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,st.jsx)(ze,{children:(0,st.jsx)(He,{children:"Add New Sprint"})}),(0,st.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"name",children:"Sprint Name *"}),(0,st.jsx)(Z,{id:"name",value:o.name,onChange:n=>r(u=>({...u,name:n.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{htmlFor:"description",children:"Description"}),(0,st.jsx)(Pe,{id:"description",value:o.description,onChange:n=>r(u=>({...u,description:n.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,st.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{children:"Start Date *"}),(0,st.jsxs)(Ra,{children:[(0,st.jsx)(Ea,{asChild:!0,children:(0,st.jsxs)(S,{variant:"outline",className:w("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,st.jsx)(lt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,Ma.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,st.jsx)(ma,{className:"w-auto p-0",align:"start",children:(0,st.jsx)(ca,{mode:"single",selected:o.startDate,onSelect:n=>r(u=>({...u,startDate:n})),initialFocus:!0})})]})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)(A,{children:"End Date *"}),(0,st.jsxs)(Ra,{children:[(0,st.jsx)(Ea,{asChild:!0,children:(0,st.jsxs)(S,{variant:"outline",className:w("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,st.jsx)(lt.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,Ma.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,st.jsx)(ma,{className:"w-auto p-0",align:"start",children:(0,st.jsx)(ca,{mode:"single",selected:o.endDate,onSelect:n=>r(u=>({...u,endDate:n})),initialFocus:!0,disabled:n=>o.startDate?n<o.startDate:!1})})]})]})]}),(0,st.jsxs)("div",{className:"flex justify-end gap-3 ae-4",children:[(0,st.jsx)(S,{type:"button",variant:"outline",onClick:m,children:"Cancel"}),(0,st.jsx)(S,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Vo=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:s,onUpdateSprint:m,onDeleteSprint:n})=>{let[u,p]=(0,ae.useState)([]),[c,g]=(0,ae.useState)(new Set),[E,k]=(0,ae.useState)(null),[b,I]=(0,ae.useState)(!1),[x,U]=(0,ae.useState)(null),[J,y]=(0,ae.useState)(null),[F,pe]=(0,ae.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[C,$]=(0,ae.useState)([]),[Y,j]=(0,ae.useState)("upcoming"),[we,q]=(0,ae.useState)(!1),[D,Ne]=(0,ae.useState)(0),ce=(0,ae.useRef)(null),Ye=(0,ae.useRef)(null);(0,ae.useEffect)(()=>{let d=()=>{ce.current&&Ne(ce.current.offsetHeight)};d();let f=new ResizeObserver(d);return ce.current&&f.observe(ce.current),()=>f.disconnect()},[]);let he=d=>t.find(f=>f.id===Number(d)),it=d=>a.find(f=>f.id===Number(d)),et=d=>{let f={high:"bg-red-100 text-red-800 border-red-200",medium:"bg-orange-100 text-orange-800 border-orange-200",low:"bg-green-100 text-green-800 border-green-200"};return f[d]||f.medium},je=d=>{if(!d||d?.length===0)return"";let f=d?.trim().split(" ");if(f?.length===1)return f[0];let L=f[0],G=f[f.length-1][0].toUpperCase();return`${L} ${G}`},We=d=>{let f={},L=[];return d.forEach(G=>{G.epic?(f[be(G.epic)]||(f[be(G.epic)]=[]),f[be(G.epic)].push(G)):L.push(G)}),{tasksByEpic:f,unassignedTasks:L}};(0,ae.useEffect)(()=>{$(a)},[a]);let h=C.filter(d=>{switch(Y){default:return!0}}),W=C.filter(d=>u.includes(d.id.toString())),ne=e.filter(d=>!d.sprint||d.status==="backlog"),_e=ne.reduce((d,f)=>d+(f.storyPoints||0),0),Q=d=>{p(f=>f.includes(d)?f.filter(L=>L!==d):f?.length<3?[...f,d]:f)},Ue=d=>{g(f=>{let L=new Set(f);return L.has(d)?L.delete(d):L.add(d),L})},At=d=>{s(d),I(!1)},nt=d=>{y(d.id.toString()),pe({name:d.name,description:d.description||"",startDate:d.startDate?new Date(d.startDate).toISOString().split("st")[0]:d.startDate,endDate:d.endDate?new Date(d.endDate).toISOString().split("st")[0]:d.endDate,isActive:!1})},Gt=()=>{J&&(m(J,{name:F.name,description:F.description,startDate:F.startDate,endDate:F.endDate}),$(d=>d.map(f=>(f.id===Number(J)&&(f.name=F.name,f.description=F.description,f.startDate=F.startDate,f.endDate=F.endDate),f))),y(null))},gt=()=>{y(null),pe({name:"",description:"",startDate:"",endDate:"",isActive:!1})},wt=(d,f)=>{k(f),d.dataTransfer.effectAllowed="move"},Mt=d=>{d.preventDefault(),d.dataTransfer.dropEffect="move"},ft=d=>{U(d)},It=()=>{U(null)},Ft=(d,f)=>{if(d.preventDefault(),U(null),!E)return;(be(E.sprint)||void 0)!==Number(f)&&o(E.id.toString(),{sprint:Number(f)}),k(null)},N=({task:d,showSprint:f=!1})=>{let L=d.epic?he(be(d.epic).toString()):null,G=d.sprint?it(be(d.sprint).toString()):null;return(0,st.jsx)(re,{className:"p-3 cursor-grab active:cursor-grabbing hover:shadow-md transition-all duration-200 border border-border bg-card hover:bg-accent/50",draggable:!0,onDragStart:Ie=>{Ie.dataTransfer.effectAllowed="move",Ie.dataTransfer.setData("text/plain",d.id.toString()),wt(Ie,d)},onClick:Ie=>{E===null&&r(d)},style:{userSelect:"none"},children:(0,st.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,st.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,st.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:d.name}),(0,st.jsx)(se,{className:`text-xs ${et(d.priority||"medium")}`,children:d.priority?.[0]?.toUpperCase()})]}),(0,st.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,st.jsxs)("div",{className:"flex items-center gap-1",children:[L&&(0,st.jsx)("div",{className:`w-2 h-2 rounded-full ${L.color}`}),(0,st.jsx)("span",{className:"text-muted-foreground truncate",children:L?.name})]}),(0,st.jsx)("span",{className:"text-muted-foreground",children:je(d.assignee?.value?.name)})]}),f&&G&&(0,st.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,st.jsx)(lt.Calendar,{className:"h-3 w-3"}),(0,st.jsx)("span",{children:G.name})]})]})})};return(0,st.jsxs)("div",{ref:Ye,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,st.jsx)("div",{ref:ce,className:"flex-shrink-0",children:(0,st.jsx)(at,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-st-r from-orange-600 via-amber-600 st-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>I(!0)}})}),(0,st.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,st.jsxs)("div",{className:"h-full",style:{height:D>0?`calc(100vh - ${D+120}px)`:"calc(100vh - 12rem)"},children:[(0,st.jsxs)("div",{className:"mb-4",children:[(0,st.jsx)(re,{className:"p-3 bg-card shadow-sm",children:(0,st.jsxs)("div",{className:"flex items-center justify-between",children:[(0,st.jsxs)("div",{className:"flex items-center gap-3",children:[(0,st.jsxs)("div",{children:[(0,st.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,st.jsxs)("p",{className:"text-xs text-muted-foreground",children:[u?.length,"/3 selected"]})]}),u?.length>0&&(0,st.jsxs)("div",{className:"flex items-center gap-2",children:[(0,st.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,st.jsx)("div",{className:"flex flex-wrap gap-1",children:W.map(d=>(0,st.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,st.jsx)("span",{className:"max-w-[80px] truncate",children:d.name}),(0,st.jsx)("button",{onClick:()=>Q(d.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,st.jsx)(lt.st,{className:"h-4 w-4"})})]},d.id))})]})]}),(0,st.jsxs)("div",{className:"flex items-center gap-2",children:[(0,st.jsxs)(S,{onClick:()=>I(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,st.jsx)(lt.Plus,{className:"h-3 w-3"}),"Add"]}),(0,st.jsxs)(S,{onClick:()=>q(!we),variant:"outline",size:"sm",className:"gap-1",children:[(0,st.jsx)(lt.Calendar,{className:"h-3 w-3"}),we?"Close":"Select"]})]})]})}),we&&(0,st.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>q(!1)}),(0,st.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-st shadow-xl z-10 transition-all duration-300 ease-in-out ${we?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,st.jsxs)(re,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,st.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,st.jsxs)("div",{className:"flex items-center justify-between",children:[(0,st.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,st.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>q(!1),className:"h-8 w-8 p-0",children:(0,st.jsx)(lt.st,{className:"h-4 w-4"})})]}),(0,st.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up st 3 sprints st view in your planning board"})]}),(0,st.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,st.jsx)("div",{className:"flex gap-1 mb-4 bg-muted p-1 rounded-lg",children:[{key:"all",label:"All",count:a.length},{key:"active",label:"Active"},{key:"upcoming",label:"Upcoming"}].map(d=>(0,st.jsxs)(S,{variant:Y===d.key?"default":"outline",size:"sm",onClick:()=>j(d.key),className:"text-xs h-8 px-3 flex-1",children:[d.label," (",d.count,")"]},d.key))}),(0,st.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:h.length>0?h.map(d=>{let f=u.includes(d.id.toString()),L=e.filter(ue=>be(ue.sprint)===d.id).length,G=!f&&u.length<3;return(0,st.jsx)("div",{className:`p-3 rounded-lg border transition-all ${f?"bg-primary/10 border-primary/30":G?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:J===d.id.toString()?(0,st.jsxs)("div",{className:"space-y-3",children:[(0,st.jsx)(Z,{value:F.name,onChange:ue=>pe(me=>({...me,name:ue.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,st.jsx)(Pe,{value:F.description,onChange:ue=>pe(me=>({...me,description:ue.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,st.jsxs)("div",{className:"flex gap-2",children:[(0,st.jsxs)(S,{size:"sm",onClick:()=>Gt(),className:"flex-1",children:[(0,st.jsx)(lt.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,st.jsxs)(S,{size:"sm",variant:"outline",onClick:gt,className:"flex-1",children:[(0,st.jsx)(lt.st,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,st.jsxs)("div",{children:[(0,st.jsxs)("div",{className:"flex items-start justify-between",children:[(0,st.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,st.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,st.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:d.name}),(0,st.jsx)(se,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,st.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:d.description}),(0,st.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,st.jsxs)("span",{className:"flex items-center gap-1",children:[(0,st.jsx)(lt.CalendarDays,{className:"h-3 w-3"}),new Date(d.startDate).toLocaleDateString()]}),(0,st.jsxs)("span",{className:"flex items-center gap-1",children:[(0,st.jsx)(lt.User,{className:"h-3 w-3"}),L," tasks"]})]})]}),(0,st.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,st.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>nt(d),className:"h-6 w-6 p-0",children:(0,st.jsx)(lt.Edit2,{className:"h-3 w-3"})}),(0,st.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>n(d.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,st.jsx)(lt.Trash2,{className:"h-3 w-3"})})]})]}),(0,st.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,st.jsx)(S,{variant:f?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>Q(d.id.toString()),disabled:!f&&u?.length>=3,children:(0,st.jsx)("span",{className:"pointer-events-none select-none",children:f?"Deselect":u?.length>=3?"Limit Reached":"Select"})})})]})},d.id)}):(0,st.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,st.jsx)(lt.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,st.jsxs)("p",{className:"text-sm",children:['No sprints found for "',Y,'" filter']}),(0,st.jsx)(S,{variant:"link",size:"sm",onClick:()=>j("all"),className:"text-xs",children:"Show all sprints"})]})}),u?.length===0&&(0,st.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,st.jsxs)("div",{className:"text-center",children:[(0,st.jsx)(lt.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,st.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints st start planning"}),(0,st.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up st 3 sprints st view alongside your backlog"})]})})]})]})})]}),(0,st.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,st.jsx)("div",{className:"lg:col-span-1",children:(0,st.jsxs)(re,{className:"p-4 h-full bg-card border-st-4 border-st-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Mt,onDragEnter:()=>ft("backlog"),onDragLeave:It,onDrop:d=>Ft(d,"backlog"),style:{height:D>0?`calc(100vh - ${D+200}px)`:"calc(100vh - 16rem)"},children:[(0,st.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,st.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,st.jsxs)("div",{className:"flex items-center gap-2",children:[(0,st.jsxs)(se,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[ne?.length," tasks"]}),(0,st.jsxs)(se,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[_e," pts"]})]})]}),(0,st.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${x==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:d,unassignedTasks:f}=We(ne);return(0,st.jsxs)(st.Fragment,{children:[Object.entries(d).map(([L,G])=>{let ue=he(L);if(!ue)return null;let me=c.has(L);return(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue(L),children:[(0,st.jsx)("div",{className:`w-3 h-3 rounded-full ${ue.color}`}),(0,st.jsx)("span",{className:"font-medium text-muted-foreground",children:ue.name}),(0,st.jsxs)("span",{className:"text-muted-foreground",children:["(",G?.length,")"]}),(0,st.jsx)("div",{className:"ml-auto",children:me?(0,st.jsx)(lt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,st.jsx)(lt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!me&&(0,st.jsx)("div",{className:"space-y-2 pl-2",children:G.map(Ie=>(0,st.jsx)(N,{task:Ie},Ie.id))})]},L)}),f?.length>0&&(()=>{let L=c.has("eo-epic");return(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue("eo-epic"),children:[(0,st.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,st.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,st.jsxs)("span",{className:"text-muted-foreground",children:["(",f?.length,")"]}),(0,st.jsx)("div",{className:"ml-auto",children:L?(0,st.jsx)(lt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,st.jsx)(lt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!L&&(0,st.jsx)("div",{className:"space-y-2 pl-2",children:f?.map(G=>(0,st.jsx)(N,{task:G},G.id))})]})})(),ne?.length===0&&(0,st.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here st move st backlog"}),ne?.length>0&&Object.keys(d).length===0&&f.length===0&&(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),ne?.map(L=>(0,st.jsx)(N,{task:L},L.id))]})]})})()})]})}),W.map(d=>{let f=e.filter(G=>be(G?.sprint)===d.id),L=f.reduce((G,ue)=>G+(ue?.storyPoints||0),0);return(0,st.jsxs)(re,{className:"p-4 h-full bg-card border-st-4 border-st-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Mt,onDragEnter:()=>ft(d.id.toString()),onDragLeave:It,onDrop:G=>Ft(G,d.id.toString()),style:{height:D>0?`calc(100vh - ${D+200}px)`:"calc(100vh - 16rem)"},children:[(0,st.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,st.jsx)("div",{children:(0,st.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:d.name})}),(0,st.jsxs)("div",{className:"flex items-center gap-2",children:[(0,st.jsxs)(se,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[f?.length," tasks"]}),(0,st.jsxs)(se,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[L," pts"]}),(0,st.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>{q(!0),nt(d)},className:"h-6 px-2",children:(0,st.jsx)(lt.Edit2,{className:"h-3 w-3"})}),(0,st.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>n(d.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,st.jsx)(lt.Trash2,{className:"h-3 w-3"})})]})]}),(0,st.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:G,unassignedTasks:ue}=We(f);return(0,st.jsxs)(st.Fragment,{children:[Object.entries(G).map(([me,Ie])=>{let jt=he(me);if(!jt)return null;let Wt=c.has(me);return(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue(me),children:[(0,st.jsx)("div",{className:`w-3 h-3 rounded-full ${jt.color}`}),(0,st.jsx)("span",{className:"font-medium text-muted-foreground",children:jt.name}),(0,st.jsxs)("span",{className:"text-muted-foreground",children:["(",Ie?.length,")"]}),(0,st.jsx)("div",{className:"ml-auto",children:Wt?(0,st.jsx)(lt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,st.jsx)(lt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Wt&&(0,st.jsx)("div",{className:"space-y-2 pl-2",children:Ie?.map(_t=>(0,st.jsx)(N,{task:_t},_t.id))})]},me)}),ue?.length>0&&(()=>{let me=c.has("eo-epic");return(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsxs)("div",{className:"flex items-center gap-2 px-2 py-1 bg-muted/50 rounded text-xs cursor-pointer hover:bg-muted/70 transition-colors",onClick:()=>Ue("eo-epic"),children:[(0,st.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,st.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,st.jsxs)("span",{className:"text-muted-foreground",children:["(",ue?.length,")"]}),(0,st.jsx)("div",{className:"ml-auto",children:me?(0,st.jsx)(lt.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,st.jsx)(lt.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!me&&(0,st.jsx)("div",{className:"space-y-2 pl-2",children:ue?.map(Ie=>(0,st.jsx)(N,{task:Ie},Ie.id))})]})})(),f?.length===0&&(0,st.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},d.id)})]}),(0,st.jsx)(Ho,{isOpen:b,onClose:()=>I(!1),onAddSprint:At})]})})]})};var yi=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),wi=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Ia=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,s]=t.split(":");o.setHours(parseInt(r),parseInt(s))}return o<a},Fa=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Ni=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Ci=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[r,s]=(0,ae.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[m,n]=(0,ae.useState)(!1),u=c=>{if(c.preventDefault(),!e.find(k=>k?.id.toString()===r.colleagueId.toString())){console.error("No valid colleague selected"),n(!0);return}n(!1);let E={title:r.title,description:r.description,dueDate:new Date(r.dueDate).toISOString(),dueTime:r.dueTime||void 0,isRecurring:r.isRecurring,assignedColleague:Number(r.colleagueId),project:1,updatedAt:new Date().toISOString()};t(E),o(!1),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ae.useEffect)(()=>{r.colleagueId&&n(!1)},[r.colleagueId]);let p=e.filter(Boolean);return(0,st.jsx)(Ge,{open:a,onOpenChange:o,children:(0,st.jsxs)(Oe,{className:"max-w-2xl",children:[(0,st.jsx)(ze,{children:(0,st.jsx)(He,{children:"Add New Reminder"})}),(0,st.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,st.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"title",children:"Title"}),(0,st.jsx)(Z,{id:"title",value:r.title,onChange:c=>s({...r,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"description",children:"Description"}),(0,st.jsx)(Pe,{id:"description",value:r.description,onChange:c=>s({...r,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,st.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"dueDate",children:"Due Date"}),(0,st.jsx)(Z,{id:"dueDate",type:"date",value:r.dueDate,onChange:c=>s({...r,dueDate:c.target.value}),required:!0})]}),(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,st.jsx)(Z,{id:"dueTime",type:"time",value:r.dueTime,onChange:c=>s({...r,dueTime:c.target.value})})]})]}),(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{className:`${m?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,st.jsxs)(Fe,{value:r.colleagueId,onValueChange:c=>{s({...r,colleagueId:c})},required:!0,children:[(0,st.jsx)(Ee,{className:`${m?"text-destructive border-red-500":""}`,children:(0,st.jsx)(Qe,{className:`${m?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(c=>c?.id.toString()===r.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,st.jsx)(Ae,{children:p.map(c=>(0,st.jsx)(ie,{value:c.id.toString(),children:c.name},c.id))})]}),m&&(0,st.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,st.jsxs)("div",{className:"space-y-2",children:[(0,st.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,st.jsx)("input",{type:"checkbox",id:"isRecurring",checked:r.isRecurring,onChange:c=>s({...r,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,st.jsx)(A,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),r.isRecurring&&(0,st.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,st.jsxs)(Fe,{value:r.recurrencePattern,onValueChange:c=>s({...r,recurrencePattern:c}),children:[(0,st.jsx)(Ee,{children:(0,st.jsx)(Qe,{})}),(0,st.jsxs)(Ae,{children:[(0,st.jsx)(ie,{value:"daily",children:"Daily"}),(0,st.jsx)(ie,{value:"weekly",children:"Weekly"}),(0,st.jsx)(ie,{value:"monthly",children:"Monthly"}),(0,st.jsx)(ie,{value:"yearly",children:"Yearly"})]})]})]}),(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"recurrenceInterval",children:"Every"}),(0,st.jsx)(Z,{id:"recurrenceInterval",type:"number",min:"1",value:r.recurrenceInterval,onChange:c=>s({...r,recurrenceInterval:parseInt(c.target.value)})})]})]})]}),(0,st.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,st.jsx)(S,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,st.jsx)(S,{type:"submit",children:"Add Reminder"})]})]})]})})},Si=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[s,m]=(0,ae.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("st")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),n=p=>{p.preventDefault(),a(e.id.toString(),{title:s.title,description:s.description,dueDate:new Date(s.dueDate||"").toISOString(),dueTime:s.dueTime||void 0,isRecurring:s.isRecurring}),r()},u=t.filter(Boolean);return(0,st.jsx)(Ge,{open:o,onOpenChange:r,children:(0,st.jsxs)(Oe,{className:"max-w-2xl",children:[(0,st.jsx)(ze,{children:(0,st.jsx)(He,{children:"Edit Reminder"})}),(0,st.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,st.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"edit-title",children:"Title"}),(0,st.jsx)(Z,{id:"edit-title",value:s.title,onChange:p=>m({...s,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"edit-description",children:"Description"}),(0,st.jsx)(Pe,{id:"edit-description",value:s.description||"",onChange:p=>m({...s,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,st.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,st.jsx)(Z,{id:"edit-dueDate",type:"date",value:s.dueDate,onChange:p=>m({...s,dueDate:p.target.value}),required:!0})]}),(0,st.jsxs)("div",{children:[(0,st.jsx)(A,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,st.jsx)(Z,{id:"edit-dueTime",type:"time",value:s.dueTime,onChange:p=>m({...s,dueTime:p.target.value})})]})]}),(0,st.jsx)("div",{className:"space-y-2",children:(0,st.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,st.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:s.isRecurring||!1,onChange:p=>m({...s,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,st.jsx)(A,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,st.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,st.jsx)(S,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,st.jsx)(S,{type:"submit",children:"Save Changes"})]})]})]})})},ki=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,s]=(0,ae.useState)(!1);if(!e||!e.id)return null;let m=Ia(new Date(e.dueDate||""),e.dueTime||""),n=Fa(new Date(e.dueDate||"")),u=Ni(new Date(e.dueDate||"")),p=()=>{a(e.id.toString(),{})},c=()=>n?"Today":u?"Tomorrow":yi(new Date(e.dueDate||""));return(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)(Si,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>s(!1)}),(0,st.jsx)(re,{children:(0,st.jsx)(Ot,{className:"p-4",children:(0,st.jsxs)("div",{className:"flex items-start justify-between",children:[(0,st.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,st.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80"}),(0,st.jsxs)("div",{className:"flex-1",children:[(0,st.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,st.jsx)("h3",{children:e.title})}),(0,st.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,st.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,st.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,st.jsx)(lt.Calendar,{className:"h-4 w-4"}),(0,st.jsx)("span",{className:m?"text-destructive font-medium":"",children:c()})]}),e.dueTime&&(0,st.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,st.jsx)(lt.Clock,{className:"h-4 w-4"}),(0,st.jsx)("span",{children:wi(e.dueTime)})]}),(0,st.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,st.jsx)(lt.User,{className:"h-4 w-4"}),(0,st.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,st.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,st.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>s(!0),className:"h-8 w-8 p-0",children:(0,st.jsx)(lt.Edit2,{className:"h-4 w-4"})}),(0,st.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,st.jsx)(lt.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Uo=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[s,m]=(0,ae.useState)(e.filter(Boolean)),[n,u]=(0,ae.useState)(t.filter(Boolean)),[p,c]=(0,ae.useState)("all"),[g,E]=(0,ae.useState)(""),[k,b]=(0,ae.useState)(!1);(0,ae.useEffect)(()=>{m(e.filter(Boolean))},[e]),(0,ae.useEffect)(()=>{u(t.filter(Boolean))},[t]);let I=C=>{if(!C.title){console.error("Invalid reminder data:",C);return}let $={...C,id:Date.now(),createdAt:new Date().toISOString()};m(Y=>[...Y,$]),a?.(C)},x=(C,$)=>{if(!C){console.error("No reminder ID provided for update");return}m(Y=>Y.map(j=>j?.id.toString()===C?{...j,...$}:j)),o?.(C,$)},U=C=>{if(!C){console.error("No reminder ID provided for deletion");return}m($=>$.filter(Y=>Y?.id.toString()!==C)),r?.(C)},y=s.filter(C=>{if(!C)return!1;if(g){let $=g.toLowerCase();if(!(C.title.toLowerCase().includes($)||C.description?.toLowerCase().includes($)))return!1}switch(p){case"pending":case"completed":case"overdue":return Ia(new Date(C.dueDate||""),C.dueTime||"");case"today":return Fa(new Date(C.dueDate||""));default:return!0}}).sort((C,$)=>{if(!C||!$)return 0;let Y={high:3,medium:2,low:1},j=0;return j!==0?j:new Date(C.dueDate||"").getTime()-new Date($.dueDate||"").getTime()}),F={total:s.filter(Boolean).length,overdue:s.filter(C=>C&&Ia(new Date(C.dueDate||""),C.dueTime||"")).length,today:s.filter(C=>C&&Fa(new Date(C.dueDate||""))).length},pe=n.find(Boolean)||{id:"1",name:"Default Colleague",description:"Default digital colleague for task management",jobDescription:"Default team member for task management",workInstructions:"Handle basic task assignments and reminders",capabilities:["task-management","reminder-creation"],knowledge:[],coreKnowledge:[]};return(0,st.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,st.jsx)(at,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-st-r from-emerald-600 via-teal-600 st-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{b(!0)}}}),(0,st.jsxs)("div",{className:"h-full bg-background",children:[(0,st.jsx)(Ci,{colleagues:n,onAddReminder:I,open:k,setOpen:b}),(0,st.jsxs)("div",{className:"p-6",children:[(0,st.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,st.jsxs)("div",{children:[(0,st.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,st.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,st.jsxs)(S,{className:"flex items-center space-x-2",onClick:()=>b(!0),children:[(0,st.jsx)(lt.Plus,{className:"h-4 w-4"}),(0,st.jsx)("span",{children:"Add Reminder"})]})]}),(0,st.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,st.jsxs)(re,{className:"p-4",children:[(0,st.jsx)("div",{className:"text-2xl font-bold text-foreground",children:F.total}),(0,st.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,st.jsxs)(re,{className:"p-4",children:[(0,st.jsx)("div",{className:"text-2xl font-bold text-primary",children:F.overdue}),(0,st.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,st.jsxs)(re,{className:"p-4",children:[(0,st.jsx)("div",{className:"text-2xl font-bold text-success",children:F.today}),(0,st.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,st.jsxs)(re,{className:"p-4",children:[(0,st.jsx)("div",{className:"text-2xl font-bold text-destructive",children:F.overdue}),(0,st.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,st.jsxs)(re,{className:"p-4",children:[(0,st.jsx)("div",{className:"text-2xl font-bold text-warning",children:F.today}),(0,st.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,st.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,st.jsx)("div",{className:"flex-1",children:(0,st.jsx)(Z,{placeholder:"Search reminders...",value:g,onChange:C=>E(C.target.value),className:"max-w-md"})}),(0,st.jsxs)(Fe,{value:p,onValueChange:C=>c(C),children:[(0,st.jsx)(Ee,{className:"w-40",children:(0,st.jsx)(Qe,{})}),(0,st.jsxs)(Ae,{children:[(0,st.jsxs)(ie,{value:"all",children:["All (",F.total,")"]}),(0,st.jsxs)(ie,{value:"overdue",children:["Overdue (",F.overdue,")"]}),(0,st.jsxs)(ie,{value:"overdue",children:["Overdue (",F.overdue,")"]}),(0,st.jsxs)(ie,{value:"today",children:["Today (",F.today,")"]})]})]})]}),(0,st.jsx)("div",{className:"space-y-4",children:y.length===0?(0,st.jsxs)(re,{className:"p-8 text-center",children:[(0,st.jsx)("div",{className:"text-muted-foreground",children:g||p!=="all"?"No reminders match your filters":"No reminders yet"}),!g&&p==="all"&&(0,st.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder st get started"})]}):y.map(C=>C&&(0,st.jsx)(ki,{reminder:C,colleagues:n,onUpdateReminder:x,onDeleteReminder:U},C.id))})]})]})]})};var Et=ge(require("@radix-ui/react-tabs"));function $o({className:e,...t}){return(0,st.jsx)(Et.Root,{"data-slot":"tabs",className:w("flex flex-col gap-2",e),...t})}function Go({className:e,...t}){return(0,st.jsx)(Et.List,{"data-slot":"tabs-list",className:w("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function jo({className:e,...t}){return(0,st.jsx)(Et.Trigger,{"data-slot":"tabs-trigger",className:w("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var ut=ge(require("react")),V=ge(require("@radix-ui/react-dropdown-menu")),$t=require("@radix-ui/react-icons");var Wo=V.Root,_o=V.Trigger;var Di=ut.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,st.jsxs)(V.SubTrigger,{ref:r,className:w("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,st.jsx)($t.ChevronRightIcon,{className:"ml-auto"})]}));Di.displayName=V.SubTrigger.displayName;var Ti=ut.forwardRef(({className:e,...t},a)=>(0,st.jsx)(V.SubContent,{ref:a,className:w("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ti.displayName=V.SubContent.displayName;var La=ut.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,st.jsx)(V.Portal,{children:(0,st.jsx)(V.Content,{ref:o,sideOffset:t,className:w("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));La.displayName=V.Content.displayName;var Ba=ut.forwardRef(({className:e,inset:t,...a},o)=>(0,st.jsx)(V.Item,{ref:o,className:w("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));Ba.displayName=V.Item.displayName;var Pi=ut.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,st.jsxs)(V.CheckboxItem,{ref:r,className:w("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,st.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,st.jsx)(V.ItemIndicator,{children:(0,st.jsx)($t.CheckIcon,{className:"h-4 w-4"})})}),t]}));Pi.displayName=V.CheckboxItem.displayName;var Ri=ut.forwardRef(({className:e,children:t,...a},o)=>(0,st.jsxs)(V.RadioItem,{ref:o,className:w("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,st.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,st.jsx)(V.ItemIndicator,{children:(0,st.jsx)($t.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Ri.displayName=V.RadioItem.displayName;var Ei=ut.forwardRef(({className:e,inset:t,...a},o)=>(0,st.jsx)(V.Label,{ref:o,className:w("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Ei.displayName=V.Label.displayName;var Ai=ut.forwardRef(({className:e,...t},a)=>(0,st.jsx)(V.Separator,{ref:a,className:w("-mx-1 my-1 h-px bg-muted",e),...t}));Ai.displayName=V.Separator.displayName;var Mi=({className:e,...t})=>(0,st.jsx)("span",{className:w("ml-auto text-xs tracking-widest opacity-60",e),...t});Mi.displayName="DropdownMenuShortcut";function qo({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:s=6}){let m=a.find(n=>n.value===e);return(0,st.jsxs)(Mo.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,st.jsx)("div",{className:"hidden lg:block",children:(0,st.jsx)($o,{value:e,onValueChange:t,children:(0,st.jsx)(Go,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,st.jsx)(Mo.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,st.jsx)(jo,{value:n.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,st.jsx)("div",{className:"lg:hidden",children:(0,st.jsxs)(Wo,{children:[(0,st.jsx)(_o,{asChild:!0,children:(0,st.jsxs)(S,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[m?.label||"Select",(0,st.jsx)(lt.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,st.jsx)(La,{align:"center",className:"w-[180px]",children:a.map(n=>(0,st.jsx)(Ba,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}var Ii=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function ua({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:s}){return(0,st.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${s||""}`,children:[r&&(0,st.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,st.jsx)("div",{className:"col-span-6",children:"Name"}),(0,st.jsx)("div",{className:"col-span-2",children:"Size"}),(0,st.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,st.jsx)("div",{className:"divide-y",children:e.map(m=>(0,st.jsxs)(Mo.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(m),children:[(0,st.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,st.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,st.jsx)("div",{children:(0,st.jsx)("p",{className:"font-medium",children:m.name})})]}),(0,st.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:Ii(m.filesize)}),(0,st.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,st.jsx)("span",{className:"text-sm md:text-base",children:new Date(m.createdAt).toLocaleDateString()}),(0,st.jsx)("div",{className:"flex gap-1",children:(0,st.jsx)(S,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:n=>{n.stopPropagation(),o?.(m)},children:(0,st.jsx)(lt.Trash2,{className:"h-4 w-4"})})})]})]},m.name))})]})}var Zo=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,r]=(0,ae.useState)(null),[s,m]=(0,ae.useState)(""),[n,u]=(0,ae.useState)(""),[p,c]=(0,ae.useState)(""),g=k=>{let b=k.target.files?.[0];b&&(r(b),s||m(b.name))},E=async k=>{if(k.preventDefault(),!o)return;let b=new FormData;b.append("file",o),b.append("name",s),n&&b.append("description",n),p&&b.append("tags",p),a?.(b),t(),r(null),m(""),u(""),c("")};return(0,st.jsx)(Ge,{open:e,onOpenChange:t,children:(0,st.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,st.jsx)(ze,{children:(0,st.jsx)(He,{children:"Add New File"})}),(0,st.jsxs)("form",{onSubmit:E,className:"grid gap-4",children:[(0,st.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,st.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,st.jsxs)("div",{className:"flex flex-col items-center justify-center ae-5 pb-6",children:[(0,st.jsx)(Fi,{className:"w-10 h-10 text-gray-400"}),(0,st.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,st.jsx)("span",{className:"font-semibold",children:"Click st upload"})," or drag and drop"]}),(0,st.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,st.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:g})]})}),o&&(0,st.jsxs)("div",{className:"flex items-center justify-between",children:[(0,st.jsxs)("div",{children:[(0,st.jsx)("p",{className:"font-medium",children:o.name}),(0,st.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,st.jsx)(S,{type:"submit",onClick:E,children:"Upload"})]})]})]})})};function Fi(e){return(0,st.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,st.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,st.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,st.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function za({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:s=!1,className:m}){let[n,u]=(0,ae.useState)(e),[p,c]=(0,ae.useState)(""),[g,E]=(0,ae.useState)("all"),[k,b]=(0,ae.useState)("all"),[I,x]=(0,ae.useState)(!1),U=(0,ae.useRef)(""),J=q=>q.map(D=>`${D.id}-${new Date(D.createdAt).getTime()}-${new Date(D.updatedAt).getTime()}`).join("-");(0,ae.useEffect)(()=>{let q=J(e);q!==U.current&&(u(e),U.current=q)},[e]);let y=n.filter(q=>q.name.toLowerCase().includes(p.toLowerCase())),F=y.slice(0,10),pe=y.filter(Boolean),C=()=>{x(!0)},$=q=>{a?.(q)},Y=q=>{console.log("deleting file",q),u(D=>D.filter(Ne=>Ne.name!==q.name)),o?.(q.id.toString())},j=q=>{r?.(q)},we=()=>{c(""),E("all")};return(0,st.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,st.jsx)(Mo.AnimatePresence,{mode:"wait",children:(0,st.jsx)(Mo.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,st.jsxs)("div",{className:`space-y-6 ${m||""}`,children:[(0,st.jsx)(at,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-st-r from-blue-600 via-indigo-600 st-purple-600",primaryAction:{label:"Upload file",onClick:C},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,st.jsx)(re,{children:(0,st.jsx)(Ot,{className:"ae-6",children:(0,st.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,st.jsx)("div",{className:"flex-1",children:(0,st.jsxs)("div",{className:"relative",children:[(0,st.jsx)(lt.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,st.jsx)(Z,{placeholder:"Search files...",value:p,onChange:q=>c(q.target.value),className:"pl-9"})]})}),(p||g!=="all")&&(0,st.jsxs)(S,{variant:"outline",onClick:we,className:"gap-2",children:[(0,st.jsx)(lt.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,st.jsxs)("div",{className:"space-y-4",children:[(0,st.jsx)(qo,{activeTab:k,onTabChange:b,tabOptions:[{value:"all",label:`All Files (${y.length})`},{value:"recent",label:`Recent (${F.length})`}],maxWidth:"500px",gridCols:3}),k==="all"&&(0,st.jsx)(ua,{files:y,onFileClick:j,onFileEdit:$,onFileDelete:Y,showHeader:!s}),k==="recent"&&(0,st.jsx)(ua,{files:F,onFileClick:j,onFileEdit:$,onFileDelete:Y,showHeader:!s}),k==="shared"&&(0,st.jsx)(ua,{files:pe,onFileClick:j,onFileEdit:$,onFileDelete:Y,showHeader:!s})]}),y.length===0&&(0,st.jsx)(re,{children:(0,st.jsx)(Ot,{className:"ae-6",children:(0,st.jsxs)("div",{className:"text-center py-8",children:[(0,st.jsx)(lt.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,st.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,st.jsx)("p",{className:"text-muted-foreground mb-4",children:p||g!=="all"?"Try adjusting your filters st see more results.":"Get started by uploading your first file."}),(0,st.jsxs)(S,{onClick:C,className:"gap-2",children:[(0,st.jsx)(lt.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,st.jsx)(Zo,{isOpen:I,onClose:()=>x(!1),onAddFile:t})]})}var Yo=require("next/navigation");function Qo({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:s=[],initialColleagues:m=[],initialUsers:n=[],initialFiles:u=[],initialView:p="kanban",onAddTask:c,onUpdateTask:g,onDeleteTask:E,onTaskClick:k,onAddEpic:b,onUpdateEpic:I,onDeleteEpic:x,onAddTaskToEpic:U,onAddSprint:J,onUpdateSprint:y,onDeleteSprint:F,onAddProject:pe,onUpdateProject:C,onDeleteProject:$,onFileAdd:Y,onFileEdit:j,onFileDelete:we,onFileClick:q,onAddReminder:D,onUpdateReminder:Ne,onDeleteReminder:ce,onViewChange:Ye,onToggleMobileMenu:he,onTeamClick:it,onTeamChange:et,onCopilotClick:je,handleAddComment:We}){let[h,W]=(0,ae.useState)(t),[ne,_e]=(0,ae.useState)(a),[Q,Ue]=(0,ae.useState)(o),[At,nt]=(0,ae.useState)(r),[Gt,gt]=(0,ae.useState)(s),[wt,Mt]=(0,ae.useState)(m),[ft,It]=(0,ae.useState)(n),[Ft,N]=(0,ae.useState)(u),[d,f]=(0,ae.useState)(!1),[L,G]=(0,ae.useState)(!1),[ue,me]=(0,ae.useState)(null),[Ie,jt]=(0,ae.useState)(null),[Wt,_t]=(0,ae.useState)(null),[Nt,Ha]=(0,ae.useState)(p||"kanban"),[Bi,er]=(0,ae.useState)(!1),tr=(0,Yo.useRouter)();(0,ae.useEffect)(()=>{W(t)},[t]),(0,ae.useEffect)(()=>{Ue(o)},[o]),(0,ae.useEffect)(()=>{_e(a)},[a]),(0,ae.useEffect)(()=>{nt(r)},[r]),(0,ae.useEffect)(()=>{N(u)},[u]),(0,ae.useEffect)(()=>{It(n)},[n]),(0,ae.useEffect)(()=>{Mt(m)},[m]),(0,ae.useEffect)(()=>{gt(s)},[s]),(0,ae.useEffect)(()=>{Ha(p)},[p]);let ar=h.filter(v=>{}),Oi=v=>ar.filter(M=>M.status===v),zi=v=>{let M={};return ne.forEach(B=>{}),M},Hi=v=>{_t(v)},Vi=v=>{Wt&&(W(M=>M.map(B=>B.id===Wt.id?{...B,status:v}:B)),_t(null))},Va=v=>{let M={...v,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};W(B=>[...B,M]),c?.(M)},ea=async(v,M)=>(W(B=>B.map(Ce=>Ce.id===Number(v)?{...Ce,...M}:Ce)),await g?.(v,M)),Ui=async(v,M)=>{ea(v,M)},Ua=v=>{W(M=>M.filter(B=>B.id!==Number(v))),ue?.id===Number(v)&&me(null),E?.(v)},$st=async v=>{Ua(v)},Gi=v=>{let M={...v,id:Date.now()};nt(B=>[...B,M]),pe?.(v)},ji=(v,M)=>{nt(B=>B.map(Ce=>Ce.id===Number(v)?{...Ce,...M}:Ce)),C?.(v,M)},Wi=v=>{nt(M=>M.filter(B=>B.id!==Number(v))),$?.(v)},$a=v=>{let M={...v,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};_e(B=>[...B,M]),b?.({...M})},or=()=>{G(!0)},rr=(v,M)=>{_e(B=>B.map(Ce=>Ce.id===Number(v)?{...Ce,...M}:Ce)),I?.(v,M)},ir=v=>{_e(M=>M.filter(B=>B.id!==Number(v))),W(M=>M.filter(B=>be(B.epic)!==Number(v))),x?.(v)},nr=v=>{let M={...v,id:Date.now()};Ue(B=>[...B,M]),J?.(v)},sr=(v,M)=>{Ue(B=>B.map(Ce=>Ce.id===Number(v)?{...Ce,...M}:Ce)),y?.(v,M)},lr=v=>{v==="backlog"||v==="all-tasks"||(Ue(M=>M.filter(B=>B.id!==Number(v))),W(M=>M.map(B=>be(B.sprint)===Number(v)?{...B,sprint:void 0}:B)),F?.(v))},fa=v=>{me(v)},dr=v=>{v==="planning"&&window.innerWidth<768||(Ha(v),Ye?.(v))},_i=()=>{er(v=>!v),he?.()},Ki=()=>{tr.push("/")},qi=v=>{console.log("Switching st team:",v)},Ji=v=>{console.log("Switching st team:",v)},cr=v=>{f(!0)},mr=()=>{f(!1),jt(null)},pr=v=>{let M={...v,id:Date.now(),createdAt:new Date().toISOString()};gt(B=>[...B,M]),D?.(v)},ur=(v,M)=>{gt(B=>B.map(Ce=>Ce.id===Number(v)?{...Ce,...M}:Ce)),Ne?.(v,M)},gr=v=>{gt(M=>M.filter(B=>B.id!==Number(v))),ce?.(v)},fr=()=>{Y?.()},vr=v=>{j?.(v)},br=v=>{N(M=>M.filter(B=>B.name!==v)),we?.(v)},hr=v=>{q?.(v)},Xi=[{id:"todo",title:"To ae",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Zi=()=>{switch(Nt){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},va=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],Yi=va.sort((v,M)=>M.lastUsed.getTime()-v.lastUsed.getTime()).slice(0,3),Qi=va.length>3,en=va.slice(3);return(0,st.jsxs)(ja,{currentView:Nt,onViewChange:dr,children:[Nt==="kanban"&&(0,st.jsx)("div",{className:"h-full overflow-hidden",children:(0,st.jsx)(Io,{initialProjects:At,initialEpics:ne,initialSprints:Q.map(v=>({...v,isSelected:!1})),initialTasks:h,initialColleagues:wt,initialUsers:ft,onAddTask:Va,onUpdateTask:ea,onDeleteTask:Ua,onTaskClick:fa,onAddEpic:$a,onAddComment:We})}),Nt==="planning"&&(0,st.jsx)("div",{className:"hidden md:block h-full",children:(0,st.jsx)(Vo,{tasks:h,epics:ne,sprints:Q,onUpdateTask:ea,onTaskClick:fa,onAddSprint:nr,onUpdateSprint:sr,onDeleteSprint:lr})}),Nt==="tasks"&&(0,st.jsx)("div",{className:"h-full",children:(0,st.jsx)(Uo,{initialReminders:Gt,initialColleagues:wt,onAddReminder:pr,onUpdateReminder:ur,onDeleteReminder:gr})}),Nt==="files"&&(0,st.jsx)("div",{className:"h-full",children:(0,st.jsx)(za,{initialFiles:Ft,onFileAdd:fr,onFileEdit:vr,onFileDelete:br,onFileClick:hr,compactView:!1})}),Nt==="epics"&&(0,st.jsx)("div",{className:"h-full",children:(0,st.jsx)(Fo,{tasks:h,epics:ne,sprints:Q,onUpdateTask:ea,onTaskClick:fa,onAddTaskToEpic:cr,onAddEpic:or,onUpdateEpic:rr,onDeleteEpic:ir})}),(0,st.jsx)(Ht,{isOpen:d,onClose:mr,onAddTask:Va,epics:ne,sprints:Q,assignees:[...wt,...ft],defaultEpicId:Ie||void 0}),(0,st.jsx)(Ut,{isOpen:L,onClose:()=>G(!1),onAddEpic:$a})]})}
|