cortex-react-components 2.13.10 → 2.13.11
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-ANCSWAD7.mjs → chunk-2GM2LPLB.mjs} +1 -1
- package/dist/{chunk-QILFMWE5.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
- package/dist/{chunk-UPRS7OYQ.mjs → chunk-2UNIT7NC.mjs} +1 -1
- package/dist/{chunk-33CHGT4N.mjs → chunk-4SRUEQTP.mjs} +1 -1
- package/dist/{chunk-USGRM22Y.mjs → chunk-6PS55VJZ.mjs} +1 -1
- package/dist/{chunk-3EGSOIRH.mjs → chunk-7OMPPFGG.mjs} +1 -1
- package/dist/chunk-AP6ZM2J6.mjs +4 -0
- package/dist/{chunk-CTC6WSB6.mjs → chunk-BQQ4V4PX.mjs} +1 -1
- package/dist/{chunk-DKRRVTCV.mjs → chunk-CJDUN6R4.mjs} +1 -1
- package/dist/{chunk-M5QUXKCF.mjs → chunk-DPZHVBGG.mjs} +1 -1
- package/dist/{chunk-CBRUFCI3.mjs → chunk-F3CQJWDX.mjs} +1 -1
- package/dist/{chunk-YPSUDHCJ.mjs → chunk-F64CA5CH.mjs} +1 -1
- package/dist/{chunk-MEVSHOG4.mjs → chunk-FEWOSBUJ.mjs} +1 -1
- package/dist/{chunk-MFUZNS7C.mjs → chunk-FYQBRCQM.mjs} +1 -1
- package/dist/{chunk-HLTP3ZQN.mjs → chunk-GAZHKHGB.mjs} +1 -1
- package/dist/{chunk-MGSTQLZC.mjs → chunk-GETYSIZV.mjs} +1 -1
- package/dist/{chunk-GO42W2BM.mjs → chunk-HDKHF3EA.mjs} +1 -1
- package/dist/{chunk-VQBOJHZF.mjs → chunk-HKMNAXLM.mjs} +1 -1
- package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
- package/dist/{chunk-OXKN6X62.mjs → chunk-KVLUT4U2.mjs} +1 -1
- package/dist/chunk-L3V5YDPH.mjs +1 -0
- package/dist/{chunk-ESPA7NWT.mjs → chunk-MDBYZZXI.mjs} +1 -1
- package/dist/{chunk-YWRU7OE3.mjs → chunk-MO4HRQEL.mjs} +1 -1
- package/dist/{chunk-DX3G3FKT.mjs → chunk-O24GFE6Q.mjs} +1 -1
- package/dist/{chunk-R33MOMFK.mjs → chunk-P6OSMPUQ.mjs} +1 -1
- package/dist/{chunk-JNJJAJPI.mjs → chunk-PNUBVBSR.mjs} +1 -1
- package/dist/{chunk-RMZLEIRP.mjs → chunk-PTZT4QJW.mjs} +1 -1
- package/dist/{chunk-U2WF6H6D.mjs → chunk-QQFIVSBW.mjs} +1 -1
- package/dist/{chunk-W2UVMIWN.mjs → chunk-R5SXUWYU.mjs} +1 -1
- package/dist/{chunk-CCJJAUGB.mjs → chunk-R6AYIVIR.mjs} +1 -1
- package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
- package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
- package/dist/{chunk-VPAJF7N2.mjs → chunk-TTSBUSVB.mjs} +1 -1
- package/dist/{chunk-6EKGV4I2.mjs → chunk-U3FYDDE2.mjs} +1 -1
- package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
- package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
- package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
- package/dist/{chunk-VL7AXCXD.mjs → chunk-XOEYCVMT.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/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/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/PayloadCard/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/AddEpicModal.d.ts +1 -1
- package/dist/components/Projects/AddEpicModal.js +1 -1
- package/dist/components/Projects/AddEpicModal.mjs +1 -1
- package/dist/components/Projects/EpicsView.d.ts +1 -1
- package/dist/components/Projects/EpicsView.js +1 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.d.ts +1 -1
- package/dist/components/Projects/KanbanBoardView.js +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.d.ts +1 -1
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/index.js +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +1 -1
- 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/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.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-6R36YTGY.mjs +0 -1
- package/dist/chunk-KSRDC26N.mjs +0 -4
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
'use client'
|
|
4
4
|
|
|
5
|
-
"use strict";var ur=Object.create;var Pt=Object.defineProperty;var gr=Object.getOwnPropertyDescriptor;var fr=Object.getOwnPropertyNames;var vr=Object.getPrototypeOf,br=Object.prototype.hasOwnProperty;var hr=(e,t)=>{for(var a in t)Pt(e,a,{get:t[a],enumerable:!0})},ba=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fr(t))!br.call(e,i)&&i!==a&&Pt(e,i,{get:()=>t[i],enumerable:!(r=gr(t,i))||r.enumerable});return e};var ne=(e,t,a)=>(a=e!=null?ur(vr(e)):{},ba(t||!e||!e.__esModule?Pt(a,"default",{value:e,enumerable:!0}):a,e)),xr=e=>ba(Pt({},"__esModule",{value:!0}),e);var yo={};hr(yo,{DCProjectCard:()=>Ma,EpicsView:()=>xo,KanbanBoardView:()=>co,PlanningView:()=>mo,TasksView:()=>ho});module.exports=xr(yo);var Ba=require("motion/react"),ft=require("lucide-react");var Ta=require("class-variance-authority");var Da=require("clsx");var Kt="-",yr=e=>{let t=wr(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{let l=c.split(Kt);return l[0]===""&&l.length!==1&&l.shift(),ya(l,t)||Nr(c)},getConflictingClassGroupIds:(c,l)=>{let g=a[c]||[];return l&&r[c]?[...g,...r[c]]:g}}},ya=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],r=t.nextPart.get(a),i=r?ya(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let n=e.join(Kt);return t.validators.find(({validator:c})=>c(n))?.classGroupId},ha=/^\[(.+)\]$/,Nr=e=>{if(ha.test(e)){let t=ha.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},wr=e=>{let{theme:t,prefix:a}=e,r={nextPart:new Map,validators:[]};return Sr(Object.entries(e.classGroups),a).forEach(([n,c])=>{_t(c,r,n,t)}),r},_t=(e,t,a,r)=>{e.forEach(i=>{if(typeof i=="string"){let n=i===""?t:xa(t,i);n.classGroupId=a;return}if(typeof i=="function"){if(Cr(i)){_t(i(r),t,a,r);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([n,c])=>{_t(c,xa(t,n),a,r)})})},xa=(e,t)=>{let a=e;return t.split(Kt).forEach(r=>{a.nextPart.has(r)||a.nextPart.set(r,{nextPart:new Map,validators:[]}),a=a.nextPart.get(r)}),a},Cr=e=>e.isThemeGetter,Sr=(e,t)=>t?e.map(([a,r])=>{let i=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,l])=>[t+c,l])):n);return[a,i]}):e,kr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,r=new Map,i=(n,c)=>{a.set(n,c),t++,t>e&&(t=0,r=a,a=new Map)};return{get(n){let c=a.get(n);if(c!==void 0)return c;if((c=r.get(n))!==void 0)return i(n,c),c},set(n,c){a.has(n)?a.set(n,c):i(n,c)}}},Na="!",Dr=e=>{let{separator:t,experimentalParseClassName:a}=e,r=t.length===1,i=t[0],n=t.length,c=l=>{let g=[],p=0,d=0,u;for(let f=0;f<l.length;f++){let F=l[f];if(p===0){if(F===i&&(r||l.slice(f,f+n)===t)){g.push(l.slice(d,f)),d=f+n;continue}if(F==="/"){u=f;continue}}F==="["?p++:F==="]"&&p--}let E=g.length===0?l:l.substring(d),P=E.startsWith(Na),N=P?E.substring(1):E,A=u&&u>d?u-d:void 0;return{modifiers:g,hasImportantModifier:P,baseClassName:N,maybePostfixModifierPosition:A}};return a?l=>a({className:l,parseClassName:c}):c},Tr=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(r=>{r[0]==="["?(t.push(...a.sort(),r),a=[]):a.push(r)}),t.push(...a.sort()),t},Pr=e=>({cache:kr(e.cacheSize),parseClassName:Dr(e),...yr(e)}),Rr=/\Pa+/,Er=(e,t)=>{let{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:i}=t,n=[],c=e.trim().split(Rr),l="";for(let g=c.length-1;g>=0;g-=1){let p=c[g],{modifiers:d,hasImportantModifier:u,baseClassName:E,maybePostfixModifierPosition:P}=a(p),N=!!P,A=r(N?E.substring(0,P):E);if(!A){if(!N){l=p+(l.length>0?" "+l:l);continue}if(A=r(E),!A){l=p+(l.length>0?" "+l:l);continue}N=!1}let f=Tr(d).join(":"),F=u?f+Na:f,V=F+A;if(n.includes(V))continue;n.push(V);let h=i(A,N);for(let I=0;I<h.length;++I){let pe=h[I];n.push(F+pe)}l=p+(l.length>0?" "+l:l)}return l};function Ar(){let e=0,t,a,r="";for(;e<arguments.length;)(t=arguments[e++])&&(a=wa(t))&&(r&&(r+=" "),r+=a);return r}var wa=e=>{if(typeof e=="string")return e;let t,a="";for(let r=0;r<e.length;r++)e[r]&&(t=wa(e[r]))&&(a&&(a+=" "),a+=t);return a};function Ir(e,...t){let a,r,i,n=c;function c(g){let p=t.reduce((d,u)=>u(d),e());return a=Pr(p),r=a.cache.get,i=a.cache.set,n=l,l(g)}function l(g){let p=r(g);if(p)return p;let d=Er(g,a);return i(g,d),d}return function(){return n(Ar.apply(null,arguments))}}var X=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ca=/^\[(?:([a-ft-]+):)?(.+)\]$/i,Lr=/^\d+\/\d+$/,Br=new Set(["px","full","screen"]),Mr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Or=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fr=/^(inset_)?-?((\d+)?\.?(\d+)[a-ft]+|0)_-?((\d+)?\.?(\d+)[a-ft]+|0)/,Hr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qe=e=>ut(e)||Br.has(e)||Lr.test(e),et=e=>gt(e,"length",Kr),ut=e=>!!e&&!Number.isNaN(Number(e)),Wt=e=>gt(e,"number",ut),ht=e=>!!e&&Number.isInteger(Number(e)),Vr=e=>e.endsWith("%")&&ut(e.slice(0,-1)),B=e=>Ca.test(e),tt=e=>Mr.test(e),$r=new Set(["length","size","percentage"]),Gr=e=>gt(e,$r,Sa),Ur=e=>gt(e,"position",Sa),jr=new Set(["image","url"]),Wr=e=>gt(e,jr,Jr),_r=e=>gt(e,"",qr),xt=()=>!0,gt=(e,t,a)=>{let r=Ca.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):a(r[2]):!1},Kr=e=>Or.test(e)&&!zr.test(e),Sa=()=>!1,qr=e=>Fr.test(e),Jr=e=>Hr.test(e);var Xr=()=>{let e=X("colors"),t=X("spacing"),a=X("blur"),r=X("brightness"),i=X("borderColor"),n=X("borderRadius"),c=X("borderSpacing"),l=X("borderWidth"),g=X("contrast"),p=X("grayscale"),d=X("hueRotate"),u=X("invert"),E=X("gap"),P=X("gradientColorStops"),N=X("gradientColorStopPositions"),A=X("inset"),f=X("margin"),F=X("opacity"),V=X("padding"),h=X("saturate"),I=X("scale"),pe=X("sepia"),k=X("skew"),j=X("space"),re=X("translate"),$=()=>["auto","contain","none"],Se=()=>["auto","hidden","clip","visible","scroll"],Pe=()=>["auto",B,t],T=()=>[B,t],be=()=>["",qe,et],J=()=>["auto",ut,B],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ue=()=>["solid","dashed","dotted","double","none"],Ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ge=()=>["start","end","center","between","around","evenly","stretch"],_e=()=>["","0",B],Ke=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[ut,B];return{cacheSize:500,separator:":",theme:{colors:[xt],spacing:[qe,et],blur:["none","",tt,B],brightness:b(),borderColor:[e],borderRadius:["none","","full",tt,B],borderSpacing:T(),borderWidth:be(),contrast:b(),grayscale:_e(),hueRotate:b(),invert:_e(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[Vr,et],inset:Pe(),margin:Pe(),opacity:b(),padding:T(),saturate:b(),scale:b(),sepia:_e(),skew:b(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[tt]}],"break-after":[{"break-after":Ke()}],"break-before":[{"break-before":Ke()}],"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:[...We(),B]}],overflow:[{overflow:Se()}],"overflow-Pa":[{"overflow-Pa":Se()}],"overflow-Pa":[{"overflow-Pa":Se()}],overscroll:[{overscroll:$()}],"overscroll-Pa":[{"overscroll-Pa":$()}],"overscroll-Pa":[{"overscroll-Pa":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[A]}],"inset-Pa":[{"inset-Pa":[A]}],"inset-Pa":[{"inset-Pa":[A]}],start:[{start:[A]}],end:[{end:[A]}],top:[{top:[A]}],right:[{right:[A]}],bottom:[{bottom:[A]}],left:[{left:[A]}],visibility:["visible","invisible","collapse"],ft:[{ft:["auto",ht,B]}],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",B]}],grow:[{grow:_e()}],shrink:[{shrink:_e()}],order:[{order:["first","last","none",ht,B]}],"grid-cols":[{"grid-cols":[xt]}],"col-start-end":[{col:["auto",{span:["full",ht,B]},B]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[xt]}],"row-start-end":[{row:["auto",{span:[ht,B]},B]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[E]}],"gap-Pa":[{"gap-Pa":[E]}],"gap-Pa":[{"gap-Pa":[E]}],"justify-content":[{justify:["normal",...Ge()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ge(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ge(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[V]}],px:[{px:[V]}],py:[{py:[V]}],ps:[{ps:[V]}],pe:[{pe:[V]}],pt:[{pt:[V]}],pr:[{pr:[V]}],pb:[{pb:[V]}],pl:[{pl:[V]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],Pa:[{Pa:[f]}],mt:[{mt:[f]}],ie:[{ie:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-Pa":[{"space-Pa":[j]}],"space-Pa-reverse":["space-Pa-reverse"],"space-Pa":[{"space-Pa":[j]}],"space-Pa-reverse":["space-Pa-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[tt]},tt]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",tt,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wt]}],"font-family":[{font:[xt]}],"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",B]}],"line-clamp":[{"line-clamp":["none",ut,Wt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qe,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[F]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qe,et]}],"underline-offset":[{"underline-offset":["auto",qe,B]}],"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:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],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",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[F]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),Ur]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","Pa","Pa","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gr]}],"bg-image":[{bg:["none",{"gradient-to":["t","ie","r","br","b","bl","l","tl"]},Wr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-to":[{to:[P]}],rounded:[{rounded:[n]}],"rounded-Pa":[{"rounded-Pa":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-Pa":[{"rounded-Pa":[n]}],"rounded-Pa":[{"rounded-Pa":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-ie":[{"rounded-ie":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-Pa":[{"border-Pa":[l]}],"border-w-Pa":[{"border-Pa":[l]}],"border-w-Pa":[{"border-Pa":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[F]}],"border-style":[{border:[...ue(),"hidden"]}],"divide-Pa":[{"divide-Pa":[l]}],"divide-Pa-reverse":["divide-Pa-reverse"],"divide-Pa":[{"divide-Pa":[l]}],"divide-Pa-reverse":["divide-Pa-reverse"],"divide-opacity":[{"divide-opacity":[F]}],"divide-style":[{divide:ue()}],"border-color":[{border:[i]}],"border-color-Pa":[{"border-Pa":[i]}],"border-color-Pa":[{"border-Pa":[i]}],"border-color-Pa":[{"border-Pa":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ue()]}],"outline-offset":[{"outline-offset":[qe,B]}],"outline-w":[{outline:[qe,et]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[F]}],"ring-offset-w":[{"ring-offset":[qe,et]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",tt,_r]}],"shadow-color":[{shadow:[xt]}],opacity:[{opacity:[F]}],"mix-blend":[{"mix-blend":[...Ye(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ye()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[r]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",tt,B]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[h]}],sepia:[{sepia:[pe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[F]}],"backdrop-saturate":[{"backdrop-saturate":[h]}],"backdrop-sepia":[{"backdrop-sepia":[pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-Pa":[{"border-spacing-Pa":[c]}],"border-spacing-Pa":[{"border-spacing-Pa":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-Pa":[{"scale-Pa":[I]}],"scale-Pa":[{"scale-Pa":[I]}],rotate:[{rotate:[ht,B]}],"translate-Pa":[{"translate-Pa":[re]}],"translate-Pa":[{"translate-Pa":[re]}],"skew-Pa":[{"skew-Pa":[k]}],"skew-Pa":[{"skew-Pa":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],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","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","Pa-resize","w-resize","ne-resize","nw-resize","Pa-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","Pa","Pa",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-Pa":[{"scroll-Pa":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-ie":[{"scroll-ie":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","Pa","Pa","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-Pa":[{"touch-pan":["Pa","left","right"]}],"touch-Pa":[{"touch-pan":["Pa","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qe,et,Wt]}],stroke:[{stroke:[e,"none"]}],ie:["ie-only","not-ie-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-Pa","overflow-Pa"],overscroll:["overscroll-Pa","overscroll-Pa"],inset:["inset-Pa","inset-Pa","start","end","top","right","bottom","left"],"inset-Pa":["right","left"],"inset-Pa":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-Pa","gap-Pa"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","Pa","mt","ie","mb","ml"],mx:["ie","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-Pa","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Pa","rounded-Pa","rounded-es","rounded-tl","rounded-ie","rounded-br","rounded-bl"],"rounded-Pa":["rounded-ss","rounded-es"],"rounded-e":["rounded-Pa","rounded-Pa"],"rounded-t":["rounded-tl","rounded-ie"],"rounded-r":["rounded-ie","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-Pa","border-spacing-Pa"],"border-w":["border-w-Pa","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-Pa":["border-w-r","border-w-l"],"border-w-Pa":["border-w-t","border-w-b"],"border-color":["border-color-Pa","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-Pa":["border-color-r","border-color-l"],"border-color-Pa":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-Pa","scroll-mt","scroll-ie","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ie","scroll-ml"],"scroll-my":["scroll-mt","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-Pa","touch-Pa","touch-pz"],"touch-Pa":["touch"],"touch-Pa":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ka=Ir(Xr);function w(...e){return ka((0,Da.clsx)(e))}var Pa=require("react/jsx-runtime"),Zr=(0,Ta.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 K({className:e,variant:t,...a}){return(0,Pa.jsx)("div",{className:w(Zr({variant:t}),e),...a})}var Ra=require("@radix-ui/react-slot"),Aa=ne(require("react")),Rt=(0,Ta.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=Aa.forwardRef(({asChild:e=!1,className:t,size:a,variant:r,...i},n)=>(0,Pa.jsx)(e?Ra.Slot:"button",{className:w(Rt({className:t,size:a,variant:r})),ref:n,...i}));S.displayName="Button";var it=ne(require("react"));var Q=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Q.displayName="Card";var qt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("flex flex-col space-Pa-1.5 p-6",e),...t}));qt.displayName="CardHeader";var Jt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("font-semibold leading-none tracking-tight",e),...t}));Jt.displayName="CardTitle";var Xt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("text-sm text-muted-foreground",e),...t}));Xt.displayName="CardDescription";var yt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("p-6 pt-0",e),...t}));yt.displayName="CardContent";var Zt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("flex items-center p-6 pt-0",e),...t}));Zt.displayName="CardFooter";var La=ne(require("react")),Nt=ne(require("@radix-ui/react-progress"));var Qt=La.forwardRef(({className:e,value:t,...a},r)=>(0,Pa.jsx)(Nt.Root,{ref:r,className:w("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Pa.jsx)(Nt.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Qt.displayName=Nt.Root.displayName;function Ma({project:e,onOpen:t,onShare:a,className:r}){return(0,Pa.jsx)(Ba.motion.div,{whileHover:{scale:1.02,Pa:-5},whileTap:{scale:.98},className:r,children:(0,Pa.jsxs)(Q,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Pa.jsxs)(qt,{children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)(Jt,{children:e.name}),(0,Pa.jsxs)(K,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Pa.jsx)(Xt,{children:e.description})]}),(0,Pa.jsxs)(yt,{className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Pa.jsx)("span",{children:"Progress"}),(0,Pa.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Pa.jsx)(Qt,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Pa.jsxs)("div",{className:"flex items-center",children:[(0,Pa.jsx)(ft.Users,{className:"ie-1 h-4 w-4"}),e.members," members"]}),(0,Pa.jsxs)("div",{className:"flex items-center",children:[(0,Pa.jsx)(ft.FileText,{className:"ie-1 h-4 w-4"}),e.files," files"]})]})]}),(0,Pa.jsxs)(Zt,{className:"flex gap-2",children:[(0,Pa.jsx)(S,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Pa.jsx)(S,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Pa.jsx)(ft.Share2,{className:"h-4 w-4"})})]})]})})}var ie=require("react");var Oa=({title:e,status:t,taskCount:a,children:r,onDrop:i,isCompact:n=!1,height:c})=>{let l=d=>{d.preventDefault()},g=d=>{d.preventDefault(),i(t)};return(0,Pa.jsxs)(Q,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${n?"lg:max-w-xs":""}`,style:{height:c||"calc(100vh - 350px)"},onDragOver:l,onDrop:g,children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Pa.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${n?"text-base":"text-lg"}`,children:e}),(0,Pa.jsx)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Pa.jsx)("div",{className:"flex-1 overflow-Pa-auto space-Pa-4 min-h-0",children:r})]})};var wt=({task:e,epic:t,onDragStart:a,onTaskClick:r,isCompact:i=!1})=>{let n=d=>{a(e)},c=()=>{r(e)},l=()=>{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"}},g=()=>{switch(e.type){case"story":return(0,Pa.jsx)(ft.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Pa.jsx)(ft.Bug,{className:"h-3 w-3"});case"spike":return(0,Pa.jsx)(ft.Zap,{className:"h-3 w-3"});case"task":default:return(0,Pa.jsx)(ft.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 i?(0,Pa.jsx)(Q,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:n,onClick:c,children:(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:g()}),(0,Pa.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Pa.jsxs)(Q,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:n,onClick:c,children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Pa.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[g(),(0,Pa.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Pa.jsxs)("div",{className:"flex gap-1",children:[(0,Pa.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:e.priority}),(0,Pa.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,Pa.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.User,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:e.assignee?.value?.name})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var Ct=ne(require("react")),ce=ne(require("@radix-ui/react-dialog"));var Ve=ce.Root;var Yr=ce.Portal;var Fa=Ct.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(ce.Overlay,{ref:a,className:w("fixed inset-0 ft-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}));Fa.displayName=ce.Overlay.displayName;var Le=Ct.forwardRef(({className:e,children:t,...a},r)=>(0,Pa.jsxs)(Yr,{children:[(0,Pa.jsx)(Fa,{}),(0,Pa.jsxs)(ce.Content,{ref:r,className:w("fixed left-[50%] top-[50%] ft-50 grid w-full max-w-lg translate-Pa-[-50%] translate-Pa-[-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-to-left-1/2 data-[state=closed]:slide-out-to-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,Pa.jsxs)(ce.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,Pa.jsx)(ft.X,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{className:"ie-only",children:"Close"})]})]})]}));Le.displayName=ce.Content.displayName;var Be=({className:e,...t})=>(0,Pa.jsx)("div",{className:w("flex flex-col space-Pa-1.5 text-center sm:text-left",e),...t});Be.displayName="DialogHeader";var St=({className:e,...t})=>(0,Pa.jsx)("div",{className:w("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-Pa-2",e),...t});St.displayName="DialogFooter";var Me=Ct.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(ce.Title,{ref:a,className:w("text-lg font-semibold leading-none tracking-tight",e),...t}));Me.displayName=ce.Title.displayName;var Qr=Ct.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(ce.Description,{ref:a,className:w("text-sm text-muted-foreground",e),...t}));Qr.displayName=ce.Description.displayName;var Ha=ne(require("react"));var U=Ha.forwardRef(({className:e,type:t,...a},r)=>(0,Pa.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:r,...a}));U.displayName="Input";var $a=ne(require("react")),ge=$a.forwardRef(({className:e,...t},a)=>(0,Pa.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}));ge.displayName="Textarea";var M=ne(require("@radix-ui/react-select")),at=ne(require("react")),De=M.Root;var $e=M.Value,Ne=at.forwardRef(({children:e,className:t,...a},r)=>(0,Pa.jsxs)(M.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:r,...a,children:[e,(0,Pa.jsx)(M.Icon,{asChild:!0,children:(0,Pa.jsx)(ft.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ne.displayName=M.Trigger.displayName;var Ua=at.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.ScrollUpButton,{className:w("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Pa.jsx)(ft.ChevronUp,{className:"h-4 w-4"})}));Ua.displayName=M.ScrollUpButton.displayName;var ja=at.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.ScrollDownButton,{className:w("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Pa.jsx)(ft.ChevronDown,{className:"h-4 w-4"})}));ja.displayName=M.ScrollDownButton.displayName;var we=at.forwardRef(({children:e,className:t,position:a="popper",...r},i)=>(0,Pa.jsx)(M.Portal,{children:(0,Pa.jsxs)(M.Content,{className:w("relative ft-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-Pa-1 data-[side=left]:-translate-Pa-1 data-[side=right]:translate-Pa-1 data-[side=top]:-translate-Pa-1",t),position:a,ref:i,...r,children:[(0,Pa.jsx)(Ua,{}),(0,Pa.jsx)(M.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,Pa.jsx)(ja,{})]})}));we.displayName=M.Content.displayName;var eo=at.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.Label,{className:w("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));eo.displayName=M.Label.displayName;var Z=at.forwardRef(({children:e,className:t,...a},r)=>(0,Pa.jsxs)(M.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:r,...a,children:[(0,Pa.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Pa.jsx)(M.ItemIndicator,{children:(0,Pa.jsx)(ft.Check,{className:"h-4 w-4"})})}),(0,Pa.jsx)(M.ItemText,{children:e})]}));Z.displayName=M.Item.displayName;var to=at.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.Separator,{className:w("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));to.displayName=M.Separator.displayName;var Wa=ne(require("react")),ea=ne(require("@radix-ui/react-label"));var ao=(0,Ta.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),D=Wa.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(ea.Root,{ref:a,className:w(ao(),e),...t}));D.displayName=ea.Root.displayName;var ct=ne(require("react")),vt=ne(require("@radix-ui/react-toggle-group"));var qa=ne(require("react")),ta=ne(require("@radix-ui/react-toggle"));var aa=(0,Ta.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"}}),ro=qa.forwardRef(({className:e,variant:t,size:a,...r},i)=>(0,Pa.jsx)(ta.Root,{ref:i,className:w(aa({variant:t,size:a,className:e})),...r}));ro.displayName=ta.Root.displayName;var Za=ct.createContext({size:"default",variant:"default"}),mt=ct.forwardRef(({className:e,variant:t,size:a,children:r,...i},n)=>(0,Pa.jsx)(vt.Root,{ref:n,className:w("flex items-center justify-center gap-1",e),...i,children:(0,Pa.jsx)(Za.Provider,{value:{variant:t,size:a},children:r})}));mt.displayName=vt.Root.displayName;var pt=ct.forwardRef(({className:e,children:t,variant:a,size:r,...i},n)=>{let c=ct.useContext(Za);return(0,Pa.jsx)(vt.Item,{ref:n,className:w(aa({variant:c.variant||a,size:c.size||r}),e),...i,children:t})});pt.displayName=vt.Item.displayName;var oo=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ft.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:ft.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ft.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ft.Zap}],so=[{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"}],At=({isOpen:e,onClose:t,onAddTask:a,epics:r,sprints:i,assignees:n,defaultEpicId:c})=>{let[l,g]=(0,ie.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,ie.useEffect)(()=>{e&&c&&g(u=>({...u,epic:c}))},[e,c]),(0,ie.useEffect)(()=>{e&&g({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:c||"",sprint:"none",assignee:""})},[e]);let p=u=>{u.preventDefault(),l.name.trim()&&(a({name:l.name.trim(),description:l.description.trim(),status:"todo",priority:l.priority,type:l.type,storyPoints:l.storyPoints,epic:Number(l.epic),sprint:Number(l.sprint),assignee:l.assignee.trim()?{relationTo:"digital-colleagues",value:Number(l.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),g({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:c||"",sprint:"",assignee:""}),t())},d=(u,E)=>{g(P=>({...P,[u]:E}))};return(0,Pa.jsx)(Ve,{open:e,onOpenChange:t,children:(0,Pa.jsxs)(Le,{className:"sm:max-w-md",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Add New Task"})}),(0,Pa.jsxs)("form",{onSubmit:p,className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"name",children:"Task Title"}),(0,Pa.jsx)(U,{id:"name",value:l.name,onChange:u=>d("name",u.target.value),placeholder:"Enter task title",required:!0})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(ge,{id:"description",value:l.description,onChange:u=>d("description",u.target.value),placeholder:"Enter task description",rows:3})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Type"}),(0,Pa.jsx)(mt,{type:"single",value:l.type||"",onValueChange:u=>u&&d("type",u),children:oo.map(u=>{let E=u.icon;return(0,Pa.jsxs)(pt,{value:u.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Pa.jsx)(E,{className:"h-4 w-4"}),u.label]},u.value)})})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Priority"}),(0,Pa.jsx)(mt,{type:"single",value:l.priority||"",onValueChange:u=>u&&d("priority",u),children:so.map(u=>(0,Pa.jsx)(pt,{value:u.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:u.label},u.value))})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"points",children:"Story Points"}),(0,Pa.jsx)(U,{id:"points",type:"number",min:"1",max:"100",value:l.storyPoints,onChange:u=>d("storyPoints",parseInt(u.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"epic",children:"Epic"}),(0,Pa.jsxs)(De,{value:l.epic,onValueChange:u=>d("epic",u),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{placeholder:"Select an epic"})}),(0,Pa.jsx)(we,{children:r.map(u=>(0,Pa.jsx)(Z,{value:u.id.toString(),children:(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${u.color}`}),u.name]})},u.id))})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Pa.jsxs)(De,{value:l.sprint,onValueChange:u=>d("sprint",u),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{placeholder:"Select a sprint"})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsx)(Z,{value:"none",children:"No Sprint"}),i.map(u=>(0,Pa.jsx)(Z,{value:u.id.toString(),children:(0,Pa.jsx)("div",{className:"flex items-center gap-2",children:u.name})},u.id))]})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"sprint",children:"Assignee"}),(0,Pa.jsxs)(De,{value:l.assignee,onValueChange:u=>d("assignee",u),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{placeholder:"Select an Assignee"})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsx)(Z,{value:"none",children:"No Assignee"}),n.map(u=>(0,Pa.jsx)(Z,{value:u.id.toString(),children:(0,Pa.jsx)("div",{className:"flex items-center gap-2",children:u.name})},u.id))]})]})]}),(0,Pa.jsxs)(St,{children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var oa=({fieldName:e,value:t,label:a,multiline:r=!1,onSave:i,className:n="",disabled:c=!1})=>{let[l,g]=(0,ie.useState)(!1),[p,d]=(0,ie.useState)(""),u=()=>{c||(g(!0),d(t))},E=async()=>{p!==t&&await i(e,p),g(!1)},P=N=>{N.key==="Enter"&&!r||N.key==="Enter"&&N.ctrlKey&&r?E():N.key==="Escape"&&(g(!1),d(""))};return(0,Pa.jsxs)("div",{className:`space-Pa-2 ${n}`,children:[(0,Pa.jsx)(D,{children:a}),l?r?(0,Pa.jsx)(ge,{value:p,onChange:N=>d(N.target.value),onBlur:E,onKeyDown:P,autoFocus:!0,rows:4,className:"resize-none"}):(0,Pa.jsx)(U,{value:p,onChange:N=>d(N.target.value),onBlur:E,onKeyPress:P,autoFocus:!0,className:"text-lg font-medium"}):(0,Pa.jsxs)("div",{onClick:u,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Pa.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,Pa.jsx)(ft.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var It=ne(require("react")),Xe=ne(require("@radix-ui/react-avatar"));var sa=It.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(Xe.Root,{ref:a,className:w("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));sa.displayName=Xe.Root.displayName;var io=It.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(Xe.Image,{ref:a,className:w("aspect-square h-full w-full",e),...t}));io.displayName=Xe.Image.displayName;var ia=It.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(Xe.Fallback,{ref:a,className:w("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ia.displayName=Xe.Fallback.displayName;var er=({comments:e,onAddComment:t})=>{let[a,r]=(0,ie.useState)(""),i=c=>c.split(" ").map(l=>l[0]).join("").toUpperCase(),n=()=>{a.trim()&&(t(a),r(""))};return(0,Pa.jsxs)("div",{className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)(ft.MessageSquare,{className:"h-5 w-5"}),(0,Pa.jsx)(D,{className:"text-lg font-medium",children:"Comments"}),(0,Pa.jsx)(K,{variant:"secondary",children:e.length})]}),(0,Pa.jsx)("div",{className:"space-Pa-4 max-h-60 overflow-Pa-auto",children:e.map(c=>(0,Pa.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Pa.jsx)(sa,{className:"h-8 w-8 mt-1",children:(0,Pa.jsx)(ia,{className:"text-xs bg-muted text-muted-foreground",children:i(c.author)})}),(0,Pa.jsxs)("div",{className:"flex-1",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Pa.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,Pa.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c.createdAt.toLocaleDateString()," at ",c.createdAt.toLocaleTimeString()]})]}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,Pa.jsxs)("div",{className:"flex gap-2",children:[(0,Pa.jsx)(ge,{value:a,onChange:c=>r(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Pa.jsx)(S,{onClick:n,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Pa.jsx)(ft.Send,{className:"h-4 w-4"})})]})]})};var Mt=({label:e,value:t,onValueChange:a,options:r,showColor:i=!1,disabled:n=!1})=>{let[c,l]=(0,ie.useState)(!1),g=r.find(d=>d.value===t);return(0,Pa.jsxs)("div",{className:"space-Pa-1",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:e}),(0,Pa.jsxs)(De,{value:t,onValueChange:a,open:c,onOpenChange:d=>{n||l(d)},disabled:n,children:[(0,Pa.jsx)(Ne,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Pa.jsxs)(K,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!c),children:[i&&g?.color&&(0,Pa.jsx)("div",{className:`w-2 h-2 rounded-full ${g.color} ie-1`}),g?.label||"Select..."]})}),(0,Pa.jsx)(we,{children:r.map(d=>(0,Pa.jsx)(Z,{value:d.value,children:i&&d.color?(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var ar=({label:e,value:t,onValueChange:a,options:r,placeholder:i="Search...",allowCustomValue:n=!1,disabled:c=!1})=>{let[l,g]=(0,ie.useState)(!1),[p,d]=(0,ie.useState)(""),u=r.find(f=>f.value===t),E=r.filter(f=>f.label.toLowerCase().includes(p.toLowerCase())),P=f=>{a(f),g(!1),d("")},N=()=>{n&&p.trim()&&!r.find(f=>f.value===p.trim())&&(a(p.trim()),g(!1),d(""))};return(0,Pa.jsxs)("div",{className:"space-Pa-1",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:e}),(0,Pa.jsxs)(De,{value:t,onValueChange:P,open:l,onOpenChange:f=>{c||g(f)},disabled:c,children:[(0,Pa.jsx)(Ne,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Pa.jsx)(K,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&g(!l),children:u?.label||t||"Select..."})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsx)("div",{className:"p-2",children:(0,Pa.jsx)(U,{placeholder:i,value:p,onChange:f=>d(f.target.value),onKeyDown:f=>{f.key==="Enter"&&n&&N()},className:"mb-2"})}),E.map(f=>(0,Pa.jsx)(Z,{value:f.value,children:f.label},f.value)),n&&p.trim()&&!E.find(f=>f.value===p.trim())&&(0,Pa.jsxs)(Z,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var fe=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var no=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ft.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:ft.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ft.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ft.Zap}],lo=[{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 rr=({task:e,epics:t,sprints:a,lastUpdated:r,onUpdateTask:i,onClose:n,onDelete:c,isUpdating:l=!1,isDeleting:g=!1,deleteState:p="idle",teamMembers:d})=>{let[u,E]=(0,ie.useState)(e.storyPoints),P=(0,ie.useRef)(null),[N,A]=(0,ie.useState)(d);(0,ie.useEffect)(()=>{A(d)},[d]);let f=(0,ie.useCallback)((h,I)=>{P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{i(h,I)},500)},[i]);(0,ie.useEffect)(()=>{f("storyPoints",u?.toString()||"1")},[u]);let F=h=>h.split(" ").map(I=>I[0]).join("").toUpperCase(),V=()=>p==="loading"?(0,Pa.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Pa.jsx)(ft.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,Pa.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Pa.jsx)(ft.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,Pa.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Pa.jsx)(ft.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Pa.jsxs)(S,{onClick:c,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:l||g,children:[(0,Pa.jsx)(ft.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Pa.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Pa.jsxs)("div",{className:"space-Pa-4",style:{opacity:l?.6:1},children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Pa.jsx)(Mt,{label:"",value:e.status,onValueChange:h=>i("status",h),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Pa.jsx)(mt,{type:"single",value:e.type||"",onValueChange:h=>h&&i("type",h),className:"grid grid-cols-2 gap-1",disabled:l,children:no.map(h=>{let I=h.icon;return(0,Pa.jsxs)(pt,{value:h.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:l,children:[(0,Pa.jsx)(I,{className:"h-3 w-3"}),h.label]},h.value)})})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Pa.jsx)(mt,{type:"single",value:e.priority||"",onValueChange:h=>h&&i("priority",h),className:"grid grid-cols-3 gap-1",disabled:l,children:lo.map(h=>(0,Pa.jsx)(pt,{value:h.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:h.label},h.value))})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Pa.jsx)("input",{type:"number",min:"1",max:"100",value:u||1,onChange:h=>{let I=Number(h.target.value);I<1?E(1):I>100?E(100):E(I)},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:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Pa.jsx)(Mt,{label:"",value:fe(e.epic).toString(),onValueChange:h=>i("epic",h),options:(t||[]).map(h=>({value:h.id.toString(),label:h?.name,color:h.color})),showColor:!0,disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Pa.jsx)(Mt,{label:"",value:fe(e.sprint).toString()||"none",onValueChange:h=>i("sprint",h==="none"?"":h),options:[{value:"none",label:"No Sprint"},...(a||[]).map(h=>({value:h.id.toString(),label:`${h?.name}`}))],disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Pa.jsx)(ar,{label:"",value:e.assignee?.value?.name,onValueChange:h=>i("assignee",h),options:N.map(h=>({value:`${typeof h.email=="string"?"users":"digital-colleagues"}:${h.id}`,label:h?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,Pa.jsxs)("div",{className:"mt-auto pt-4 space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(S,{onClick:n,variant:"outline",className:"w-full h-8 text-xs",disabled:l||g,children:"Close"}),V()]}),(0,Pa.jsxs)("div",{className:"pt-4 border-t border-border space-Pa-2",children:[(0,Pa.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.User,{className:"h-3 w-3"}),(0,Pa.jsx)("span",{children:"System"})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-3 w-3"}),(0,Pa.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.Clock,{className:"h-3 w-3"}),(0,Pa.jsxs)("span",{children:[new Date(r).toLocaleDateString()," at"," ",new Date(r).toLocaleTimeString()]})]})]})]})]})]})};var or=({isOpen:e,onClose:t,initialTask:a,epics:r,sprints:i,onUpdateTask:n,onDeleteTask:c,onAddComment:l,colleagues:g})=>{let[p,d]=(0,ie.useState)(a),[u,E]=(0,ie.useState)(new Date),[P,N]=(0,ie.useState)("idle"),[A,f]=(0,ie.useState)("idle"),[F,V]=(0,ie.useState)([]),[h,I]=(0,ie.useState)(g);(0,ie.useEffect)(()=>{d(a)},[a]);let pe=async(T,be)=>{if(be!==p[T]){N("loading");try{let J=await n(p.id.toString(),{[T]:be});d(J),E(new Date),N("success"),setTimeout(()=>N("idle"),1500)}catch(J){console.log("error",J),N("error"),setTimeout(()=>N("idle"),3e3)}}},k=async(T,be)=>{if(be!==p[T]){N("loading");try{let J=await n(p.id.toString(),{[T]:be});d(J),E(new Date),N("success"),setTimeout(()=>N("idle"),1500)}catch(J){console.log("error",J),N("error"),setTimeout(()=>N("idle"),3e3)}}},j=async T=>{if(l){N("loading");try{let be=await l?.({content:T,taskId:p.id.toString()});d(be),E(new Date),N("success"),setTimeout(()=>N("idle"),1500)}catch{N("error"),setTimeout(()=>N("idle"),3e3)}}},re=async()=>{f("loading");try{await c(p.id.toString()),f("success"),setTimeout(()=>{t(),f("idle")},1e3)}catch{f("error"),setTimeout(()=>f("idle"),3e3)}},$=P!=="loading"&&A!=="loading",Se=()=>{$&&t()},Pe=()=>P==="loading"?(0,Pa.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Pa.jsx)(ft.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Pa.jsx)("span",{children:"Updating..."})]}):P==="success"?(0,Pa.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Pa.jsx)(ft.Check,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:"Updated successfully"})]}):P==="error"?(0,Pa.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Pa.jsx)(ft.X,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:"Update failed"})]}):null;return(0,Pa.jsx)(Ve,{open:e,onOpenChange:Se,children:(0,Pa.jsxs)(Le,{className:"max-w-3xl max-h-[80vh] overflow-Pa-auto p-4",children:[(0,Pa.jsxs)(Be,{children:[(0,Pa.jsx)(Me,{className:"ie-only",children:p.name}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("div",{className:"flex-1",children:Pe()}),!$&&(0,Pa.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Pa.jsxs)("div",{className:"lg:col-span-2 space-Pa-4",children:[(0,Pa.jsx)(oa,{fieldName:"name",value:p.name||"",label:"",onSave:pe,className:"border-b border-border pb-3",disabled:P==="loading"}),(0,Pa.jsx)(oa,{fieldName:"description",value:p.description||"",label:"Description",multiline:!0,onSave:pe,disabled:P==="loading"}),(0,Pa.jsx)(er,{comments:(p?.comments||[]).map(T=>({author:T.author.value.name||"",createdAt:new Date(T.timestamp),text:T.text,id:T.id||""})),onAddComment:j})]}),(0,Pa.jsx)(rr,{task:p,epics:r,sprints:i,lastUpdated:u,onUpdateTask:k,onClose:Se,onDelete:re,isUpdating:P==="loading",isDeleting:A==="loading",deleteState:A,teamMembers:h})]})]})})};var Ot=({isOpen:e,onClose:t,onAddEpic:a})=>{let[r,i]=(0,ie.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),n=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],l=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],g=d=>{d.preventDefault(),r.name.trim()&&(a({name:r.name.trim(),description:r.description.trim(),color:r.color,confidence:r.confidence,phase:r.phase,startDate:r.startDate,endDate:r.endDate,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),i({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},p=(d,u)=>{i(E=>({...E,[d]:u}))};return(0,Pa.jsx)(Ve,{open:e,onOpenChange:t,children:(0,Pa.jsxs)(Le,{className:"sm:max-w-md",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Add New Epic"})}),(0,Pa.jsxs)("form",{onSubmit:g,className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"name",children:"Epic Name"}),(0,Pa.jsx)(U,{id:"name",value:r.name,onChange:d=>p("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(ge,{id:"description",value:r.description,onChange:d=>p("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Color"}),(0,Pa.jsx)("div",{className:"flex gap-2 flex-wrap",children:n.map(d=>(0,Pa.jsx)("button",{type:"button",onClick:()=>p("color",d),className:`w-8 h-8 rounded-full ${d} ${r.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Confidence"}),(0,Pa.jsxs)(De,{value:r.confidence,onValueChange:d=>p("confidence",d),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{})}),(0,Pa.jsx)(we,{children:c.map(d=>(0,Pa.jsx)(Z,{value:d.value,children:d.label},d.value))})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Phase"}),(0,Pa.jsxs)(De,{value:r.phase.toString(),onValueChange:d=>p("phase",parseInt(d)),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{})}),(0,Pa.jsx)(we,{children:l.map(d=>(0,Pa.jsx)(Z,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Start Date"}),(0,Pa.jsx)(U,{type:"date",value:r.startDate,onChange:d=>p("startDate",d.target.value)})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"End Date"}),(0,Pa.jsx)(U,{type:"date",value:r.endDate,onChange:d=>p("endDate",d.target.value)})]})]}),(0,Pa.jsxs)(St,{children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};function ir(e,t){let[a,r]=(0,ie.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),i=n=>{try{r(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,ie.useEffect)(()=>{i(a)},[]),[a,i]}var Ft=require("react-icons/fa");function ot({title:e,description:t,badge:a,primaryAction:r,secondaryAction:i,gradient:n,children:c,className:l}){let[g,p]=ir(`hero-section-minimized-${e.replace(/\Pa+/g,"-").toLowerCase()}`,!i&&!t),d=!i&&!t||g;return(0,Pa.jsxs)(Ba.motion.div,{initial:{opacity:0,Pa:20},animate:{opacity:1,Pa:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${l||""}`,children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Pa.jsx)(K,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Pa.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-3",children:[d&&r&&(0,Pa.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(i||t)&&(0,Pa.jsx)("button",{"aria-label":g?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!g),style:{lineHeight:0},children:g?(0,Pa.jsx)(Ft.FaChevronDown,{size:22}):(0,Pa.jsx)(Ft.FaChevronUp,{size:22})})]})]}),!d&&(0,Pa.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Pa.jsxs)("div",{className:"space-Pa-4",children:[(0,Pa.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Pa.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,Pa.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),i&&(0,Pa.jsx)(S,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),c&&(0,Pa.jsx)("div",{className:"hidden lg:block",children:c})]})]})}var co=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:r=[],initialColleagues:i=[],initialProjects:n=[],onAddTask:c,onUpdateTask:l,onDeleteTask:g,onTaskClick:p,onAddEpic:d,onAddComment:u})=>{let[E,P]=(0,ie.useState)(e),[N,A]=(0,ie.useState)(t),[f,F]=(0,ie.useState)(a),[V,h]=(0,ie.useState)(!1),[I,pe]=(0,ie.useState)(!1),[k,j]=(0,ie.useState)(null),[re,$]=(0,ie.useState)(null),[Se,Pe]=(0,ie.useState)(r),[T,be]=(0,ie.useState)(i),[J,We]=(0,ie.useState)(0),ue=(0,ie.useRef)(null),Ye=(0,ie.useRef)(null),Ge=N.filter(R=>!0).map(R=>R.id),_e=f.find(R=>R.isSelected);Ge.push(0),(0,ie.useEffect)(()=>{P(e)},[e]),(0,ie.useEffect)(()=>{A(t)},[t]),(0,ie.useEffect)(()=>{F(a)},[a]),(0,ie.useEffect)(()=>{be(i)},[i]),(0,ie.useEffect)(()=>{let R=()=>{if(ue.current){let xe=ue.current.offsetHeight;We(xe)}};R();let W=new ResizeObserver(R);ue.current&&W.observe(ue.current);let _=()=>{setTimeout(R,100)};return window.addEventListener("storage",_),()=>{W.disconnect(),window.removeEventListener("storage",_)}},[]),(0,ie.useEffect)(()=>{let R=setTimeout(()=>{ue.current&&We(ue.current.offsetHeight)},300);return()=>clearTimeout(R)},[V,I]);let Ke=E.filter(R=>!0),b=R=>Ke.filter(W=>W.status===R),Y=R=>{let W={};return N.forEach(_=>{W[_.id]=R.filter(xe=>fe(xe.epic)===_.id)}),W["no-epic"]=R.filter(_=>!fe(_.epic)),W},he=R=>{$(R)},st=R=>{re&&(P(W=>W.map(_=>_.id===re.id?{..._,status:R}:_)),l?.(re.id.toString(),{status:R}),$(null))},ae=R=>{let W={...R,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};P(_=>[..._,W]),c?.(R)},Qe=async(R,W)=>{if(P(xe=>xe.map(Re=>Re.id===Number(R)?{...Re,...W}:Re)),l)return await l(R,W);let _=E.find(xe=>xe.id===Number(R));if(!_)throw new Error("Task not found");return{..._,...W}},$t=async R=>{P(W=>W.filter(_=>_.id!==Number(R))),k?.id===Number(R)&&j(null),g&&await g(R)},Dt=R=>{let W={...R,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};A(_=>[..._,W]),d?.(R)},Tt=R=>{j(R),p?.(R)},Gt=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Ut=J>0?`calc(100vh - ${J+120}px)`:"calc(100vh - 12rem)";return(0,Pa.jsxs)("div",{ref:Ye,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Pa.jsx)("div",{ref:ue,className:"flex-shrink-0",children:(0,Pa.jsx)(ot,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>h(!0)},secondaryAction:{label:"Add epic",onClick:()=>pe(!0)}})}),(0,Pa.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Pa.jsx)("div",{className:"h-full",style:{height:J>0?`calc(100vh - ${J+120}px)`:"calc(100vh - 12rem)"},children:(0,Pa.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Gt.map(R=>{let W=b(R.status),_=Y(W);return(0,Pa.jsxs)(Oa,{title:R.title,status:R.status,taskCount:W.length,onDrop:st,isCompact:R.status==="done",height:Ut,children:[_["no-epic"].map(xe=>(0,Pa.jsx)(wt,{epic:null,task:xe,onDragStart:he,onTaskClick:Tt,isCompact:R.status==="done"})),Ge.map(xe=>{let Re=N.find(v=>v.id===xe),m=_[xe]||[];return m.length===0?null:(0,Pa.jsxs)("div",{className:"mb-6",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${Re?.color}`}),(0,Pa.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:Re?.name||"No Epic"}),(0,Pa.jsx)(K,{variant:"secondary",className:"text-xs",children:m.length})]})," ",(0,Pa.jsx)("div",{className:"space-Pa-3",children:m.map(v=>(0,Pa.jsx)(wt,{task:v,epic:Re,onDragStart:he,onTaskClick:Tt,isCompact:R.status==="done"},v.id))})]},xe)})]},R.id)})})})}),(0,Pa.jsx)(At,{isOpen:V,onClose:()=>h(!1),onAddTask:ae,assignees:[...T,...Se],epics:N,sprints:f}),(0,Pa.jsx)(Ot,{isOpen:I,onClose:()=>pe(!1),onAddEpic:Dt}),k&&(0,Pa.jsx)(or,{isOpen:!!k,onClose:()=>j(null),initialTask:k,epics:N,sprints:f,onUpdateTask:Qe,onDeleteTask:$t,colleagues:T,onAddComment:u})]})};var lr=require("react-day-picker");function Ht({className:e,classNames:t,showOutsideDays:a=!0,...r}){return(0,Pa.jsx)(lr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:w("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-Pa-4 sm:space-Pa-4 sm:space-Pa-0",month:"space-Pa-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-Pa-1 flex items-center",nav_button:w(Rt({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-Pa-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:ft-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:w(Rt({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},...r})}Ht.displayName="Calendar";var cr=ne(require("react")),je=ne(require("@radix-ui/react-popover"));var da=je.Root,ca=je.Trigger;var Vt=cr.forwardRef(({className:e,align:t="center",sideOffset:a=4,...r},i)=>(0,Pa.jsx)(je.Portal,{children:(0,Pa.jsx)(je.Content,{ref:i,align:t,sideOffset:a,className:w("ft-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),...r})}));Vt.displayName=je.Content.displayName;var pa=require("date-fns");var pr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[r,i]=(0,ie.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),n=l=>{l.preventDefault(),!(!r.name||!r.startDate||!r.endDate)&&(a({name:r.name,description:r.description,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),i({name:"",description:"",startDate:void 0,endDate:void 0}),t())},c=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Pa.jsx)(Ve,{open:e,onOpenChange:c,children:(0,Pa.jsxs)(Le,{className:"sm:max-w-md",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Add New Sprint"})}),(0,Pa.jsxs)("form",{onSubmit:n,className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"name",children:"Sprint Name *"}),(0,Pa.jsx)(U,{id:"name",value:r.name,onChange:l=>i(g=>({...g,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(ge,{id:"description",value:r.description,onChange:l=>i(g=>({...g,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Start Date *"}),(0,Pa.jsxs)(da,{children:[(0,Pa.jsx)(ca,{asChild:!0,children:(0,Pa.jsxs)(S,{variant:"outline",className:w("w-full justify-start text-left font-normal",!r.startDate&&"text-muted-foreground"),children:[(0,Pa.jsx)(ft.CalendarIcon,{className:"ie-2 h-4 w-4"}),r.startDate?(0,pa.format)(r.startDate,"PPP"):"Pick a date"]})}),(0,Pa.jsx)(Vt,{className:"w-auto p-0",align:"start",children:(0,Pa.jsx)(Ht,{mode:"single",selected:r.startDate,onSelect:l=>i(g=>({...g,startDate:l})),initialFocus:!0})})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"End Date *"}),(0,Pa.jsxs)(da,{children:[(0,Pa.jsx)(ca,{asChild:!0,children:(0,Pa.jsxs)(S,{variant:"outline",className:w("w-full justify-start text-left font-normal",!r.endDate&&"text-muted-foreground"),children:[(0,Pa.jsx)(ft.CalendarIcon,{className:"ie-2 h-4 w-4"}),r.endDate?(0,pa.format)(r.endDate,"PPP"):"Pick a date"]})}),(0,Pa.jsx)(Vt,{className:"w-auto p-0",align:"start",children:(0,Pa.jsx)(Ht,{mode:"single",selected:r.endDate,onSelect:l=>i(g=>({...g,endDate:l})),initialFocus:!0,disabled:l=>r.startDate?l<r.startDate:!1})})]})]})]}),(0,Pa.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",disabled:!r.name||!r.startDate||!r.endDate,children:"Add Sprint"})]})]})]})})};var mo=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddSprint:n,onUpdateSprint:c,onDeleteSprint:l})=>{let[g,p]=(0,ie.useState)([]),[d,u]=(0,ie.useState)(new Set),[E,P]=(0,ie.useState)(null),[N,A]=(0,ie.useState)(!1),[f,F]=(0,ie.useState)(null),[V,h]=(0,ie.useState)(null),[I,pe]=(0,ie.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[k,j]=(0,ie.useState)([]),[re,$]=(0,ie.useState)("upcoming"),[Se,Pe]=(0,ie.useState)(!1),[T,be]=(0,ie.useState)(0),J=(0,ie.useRef)(null),We=(0,ie.useRef)(null);(0,ie.useEffect)(()=>{let m=()=>{J.current&&be(J.current.offsetHeight)};m();let v=new ResizeObserver(m);return J.current&&v.observe(J.current),()=>v.disconnect()},[]);let ue=m=>t.find(v=>v.id===Number(m)),Ye=m=>a.find(v=>v.id===Number(m)),Ge=m=>{let v={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 v[m]||v.medium},_e=m=>{if(!m||m?.length===0)return"";let v=m?.trim().split(" ");if(v?.length===1)return v[0];let H=v[0],G=v[v.length-1][0].toUpperCase();return`${H} ${G}`},Ke=m=>{let v={},H=[];return m.forEach(G=>{G.epic?(v[fe(G.epic)]||(v[fe(G.epic)]=[]),v[fe(G.epic)].push(G)):H.push(G)}),{tasksByEpic:v,unassignedTasks:H}};(0,ie.useEffect)(()=>{j(a)},[a]);let b=k.filter(m=>{switch(re){default:return!0}}),Y=k.filter(m=>g.includes(m.id.toString())),he=e.filter(m=>!m.sprint||m.status==="backlog"),st=he.reduce((m,v)=>m+(v.storyPoints||0),0),ae=m=>{p(v=>v.includes(m)?v.filter(H=>H!==m):v?.length<3?[...v,m]:v)},Qe=m=>{u(v=>{let H=new Set(v);return H.has(m)?H.delete(m):H.add(m),H})},$t=m=>{n(m),A(!1)},Dt=m=>{h(m.id.toString()),pe({name:m.name,description:m.description||"",startDate:m.startDate?new Date(m.startDate).toISOString().split("T")[0]:m.startDate,endDate:m.endDate?new Date(m.endDate).toISOString().split("T")[0]:m.endDate,isActive:!1})},Tt=()=>{V&&(c(V,{name:I.name,description:I.description,startDate:I.startDate,endDate:I.endDate}),j(m=>m.map(v=>(v.id===Number(V)&&(v.name=I.name,v.description=I.description,v.startDate=I.startDate,v.endDate=I.endDate),v))),h(null))},Gt=()=>{h(null),pe({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Ut=(m,v)=>{P(v),m.dataTransfer.effectAllowed="move"},R=m=>{m.preventDefault(),m.dataTransfer.dropEffect="move"},W=m=>{F(m)},_=()=>{F(null)},xe=(m,v)=>{if(m.preventDefault(),F(null),!E)return;(fe(E.sprint)||void 0)!==Number(v)&&r(E.id.toString(),{sprint:Number(v)}),P(null)},Re=({task:m,showSprint:v=!1})=>{let H=m.epic?ue(fe(m.epic).toString()):null,G=m.sprint?Ye(fe(m.sprint).toString()):null;return(0,Pa.jsx)(Q,{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:Ee=>{Ee.dataTransfer.effectAllowed="move",Ee.dataTransfer.setData("text/plain",m.id.toString()),Ut(Ee,m)},onClick:Ee=>{E===null&&i(m)},style:{userSelect:"none"},children:(0,Pa.jsxs)("div",{className:"space-Pa-2 pointer-events-none",children:[(0,Pa.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Pa.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:m.name}),(0,Pa.jsx)(K,{className:`text-xs ${Ge(m.priority||"medium")}`,children:m.priority?.[0]?.toUpperCase()})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-1",children:[H&&(0,Pa.jsx)("div",{className:`w-2 h-2 rounded-full ${H.color}`}),(0,Pa.jsx)("span",{className:"text-muted-foreground truncate",children:H?.name})]}),(0,Pa.jsx)("span",{className:"text-muted-foreground",children:_e(m.assignee?.value?.name)})]}),v&&G&&(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-3 w-3"}),(0,Pa.jsx)("span",{children:G.name})]})]})})};return(0,Pa.jsxs)("div",{ref:We,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Pa.jsx)("div",{ref:J,className:"flex-shrink-0",children:(0,Pa.jsx)(ot,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>A(!0)}})}),(0,Pa.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Pa.jsxs)("div",{className:"h-full",style:{height:T>0?`calc(100vh - ${T+120}px)`:"calc(100vh - 12rem)"},children:[(0,Pa.jsxs)("div",{className:"mb-4",children:[(0,Pa.jsx)(Q,{className:"p-3 bg-card shadow-sm",children:(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,Pa.jsxs)("p",{className:"text-xs text-muted-foreground",children:[g?.length,"/3 selected"]})]}),g?.length>0&&(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,Pa.jsx)("div",{className:"flex flex-wrap gap-1",children:Y.map(m=>(0,Pa.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Pa.jsx)("span",{className:"max-w-[80px] truncate",children:m.name}),(0,Pa.jsx)("button",{onClick:()=>ae(m.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Pa.jsx)(ft.X,{className:"h-4 w-4"})})]},m.id))})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsxs)(S,{onClick:()=>A(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Pa.jsx)(ft.Plus,{className:"h-3 w-3"}),"Add"]}),(0,Pa.jsxs)(S,{onClick:()=>Pe(!Se),variant:"outline",size:"sm",className:"gap-1",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-3 w-3"}),Se?"Close":"Select"]})]})]})}),Se&&(0,Pa.jsx)("div",{className:"fixed inset-0 bg-black/20 ft-[5]",onClick:()=>Pe(!1)}),(0,Pa.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl ft-10 transition-all duration-300 ease-in-out ${Se?"translate-Pa-0 opacity-100 visible":"translate-Pa-full opacity-0 invisible"}`,children:(0,Pa.jsxs)(Q,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Pa.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Pa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>Pe(!1),className:"h-8 w-8 p-0",children:(0,Pa.jsx)(ft.X,{className:"h-4 w-4"})})]}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Pa.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Pa.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(m=>(0,Pa.jsxs)(S,{variant:re===m.key?"default":"outline",size:"sm",onClick:()=>$(m.key),className:"text-xs h-8 px-3 flex-1",children:[m.label," (",m.count,")"]},m.key))}),(0,Pa.jsx)("div",{className:"space-Pa-2 flex-1 overflow-Pa-auto",children:b.length>0?b.map(m=>{let v=g.includes(m.id.toString()),H=e.filter(ye=>fe(ye.sprint)===m.id).length,G=!v&&g.length<3;return(0,Pa.jsx)("div",{className:`p-3 rounded-lg border transition-all ${v?"bg-primary/10 border-primary/30":G?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:V===m.id.toString()?(0,Pa.jsxs)("div",{className:"space-Pa-3",children:[(0,Pa.jsx)(U,{value:I.name,onChange:ye=>pe(ke=>({...ke,name:ye.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Pa.jsx)(ge,{value:I.description,onChange:ye=>pe(ke=>({...ke,description:ye.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Pa.jsxs)("div",{className:"flex gap-2",children:[(0,Pa.jsxs)(S,{size:"sm",onClick:()=>Tt(),className:"flex-1",children:[(0,Pa.jsx)(ft.Check,{className:"h-3 w-3 ie-1"}),"Save"]}),(0,Pa.jsxs)(S,{size:"sm",variant:"outline",onClick:Gt,className:"flex-1",children:[(0,Pa.jsx)(ft.X,{className:"h-3 w-3 ie-1"}),"Cancel"]})]})]}):(0,Pa.jsxs)("div",{children:[(0,Pa.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Pa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Pa.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:m.name}),(0,Pa.jsx)(K,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Pa.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:m.description}),(0,Pa.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Pa.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.CalendarDays,{className:"h-3 w-3"}),new Date(m.startDate).toLocaleDateString()]}),(0,Pa.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.User,{className:"h-3 w-3"}),H," tasks"]})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Dt(m),className:"h-6 w-6 p-0",children:(0,Pa.jsx)(ft.Edit2,{className:"h-3 w-3"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>l(m.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,Pa.jsx)(ft.Trash2,{className:"h-3 w-3"})})]})]}),(0,Pa.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,Pa.jsx)(S,{variant:v?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>ae(m.id.toString()),disabled:!v&&g?.length>=3,children:(0,Pa.jsx)("span",{className:"pointer-events-none select-none",children:v?"Deselect":g?.length>=3?"Limit Reached":"Select"})})})]})},m.id)}):(0,Pa.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,Pa.jsxs)("p",{className:"text-sm",children:['No sprints found for "',re,'" filter']}),(0,Pa.jsx)(S,{variant:"link",size:"sm",onClick:()=>$("all"),className:"text-xs",children:"Show all sprints"})]})}),g?.length===0&&(0,Pa.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Pa.jsxs)("div",{className:"text-center",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Pa.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Pa.jsx)("div",{className:"lg:col-span-1",children:(0,Pa.jsxs)(Q,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:R,onDragEnter:()=>W("backlog"),onDragLeave:_,onDrop:m=>xe(m,"backlog"),style:{height:T>0?`calc(100vh - ${T+200}px)`:"calc(100vh - 16rem)"},children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Pa.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsxs)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[he?.length," tasks"]}),(0,Pa.jsxs)(K,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[st," pts"]})]})]}),(0,Pa.jsx)("div",{className:`flex-1 overflow-Pa-auto space-Pa-3 min-h-0 p-3 rounded transition-colors ${f==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:m,unassignedTasks:v}=Ke(he);return(0,Pa.jsxs)(Pa.Fragment,{children:[Object.entries(m).map(([H,G])=>{let ye=ue(H);if(!ye)return null;let ke=d.has(H);return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.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:()=>Qe(H),children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${ye.color}`}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:ye.name}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",G?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:ke?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!ke&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:G.map(Ee=>(0,Pa.jsx)(Re,{task:Ee},Ee.id))})]},H)}),v?.length>0&&(()=>{let H=d.has("no-epic");return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.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:()=>Qe("no-epic"),children:[(0,Pa.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",v?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:H?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!H&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:v?.map(G=>(0,Pa.jsx)(Re,{task:G},G.id))})]})})(),he?.length===0&&(0,Pa.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),he?.length>0&&Object.keys(m).length===0&&v.length===0&&(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),he?.map(H=>(0,Pa.jsx)(Re,{task:H},H.id))]})]})})()})]})}),Y.map(m=>{let v=e.filter(G=>fe(G?.sprint)===m.id),H=v.reduce((G,ye)=>G+(ye?.storyPoints||0),0);return(0,Pa.jsxs)(Q,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:R,onDragEnter:()=>W(m.id.toString()),onDragLeave:_,onDrop:G=>xe(G,m.id.toString()),style:{height:T>0?`calc(100vh - ${T+200}px)`:"calc(100vh - 16rem)"},children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Pa.jsx)("div",{children:(0,Pa.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:m.name})}),(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsxs)(K,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[v?.length," tasks"]}),(0,Pa.jsxs)(K,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[H," pts"]}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>{Pe(!0),Dt(m)},className:"h-6 px-2",children:(0,Pa.jsx)(ft.Edit2,{className:"h-3 w-3"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>l(m.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Pa.jsx)(ft.Trash2,{className:"h-3 w-3"})})]})]}),(0,Pa.jsx)("div",{className:"flex-1 overflow-Pa-auto space-Pa-3 min-h-0",children:(()=>{let{tasksByEpic:G,unassignedTasks:ye}=Ke(v);return(0,Pa.jsxs)(Pa.Fragment,{children:[Object.entries(G).map(([ke,Ee])=>{let jt=ue(ke);if(!jt)return null;let fa=d.has(ke);return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.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:()=>Qe(ke),children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${jt.color}`}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:jt.name}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",Ee?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:fa?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!fa&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:Ee?.map(va=>(0,Pa.jsx)(Re,{task:va},va.id))})]},ke)}),ye?.length>0&&(()=>{let ke=d.has("no-epic");return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.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:()=>Qe("no-epic"),children:[(0,Pa.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",ye?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:ke?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!ke&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:ye?.map(Ee=>(0,Pa.jsx)(Re,{task:Ee},Ee.id))})]})})(),v?.length===0&&(0,Pa.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},m.id)})]}),(0,Pa.jsx)(pr,{isOpen:N,onClose:()=>A(!1),onAddSprint:$t})]})})]})};var po=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),uo=e=>{let[t,a]=e.split(":"),r=new Date;return r.setHours(parseInt(t),parseInt(a)),r.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},ua=(e,t)=>{let a=new Date,r=new Date(e);if(t){let[i,n]=t.split(":");r.setHours(parseInt(i),parseInt(n))}return r<a},ga=e=>{let t=new Date;return e.toDateString()===t.toDateString()},go=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},fo=({colleagues:e,onAddReminder:t,open:a,setOpen:r})=>{let[i,n]=(0,ie.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,l]=(0,ie.useState)(!1),g=d=>{if(d.preventDefault(),!e.find(P=>P?.id.toString()===i.colleagueId.toString())){console.error("No valid colleague selected"),l(!0);return}l(!1);let E={title:i.title,description:i.description,dueDate:new Date(i.dueDate).toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring,assignedColleague:Number(i.colleagueId),project:1,updatedAt:new Date().toISOString()};t(E),r(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ie.useEffect)(()=>{i.colleagueId&&l(!1)},[i.colleagueId]);let p=e.filter(Boolean);return(0,Pa.jsx)(Ve,{open:a,onOpenChange:r,children:(0,Pa.jsxs)(Le,{className:"max-w-2xl",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Add New Reminder"})}),(0,Pa.jsxs)("form",{onSubmit:g,className:"space-Pa-4",children:[(0,Pa.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"title",children:"Title"}),(0,Pa.jsx)(U,{id:"title",value:i.title,onChange:d=>n({...i,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(ge,{id:"description",value:i.description,onChange:d=>n({...i,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"dueDate",children:"Due Date"}),(0,Pa.jsx)(U,{id:"dueDate",type:"date",value:i.dueDate,onChange:d=>n({...i,dueDate:d.target.value}),required:!0})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Pa.jsx)(U,{id:"dueTime",type:"time",value:i.dueTime,onChange:d=>n({...i,dueTime:d.target.value})})]})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Pa.jsxs)(De,{value:i.colleagueId,onValueChange:d=>{n({...i,colleagueId:d})},required:!0,children:[(0,Pa.jsx)(Ne,{className:`${c?"text-destructive border-red-500":""}`,children:(0,Pa.jsx)($e,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Pa.jsx)(we,{children:p.map(d=>(0,Pa.jsx)(Z,{value:d.id.toString(),children:d.name},d.id))})]}),c&&(0,Pa.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-2",children:[(0,Pa.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:d=>n({...i,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Pa.jsx)(D,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Pa.jsxs)(De,{value:i.recurrencePattern,onValueChange:d=>n({...i,recurrencePattern:d}),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsx)(Z,{value:"daily",children:"Daily"}),(0,Pa.jsx)(Z,{value:"weekly",children:"Weekly"}),(0,Pa.jsx)(Z,{value:"monthly",children:"Monthly"}),(0,Pa.jsx)(Z,{value:"yearly",children:"Yearly"})]})]})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Pa.jsx)(U,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:d=>n({...i,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Pa.jsxs)("div",{className:"flex justify-end space-Pa-2",children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",children:"Add Reminder"})]})]})]})})},vo=({reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:i})=>{let[n,c]=(0,ie.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),l=p=>{p.preventDefault(),a(e.id.toString(),{title:n.title,description:n.description,dueDate:new Date(n.dueDate||"").toISOString(),dueTime:n.dueTime||void 0,isRecurring:n.isRecurring}),i()},g=t.filter(Boolean);return(0,Pa.jsx)(Ve,{open:r,onOpenChange:i,children:(0,Pa.jsxs)(Le,{className:"max-w-2xl",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Edit Reminder"})}),(0,Pa.jsxs)("form",{onSubmit:l,className:"space-Pa-4",children:[(0,Pa.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"edit-title",children:"Title"}),(0,Pa.jsx)(U,{id:"edit-title",value:n.title,onChange:p=>c({...n,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"edit-description",children:"Description"}),(0,Pa.jsx)(ge,{id:"edit-description",value:n.description||"",onChange:p=>c({...n,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Pa.jsx)(U,{id:"edit-dueDate",type:"date",value:n.dueDate,onChange:p=>c({...n,dueDate:p.target.value}),required:!0})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Pa.jsx)(U,{id:"edit-dueTime",type:"time",value:n.dueTime,onChange:p=>c({...n,dueTime:p.target.value})})]})]}),(0,Pa.jsx)("div",{className:"space-Pa-2",children:(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-2",children:[(0,Pa.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:n.isRecurring||!1,onChange:p=>c({...n,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,Pa.jsx)(D,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Pa.jsxs)("div",{className:"flex justify-end space-Pa-2",children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",children:"Save Changes"})]})]})]})})},bo=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:r})=>{let[i,n]=(0,ie.useState)(!1);if(!e||!e.id)return null;let c=ua(new Date(e.dueDate||""),e.dueTime||""),l=ga(new Date(e.dueDate||"")),g=go(new Date(e.dueDate||"")),p=()=>{a(e.id.toString(),{})},d=()=>l?"Today":g?"Tomorrow":po(new Date(e.dueDate||""));return(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsx)(vo,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>n(!1)}),(0,Pa.jsx)(Q,{children:(0,Pa.jsx)(yt,{className:"p-4",children:(0,Pa.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Pa.jsxs)("div",{className:"flex items-start space-Pa-3 flex-1",children:[(0,Pa.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80"}),(0,Pa.jsxs)("div",{className:"flex-1",children:[(0,Pa.jsx)("div",{className:"flex items-center space-Pa-2 mb-1",children:(0,Pa.jsx)("h3",{children:e.title})}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-4 text-sm text-muted-foreground",children:[(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{className:c?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(ft.Clock,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:uo(e.dueTime)})]}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(ft.User,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>n(!0),className:"h-8 w-8 p-0",children:(0,Pa.jsx)(ft.Edit2,{className:"h-4 w-4"})}),(0,Pa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>r(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,Pa.jsx)(ft.Trash2,{className:"h-4 w-4"})})]})]})})})]})},ho=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:r,onDeleteReminder:i})=>{let[n,c]=(0,ie.useState)(e.filter(Boolean)),[l,g]=(0,ie.useState)(t.filter(Boolean)),[p,d]=(0,ie.useState)("all"),[u,E]=(0,ie.useState)(""),[P,N]=(0,ie.useState)(!1);(0,ie.useEffect)(()=>{c(e.filter(Boolean))},[e]),(0,ie.useEffect)(()=>{g(t.filter(Boolean))},[t]);let A=k=>{if(!k.title){console.error("Invalid reminder data:",k);return}let j={...k,id:Date.now(),createdAt:new Date().toISOString()};c(re=>[...re,j]),a?.(k)},f=(k,j)=>{if(!k){console.error("No reminder ID provided for update");return}c(re=>re.map($=>$?.id.toString()===k?{...$,...j}:$)),r?.(k,j)},F=k=>{if(!k){console.error("No reminder ID provided for deletion");return}c(j=>j.filter(re=>re?.id.toString()!==k)),i?.(k)},h=n.filter(k=>{if(!k)return!1;if(u){let j=u.toLowerCase();if(!(k.title.toLowerCase().includes(j)||k.description?.toLowerCase().includes(j)))return!1}switch(p){case"pending":case"completed":case"overdue":return ua(new Date(k.dueDate||""),k.dueTime||"");case"today":return ga(new Date(k.dueDate||""));default:return!0}}).sort((k,j)=>{if(!k||!j)return 0;let re={high:3,medium:2,low:1},$=0;return $!==0?$:new Date(k.dueDate||"").getTime()-new Date(j.dueDate||"").getTime()}),I={total:n.filter(Boolean).length,overdue:n.filter(k=>k&&ua(new Date(k.dueDate||""),k.dueTime||"")).length,today:n.filter(k=>k&&ga(new Date(k.dueDate||""))).length},pe=l.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,Pa.jsxs)("div",{className:"px-2 md:px-4 py-4 space-Pa-8",children:[(0,Pa.jsx)(ot,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{N(!0)}}}),(0,Pa.jsxs)("div",{className:"h-full bg-background",children:[(0,Pa.jsx)(fo,{colleagues:l,onAddReminder:A,open:P,setOpen:N}),(0,Pa.jsxs)("div",{className:"p-6",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Pa.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Pa.jsxs)(S,{className:"flex items-center space-Pa-2",onClick:()=>N(!0),children:[(0,Pa.jsx)(ft.Plus,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:"Add Reminder"})]})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-foreground",children:I.total}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-primary",children:I.overdue}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-success",children:I.today}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-destructive",children:I.overdue}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-warning",children:I.today}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-4 mb-6",children:[(0,Pa.jsx)("div",{className:"flex-1",children:(0,Pa.jsx)(U,{placeholder:"Search reminders...",value:u,onChange:k=>E(k.target.value),className:"max-w-md"})}),(0,Pa.jsxs)(De,{value:p,onValueChange:k=>d(k),children:[(0,Pa.jsx)(Ne,{className:"w-40",children:(0,Pa.jsx)($e,{})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsxs)(Z,{value:"all",children:["All (",I.total,")"]}),(0,Pa.jsxs)(Z,{value:"overdue",children:["Overdue (",I.overdue,")"]}),(0,Pa.jsxs)(Z,{value:"overdue",children:["Overdue (",I.overdue,")"]}),(0,Pa.jsxs)(Z,{value:"today",children:["Today (",I.today,")"]})]})]})]}),(0,Pa.jsx)("div",{className:"space-Pa-4",children:h.length===0?(0,Pa.jsxs)(Q,{className:"p-8 text-center",children:[(0,Pa.jsx)("div",{className:"text-muted-foreground",children:u||p!=="all"?"No reminders match your filters":"No reminders yet"}),!u&&p==="all"&&(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):h.map(k=>k&&(0,Pa.jsx)(bo,{reminder:k,colleagues:l,onUpdateReminder:f,onDeleteReminder:F},k.id))})]})]})]})};var xo=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddTaskToEpic:n,onAddEpic:c,onUpdateEpic:l,onDeleteEpic:g})=>{let[p,d]=(0,ie.useState)(t),[u,E]=(0,ie.useState)(null),[P,N]=(0,ie.useState)(null),[A,f]=(0,ie.useState)({}),[F,V]=(0,ie.useState)(0),[h,I]=(0,ie.useState)(!1),[pe,k]=(0,ie.useState)(!1),[j,re]=(0,ie.useState)(null),$=(0,ie.useRef)(null),Se=(0,ie.useRef)(null);(0,ie.useEffect)(()=>{d(t)},[t]),(0,ie.useEffect)(()=>{let b=()=>{if($.current){let st=$.current.offsetHeight;V(st)}};b();let Y=new ResizeObserver(b);$.current&&Y.observe($.current);let he=()=>{setTimeout(b,100)};return window.addEventListener("storage",he),()=>{Y.disconnect(),window.removeEventListener("storage",he)}},[]),(0,ie.useEffect)(()=>{let b=setTimeout(()=>{$.current&&V($.current.offsetHeight)},300);return()=>clearTimeout(b)},[P]);let Pe=b=>{E(b)},T=b=>{b.preventDefault()},be=(b,Y)=>{b.preventDefault(),u&&fe(u.epic).toString()!==Y&&(r(u.id.toString(),{epic:Number(Y)}),E(null))},J=b=>e.filter(Y=>fe(Y.epic).toString()===b),We=b=>{N(b.id.toString()),f({name:b.name,description:b.description,confidence:b.confidence,phase:b.phase})},ue=async()=>{P&&A.name&&(await l(P.toString(),A),d(b=>b.map(Y=>Y.id.toString()===P?{...Y,...A}:Y)),N(null),f({}))},Ye=()=>{N(null),f({})},Ge=async b=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await g(b),d(Y=>Y.filter(he=>he.id.toString()!==b)))},_e=b=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[b]||`Phase ${b}`,Ke=b=>{switch(b){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,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsxs)("div",{ref:Se,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Pa.jsx)("div",{ref:$,className:"flex-shrink-0",children:(0,Pa.jsx)(ot,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>I(!0)}})}),(0,Pa.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Pa.jsx)("div",{className:"h-full overflow-Pa-auto",style:{height:F>0?`calc(100vh - ${F+120}px)`:"calc(100vh - 12rem)"},children:(0,Pa.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(b=>{let Y=J(b.id.toString()),he=Y.reduce((ae,Qe)=>ae+(Qe.storyPoints||0),0),st=F>0?`calc(100vh - ${F+200}px)`:"calc(100vh - 14rem)";return(0,Pa.jsxs)(Q,{className:`flex flex-col ${P===b.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:P===b.id.toString()?"auto":st,minHeight:"400px"},onDragOver:T,onDrop:ae=>be(ae,b.id.toString()),children:[(0,Pa.jsx)("div",{className:"p-4 border-b border-border",children:P===b.id.toString()?(0,Pa.jsxs)("div",{className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)(U,{value:A.name||"",onChange:ae=>f({...A,name:ae.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Pa.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:ue,className:"p-1 h-8 w-8",children:(0,Pa.jsx)(ft.Check,{className:"h-4 w-4"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:Ye,className:"p-1 h-8 w-8",children:(0,Pa.jsx)(ft.X,{className:"h-4 w-4"})})]})]}),(0,Pa.jsx)(ge,{value:A.description||"",onChange:ae=>f({...A,description:ae.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Pa.jsxs)("select",{value:A.confidence||b.confidence,onChange:ae=>f({...A,confidence:ae.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,Pa.jsx)("option",{value:"low",children:"Low"}),(0,Pa.jsx)("option",{value:"medium",children:"Medium"}),(0,Pa.jsx)("option",{value:"high",children:"High"})]})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Pa.jsx)("select",{value:A.phase?.toString()||b.phase.toString(),onChange:ae=>f({...A,phase:parseInt(ae.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(ae=>(0,Pa.jsxs)("option",{value:ae.toString(),children:["Phase ",ae]},ae))})]})]})]}):(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Pa.jsx)("div",{className:`w-4 h-4 rounded-full ${b.color}`}),(0,Pa.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:b.name}),(0,Pa.jsxs)("div",{className:"flex gap-1",children:[(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>We(b),className:"p-1 h-8 w-8",children:(0,Pa.jsx)(ft.Edit2,{className:"h-3 w-3"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Ge(b.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Pa.jsx)(ft.Trash2,{className:"h-3 w-3"})})]})]}),(0,Pa.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Pa.jsxs)(K,{className:`text-xs ${Ke(b.confidence)}`,children:[b.confidence," confidence"]}),(0,Pa.jsxs)(K,{variant:"outline",className:"text-xs",children:["Phase ",b.phase]}),(0,Pa.jsxs)(K,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Y.length," tasks"]}),(0,Pa.jsxs)(K,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[he," pts"]})]}),b.description&&(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:b.description}),(0,Pa.jsxs)(S,{onClick:()=>{k(!0),re(b)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Pa.jsx)(ft.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Pa.jsx)("div",{className:"flex-1 p-4 overflow-Pa-auto",children:(0,Pa.jsx)("div",{className:`space-Pa-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${u?"border-primary bg-primary/10":"border-border"}`,children:Y.length===0?(0,Pa.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,Pa.jsx)(ft.Move,{className:"h-8 w-8 mb-2"}),(0,Pa.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):Y.map(ae=>(0,Pa.jsx)(wt,{task:ae,epic:b,onDragStart:Pe,onTaskClick:i,isCompact:!0},ae.id))})})]},b.id)})})})})]}),(0,Pa.jsx)(Ot,{isOpen:h,onClose:()=>I(!1),onAddEpic:c}),(0,Pa.jsx)(At,{isOpen:pe,onClose:()=>k(!1),onAddTask:n,assignees:[],epics:[],defaultEpicId:j?.id.toString()||"",sprints:a})]})};0&&(module.exports={DCProjectCard,EpicsView,KanbanBoardView,PlanningView,TasksView});
|
|
5
|
+
"use strict";var ur=Object.create;var Pt=Object.defineProperty;var gr=Object.getOwnPropertyDescriptor;var fr=Object.getOwnPropertyNames;var vr=Object.getPrototypeOf,br=Object.prototype.hasOwnProperty;var hr=(e,t)=>{for(var a in t)Pt(e,a,{get:t[a],enumerable:!0})},ba=(e,t,a,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of fr(t))!br.call(e,i)&&i!==a&&Pt(e,i,{get:()=>t[i],enumerable:!(r=gr(t,i))||r.enumerable});return e};var ne=(e,t,a)=>(a=e!=null?ur(vr(e)):{},ba(t||!e||!e.__esModule?Pt(a,"default",{value:e,enumerable:!0}):a,e)),xr=e=>ba(Pt({},"__esModule",{value:!0}),e);var yo={};hr(yo,{DCProjectCard:()=>Ma,EpicsView:()=>xo,KanbanBoardView:()=>co,PlanningView:()=>mo,TasksView:()=>ho});module.exports=xr(yo);var Ba=require("motion/react"),ft=require("lucide-react");var Ta=require("class-variance-authority");var Da=require("clsx");var Kt="-",yr=e=>{let t=wr(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:c=>{let l=c.split(Kt);return l[0]===""&&l.length!==1&&l.shift(),ya(l,t)||Nr(c)},getConflictingClassGroupIds:(c,l)=>{let g=a[c]||[];return l&&r[c]?[...g,...r[c]]:g}}},ya=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],r=t.nextPart.get(a),i=r?ya(e.slice(1),r):void 0;if(i)return i;if(t.validators.length===0)return;let n=e.join(Kt);return t.validators.find(({validator:c})=>c(n))?.classGroupId},ha=/^\[(.+)\]$/,Nr=e=>{if(ha.test(e)){let t=ha.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},wr=e=>{let{theme:t,prefix:a}=e,r={nextPart:new Map,validators:[]};return Sr(Object.entries(e.classGroups),a).forEach(([n,c])=>{_t(c,r,n,t)}),r},_t=(e,t,a,r)=>{e.forEach(i=>{if(typeof i=="string"){let n=i===""?t:xa(t,i);n.classGroupId=a;return}if(typeof i=="function"){if(Cr(i)){_t(i(r),t,a,r);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([n,c])=>{_t(c,xa(t,n),a,r)})})},xa=(e,t)=>{let a=e;return t.split(Kt).forEach(r=>{a.nextPart.has(r)||a.nextPart.set(r,{nextPart:new Map,validators:[]}),a=a.nextPart.get(r)}),a},Cr=e=>e.isThemeGetter,Sr=(e,t)=>t?e.map(([a,r])=>{let i=r.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([c,l])=>[t+c,l])):n);return[a,i]}):e,kr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,r=new Map,i=(n,c)=>{a.set(n,c),t++,t>e&&(t=0,r=a,a=new Map)};return{get(n){let c=a.get(n);if(c!==void 0)return c;if((c=r.get(n))!==void 0)return i(n,c),c},set(n,c){a.has(n)?a.set(n,c):i(n,c)}}},Na="!",Dr=e=>{let{separator:t,experimentalParseClassName:a}=e,r=t.length===1,i=t[0],n=t.length,c=l=>{let g=[],p=0,d=0,u;for(let f=0;f<l.length;f++){let F=l[f];if(p===0){if(F===i&&(r||l.slice(f,f+n)===t)){g.push(l.slice(d,f)),d=f+n;continue}if(F==="/"){u=f;continue}}F==="["?p++:F==="]"&&p--}let E=g.length===0?l:l.substring(d),P=E.startsWith(Na),N=P?E.substring(1):E,A=u&&u>d?u-d:void 0;return{modifiers:g,hasImportantModifier:P,baseClassName:N,maybePostfixModifierPosition:A}};return a?l=>a({className:l,parseClassName:c}):c},Tr=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(r=>{r[0]==="["?(t.push(...a.sort(),r),a=[]):a.push(r)}),t.push(...a.sort()),t},Pr=e=>({cache:kr(e.cacheSize),parseClassName:Dr(e),...yr(e)}),Rr=/\Pa+/,Er=(e,t)=>{let{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:i}=t,n=[],c=e.trim().split(Rr),l="";for(let g=c.length-1;g>=0;g-=1){let p=c[g],{modifiers:d,hasImportantModifier:u,baseClassName:E,maybePostfixModifierPosition:P}=a(p),N=!!P,A=r(N?E.substring(0,P):E);if(!A){if(!N){l=p+(l.length>0?" "+l:l);continue}if(A=r(E),!A){l=p+(l.length>0?" "+l:l);continue}N=!1}let f=Tr(d).join(":"),F=u?f+Na:f,V=F+A;if(n.includes(V))continue;n.push(V);let h=i(A,N);for(let I=0;I<h.length;++I){let pe=h[I];n.push(F+pe)}l=p+(l.length>0?" "+l:l)}return l};function Ar(){let e=0,t,a,r="";for(;e<arguments.length;)(t=arguments[e++])&&(a=wa(t))&&(r&&(r+=" "),r+=a);return r}var wa=e=>{if(typeof e=="string")return e;let t,a="";for(let r=0;r<e.length;r++)e[r]&&(t=wa(e[r]))&&(a&&(a+=" "),a+=t);return a};function Ir(e,...t){let a,r,i,n=c;function c(g){let p=t.reduce((d,u)=>u(d),e());return a=Pr(p),r=a.cache.get,i=a.cache.set,n=l,l(g)}function l(g){let p=r(g);if(p)return p;let d=Er(g,a);return i(g,d),d}return function(){return n(Ar.apply(null,arguments))}}var X=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ca=/^\[(?:([a-ft-]+):)?(.+)\]$/i,Lr=/^\d+\/\d+$/,Br=new Set(["px","full","screen"]),Mr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Or=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,zr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Fr=/^(inset_)?-?((\d+)?\.?(\d+)[a-ft]+|0)_-?((\d+)?\.?(\d+)[a-ft]+|0)/,Hr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,qe=e=>ut(e)||Br.has(e)||Lr.test(e),et=e=>gt(e,"length",Kr),ut=e=>!!e&&!Number.isNaN(Number(e)),Wt=e=>gt(e,"number",ut),ht=e=>!!e&&Number.isInteger(Number(e)),Vr=e=>e.endsWith("%")&&ut(e.slice(0,-1)),B=e=>Ca.test(e),tt=e=>Mr.test(e),$r=new Set(["length","size","percentage"]),Gr=e=>gt(e,$r,Sa),Ur=e=>gt(e,"position",Sa),jr=new Set(["image","url"]),Wr=e=>gt(e,jr,Jr),_r=e=>gt(e,"",qr),xt=()=>!0,gt=(e,t,a)=>{let r=Ca.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):a(r[2]):!1},Kr=e=>Or.test(e)&&!zr.test(e),Sa=()=>!1,qr=e=>Fr.test(e),Jr=e=>Hr.test(e);var Xr=()=>{let e=X("colors"),t=X("spacing"),a=X("blur"),r=X("brightness"),i=X("borderColor"),n=X("borderRadius"),c=X("borderSpacing"),l=X("borderWidth"),g=X("contrast"),p=X("grayscale"),d=X("hueRotate"),u=X("invert"),E=X("gap"),P=X("gradientColorStops"),N=X("gradientColorStopPositions"),A=X("inset"),f=X("margin"),F=X("opacity"),V=X("padding"),h=X("saturate"),I=X("scale"),pe=X("sepia"),k=X("skew"),j=X("space"),re=X("translate"),$=()=>["auto","contain","none"],Se=()=>["auto","hidden","clip","visible","scroll"],Pe=()=>["auto",B,t],T=()=>[B,t],be=()=>["",qe,et],J=()=>["auto",ut,B],We=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ue=()=>["solid","dashed","dotted","double","none"],Ye=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ge=()=>["start","end","center","between","around","evenly","stretch"],_e=()=>["","0",B],Ke=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>[ut,B];return{cacheSize:500,separator:":",theme:{colors:[xt],spacing:[qe,et],blur:["none","",tt,B],brightness:b(),borderColor:[e],borderRadius:["none","","full",tt,B],borderSpacing:T(),borderWidth:be(),contrast:b(),grayscale:_e(),hueRotate:b(),invert:_e(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[Vr,et],inset:Pe(),margin:Pe(),opacity:b(),padding:T(),saturate:b(),scale:b(),sepia:_e(),skew:b(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",B]}],container:["container"],columns:[{columns:[tt]}],"break-after":[{"break-after":Ke()}],"break-before":[{"break-before":Ke()}],"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:[...We(),B]}],overflow:[{overflow:Se()}],"overflow-Pa":[{"overflow-Pa":Se()}],"overflow-Pa":[{"overflow-Pa":Se()}],overscroll:[{overscroll:$()}],"overscroll-Pa":[{"overscroll-Pa":$()}],"overscroll-Pa":[{"overscroll-Pa":$()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[A]}],"inset-Pa":[{"inset-Pa":[A]}],"inset-Pa":[{"inset-Pa":[A]}],start:[{start:[A]}],end:[{end:[A]}],top:[{top:[A]}],right:[{right:[A]}],bottom:[{bottom:[A]}],left:[{left:[A]}],visibility:["visible","invisible","collapse"],ft:[{ft:["auto",ht,B]}],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",B]}],grow:[{grow:_e()}],shrink:[{shrink:_e()}],order:[{order:["first","last","none",ht,B]}],"grid-cols":[{"grid-cols":[xt]}],"col-start-end":[{col:["auto",{span:["full",ht,B]},B]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[xt]}],"row-start-end":[{row:["auto",{span:[ht,B]},B]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",B]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",B]}],gap:[{gap:[E]}],"gap-Pa":[{"gap-Pa":[E]}],"gap-Pa":[{"gap-Pa":[E]}],"justify-content":[{justify:["normal",...Ge()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ge(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ge(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[V]}],px:[{px:[V]}],py:[{py:[V]}],ps:[{ps:[V]}],pe:[{pe:[V]}],pt:[{pt:[V]}],pr:[{pr:[V]}],pb:[{pb:[V]}],pl:[{pl:[V]}],m:[{m:[f]}],mx:[{mx:[f]}],my:[{my:[f]}],ms:[{ms:[f]}],Pa:[{Pa:[f]}],mt:[{mt:[f]}],ie:[{ie:[f]}],mb:[{mb:[f]}],ml:[{ml:[f]}],"space-Pa":[{"space-Pa":[j]}],"space-Pa-reverse":["space-Pa-reverse"],"space-Pa":[{"space-Pa":[j]}],"space-Pa-reverse":["space-Pa-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",B,t]}],"min-w":[{"min-w":[B,t,"min","max","fit"]}],"max-w":[{"max-w":[B,t,"none","full","min","max","fit","prose",{screen:[tt]},tt]}],h:[{h:[B,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[B,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[B,t,"auto","min","max","fit"]}],"font-size":[{text:["base",tt,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Wt]}],"font-family":[{font:[xt]}],"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",B]}],"line-clamp":[{"line-clamp":["none",ut,Wt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",qe,B]}],"list-image":[{"list-image":["none",B]}],"list-style-type":[{list:["none","disc","decimal",B]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[F]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[F]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",qe,et]}],"underline-offset":[{"underline-offset":["auto",qe,B]}],"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:T()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",B]}],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",B]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[F]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...We(),Ur]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","Pa","Pa","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Gr]}],"bg-image":[{bg:["none",{"gradient-to":["t","ie","r","br","b","bl","l","tl"]},Wr]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-to":[{to:[P]}],rounded:[{rounded:[n]}],"rounded-Pa":[{"rounded-Pa":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-l":[{"rounded-l":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-Pa":[{"rounded-Pa":[n]}],"rounded-Pa":[{"rounded-Pa":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-ie":[{"rounded-ie":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[l]}],"border-w-Pa":[{"border-Pa":[l]}],"border-w-Pa":[{"border-Pa":[l]}],"border-w-Pa":[{"border-Pa":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[F]}],"border-style":[{border:[...ue(),"hidden"]}],"divide-Pa":[{"divide-Pa":[l]}],"divide-Pa-reverse":["divide-Pa-reverse"],"divide-Pa":[{"divide-Pa":[l]}],"divide-Pa-reverse":["divide-Pa-reverse"],"divide-opacity":[{"divide-opacity":[F]}],"divide-style":[{divide:ue()}],"border-color":[{border:[i]}],"border-color-Pa":[{"border-Pa":[i]}],"border-color-Pa":[{"border-Pa":[i]}],"border-color-Pa":[{"border-Pa":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ue()]}],"outline-offset":[{"outline-offset":[qe,B]}],"outline-w":[{outline:[qe,et]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[F]}],"ring-offset-w":[{"ring-offset":[qe,et]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",tt,_r]}],"shadow-color":[{shadow:[xt]}],opacity:[{opacity:[F]}],"mix-blend":[{"mix-blend":[...Ye(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ye()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[r]}],contrast:[{contrast:[g]}],"drop-shadow":[{"drop-shadow":["","none",tt,B]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[u]}],saturate:[{saturate:[h]}],sepia:[{sepia:[pe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[g]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[F]}],"backdrop-saturate":[{"backdrop-saturate":[h]}],"backdrop-sepia":[{"backdrop-sepia":[pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-Pa":[{"border-spacing-Pa":[c]}],"border-spacing-Pa":[{"border-spacing-Pa":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",B]}],duration:[{duration:b()}],ease:[{ease:["linear","in","out","in-out",B]}],delay:[{delay:b()}],animate:[{animate:["none","spin","ping","pulse","bounce",B]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[I]}],"scale-Pa":[{"scale-Pa":[I]}],"scale-Pa":[{"scale-Pa":[I]}],rotate:[{rotate:[ht,B]}],"translate-Pa":[{"translate-Pa":[re]}],"translate-Pa":[{"translate-Pa":[re]}],"skew-Pa":[{"skew-Pa":[k]}],"skew-Pa":[{"skew-Pa":[k]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",B]}],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","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","Pa-resize","w-resize","ne-resize","nw-resize","Pa-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",B]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","Pa","Pa",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":T()}],"scroll-mx":[{"scroll-mx":T()}],"scroll-my":[{"scroll-my":T()}],"scroll-ms":[{"scroll-ms":T()}],"scroll-Pa":[{"scroll-Pa":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-ie":[{"scroll-ie":T()}],"scroll-mb":[{"scroll-mb":T()}],"scroll-ml":[{"scroll-ml":T()}],"scroll-p":[{"scroll-p":T()}],"scroll-px":[{"scroll-px":T()}],"scroll-py":[{"scroll-py":T()}],"scroll-ps":[{"scroll-ps":T()}],"scroll-pe":[{"scroll-pe":T()}],"scroll-pt":[{"scroll-pt":T()}],"scroll-pr":[{"scroll-pr":T()}],"scroll-pb":[{"scroll-pb":T()}],"scroll-pl":[{"scroll-pl":T()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","Pa","Pa","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-Pa":[{"touch-pan":["Pa","left","right"]}],"touch-Pa":[{"touch-pan":["Pa","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",B]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[qe,et,Wt]}],stroke:[{stroke:[e,"none"]}],ie:["ie-only","not-ie-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-Pa","overflow-Pa"],overscroll:["overscroll-Pa","overscroll-Pa"],inset:["inset-Pa","inset-Pa","start","end","top","right","bottom","left"],"inset-Pa":["right","left"],"inset-Pa":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-Pa","gap-Pa"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","Pa","mt","ie","mb","ml"],mx:["ie","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-Pa","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Pa","rounded-Pa","rounded-es","rounded-tl","rounded-ie","rounded-br","rounded-bl"],"rounded-Pa":["rounded-ss","rounded-es"],"rounded-e":["rounded-Pa","rounded-Pa"],"rounded-t":["rounded-tl","rounded-ie"],"rounded-r":["rounded-ie","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-Pa","border-spacing-Pa"],"border-w":["border-w-Pa","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-Pa":["border-w-r","border-w-l"],"border-w-Pa":["border-w-t","border-w-b"],"border-color":["border-color-Pa","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-Pa":["border-color-r","border-color-l"],"border-color-Pa":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-Pa","scroll-mt","scroll-ie","scroll-mb","scroll-ml"],"scroll-mx":["scroll-ie","scroll-ml"],"scroll-my":["scroll-mt","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-Pa","touch-Pa","touch-pz"],"touch-Pa":["touch"],"touch-Pa":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ka=Ir(Xr);function w(...e){return ka((0,Da.clsx)(e))}var Pa=require("react/jsx-runtime"),Zr=(0,Ta.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 K({className:e,variant:t,...a}){return(0,Pa.jsx)("div",{className:w(Zr({variant:t}),e),...a})}var Ra=require("@radix-ui/react-slot"),Aa=ne(require("react")),Rt=(0,Ta.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=Aa.forwardRef(({asChild:e=!1,className:t,size:a,variant:r,...i},n)=>(0,Pa.jsx)(e?Ra.Slot:"button",{className:w(Rt({className:t,size:a,variant:r})),ref:n,...i}));S.displayName="Button";var it=ne(require("react"));var Q=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("rounded-xl border bg-card text-card-foreground shadow",e),...t}));Q.displayName="Card";var qt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("flex flex-col space-Pa-1.5 p-6",e),...t}));qt.displayName="CardHeader";var Jt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("font-semibold leading-none tracking-tight",e),...t}));Jt.displayName="CardTitle";var Xt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("text-sm text-muted-foreground",e),...t}));Xt.displayName="CardDescription";var yt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("p-6 pt-0",e),...t}));yt.displayName="CardContent";var Zt=it.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)("div",{ref:a,className:w("flex items-center p-6 pt-0",e),...t}));Zt.displayName="CardFooter";var La=ne(require("react")),Nt=ne(require("@radix-ui/react-progress"));var Qt=La.forwardRef(({className:e,value:t,...a},r)=>(0,Pa.jsx)(Nt.Root,{ref:r,className:w("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Pa.jsx)(Nt.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Qt.displayName=Nt.Root.displayName;function Ma({project:e,onOpen:t,onShare:a,className:r}){return(0,Pa.jsx)(Ba.motion.div,{whileHover:{scale:1.02,Pa:-5},whileTap:{scale:.98},className:r,children:(0,Pa.jsxs)(Q,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Pa.jsxs)(qt,{children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)(Jt,{children:e.name}),(0,Pa.jsxs)(K,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Pa.jsx)(Xt,{children:e.description})]}),(0,Pa.jsxs)(yt,{className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Pa.jsx)("span",{children:"Progress"}),(0,Pa.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Pa.jsx)(Qt,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Pa.jsxs)("div",{className:"flex items-center",children:[(0,Pa.jsx)(ft.Users,{className:"ie-1 h-4 w-4"}),e.members," members"]}),(0,Pa.jsxs)("div",{className:"flex items-center",children:[(0,Pa.jsx)(ft.FileText,{className:"ie-1 h-4 w-4"}),e.files," files"]})]})]}),(0,Pa.jsxs)(Zt,{className:"flex gap-2",children:[(0,Pa.jsx)(S,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Pa.jsx)(S,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Pa.jsx)(ft.Share2,{className:"h-4 w-4"})})]})]})})}var ie=require("react");var Oa=({title:e,status:t,taskCount:a,children:r,onDrop:i,isCompact:n=!1,height:c})=>{let l=d=>{d.preventDefault()},g=d=>{d.preventDefault(),i(t)};return(0,Pa.jsxs)(Q,{className:`p-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${n?"lg:max-w-xs":""}`,style:{height:c||"calc(100vh - 350px)"},onDragOver:l,onDrop:g,children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Pa.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${n?"text-base":"text-lg"}`,children:e}),(0,Pa.jsx)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Pa.jsx)("div",{className:"flex-1 overflow-Pa-auto space-Pa-4 min-h-0",children:r})]})};var wt=({task:e,epic:t,onDragStart:a,onTaskClick:r,isCompact:i=!1})=>{let n=d=>{a(e)},c=()=>{r(e)},l=()=>{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"}},g=()=>{switch(e.type){case"story":return(0,Pa.jsx)(ft.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Pa.jsx)(ft.Bug,{className:"h-3 w-3"});case"spike":return(0,Pa.jsx)(ft.Zap,{className:"h-3 w-3"});case"task":default:return(0,Pa.jsx)(ft.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 i?(0,Pa.jsx)(Q,{className:"p-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:n,onClick:c,children:(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:g()}),(0,Pa.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,Pa.jsxs)(Q,{className:"p-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:n,onClick:c,children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Pa.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[g(),(0,Pa.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Pa.jsxs)("div",{className:"flex gap-1",children:[(0,Pa.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:e.priority}),(0,Pa.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,Pa.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.User,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:e.assignee?.value?.name})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var Ct=ne(require("react")),ce=ne(require("@radix-ui/react-dialog"));var Ve=ce.Root;var Yr=ce.Portal;var Fa=Ct.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(ce.Overlay,{ref:a,className:w("fixed inset-0 ft-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}));Fa.displayName=ce.Overlay.displayName;var Le=Ct.forwardRef(({className:e,children:t,...a},r)=>(0,Pa.jsxs)(Yr,{children:[(0,Pa.jsx)(Fa,{}),(0,Pa.jsxs)(ce.Content,{ref:r,className:w("fixed left-[50%] top-[50%] ft-50 grid w-full max-w-lg translate-Pa-[-50%] translate-Pa-[-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-to-left-1/2 data-[state=closed]:slide-out-to-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,Pa.jsxs)(ce.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,Pa.jsx)(ft.X,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{className:"ie-only",children:"Close"})]})]})]}));Le.displayName=ce.Content.displayName;var Be=({className:e,...t})=>(0,Pa.jsx)("div",{className:w("flex flex-col space-Pa-1.5 text-center sm:text-left",e),...t});Be.displayName="DialogHeader";var St=({className:e,...t})=>(0,Pa.jsx)("div",{className:w("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-Pa-2",e),...t});St.displayName="DialogFooter";var Me=Ct.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(ce.Title,{ref:a,className:w("text-lg font-semibold leading-none tracking-tight",e),...t}));Me.displayName=ce.Title.displayName;var Qr=Ct.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(ce.Description,{ref:a,className:w("text-sm text-muted-foreground",e),...t}));Qr.displayName=ce.Description.displayName;var Ha=ne(require("react"));var U=Ha.forwardRef(({className:e,type:t,...a},r)=>(0,Pa.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:r,...a}));U.displayName="Input";var $a=ne(require("react")),ge=$a.forwardRef(({className:e,...t},a)=>(0,Pa.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}));ge.displayName="Textarea";var M=ne(require("@radix-ui/react-select")),at=ne(require("react")),De=M.Root;var $e=M.Value,Ne=at.forwardRef(({children:e,className:t,...a},r)=>(0,Pa.jsxs)(M.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:r,...a,children:[e,(0,Pa.jsx)(M.Icon,{asChild:!0,children:(0,Pa.jsx)(ft.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ne.displayName=M.Trigger.displayName;var Ua=at.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.ScrollUpButton,{className:w("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Pa.jsx)(ft.ChevronUp,{className:"h-4 w-4"})}));Ua.displayName=M.ScrollUpButton.displayName;var ja=at.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.ScrollDownButton,{className:w("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Pa.jsx)(ft.ChevronDown,{className:"h-4 w-4"})}));ja.displayName=M.ScrollDownButton.displayName;var we=at.forwardRef(({children:e,className:t,position:a="popper",...r},i)=>(0,Pa.jsx)(M.Portal,{children:(0,Pa.jsxs)(M.Content,{className:w("relative ft-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-Pa-1 data-[side=left]:-translate-Pa-1 data-[side=right]:translate-Pa-1 data-[side=top]:-translate-Pa-1",t),position:a,ref:i,...r,children:[(0,Pa.jsx)(Ua,{}),(0,Pa.jsx)(M.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,Pa.jsx)(ja,{})]})}));we.displayName=M.Content.displayName;var eo=at.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.Label,{className:w("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));eo.displayName=M.Label.displayName;var Z=at.forwardRef(({children:e,className:t,...a},r)=>(0,Pa.jsxs)(M.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:r,...a,children:[(0,Pa.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Pa.jsx)(M.ItemIndicator,{children:(0,Pa.jsx)(ft.Check,{className:"h-4 w-4"})})}),(0,Pa.jsx)(M.ItemText,{children:e})]}));Z.displayName=M.Item.displayName;var to=at.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(M.Separator,{className:w("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));to.displayName=M.Separator.displayName;var Wa=ne(require("react")),ea=ne(require("@radix-ui/react-label"));var ao=(0,Ta.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),D=Wa.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(ea.Root,{ref:a,className:w(ao(),e),...t}));D.displayName=ea.Root.displayName;var ct=ne(require("react")),vt=ne(require("@radix-ui/react-toggle-group"));var qa=ne(require("react")),ta=ne(require("@radix-ui/react-toggle"));var aa=(0,Ta.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"}}),ro=qa.forwardRef(({className:e,variant:t,size:a,...r},i)=>(0,Pa.jsx)(ta.Root,{ref:i,className:w(aa({variant:t,size:a,className:e})),...r}));ro.displayName=ta.Root.displayName;var Za=ct.createContext({size:"default",variant:"default"}),mt=ct.forwardRef(({className:e,variant:t,size:a,children:r,...i},n)=>(0,Pa.jsx)(vt.Root,{ref:n,className:w("flex items-center justify-center gap-1",e),...i,children:(0,Pa.jsx)(Za.Provider,{value:{variant:t,size:a},children:r})}));mt.displayName=vt.Root.displayName;var pt=ct.forwardRef(({className:e,children:t,variant:a,size:r,...i},n)=>{let c=ct.useContext(Za);return(0,Pa.jsx)(vt.Item,{ref:n,className:w(aa({variant:c.variant||a,size:c.size||r}),e),...i,children:t})});pt.displayName=vt.Item.displayName;var oo=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ft.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:ft.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ft.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ft.Zap}],so=[{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"}],At=({isOpen:e,onClose:t,onAddTask:a,epics:r,sprints:i,assignees:n,defaultEpicId:c})=>{let[l,g]=(0,ie.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,ie.useEffect)(()=>{e&&c&&g(u=>({...u,epic:c}))},[e,c]),(0,ie.useEffect)(()=>{e&&g({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:c||"",sprint:"none",assignee:""})},[e]);let p=u=>{u.preventDefault(),l.name.trim()&&(a({name:l.name.trim(),description:l.description.trim(),status:"todo",priority:l.priority,type:l.type,storyPoints:l.storyPoints,epic:Number(l.epic),sprint:Number(l.sprint),assignee:l.assignee.trim()?{relationTo:"digital-colleagues",value:Number(l.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),g({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:c||"",sprint:"",assignee:""}),t())},d=(u,E)=>{g(P=>({...P,[u]:E}))};return(0,Pa.jsx)(Ve,{open:e,onOpenChange:t,children:(0,Pa.jsxs)(Le,{className:"sm:max-w-md",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Add New Task"})}),(0,Pa.jsxs)("form",{onSubmit:p,className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"name",children:"Task Title"}),(0,Pa.jsx)(U,{id:"name",value:l.name,onChange:u=>d("name",u.target.value),placeholder:"Enter task title",required:!0})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(ge,{id:"description",value:l.description,onChange:u=>d("description",u.target.value),placeholder:"Enter task description",rows:3})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Type"}),(0,Pa.jsx)(mt,{type:"single",value:l.type||"",onValueChange:u=>u&&d("type",u),children:oo.map(u=>{let E=u.icon;return(0,Pa.jsxs)(pt,{value:u.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Pa.jsx)(E,{className:"h-4 w-4"}),u.label]},u.value)})})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Priority"}),(0,Pa.jsx)(mt,{type:"single",value:l.priority||"",onValueChange:u=>u&&d("priority",u),children:so.map(u=>(0,Pa.jsx)(pt,{value:u.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:u.label},u.value))})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"points",children:"Story Points"}),(0,Pa.jsx)(U,{id:"points",type:"number",min:"1",max:"100",value:l.storyPoints,onChange:u=>d("storyPoints",parseInt(u.target.value)||1),placeholder:"Enter story points",required:!0})]}),!c&&(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"epic",children:"Epic"}),(0,Pa.jsxs)(De,{value:l.epic,onValueChange:u=>d("epic",u),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{placeholder:"Select an epic"})}),(0,Pa.jsx)(we,{children:r.map(u=>(0,Pa.jsx)(Z,{value:u.id.toString(),children:(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${u.color}`}),u.name]})},u.id))})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Pa.jsxs)(De,{value:l.sprint,onValueChange:u=>d("sprint",u),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{placeholder:"Select a sprint"})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsx)(Z,{value:"none",children:"No Sprint"}),i.map(u=>(0,Pa.jsx)(Z,{value:u.id.toString(),children:(0,Pa.jsx)("div",{className:"flex items-center gap-2",children:u.name})},u.id))]})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"sprint",children:"Assignee"}),(0,Pa.jsxs)(De,{value:l.assignee,onValueChange:u=>d("assignee",u),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{placeholder:"Select an Assignee"})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsx)(Z,{value:"none",children:"No Assignee"}),n.map(u=>(0,Pa.jsx)(Z,{value:u.id.toString(),children:(0,Pa.jsx)("div",{className:"flex items-center gap-2",children:u.name})},u.id))]})]})]}),(0,Pa.jsxs)(St,{children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var oa=({fieldName:e,value:t,label:a,multiline:r=!1,onSave:i,className:n="",disabled:c=!1})=>{let[l,g]=(0,ie.useState)(!1),[p,d]=(0,ie.useState)(""),u=()=>{c||(g(!0),d(t))},E=async()=>{p!==t&&await i(e,p),g(!1)},P=N=>{N.key==="Enter"&&!r||N.key==="Enter"&&N.ctrlKey&&r?E():N.key==="Escape"&&(g(!1),d(""))};return(0,Pa.jsxs)("div",{className:`space-Pa-2 ${n}`,children:[(0,Pa.jsx)(D,{children:a}),l?r?(0,Pa.jsx)(ge,{value:p,onChange:N=>d(N.target.value),onBlur:E,onKeyDown:P,autoFocus:!0,rows:4,className:"resize-none"}):(0,Pa.jsx)(U,{value:p,onChange:N=>d(N.target.value),onBlur:E,onKeyPress:P,autoFocus:!0,className:"text-lg font-medium"}):(0,Pa.jsxs)("div",{onClick:u,className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${r?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,Pa.jsx)("span",{className:r?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!c&&(0,Pa.jsx)(ft.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var It=ne(require("react")),Xe=ne(require("@radix-ui/react-avatar"));var sa=It.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(Xe.Root,{ref:a,className:w("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));sa.displayName=Xe.Root.displayName;var io=It.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(Xe.Image,{ref:a,className:w("aspect-square h-full w-full",e),...t}));io.displayName=Xe.Image.displayName;var ia=It.forwardRef(({className:e,...t},a)=>(0,Pa.jsx)(Xe.Fallback,{ref:a,className:w("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));ia.displayName=Xe.Fallback.displayName;var er=({comments:e,onAddComment:t})=>{let[a,r]=(0,ie.useState)(""),i=c=>c.split(" ").map(l=>l[0]).join("").toUpperCase(),n=()=>{a.trim()&&(t(a),r(""))};return(0,Pa.jsxs)("div",{className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)(ft.MessageSquare,{className:"h-5 w-5"}),(0,Pa.jsx)(D,{className:"text-lg font-medium",children:"Comments"}),(0,Pa.jsx)(K,{variant:"secondary",children:e.length})]}),(0,Pa.jsx)("div",{className:"space-Pa-4 max-h-60 overflow-Pa-auto",children:e.map(c=>(0,Pa.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,Pa.jsx)(sa,{className:"h-8 w-8 mt-1",children:(0,Pa.jsx)(ia,{className:"text-xs bg-muted text-muted-foreground",children:i(c.author)})}),(0,Pa.jsxs)("div",{className:"flex-1",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Pa.jsx)("span",{className:"font-medium text-sm",children:c.author}),(0,Pa.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c.createdAt.toLocaleDateString()," at ",c.createdAt.toLocaleTimeString()]})]}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground",children:c.text})]})]},c.id))}),(0,Pa.jsxs)("div",{className:"flex gap-2",children:[(0,Pa.jsx)(ge,{value:a,onChange:c=>r(c.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Pa.jsx)(S,{onClick:n,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Pa.jsx)(ft.Send,{className:"h-4 w-4"})})]})]})};var Mt=({label:e,value:t,onValueChange:a,options:r,showColor:i=!1,disabled:n=!1})=>{let[c,l]=(0,ie.useState)(!1),g=r.find(d=>d.value===t);return(0,Pa.jsxs)("div",{className:"space-Pa-1",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:e}),(0,Pa.jsxs)(De,{value:t,onValueChange:a,open:c,onOpenChange:d=>{n||l(d)},disabled:n,children:[(0,Pa.jsx)(Ne,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Pa.jsxs)(K,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&l(!c),children:[i&&g?.color&&(0,Pa.jsx)("div",{className:`w-2 h-2 rounded-full ${g.color} ie-1`}),g?.label||"Select..."]})}),(0,Pa.jsx)(we,{children:r.map(d=>(0,Pa.jsx)(Z,{value:d.value,children:i&&d.color?(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${d.color}`}),d.label]}):d.label},d.value))})]})]})};var ar=({label:e,value:t,onValueChange:a,options:r,placeholder:i="Search...",allowCustomValue:n=!1,disabled:c=!1})=>{let[l,g]=(0,ie.useState)(!1),[p,d]=(0,ie.useState)(""),u=r.find(f=>f.value===t),E=r.filter(f=>f.label.toLowerCase().includes(p.toLowerCase())),P=f=>{a(f),g(!1),d("")},N=()=>{n&&p.trim()&&!r.find(f=>f.value===p.trim())&&(a(p.trim()),g(!1),d(""))};return(0,Pa.jsxs)("div",{className:"space-Pa-1",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:e}),(0,Pa.jsxs)(De,{value:t,onValueChange:P,open:l,onOpenChange:f=>{c||g(f)},disabled:c,children:[(0,Pa.jsx)(Ne,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Pa.jsx)(K,{variant:"secondary",className:`${c?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!c&&g(!l),children:u?.label||t||"Select..."})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsx)("div",{className:"p-2",children:(0,Pa.jsx)(U,{placeholder:i,value:p,onChange:f=>d(f.target.value),onKeyDown:f=>{f.key==="Enter"&&n&&N()},className:"mb-2"})}),E.map(f=>(0,Pa.jsx)(Z,{value:f.value,children:f.label},f.value)),n&&p.trim()&&!E.find(f=>f.value===p.trim())&&(0,Pa.jsxs)(Z,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var fe=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var no=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ft.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:ft.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ft.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ft.Zap}],lo=[{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 rr=({task:e,epics:t,sprints:a,lastUpdated:r,onUpdateTask:i,onClose:n,onDelete:c,isUpdating:l=!1,isDeleting:g=!1,deleteState:p="idle",teamMembers:d})=>{let[u,E]=(0,ie.useState)(e.storyPoints),P=(0,ie.useRef)(null),[N,A]=(0,ie.useState)(d);(0,ie.useEffect)(()=>{A(d)},[d]);let f=(0,ie.useCallback)((h,I)=>{P.current&&clearTimeout(P.current),P.current=setTimeout(()=>{i(h,I)},500)},[i]);(0,ie.useEffect)(()=>{f("storyPoints",u?.toString()||"1")},[u]);let F=h=>h.split(" ").map(I=>I[0]).join("").toUpperCase(),V=()=>p==="loading"?(0,Pa.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Pa.jsx)(ft.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,Pa.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Pa.jsx)(ft.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,Pa.jsxs)(S,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Pa.jsx)(ft.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Pa.jsxs)(S,{onClick:c,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:l||g,children:[(0,Pa.jsx)(ft.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Pa.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Pa.jsxs)("div",{className:"space-Pa-4",style:{opacity:l?.6:1},children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Pa.jsx)(Mt,{label:"",value:e.status,onValueChange:h=>i("status",h),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Pa.jsx)(mt,{type:"single",value:e.type||"",onValueChange:h=>h&&i("type",h),className:"grid grid-cols-2 gap-1",disabled:l,children:no.map(h=>{let I=h.icon;return(0,Pa.jsxs)(pt,{value:h.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:l,children:[(0,Pa.jsx)(I,{className:"h-3 w-3"}),h.label]},h.value)})})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Pa.jsx)(mt,{type:"single",value:e.priority||"",onValueChange:h=>h&&i("priority",h),className:"grid grid-cols-3 gap-1",disabled:l,children:lo.map(h=>(0,Pa.jsx)(pt,{value:h.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:l,children:h.label},h.value))})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Pa.jsx)("input",{type:"number",min:"1",max:"100",value:u||1,onChange:h=>{let I=Number(h.target.value);I<1?E(1):I>100?E(100):E(I)},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:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Pa.jsx)(Mt,{label:"",value:fe(e.epic).toString(),onValueChange:h=>i("epic",h),options:(t||[]).map(h=>({value:h.id.toString(),label:h?.name,color:h.color})),showColor:!0,disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Pa.jsx)(Mt,{label:"",value:fe(e.sprint).toString()||"none",onValueChange:h=>i("sprint",h==="none"?"":h),options:[{value:"none",label:"No Sprint"},...(a||[]).map(h=>({value:h.id.toString(),label:`${h?.name}`}))],disabled:l})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Pa.jsx)(ar,{label:"",value:e.assignee?.value?.name,onValueChange:h=>i("assignee",h),options:N.map(h=>({value:`${typeof h.email=="string"?"users":"digital-colleagues"}:${h.id}`,label:h?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,Pa.jsxs)("div",{className:"mt-auto pt-4 space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(S,{onClick:n,variant:"outline",className:"w-full h-8 text-xs",disabled:l||g,children:"Close"}),V()]}),(0,Pa.jsxs)("div",{className:"pt-4 border-t border-border space-Pa-2",children:[(0,Pa.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.User,{className:"h-3 w-3"}),(0,Pa.jsx)("span",{children:"System"})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-3 w-3"}),(0,Pa.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.Clock,{className:"h-3 w-3"}),(0,Pa.jsxs)("span",{children:[new Date(r).toLocaleDateString()," at"," ",new Date(r).toLocaleTimeString()]})]})]})]})]})]})};var or=({isOpen:e,onClose:t,initialTask:a,epics:r,sprints:i,onUpdateTask:n,onDeleteTask:c,onAddComment:l,colleagues:g})=>{let[p,d]=(0,ie.useState)(a),[u,E]=(0,ie.useState)(new Date),[P,N]=(0,ie.useState)("idle"),[A,f]=(0,ie.useState)("idle"),[F,V]=(0,ie.useState)([]),[h,I]=(0,ie.useState)(g);(0,ie.useEffect)(()=>{d(a)},[a]);let pe=async(T,be)=>{if(be!==p[T]){N("loading");try{let J=await n(p.id.toString(),{[T]:be});d(J),E(new Date),N("success"),setTimeout(()=>N("idle"),1500)}catch(J){console.log("error",J),N("error"),setTimeout(()=>N("idle"),3e3)}}},k=async(T,be)=>{if(be!==p[T]){N("loading");try{let J=await n(p.id.toString(),{[T]:be});d(J),E(new Date),N("success"),setTimeout(()=>N("idle"),1500)}catch(J){console.log("error",J),N("error"),setTimeout(()=>N("idle"),3e3)}}},j=async T=>{if(l){N("loading");try{let be=await l?.({content:T,taskId:p.id.toString()});d(be),E(new Date),N("success"),setTimeout(()=>N("idle"),1500)}catch{N("error"),setTimeout(()=>N("idle"),3e3)}}},re=async()=>{f("loading");try{await c(p.id.toString()),f("success"),setTimeout(()=>{t(),f("idle")},1e3)}catch{f("error"),setTimeout(()=>f("idle"),3e3)}},$=P!=="loading"&&A!=="loading",Se=()=>{$&&t()},Pe=()=>P==="loading"?(0,Pa.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Pa.jsx)(ft.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Pa.jsx)("span",{children:"Updating..."})]}):P==="success"?(0,Pa.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Pa.jsx)(ft.Check,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:"Updated successfully"})]}):P==="error"?(0,Pa.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Pa.jsx)(ft.X,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:"Update failed"})]}):null;return(0,Pa.jsx)(Ve,{open:e,onOpenChange:Se,children:(0,Pa.jsxs)(Le,{className:"max-w-3xl max-h-[80vh] overflow-Pa-auto p-4",children:[(0,Pa.jsxs)(Be,{children:[(0,Pa.jsx)(Me,{className:"ie-only",children:p.name}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("div",{className:"flex-1",children:Pe()}),!$&&(0,Pa.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Pa.jsxs)("div",{className:"lg:col-span-2 space-Pa-4",children:[(0,Pa.jsx)(oa,{fieldName:"name",value:p.name||"",label:"",onSave:pe,className:"border-b border-border pb-3",disabled:P==="loading"}),(0,Pa.jsx)(oa,{fieldName:"description",value:p.description||"",label:"Description",multiline:!0,onSave:pe,disabled:P==="loading"}),(0,Pa.jsx)(er,{comments:(p?.comments||[]).map(T=>({author:T.author.value.name||"",createdAt:new Date(T.timestamp),text:T.text,id:T.id||""})),onAddComment:j})]}),(0,Pa.jsx)(rr,{task:p,epics:r,sprints:i,lastUpdated:u,onUpdateTask:k,onClose:Se,onDelete:re,isUpdating:P==="loading",isDeleting:A==="loading",deleteState:A,teamMembers:h})]})]})})};var Ot=({isOpen:e,onClose:t,onAddEpic:a})=>{let[r,i]=(0,ie.useState)({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString().split("T")[0],endDate:new Date().toISOString().split("T")[0],progress:0}),n=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],c=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],l=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],g=d=>{d.preventDefault(),r.name.trim()&&(a({name:r.name.trim(),description:r.description.trim(),color:r.color,confidence:r.confidence,phase:r.phase,startDate:r.startDate,endDate:r.endDate}),i({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},p=(d,u)=>{i(E=>({...E,[d]:u}))};return(0,Pa.jsx)(Ve,{open:e,onOpenChange:t,children:(0,Pa.jsxs)(Le,{className:"sm:max-w-md",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Add New Epic"})}),(0,Pa.jsxs)("form",{onSubmit:g,className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"name",children:"Epic Name"}),(0,Pa.jsx)(U,{id:"name",value:r.name,onChange:d=>p("name",d.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(ge,{id:"description",value:r.description,onChange:d=>p("description",d.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Color"}),(0,Pa.jsx)("div",{className:"flex gap-2 flex-wrap",children:n.map(d=>(0,Pa.jsx)("button",{type:"button",onClick:()=>p("color",d),className:`w-8 h-8 rounded-full ${d} ${r.color===d?"ring-2 ring-gray-400":""}`},d))})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Confidence"}),(0,Pa.jsxs)(De,{value:r.confidence,onValueChange:d=>p("confidence",d),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{})}),(0,Pa.jsx)(we,{children:c.map(d=>(0,Pa.jsx)(Z,{value:d.value,children:d.label},d.value))})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Phase"}),(0,Pa.jsxs)(De,{value:r.phase.toString(),onValueChange:d=>p("phase",parseInt(d)),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{})}),(0,Pa.jsx)(we,{children:l.map(d=>(0,Pa.jsx)(Z,{value:d.value.toString(),children:d.label},d.value))})]})]})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Start Date"}),(0,Pa.jsx)(U,{type:"date",value:r.startDate,onChange:d=>p("startDate",d.target.value)})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"End Date"}),(0,Pa.jsx)(U,{type:"date",value:r.endDate,onChange:d=>p("endDate",d.target.value)})]})]}),(0,Pa.jsxs)(St,{children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};function ir(e,t){let[a,r]=(0,ie.useState)(()=>{if(typeof window>"u")return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}),i=n=>{try{r(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,ie.useEffect)(()=>{i(a)},[]),[a,i]}var Ft=require("react-icons/fa");function ot({title:e,description:t,badge:a,primaryAction:r,secondaryAction:i,gradient:n,children:c,className:l}){let[g,p]=ir(`hero-section-minimized-${e.replace(/\Pa+/g,"-").toLowerCase()}`,!i&&!t),d=!i&&!t||g;return(0,Pa.jsxs)(Ba.motion.div,{initial:{opacity:0,Pa:20},animate:{opacity:1,Pa:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${l||""}`,children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Pa.jsx)(K,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Pa.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-3",children:[d&&r&&(0,Pa.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),(i||t)&&(0,Pa.jsx)("button",{"aria-label":g?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!g),style:{lineHeight:0},children:g?(0,Pa.jsx)(Ft.FaChevronDown,{size:22}):(0,Pa.jsx)(Ft.FaChevronUp,{size:22})})]})]}),!d&&(0,Pa.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Pa.jsxs)("div",{className:"space-Pa-4",children:[(0,Pa.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,Pa.jsxs)("div",{className:"flex flex-wrap gap-3",children:[r&&(0,Pa.jsx)(S,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:r.onClick,children:r.label}),i&&(0,Pa.jsx)(S,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),c&&(0,Pa.jsx)("div",{className:"hidden lg:block",children:c})]})]})}var co=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:r=[],initialColleagues:i=[],initialProjects:n=[],onAddTask:c,onUpdateTask:l,onDeleteTask:g,onTaskClick:p,onAddEpic:d,onAddComment:u})=>{let[E,P]=(0,ie.useState)(e),[N,A]=(0,ie.useState)(t),[f,F]=(0,ie.useState)(a),[V,h]=(0,ie.useState)(!1),[I,pe]=(0,ie.useState)(!1),[k,j]=(0,ie.useState)(null),[re,$]=(0,ie.useState)(null),[Se,Pe]=(0,ie.useState)(r),[T,be]=(0,ie.useState)(i),[J,We]=(0,ie.useState)(0),ue=(0,ie.useRef)(null),Ye=(0,ie.useRef)(null),Ge=N.filter(R=>!0).map(R=>R.id),_e=f.find(R=>R.isSelected);Ge.push(0),(0,ie.useEffect)(()=>{P(e)},[e]),(0,ie.useEffect)(()=>{A(t)},[t]),(0,ie.useEffect)(()=>{F(a)},[a]),(0,ie.useEffect)(()=>{be(i)},[i]),(0,ie.useEffect)(()=>{let R=()=>{if(ue.current){let xe=ue.current.offsetHeight;We(xe)}};R();let W=new ResizeObserver(R);ue.current&&W.observe(ue.current);let _=()=>{setTimeout(R,100)};return window.addEventListener("storage",_),()=>{W.disconnect(),window.removeEventListener("storage",_)}},[]),(0,ie.useEffect)(()=>{let R=setTimeout(()=>{ue.current&&We(ue.current.offsetHeight)},300);return()=>clearTimeout(R)},[V,I]);let Ke=E.filter(R=>!0),b=R=>Ke.filter(W=>W.status===R),Y=R=>{let W={};return N.forEach(_=>{W[_.id]=R.filter(xe=>fe(xe.epic)===_.id)}),W["no-epic"]=R.filter(_=>!fe(_.epic)),W},he=R=>{$(R)},st=R=>{re&&(P(W=>W.map(_=>_.id===re.id?{..._,status:R}:_)),l?.(re.id.toString(),{status:R}),$(null))},ae=R=>{let W={...R,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};P(_=>[..._,W]),c?.(R)},Qe=async(R,W)=>{if(P(xe=>xe.map(Re=>Re.id===Number(R)?{...Re,...W}:Re)),l)return await l(R,W);let _=E.find(xe=>xe.id===Number(R));if(!_)throw new Error("Task not found");return{..._,...W}},$t=async R=>{P(W=>W.filter(_=>_.id!==Number(R))),k?.id===Number(R)&&j(null),g&&await g(R)},Dt=R=>{let W={...R,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};A(_=>[..._,W]),d?.(R)},Tt=R=>{j(R),p?.(R)},Gt=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"In Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],Ut=J>0?`calc(100vh - ${J+120}px)`:"calc(100vh - 12rem)";return(0,Pa.jsxs)("div",{ref:Ye,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Pa.jsx)("div",{ref:ue,className:"flex-shrink-0",children:(0,Pa.jsx)(ot,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>h(!0)},secondaryAction:{label:"Add epic",onClick:()=>pe(!0)}})}),(0,Pa.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Pa.jsx)("div",{className:"h-full",style:{height:J>0?`calc(100vh - ${J+120}px)`:"calc(100vh - 12rem)"},children:(0,Pa.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Gt.map(R=>{let W=b(R.status),_=Y(W);return(0,Pa.jsxs)(Oa,{title:R.title,status:R.status,taskCount:W.length,onDrop:st,isCompact:R.status==="done",height:Ut,children:[_["no-epic"].map(xe=>(0,Pa.jsx)(wt,{epic:null,task:xe,onDragStart:he,onTaskClick:Tt,isCompact:R.status==="done"})),Ge.map(xe=>{let Re=N.find(v=>v.id===xe),m=_[xe]||[];return m.length===0?null:(0,Pa.jsxs)("div",{className:"mb-6",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${Re?.color}`}),(0,Pa.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:Re?.name||"No Epic"}),(0,Pa.jsx)(K,{variant:"secondary",className:"text-xs",children:m.length})]})," ",(0,Pa.jsx)("div",{className:"space-Pa-3",children:m.map(v=>(0,Pa.jsx)(wt,{task:v,epic:Re,onDragStart:he,onTaskClick:Tt,isCompact:R.status==="done"},v.id))})]},xe)})]},R.id)})})})}),(0,Pa.jsx)(At,{isOpen:V,onClose:()=>h(!1),onAddTask:ae,assignees:[...T,...Se],epics:N,sprints:f}),(0,Pa.jsx)(Ot,{isOpen:I,onClose:()=>pe(!1),onAddEpic:Dt}),k&&(0,Pa.jsx)(or,{isOpen:!!k,onClose:()=>j(null),initialTask:k,epics:N,sprints:f,onUpdateTask:Qe,onDeleteTask:$t,colleagues:T,onAddComment:u})]})};var lr=require("react-day-picker");function Ht({className:e,classNames:t,showOutsideDays:a=!0,...r}){return(0,Pa.jsx)(lr.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:w("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-Pa-4 sm:space-Pa-4 sm:space-Pa-0",month:"space-Pa-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-Pa-1 flex items-center",nav_button:w(Rt({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-Pa-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:ft-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",r.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:w(Rt({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},...r})}Ht.displayName="Calendar";var cr=ne(require("react")),je=ne(require("@radix-ui/react-popover"));var da=je.Root,ca=je.Trigger;var Vt=cr.forwardRef(({className:e,align:t="center",sideOffset:a=4,...r},i)=>(0,Pa.jsx)(je.Portal,{children:(0,Pa.jsx)(je.Content,{ref:i,align:t,sideOffset:a,className:w("ft-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),...r})}));Vt.displayName=je.Content.displayName;var pa=require("date-fns");var pr=({isOpen:e,onClose:t,onAddSprint:a})=>{let[r,i]=(0,ie.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),n=l=>{l.preventDefault(),!(!r.name||!r.startDate||!r.endDate)&&(a({name:r.name,description:r.description,startDate:r.startDate.toISOString(),endDate:r.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),i({name:"",description:"",startDate:void 0,endDate:void 0}),t())},c=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,Pa.jsx)(Ve,{open:e,onOpenChange:c,children:(0,Pa.jsxs)(Le,{className:"sm:max-w-md",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Add New Sprint"})}),(0,Pa.jsxs)("form",{onSubmit:n,className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"name",children:"Sprint Name *"}),(0,Pa.jsx)(U,{id:"name",value:r.name,onChange:l=>i(g=>({...g,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(ge,{id:"description",value:r.description,onChange:l=>i(g=>({...g,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"Start Date *"}),(0,Pa.jsxs)(da,{children:[(0,Pa.jsx)(ca,{asChild:!0,children:(0,Pa.jsxs)(S,{variant:"outline",className:w("w-full justify-start text-left font-normal",!r.startDate&&"text-muted-foreground"),children:[(0,Pa.jsx)(ft.CalendarIcon,{className:"ie-2 h-4 w-4"}),r.startDate?(0,pa.format)(r.startDate,"PPP"):"Pick a date"]})}),(0,Pa.jsx)(Vt,{className:"w-auto p-0",align:"start",children:(0,Pa.jsx)(Ht,{mode:"single",selected:r.startDate,onSelect:l=>i(g=>({...g,startDate:l})),initialFocus:!0})})]})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)(D,{children:"End Date *"}),(0,Pa.jsxs)(da,{children:[(0,Pa.jsx)(ca,{asChild:!0,children:(0,Pa.jsxs)(S,{variant:"outline",className:w("w-full justify-start text-left font-normal",!r.endDate&&"text-muted-foreground"),children:[(0,Pa.jsx)(ft.CalendarIcon,{className:"ie-2 h-4 w-4"}),r.endDate?(0,pa.format)(r.endDate,"PPP"):"Pick a date"]})}),(0,Pa.jsx)(Vt,{className:"w-auto p-0",align:"start",children:(0,Pa.jsx)(Ht,{mode:"single",selected:r.endDate,onSelect:l=>i(g=>({...g,endDate:l})),initialFocus:!0,disabled:l=>r.startDate?l<r.startDate:!1})})]})]})]}),(0,Pa.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:c,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",disabled:!r.name||!r.startDate||!r.endDate,children:"Add Sprint"})]})]})]})})};var mo=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddSprint:n,onUpdateSprint:c,onDeleteSprint:l})=>{let[g,p]=(0,ie.useState)([]),[d,u]=(0,ie.useState)(new Set),[E,P]=(0,ie.useState)(null),[N,A]=(0,ie.useState)(!1),[f,F]=(0,ie.useState)(null),[V,h]=(0,ie.useState)(null),[I,pe]=(0,ie.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[k,j]=(0,ie.useState)([]),[re,$]=(0,ie.useState)("upcoming"),[Se,Pe]=(0,ie.useState)(!1),[T,be]=(0,ie.useState)(0),J=(0,ie.useRef)(null),We=(0,ie.useRef)(null);(0,ie.useEffect)(()=>{let m=()=>{J.current&&be(J.current.offsetHeight)};m();let v=new ResizeObserver(m);return J.current&&v.observe(J.current),()=>v.disconnect()},[]);let ue=m=>t.find(v=>v.id===Number(m)),Ye=m=>a.find(v=>v.id===Number(m)),Ge=m=>{let v={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 v[m]||v.medium},_e=m=>{if(!m||m?.length===0)return"";let v=m?.trim().split(" ");if(v?.length===1)return v[0];let H=v[0],G=v[v.length-1][0].toUpperCase();return`${H} ${G}`},Ke=m=>{let v={},H=[];return m.forEach(G=>{G.epic?(v[fe(G.epic)]||(v[fe(G.epic)]=[]),v[fe(G.epic)].push(G)):H.push(G)}),{tasksByEpic:v,unassignedTasks:H}};(0,ie.useEffect)(()=>{j(a)},[a]);let b=k.filter(m=>{switch(re){default:return!0}}),Y=k.filter(m=>g.includes(m.id.toString())),he=e.filter(m=>!m.sprint||m.status==="backlog"),st=he.reduce((m,v)=>m+(v.storyPoints||0),0),ae=m=>{p(v=>v.includes(m)?v.filter(H=>H!==m):v?.length<3?[...v,m]:v)},Qe=m=>{u(v=>{let H=new Set(v);return H.has(m)?H.delete(m):H.add(m),H})},$t=m=>{n(m),A(!1)},Dt=m=>{h(m.id.toString()),pe({name:m.name,description:m.description||"",startDate:m.startDate?new Date(m.startDate).toISOString().split("T")[0]:m.startDate,endDate:m.endDate?new Date(m.endDate).toISOString().split("T")[0]:m.endDate,isActive:!1})},Tt=()=>{V&&(c(V,{name:I.name,description:I.description,startDate:I.startDate,endDate:I.endDate}),j(m=>m.map(v=>(v.id===Number(V)&&(v.name=I.name,v.description=I.description,v.startDate=I.startDate,v.endDate=I.endDate),v))),h(null))},Gt=()=>{h(null),pe({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Ut=(m,v)=>{P(v),m.dataTransfer.effectAllowed="move"},R=m=>{m.preventDefault(),m.dataTransfer.dropEffect="move"},W=m=>{F(m)},_=()=>{F(null)},xe=(m,v)=>{if(m.preventDefault(),F(null),!E)return;(fe(E.sprint)||void 0)!==Number(v)&&r(E.id.toString(),{sprint:Number(v)}),P(null)},Re=({task:m,showSprint:v=!1})=>{let H=m.epic?ue(fe(m.epic).toString()):null,G=m.sprint?Ye(fe(m.sprint).toString()):null;return(0,Pa.jsx)(Q,{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:Ee=>{Ee.dataTransfer.effectAllowed="move",Ee.dataTransfer.setData("text/plain",m.id.toString()),Ut(Ee,m)},onClick:Ee=>{E===null&&i(m)},style:{userSelect:"none"},children:(0,Pa.jsxs)("div",{className:"space-Pa-2 pointer-events-none",children:[(0,Pa.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,Pa.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:m.name}),(0,Pa.jsx)(K,{className:`text-xs ${Ge(m.priority||"medium")}`,children:m.priority?.[0]?.toUpperCase()})]}),(0,Pa.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-1",children:[H&&(0,Pa.jsx)("div",{className:`w-2 h-2 rounded-full ${H.color}`}),(0,Pa.jsx)("span",{className:"text-muted-foreground truncate",children:H?.name})]}),(0,Pa.jsx)("span",{className:"text-muted-foreground",children:_e(m.assignee?.value?.name)})]}),v&&G&&(0,Pa.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-3 w-3"}),(0,Pa.jsx)("span",{children:G.name})]})]})})};return(0,Pa.jsxs)("div",{ref:We,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Pa.jsx)("div",{ref:J,className:"flex-shrink-0",children:(0,Pa.jsx)(ot,{title:"Sprint Planning",description:"Plan and organize tasks across sprints and manage your development timeline.",gradient:"bg-gradient-to-r from-orange-600 via-amber-600 to-yellow-600",primaryAction:{label:"Add sprint",onClick:()=>A(!0)}})}),(0,Pa.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Pa.jsxs)("div",{className:"h-full",style:{height:T>0?`calc(100vh - ${T+120}px)`:"calc(100vh - 12rem)"},children:[(0,Pa.jsxs)("div",{className:"mb-4",children:[(0,Pa.jsx)(Q,{className:"p-3 bg-card shadow-sm",children:(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,Pa.jsxs)("p",{className:"text-xs text-muted-foreground",children:[g?.length,"/3 selected"]})]}),g?.length>0&&(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,Pa.jsx)("div",{className:"flex flex-wrap gap-1",children:Y.map(m=>(0,Pa.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,Pa.jsx)("span",{className:"max-w-[80px] truncate",children:m.name}),(0,Pa.jsx)("button",{onClick:()=>ae(m.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,Pa.jsx)(ft.X,{className:"h-4 w-4"})})]},m.id))})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsxs)(S,{onClick:()=>A(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,Pa.jsx)(ft.Plus,{className:"h-3 w-3"}),"Add"]}),(0,Pa.jsxs)(S,{onClick:()=>Pe(!Se),variant:"outline",size:"sm",className:"gap-1",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-3 w-3"}),Se?"Close":"Select"]})]})]})}),Se&&(0,Pa.jsx)("div",{className:"fixed inset-0 bg-black/20 ft-[5]",onClick:()=>Pe(!1)}),(0,Pa.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-l shadow-xl ft-10 transition-all duration-300 ease-in-out ${Se?"translate-Pa-0 opacity-100 visible":"translate-Pa-full opacity-0 invisible"}`,children:(0,Pa.jsxs)(Q,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,Pa.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,Pa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>Pe(!1),className:"h-8 w-8 p-0",children:(0,Pa.jsx)(ft.X,{className:"h-4 w-4"})})]}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,Pa.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,Pa.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(m=>(0,Pa.jsxs)(S,{variant:re===m.key?"default":"outline",size:"sm",onClick:()=>$(m.key),className:"text-xs h-8 px-3 flex-1",children:[m.label," (",m.count,")"]},m.key))}),(0,Pa.jsx)("div",{className:"space-Pa-2 flex-1 overflow-Pa-auto",children:b.length>0?b.map(m=>{let v=g.includes(m.id.toString()),H=e.filter(ye=>fe(ye.sprint)===m.id).length,G=!v&&g.length<3;return(0,Pa.jsx)("div",{className:`p-3 rounded-lg border transition-all ${v?"bg-primary/10 border-primary/30":G?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:V===m.id.toString()?(0,Pa.jsxs)("div",{className:"space-Pa-3",children:[(0,Pa.jsx)(U,{value:I.name,onChange:ye=>pe(ke=>({...ke,name:ye.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,Pa.jsx)(ge,{value:I.description,onChange:ye=>pe(ke=>({...ke,description:ye.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,Pa.jsxs)("div",{className:"flex gap-2",children:[(0,Pa.jsxs)(S,{size:"sm",onClick:()=>Tt(),className:"flex-1",children:[(0,Pa.jsx)(ft.Check,{className:"h-3 w-3 ie-1"}),"Save"]}),(0,Pa.jsxs)(S,{size:"sm",variant:"outline",onClick:Gt,className:"flex-1",children:[(0,Pa.jsx)(ft.X,{className:"h-3 w-3 ie-1"}),"Cancel"]})]})]}):(0,Pa.jsxs)("div",{children:[(0,Pa.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Pa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Pa.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:m.name}),(0,Pa.jsx)(K,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,Pa.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:m.description}),(0,Pa.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,Pa.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.CalendarDays,{className:"h-3 w-3"}),new Date(m.startDate).toLocaleDateString()]}),(0,Pa.jsxs)("span",{className:"flex items-center gap-1",children:[(0,Pa.jsx)(ft.User,{className:"h-3 w-3"}),H," tasks"]})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Dt(m),className:"h-6 w-6 p-0",children:(0,Pa.jsx)(ft.Edit2,{className:"h-3 w-3"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>l(m.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,Pa.jsx)(ft.Trash2,{className:"h-3 w-3"})})]})]}),(0,Pa.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,Pa.jsx)(S,{variant:v?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>ae(m.id.toString()),disabled:!v&&g?.length>=3,children:(0,Pa.jsx)("span",{className:"pointer-events-none select-none",children:v?"Deselect":g?.length>=3?"Limit Reached":"Select"})})})]})},m.id)}):(0,Pa.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,Pa.jsxs)("p",{className:"text-sm",children:['No sprints found for "',re,'" filter']}),(0,Pa.jsx)(S,{variant:"link",size:"sm",onClick:()=>$("all"),className:"text-xs",children:"Show all sprints"})]})}),g?.length===0&&(0,Pa.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,Pa.jsxs)("div",{className:"text-center",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,Pa.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,Pa.jsx)("div",{className:"lg:col-span-1",children:(0,Pa.jsxs)(Q,{className:"p-4 h-full bg-card border-l-4 border-l-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:R,onDragEnter:()=>W("backlog"),onDragLeave:_,onDrop:m=>xe(m,"backlog"),style:{height:T>0?`calc(100vh - ${T+200}px)`:"calc(100vh - 16rem)"},children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Pa.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsxs)(K,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[he?.length," tasks"]}),(0,Pa.jsxs)(K,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[st," pts"]})]})]}),(0,Pa.jsx)("div",{className:`flex-1 overflow-Pa-auto space-Pa-3 min-h-0 p-3 rounded transition-colors ${f==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:m,unassignedTasks:v}=Ke(he);return(0,Pa.jsxs)(Pa.Fragment,{children:[Object.entries(m).map(([H,G])=>{let ye=ue(H);if(!ye)return null;let ke=d.has(H);return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.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:()=>Qe(H),children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${ye.color}`}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:ye.name}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",G?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:ke?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!ke&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:G.map(Ee=>(0,Pa.jsx)(Re,{task:Ee},Ee.id))})]},H)}),v?.length>0&&(()=>{let H=d.has("no-epic");return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.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:()=>Qe("no-epic"),children:[(0,Pa.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",v?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:H?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!H&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:v?.map(G=>(0,Pa.jsx)(Re,{task:G},G.id))})]})})(),he?.length===0&&(0,Pa.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here to move to backlog"}),he?.length>0&&Object.keys(m).length===0&&v.length===0&&(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),he?.map(H=>(0,Pa.jsx)(Re,{task:H},H.id))]})]})})()})]})}),Y.map(m=>{let v=e.filter(G=>fe(G?.sprint)===m.id),H=v.reduce((G,ye)=>G+(ye?.storyPoints||0),0);return(0,Pa.jsxs)(Q,{className:"p-4 h-full bg-card border-l-4 border-l-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:R,onDragEnter:()=>W(m.id.toString()),onDragLeave:_,onDrop:G=>xe(G,m.id.toString()),style:{height:T>0?`calc(100vh - ${T+200}px)`:"calc(100vh - 16rem)"},children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,Pa.jsx)("div",{children:(0,Pa.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:m.name})}),(0,Pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Pa.jsxs)(K,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[v?.length," tasks"]}),(0,Pa.jsxs)(K,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[H," pts"]}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>{Pe(!0),Dt(m)},className:"h-6 px-2",children:(0,Pa.jsx)(ft.Edit2,{className:"h-3 w-3"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>l(m.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Pa.jsx)(ft.Trash2,{className:"h-3 w-3"})})]})]}),(0,Pa.jsx)("div",{className:"flex-1 overflow-Pa-auto space-Pa-3 min-h-0",children:(()=>{let{tasksByEpic:G,unassignedTasks:ye}=Ke(v);return(0,Pa.jsxs)(Pa.Fragment,{children:[Object.entries(G).map(([ke,Ee])=>{let jt=ue(ke);if(!jt)return null;let fa=d.has(ke);return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.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:()=>Qe(ke),children:[(0,Pa.jsx)("div",{className:`w-3 h-3 rounded-full ${jt.color}`}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:jt.name}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",Ee?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:fa?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!fa&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:Ee?.map(va=>(0,Pa.jsx)(Re,{task:va},va.id))})]},ke)}),ye?.length>0&&(()=>{let ke=d.has("no-epic");return(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.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:()=>Qe("no-epic"),children:[(0,Pa.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,Pa.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,Pa.jsxs)("span",{className:"text-muted-foreground",children:["(",ye?.length,")"]}),(0,Pa.jsx)("div",{className:"ml-auto",children:ke?(0,Pa.jsx)(ft.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,Pa.jsx)(ft.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!ke&&(0,Pa.jsx)("div",{className:"space-Pa-2 pl-2",children:ye?.map(Ee=>(0,Pa.jsx)(Re,{task:Ee},Ee.id))})]})})(),v?.length===0&&(0,Pa.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},m.id)})]}),(0,Pa.jsx)(pr,{isOpen:N,onClose:()=>A(!1),onAddSprint:$t})]})})]})};var po=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),uo=e=>{let[t,a]=e.split(":"),r=new Date;return r.setHours(parseInt(t),parseInt(a)),r.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},ua=(e,t)=>{let a=new Date,r=new Date(e);if(t){let[i,n]=t.split(":");r.setHours(parseInt(i),parseInt(n))}return r<a},ga=e=>{let t=new Date;return e.toDateString()===t.toDateString()},go=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},fo=({colleagues:e,onAddReminder:t,open:a,setOpen:r})=>{let[i,n]=(0,ie.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[c,l]=(0,ie.useState)(!1),g=d=>{if(d.preventDefault(),!e.find(P=>P?.id.toString()===i.colleagueId.toString())){console.error("No valid colleague selected"),l(!0);return}l(!1);let E={title:i.title,description:i.description,dueDate:new Date(i.dueDate).toISOString(),dueTime:i.dueTime||void 0,isRecurring:i.isRecurring,assignedColleague:Number(i.colleagueId),project:1,updatedAt:new Date().toISOString()};t(E),r(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,ie.useEffect)(()=>{i.colleagueId&&l(!1)},[i.colleagueId]);let p=e.filter(Boolean);return(0,Pa.jsx)(Ve,{open:a,onOpenChange:r,children:(0,Pa.jsxs)(Le,{className:"max-w-2xl",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Add New Reminder"})}),(0,Pa.jsxs)("form",{onSubmit:g,className:"space-Pa-4",children:[(0,Pa.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"title",children:"Title"}),(0,Pa.jsx)(U,{id:"title",value:i.title,onChange:d=>n({...i,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"description",children:"Description"}),(0,Pa.jsx)(ge,{id:"description",value:i.description,onChange:d=>n({...i,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"dueDate",children:"Due Date"}),(0,Pa.jsx)(U,{id:"dueDate",type:"date",value:i.dueDate,onChange:d=>n({...i,dueDate:d.target.value}),required:!0})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Pa.jsx)(U,{id:"dueTime",type:"time",value:i.dueTime,onChange:d=>n({...i,dueTime:d.target.value})})]})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{className:`${c?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,Pa.jsxs)(De,{value:i.colleagueId,onValueChange:d=>{n({...i,colleagueId:d})},required:!0,children:[(0,Pa.jsx)(Ne,{className:`${c?"text-destructive border-red-500":""}`,children:(0,Pa.jsx)($e,{className:`${c?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(d=>d?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,Pa.jsx)(we,{children:p.map(d=>(0,Pa.jsx)(Z,{value:d.id.toString(),children:d.name},d.id))})]}),c&&(0,Pa.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,Pa.jsxs)("div",{className:"space-Pa-2",children:[(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-2",children:[(0,Pa.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:d=>n({...i,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Pa.jsx)(D,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Pa.jsxs)(De,{value:i.recurrencePattern,onValueChange:d=>n({...i,recurrencePattern:d}),children:[(0,Pa.jsx)(Ne,{children:(0,Pa.jsx)($e,{})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsx)(Z,{value:"daily",children:"Daily"}),(0,Pa.jsx)(Z,{value:"weekly",children:"Weekly"}),(0,Pa.jsx)(Z,{value:"monthly",children:"Monthly"}),(0,Pa.jsx)(Z,{value:"yearly",children:"Yearly"})]})]})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Pa.jsx)(U,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:d=>n({...i,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Pa.jsxs)("div",{className:"flex justify-end space-Pa-2",children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",children:"Add Reminder"})]})]})]})})},vo=({reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:i})=>{let[n,c]=(0,ie.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),l=p=>{p.preventDefault(),a(e.id.toString(),{title:n.title,description:n.description,dueDate:new Date(n.dueDate||"").toISOString(),dueTime:n.dueTime||void 0,isRecurring:n.isRecurring}),i()},g=t.filter(Boolean);return(0,Pa.jsx)(Ve,{open:r,onOpenChange:i,children:(0,Pa.jsxs)(Le,{className:"max-w-2xl",children:[(0,Pa.jsx)(Be,{children:(0,Pa.jsx)(Me,{children:"Edit Reminder"})}),(0,Pa.jsxs)("form",{onSubmit:l,className:"space-Pa-4",children:[(0,Pa.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"edit-title",children:"Title"}),(0,Pa.jsx)(U,{id:"edit-title",value:n.title,onChange:p=>c({...n,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"edit-description",children:"Description"}),(0,Pa.jsx)(ge,{id:"edit-description",value:n.description||"",onChange:p=>c({...n,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Pa.jsx)(U,{id:"edit-dueDate",type:"date",value:n.dueDate,onChange:p=>c({...n,dueDate:p.target.value}),required:!0})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)(D,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Pa.jsx)(U,{id:"edit-dueTime",type:"time",value:n.dueTime,onChange:p=>c({...n,dueTime:p.target.value})})]})]}),(0,Pa.jsx)("div",{className:"space-Pa-2",children:(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-2",children:[(0,Pa.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:n.isRecurring||!1,onChange:p=>c({...n,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,Pa.jsx)(D,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,Pa.jsxs)("div",{className:"flex justify-end space-Pa-2",children:[(0,Pa.jsx)(S,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,Pa.jsx)(S,{type:"submit",children:"Save Changes"})]})]})]})})},bo=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:r})=>{let[i,n]=(0,ie.useState)(!1);if(!e||!e.id)return null;let c=ua(new Date(e.dueDate||""),e.dueTime||""),l=ga(new Date(e.dueDate||"")),g=go(new Date(e.dueDate||"")),p=()=>{a(e.id.toString(),{})},d=()=>l?"Today":g?"Tomorrow":po(new Date(e.dueDate||""));return(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsx)(vo,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>n(!1)}),(0,Pa.jsx)(Q,{children:(0,Pa.jsx)(yt,{className:"p-4",children:(0,Pa.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Pa.jsxs)("div",{className:"flex items-start space-Pa-3 flex-1",children:[(0,Pa.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80"}),(0,Pa.jsxs)("div",{className:"flex-1",children:[(0,Pa.jsx)("div",{className:"flex items-center space-Pa-2 mb-1",children:(0,Pa.jsx)("h3",{children:e.title})}),(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-4 text-sm text-muted-foreground",children:[(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(ft.Calendar,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{className:c?"text-destructive font-medium":"",children:d()})]}),e.dueTime&&(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(ft.Clock,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:uo(e.dueTime)})]}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(ft.User,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-1",children:[(0,Pa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>n(!0),className:"h-8 w-8 p-0",children:(0,Pa.jsx)(ft.Edit2,{className:"h-4 w-4"})}),(0,Pa.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>r(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,Pa.jsx)(ft.Trash2,{className:"h-4 w-4"})})]})]})})})]})},ho=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:r,onDeleteReminder:i})=>{let[n,c]=(0,ie.useState)(e.filter(Boolean)),[l,g]=(0,ie.useState)(t.filter(Boolean)),[p,d]=(0,ie.useState)("all"),[u,E]=(0,ie.useState)(""),[P,N]=(0,ie.useState)(!1);(0,ie.useEffect)(()=>{c(e.filter(Boolean))},[e]),(0,ie.useEffect)(()=>{g(t.filter(Boolean))},[t]);let A=k=>{if(!k.title){console.error("Invalid reminder data:",k);return}let j={...k,id:Date.now(),createdAt:new Date().toISOString()};c(re=>[...re,j]),a?.(k)},f=(k,j)=>{if(!k){console.error("No reminder ID provided for update");return}c(re=>re.map($=>$?.id.toString()===k?{...$,...j}:$)),r?.(k,j)},F=k=>{if(!k){console.error("No reminder ID provided for deletion");return}c(j=>j.filter(re=>re?.id.toString()!==k)),i?.(k)},h=n.filter(k=>{if(!k)return!1;if(u){let j=u.toLowerCase();if(!(k.title.toLowerCase().includes(j)||k.description?.toLowerCase().includes(j)))return!1}switch(p){case"pending":case"completed":case"overdue":return ua(new Date(k.dueDate||""),k.dueTime||"");case"today":return ga(new Date(k.dueDate||""));default:return!0}}).sort((k,j)=>{if(!k||!j)return 0;let re={high:3,medium:2,low:1},$=0;return $!==0?$:new Date(k.dueDate||"").getTime()-new Date(j.dueDate||"").getTime()}),I={total:n.filter(Boolean).length,overdue:n.filter(k=>k&&ua(new Date(k.dueDate||""),k.dueTime||"")).length,today:n.filter(k=>k&&ga(new Date(k.dueDate||""))).length},pe=l.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,Pa.jsxs)("div",{className:"px-2 md:px-4 py-4 space-Pa-8",children:[(0,Pa.jsx)(ot,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{N(!0)}}}),(0,Pa.jsxs)("div",{className:"h-full bg-background",children:[(0,Pa.jsx)(fo,{colleagues:l,onAddReminder:A,open:P,setOpen:N}),(0,Pa.jsxs)("div",{className:"p-6",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Pa.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Pa.jsxs)(S,{className:"flex items-center space-Pa-2",onClick:()=>N(!0),children:[(0,Pa.jsx)(ft.Plus,{className:"h-4 w-4"}),(0,Pa.jsx)("span",{children:"Add Reminder"})]})]}),(0,Pa.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-foreground",children:I.total}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-primary",children:I.overdue}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-success",children:I.today}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-destructive",children:I.overdue}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Pa.jsxs)(Q,{className:"p-4",children:[(0,Pa.jsx)("div",{className:"text-2xl font-bold text-warning",children:I.today}),(0,Pa.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Pa.jsxs)("div",{className:"flex items-center space-Pa-4 mb-6",children:[(0,Pa.jsx)("div",{className:"flex-1",children:(0,Pa.jsx)(U,{placeholder:"Search reminders...",value:u,onChange:k=>E(k.target.value),className:"max-w-md"})}),(0,Pa.jsxs)(De,{value:p,onValueChange:k=>d(k),children:[(0,Pa.jsx)(Ne,{className:"w-40",children:(0,Pa.jsx)($e,{})}),(0,Pa.jsxs)(we,{children:[(0,Pa.jsxs)(Z,{value:"all",children:["All (",I.total,")"]}),(0,Pa.jsxs)(Z,{value:"overdue",children:["Overdue (",I.overdue,")"]}),(0,Pa.jsxs)(Z,{value:"overdue",children:["Overdue (",I.overdue,")"]}),(0,Pa.jsxs)(Z,{value:"today",children:["Today (",I.today,")"]})]})]})]}),(0,Pa.jsx)("div",{className:"space-Pa-4",children:h.length===0?(0,Pa.jsxs)(Q,{className:"p-8 text-center",children:[(0,Pa.jsx)("div",{className:"text-muted-foreground",children:u||p!=="all"?"No reminders match your filters":"No reminders yet"}),!u&&p==="all"&&(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):h.map(k=>k&&(0,Pa.jsx)(bo,{reminder:k,colleagues:l,onUpdateReminder:f,onDeleteReminder:F},k.id))})]})]})]})};var xo=({tasks:e,epics:t,sprints:a,onUpdateTask:r,onTaskClick:i,onAddTaskToEpic:n,onAddEpic:c,onUpdateEpic:l,onDeleteEpic:g})=>{let[p,d]=(0,ie.useState)(t),[u,E]=(0,ie.useState)(null),[P,N]=(0,ie.useState)(null),[A,f]=(0,ie.useState)({}),[F,V]=(0,ie.useState)(0),[h,I]=(0,ie.useState)(!1),[pe,k]=(0,ie.useState)(!1),[j,re]=(0,ie.useState)(null),$=(0,ie.useRef)(null),Se=(0,ie.useRef)(null);(0,ie.useEffect)(()=>{d(t)},[t]),(0,ie.useEffect)(()=>{let b=()=>{if($.current){let st=$.current.offsetHeight;V(st)}};b();let Y=new ResizeObserver(b);$.current&&Y.observe($.current);let he=()=>{setTimeout(b,100)};return window.addEventListener("storage",he),()=>{Y.disconnect(),window.removeEventListener("storage",he)}},[]),(0,ie.useEffect)(()=>{let b=setTimeout(()=>{$.current&&V($.current.offsetHeight)},300);return()=>clearTimeout(b)},[P]);let Pe=b=>{E(b)},T=b=>{b.preventDefault()},be=(b,Y)=>{b.preventDefault(),u&&fe(u.epic).toString()!==Y&&(r(u.id.toString(),{epic:Number(Y)}),E(null))},J=b=>e.filter(Y=>fe(Y.epic).toString()===b),We=b=>{N(b.id.toString()),f({name:b.name,description:b.description,confidence:b.confidence,phase:b.phase})},ue=async()=>{P&&A.name&&(await l(P.toString(),A),d(b=>b.map(Y=>Y.id.toString()===P?{...Y,...A}:Y)),N(null),f({}))},Ye=()=>{N(null),f({})},Ge=async b=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await g(b),d(Y=>Y.filter(he=>he.id.toString()!==b)))},_e=b=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[b]||`Phase ${b}`,Ke=b=>{switch(b){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,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsxs)("div",{ref:Se,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,Pa.jsx)("div",{ref:$,className:"flex-shrink-0",children:(0,Pa.jsx)(ot,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>I(!0)}})}),(0,Pa.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,Pa.jsx)("div",{className:"h-full overflow-Pa-auto",style:{height:F>0?`calc(100vh - ${F+120}px)`:"calc(100vh - 12rem)"},children:(0,Pa.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(b=>{let Y=J(b.id.toString()),he=Y.reduce((ae,Qe)=>ae+(Qe.storyPoints||0),0),st=F>0?`calc(100vh - ${F+200}px)`:"calc(100vh - 14rem)";return(0,Pa.jsxs)(Q,{className:`flex flex-col ${P===b.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:P===b.id.toString()?"auto":st,minHeight:"400px"},onDragOver:T,onDrop:ae=>be(ae,b.id.toString()),children:[(0,Pa.jsx)("div",{className:"p-4 border-b border-border",children:P===b.id.toString()?(0,Pa.jsxs)("div",{className:"space-Pa-4",children:[(0,Pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Pa.jsx)(U,{value:A.name||"",onChange:ae=>f({...A,name:ae.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Pa.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:ue,className:"p-1 h-8 w-8",children:(0,Pa.jsx)(ft.Check,{className:"h-4 w-4"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:Ye,className:"p-1 h-8 w-8",children:(0,Pa.jsx)(ft.X,{className:"h-4 w-4"})})]})]}),(0,Pa.jsx)(ge,{value:A.description||"",onChange:ae=>f({...A,description:ae.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Pa.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Pa.jsxs)("select",{value:A.confidence||b.confidence,onChange:ae=>f({...A,confidence:ae.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,Pa.jsx)("option",{value:"low",children:"Low"}),(0,Pa.jsx)("option",{value:"medium",children:"Medium"}),(0,Pa.jsx)("option",{value:"high",children:"High"})]})]}),(0,Pa.jsxs)("div",{children:[(0,Pa.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Pa.jsx)("select",{value:A.phase?.toString()||b.phase.toString(),onChange:ae=>f({...A,phase:parseInt(ae.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(ae=>(0,Pa.jsxs)("option",{value:ae.toString(),children:["Phase ",ae]},ae))})]})]})]}):(0,Pa.jsxs)(Pa.Fragment,{children:[(0,Pa.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Pa.jsx)("div",{className:`w-4 h-4 rounded-full ${b.color}`}),(0,Pa.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:b.name}),(0,Pa.jsxs)("div",{className:"flex gap-1",children:[(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>We(b),className:"p-1 h-8 w-8",children:(0,Pa.jsx)(ft.Edit2,{className:"h-3 w-3"})}),(0,Pa.jsx)(S,{size:"sm",variant:"ghost",onClick:()=>Ge(b.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Pa.jsx)(ft.Trash2,{className:"h-3 w-3"})})]})]}),(0,Pa.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Pa.jsxs)(K,{className:`text-xs ${Ke(b.confidence)}`,children:[b.confidence," confidence"]}),(0,Pa.jsxs)(K,{variant:"outline",className:"text-xs",children:["Phase ",b.phase]}),(0,Pa.jsxs)(K,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Y.length," tasks"]}),(0,Pa.jsxs)(K,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[he," pts"]})]}),b.description&&(0,Pa.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:b.description}),(0,Pa.jsxs)(S,{onClick:()=>{k(!0),re(b)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Pa.jsx)(ft.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Pa.jsx)("div",{className:"flex-1 p-4 overflow-Pa-auto",children:(0,Pa.jsx)("div",{className:`space-Pa-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${u?"border-primary bg-primary/10":"border-border"}`,children:Y.length===0?(0,Pa.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,Pa.jsx)(ft.Move,{className:"h-8 w-8 mb-2"}),(0,Pa.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):Y.map(ae=>(0,Pa.jsx)(wt,{task:ae,epic:b,onDragStart:Pe,onTaskClick:i,isCompact:!0},ae.id))})})]},b.id)})})})})]}),(0,Pa.jsx)(Ot,{isOpen:h,onClose:()=>I(!1),onAddEpic:c}),(0,Pa.jsx)(At,{isOpen:pe,onClose:()=>k(!1),onAddTask:n,assignees:[],epics:[],defaultEpicId:j?.id.toString()||"",sprints:a})]})};0&&(module.exports={DCProjectCard,EpicsView,KanbanBoardView,PlanningView,TasksView});
|