cortex-react-components 2.13.11 → 2.13.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (104) hide show
  1. package/dist/{chunk-TTSBUSVB.mjs → chunk-3AZ2XX4O.mjs} +1 -1
  2. package/dist/{chunk-XQ3XV5DH.mjs → chunk-6FHRZHAJ.mjs} +1 -1
  3. package/dist/{chunk-CJDUN6R4.mjs → chunk-DKRRVTCV.mjs} +1 -1
  4. package/dist/{chunk-RMGDXYJO.mjs → chunk-DXE6AGJX.mjs} +1 -1
  5. package/dist/{chunk-MDBYZZXI.mjs → chunk-ESPA7NWT.mjs} +1 -1
  6. package/dist/{chunk-3E3GY7S2.mjs → chunk-FDRX3CL2.mjs} +1 -1
  7. package/dist/chunk-JXQRVEQB.mjs +4 -0
  8. package/dist/{chunk-O24GFE6Q.mjs → chunk-KZAYLEFB.mjs} +1 -1
  9. package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
  10. package/dist/chunk-L5NPH5RX.mjs +1 -0
  11. package/dist/{chunk-CLGBBNRB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
  12. package/dist/{chunk-6VRPQKAK.mjs → chunk-MAZGVZJN.mjs} +1 -1
  13. package/dist/chunk-NAGBKKTZ.mjs +4 -0
  14. package/dist/{chunk-KVLUT4U2.mjs → chunk-OQCMTGML.mjs} +1 -1
  15. package/dist/{chunk-DPZHVBGG.mjs → chunk-RRME4EHD.mjs} +1 -1
  16. package/dist/{chunk-XOEYCVMT.mjs → chunk-RZET5RXO.mjs} +1 -1
  17. package/dist/{chunk-HSQAHQNP.mjs → chunk-TKCFCYEQ.mjs} +1 -1
  18. package/dist/{chunk-EUGA4BNN.mjs → chunk-TO7SVJIU.mjs} +1 -1
  19. package/dist/{chunk-ZGQC6O62.mjs → chunk-UEBQJNVT.mjs} +1 -1
  20. package/dist/chunk-UM57PWI7.mjs +1 -0
  21. package/dist/{chunk-AP6ZM2J6.mjs → chunk-UPDEVKI7.mjs} +1 -1
  22. package/dist/{chunk-2UNIT7NC.mjs → chunk-UPRS7OYQ.mjs} +1 -1
  23. package/dist/{chunk-R5SXUWYU.mjs → chunk-W2UVMIWN.mjs} +1 -1
  24. package/dist/components/Chat/ChatInterface.mjs +1 -1
  25. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  26. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  27. package/dist/components/Chat/demo-tests.mjs +1 -1
  28. package/dist/components/Chat/demo.mjs +1 -1
  29. package/dist/components/Chat/example-usage.mjs +1 -1
  30. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  31. package/dist/components/Chat/index.mjs +1 -1
  32. package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
  33. package/dist/components/DeliveryLead/index.mjs +1 -1
  34. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  35. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  36. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  37. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  38. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  39. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  40. package/dist/components/DigitalColleagues/index.js +1 -1
  41. package/dist/components/DigitalColleagues/index.mjs +1 -1
  42. package/dist/components/Foundary/MainPage.mjs +1 -1
  43. package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
  44. package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
  45. package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
  46. package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
  47. package/dist/components/Foundary/Views/TeamsIndexView.mjs +1 -1
  48. package/dist/components/Foundary/Views/index.js +1 -1
  49. package/dist/components/Foundary/Views/index.mjs +1 -1
  50. package/dist/components/Foundary/index.js +1 -1
  51. package/dist/components/Foundary/index.mjs +1 -1
  52. package/dist/components/HeaderFooter/Header.mjs +1 -1
  53. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  54. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  55. package/dist/components/HeaderFooter/index.mjs +1 -1
  56. package/dist/components/Heros/RenderHero.mjs +1 -1
  57. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  58. package/dist/components/Heros/index.mjs +1 -1
  59. package/dist/components/Other/index.mjs +1 -1
  60. package/dist/components/Projects/FileView.js +1 -1
  61. package/dist/components/Projects/FileView.mjs +1 -1
  62. package/dist/components/Projects/KanbanBoardView.d.ts +2 -2
  63. package/dist/components/Projects/KanbanBoardView.js +1 -1
  64. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  65. package/dist/components/Projects/ProjectPage.js +1 -1
  66. package/dist/components/Projects/ProjectPage.mjs +1 -1
  67. package/dist/components/Projects/ProjectView.js +1 -1
  68. package/dist/components/Projects/ProjectView.mjs +1 -1
  69. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  70. package/dist/components/Projects/TaskDetailsModal.d.ts +2 -2
  71. package/dist/components/Projects/TaskDetailsModal.js +1 -1
  72. package/dist/components/Projects/TaskDetailsModal.mjs +1 -1
  73. package/dist/components/Projects/file-list.js +1 -1
  74. package/dist/components/Projects/file-list.mjs +1 -1
  75. package/dist/components/Projects/index.js +1 -1
  76. package/dist/components/Projects/index.mjs +1 -1
  77. package/dist/components/dc-temp/index.js +1 -1
  78. package/dist/components/dc-temp/index.mjs +1 -1
  79. package/dist/components/index.js +11 -11
  80. package/dist/components/index.mjs +1 -1
  81. package/dist/index.js +16 -16
  82. package/dist/index.mjs +1 -1
  83. package/dist/metafile-cjs.json +1 -1
  84. package/dist/metafile-esm.json +1 -1
  85. package/dist/pages/Blog.mjs +1 -1
  86. package/dist/pages/Documentation.mjs +1 -1
  87. package/dist/pages/IndexPage.mjs +1 -1
  88. package/dist/pages/Intranet.mjs +1 -1
  89. package/dist/pages/LandingPage.mjs +1 -1
  90. package/dist/pages/Page.mjs +1 -1
  91. package/dist/pages/Publish.mjs +1 -1
  92. package/dist/pages/Website.mjs +1 -1
  93. package/dist/sections/AboutSection.mjs +1 -1
  94. package/dist/sections/BlogDetail.mjs +1 -1
  95. package/dist/sections/BlogList.mjs +1 -1
  96. package/dist/sections/PageSections.mjs +1 -1
  97. package/dist/sections/PricingSection.mjs +1 -1
  98. package/dist/sections/ServiceSection.mjs +1 -1
  99. package/dist/sections/index.mjs +1 -1
  100. package/package.json +1 -1
  101. package/dist/chunk-DSSHQ6K7.mjs +0 -4
  102. package/dist/chunk-F3CQJWDX.mjs +0 -1
  103. package/dist/chunk-IKZZNNKD.mjs +0 -4
  104. package/dist/chunk-XWDRWOIG.mjs +0 -1
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  "use client"
4
4
 
5
- "use strict";"use client";var kr=Object.create;var ka=Object.defineProperty;var Cr=Object.getOwnPropertyDescriptor;var Sr=Object.getOwnPropertyNames;var Dr=Object.getPrototypeOf,Tr=Object.prototype.hasOwnProperty;var Pr=(e,t)=>{for(var a in t)ka(e,a,{get:t[a],enumerable:!0})},Fo=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Sr(t))!Tr.call(e,i)&&i!==a&&ka(e,i,{get:()=>t[i],enumerable:!(o=Cr(t,i))||o.enumerable});return e};var ce=(e,t,a)=>(a=e!=null?kr(Dr(e)):{},Fo(t||!e||!e.__esModule?ka(a,"default",{value:e,enumerable:!0}):a,e)),Rr=e=>Fo(ka({},"__esModule",{value:!0}),e);var jn={};Pr(jn,{default:()=>or});module.exports=Rr(jn);var Ao=require("react"),Ya=require("motion/react");var $o=require("clsx");var ao="-",Ar=e=>{let t=Ir(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:d=>{let r=d.split(ao);return r[0]===""&&r.length!==1&&r.shift(),zo(r,t)||Er(d)},getConflictingClassGroupIds:(d,r)=>{let u=a[d]||[];return r&&o[d]?[...u,...o[d]]:u}}},zo=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),i=o?zo(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let n=e.join(ao);return t.validators.find(({validator:d})=>d(n))?.classGroupId},Lo=/^\[(.+)\]$/,Er=e=>{if(Lo.test(e)){let t=Lo.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Ir=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Br(Object.entries(e.classGroups),a).forEach(([n,d])=>{to(d,o,n,t)}),o},to=(e,t,a,o)=>{e.forEach(i=>{if(typeof i=="string"){let n=i===""?t:Oo(t,i);n.classGroupId=a;return}if(typeof i=="function"){if(Mr(i)){to(i(o),t,a,o);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([n,d])=>{to(d,Oo(t,n),a,o)})})},Oo=(e,t)=>{let a=e;return t.split(ao).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Mr=e=>e.isThemeGetter,Br=(e,t)=>t?e.map(([a,o])=>{let i=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([d,r])=>[t+d,r])):n);return[a,i]}):e,Fr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,i=(n,d)=>{a.set(n,d),t++,t>e&&(t=0,o=a,a=new Map)};return{get(n){let d=a.get(n);if(d!==void 0)return d;if((d=o.get(n))!==void 0)return i(n,d),d},set(n,d){a.has(n)?a.set(n,d):i(n,d)}}},Uo="!",Lr=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,i=t[0],n=t.length,d=r=>{let u=[],m=0,c=0,g;for(let h=0;h<r.length;h++){let z=r[h];if(m===0){if(z===i&&(o||r.slice(h,h+n)===t)){u.push(r.slice(c,h)),c=h+n;continue}if(z==="/"){g=h;continue}}z==="["?m++:z==="]"&&m--}let D=u.length===0?r:r.substring(c),k=D.startsWith(Uo),y=k?D.substring(1):D,P=g&&g>c?g-c:void 0;return{modifiers:u,hasImportantModifier:k,baseClassName:y,maybePostfixModifierPosition:P}};return a?r=>a({className:r,parseClassName:d}):d},Or=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},zr=e=>({cache:Fr(e.cacheSize),parseClassName:Lr(e),...Ar(e)}),Ur=/\_o+/,jr=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:i}=t,n=[],d=e.trim().split(Ur),r="";for(let u=d.length-1;u>=0;u-=1){let m=d[u],{modifiers:c,hasImportantModifier:g,baseClassName:D,maybePostfixModifierPosition:k}=a(m),y=!!k,P=o(y?D.substring(0,k):D);if(!P){if(!y){r=m+(r.length>0?" "+r:r);continue}if(P=o(D),!P){r=m+(r.length>0?" "+r:r);continue}y=!1}let h=Or(c).join(":"),z=g?h+Uo:h,j=z+P;if(n.includes(j))continue;n.push(j);let w=i(P,y);for(let T=0;T<w.length;++T){let Q=w[T];n.push(z+Q)}r=m+(r.length>0?" "+r:r)}return r};function Vr(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=jo(t))&&(o&&(o+=" "),o+=a);return o}var jo=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=jo(e[o]))&&(a&&(a+=" "),a+=t);return a};function Hr(e,...t){let a,o,i,n=d;function d(u){let m=t.reduce((c,g)=>g(c),e());return a=zr(m),o=a.cache.get,i=a.cache.set,n=r,r(u)}function r(u){let m=o(u);if(m)return m;let c=jr(u,a);return i(u,c),c}return function(){return n(Vr.apply(null,arguments))}}var ve=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Vo=/^\[(?:([a-z-]+):)?(.+)\]$/i,Gr=/^\d+\/\d+$/,$r=new Set(["px","full","screen"]),Wr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_r=/\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$/,Kr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,wt=e=>Xt(e)||$r.has(e)||Gr.test(e),Rt=e=>Yt(e,"length",on),Xt=e=>!!e&&!Number.isNaN(Number(e)),eo=e=>Yt(e,"number",Xt),ca=e=>!!e&&Number.isInteger(Number(e)),Xr=e=>e.endsWith("%")&&Xt(e.slice(0,-1)),W=e=>Vo.test(e),At=e=>Wr.test(e),Yr=new Set(["length","size","percentage"]),Qr=e=>Yt(e,Yr,Ho),Zr=e=>Yt(e,"position",Ho),en=new Set(["image","url"]),tn=e=>Yt(e,en,nn),an=e=>Yt(e,"",rn),ma=()=>!0,Yt=(e,t,a)=>{let o=Vo.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},on=e=>_r.test(e)&&!Kr.test(e),Ho=()=>!1,rn=e=>qr.test(e),nn=e=>Jr.test(e);var sn=()=>{let e=ve("colors"),t=ve("spacing"),a=ve("blur"),o=ve("brightness"),i=ve("borderColor"),n=ve("borderRadius"),d=ve("borderSpacing"),r=ve("borderWidth"),u=ve("contrast"),m=ve("grayscale"),c=ve("hueRotate"),g=ve("invert"),D=ve("gap"),k=ve("gradientColorStops"),y=ve("gradientColorStopPositions"),P=ve("inset"),h=ve("margin"),z=ve("opacity"),j=ve("padding"),w=ve("saturate"),T=ve("scale"),Q=ve("sepia"),C=ve("skew"),V=ve("space"),_=ve("translate"),I=()=>["auto","contain","none"],ie=()=>["auto","hidden","clip","visible","scroll"],me=()=>["auto",W,t],A=()=>[W,t],ye=()=>["",wt,Rt],f=()=>["auto",Xt,W],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],Ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ke=()=>["start","end","center","between","around","evenly","stretch"],pt=()=>["","0",W],ot=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[Xt,W];return{cacheSize:500,separator:":",theme:{colors:[ma],spacing:[wt,Rt],blur:["none","",At,W],brightness:N(),borderColor:[e],borderRadius:["none","","full",At,W],borderSpacing:A(),borderWidth:ye(),contrast:N(),grayscale:pt(),hueRotate:N(),invert:pt(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[Xr,Rt],inset:me(),margin:me(),opacity:N(),padding:A(),saturate:N(),scale:N(),sepia:pt(),skew:N(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",W]}],container:["container"],columns:[{columns:[At]}],"break-after":[{"break-after":ot()}],"break-before":[{"break-before":ot()}],"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:[...Z(),W]}],overflow:[{overflow:ie()}],"overflow-x":[{"overflow-x":ie()}],"overflow-y":[{"overflow-y":ie()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ca,W]}],basis:[{basis:me()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",W]}],grow:[{grow:pt()}],shrink:[{shrink:pt()}],order:[{order:["first","last","none",ca,W]}],"grid-cols":[{"grid-cols":[ma]}],"col-start-end":[{col:["auto",{span:["full",ca,W]},W]}],"col-start":[{"col-start":f()}],"col-end":[{"col-end":f()}],"grid-rows":[{"grid-rows":[ma]}],"row-start-end":[{row:["auto",{span:[ca,W]},W]}],"row-start":[{"row-start":f()}],"row-end":[{"row-end":f()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",W]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",W]}],gap:[{gap:[D]}],"gap-x":[{"gap-x":[D]}],"gap-y":[{"gap-y":[D]}],"justify-content":[{justify:["normal",...ke()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ke(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ke(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],pe:[{pe:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],It:[{It:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[V]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[V]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",W,t]}],"min-w":[{"min-w":[W,t,"min","max","fit"]}],"max-w":[{"max-w":[W,t,"none","full","min","max","fit","prose",{screen:[At]},At]}],h:[{h:[W,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[W,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[W,t,"auto","min","max","fit"]}],"font-size":[{text:["base",At,Rt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",eo]}],"font-family":[{font:[ma]}],"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",W]}],"line-clamp":[{"line-clamp":["none",Xt,eo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",wt,W]}],"list-image":[{"list-image":["none",W]}],"list-style-type":[{list:["none","disc","decimal",W]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[z]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",wt,Rt]}],"underline-offset":[{"underline-offset":["auto",wt,W]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",W]}],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",W]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[z]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),Zr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","_o","tl"]},tn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[k]}],"gradient-via":[{via:[k]}],"gradient-to":[{to:[k]}],rounded:[{rounded:[n]}],"rounded-_o":[{"rounded-_o":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-_o":[{"rounded-_o":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-y":[{"border-y":[r]}],"border-w-_o":[{"border-_o":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-_o":[{"border-_o":[r]}],"border-opacity":[{"border-opacity":[z]}],"border-style":[{border:[...H(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[z]}],"divide-style":[{divide:H()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-_o":[{"border-_o":[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-_o":[{"border-_o":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...H()]}],"outline-offset":[{"outline-offset":[wt,W]}],"outline-w":[{outline:[wt,Rt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ye()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[z]}],"ring-offset-w":[{"ring-offset":[wt,Rt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",At,an]}],"shadow-color":[{shadow:[ma]}],opacity:[{opacity:[z]}],"mix-blend":[{"mix-blend":[...Ue(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ue()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",At,W]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[g]}],saturate:[{saturate:[w]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[z]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",W]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",W]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",W]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[T]}],"scale-x":[{"scale-x":[T]}],"scale-y":[{"scale-y":[T]}],rotate:[{rotate:[ca,W]}],"translate-x":[{"translate-x":[_]}],"translate-y":[{"translate-y":[_]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",W]}],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","_o-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",W]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-It":[{"scroll-It":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",W]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[wt,Rt,eo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","It","mr","mb","ml"],mx:["mr","ml"],my:["It","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-_o","rounded-e","rounded-t","rounded-r","rounded-b","rounded-_o","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-_o":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-_o":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-_o","border-w-e","border-w-t","border-w-r","border-w-b","border-w-_o"],"border-w-x":["border-w-r","border-w-_o"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-_o","border-color-e","border-color-t","border-color-r","border-color-b","border-color-_o"],"border-color-x":["border-color-r","border-color-_o"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-It","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-It","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Go=Hr(sn);function v(...e){return Go((0,$o.clsx)(e))}var Ma=ce(require("react")),no=ce(require("next/link")),It=require("lucide-react");var Wo=require("class-variance-authority");var _o=require("react/jsx-runtime"),ln=(0,Wo.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function se({className:e,variant:t,...a}){return(0,_o.jsx)("div",{className:v(ln({variant:t}),e),...a})}var Ko=require("@radix-ui/react-slot"),Jo=ce(require("react")),Ca=(0,Wo.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"}}}),x=Jo.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...i},n)=>(0,_o.jsx)(e?Ko.Slot:"button",{className:v(Ca({className:t,size:a,variant:o})),ref:n,...i}));x.displayName="Button";var Yo=ce(require("react"));var re=Yo.forwardRef(({className:e,type:t,...a},o)=>(0,_o.jsx)("input",{type:t,className:v("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));re.displayName="Input";var oo=ce(require("react")),rt=ce(require("@radix-ui/react-scroll-area"));var Qt=oo.forwardRef(({className:e,children:t,...a},o)=>(0,_o.jsxs)(rt.Root,{ref:o,className:v("relative overflow-hidden",e),...a,children:[(0,_o.jsx)(rt.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,_o.jsx)(Zo,{}),(0,_o.jsx)(rt.Corner,{})]}));Qt.displayName=rt.Root.displayName;var Zo=oo.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,_o.jsx)(rt.ScrollAreaScrollbar,{ref:o,orientation:t,className:v("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-_o border-_o-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,_o.jsx)(rt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Zo.displayName=rt.ScrollAreaScrollbar.displayName;var pa=ce(require("react")),Ae=ce(require("@radix-ui/react-dialog"));var Je=Ae.Root;var dn=Ae.Portal;var ti=pa.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Ae.Overlay,{ref:a,className:v("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ti.displayName=Ae.Overlay.displayName;var Ve=pa.forwardRef(({className:e,children:t,...a},o)=>(0,_o.jsxs)(dn,{children:[(0,_o.jsx)(ti,{}),(0,_o.jsxs)(Ae.Content,{ref:o,className:v("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-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,_o.jsxs)(Ae.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,_o.jsx)(It.X,{className:"h-4 w-4"}),(0,_o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ve.displayName=Ae.Content.displayName;var He=({className:e,...t})=>(0,_o.jsx)("div",{className:v("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});He.displayName="DialogHeader";var ua=({className:e,...t})=>(0,_o.jsx)("div",{className:v("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ua.displayName="DialogFooter";var Ge=pa.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Ae.Title,{ref:a,className:v("text-lg font-semibold leading-none tracking-tight",e),...t}));Ge.displayName=Ae.Title.displayName;var cn=pa.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Ae.Description,{ref:a,className:v("text-sm text-muted-foreground",e),...t}));cn.displayName=Ae.Description.displayName;var ga=ce(require("@radix-ui/react-checkbox")),oi=ce(require("react")),io=oi.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(ga.Root,{className:v("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,_o.jsx)(ga.Indicator,{className:v("flex items-center justify-center text-current"),children:(0,_o.jsx)(It.Check,{className:"h-4 w-4"})})}));io.displayName=ga.Root.displayName;var ft=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),ri=[{id:"home",title:"Home",icon:(0,$e.jsx)(It.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,$e.jsx)(It.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,$e.jsx)(It.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with _o",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,$e.jsx)(It.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,$e.jsx)(It.FileText,{}),url:"/knowledge"}],ni=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what'_o new",onAction:()=>console.log("See what'_o new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],si=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,$e.jsx)(It.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,$e.jsx)(It.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,$e.jsx)(It.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,$e.jsx)(It.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,$e.jsx)(It.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,$e.jsx)(It.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,$e.jsx)(It.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,$e.jsx)(It.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,$e.jsx)(It.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,$e.jsx)(It.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Pa=[{id:"1",name:"_o-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var ro=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Da=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Aa=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],mn=[...Aa,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],pn=[...Pa,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Ta={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},ii={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Aa.filter(e=>e.epicId==="1")};var Ds={empty:{initialProjects:Ta.projects,initialEpics:Ta.epics,initialSprints:Ta.sprints,initialTasks:Ta.tasks},default:{initialProjects:Pa,initialEpics:ro,initialSprints:Da,initialTasks:Aa},highDensity:{initialProjects:Pa,initialEpics:ro,initialSprints:Da,initialTasks:mn},singleEpic:{initialProjects:Pa,initialEpics:ii.epics,initialSprints:Da,initialTasks:ii.tasks},multipleProjects:{initialProjects:pn,initialEpics:ro,initialSprints:Da,initialTasks:Aa}},Ra=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(ft),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(ft),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(ft),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(ft),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","_o","Statistics"].map(ft),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(ft),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(ft),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(ft),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(ft),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(ft),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Ts=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Ra.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Ra.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Ra.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Ps=Ra.filter(e=>e.type==="digital");function Ia(e,t){let[a,o]=(0,Ao.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{o(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,Ao.useEffect)(()=>{i(a)},[]),[a,i]}function so({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:i=si[0],onBusinessUnitChange:n,onSearch:d,className:r,logo:u="/headerlogo.png",appName:m="Nuvia",tagline:c="Collaboration Platform"}){let[g,D]=Ma.useState({}),[k,y]=Ia("sidebar-favorites",{}),[P,h]=Ma.useState(null),[z,j]=Ma.useState(""),w=f=>{D(Z=>({...Z,[f]:!Z[f]}))},T=f=>{n?.(f)},Q=()=>{z.trim()&&d?.(z.trim())},C=f=>{f.key==="Enter"&&(f.preventDefault(),Q())},V=(f,Z)=>{let H=k[f]||[],Ue=H.includes(Z)?H.filter(ke=>ke!==Z):H.concat(Z);y({...k,[f]:Ue})},_=f=>{if(!f.items||!f.maxItems||f.items.length<=f.maxItems)return f.items||[];let Z=k[f.id]||[],H=f.items.filter(ke=>Z.includes(ke.id)),Ue=f.items.filter(ke=>!Z.includes(ke.id));return[...H,...Ue].slice(0,f.maxItems)},I=f=>f.maxItems&&f.items&&f.items.length>f.maxItems,ie=e,me=f=>{let Z=I(f),H=_(f),Ue=(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[f.icon,(0,_o.jsx)("span",{children:f.title})]}),f.badge&&(0,_o.jsx)(se,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:f.badge}),f.items&&(0,_o.jsx)(It.ChevronDown,{className:v("ml-2 h-4 w-4 transition-transform",g[f.title]?"rotate-180":"")})]}),ke=v("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",f.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return f.url?(0,_o.jsx)(no.default,{href:f.url,className:ke,onClick:a?o:void 0,children:Ue}):(0,_o.jsx)("button",{className:ke,onClick:()=>f.items&&w(f.title),children:Ue})},A=()=>{let f=e.find(H=>H.id===P);if(!f||!f.items||!f.maxItems)return null;let Z=k[f.id]||[];return(0,_o.jsx)(Je,{open:!!P,onOpenChange:H=>!H&&h(null),children:(0,_o.jsxs)(Ve,{className:"sm:max-w-md",children:[(0,_o.jsxs)(He,{children:[(0,_o.jsxs)(Ge,{children:["Manage ",f.title," Favorites"]}),(0,_o.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",f.maxItems," items to show in ",f.title.toLowerCase(),"."]})]}),(0,_o.jsx)(Qt,{className:"max-h-96 pr-4",children:(0,_o.jsx)("div",{className:"space-y-4",children:f.items.map(H=>(0,_o.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_o.jsx)(io,{id:H.id,checked:Z.includes(H.id),onCheckedChange:()=>V(f.id,H.id),disabled:!Z.includes(H.id)&&Z.length>=(f.maxItems||0)}),(0,_o.jsxs)("label",{htmlFor:H.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[H.title,H.badge&&(0,_o.jsx)(se,{variant:"outline",className:"text-xs",children:H.badge})]})]},H.id))})})]})})},ye=(0,_o.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_o.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,_o.jsx)("img",{src:u,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)("h2",{className:"font-semibold",children:m}),(0,_o.jsx)("p",{className:"text-xs text-muted-foreground",children:c})]})]}),a&&(0,_o.jsx)(x,{variant:"ghost",size:"icon",onClick:o,children:(0,_o.jsx)(It.X,{className:"h-5 w-5"})})]}),(0,_o.jsx)("div",{className:"px-3 py-2",children:(0,_o.jsxs)("div",{className:"relative",children:[(0,_o.jsx)(It.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,_o.jsx)(re,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:z,onChange:f=>j(f.target.value),onKeyPress:C})]})}),(0,_o.jsx)(Qt,{className:"flex-1 px-3 py-2",children:(0,_o.jsx)("div",{className:"space-y-1",children:ie.map(f=>(0,_o.jsxs)("div",{className:"mb-1",children:[me(f),f.items&&g[f.title]&&(0,_o.jsxs)("div",{className:"It-1 ml-6 space-y-1 border-_o pl-3",children:[_(f).map(Z=>(0,_o.jsxs)(no.default,{href:Z.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[Z.title,Z.badge&&(0,_o.jsx)(se,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:Z.badge})]},Z.id)),I(f)&&f.items&&f.items.length>_(f).length&&(0,_o.jsxs)("button",{onClick:()=>h(f.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",f.items.length-_(f).length," more available"]})]})]},f.id))})}),(0,_o.jsx)("div",{className:"p-3",children:(0,_o.jsx)("div",{className:"space-y-1",children:(0,_o.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,_o.jsx)(It.Settings,{className:"h-5 w-5"}),(0,_o.jsx)("span",{children:"Settings"})]})})}),(0,_o.jsx)(A,{})]});return a?(0,_o.jsx)("div",{className:v("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:ye}):(0,_o.jsx)("div",{className:v("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:ye})}var Ba=ce(require("react")),Nt=ce(require("@radix-ui/react-avatar"));var fa=Ba.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Nt.Root,{ref:a,className:v("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));fa.displayName=Nt.Root.displayName;var lo=Ba.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Nt.Image,{ref:a,className:v("aspect-square h-full w-full",e),...t}));lo.displayName=Nt.Image.displayName;var va=Ba.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Nt.Fallback,{ref:a,className:v("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));va.displayName=Nt.Fallback.displayName;var li=ce(require("react")),ut=ce(require("@radix-ui/react-tooltip"));var La=ut.Provider,Oa=ut.Root,za=ut.Trigger,ba=li.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,_o.jsx)(ut.Portal,{children:(0,_o.jsx)(ut.Content,{ref:o,sideOffset:t,className:v("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));ba.displayName=ut.Content.displayName;var di=require("next-themes");function ci(){let{setTheme:e,theme:t}=(0,di.useTheme)();return(0,_o.jsx)(La,{children:(0,_o.jsxs)(Oa,{children:[(0,_o.jsx)(za,{asChild:!0,children:(0,_o.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,_o.jsx)(It.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,_o.jsx)(It.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,_o.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,_o.jsx)(ba,{children:"Toggle theme"})]})})}function mi({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:i,className:n}){let d=e.filter(m=>!m.read),r=d.length,u=m=>{switch(m){case"info":return(0,_o.jsx)(It.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,_o.jsx)(It.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,_o.jsx)(It.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,_o.jsx)(It.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,_o.jsx)(Ya.AnimatePresence,{children:t&&(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(Ya.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,_o.jsx)(Ya.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:v("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-_o bg-background shadow-lg md:w-96",n),children:(0,_o.jsxs)("div",{className:"flex h-full flex-col",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)(It.Bell,{className:"h-5 w-5"}),(0,_o.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,_o.jsxs)(se,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,_o.jsxs)(x,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,_o.jsx)(It.X,{className:"h-5 w-5"}),(0,_o.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,_o.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,_o.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"_o":""]}),(0,_o.jsx)(x,{variant:"ghost",size:"sm",onClick:i,className:"text-sm",children:"Dismiss all"})]}),d.length>0?(0,_o.jsx)(Qt,{className:"flex-1",children:(0,_o.jsx)("div",{className:"divide-y",children:d.map(m=>(0,_o.jsxs)("div",{className:v("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,_o.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:u(m.type)}),(0,_o.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("p",{className:"font-medium",children:m.title}),(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("p",{className:"text-xs text-muted-foreground",children:m.time}),(0,_o.jsx)(x,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(m.id),title:"Dismiss",children:(0,_o.jsx)(It.Check,{className:"h-3 w-3"})})]})]}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,_o.jsxs)(x,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,_o.jsx)(It.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},m.id))})}):(0,_o.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,_o.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,_o.jsx)(It.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,_o.jsx)("h3",{className:"It-4 text-lg font-medium",children:"No notifications"}),(0,_o.jsx)("p",{className:"It-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Vt=ce(require("@radix-ui/react-tabs"));function pi({className:e,...t}){return(0,_o.jsx)(Vt.Root,{"data-slot":"tabs",className:v("flex flex-col gap-2",e),...t})}function ui({className:e,...t}){return(0,_o.jsx)(Vt.List,{"data-slot":"tabs-list",className:v("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function gi({className:e,...t}){return(0,_o.jsx)(Vt.Trigger,{"data-slot":"tabs-trigger",className:v("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var kt=ce(require("react")),J=ce(require("@radix-ui/react-dropdown-menu")),Zt=require("@radix-ui/react-icons");var fi=J.Root,vi=J.Trigger;var un=kt.forwardRef(({className:e,inset:t,children:a,...o},i)=>(0,_o.jsxs)(J.SubTrigger,{ref:i,className:v("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,_o.jsx)(Zt.ChevronRightIcon,{className:"ml-auto"})]}));un.displayName=J.SubTrigger.displayName;var gn=kt.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(J.SubContent,{ref:a,className:v("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));gn.displayName=J.SubContent.displayName;var mo=kt.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,_o.jsx)(J.Portal,{children:(0,_o.jsx)(J.Content,{ref:o,sideOffset:t,className:v("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));mo.displayName=J.Content.displayName;var po=kt.forwardRef(({className:e,inset:t,...a},o)=>(0,_o.jsx)(J.Item,{ref:o,className:v("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));po.displayName=J.Item.displayName;var fn=kt.forwardRef(({className:e,children:t,checked:a,...o},i)=>(0,_o.jsxs)(J.CheckboxItem,{ref:i,className:v("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,_o.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,_o.jsx)(J.ItemIndicator,{children:(0,_o.jsx)(Zt.CheckIcon,{className:"h-4 w-4"})})}),t]}));fn.displayName=J.CheckboxItem.displayName;var vn=kt.forwardRef(({className:e,children:t,...a},o)=>(0,_o.jsxs)(J.RadioItem,{ref:o,className:v("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,_o.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,_o.jsx)(J.ItemIndicator,{children:(0,_o.jsx)(Zt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));vn.displayName=J.RadioItem.displayName;var bn=kt.forwardRef(({className:e,inset:t,...a},o)=>(0,_o.jsx)(J.Label,{ref:o,className:v("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));bn.displayName=J.Label.displayName;var hn=kt.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(J.Separator,{ref:a,className:v("-mx-1 my-1 h-px bg-muted",e),...t}));hn.displayName=J.Separator.displayName;var yn=({className:e,...t})=>(0,_o.jsx)("span",{className:v("ml-auto text-xs tracking-widest opacity-60",e),...t});yn.displayName="DropdownMenuShortcut";function Va({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:i="700px",gridCols:n=6}){let d=a.find(r=>r.value===e);return(0,_o.jsxs)(Ya.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,_o.jsx)("div",{className:"hidden lg:block",children:(0,_o.jsx)(pi,{value:e,onValueChange:t,children:(0,_o.jsx)(ui,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:i,gridTemplateColumns:`repeat(${Math.min(n,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,_o.jsx)(Ya.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,_o.jsx)(gi,{value:r.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:r.label})},r.value))})})}),(0,_o.jsx)("div",{className:"lg:hidden",children:(0,_o.jsxs)(fi,{children:[(0,_o.jsx)(vi,{asChild:!0,children:(0,_o.jsxs)(x,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[d?.label||"Select",(0,_o.jsx)(It.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,_o.jsx)(mo,{align:"center",className:"w-[180px]",children:a.map(r=>(0,_o.jsx)(po,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function hi({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:i=!0,className:n,activeTab:d="assistant",onTabChange:r,showTabs:u=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:c,actionIcon:g=(0,_o.jsx)(It.Bot,{className:"mr-2 h-4 w-4"}),actionText:D="Action",onNotificationRemove:k,onRemoveAll:y,logo:P="/headerlogo.png",appName:h="Nuvia",tagline:z="Collaboration Platform"}){let[j,w]=(0,Ao.useState)(!1),[T,Q]=(0,Ao.useState)(t),C=T.filter(I=>!I.read).length,V=I=>{Q(ie=>ie.filter(me=>me.id!==I)),k?.(I)},_=()=>{Q(I=>I.filter(ie=>ie.read)),y?.()};return(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${n||""}`,children:[(0,_o.jsx)(x,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,_o.jsx)(It.Menu,{className:"h-5 w-5"})}),(0,_o.jsx)(x,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,_o.jsx)(It.PanelLeft,{className:"h-5 w-5"})}),!i&&(0,_o.jsxs)(Ya.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,_o.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,_o.jsx)("img",{src:P,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)("h2",{className:"font-semibold text-sm",children:h}),(0,_o.jsx)("p",{className:"text-xs text-muted-foreground",children:z})]})]}),(0,_o.jsxs)("div",{className:"flex flex-1 items-center",children:[u&&(0,_o.jsx)(Va,{activeTab:d,onTabChange:r,tabOptions:m}),(0,_o.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,_o.jsx)(Ya.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,_o.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,_o.jsxs)(x,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:c,children:[g,D]})})}),(0,_o.jsx)(ci,{}),(0,_o.jsx)(La,{children:(0,_o.jsxs)(Oa,{children:[(0,_o.jsx)(za,{asChild:!0,children:(0,_o.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,_o.jsxs)(x,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>w(!0),children:[(0,_o.jsx)(Ya.motion.div,{animate:C>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:C>0?1/0:0,repeatDelay:3},children:(0,_o.jsx)(It.Bell,{className:"h-5 w-5"})}),C>0&&(0,_o.jsx)(Ya.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:C})]})})}),(0,_o.jsx)(ba,{children:"Notifications"})]})}),(0,_o.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,_o.jsxs)(fa,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,_o.jsx)(lo,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,_o.jsx)(va,{})]})})]})]})]}),(0,_o.jsx)(mi,{notifications:T,open:j,onClose:()=>w(!1),onNotificationRemove:V,onRemoveAll:_})]})}var yi=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,_o.jsx)(It.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function wi({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:i=yi[0],onBusinessUnitChange:n,onSearch:d,businessUnits:r=yi,activeTab:u,onTabChange:m,showTabs:c=!1,onActionClick:g,actionIcon:D,actionText:k="Action",onNotificationRemove:y,onRemoveAll:P,logo:h="/headerlogo.png",appName:z="Nuvia",tagline:j="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[T,Q]=(0,Ao.useState)(!w),[C,V]=(0,Ao.useState)(!1),[_,I]=(0,Ao.useState)(i),ie=me=>{I(me),n?.(me)};return(0,_o.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[C&&(0,_o.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>V(!1)}),(0,_o.jsx)("div",{className:"md:hidden",children:(0,_o.jsx)(so,{items:e,isOpen:C,isMobile:!0,onClose:()=>V(!1),currentBusinessUnit:_,onBusinessUnitChange:ie,onSearch:d,logo:h,appName:z,tagline:j})}),(0,_o.jsx)("div",{className:"hidden md:block",children:(0,_o.jsx)(so,{items:e,isOpen:T,isMobile:!1,currentBusinessUnit:_,onBusinessUnitChange:ie,onSearch:d,logo:h,appName:z,tagline:j})}),(0,_o.jsxs)("div",{className:v("min-h-screen fixed w-full transition-all duration-300 ease-in-out",T?"md:pl-64":"md:pl-0"),children:[(0,_o.jsx)(hi,{title:a,notifications:o,onToggleSidebar:()=>Q(!T),onToggleMobileMenu:()=>V(!0),sidebarOpen:T,activeTab:u,onTabChange:m,showTabs:c,onActionClick:g,actionIcon:D,actionText:k,onNotificationRemove:y,onRemoveAll:P,logo:h,appName:z,tagline:j}),(0,_o.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var xn=[{key:"kanban",icon:It.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:It.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:It.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:It.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:It.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],Ni=({currentView:e,onViewChange:t,children:a})=>(0,_o.jsxs)("div",{className:"flex w-full h-screen",children:[(0,_o.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:xn.map(o=>{let i=o.icon,n=e===o.key;return(0,_o.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${n?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,_o.jsx)(i,{className:"h-4 w-4 flex-shrink-0"}),(0,_o.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,_o.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,_o.jsx)("div",{className:"w-full h-full",children:a})})]});var Ht=ce(require("react"));var be=Ht.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:v("rounded-xl border bg-card text-card-foreground shadow",e),...t}));be.displayName="Card";var wn=Ht.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:v("flex flex-col space-y-1.5 p-6",e),...t}));wn.displayName="CardHeader";var Nn=Ht.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:v("font-semibold leading-none tracking-tight",e),...t}));Nn.displayName="CardTitle";var kn=Ht.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:v("text-sm text-muted-foreground",e),...t}));kn.displayName="CardDescription";var ea=Ht.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:v("p-6 pt-0",e),...t}));ea.displayName="CardContent";var Cn=Ht.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:v("flex items-center p-6 pt-0",e),...t}));Cn.displayName="CardFooter";var ki=({title:e,status:t,taskCount:a,children:o,onDrop:i,isCompact:n=!1,height:d})=>{let r=c=>{c.preventDefault()},u=c=>{c.preventDefault(),i(t)};return(0,$t.jsxs)(be,{className:`p-4 bg-card border-_o-4 ${(()=>{switch(t){case"todo":return"border-_o-gray-400";case"in-progress":return"border-_o-blue-500";case"review":return"border-_o-orange-500";case"done":return"border-_o-green-500";default:return"border-_o-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${n?"lg:max-w-xs":""}`,style:{height:d||"calc(100vh - 350px)"},onDragOver:r,onDrop:u,children:[(0,$t.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,$t.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${n?"text-base":"text-lg"}`,children:e}),(0,$t.jsx)(se,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,$t.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var ya=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:i=!1})=>{let n=c=>{a(e)},d=()=>{o(e)},r=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},u=()=>{switch(e.type){case"story":return(0,_o.jsx)(It.BookOpen,{className:"h-3 w-3"});case"bug":return(0,_o.jsx)(It.Bug,{className:"h-3 w-3"});case"spike":return(0,_o.jsx)(It.Zap,{className:"h-3 w-3"});case"task":default:return(0,_o.jsx)(It.AlertCircle,{className:"h-3 w-3"})}},m=()=>{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,_o.jsx)(be,{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:d,children:(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${m()}`,children:u()}),(0,_o.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,_o.jsxs)(be,{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:d,children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,_o.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${m()}`,children:[u(),(0,_o.jsx)("span",{className:"capitalize",children:e.type})]}),(0,_o.jsxs)("div",{className:"flex gap-1",children:[(0,_o.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${r()}`,children:e.priority}),(0,_o.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,_o.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,_o.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,_o.jsx)(It.User,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:e.assignee?.value?.name})]}),(0,_o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,_o.jsx)(It.Calendar,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var Ci=ce(require("react")),Oe=Ci.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("textarea",{className:v("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}));Oe.displayName="Textarea";var X=ce(require("@radix-ui/react-select")),Ft=ce(require("react")),Qe=X.Root;var gt=X.Value,We=Ft.forwardRef(({children:e,className:t,...a},o)=>(0,_o.jsxs)(X.Trigger,{className:v("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,_o.jsx)(X.Icon,{asChild:!0,children:(0,_o.jsx)(It.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));We.displayName=X.Trigger.displayName;var Di=Ft.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(X.ScrollUpButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,_o.jsx)(It.ChevronUp,{className:"h-4 w-4"})}));Di.displayName=X.ScrollUpButton.displayName;var Ti=Ft.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(X.ScrollDownButton,{className:v("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,_o.jsx)(It.ChevronDown,{className:"h-4 w-4"})}));Ti.displayName=X.ScrollDownButton.displayName;var _e=Ft.forwardRef(({children:e,className:t,position:a="popper",...o},i)=>(0,_o.jsx)(X.Portal,{children:(0,_o.jsxs)(X.Content,{className:v("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:i,...o,children:[(0,_o.jsx)(Di,{}),(0,_o.jsx)(X.Viewport,{className:v("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,_o.jsx)(Ti,{})]})}));_e.displayName=X.Content.displayName;var Sn=Ft.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(X.Label,{className:v("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Sn.displayName=X.Label.displayName;var he=Ft.forwardRef(({children:e,className:t,...a},o)=>(0,_o.jsxs)(X.Item,{className:v("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,_o.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,_o.jsx)(X.ItemIndicator,{children:(0,_o.jsx)(It.Check,{className:"h-4 w-4"})})}),(0,_o.jsx)(X.ItemText,{children:e})]}));he.displayName=X.Item.displayName;var Dn=Ft.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(X.Separator,{className:v("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Dn.displayName=X.Separator.displayName;var Pi=ce(require("react")),fo=ce(require("@radix-ui/react-label"));var Tn=(0,Wo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),B=Pi.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(fo.Root,{ref:a,className:v(Tn(),e),...t}));B.displayName=fo.Root.displayName;var _t=ce(require("react")),ta=ce(require("@radix-ui/react-toggle-group"));var Ei=ce(require("react")),vo=ce(require("@radix-ui/react-toggle"));var bo=(0,Wo.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"}}),Pn=Ei.forwardRef(({className:e,variant:t,size:a,...o},i)=>(0,_o.jsx)(vo.Root,{ref:i,className:v(bo({variant:t,size:a,className:e})),...o}));Pn.displayName=vo.Root.displayName;var Bi=_t.createContext({size:"default",variant:"default"}),Kt=_t.forwardRef(({className:e,variant:t,size:a,children:o,...i},n)=>(0,_o.jsx)(ta.Root,{ref:n,className:v("flex items-center justify-center gap-1",e),...i,children:(0,_o.jsx)(Bi.Provider,{value:{variant:t,size:a},children:o})}));Kt.displayName=ta.Root.displayName;var qt=_t.forwardRef(({className:e,children:t,variant:a,size:o,...i},n)=>{let d=_t.useContext(Bi);return(0,_o.jsx)(ta.Item,{ref:n,className:v(bo({variant:d.variant||a,size:d.size||o}),e),...i,children:t})});qt.displayName=ta.Item.displayName;var Rn=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:It.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:It.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:It.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:It.Zap}],An=[{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"}],aa=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:i,assignees:n,defaultEpicId:d})=>{let[r,u]=(0,Ao.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,Ao.useEffect)(()=>{e&&d&&u(g=>({...g,epic:d}))},[e,d]),(0,Ao.useEffect)(()=>{e&&u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:d||"",sprint:"none",assignee:""})},[e]);let m=g=>{g.preventDefault(),r.name.trim()&&(a({name:r.name.trim(),description:r.description.trim(),status:"todo",priority:r.priority,type:r.type,storyPoints:r.storyPoints,epic:Number(r.epic),sprint:Number(r.sprint),assignee:r.assignee.trim()?{relationTo:"digital-colleagues",value:Number(r.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:d||"",sprint:"",assignee:""}),t())},c=(g,D)=>{u(k=>({...k,[g]:D}))};return(0,_o.jsx)(Je,{open:e,onOpenChange:t,children:(0,_o.jsxs)(Ve,{className:"sm:max-w-md",children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(Ge,{children:"Add New Task"})}),(0,_o.jsxs)("form",{onSubmit:m,className:"space-y-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"name",children:"Task Title"}),(0,_o.jsx)(re,{id:"name",value:r.name,onChange:g=>c("name",g.target.value),placeholder:"Enter task title",required:!0})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"description",children:"Description"}),(0,_o.jsx)(Oe,{id:"description",value:r.description,onChange:g=>c("description",g.target.value),placeholder:"Enter task description",rows:3})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Type"}),(0,_o.jsx)(Kt,{type:"single",value:r.type||"",onValueChange:g=>g&&c("type",g),children:Rn.map(g=>{let D=g.icon;return(0,_o.jsxs)(qt,{value:g.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,_o.jsx)(D,{className:"h-4 w-4"}),g.label]},g.value)})})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Priority"}),(0,_o.jsx)(Kt,{type:"single",value:r.priority||"",onValueChange:g=>g&&c("priority",g),children:An.map(g=>(0,_o.jsx)(qt,{value:g.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:g.label},g.value))})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"points",children:"Story Points"}),(0,_o.jsx)(re,{id:"points",type:"number",min:"1",max:"100",value:r.storyPoints,onChange:g=>c("storyPoints",parseInt(g.target.value)||1),placeholder:"Enter story points",required:!0})]}),!d&&(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"epic",children:"Epic"}),(0,_o.jsxs)(Qe,{value:r.epic,onValueChange:g=>c("epic",g),children:[(0,_o.jsx)(We,{children:(0,_o.jsx)(gt,{placeholder:"Select an epic"})}),(0,_o.jsx)(_e,{children:o.map(g=>(0,_o.jsx)(he,{value:g.id.toString(),children:(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${g.color}`}),g.name]})},g.id))})]})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,_o.jsxs)(Qe,{value:r.sprint,onValueChange:g=>c("sprint",g),children:[(0,_o.jsx)(We,{children:(0,_o.jsx)(gt,{placeholder:"Select a sprint"})}),(0,_o.jsxs)(_e,{children:[(0,_o.jsx)(he,{value:"none",children:"No Sprint"}),i.map(g=>(0,_o.jsx)(he,{value:g.id.toString(),children:(0,_o.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"sprint",children:"Assignee"}),(0,_o.jsxs)(Qe,{value:r.assignee,onValueChange:g=>c("assignee",g),children:[(0,_o.jsx)(We,{children:(0,_o.jsx)(gt,{placeholder:"Select an Assignee"})}),(0,_o.jsxs)(_e,{children:[(0,_o.jsx)(he,{value:"none",children:"No Assignee"}),n.map(g=>(0,_o.jsx)(he,{value:g.id.toString(),children:(0,_o.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,_o.jsxs)(ua,{children:[(0,_o.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,_o.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var yo=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:i,className:n="",disabled:d=!1})=>{let[r,u]=(0,Ao.useState)(!1),[m,c]=(0,Ao.useState)(""),g=()=>{d||(u(!0),c(t))},D=async()=>{m!==t&&await i(e,m),u(!1)},k=y=>{y.key==="Enter"&&!o||y.key==="Enter"&&y.ctrlKey&&o?D():y.key==="Escape"&&(u(!1),c(""))};return(0,_o.jsxs)("div",{className:`space-y-2 ${n}`,children:[(0,_o.jsx)(B,{children:a}),r?o?(0,_o.jsx)(Oe,{value:m,onChange:y=>c(y.target.value),onBlur:D,onKeyDown:k,autoFocus:!0,rows:4,className:"resize-none"}):(0,_o.jsx)(re,{value:m,onChange:y=>c(y.target.value),onBlur:D,onKeyPress:k,autoFocus:!0,className:"text-lg font-medium"}):(0,_o.jsxs)("div",{onClick:g,className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,_o.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!d&&(0,_o.jsx)(It.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Oi=({comments:e,onAddComment:t})=>{let[a,o]=(0,Ao.useState)(""),i=d=>d.split(" ").map(r=>r[0]).join("").toUpperCase(),n=()=>{a.trim()&&(t(a),o(""))};return(0,_o.jsxs)("div",{className:"space-y-4",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)($a.MessageSquare,{className:"h-5 w-5"}),(0,_o.jsx)(B,{className:"text-lg font-medium",children:"Comments"}),(0,_o.jsx)(se,{variant:"secondary",children:e.length})]}),(0,_o.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(d=>(0,_o.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,_o.jsx)(fa,{className:"h-8 w-8 It-1",children:(0,_o.jsx)(va,{className:"text-xs bg-muted text-muted-foreground",children:i(d.author)})}),(0,_o.jsxs)("div",{className:"flex-1",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,_o.jsx)("span",{className:"font-medium text-sm",children:d.author}),(0,_o.jsxs)("span",{className:"text-xs text-muted-foreground",children:[d.createdAt.toLocaleDateString()," _o ",d.createdAt.toLocaleTimeString()]})]}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground",children:d.text})]})]},d.id))}),(0,_o.jsxs)("div",{className:"flex gap-2",children:[(0,_o.jsx)(Oe,{value:a,onChange:d=>o(d.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,_o.jsx)(x,{onClick:n,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,_o.jsx)($a.Send,{className:"h-4 w-4"})})]})]})};var Wa=({label:e,value:t,onValueChange:a,options:o,showColor:i=!1,disabled:n=!1})=>{let[d,r]=(0,Ao.useState)(!1),u=o.find(c=>c.value===t);return(0,_o.jsxs)("div",{className:"space-y-1",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:e}),(0,_o.jsxs)(Qe,{value:t,onValueChange:a,open:d,onOpenChange:c=>{n||r(c)},disabled:n,children:[(0,_o.jsx)(We,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,_o.jsxs)(se,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&r(!d),children:[i&&u?.color&&(0,_o.jsx)("div",{className:`w-2 h-2 rounded-full ${u.color} mr-1`}),u?.label||"Select..."]})}),(0,_o.jsx)(_e,{children:o.map(c=>(0,_o.jsx)(he,{value:c.value,children:i&&c.color?(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.label]}):c.label},c.value))})]})]})};var Ui=({label:e,value:t,onValueChange:a,options:o,placeholder:i="Search...",allowCustomValue:n=!1,disabled:d=!1})=>{let[r,u]=(0,Ao.useState)(!1),[m,c]=(0,Ao.useState)(""),g=o.find(h=>h.value===t),D=o.filter(h=>h.label.toLowerCase().includes(m.toLowerCase())),k=h=>{a(h),u(!1),c("")},y=()=>{n&&m.trim()&&!o.find(h=>h.value===m.trim())&&(a(m.trim()),u(!1),c(""))};return(0,_o.jsxs)("div",{className:"space-y-1",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:e}),(0,_o.jsxs)(Qe,{value:t,onValueChange:k,open:r,onOpenChange:h=>{d||u(h)},disabled:d,children:[(0,_o.jsx)(We,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,_o.jsx)(se,{variant:"secondary",className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!d&&u(!r),children:g?.label||t||"Select..."})}),(0,_o.jsxs)(_e,{children:[(0,_o.jsx)("div",{className:"p-2",children:(0,_o.jsx)(re,{placeholder:i,value:m,onChange:h=>c(h.target.value),onKeyDown:h=>{h.key==="Enter"&&n&&y()},className:"mb-2"})}),D.map(h=>(0,_o.jsx)(he,{value:h.value,children:h.label},h.value)),n&&m.trim()&&!D.find(h=>h.value===m.trim())&&(0,_o.jsxs)(he,{value:m.trim(),children:['Add "',m.trim(),'"']})]})]})]})};var Se=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var En=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:It.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:It.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:It.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:It.Zap}],In=[{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 ji=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:i,onClose:n,onDelete:d,isUpdating:r=!1,isDeleting:u=!1,deleteState:m="idle",teamMembers:c})=>{let[g,D]=(0,Ao.useState)(e.storyPoints),k=(0,Ao.useRef)(null),[y,P]=(0,Ao.useState)(c);(0,Ao.useEffect)(()=>{P(c)},[c]);let h=(0,Ao.useCallback)((w,T)=>{k.current&&clearTimeout(k.current),k.current=setTimeout(()=>{i(w,T)},500)},[i]);(0,Ao.useEffect)(()=>{h("storyPoints",g?.toString()||"1")},[g]);let z=w=>w.split(" ").map(T=>T[0]).join("").toUpperCase(),j=()=>m==="loading"?(0,_o.jsxs)(x,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,_o.jsx)(It.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):m==="success"?(0,_o.jsxs)(x,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,_o.jsx)(It.Check,{className:"h-3 w-3"}),"Deleted"]}):m==="error"?(0,_o.jsxs)(x,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,_o.jsx)(It.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,_o.jsxs)(x,{onClick:d,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:r||u,children:[(0,_o.jsx)(It.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,_o.jsxs)("div",{className:"flex flex-col h-full",children:[(0,_o.jsxs)("div",{className:"space-y-4",style:{opacity:r?.6:1},children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Status"}),(0,_o.jsx)(Wa,{label:"",value:e.status,onValueChange:w=>i("status",w),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:r})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Type"}),(0,_o.jsx)(Kt,{type:"single",value:e.type||"",onValueChange:w=>w&&i("type",w),className:"grid grid-cols-2 gap-1",disabled:r,children:En.map(w=>{let T=w.icon;return(0,_o.jsxs)(qt,{value:w.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:r,children:[(0,_o.jsx)(T,{className:"h-3 w-3"}),w.label]},w.value)})})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,_o.jsx)(Kt,{type:"single",value:e.priority||"",onValueChange:w=>w&&i("priority",w),className:"grid grid-cols-3 gap-1",disabled:r,children:In.map(w=>(0,_o.jsx)(qt,{value:w.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:r,children:w.label},w.value))})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,_o.jsx)("input",{type:"number",min:"1",max:"100",value:g||1,onChange:w=>{let T=Number(w.target.value);T<1?D(1):T>100?D(100):D(T)},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:r})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,_o.jsx)(Wa,{label:"",value:Se(e.epic).toString(),onValueChange:w=>i("epic",w),options:(t||[]).map(w=>({value:w.id.toString(),label:w?.name,color:w.color})),showColor:!0,disabled:r})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,_o.jsx)(Wa,{label:"",value:Se(e.sprint).toString()||"none",onValueChange:w=>i("sprint",w==="none"?"":w),options:[{value:"none",label:"No Sprint"},...(a||[]).map(w=>({value:w.id.toString(),label:`${w?.name}`}))],disabled:r})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,_o.jsx)(Ui,{label:"",value:e.assignee?.value?.name,onValueChange:w=>i("assignee",w),options:y.map(w=>({value:`${typeof w.email=="string"?"users":"digital-colleagues"}:${w.id}`,label:w?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:r})]})]}),(0,_o.jsxs)("div",{className:"It-auto pt-4 space-y-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(x,{onClick:n,variant:"outline",className:"w-full h-8 text-xs",disabled:r||u,children:"Close"}),j()]}),(0,_o.jsxs)("div",{className:"pt-4 border-t border-border space-y-2",children:[(0,_o.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,_o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,_o.jsx)(It.User,{className:"h-3 w-3"}),(0,_o.jsx)("span",{children:"System"})]})]}),(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,_o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,_o.jsx)(It.Calendar,{className:"h-3 w-3"}),(0,_o.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,_o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,_o.jsx)(It.Clock,{className:"h-3 w-3"}),(0,_o.jsxs)("span",{children:[new Date(o).toLocaleDateString()," _o"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Vi=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:i,onUpdateTask:n,onDeleteTask:d,onAddComment:r,colleagues:u})=>{let[m,c]=(0,Ao.useState)(a),[g,D]=(0,Ao.useState)(new Date),[k,y]=(0,Ao.useState)("idle"),[P,h]=(0,Ao.useState)("idle"),[z,j]=(0,Ao.useState)([]),[w,T]=(0,Ao.useState)(u);(0,Ao.useEffect)(()=>{c(a)},[a]);let Q=async(A,ye)=>{if(ye!==m[A]){y("loading");try{let f=await n(m.id.toString(),{[A]:ye});c(f),D(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch(f){console.log("error",f),y("error"),setTimeout(()=>y("idle"),3e3)}}},C=async(A,ye)=>{if(ye!==m[A]){y("loading");try{let f=await n(m.id.toString(),{[A]:ye});c(f),D(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch(f){console.log("error",f),y("error"),setTimeout(()=>y("idle"),3e3)}}},V=async A=>{if(r){y("loading");try{let ye=await r?.({content:A,taskId:m.id.toString()});c(ye),D(new Date),y("success"),setTimeout(()=>y("idle"),1500)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}}},_=async()=>{h("loading");try{await d(m.id.toString()),h("success"),setTimeout(()=>{t(),h("idle")},1e3)}catch{h("error"),setTimeout(()=>h("idle"),3e3)}},I=k!=="loading"&&P!=="loading",ie=()=>{I&&t()},me=()=>k==="loading"?(0,_o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,_o.jsx)(It.Loader2,{className:"h-4 w-4 animate-spin"}),(0,_o.jsx)("span",{children:"Updating..."})]}):k==="success"?(0,_o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,_o.jsx)(It.Check,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:"Updated successfully"})]}):k==="error"?(0,_o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,_o.jsx)(It.X,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:"Update failed"})]}):null;return(0,_o.jsx)(Je,{open:e,onOpenChange:ie,children:(0,_o.jsxs)(Ve,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,_o.jsxs)(He,{children:[(0,_o.jsx)(Ge,{className:"sr-only",children:m.name}),(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("div",{className:"flex-1",children:me()}),!I&&(0,_o.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,_o.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,_o.jsx)(yo,{fieldName:"name",value:m.name||"",label:"",onSave:Q,className:"border-b border-border pb-3",disabled:k==="loading"}),(0,_o.jsx)(yo,{fieldName:"description",value:m.description||"",label:"Description",multiline:!0,onSave:Q,disabled:k==="loading"}),(0,_o.jsx)(Oi,{comments:(m?.comments||[]).map(A=>({author:A.author.value.name||"",createdAt:new Date(A.timestamp),text:A.text,id:A.id||""})),onAddComment:V})]}),(0,_o.jsx)(ji,{task:m,epics:o,sprints:i,lastUpdated:g,onUpdateTask:C,onClose:ie,onDelete:_,isUpdating:k==="loading",isDeleting:P==="loading",deleteState:P,teamMembers:w})]})]})})};var ia=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,i]=(0,Ao.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"],d=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],r=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],u=c=>{c.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),i({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},m=(c,g)=>{i(D=>({...D,[c]:g}))};return(0,$.jsx)(Je,{open:e,onOpenChange:t,children:(0,$.jsxs)(Ve,{className:"sm:max-w-md",children:[(0,$.jsx)(He,{children:(0,$.jsx)(Ge,{children:"Add New Epic"})}),(0,$.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(B,{htmlFor:"name",children:"Epic Name"}),(0,$.jsx)(re,{id:"name",value:o.name,onChange:c=>m("name",c.target.value),placeholder:"Enter epic name",required:!0})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(B,{htmlFor:"description",children:"Description"}),(0,$.jsx)(Oe,{id:"description",value:o.description,onChange:c=>m("description",c.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(B,{children:"Color"}),(0,$.jsx)("div",{className:"flex gap-2 flex-wrap",children:n.map(c=>(0,$.jsx)("button",{type:"button",onClick:()=>m("color",c),className:`w-8 h-8 rounded-full ${c} ${o.color===c?"ring-2 ring-gray-400":""}`},c))})]}),(0,$.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(B,{children:"Confidence"}),(0,$.jsxs)(Qe,{value:o.confidence,onValueChange:c=>m("confidence",c),children:[(0,$.jsx)(We,{children:(0,$.jsx)(gt,{})}),(0,$.jsx)(_e,{children:d.map(c=>(0,$.jsx)(he,{value:c.value,children:c.label},c.value))})]})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(B,{children:"Phase"}),(0,$.jsxs)(Qe,{value:o.phase.toString(),onValueChange:c=>m("phase",parseInt(c)),children:[(0,$.jsx)(We,{children:(0,$.jsx)(gt,{})}),(0,$.jsx)(_e,{children:r.map(c=>(0,$.jsx)(he,{value:c.value.toString(),children:c.label},c.value))})]})]})]}),(0,$.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(B,{children:"Start Date"}),(0,$.jsx)(re,{type:"date",value:o.startDate,onChange:c=>m("startDate",c.target.value)})]}),(0,$.jsxs)("div",{className:"space-y-2",children:[(0,$.jsx)(B,{children:"End Date"}),(0,$.jsx)(re,{type:"date",value:o.endDate,onChange:c=>m("endDate",c.target.value)})]})]}),(0,$.jsxs)(ua,{children:[(0,$.jsx)(x,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,$.jsx)(x,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var _a=require("react-icons/fa");function ht({title:e,description:t,badge:a,primaryAction:o,secondaryAction:i,gradient:n,children:d,className:r}){let[u,m]=Ia(`hero-section-minimized-${e.replace(/\_o+/g,"-").toLowerCase()}`,!i&&!t),c=!i&&!t||u;return(0,_o.jsxs)(Ya.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${r||""}`,children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,_o.jsx)(se,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,_o.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[c&&o&&(0,_o.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(i||t)&&(0,_o.jsx)("button",{"aria-label":u?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>m(!u),style:{lineHeight:0},children:u?(0,_o.jsx)(_a.FaChevronDown,{size:22}):(0,_o.jsx)(_a.FaChevronUp,{size:22})})]})]}),!c&&(0,_o.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,_o.jsxs)("div",{className:"space-y-4",children:[(0,_o.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,_o.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,_o.jsx)(x,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),i&&(0,_o.jsx)(x,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),d&&(0,_o.jsx)("div",{className:"hidden lg:block",children:d})]})]})}var $i=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:i=[],initialProjects:n=[],onAddTask:d,onUpdateTask:r,onDeleteTask:u,onTaskClick:m,onAddEpic:c,onAddComment:g})=>{let[D,k]=(0,Ao.useState)(e),[y,P]=(0,Ao.useState)(t),[h,z]=(0,Ao.useState)(a),[j,w]=(0,Ao.useState)(!1),[T,Q]=(0,Ao.useState)(!1),[C,V]=(0,Ao.useState)(null),[_,I]=(0,Ao.useState)(null),[ie,me]=(0,Ao.useState)(o),[A,ye]=(0,Ao.useState)(i),[f,Z]=(0,Ao.useState)(0),H=(0,Ao.useRef)(null),Ue=(0,Ao.useRef)(null),ke=y.filter(L=>!0).map(L=>L.id),pt=h.find(L=>L.isSelected);ke.push(0),(0,Ao.useEffect)(()=>{k(e)},[e]),(0,Ao.useEffect)(()=>{P(t)},[t]),(0,Ao.useEffect)(()=>{z(a)},[a]),(0,Ao.useEffect)(()=>{ye(i)},[i]),(0,Ao.useEffect)(()=>{let L=()=>{if(H.current){let Be=H.current.offsetHeight;Z(Be)}};L();let de=new ResizeObserver(L);H.current&&de.observe(H.current);let ue=()=>{setTimeout(L,100)};return window.addEventListener("storage",ue),()=>{de.disconnect(),window.removeEventListener("storage",ue)}},[]),(0,Ao.useEffect)(()=>{let L=setTimeout(()=>{H.current&&Z(H.current.offsetHeight)},300);return()=>clearTimeout(L)},[j,T]);let ot=D.filter(L=>!0),N=L=>ot.filter(de=>de.status===L),Y=L=>{let de={};return y.forEach(ue=>{de[ue.id]=L.filter(Be=>Se(Be.epic)===ue.id)}),de["no-epic"]=L.filter(ue=>!Se(ue.epic)),de},q=L=>{I(L)},it=L=>{_&&(k(de=>de.map(ue=>ue.id===_.id?{...ue,status:L}:ue)),r?.(_.id.toString(),{status:L}),I(null))},pe=L=>{let de={...L,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};k(ue=>[...ue,de]),d?.(L)},tt=async(L,de)=>{if(k(Be=>Be.map(je=>je.id===Number(L)?{...je,...de}:je)),r)return await r(L,de);let ue=D.find(Be=>Be.id===Number(L));if(!ue)throw new Error("Task not found");return{...ue,...de}},na=async L=>{k(de=>de.filter(ue=>ue.id!==Number(L))),C?.id===Number(L)&&V(null),u&&await u(L)},xt=L=>{let de={...L,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};P(ue=>[...ue,de]),c?.(L)},Jt=L=>{V(L),m?.(L)},Pt=[{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=f>0?`calc(100vh - ${f+120}px)`:"calc(100vh - 12rem)";return(0,_o.jsxs)("div",{ref:Ue,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,_o.jsx)("div",{ref:H,className:"flex-shrink-0",children:(0,_o.jsx)(ht,{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:()=>w(!0)},secondaryAction:{label:"Add epic",onClick:()=>Q(!0)}})}),(0,_o.jsx)("div",{className:"flex-1 min-h-0 It-8",children:(0,_o.jsx)("div",{className:"h-full",style:{height:f>0?`calc(100vh - ${f+120}px)`:"calc(100vh - 12rem)"},children:(0,_o.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:Pt.map(L=>{let de=N(L.status),ue=Y(de);return(0,_o.jsxs)(ki,{title:L.title,status:L.status,taskCount:de.length,onDrop:it,isCompact:L.status==="done",height:Ut,children:[ue["no-epic"].map(Be=>(0,_o.jsx)(ya,{epic:null,task:Be,onDragStart:q,onTaskClick:Jt,isCompact:L.status==="done"})),ke.map(Be=>{let je=y.find(S=>S.id===Be),p=ue[Be]||[];return p.length===0?null:(0,_o.jsxs)("div",{className:"mb-6",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${je?.color}`}),(0,_o.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:je?.name||"No Epic"}),(0,_o.jsx)(se,{variant:"secondary",className:"text-xs",children:p.length})]})," ",(0,_o.jsx)("div",{className:"space-y-3",children:p.map(S=>(0,_o.jsx)(ya,{task:S,epic:je,onDragStart:q,onTaskClick:Jt,isCompact:L.status==="done"},S.id))})]},Be)})]},L.id)})})})}),(0,_o.jsx)(aa,{isOpen:j,onClose:()=>w(!1),onAddTask:pe,assignees:[...A,...ie],epics:y,sprints:h}),(0,_o.jsx)(ia,{isOpen:T,onClose:()=>Q(!1),onAddEpic:xt}),C&&(0,_o.jsx)(Vi,{isOpen:!!C,onClose:()=>V(null),initialTask:C,epics:y,sprints:h,onUpdateTask:tt,onDeleteTask:na,colleagues:A,onAddComment:g})]})};var Wi=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddTaskToEpic:n,onAddEpic:d,onUpdateEpic:r,onDeleteEpic:u})=>{let[m,c]=(0,Ao.useState)(t),[g,D]=(0,Ao.useState)(null),[k,y]=(0,Ao.useState)(null),[P,h]=(0,Ao.useState)({}),[z,j]=(0,Ao.useState)(0),[w,T]=(0,Ao.useState)(!1),[Q,C]=(0,Ao.useState)(!1),[V,_]=(0,Ao.useState)(null),I=(0,Ao.useRef)(null),ie=(0,Ao.useRef)(null);(0,Ao.useEffect)(()=>{c(t)},[t]),(0,Ao.useEffect)(()=>{let N=()=>{if(I.current){let it=I.current.offsetHeight;j(it)}};N();let Y=new ResizeObserver(N);I.current&&Y.observe(I.current);let q=()=>{setTimeout(N,100)};return window.addEventListener("storage",q),()=>{Y.disconnect(),window.removeEventListener("storage",q)}},[]),(0,Ao.useEffect)(()=>{let N=setTimeout(()=>{I.current&&j(I.current.offsetHeight)},300);return()=>clearTimeout(N)},[k]);let me=N=>{D(N)},A=N=>{N.preventDefault()},ye=(N,Y)=>{N.preventDefault(),g&&Se(g.epic).toString()!==Y&&(o(g.id.toString(),{epic:Number(Y)}),D(null))},f=N=>e.filter(Y=>Se(Y.epic).toString()===N),Z=N=>{y(N.id.toString()),h({name:N.name,description:N.description,confidence:N.confidence,phase:N.phase})},H=async()=>{k&&P.name&&(await r(k.toString(),P),c(N=>N.map(Y=>Y.id.toString()===k?{...Y,...P}:Y)),y(null),h({}))},Ue=()=>{y(null),h({})},ke=async N=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await u(N),c(Y=>Y.filter(q=>q.id.toString()!==N)))},pt=N=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[N]||`Phase ${N}`,ot=N=>{switch(N){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,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsxs)("div",{ref:ie,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,_o.jsx)("div",{ref:I,className:"flex-shrink-0",children:(0,_o.jsx)(ht,{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:()=>T(!0)}})}),(0,_o.jsx)("div",{className:"flex-1 min-h-0 It-8",children:(0,_o.jsx)("div",{className:"h-full overflow-y-auto",style:{height:z>0?`calc(100vh - ${z+120}px)`:"calc(100vh - 12rem)"},children:(0,_o.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:m.map(N=>{let Y=f(N.id.toString()),q=Y.reduce((pe,tt)=>pe+(tt.storyPoints||0),0),it=z>0?`calc(100vh - ${z+200}px)`:"calc(100vh - 14rem)";return(0,_o.jsxs)(be,{className:`flex flex-col ${k===N.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:k===N.id.toString()?"auto":it,minHeight:"400px"},onDragOver:A,onDrop:pe=>ye(pe,N.id.toString()),children:[(0,_o.jsx)("div",{className:"p-4 border-b border-border",children:k===N.id.toString()?(0,_o.jsxs)("div",{className:"space-y-4",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)(re,{value:P.name||"",onChange:pe=>h({...P,name:pe.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,_o.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,_o.jsx)(x,{size:"sm",variant:"ghost",onClick:H,className:"p-1 h-8 w-8",children:(0,_o.jsx)(It.Check,{className:"h-4 w-4"})}),(0,_o.jsx)(x,{size:"sm",variant:"ghost",onClick:Ue,className:"p-1 h-8 w-8",children:(0,_o.jsx)(It.X,{className:"h-4 w-4"})})]})]}),(0,_o.jsx)(Oe,{value:P.description||"",onChange:pe=>h({...P,description:pe.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,_o.jsxs)("select",{value:P.confidence||N.confidence,onChange:pe=>h({...P,confidence:pe.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,_o.jsx)("option",{value:"low",children:"Low"}),(0,_o.jsx)("option",{value:"medium",children:"Medium"}),(0,_o.jsx)("option",{value:"high",children:"High"})]})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,_o.jsx)("select",{value:P.phase?.toString()||N.phase.toString(),onChange:pe=>h({...P,phase:parseInt(pe.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(pe=>(0,_o.jsxs)("option",{value:pe.toString(),children:["Phase ",pe]},pe))})]})]})]}):(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,_o.jsx)("div",{className:`w-4 h-4 rounded-full ${N.color}`}),(0,_o.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:N.name}),(0,_o.jsxs)("div",{className:"flex gap-1",children:[(0,_o.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>Z(N),className:"p-1 h-8 w-8",children:(0,_o.jsx)(It.Edit2,{className:"h-3 w-3"})}),(0,_o.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>ke(N.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,_o.jsx)(It.Trash2,{className:"h-3 w-3"})})]})]}),(0,_o.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,_o.jsxs)(se,{className:`text-xs ${ot(N.confidence)}`,children:[N.confidence," confidence"]}),(0,_o.jsxs)(se,{variant:"outline",className:"text-xs",children:["Phase ",N.phase]}),(0,_o.jsxs)(se,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Y.length," tasks"]}),(0,_o.jsxs)(se,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[q," pts"]})]}),N.description&&(0,_o.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:N.description}),(0,_o.jsxs)(x,{onClick:()=>{C(!0),_(N)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,_o.jsx)(It.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,_o.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,_o.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:Y.length===0?(0,_o.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,_o.jsx)(It.Move,{className:"h-8 w-8 mb-2"}),(0,_o.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):Y.map(pe=>(0,_o.jsx)(ya,{task:pe,epic:N,onDragStart:me,onTaskClick:i,isCompact:!0},pe.id))})})]},N.id)})})})})]}),(0,_o.jsx)(ia,{isOpen:w,onClose:()=>T(!1),onAddEpic:d}),(0,_o.jsx)(aa,{isOpen:Q,onClose:()=>C(!1),onAddTask:n,assignees:[],epics:[],defaultEpicId:V?.id.toString()||"",sprints:a})]})};var _i=require("react-day-picker");function Ka({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,_o.jsx)(_i.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:v("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:v(Ca({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full It-2",cell:v("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-_o-md first:[&:has([aria-selected])]:rounded-_o-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:v(Ca({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Ka.displayName="Calendar";var qi=ce(require("react")),yt=ce(require("@radix-ui/react-popover"));var No=yt.Root,ko=yt.Trigger;var qa=qi.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},i)=>(0,_o.jsx)(yt.Portal,{children:(0,_o.jsx)(yt.Content,{ref:i,align:t,sideOffset:a,className:v("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));qa.displayName=yt.Content.displayName;var So=require("date-fns");var Xi=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,i]=(0,Ao.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),n=r=>{r.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),i({name:"",description:"",startDate:void 0,endDate:void 0}),t())},d=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,_o.jsx)(Je,{open:e,onOpenChange:d,children:(0,_o.jsxs)(Ve,{className:"sm:max-w-md",children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(Ge,{children:"Add New Sprint"})}),(0,_o.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"name",children:"Sprint Name *"}),(0,_o.jsx)(re,{id:"name",value:o.name,onChange:r=>i(u=>({...u,name:r.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"description",children:"Description"}),(0,_o.jsx)(Oe,{id:"description",value:o.description,onChange:r=>i(u=>({...u,description:r.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Start Date *"}),(0,_o.jsxs)(No,{children:[(0,_o.jsx)(ko,{asChild:!0,children:(0,_o.jsxs)(x,{variant:"outline",className:v("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,_o.jsx)(It.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,So.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,_o.jsx)(qa,{className:"w-auto p-0",align:"start",children:(0,_o.jsx)(Ka,{mode:"single",selected:o.startDate,onSelect:r=>i(u=>({...u,startDate:r})),initialFocus:!0})})]})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"End Date *"}),(0,_o.jsxs)(No,{children:[(0,_o.jsx)(ko,{asChild:!0,children:(0,_o.jsxs)(x,{variant:"outline",className:v("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,_o.jsx)(It.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,So.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,_o.jsx)(qa,{className:"w-auto p-0",align:"start",children:(0,_o.jsx)(Ka,{mode:"single",selected:o.endDate,onSelect:r=>i(u=>({...u,endDate:r})),initialFocus:!0,disabled:r=>o.startDate?r<o.startDate:!1})})]})]})]}),(0,_o.jsxs)("div",{className:"flex justify-end gap-3 pt-4",children:[(0,_o.jsx)(x,{type:"button",variant:"outline",onClick:d,children:"Cancel"}),(0,_o.jsx)(x,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Yi=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddSprint:n,onUpdateSprint:d,onDeleteSprint:r})=>{let[u,m]=(0,Ao.useState)([]),[c,g]=(0,Ao.useState)(new Set),[D,k]=(0,Ao.useState)(null),[y,P]=(0,Ao.useState)(!1),[h,z]=(0,Ao.useState)(null),[j,w]=(0,Ao.useState)(null),[T,Q]=(0,Ao.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[C,V]=(0,Ao.useState)([]),[_,I]=(0,Ao.useState)("upcoming"),[ie,me]=(0,Ao.useState)(!1),[A,ye]=(0,Ao.useState)(0),f=(0,Ao.useRef)(null),Z=(0,Ao.useRef)(null);(0,Ao.useEffect)(()=>{let p=()=>{f.current&&ye(f.current.offsetHeight)};p();let S=new ResizeObserver(p);return f.current&&S.observe(f.current),()=>S.disconnect()},[]);let H=p=>t.find(S=>S.id===Number(p)),Ue=p=>a.find(S=>S.id===Number(p)),ke=p=>{let S={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 S[p]||S.medium},pt=p=>{if(!p||p?.length===0)return"";let S=p?.trim().split(" ");if(S?.length===1)return S[0];let ee=S[0],ne=S[S.length-1][0].toUpperCase();return`${ee} ${ne}`},ot=p=>{let S={},ee=[];return p.forEach(ne=>{ne.epic?(S[Se(ne.epic)]||(S[Se(ne.epic)]=[]),S[Se(ne.epic)].push(ne)):ee.push(ne)}),{tasksByEpic:S,unassignedTasks:ee}};(0,Ao.useEffect)(()=>{V(a)},[a]);let N=C.filter(p=>{switch(_){default:return!0}}),Y=C.filter(p=>u.includes(p.id.toString())),q=e.filter(p=>!p.sprint||p.status==="backlog"),it=q.reduce((p,S)=>p+(S.storyPoints||0),0),pe=p=>{m(S=>S.includes(p)?S.filter(ee=>ee!==p):S?.length<3?[...S,p]:S)},tt=p=>{g(S=>{let ee=new Set(S);return ee.has(p)?ee.delete(p):ee.add(p),ee})},na=p=>{n(p),P(!1)},xt=p=>{w(p.id.toString()),Q({name:p.name,description:p.description||"",startDate:p.startDate?new Date(p.startDate).toISOString().split("T")[0]:p.startDate,endDate:p.endDate?new Date(p.endDate).toISOString().split("T")[0]:p.endDate,isActive:!1})},Jt=()=>{j&&(d(j,{name:T.name,description:T.description,startDate:T.startDate,endDate:T.endDate}),V(p=>p.map(S=>(S.id===Number(j)&&(S.name=T.name,S.description=T.description,S.startDate=T.startDate,S.endDate=T.endDate),S))),w(null))},Pt=()=>{w(null),Q({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Ut=(p,S)=>{k(S),p.dataTransfer.effectAllowed="move"},L=p=>{p.preventDefault(),p.dataTransfer.dropEffect="move"},de=p=>{z(p)},ue=()=>{z(null)},Be=(p,S)=>{if(p.preventDefault(),z(null),!D)return;(Se(D.sprint)||void 0)!==Number(S)&&o(D.id.toString(),{sprint:Number(S)}),k(null)},je=({task:p,showSprint:S=!1})=>{let ee=p.epic?H(Se(p.epic).toString()):null,ne=p.sprint?Ue(Se(p.sprint).toString()):null;return(0,_o.jsx)(be,{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:qe=>{qe.dataTransfer.effectAllowed="move",qe.dataTransfer.setData("text/plain",p.id.toString()),Ut(qe,p)},onClick:qe=>{D===null&&i(p)},style:{userSelect:"none"},children:(0,_o.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,_o.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,_o.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:p.name}),(0,_o.jsx)(se,{className:`text-xs ${ke(p.priority||"medium")}`,children:p.priority?.[0]?.toUpperCase()})]}),(0,_o.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-1",children:[ee&&(0,_o.jsx)("div",{className:`w-2 h-2 rounded-full ${ee.color}`}),(0,_o.jsx)("span",{className:"text-muted-foreground truncate",children:ee?.name})]}),(0,_o.jsx)("span",{className:"text-muted-foreground",children:pt(p.assignee?.value?.name)})]}),S&&ne&&(0,_o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,_o.jsx)(It.Calendar,{className:"h-3 w-3"}),(0,_o.jsx)("span",{children:ne.name})]})]})})};return(0,_o.jsxs)("div",{ref:Z,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,_o.jsx)("div",{ref:f,className:"flex-shrink-0",children:(0,_o.jsx)(ht,{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:()=>P(!0)}})}),(0,_o.jsx)("div",{className:"flex-1 min-h-0 It-8",children:(0,_o.jsxs)("div",{className:"h-full",style:{height:A>0?`calc(100vh - ${A+120}px)`:"calc(100vh - 12rem)"},children:[(0,_o.jsxs)("div",{className:"mb-4",children:[(0,_o.jsx)(be,{className:"p-3 bg-card shadow-sm",children:(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,_o.jsxs)("p",{className:"text-xs text-muted-foreground",children:[u?.length,"/3 selected"]})]}),u?.length>0&&(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,_o.jsx)("div",{className:"flex flex-wrap gap-1",children:Y.map(p=>(0,_o.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,_o.jsx)("span",{className:"max-w-[80px] truncate",children:p.name}),(0,_o.jsx)("button",{onClick:()=>pe(p.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,_o.jsx)(It.X,{className:"h-4 w-4"})})]},p.id))})]})]}),(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsxs)(x,{onClick:()=>P(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,_o.jsx)(It.Plus,{className:"h-3 w-3"}),"Add"]}),(0,_o.jsxs)(x,{onClick:()=>me(!ie),variant:"outline",size:"sm",className:"gap-1",children:[(0,_o.jsx)(It.Calendar,{className:"h-3 w-3"}),ie?"Close":"Select"]})]})]})}),ie&&(0,_o.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>me(!1)}),(0,_o.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-_o shadow-xl z-10 transition-all duration-300 ease-in-out ${ie?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,_o.jsxs)(be,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,_o.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,_o.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>me(!1),className:"h-8 w-8 p-0",children:(0,_o.jsx)(It.X,{className:"h-4 w-4"})})]}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground It-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,_o.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,_o.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(p=>(0,_o.jsxs)(x,{variant:_===p.key?"default":"outline",size:"sm",onClick:()=>I(p.key),className:"text-xs h-8 px-3 flex-1",children:[p.label," (",p.count,")"]},p.key))}),(0,_o.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:N.length>0?N.map(p=>{let S=u.includes(p.id.toString()),ee=e.filter(Fe=>Se(Fe.sprint)===p.id).length,ne=!S&&u.length<3;return(0,_o.jsx)("div",{className:`p-3 rounded-lg border transition-all ${S?"bg-primary/10 border-primary/30":ne?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:j===p.id.toString()?(0,_o.jsxs)("div",{className:"space-y-3",children:[(0,_o.jsx)(re,{value:T.name,onChange:Fe=>Q(Le=>({...Le,name:Fe.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,_o.jsx)(Oe,{value:T.description,onChange:Fe=>Q(Le=>({...Le,description:Fe.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,_o.jsxs)("div",{className:"flex gap-2",children:[(0,_o.jsxs)(x,{size:"sm",onClick:()=>Jt(),className:"flex-1",children:[(0,_o.jsx)(It.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,_o.jsxs)(x,{size:"sm",variant:"outline",onClick:Pt,className:"flex-1",children:[(0,_o.jsx)(It.X,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,_o.jsxs)("div",{children:[(0,_o.jsxs)("div",{className:"flex items-start justify-between",children:[(0,_o.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,_o.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:p.name}),(0,_o.jsx)(se,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,_o.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:p.description}),(0,_o.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,_o.jsxs)("span",{className:"flex items-center gap-1",children:[(0,_o.jsx)(It.CalendarDays,{className:"h-3 w-3"}),new Date(p.startDate).toLocaleDateString()]}),(0,_o.jsxs)("span",{className:"flex items-center gap-1",children:[(0,_o.jsx)(It.User,{className:"h-3 w-3"}),ee," tasks"]})]})]}),(0,_o.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,_o.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>xt(p),className:"h-6 w-6 p-0",children:(0,_o.jsx)(It.Edit2,{className:"h-3 w-3"})}),(0,_o.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>r(p.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,_o.jsx)(It.Trash2,{className:"h-3 w-3"})})]})]}),(0,_o.jsx)("div",{className:"flex items-center justify-between It-2",children:(0,_o.jsx)(x,{variant:S?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>pe(p.id.toString()),disabled:!S&&u?.length>=3,children:(0,_o.jsx)("span",{className:"pointer-events-none select-none",children:S?"Deselect":u?.length>=3?"Limit Reached":"Select"})})})]})},p.id)}):(0,_o.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,_o.jsx)(It.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,_o.jsxs)("p",{className:"text-sm",children:['No sprints found for "',_,'" filter']}),(0,_o.jsx)(x,{variant:"link",size:"sm",onClick:()=>I("all"),className:"text-xs",children:"Show all sprints"})]})}),u?.length===0&&(0,_o.jsx)("div",{className:"It-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,_o.jsxs)("div",{className:"text-center",children:[(0,_o.jsx)(It.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,_o.jsx)("p",{className:"text-xs text-muted-foreground It-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,_o.jsx)("div",{className:"lg:col-span-1",children:(0,_o.jsxs)(be,{className:"p-4 h-full bg-card border-_o-4 border-_o-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:L,onDragEnter:()=>de("backlog"),onDragLeave:ue,onDrop:p=>Be(p,"backlog"),style:{height:A>0?`calc(100vh - ${A+200}px)`:"calc(100vh - 16rem)"},children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,_o.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsxs)(se,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[q?.length," tasks"]}),(0,_o.jsxs)(se,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[it," pts"]})]})]}),(0,_o.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${h==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:p,unassignedTasks:S}=ot(q);return(0,_o.jsxs)(_o.Fragment,{children:[Object.entries(p).map(([ee,ne])=>{let Fe=H(ee);if(!Fe)return null;let Le=c.has(ee);return(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.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:()=>tt(ee),children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${Fe.color}`}),(0,_o.jsx)("span",{className:"font-medium text-muted-foreground",children:Fe.name}),(0,_o.jsxs)("span",{className:"text-muted-foreground",children:["(",ne?.length,")"]}),(0,_o.jsx)("div",{className:"ml-auto",children:Le?(0,_o.jsx)(It.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,_o.jsx)(It.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Le&&(0,_o.jsx)("div",{className:"space-y-2 pl-2",children:ne.map(qe=>(0,_o.jsx)(je,{task:qe},qe.id))})]},ee)}),S?.length>0&&(()=>{let ee=c.has("no-epic");return(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.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:()=>tt("no-epic"),children:[(0,_o.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,_o.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,_o.jsxs)("span",{className:"text-muted-foreground",children:["(",S?.length,")"]}),(0,_o.jsx)("div",{className:"ml-auto",children:ee?(0,_o.jsx)(It.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,_o.jsx)(It.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!ee&&(0,_o.jsx)("div",{className:"space-y-2 pl-2",children:S?.map(ne=>(0,_o.jsx)(je,{task:ne},ne.id))})]})})(),q?.length===0&&(0,_o.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"}),q?.length>0&&Object.keys(p).length===0&&S.length===0&&(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),q?.map(ee=>(0,_o.jsx)(je,{task:ee},ee.id))]})]})})()})]})}),Y.map(p=>{let S=e.filter(ne=>Se(ne?.sprint)===p.id),ee=S.reduce((ne,Fe)=>ne+(Fe?.storyPoints||0),0);return(0,_o.jsxs)(be,{className:"p-4 h-full bg-card border-_o-4 border-_o-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:L,onDragEnter:()=>de(p.id.toString()),onDragLeave:ue,onDrop:ne=>Be(ne,p.id.toString()),style:{height:A>0?`calc(100vh - ${A+200}px)`:"calc(100vh - 16rem)"},children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,_o.jsx)("div",{children:(0,_o.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:p.name})}),(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsxs)(se,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[S?.length," tasks"]}),(0,_o.jsxs)(se,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[ee," pts"]}),(0,_o.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>{me(!0),xt(p)},className:"h-6 px-2",children:(0,_o.jsx)(It.Edit2,{className:"h-3 w-3"})}),(0,_o.jsx)(x,{size:"sm",variant:"ghost",onClick:()=>r(p.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,_o.jsx)(It.Trash2,{className:"h-3 w-3"})})]})]}),(0,_o.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:ne,unassignedTasks:Fe}=ot(S);return(0,_o.jsxs)(_o.Fragment,{children:[Object.entries(ne).map(([Le,qe])=>{let sa=H(Le);if(!sa)return null;let la=c.has(Le);return(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.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:()=>tt(Le),children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${sa.color}`}),(0,_o.jsx)("span",{className:"font-medium text-muted-foreground",children:sa.name}),(0,_o.jsxs)("span",{className:"text-muted-foreground",children:["(",qe?.length,")"]}),(0,_o.jsx)("div",{className:"ml-auto",children:la?(0,_o.jsx)(It.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,_o.jsx)(It.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!la&&(0,_o.jsx)("div",{className:"space-y-2 pl-2",children:qe?.map(da=>(0,_o.jsx)(je,{task:da},da.id))})]},Le)}),Fe?.length>0&&(()=>{let Le=c.has("no-epic");return(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.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:()=>tt("no-epic"),children:[(0,_o.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,_o.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,_o.jsxs)("span",{className:"text-muted-foreground",children:["(",Fe?.length,")"]}),(0,_o.jsx)("div",{className:"ml-auto",children:Le?(0,_o.jsx)(It.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,_o.jsx)(It.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!Le&&(0,_o.jsx)("div",{className:"space-y-2 pl-2",children:Fe?.map(qe=>(0,_o.jsx)(je,{task:qe},qe.id))})]})})(),S?.length===0&&(0,_o.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},p.id)})]}),(0,_o.jsx)(Xi,{isOpen:y,onClose:()=>P(!1),onAddSprint:na})]})})]})};var Mn=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),Bn=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Do=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[i,n]=t.split(":");o.setHours(parseInt(i),parseInt(n))}return o<a},To=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Fn=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Ln=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[i,n]=(0,Ao.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[d,r]=(0,Ao.useState)(!1),u=c=>{if(c.preventDefault(),!e.find(k=>k?.id.toString()===i.colleagueId.toString())){console.error("No valid colleague selected"),r(!0);return}r(!1);let D={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(D),o(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,Ao.useEffect)(()=>{i.colleagueId&&r(!1)},[i.colleagueId]);let m=e.filter(Boolean);return(0,_o.jsx)(Je,{open:a,onOpenChange:o,children:(0,_o.jsxs)(Ve,{className:"max-w-2xl",children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(Ge,{children:"Add New Reminder"})}),(0,_o.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,_o.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"title",children:"Title"}),(0,_o.jsx)(re,{id:"title",value:i.title,onChange:c=>n({...i,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"description",children:"Description"}),(0,_o.jsx)(Oe,{id:"description",value:i.description,onChange:c=>n({...i,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"dueDate",children:"Due Date"}),(0,_o.jsx)(re,{id:"dueDate",type:"date",value:i.dueDate,onChange:c=>n({...i,dueDate:c.target.value}),required:!0})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,_o.jsx)(re,{id:"dueTime",type:"time",value:i.dueTime,onChange:c=>n({...i,dueTime:c.target.value})})]})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{className:`${d?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,_o.jsxs)(Qe,{value:i.colleagueId,onValueChange:c=>{n({...i,colleagueId:c})},required:!0,children:[(0,_o.jsx)(We,{className:`${d?"text-destructive border-red-500":""}`,children:(0,_o.jsx)(gt,{className:`${d?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(c=>c?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,_o.jsx)(_e,{children:m.map(c=>(0,_o.jsx)(he,{value:c.id.toString(),children:c.name},c.id))})]}),d&&(0,_o.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_o.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:c=>n({...i,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,_o.jsx)(B,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,_o.jsxs)(Qe,{value:i.recurrencePattern,onValueChange:c=>n({...i,recurrencePattern:c}),children:[(0,_o.jsx)(We,{children:(0,_o.jsx)(gt,{})}),(0,_o.jsxs)(_e,{children:[(0,_o.jsx)(he,{value:"daily",children:"Daily"}),(0,_o.jsx)(he,{value:"weekly",children:"Weekly"}),(0,_o.jsx)(he,{value:"monthly",children:"Monthly"}),(0,_o.jsx)(he,{value:"yearly",children:"Yearly"})]})]})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"recurrenceInterval",children:"Every"}),(0,_o.jsx)(re,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:c=>n({...i,recurrenceInterval:parseInt(c.target.value)})})]})]})]}),(0,_o.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,_o.jsx)(x,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,_o.jsx)(x,{type:"submit",children:"Add Reminder"})]})]})]})})},On=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:i})=>{let[n,d]=(0,Ao.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),r=m=>{m.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()},u=t.filter(Boolean);return(0,_o.jsx)(Je,{open:o,onOpenChange:i,children:(0,_o.jsxs)(Ve,{className:"max-w-2xl",children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(Ge,{children:"Edit Reminder"})}),(0,_o.jsxs)("form",{onSubmit:r,className:"space-y-4",children:[(0,_o.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"edit-title",children:"Title"}),(0,_o.jsx)(re,{id:"edit-title",value:n.title,onChange:m=>d({...n,title:m.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"edit-description",children:"Description"}),(0,_o.jsx)(Oe,{id:"edit-description",value:n.description||"",onChange:m=>d({...n,description:m.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,_o.jsx)(re,{id:"edit-dueDate",type:"date",value:n.dueDate,onChange:m=>d({...n,dueDate:m.target.value}),required:!0})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,_o.jsx)(re,{id:"edit-dueTime",type:"time",value:n.dueTime,onChange:m=>d({...n,dueTime:m.target.value})})]})]}),(0,_o.jsx)("div",{className:"space-y-2",children:(0,_o.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_o.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:n.isRecurring||!1,onChange:m=>d({...n,isRecurring:m.target.checked}),className:"rounded border-border"}),(0,_o.jsx)(B,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,_o.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,_o.jsx)(x,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,_o.jsx)(x,{type:"submit",children:"Save Changes"})]})]})]})})},zn=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[i,n]=(0,Ao.useState)(!1);if(!e||!e.id)return null;let d=Do(new Date(e.dueDate||""),e.dueTime||""),r=To(new Date(e.dueDate||"")),u=Fn(new Date(e.dueDate||"")),m=()=>{a(e.id.toString(),{})},c=()=>r?"Today":u?"Tomorrow":Mn(new Date(e.dueDate||""));return(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(On,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>n(!1)}),(0,_o.jsx)(be,{children:(0,_o.jsx)(ea,{className:"p-4",children:(0,_o.jsxs)("div",{className:"flex items-start justify-between",children:[(0,_o.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,_o.jsx)("button",{onClick:m,className:"It-1 text-primary hover:text-primary/80"}),(0,_o.jsxs)("div",{className:"flex-1",children:[(0,_o.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,_o.jsx)("h3",{children:e.title})}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,_o.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,_o.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,_o.jsx)(It.Calendar,{className:"h-4 w-4"}),(0,_o.jsx)("span",{className:d?"text-destructive font-medium":"",children:c()})]}),e.dueTime&&(0,_o.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,_o.jsx)(It.Clock,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:Bn(e.dueTime)})]}),(0,_o.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,_o.jsx)(It.User,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,_o.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,_o.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>n(!0),className:"h-8 w-8 p-0",children:(0,_o.jsx)(It.Edit2,{className:"h-4 w-4"})}),(0,_o.jsx)(x,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,_o.jsx)(It.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Qi=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:i})=>{let[n,d]=(0,Ao.useState)(e.filter(Boolean)),[r,u]=(0,Ao.useState)(t.filter(Boolean)),[m,c]=(0,Ao.useState)("all"),[g,D]=(0,Ao.useState)(""),[k,y]=(0,Ao.useState)(!1);(0,Ao.useEffect)(()=>{d(e.filter(Boolean))},[e]),(0,Ao.useEffect)(()=>{u(t.filter(Boolean))},[t]);let P=C=>{if(!C.title){console.error("Invalid reminder data:",C);return}let V={...C,id:Date.now(),createdAt:new Date().toISOString()};d(_=>[..._,V]),a?.(C)},h=(C,V)=>{if(!C){console.error("No reminder ID provided for update");return}d(_=>_.map(I=>I?.id.toString()===C?{...I,...V}:I)),o?.(C,V)},z=C=>{if(!C){console.error("No reminder ID provided for deletion");return}d(V=>V.filter(_=>_?.id.toString()!==C)),i?.(C)},w=n.filter(C=>{if(!C)return!1;if(g){let V=g.toLowerCase();if(!(C.title.toLowerCase().includes(V)||C.description?.toLowerCase().includes(V)))return!1}switch(m){case"pending":case"completed":case"overdue":return Do(new Date(C.dueDate||""),C.dueTime||"");case"today":return To(new Date(C.dueDate||""));default:return!0}}).sort((C,V)=>{if(!C||!V)return 0;let _={high:3,medium:2,low:1},I=0;return I!==0?I:new Date(C.dueDate||"").getTime()-new Date(V.dueDate||"").getTime()}),T={total:n.filter(Boolean).length,overdue:n.filter(C=>C&&Do(new Date(C.dueDate||""),C.dueTime||"")).length,today:n.filter(C=>C&&To(new Date(C.dueDate||""))).length},Q=r.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,_o.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,_o.jsx)(ht,{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:()=>{y(!0)}}}),(0,_o.jsxs)("div",{className:"h-full bg-background",children:[(0,_o.jsx)(Ln,{colleagues:r,onAddReminder:P,open:k,setOpen:y}),(0,_o.jsxs)("div",{className:"p-6",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,_o.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,_o.jsxs)(x,{className:"flex items-center space-x-2",onClick:()=>y(!0),children:[(0,_o.jsx)(It.Plus,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:"Add Reminder"})]})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,_o.jsxs)(be,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-foreground",children:T.total}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,_o.jsxs)(be,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-primary",children:T.overdue}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,_o.jsxs)(be,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-success",children:T.today}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,_o.jsxs)(be,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-destructive",children:T.overdue}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,_o.jsxs)(be,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-warning",children:T.today}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,_o.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,_o.jsx)("div",{className:"flex-1",children:(0,_o.jsx)(re,{placeholder:"Search reminders...",value:g,onChange:C=>D(C.target.value),className:"max-w-md"})}),(0,_o.jsxs)(Qe,{value:m,onValueChange:C=>c(C),children:[(0,_o.jsx)(We,{className:"w-40",children:(0,_o.jsx)(gt,{})}),(0,_o.jsxs)(_e,{children:[(0,_o.jsxs)(he,{value:"all",children:["All (",T.total,")"]}),(0,_o.jsxs)(he,{value:"overdue",children:["Overdue (",T.overdue,")"]}),(0,_o.jsxs)(he,{value:"overdue",children:["Overdue (",T.overdue,")"]}),(0,_o.jsxs)(he,{value:"today",children:["Today (",T.today,")"]})]})]})]}),(0,_o.jsx)("div",{className:"space-y-4",children:w.length===0?(0,_o.jsxs)(be,{className:"p-8 text-center",children:[(0,_o.jsx)("div",{className:"text-muted-foreground",children:g||m!=="all"?"No reminders match your filters":"No reminders yet"}),!g&&m==="all"&&(0,_o.jsx)("p",{className:"text-sm text-muted-foreground/60 It-2",children:"Create your first reminder to get started"})]}):w.map(C=>C&&(0,_o.jsx)(zn,{reminder:C,colleagues:r,onUpdateReminder:h,onDeleteReminder:z},C.id))})]})]})]})};function Ja({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:i=!0,className:n}){return(0,_o.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${n||""}`,children:[i&&(0,_o.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,_o.jsx)("div",{className:"col-span-6",children:"Name"}),(0,_o.jsx)("div",{className:"col-span-2",children:"Size"}),(0,_o.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,_o.jsx)("div",{className:"divide-y",children:e.map(d=>(0,_o.jsxs)(Ya.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(d),children:[(0,_o.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,_o.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,_o.jsx)("div",{children:(0,_o.jsx)("p",{className:"font-medium",children:d.name})})]}),(0,_o.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:d.filesize}),(0,_o.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,_o.jsx)("span",{className:"text-sm md:text-base",children:typeof d.createdAt=="string"?d.createdAt:new Date(d.createdAt).toLocaleDateString()}),(0,_o.jsx)("div",{className:"flex gap-1",children:(0,_o.jsx)(x,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:r=>{r.stopPropagation(),o?.(d)},children:(0,_o.jsx)(It.Trash2,{className:"h-4 w-4"})})})]})]},d.name))})]})}var tr=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,i]=(0,Ao.useState)(null),[n,d]=(0,Ao.useState)(""),[r,u]=(0,Ao.useState)(""),[m,c]=(0,Ao.useState)(""),g=k=>{let y=k.target.files?.[0];y&&(i(y),n||d(y.name))},D=async k=>{if(k.preventDefault(),!o)return;let y=new FormData;y.append("file",o),y.append("name",n),r&&y.append("description",r),m&&y.append("tags",m),a?.(y),t(),i(null),d(""),u(""),c("")};return(0,_o.jsx)(Je,{open:e,onOpenChange:t,children:(0,_o.jsxs)(Ve,{className:"sm:max-w-md",children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(Ge,{children:"Add New File"})}),(0,_o.jsxs)("form",{onSubmit:D,className:"grid gap-4",children:[(0,_o.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,_o.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,_o.jsxs)("div",{className:"flex flex-col items-center justify-center pt-5 pb-6",children:[(0,_o.jsx)(Un,{className:"w-10 h-10 text-gray-400"}),(0,_o.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,_o.jsx)("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),(0,_o.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,_o.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:g})]})}),o&&(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)("p",{className:"font-medium",children:o.name}),(0,_o.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,_o.jsx)(x,{type:"submit",onClick:D,children:"Upload"})]})]})]})})};function Un(e){return(0,_o.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,_o.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,_o.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,_o.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function Po({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:i,compactView:n=!1,className:d}){let[r,u]=(0,Ao.useState)(e),[m,c]=(0,Ao.useState)(""),[g,D]=(0,Ao.useState)("all"),[k,y]=(0,Ao.useState)("all"),[P,h]=(0,Ao.useState)(!1);(0,Ao.useEffect)(()=>{u(e)},[e]);let z=r.filter(I=>I.name.toLowerCase().includes(m.toLowerCase())),j=z.slice(0,10),w=z.filter(Boolean),T=()=>{h(!0)},Q=I=>{a?.(I)},C=I=>{console.log("deleting file",I),u(ie=>ie.filter(me=>me.name!==I.name)),o?.(I.id.toString())},V=I=>{i?.(I)},_=()=>{c(""),D("all")};return(0,_o.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,_o.jsx)(Ya.AnimatePresence,{mode:"wait",children:(0,_o.jsx)(Ya.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,_o.jsxs)("div",{className:`space-y-6 ${d||""}`,children:[(0,_o.jsx)(ht,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:T},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,_o.jsx)(be,{children:(0,_o.jsx)(ea,{className:"pt-6",children:(0,_o.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,_o.jsx)("div",{className:"flex-1",children:(0,_o.jsxs)("div",{className:"relative",children:[(0,_o.jsx)(It.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,_o.jsx)(re,{placeholder:"Search files...",value:m,onChange:I=>c(I.target.value),className:"pl-9"})]})}),(m||g!=="all")&&(0,_o.jsxs)(x,{variant:"outline",onClick:_,className:"gap-2",children:[(0,_o.jsx)(It.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,_o.jsxs)("div",{className:"space-y-4",children:[(0,_o.jsx)(Va,{activeTab:k,onTabChange:y,tabOptions:[{value:"all",label:`All Files (${z.length})`},{value:"recent",label:`Recent (${j.length})`}],maxWidth:"500px",gridCols:3}),k==="all"&&(0,_o.jsx)(Ja,{files:z,onFileClick:V,onFileEdit:Q,onFileDelete:C,showHeader:!n}),k==="recent"&&(0,_o.jsx)(Ja,{files:j,onFileClick:V,onFileEdit:Q,onFileDelete:C,showHeader:!n}),k==="shared"&&(0,_o.jsx)(Ja,{files:w,onFileClick:V,onFileEdit:Q,onFileDelete:C,showHeader:!n})]}),z.length===0&&(0,_o.jsx)(be,{children:(0,_o.jsx)(ea,{className:"pt-6",children:(0,_o.jsxs)("div",{className:"text-center py-8",children:[(0,_o.jsx)(It.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,_o.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,_o.jsx)("p",{className:"text-muted-foreground mb-4",children:m||g!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,_o.jsxs)(x,{onClick:T,className:"gap-2",children:[(0,_o.jsx)(It.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,_o.jsx)(tr,{isOpen:P,onClose:()=>h(!1),onAddFile:t})]})}var ar=require("next/navigation");function Ro({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:i=[],initialReminders:n=[],initialColleagues:d=[],initialUsers:r=[],initialFiles:u=[],initialView:m="kanban",onAddTask:c,onUpdateTask:g,onDeleteTask:D,onTaskClick:k,onAddEpic:y,onUpdateEpic:P,onDeleteEpic:h,onAddTaskToEpic:z,onAddSprint:j,onUpdateSprint:w,onDeleteSprint:T,onAddProject:Q,onUpdateProject:C,onDeleteProject:V,onFileAdd:_,onFileEdit:I,onFileDelete:ie,onFileClick:me,onAddReminder:A,onUpdateReminder:ye,onDeleteReminder:f,onViewChange:Z,onToggleMobileMenu:H,onTeamClick:Ue,onTeamChange:ke,onCopilotClick:pt,handleAddComment:ot}){let[N,Y]=(0,Ao.useState)(t),[q,it]=(0,Ao.useState)(a),[pe,tt]=(0,Ao.useState)(o),[na,xt]=(0,Ao.useState)(i),[Jt,Pt]=(0,Ao.useState)(n),[Ut,L]=(0,Ao.useState)(d),[de,ue]=(0,Ao.useState)(r),[Be,je]=(0,Ao.useState)(u),[p,S]=(0,Ao.useState)(!1),[ee,ne]=(0,Ao.useState)(!1),[Fe,Le]=(0,Ao.useState)(null),[qe,sa]=(0,Ao.useState)(null),[la,da]=(0,Ao.useState)(null),[jt,Eo]=(0,Ao.useState)(m||"kanban"),[Vn,ir]=(0,Ao.useState)(!1),rr=(0,ar.useRouter)();(0,Ao.useEffect)(()=>{Y(t)},[t]),(0,Ao.useEffect)(()=>{tt(o)},[o]),(0,Ao.useEffect)(()=>{it(a)},[a]),(0,Ao.useEffect)(()=>{xt(i)},[i]),(0,Ao.useEffect)(()=>{je(u)},[u]),(0,Ao.useEffect)(()=>{ue(r)},[r]),(0,Ao.useEffect)(()=>{L(d)},[d]),(0,Ao.useEffect)(()=>{Pt(n)},[n]),(0,Ao.useEffect)(()=>{Eo(m)},[m]);let nr=N.filter(b=>{}),Hn=b=>nr.filter(F=>F.status===b),Gn=b=>{let F={};return q.forEach(G=>{}),F},$n=b=>{da(b)},Wn=b=>{la&&(Y(F=>F.map(G=>G.id===la.id?{...G,status:b}:G)),da(null))},Io=b=>{let F={...b,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};Y(G=>[...G,F]),c?.(F)},Na=async(b,F)=>(Y(G=>G.map(Re=>Re.id===Number(b)?{...Re,...F}:Re)),await g?.(b,F)),_n=async(b,F)=>{Na(b,F)},Mo=b=>{Y(F=>F.filter(G=>G.id!==Number(b))),Fe?.id===Number(b)&&Le(null),D?.(b)},Kn=async b=>{Mo(b)},qn=b=>{let F={...b,id:Date.now()};xt(G=>[...G,F]),Q?.(b)},Jn=(b,F)=>{xt(G=>G.map(Re=>Re.id===Number(b)?{...Re,...F}:Re)),C?.(b,F)},Xn=b=>{xt(F=>F.filter(G=>G.id!==Number(b))),V?.(b)},Bo=b=>{let F={...b,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};it(G=>[...G,F]),y?.({...F})},sr=()=>{ne(!0)},lr=(b,F)=>{it(G=>G.map(Re=>Re.id===Number(b)?{...Re,...F}:Re)),P?.(b,F)},dr=b=>{it(F=>F.filter(G=>G.id!==Number(b))),Y(F=>F.filter(G=>Se(G.epic)!==Number(b))),h?.(b)},cr=b=>{let F={...b,id:Date.now()};tt(G=>[...G,F]),j?.(b)},mr=(b,F)=>{tt(G=>G.map(Re=>Re.id===Number(b)?{...Re,...F}:Re)),w?.(b,F)},pr=b=>{b==="backlog"||b==="all-tasks"||(tt(F=>F.filter(G=>G.id!==Number(b))),Y(F=>F.map(G=>Se(G.sprint)===Number(b)?{...G,sprint:void 0}:G)),T?.(b))},Qa=b=>{Le(b)},ur=b=>{b==="planning"&&window.innerWidth<768||(Eo(b),Z?.(b))},Yn=()=>{ir(b=>!b),H?.()},Qn=()=>{rr.push("/")},Zn=b=>{console.log("Switching to team:",b)},es=b=>{console.log("Switching to team:",b)},gr=b=>{S(!0)},fr=()=>{S(!1),sa(null)},vr=b=>{let F={...b,id:Date.now(),createdAt:new Date().toISOString()};Pt(G=>[...G,F]),A?.(b)},br=(b,F)=>{Pt(G=>G.map(Re=>Re.id===Number(b)?{...Re,...F}:Re)),ye?.(b,F)},hr=b=>{Pt(F=>F.filter(G=>G.id!==Number(b))),f?.(b)},yr=()=>{_?.()},xr=b=>{I?.(b)},wr=b=>{je(F=>F.filter(G=>G.name!==b)),ie?.(b)},Nr=b=>{me?.(b)},ts=[{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"}],as=()=>{switch(jt){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},Za=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],os=Za.sort((b,F)=>F.lastUsed.getTime()-b.lastUsed.getTime()).slice(0,3),is=Za.length>3,rs=Za.slice(3);return(0,_o.jsxs)(Ni,{currentView:jt,onViewChange:ur,children:[jt==="kanban"&&(0,_o.jsx)("div",{className:"h-full overflow-hidden",children:(0,_o.jsx)($i,{initialProjects:na,initialEpics:q,initialSprints:pe.map(b=>({...b,isSelected:!1})),initialTasks:N,initialColleagues:Ut,initialUsers:de,onAddTask:Io,onUpdateTask:Na,onDeleteTask:Mo,onTaskClick:Qa,onAddEpic:Bo,onAddComment:ot})}),jt==="planning"&&(0,_o.jsx)("div",{className:"hidden md:block h-full",children:(0,_o.jsx)(Yi,{tasks:N,epics:q,sprints:pe,onUpdateTask:Na,onTaskClick:Qa,onAddSprint:cr,onUpdateSprint:mr,onDeleteSprint:pr})}),jt==="tasks"&&(0,_o.jsx)("div",{className:"h-full",children:(0,_o.jsx)(Qi,{initialReminders:Jt,initialColleagues:Ut,onAddReminder:vr,onUpdateReminder:br,onDeleteReminder:hr})}),jt==="files"&&(0,_o.jsx)("div",{className:"h-full",children:(0,_o.jsx)(Po,{initialFiles:Be,onFileAdd:yr,onFileEdit:xr,onFileDelete:wr,onFileClick:Nr,compactView:!1})}),jt==="epics"&&(0,_o.jsx)("div",{className:"h-full",children:(0,_o.jsx)(Wi,{tasks:N,epics:q,sprints:pe,onUpdateTask:Na,onTaskClick:Qa,onAddTaskToEpic:gr,onAddEpic:sr,onUpdateEpic:lr,onDeleteEpic:dr})}),(0,_o.jsx)(aa,{isOpen:p,onClose:fr,onAddTask:Io,epics:q,sprints:pe,assignees:[...Ut,...de],defaultEpicId:qe||void 0}),(0,_o.jsx)(ia,{isOpen:ee,onClose:()=>ne(!1),onAddEpic:Bo})]})}function or({title:e="",projects:t,businessUnits:a,epics:o,sprints:i,tasks:n,currentView:d,onAddTask:r,onUpdateTask:u,onDeleteTask:m,onTaskClick:c,onAddEpic:g,onUpdateEpic:D,onDeleteEpic:k,onAddTaskToEpic:y,onAddSprint:P,onUpdateSprint:h,onDeleteSprint:z,onAddProject:j,onUpdateProject:w,onDeleteProject:T,onViewChange:Q,mobileMenuOpen:C,onToggleMobileMenu:V,onTeamClick:_,onTeamChange:I,onCopilotClick:ie}){let[me,A]=(0,Ao.useState)("projects"),[ye,f]=(0,Ao.useState)(a[0]),Z=q=>{console.log("Opening app:",q.name)},H=q=>{console.log("Favoriting app:",q.name)},Ue=q=>{console.log("Opening file:",q.name)},ke=q=>{console.log("Sharing file:",q.name)},pt=q=>{console.log("Opening project:",q.name)},ot=q=>{console.log("Sharing project:",q.name)},N=q=>{console.log("Business unit changed to:",q.name)},Y=()=>{switch(me){case"projects":return(0,_o.jsx)(Ro,{initialProjects:t,initialEpics:o,initialSprints:i,initialTasks:n,onAddTask:r,onUpdateTask:u,onDeleteTask:m,onTaskClick:c,onAddEpic:g,onUpdateEpic:D,onDeleteEpic:k,onAddTaskToEpic:y,onAddSprint:P,onUpdateSprint:h,onDeleteSprint:z,onAddProject:j,onUpdateProject:w,onDeleteProject:T,onViewChange:Q,onToggleMobileMenu:V,onTeamClick:_,onTeamChange:I,onCopilotClick:ie});default:return null}};return(0,_o.jsx)(wi,{sidebarItems:ri,title:e,notifications:ni,businessUnits:a,currentBusinessUnit:ye,onBusinessUnitChange:N,activeTab:me,onTabChange:A,showTabs:!0,children:(0,_o.jsx)(Ya.AnimatePresence,{mode:"wait",children:(0,_o.jsx)(Ya.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Y()},me)})})}
5
+ "use strict";"use client";var Cr=Object.create;var Ca=Object.defineProperty;var kr=Object.getOwnPropertyDescriptor;var Sr=Object.getOwnPropertyNames;var Dr=Object.getPrototypeOf,Tr=Object.prototype.hasOwnProperty;var Pr=(e,t)=>{for(var a in t)Ca(e,a,{get:t[a],enumerable:!0})},Fo=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Sr(t))!Tr.call(e,i)&&i!==a&&Ca(e,i,{get:()=>t[i],enumerable:!(o=kr(t,i))||o.enumerable});return e};var le=(e,t,a)=>(a=e!=null?Cr(Dr(e)):{},Fo(t||!e||!e.__esModule?Ca(a,"default",{value:e,enumerable:!0}):a,e)),Rr=e=>Fo(Ca({},"__esModule",{value:!0}),e);var Hn={};Pr(Hn,{default:()=>or});module.exports=Rr(Hn);var Ao=require("react"),Ya=require("motion/react");var $o=require("clsx");var ao="-",Ar=e=>{let t=Ir(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:d=>{let r=d.split(ao);return r[0]===""&&r.length!==1&&r.shift(),zo(r,t)||Er(d)},getConflictingClassGroupIds:(d,r)=>{let u=a[d]||[];return r&&o[d]?[...u,...o[d]]:u}}},zo=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),i=o?zo(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let n=e.join(ao);return t.validators.find(({validator:d})=>d(n))?.classGroupId},Lo=/^\[(.+)\]$/,Er=e=>{if(Lo.test(e)){let t=Lo.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Ir=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Br(Object.entries(e.classGroups),a).forEach(([n,d])=>{to(d,o,n,t)}),o},to=(e,t,a,o)=>{e.forEach(i=>{if(typeof i=="string"){let n=i===""?t:Oo(t,i);n.classGroupId=a;return}if(typeof i=="function"){if(Mr(i)){to(i(o),t,a,o);return}t.validators.push({validator:i,classGroupId:a});return}Object.entries(i).forEach(([n,d])=>{to(d,Oo(t,n),a,o)})})},Oo=(e,t)=>{let a=e;return t.split(ao).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Mr=e=>e.isThemeGetter,Br=(e,t)=>t?e.map(([a,o])=>{let i=o.map(n=>typeof n=="string"?t+n:typeof n=="object"?Object.fromEntries(Object.entries(n).map(([d,r])=>[t+d,r])):n);return[a,i]}):e,Fr=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,i=(n,d)=>{a.set(n,d),t++,t>e&&(t=0,o=a,a=new Map)};return{get(n){let d=a.get(n);if(d!==void 0)return d;if((d=o.get(n))!==void 0)return i(n,d),d},set(n,d){a.has(n)?a.set(n,d):i(n,d)}}},Uo="!",Lr=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,i=t[0],n=t.length,d=r=>{let u=[],p=0,c=0,g;for(let y=0;y<r.length;y++){let z=r[y];if(p===0){if(z===i&&(o||r.slice(y,y+n)===t)){u.push(r.slice(c,y)),c=y+n;continue}if(z==="/"){g=y;continue}}z==="["?p++:z==="]"&&p--}let P=u.length===0?r:r.substring(c),S=P.startsWith(Uo),x=S?P.substring(1):P,A=g&&g>c?g-c:void 0;return{modifiers:u,hasImportantModifier:S,baseClassName:x,maybePostfixModifierPosition:A}};return a?r=>a({className:r,parseClassName:d}):d},Or=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(o=>{o[0]==="["?(t.push(...a.sort(),o),a=[]):a.push(o)}),t.push(...a.sort()),t},zr=e=>({cache:Fr(e.cacheSize),parseClassName:Lr(e),...Ar(e)}),Ur=/\_o+/,jr=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:i}=t,n=[],d=e.trim().split(Ur),r="";for(let u=d.length-1;u>=0;u-=1){let p=d[u],{modifiers:c,hasImportantModifier:g,baseClassName:P,maybePostfixModifierPosition:S}=a(p),x=!!S,A=o(x?P.substring(0,S):P);if(!A){if(!x){r=p+(r.length>0?" "+r:r);continue}if(A=o(P),!A){r=p+(r.length>0?" "+r:r);continue}x=!1}let y=Or(c).join(":"),z=g?y+Uo:y,_=z+A;if(n.includes(_))continue;n.push(_);let w=i(A,x);for(let R=0;R<w.length;++R){let re=w[R];n.push(z+re)}r=p+(r.length>0?" "+r:r)}return r};function Hr(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=jo(t))&&(o&&(o+=" "),o+=a);return o}var jo=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=jo(e[o]))&&(a&&(a+=" "),a+=t);return a};function Vr(e,...t){let a,o,i,n=d;function d(u){let p=t.reduce((c,g)=>g(c),e());return a=zr(p),o=a.cache.get,i=a.cache.set,n=r,r(u)}function r(u){let p=o(u);if(p)return p;let c=jr(u,a);return i(u,c),c}return function(){return n(Hr.apply(null,arguments))}}var fe=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ho=/^\[(?:([a-z-]+):)?(.+)\]$/i,Gr=/^\d+\/\d+$/,$r=new Set(["px","full","screen"]),Wr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_r=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|_o|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Kr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,qr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ht=e=>Xt(e)||$r.has(e)||Gr.test(e),Tt=e=>Yt(e,"length",on),Xt=e=>!!e&&!Number.isNaN(Number(e)),eo=e=>Yt(e,"number",Xt),ca=e=>!!e&&Number.isInteger(Number(e)),Xr=e=>e.endsWith("%")&&Xt(e.slice(0,-1)),K=e=>Ho.test(e),Pt=e=>Wr.test(e),Yr=new Set(["length","size","percentage"]),Qr=e=>Yt(e,Yr,Vo),Zr=e=>Yt(e,"position",Vo),en=new Set(["image","url"]),tn=e=>Yt(e,en,nn),an=e=>Yt(e,"",rn),ma=()=>!0,Yt=(e,t,a)=>{let o=Ho.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},on=e=>_r.test(e)&&!Kr.test(e),Vo=()=>!1,rn=e=>qr.test(e),nn=e=>Jr.test(e);var sn=()=>{let e=fe("colors"),t=fe("spacing"),a=fe("blur"),o=fe("brightness"),i=fe("borderColor"),n=fe("borderRadius"),d=fe("borderSpacing"),r=fe("borderWidth"),u=fe("contrast"),p=fe("grayscale"),c=fe("hueRotate"),g=fe("invert"),P=fe("gap"),S=fe("gradientColorStops"),x=fe("gradientColorStopPositions"),A=fe("inset"),y=fe("margin"),z=fe("opacity"),_=fe("padding"),w=fe("saturate"),R=fe("scale"),re=fe("sepia"),C=fe("skew"),j=fe("space"),q=fe("translate"),U=()=>["auto","contain","none"],se=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",K,t],T=()=>[K,t],he=()=>["",ht,Tt],f=()=>["auto",Xt,K],te=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],G=()=>["solid","dashed","dotted","double","none"],Le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],De=()=>["start","end","center","between","around","evenly","stretch"],Ye=()=>["","0",K],Qe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>[Xt,K];return{cacheSize:500,separator:":",theme:{colors:[ma],spacing:[ht,Tt],blur:["none","",Pt,K],brightness:k(),borderColor:[e],borderRadius:["none","","full",Pt,K],borderSpacing:T(),borderWidth:he(),contrast:k(),grayscale:Ye(),hueRotate:k(),invert:Ye(),gap:T(),gradientColorStops:[e],gradientColorStopPositions:[Xr,Tt],inset:H(),margin:H(),opacity:k(),padding:T(),saturate:k(),scale:k(),sepia:Ye(),skew:k(),space:T(),translate:T()},classGroups:{aspect:[{aspect:["auto","square","video",K]}],container:["container"],columns:[{columns:[Pt]}],"break-after":[{"break-after":Qe()}],"break-before":[{"break-before":Qe()}],"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:[...te(),K]}],overflow:[{overflow:se()}],"overflow-x":[{"overflow-x":se()}],"overflow-y":[{"overflow-y":se()}],overscroll:[{overscroll:U()}],"overscroll-x":[{"overscroll-x":U()}],"overscroll-y":[{"overscroll-y":U()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[A]}],"inset-x":[{"inset-x":[A]}],"inset-y":[{"inset-y":[A]}],start:[{start:[A]}],end:[{end:[A]}],top:[{top:[A]}],right:[{right:[A]}],bottom:[{bottom:[A]}],left:[{left:[A]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ca,K]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",K]}],grow:[{grow:Ye()}],shrink:[{shrink:Ye()}],order:[{order:["first","last","none",ca,K]}],"grid-cols":[{"grid-cols":[ma]}],"col-start-end":[{col:["auto",{span:["full",ca,K]},K]}],"col-start":[{"col-start":f()}],"col-end":[{"col-end":f()}],"grid-rows":[{"grid-rows":[ma]}],"row-start-end":[{row:["auto",{span:[ca,K]},K]}],"row-start":[{"row-start":f()}],"row-end":[{"row-end":f()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",K]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",K]}],gap:[{gap:[P]}],"gap-x":[{"gap-x":[P]}],"gap-y":[{"gap-y":[P]}],"justify-content":[{justify:["normal",...De()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...De(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...De(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],_o:[{_o:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[j]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[j]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",K,t]}],"min-w":[{"min-w":[K,t,"min","max","fit"]}],"max-w":[{"max-w":[K,t,"none","full","min","max","fit","prose",{screen:[Pt]},Pt]}],h:[{h:[K,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[K,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[K,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Pt,Tt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",eo]}],"font-family":[{font:[ma]}],"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",K]}],"line-clamp":[{"line-clamp":["none",Xt,eo]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ht,K]}],"list-image":[{"list-image":["none",K]}],"list-style-type":[{list:["none","disc","decimal",K]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[z]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[z]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ht,Tt]}],"underline-offset":[{"underline-offset":["auto",ht,K]}],"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",K]}],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",K]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[z]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...te(),Zr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Qr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","_o","tl"]},tn]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[n]}],"rounded-_o":[{"rounded-_o":[n]}],"rounded-e":[{"rounded-e":[n]}],"rounded-t":[{"rounded-t":[n]}],"rounded-r":[{"rounded-r":[n]}],"rounded-b":[{"rounded-b":[n]}],"rounded-_o":[{"rounded-_o":[n]}],"rounded-ss":[{"rounded-ss":[n]}],"rounded-se":[{"rounded-se":[n]}],"rounded-ee":[{"rounded-ee":[n]}],"rounded-es":[{"rounded-es":[n]}],"rounded-tl":[{"rounded-tl":[n]}],"rounded-tr":[{"rounded-tr":[n]}],"rounded-br":[{"rounded-br":[n]}],"rounded-bl":[{"rounded-bl":[n]}],"border-w":[{border:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-y":[{"border-y":[r]}],"border-w-_o":[{"border-_o":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-_o":[{"border-_o":[r]}],"border-opacity":[{"border-opacity":[z]}],"border-style":[{border:[...G(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[z]}],"divide-style":[{divide:G()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-_o":[{"border-_o":[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-_o":[{"border-_o":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...G()]}],"outline-offset":[{"outline-offset":[ht,K]}],"outline-w":[{outline:[ht,Tt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[z]}],"ring-offset-w":[{"ring-offset":[ht,Tt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Pt,an]}],"shadow-color":[{shadow:[ma]}],opacity:[{opacity:[z]}],"mix-blend":[{"mix-blend":[...Le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Le()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Pt,K]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[g]}],saturate:[{saturate:[w]}],sepia:[{sepia:[re]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[z]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[re]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[d]}],"border-spacing-x":[{"border-spacing-x":[d]}],"border-spacing-y":[{"border-spacing-y":[d]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",K]}],duration:[{duration:k()}],ease:[{ease:["linear","in","out","in-out",K]}],delay:[{delay:k()}],animate:[{animate:["none","spin","ping","pulse","bounce",K]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[ca,K]}],"translate-x":[{"translate-x":[q]}],"translate-y":[{"translate-y":[q]}],"skew-x":[{"skew-x":[C]}],"skew-y":[{"skew-y":[C]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",K]}],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","_o-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"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-me":[{"scroll-me":T()}],"scroll-mt":[{"scroll-mt":T()}],"scroll-mr":[{"scroll-mr":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-_o":[{"scroll-_o":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","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",K]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ht,Tt,eo]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","_o","pr","pb","pl"],px:["pr","pl"],py:["_o","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-_o","rounded-e","rounded-t","rounded-r","rounded-b","rounded-_o","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-_o":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-_o":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-_o","border-w-e","border-w-t","border-w-r","border-w-b","border-w-_o"],"border-w-x":["border-w-r","border-w-_o"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-_o","border-color-e","border-color-t","border-color-r","border-color-b","border-color-_o"],"border-color-x":["border-color-r","border-color-_o"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-_o","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-_o","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Go=Vr(sn);function b(...e){return Go((0,$o.clsx)(e))}var Ma=le(require("react")),no=le(require("next/link")),At=require("lucide-react");var Wo=require("class-variance-authority");var _o=require("react/jsx-runtime"),ln=(0,Wo.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 de({className:e,variant:t,...a}){return(0,_o.jsx)("div",{className:b(ln({variant:t}),e),...a})}var Ko=require("@radix-ui/react-slot"),Jo=le(require("react")),ka=(0,Wo.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"}}}),N=Jo.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...i},n)=>(0,_o.jsx)(e?Ko.Slot:"button",{className:b(ka({className:t,size:a,variant:o})),ref:n,...i}));N.displayName="Button";var Yo=le(require("react"));var ne=Yo.forwardRef(({className:e,type:t,...a},o)=>(0,_o.jsx)("input",{type:t,className:b("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));ne.displayName="Input";var oo=le(require("react")),at=le(require("@radix-ui/react-scroll-area"));var Qt=oo.forwardRef(({className:e,children:t,...a},o)=>(0,_o.jsxs)(at.Root,{ref:o,className:b("relative overflow-hidden",e),...a,children:[(0,_o.jsx)(at.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,_o.jsx)(Zo,{}),(0,_o.jsx)(at.Corner,{})]}));Qt.displayName=at.Root.displayName;var Zo=oo.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,_o.jsx)(at.ScrollAreaScrollbar,{ref:o,orientation:t,className:b("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-_o border-_o-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,_o.jsx)(at.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Zo.displayName=at.ScrollAreaScrollbar.displayName;var pa=le(require("react")),Ae=le(require("@radix-ui/react-dialog"));var We=Ae.Root;var dn=Ae.Portal;var ti=pa.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Ae.Overlay,{ref:a,className:b("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ti.displayName=Ae.Overlay.displayName;var Oe=pa.forwardRef(({className:e,children:t,...a},o)=>(0,_o.jsxs)(dn,{children:[(0,_o.jsx)(ti,{}),(0,_o.jsxs)(Ae.Content,{ref:o,className:b("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-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,_o.jsxs)(Ae.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,_o.jsx)(At._o,{className:"h-4 w-4"}),(0,_o.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Oe.displayName=Ae.Content.displayName;var ze=({className:e,...t})=>(0,_o.jsx)("div",{className:b("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ze.displayName="DialogHeader";var ua=({className:e,...t})=>(0,_o.jsx)("div",{className:b("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ua.displayName="DialogFooter";var Ue=pa.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Ae.Title,{ref:a,className:b("text-lg font-semibold leading-none tracking-tight",e),...t}));Ue.displayName=Ae.Title.displayName;var cn=pa.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Ae.Description,{ref:a,className:b("text-sm text-muted-foreground",e),...t}));cn.displayName=Ae.Description.displayName;var ga=le(require("@radix-ui/react-checkbox")),oi=le(require("react")),io=oi.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(ga.Root,{className:b("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,_o.jsx)(ga.Indicator,{className:b("flex items-center justify-center text-current"),children:(0,_o.jsx)(At.Check,{className:"h-4 w-4"})})}));io.displayName=ga.Root.displayName;var mt=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),ri=[{id:"home",title:"Home",icon:(0,_o.jsx)(At.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,_o.jsx)(At.Users,{}),maxItems:2,items:[{id:"design",title:"Design",url:"#"},{id:"marketing",title:"Marketing",url:"#"},{id:"finance",title:"Finance",url:"#"},{id:"engineering",title:"Engineering",url:"#"},{id:"sales",title:"Sales",url:"#"}]},{id:"projects",title:"Projects",icon:(0,_o.jsx)(At.Layers,{}),badge:"4",maxItems:2,items:[{id:"active-projects",title:"Active Projects",url:"#",badge:"4"},{id:"archived",title:"Archived",url:"#"},{id:"templates",title:"Templates",url:"#"},{id:"drafts",title:"Drafts",url:"#"},{id:"shared",title:"Shared with _o",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,_o.jsx)(At.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,_o.jsx)(At.FileText,{}),url:"/knowledge"}],ni=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what'_o new",onAction:()=>console.log("See what'_o new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],si=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,_o.jsx)(At.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,_o.jsx)(At.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,_o.jsx)(At.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,_o.jsx)(At.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,_o.jsx)(At.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,_o.jsx)(At.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,_o.jsx)(At.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,_o.jsx)(At.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"At",name:"IT Support",description:"Information technology and infrastructure",icon:(0,_o.jsx)(At.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,_o.jsx)(At.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Pa=[{id:"1",name:"_o-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var ro=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],Da=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Aa=[{id:"1",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],mn=[...Aa,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],pn=[...Pa,{id:"4",name:"Analytics Platform",description:"Business intelligence and reporting system",isSelected:!1},{id:"5",name:"API Gateway",description:"Microservices API management layer",isSelected:!1}],Ta={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},ii={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:Aa.filter(e=>e.epicId==="1")};var Ts={empty:{initialProjects:Ta.projects,initialEpics:Ta.epics,initialSprints:Ta.sprints,initialTasks:Ta.tasks},default:{initialProjects:Pa,initialEpics:ro,initialSprints:Da,initialTasks:Aa},highDensity:{initialProjects:Pa,initialEpics:ro,initialSprints:Da,initialTasks:mn},singleEpic:{initialProjects:Pa,initialEpics:ii.epics,initialSprints:Da,initialTasks:ii.tasks},multipleProjects:{initialProjects:pn,initialEpics:ro,initialSprints:Da,initialTasks:Aa}},Ra=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(mt),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(mt),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(mt),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(mt),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(mt),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(mt),version:"3.1",lastUpdated:new Date("2024-02-20"),isActive:!0},{id:"7",type:"digital",name:"ProjectManager AI",status:"active",joinedDate:new Date("2024-01-05"),lastActive:new Date,jobDescription:"Intelligent project management assistant that helps coordinate tasks, track progress, and manage timelines.",workInstructions:"Coordinate project activities, track milestones, manage resource allocation, and provide project status updates.",capabilities:["Project Planning","Task Coordination","Timeline Management","Resource Allocation","Progress Tracking"],knowledge:["Agile","Scrum","Gantt Charts","Risk Management","Stakeholder Management"].map(mt),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(mt),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(mt),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(mt),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Ps=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Ra.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:Ra.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Ra.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Rs=Ra.filter(e=>e.type==="digital");function Ia(e,t){let[a,o]=(0,Ao.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{o(n),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(n))}catch{}};return(0,Ao.useEffect)(()=>{i(a)},[]),[a,i]}function so({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:i=si[0],onBusinessUnitChange:n,onSearch:d,className:r,logo:u="/headerlogo.png",appName:p="Nuvia",tagline:c="Collaboration Platform"}){let[g,P]=Ma.useState({}),[S,x]=Ia("sidebar-favorites",{}),[A,y]=Ma.useState(null),[z,_]=Ma.useState(""),w=f=>{P(te=>({...te,[f]:!te[f]}))},R=f=>{n?.(f)},re=()=>{z.trim()&&d?.(z.trim())},C=f=>{f.key==="Enter"&&(f.preventDefault(),re())},j=(f,te)=>{let G=S[f]||[],Le=G.includes(te)?G.filter(De=>De!==te):G.concat(te);x({...S,[f]:Le})},q=f=>{if(!f.items||!f.maxItems||f.items.length<=f.maxItems)return f.items||[];let te=S[f.id]||[],G=f.items.filter(De=>te.includes(De.id)),Le=f.items.filter(De=>!te.includes(De.id));return[...G,...Le].slice(0,f.maxItems)},U=f=>f.maxItems&&f.items&&f.items.length>f.maxItems,se=e,H=f=>{let te=U(f),G=q(f),Le=(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[f.icon,(0,_o.jsx)("span",{children:f.title})]}),f.badge&&(0,_o.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:f.badge}),f.items&&(0,_o.jsx)(At.ChevronDown,{className:b("ml-2 h-4 w-4 transition-transform",g[f.title]?"rotate-180":"")})]}),De=b("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",f.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return f.url?(0,_o.jsx)(no.default,{href:f.url,className:De,onClick:a?o:void 0,children:Le}):(0,_o.jsx)("button",{className:De,onClick:()=>f.items&&w(f.title),children:Le})},T=()=>{let f=e.find(G=>G.id===A);if(!f||!f.items||!f.maxItems)return null;let te=S[f.id]||[];return(0,_o.jsx)(We,{open:!!A,onOpenChange:G=>!G&&y(null),children:(0,_o.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,_o.jsxs)(ze,{children:[(0,_o.jsxs)(Ue,{children:["Manage ",f.title," Favorites"]}),(0,_o.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",f.maxItems," items to show in ",f.title.toLowerCase(),"."]})]}),(0,_o.jsx)(Qt,{className:"max-h-96 pr-4",children:(0,_o.jsx)("div",{className:"space-y-4",children:f.items.map(G=>(0,_o.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_o.jsx)(io,{id:G.id,checked:te.includes(G.id),onCheckedChange:()=>j(f.id,G.id),disabled:!te.includes(G.id)&&te.length>=(f.maxItems||0)}),(0,_o.jsxs)("label",{htmlFor:G.id,className:"flex items-center gap-2 text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 cursor-pointer flex-1",children:[G.title,G.badge&&(0,_o.jsx)(de,{variant:"outline",className:"text-xs",children:G.badge})]})]},G.id))})})]})})},he=(0,_o.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_o.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,_o.jsx)("img",{src:u,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)("h2",{className:"font-semibold",children:p}),(0,_o.jsx)("p",{className:"text-xs text-muted-foreground",children:c})]})]}),a&&(0,_o.jsx)(N,{variant:"ghost",size:"icon",onClick:o,children:(0,_o.jsx)(At._o,{className:"h-5 w-5"})})]}),(0,_o.jsx)("div",{className:"px-3 py-2",children:(0,_o.jsxs)("div",{className:"relative",children:[(0,_o.jsx)(At.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,_o.jsx)(ne,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:z,onChange:f=>_(f.target.value),onKeyPress:C})]})}),(0,_o.jsx)(Qt,{className:"flex-1 px-3 py-2",children:(0,_o.jsx)("div",{className:"space-y-1",children:se.map(f=>(0,_o.jsxs)("div",{className:"mb-1",children:[H(f),f.items&&g[f.title]&&(0,_o.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-_o pl-3",children:[q(f).map(te=>(0,_o.jsxs)(no.default,{href:te.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[te.title,te.badge&&(0,_o.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:te.badge})]},te.id)),U(f)&&f.items&&f.items.length>q(f).length&&(0,_o.jsxs)("button",{onClick:()=>y(f.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",f.items.length-q(f).length," more available"]})]})]},f.id))})}),(0,_o.jsx)("div",{className:"p-3",children:(0,_o.jsx)("div",{className:"space-y-1",children:(0,_o.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,_o.jsx)(At.Settings,{className:"h-5 w-5"}),(0,_o.jsx)("span",{children:"Settings"})]})})}),(0,_o.jsx)(T,{})]});return a?(0,_o.jsx)("div",{className:b("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:he}):(0,_o.jsx)("div",{className:b("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:he})}var Ba=le(require("react")),yt=le(require("@radix-ui/react-avatar"));var fa=Ba.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(yt.Root,{ref:a,className:b("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));fa.displayName=yt.Root.displayName;var lo=Ba.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(yt.Image,{ref:a,className:b("aspect-square h-full w-full",e),...t}));lo.displayName=yt.Image.displayName;var va=Ba.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(yt.Fallback,{ref:a,className:b("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));va.displayName=yt.Fallback.displayName;var li=le(require("react")),dt=le(require("@radix-ui/react-tooltip"));var La=dt.Provider,Oa=dt.Root,za=dt.Trigger,ba=li.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,_o.jsx)(dt.Portal,{children:(0,_o.jsx)(dt.Content,{ref:o,sideOffset:t,className:b("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));ba.displayName=dt.Content.displayName;var di=require("next-themes");function ci(){let{setTheme:e,theme:t}=(0,di.useTheme)();return(0,_o.jsx)(La,{children:(0,_o.jsxs)(Oa,{children:[(0,_o.jsx)(za,{asChild:!0,children:(0,_o.jsxs)(N,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,_o.jsx)(At.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,_o.jsx)(At.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,_o.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,_o.jsx)(ba,{children:"Toggle theme"})]})})}function mi({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:i,className:n}){let d=e.filter(p=>!p.read),r=d.length,u=p=>{switch(p){case"info":return(0,_o.jsx)(At.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,_o.jsx)(At.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,_o.jsx)(At.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,_o.jsx)(At.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,_o.jsx)(Ya.AnimatePresence,{children:t&&(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(Ya.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,_o.jsx)(Ya.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:b("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-_o bg-background shadow-lg md:w-96",n),children:(0,_o.jsxs)("div",{className:"flex h-full flex-col",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)(At.Bell,{className:"h-5 w-5"}),(0,_o.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,_o.jsxs)(de,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,_o.jsxs)(N,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,_o.jsx)(At._o,{className:"h-5 w-5"}),(0,_o.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,_o.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,_o.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"_o":""]}),(0,_o.jsx)(N,{variant:"ghost",size:"sm",onClick:i,className:"text-sm",children:"Dismiss all"})]}),d.length>0?(0,_o.jsx)(Qt,{className:"flex-1",children:(0,_o.jsx)("div",{className:"divide-y",children:d.map(p=>(0,_o.jsxs)("div",{className:b("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,_o.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:u(p.type)}),(0,_o.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("p",{className:"font-medium",children:p.title}),(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("p",{className:"text-xs text-muted-foreground",children:p.time}),(0,_o.jsx)(N,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(p.id),title:"Dismiss",children:(0,_o.jsx)(At.Check,{className:"h-3 w-3"})})]})]}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground",children:p.description}),p.actionLabel&&(0,_o.jsxs)(N,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:p.onAction,children:[p.actionLabel,(0,_o.jsx)(At.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},p.id))})}):(0,_o.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,_o.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,_o.jsx)(At.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,_o.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,_o.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var zt=le(require("@radix-ui/react-tabs"));function pi({className:e,...t}){return(0,_o.jsx)(zt.Root,{"data-slot":"tabs",className:b("flex flex-col gap-2",e),...t})}function ui({className:e,...t}){return(0,_o.jsx)(zt.List,{"data-slot":"tabs-list",className:b("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function gi({className:e,...t}){return(0,_o.jsx)(zt.Trigger,{"data-slot":"tabs-trigger",className:b("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var xt=le(require("react")),Y=le(require("@radix-ui/react-dropdown-menu")),Zt=require("@radix-ui/react-icons");var fi=Y.Root,vi=Y.Trigger;var un=xt.forwardRef(({className:e,inset:t,children:a,...o},i)=>(0,_o.jsxs)(Y.SubTrigger,{ref:i,className:b("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,_o.jsx)(Zt.ChevronRightIcon,{className:"ml-auto"})]}));un.displayName=Y.SubTrigger.displayName;var gn=xt.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Y.SubContent,{ref:a,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));gn.displayName=Y.SubContent.displayName;var mo=xt.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,_o.jsx)(Y.Portal,{children:(0,_o.jsx)(Y.Content,{ref:o,sideOffset:t,className:b("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));mo.displayName=Y.Content.displayName;var po=xt.forwardRef(({className:e,inset:t,...a},o)=>(0,_o.jsx)(Y.Item,{ref:o,className:b("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));po.displayName=Y.Item.displayName;var fn=xt.forwardRef(({className:e,children:t,checked:a,...o},i)=>(0,_o.jsxs)(Y.CheckboxItem,{ref:i,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,_o.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,_o.jsx)(Y.ItemIndicator,{children:(0,_o.jsx)(Zt.CheckIcon,{className:"h-4 w-4"})})}),t]}));fn.displayName=Y.CheckboxItem.displayName;var vn=xt.forwardRef(({className:e,children:t,...a},o)=>(0,_o.jsxs)(Y.RadioItem,{ref:o,className:b("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,_o.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,_o.jsx)(Y.ItemIndicator,{children:(0,_o.jsx)(Zt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));vn.displayName=Y.RadioItem.displayName;var bn=xt.forwardRef(({className:e,inset:t,...a},o)=>(0,_o.jsx)(Y.Label,{ref:o,className:b("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));bn.displayName=Y.Label.displayName;var hn=xt.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Y.Separator,{ref:a,className:b("-mx-1 my-1 h-px bg-muted",e),...t}));hn.displayName=Y.Separator.displayName;var yn=({className:e,...t})=>(0,_o.jsx)("span",{className:b("ml-auto text-xs tracking-widest opacity-60",e),...t});yn.displayName="DropdownMenuShortcut";function Ha({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:i="700px",gridCols:n=6}){let d=a.find(r=>r.value===e);return(0,_o.jsxs)(Ya.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,_o.jsx)("div",{className:"hidden lg:block",children:(0,_o.jsx)(pi,{value:e,onValueChange:t,children:(0,_o.jsx)(ui,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:i,gridTemplateColumns:`repeat(${Math.min(n,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,_o.jsx)(Ya.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,_o.jsx)(gi,{value:r.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:r.label})},r.value))})})}),(0,_o.jsx)("div",{className:"lg:hidden",children:(0,_o.jsxs)(fi,{children:[(0,_o.jsx)(vi,{asChild:!0,children:(0,_o.jsxs)(N,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[d?.label||"Select",(0,_o.jsx)(At.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,_o.jsx)(mo,{align:"center",className:"w-[180px]",children:a.map(r=>(0,_o.jsx)(po,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function hi({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:i=!0,className:n,activeTab:d="assistant",onTabChange:r,showTabs:u=!0,tabOptions:p=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:c,actionIcon:g=(0,_o.jsx)(At.Bot,{className:"mr-2 h-4 w-4"}),actionText:P="Action",onNotificationRemove:S,onRemoveAll:x,logo:A="/headerlogo.png",appName:y="Nuvia",tagline:z="Collaboration Platform"}){let[_,w]=(0,Ao.useState)(!1),[R,re]=(0,Ao.useState)(t),C=R.filter(U=>!U.read).length,j=U=>{re(se=>se.filter(H=>H.id!==U)),S?.(U)},q=()=>{re(U=>U.filter(se=>se.read)),x?.()};return(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${n||""}`,children:[(0,_o.jsx)(N,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,_o.jsx)(At.Menu,{className:"h-5 w-5"})}),(0,_o.jsx)(N,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,_o.jsx)(At.PanelLeft,{className:"h-5 w-5"})}),!i&&(0,_o.jsxs)(Ya.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,_o.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,_o.jsx)("img",{src:A,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)("h2",{className:"font-semibold text-sm",children:y}),(0,_o.jsx)("p",{className:"text-xs text-muted-foreground",children:z})]})]}),(0,_o.jsxs)("div",{className:"flex flex-1 items-center",children:[u&&(0,_o.jsx)(Ha,{activeTab:d,onTabChange:r,tabOptions:p}),(0,_o.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,_o.jsx)(Ya.motion.div,{className:"hidden md:flex gap-2",initial:{opacity:0,x:20},animate:{opacity:1,x:0},transition:{duration:.3,ease:"easeOut",delay:.1},children:(0,_o.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,_o.jsxs)(N,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:c,children:[g,P]})})}),(0,_o.jsx)(ci,{}),(0,_o.jsx)(La,{children:(0,_o.jsxs)(Oa,{children:[(0,_o.jsx)(za,{asChild:!0,children:(0,_o.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,_o.jsxs)(N,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>w(!0),children:[(0,_o.jsx)(Ya.motion.div,{animate:C>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:C>0?1/0:0,repeatDelay:3},children:(0,_o.jsx)(At.Bell,{className:"h-5 w-5"})}),C>0&&(0,_o.jsx)(Ya.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:C})]})})}),(0,_o.jsx)(ba,{children:"Notifications"})]})}),(0,_o.jsx)(Ya.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,_o.jsxs)(fa,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,_o.jsx)(lo,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,_o.jsx)(va,{})]})})]})]})]}),(0,_o.jsx)(mi,{notifications:R,open:_,onClose:()=>w(!1),onNotificationRemove:j,onRemoveAll:q})]})}var yi=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,_o.jsx)(At.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function wi({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:i=yi[0],onBusinessUnitChange:n,onSearch:d,businessUnits:r=yi,activeTab:u,onTabChange:p,showTabs:c=!1,onActionClick:g,actionIcon:P,actionText:S="Action",onNotificationRemove:x,onRemoveAll:A,logo:y="/headerlogo.png",appName:z="Nuvia",tagline:_="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[R,re]=(0,Ao.useState)(!w),[C,j]=(0,Ao.useState)(!1),[q,U]=(0,Ao.useState)(i),se=H=>{U(H),n?.(H)};return(0,_o.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[C&&(0,_o.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>j(!1)}),(0,_o.jsx)("div",{className:"md:hidden",children:(0,_o.jsx)(so,{items:e,isOpen:C,isMobile:!0,onClose:()=>j(!1),currentBusinessUnit:q,onBusinessUnitChange:se,onSearch:d,logo:y,appName:z,tagline:_})}),(0,_o.jsx)("div",{className:"hidden md:block",children:(0,_o.jsx)(so,{items:e,isOpen:R,isMobile:!1,currentBusinessUnit:q,onBusinessUnitChange:se,onSearch:d,logo:y,appName:z,tagline:_})}),(0,_o.jsxs)("div",{className:b("min-h-screen fixed w-full transition-all duration-300 ease-in-out",R?"md:pl-64":"md:pl-0"),children:[(0,_o.jsx)(hi,{title:a,notifications:o,onToggleSidebar:()=>re(!R),onToggleMobileMenu:()=>j(!0),sidebarOpen:R,activeTab:u,onTabChange:p,showTabs:c,onActionClick:g,actionIcon:P,actionText:S,onNotificationRemove:x,onRemoveAll:A,logo:y,appName:z,tagline:_}),(0,_o.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var xn=[{key:"kanban",icon:At.Kanban,label:"Kanban",color:"bg-primary",title:"Kanban View"},{key:"planning",icon:At.Calendar,label:"Planning",color:"bg-brand-plum",title:"Planning View",hiddenOnMobile:!0},{key:"epics",icon:At.Target,label:"Epics",color:"bg-brand-orange",title:"Epic Planning"},{key:"files",icon:At.FileText,label:"Files",color:"bg-brand-green",title:"Files"},{key:"tasks",icon:At.Calendar,label:"Tasks",color:"bg-brand-cyan",title:"Tasks"}],Ni=({currentView:e,onViewChange:t,children:a})=>(0,_o.jsxs)("div",{className:"flex w-full h-screen",children:[(0,_o.jsx)("div",{className:"w-12 h-full bg-sidebar-background flex flex-col flex-shrink-0",children:xn.map(o=>{let i=o.icon,n=e===o.key;return(0,_o.jsxs)("button",{onClick:()=>t(o.key),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${n?o.color:`${o.color}/75 hover:${o.color}`} ${o.hiddenOnMobile?"hidden md:flex":""} hover:w-28 hover:justify-start hover:pl-3`,title:o.title,children:[(0,_o.jsx)(i,{className:"h-4 w-4 flex-shrink-0"}),(0,_o.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:o.label})]},o.key)})}),(0,_o.jsx)("div",{className:"flex-1 min-w-0 px-4 md:px-6 h-full overflow-auto",children:(0,_o.jsx)("div",{className:"w-full h-full",children:a})})]});var pe=le(require("react"));var Ut=le(require("react"));var ve=Ut.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:b("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ve.displayName="Card";var wn=Ut.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:b("flex flex-col space-y-1.5 p-6",e),...t}));wn.displayName="CardHeader";var Nn=Ut.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:b("font-semibold leading-none tracking-tight",e),...t}));Nn.displayName="CardTitle";var Cn=Ut.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:b("text-sm text-muted-foreground",e),...t}));Cn.displayName="CardDescription";var ea=Ut.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:b("p-6 _o-0",e),...t}));ea.displayName="CardContent";var kn=Ut.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("div",{ref:a,className:b("flex items-center p-6 _o-0",e),...t}));kn.displayName="CardFooter";var Ci=({title:e,status:t,taskCount:a,children:o,onDrop:i,isCompact:n=!1,height:d})=>{let r=c=>{c.preventDefault()},u=c=>{c.preventDefault(),i(t)};return(0,_o.jsxs)(ve,{className:`p-4 bg-card border-_o-4 ${(()=>{switch(t){case"todo":return"border-_o-gray-400";case"in-progress":return"border-_o-blue-500";case"review":return"border-_o-orange-500";case"done":return"border-_o-green-500";default:return"border-_o-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col ${n?"lg:max-w-xs":""}`,style:{height:d||"calc(100vh - 350px)"},onDragOver:r,onDrop:u,children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,_o.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${n?"text-base":"text-lg"}`,children:e}),(0,_o.jsx)(de,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,_o.jsx)("div",{className:"flex-1 overflow-y-auto space-y-4 min-h-0",children:o})]})};var ya=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:i=!1})=>{let n=c=>{a(e)},d=()=>{o(e)},r=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},u=()=>{switch(e.type){case"story":return(0,_o.jsx)(At.BookOpen,{className:"h-3 w-3"});case"bug":return(0,_o.jsx)(At.Bug,{className:"h-3 w-3"});case"spike":return(0,_o.jsx)(At.Zap,{className:"h-3 w-3"});case"task":default:return(0,_o.jsx)(At.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,_o.jsx)(ve,{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:d,children:(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${p()}`,children:u()}),(0,_o.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.name})]})}):(0,_o.jsxs)(ve,{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:d,children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,_o.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${p()}`,children:[u(),(0,_o.jsx)("span",{className:"capitalize",children:e.type})]}),(0,_o.jsxs)("div",{className:"flex gap-1",children:[(0,_o.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${r()}`,children:e.priority}),(0,_o.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,_o.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.name}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,_o.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,_o.jsx)(At.User,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:e.assignee?.value?.name})]}),(0,_o.jsxs)("div",{className:"flex items-center gap-1",children:[(0,_o.jsx)(At.Calendar,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:new Date(e.createdAt).toLocaleDateString()})]})]})]})};var ki=le(require("react")),Be=ki.forwardRef(({className:e,...t},a)=>(0,_o.jsx)("textarea",{className:b("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}));Be.displayName="Textarea";var Q=le(require("@radix-ui/react-select")),Mt=le(require("react")),qe=Q.Root;var ct=Q.Value,He=Mt.forwardRef(({children:e,className:t,...a},o)=>(0,_o.jsxs)(Q.Trigger,{className:b("flex h-10 w-full items-center justify-between rounded border border-input bg-background px-3 py-2 text-inherit ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t),ref:o,...a,children:[e,(0,_o.jsx)(Q.Icon,{asChild:!0,children:(0,_o.jsx)(At.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));He.displayName=Q.Trigger.displayName;var Di=Mt.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Q.ScrollUpButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,_o.jsx)(At.ChevronUp,{className:"h-4 w-4"})}));Di.displayName=Q.ScrollUpButton.displayName;var Ti=Mt.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Q.ScrollDownButton,{className:b("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,_o.jsx)(At.ChevronDown,{className:"h-4 w-4"})}));Ti.displayName=Q.ScrollDownButton.displayName;var Ve=Mt.forwardRef(({children:e,className:t,position:a="popper",...o},i)=>(0,_o.jsx)(Q.Portal,{children:(0,_o.jsxs)(Q.Content,{className:b("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:i,...o,children:[(0,_o.jsx)(Di,{}),(0,_o.jsx)(Q.Viewport,{className:b("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,_o.jsx)(Ti,{})]})}));Ve.displayName=Q.Content.displayName;var Sn=Mt.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Q.Label,{className:b("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Sn.displayName=Q.Label.displayName;var be=Mt.forwardRef(({children:e,className:t,...a},o)=>(0,_o.jsxs)(Q.Item,{className:b("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,_o.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,_o.jsx)(Q.ItemIndicator,{children:(0,_o.jsx)(At.Check,{className:"h-4 w-4"})})}),(0,_o.jsx)(Q.ItemText,{children:e})]}));be.displayName=Q.Item.displayName;var Dn=Mt.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(Q.Separator,{className:b("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Dn.displayName=Q.Separator.displayName;var Pi=le(require("react")),fo=le(require("@radix-ui/react-label"));var Tn=(0,Wo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),B=Pi.forwardRef(({className:e,...t},a)=>(0,_o.jsx)(fo.Root,{ref:a,className:b(Tn(),e),...t}));B.displayName=fo.Root.displayName;var Gt=le(require("react")),ta=le(require("@radix-ui/react-toggle-group"));var Ei=le(require("react")),vo=le(require("@radix-ui/react-toggle"));var bo=(0,Wo.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"}}),Pn=Ei.forwardRef(({className:e,variant:t,size:a,...o},i)=>(0,_o.jsx)(vo.Root,{ref:i,className:b(bo({variant:t,size:a,className:e})),...o}));Pn.displayName=vo.Root.displayName;var Bi=Gt.createContext({size:"default",variant:"default"}),$t=Gt.forwardRef(({className:e,variant:t,size:a,children:o,...i},n)=>(0,_o.jsx)(ta.Root,{ref:n,className:b("flex items-center justify-center gap-1",e),...i,children:(0,_o.jsx)(Bi.Provider,{value:{variant:t,size:a},children:o})}));$t.displayName=ta.Root.displayName;var Wt=Gt.forwardRef(({className:e,children:t,variant:a,size:o,...i},n)=>{let d=Gt.useContext(Bi);return(0,_o.jsx)(ta.Item,{ref:n,className:b(bo({variant:d.variant||a,size:d.size||o}),e),...i,children:t})});Wt.displayName=ta.Item.displayName;var Rn=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:At.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:At.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:At.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:At.Zap}],An=[{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"}],aa=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:i,assignees:n,defaultEpicId:d})=>{let[r,u]=(0,Ao.useState)({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:"",sprint:"none",assignee:""});(0,Ao.useEffect)(()=>{e&&d&&u(g=>({...g,epic:d}))},[e,d]),(0,Ao.useEffect)(()=>{e&&u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:d||"",sprint:"none",assignee:""})},[e]);let p=g=>{g.preventDefault(),r.name.trim()&&(a({name:r.name.trim(),description:r.description.trim(),status:"todo",priority:r.priority,type:r.type,storyPoints:r.storyPoints,epic:Number(r.epic),sprint:Number(r.sprint),assignee:r.assignee.trim()?{relationTo:"digital-colleagues",value:Number(r.assignee)}:null,dateLogged:new Date().toISOString(),index:0}),u({name:"",description:"",status:"todo",priority:"medium",type:"story",storyPoints:1,epic:d||"",sprint:"",assignee:""}),t())},c=(g,P)=>{u(S=>({...S,[g]:P}))};return(0,_o.jsx)(We,{open:e,onOpenChange:t,children:(0,_o.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,_o.jsx)(ze,{children:(0,_o.jsx)(Ue,{children:"Add New Task"})}),(0,_o.jsxs)("form",{onSubmit:p,className:"space-y-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"name",children:"Task Title"}),(0,_o.jsx)(ne,{id:"name",value:r.name,onChange:g=>c("name",g.target.value),placeholder:"Enter task title",required:!0})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"description",children:"Description"}),(0,_o.jsx)(Be,{id:"description",value:r.description,onChange:g=>c("description",g.target.value),placeholder:"Enter task description",rows:3})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Type"}),(0,_o.jsx)($t,{type:"single",value:r.type||"",onValueChange:g=>g&&c("type",g),children:Rn.map(g=>{let P=g.icon;return(0,_o.jsxs)(Wt,{value:g.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,_o.jsx)(P,{className:"h-4 w-4"}),g.label]},g.value)})})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Priority"}),(0,_o.jsx)($t,{type:"single",value:r.priority||"",onValueChange:g=>g&&c("priority",g),children:An.map(g=>(0,_o.jsx)(Wt,{value:g.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:g.label},g.value))})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"points",children:"Story Points"}),(0,_o.jsx)(ne,{id:"points",type:"number",min:"1",max:"100",value:r.storyPoints,onChange:g=>c("storyPoints",parseInt(g.target.value)||1),placeholder:"Enter story points",required:!0})]}),!d&&(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"epic",children:"Epic"}),(0,_o.jsxs)(qe,{value:r.epic,onValueChange:g=>c("epic",g),children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(ct,{placeholder:"Select an epic"})}),(0,_o.jsx)(Ve,{children:o.map(g=>(0,_o.jsx)(be,{value:g.id.toString(),children:(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${g.color}`}),g.name]})},g.id))})]})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,_o.jsxs)(qe,{value:r.sprint,onValueChange:g=>c("sprint",g),children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(ct,{placeholder:"Select a sprint"})}),(0,_o.jsxs)(Ve,{children:[(0,_o.jsx)(be,{value:"none",children:"No Sprint"}),i.map(g=>(0,_o.jsx)(be,{value:g.id.toString(),children:(0,_o.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"sprint",children:"Assignee"}),(0,_o.jsxs)(qe,{value:r.assignee,onValueChange:g=>c("assignee",g),children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(ct,{placeholder:"Select an Assignee"})}),(0,_o.jsxs)(Ve,{children:[(0,_o.jsx)(be,{value:"none",children:"No Assignee"}),n.map(g=>(0,_o.jsx)(be,{value:g.id.toString(),children:(0,_o.jsx)("div",{className:"flex items-center gap-2",children:g.name})},g.id))]})]})]}),(0,_o.jsxs)(ua,{children:[(0,_o.jsx)(N,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,_o.jsx)(N,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var yo=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:i,className:n="",disabled:d=!1})=>{let[r,u]=(0,Ao.useState)(!1),[p,c]=(0,Ao.useState)(""),g=()=>{d||(u(!0),c(t))},P=async()=>{p!==t&&await i(e,p),u(!1)},S=x=>{x.key==="Enter"&&!o||x.key==="Enter"&&x.ctrlKey&&o?P():x.key==="Escape"&&(u(!1),c(""))};return(0,_o.jsxs)("div",{className:`space-y-2 ${n}`,children:[(0,_o.jsx)(B,{children:a}),r?o?(0,_o.jsx)(Be,{value:p,onChange:x=>c(x.target.value),onBlur:P,onKeyDown:S,autoFocus:!0,rows:4,className:"resize-none"}):(0,_o.jsx)(ne,{value:p,onChange:x=>c(x.target.value),onBlur:P,onKeyPress:S,autoFocus:!0,className:"text-lg font-medium"}):(0,_o.jsxs)("div",{onClick:g,className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 p-2 rounded border border-transparent hover:border-border transition-colors group ${o?"min-h-[100px]":"min-h-[40px]"} flex items-start gap-2`,children:[(0,_o.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!d&&(0,_o.jsx)(At.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Oi=({comments:e,onAddComment:t})=>{let[a,o]=(0,Ao.useState)(""),i=d=>d.split(" ").map(r=>r[0]).join("").toUpperCase(),n=()=>{a.trim()&&(t(a),o(""))};return(0,_o.jsxs)("div",{className:"space-y-4",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)($a.MessageSquare,{className:"h-5 w-5"}),(0,_o.jsx)(B,{className:"text-lg font-medium",children:"Comments"}),(0,_o.jsx)(de,{variant:"secondary",children:e.length})]}),(0,_o.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(d=>(0,_o.jsxs)("div",{className:"flex gap-3 p-3 bg-muted/50 rounded-lg",children:[(0,_o.jsx)(fa,{className:"h-8 w-8 mt-1",children:(0,_o.jsx)(va,{className:"text-xs bg-muted text-muted-foreground",children:i(d.author)})}),(0,_o.jsxs)("div",{className:"flex-1",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,_o.jsx)("span",{className:"font-medium text-sm",children:d.author}),(0,_o.jsxs)("span",{className:"text-xs text-muted-foreground",children:[d.createdAt.toLocaleDateString()," at ",d.createdAt.toLocaleTimeString()]})]}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground",children:d.text})]})]},d.id))}),(0,_o.jsxs)("div",{className:"flex gap-2",children:[(0,_o.jsx)(Be,{value:a,onChange:d=>o(d.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,_o.jsx)(N,{onClick:n,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,_o.jsx)($a.Send,{className:"h-4 w-4"})})]})]})};var Wa=({label:e,value:t,onValueChange:a,options:o,showColor:i=!1,disabled:n=!1})=>{let[d,r]=(0,Ao.useState)(!1),u=o.find(c=>c.value===t);return(0,_o.jsxs)("div",{className:"space-y-1",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:e}),(0,_o.jsxs)(qe,{value:t,onValueChange:a,open:d,onOpenChange:c=>{n||r(c)},disabled:n,children:[(0,_o.jsx)(He,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,_o.jsxs)(de,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&r(!d),children:[i&&u?.color&&(0,_o.jsx)("div",{className:`w-2 h-2 rounded-full ${u.color} mr-1`}),u?.label||"Select..."]})}),(0,_o.jsx)(Ve,{children:o.map(c=>(0,_o.jsx)(be,{value:c.value,children:i&&c.color?(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.label]}):c.label},c.value))})]})]})};var Ui=({label:e,value:t,onValueChange:a,options:o,placeholder:i="Search...",allowCustomValue:n=!1,disabled:d=!1})=>{let[r,u]=(0,Ao.useState)(!1),[p,c]=(0,Ao.useState)(""),g=o.find(y=>y.value===t),P=o.filter(y=>y.label.toLowerCase().includes(p.toLowerCase())),S=y=>{a(y),u(!1),c("")},x=()=>{n&&p.trim()&&!o.find(y=>y.value===p.trim())&&(a(p.trim()),u(!1),c(""))};return(0,_o.jsxs)("div",{className:"space-y-1",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:e}),(0,_o.jsxs)(qe,{value:t,onValueChange:S,open:r,onOpenChange:y=>{d||u(y)},disabled:d,children:[(0,_o.jsx)(He,{className:"h-auto p-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,_o.jsx)(de,{variant:"secondary",className:`${d?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!d&&u(!r),children:g?.label||t||"Select..."})}),(0,_o.jsxs)(Ve,{children:[(0,_o.jsx)("div",{className:"p-2",children:(0,_o.jsx)(ne,{placeholder:i,value:p,onChange:y=>c(y.target.value),onKeyDown:y=>{y.key==="Enter"&&n&&x()},className:"mb-2"})}),P.map(y=>(0,_o.jsx)(be,{value:y.value,children:y.label},y.value)),n&&p.trim()&&!P.find(y=>y.value===p.trim())&&(0,_o.jsxs)(be,{value:p.trim(),children:['Add "',p.trim(),'"']})]})]})]})};var Se=e=>e?typeof e=="number"?e:typeof e=="object"&&e&&"id"in e?e.id:0:0;var En=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:At.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:At.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:At.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:At.Zap}],In=[{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 ji=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:i,onClose:n,onDelete:d,isUpdating:r=!1,isDeleting:u=!1,deleteState:p="idle",teamMembers:c})=>{let[g,P]=(0,Ao.useState)(e.storyPoints),S=(0,Ao.useRef)(null),[x,A]=(0,Ao.useState)(c);(0,Ao.useEffect)(()=>{A(c)},[c]);let y=(0,Ao.useCallback)((w,R)=>{S.current&&clearTimeout(S.current),S.current=setTimeout(()=>{i(w,R)},500)},[i]);(0,Ao.useEffect)(()=>{y("storyPoints",g?.toString()||"1")},[g]);let z=w=>w.split(" ").map(R=>R[0]).join("").toUpperCase(),_=()=>p==="loading"?(0,_o.jsxs)(N,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,_o.jsx)(At.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):p==="success"?(0,_o.jsxs)(N,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,_o.jsx)(At.Check,{className:"h-3 w-3"}),"Deleted"]}):p==="error"?(0,_o.jsxs)(N,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,_o.jsx)(At._o,{className:"h-3 w-3"}),"Delete failed"]}):(0,_o.jsxs)(N,{onClick:d,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:r||u,children:[(0,_o.jsx)(At.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,_o.jsxs)("div",{className:"flex flex-col h-full",children:[(0,_o.jsxs)("div",{className:"space-y-4",style:{opacity:r?.6:1},children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Status"}),(0,_o.jsx)(Wa,{label:"",value:e.status,onValueChange:w=>i("status",w),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:r})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Type"}),(0,_o.jsx)($t,{type:"single",value:e.type||"",onValueChange:w=>w&&i("type",w),className:"grid grid-cols-2 gap-1",disabled:r,children:En.map(w=>{let R=w.icon;return(0,_o.jsxs)(Wt,{value:w.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:r,children:[(0,_o.jsx)(R,{className:"h-3 w-3"}),w.label]},w.value)})})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,_o.jsx)($t,{type:"single",value:e.priority||"",onValueChange:w=>w&&i("priority",w),className:"grid grid-cols-3 gap-1",disabled:r,children:In.map(w=>(0,_o.jsx)(Wt,{value:w.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:r,children:w.label},w.value))})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,_o.jsx)("input",{type:"number",min:"1",max:"100",value:g||1,onChange:w=>{let R=Number(w.target.value);R<1?P(1):R>100?P(100):P(R)},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:r})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,_o.jsx)(Wa,{label:"",value:Se(e.epic).toString(),onValueChange:w=>i("epic",w),options:(t||[]).map(w=>({value:w.id.toString(),label:w?.name,color:w.color})),showColor:!0,disabled:r})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,_o.jsx)(Wa,{label:"",value:Se(e.sprint).toString()||"none",onValueChange:w=>i("sprint",w==="none"?"":w),options:[{value:"none",label:"No Sprint"},...(a||[]).map(w=>({value:w.id.toString(),label:`${w?.name}`}))],disabled:r})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,_o.jsx)(Ui,{label:"",value:e.assignee?.value?.name,onValueChange:w=>i("assignee",w),options:x.map(w=>({value:`${typeof w.email=="string"?"users":"digital-colleagues"}:${w.id}`,label:w?.name||""})),placeholder:"Search team members...",allowCustomValue:!0,disabled:r})]})]}),(0,_o.jsxs)("div",{className:"mt-auto _o-4 space-y-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(N,{onClick:n,variant:"outline",className:"w-full h-8 text-xs",disabled:r||u,children:"Close"}),_()]}),(0,_o.jsxs)("div",{className:"_o-4 border-t border-border space-y-2",children:[(0,_o.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,_o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,_o.jsx)(At.User,{className:"h-3 w-3"}),(0,_o.jsx)("span",{children:"System"})]})]}),(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,_o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,_o.jsx)(At.Calendar,{className:"h-3 w-3"}),(0,_o.jsx)("span",{children:new Date(e.createdAt)?.toLocaleDateString()})]})]}),(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,_o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,_o.jsx)(At.Clock,{className:"h-3 w-3"}),(0,_o.jsxs)("span",{children:[new Date(o).toLocaleDateString()," at"," ",new Date(o).toLocaleTimeString()]})]})]})]})]})]})};var Hi=({isOpen:e,onClose:t,initialTask:a,epics:o,sprints:i,onUpdateTask:n,onDeleteTask:d,onAddComment:r,colleagues:u})=>{let[p,c]=(0,Ao.useState)(a),[g,P]=(0,Ao.useState)(new Date),[S,x]=(0,Ao.useState)("idle"),[A,y]=(0,Ao.useState)("idle"),[z,_]=(0,Ao.useState)([]),[w,R]=(0,Ao.useState)(u);(0,Ao.useEffect)(()=>{c(a)},[a]);let re=async(T,he)=>{if(he!==p[T]){x("loading");try{await n(p.id.toString(),{[T]:he}),P(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch(f){console.log("error",f),x("error"),setTimeout(()=>x("idle"),3e3)}}},C=async(T,he)=>{if(he!==p[T]){x("loading");try{await n(p.id.toString(),{[T]:he}),P(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch(f){console.log("error",f),x("error"),setTimeout(()=>x("idle"),3e3)}}},j=async T=>{if(r){x("loading");try{await r?.({content:T,taskId:p.id.toString()}),P(new Date),x("success"),setTimeout(()=>x("idle"),1500)}catch{x("error"),setTimeout(()=>x("idle"),3e3)}}},q=async()=>{y("loading");try{await d(p.id.toString()),y("success"),setTimeout(()=>{t(),y("idle")},1e3)}catch{y("error"),setTimeout(()=>y("idle"),3e3)}},U=S!=="loading"&&A!=="loading",se=()=>{U&&t()},H=()=>S==="loading"?(0,_o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,_o.jsx)(At.Loader2,{className:"h-4 w-4 animate-spin"}),(0,_o.jsx)("span",{children:"Updating..."})]}):S==="success"?(0,_o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,_o.jsx)(At.Check,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:"Updated successfully"})]}):S==="error"?(0,_o.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,_o.jsx)(At._o,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:"Update failed"})]}):null;return(0,_o.jsx)(We,{open:e,onOpenChange:se,children:(0,_o.jsxs)(Oe,{className:"max-w-3xl max-h-[80vh] overflow-y-auto p-4",children:[(0,_o.jsxs)(ze,{children:[(0,_o.jsx)(Ue,{className:"sr-only",children:p?.name}),(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("div",{className:"flex-1",children:H()}),!U&&(0,_o.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,_o.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,_o.jsx)(yo,{fieldName:"name",value:p.name||"",label:"",onSave:re,className:"border-b border-border pb-3",disabled:S==="loading"}),(0,_o.jsx)(yo,{fieldName:"description",value:p.description||"",label:"Description",multiline:!0,onSave:re,disabled:S==="loading"}),(0,_o.jsx)(Oi,{comments:(p?.comments||[]).map(T=>({author:T.author.value.name||"",createdAt:new Date(T.timestamp),text:T.text,id:T.id||""})),onAddComment:j})]}),(0,_o.jsx)(ji,{task:p,epics:o,sprints:i,lastUpdated:g,onUpdateTask:C,onClose:se,onDelete:q,isUpdating:S==="loading",isDeleting:A==="loading",deleteState:A,teamMembers:w})]})]})})};var ia=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,i]=(0,Ao.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"],d=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],r=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],u=c=>{c.preventDefault(),o.name.trim()&&(a({name:o.name.trim(),description:o.description.trim(),color:o.color,confidence:o.confidence,phase:o.phase,startDate:o.startDate,endDate:o.endDate}),i({name:"",description:"",color:"bg-blue-500",confidence:"medium",phase:1,startDate:new Date().toISOString(),endDate:new Date().toISOString(),progress:0}),t())},p=(c,g)=>{i(P=>({...P,[c]:g}))};return(0,_o.jsx)(We,{open:e,onOpenChange:t,children:(0,_o.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,_o.jsx)(ze,{children:(0,_o.jsx)(Ue,{children:"Add New Epic"})}),(0,_o.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"name",children:"Epic Name"}),(0,_o.jsx)(ne,{id:"name",value:o.name,onChange:c=>p("name",c.target.value),placeholder:"Enter epic name",required:!0})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"description",children:"Description"}),(0,_o.jsx)(Be,{id:"description",value:o.description,onChange:c=>p("description",c.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Color"}),(0,_o.jsx)("div",{className:"flex gap-2 flex-wrap",children:n.map(c=>(0,_o.jsx)("button",{type:"button",onClick:()=>p("color",c),className:`w-8 h-8 rounded-full ${c} ${o.color===c?"ring-2 ring-gray-400":""}`},c))})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Confidence"}),(0,_o.jsxs)(qe,{value:o.confidence,onValueChange:c=>p("confidence",c),children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(ct,{})}),(0,_o.jsx)(Ve,{children:d.map(c=>(0,_o.jsx)(be,{value:c.value,children:c.label},c.value))})]})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Phase"}),(0,_o.jsxs)(qe,{value:o.phase.toString(),onValueChange:c=>p("phase",parseInt(c)),children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(ct,{})}),(0,_o.jsx)(Ve,{children:r.map(c=>(0,_o.jsx)(be,{value:c.value.toString(),children:c.label},c.value))})]})]})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Start Date"}),(0,_o.jsx)(ne,{type:"date",value:o.startDate,onChange:c=>p("startDate",c.target.value)})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"End Date"}),(0,_o.jsx)(ne,{type:"date",value:o.endDate,onChange:c=>p("endDate",c.target.value)})]})]}),(0,_o.jsxs)(ua,{children:[(0,_o.jsx)(N,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,_o.jsx)(N,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var _a=require("react-icons/fa");function gt({title:e,description:t,badge:a,primaryAction:o,secondaryAction:i,gradient:n,children:d,className:r}){let[u,p]=Ia(`hero-section-minimized-${e.replace(/\_o+/g,"-").toLowerCase()}`,!i&&!t),c=!i&&!t||u;return(0,_o.jsxs)(Ya.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${n} p-8 text-white ${r||""}`,children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,_o.jsx)(de,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,_o.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[c&&o&&(0,_o.jsx)(N,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(i||t)&&(0,_o.jsx)("button",{"aria-label":u?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>p(!u),style:{lineHeight:0},children:u?(0,_o.jsx)(_a.FaChevronDown,{size:22}):(0,_o.jsx)(_a.FaChevronUp,{size:22})})]})]}),!c&&(0,_o.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,_o.jsxs)("div",{className:"space-y-4",children:[(0,_o.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,_o.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,_o.jsx)(N,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),i&&(0,_o.jsx)(N,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:i.onClick,children:i.label})]})]}),d&&(0,_o.jsx)("div",{className:"hidden lg:block",children:d})]})]})}var $i=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialUsers:o=[],initialColleagues:i=[],initialProjects:n=[],onAddTask:d,onUpdateTask:r,onDeleteTask:u,onTaskClick:p,onAddEpic:c,onAddComment:g})=>{let[P,S]=(0,pe.useState)([]),[x,A]=(0,pe.useState)([]),[y,z]=(0,pe.useState)([]),[_,w]=(0,pe.useState)(!1),[R,re]=(0,pe.useState)(!1),[C,j]=(0,pe.useState)(null),[q,U]=(0,pe.useState)(null),[se,H]=(0,pe.useState)([]),[T,he]=(0,pe.useState)([]),[f,te]=(0,pe.useState)(0),G=(0,pe.useRef)(null),Le=(0,pe.useRef)(null),De=pe.default.useMemo(()=>[...x.map(D=>D.id),0],[x]),Ye=(0,pe.useRef)(""),Qe=(0,pe.useRef)(""),k=(0,pe.useRef)(""),Z=(0,pe.useRef)(""),J=D=>D.map(m=>`${m.id}-${new Date(m.createdAt).getTime()}-${new Date(m.updatedAt).getTime()}`).join("-");(0,pe.useEffect)(()=>{let D=J(e);D!==Ye.current&&(S(e),C&&j(e.find(m=>m.id===C.id)||null),Ye.current=D)},[e]),(0,pe.useEffect)(()=>{let D=J(t);D!==Qe.current&&(A(t),Qe.current=D)},[t]),(0,pe.useEffect)(()=>{let D=J(a);D!==k.current&&(z(a),k.current=D)},[a]),(0,pe.useEffect)(()=>{let D=J(i.map(m=>({id:m.id,updatedAt:m.updatedAt,createdAt:m.createdAt})));D!==Z.current&&(he(i),Z.current=D)},[i]),(0,pe.useEffect)(()=>{let D=()=>{if(G.current){let O=G.current.offsetHeight;te(O)}};D();let m=new ResizeObserver(D);G.current&&m.observe(G.current);let v=()=>{setTimeout(D,100)};return window.addEventListener("storage",v),()=>{m.disconnect(),window.removeEventListener("storage",v)}},[]),(0,pe.useEffect)(()=>{let D=setTimeout(()=>{G.current&&te(G.current.offsetHeight)},300);return()=>clearTimeout(D)},[_,R]);let tt=P.filter(D=>!0),me=D=>tt.filter(m=>m.status===D),Ze=D=>{let m={};return x.forEach(v=>{m[v.id]=D.filter(O=>Se(O.epic)===v.id)}),m["no-epic"]=D.filter(v=>!Se(v.epic)),m},_t=D=>{U(D)},bt=D=>{q&&(S(m=>m.map(v=>v.id===q.id?{...v,status:D}:v)),r?.(q.id.toString(),{status:D}),U(null))},na=D=>{let m={...D,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};S(v=>[...v,m]),d?.(D)},St=async(D,m)=>{S(v=>v.map(O=>O.id===Number(D)?{...O,...m}:O)),r&&await r(D,m),C?.id===Number(D)&&j(v=>({...v,...m}))},Lt=async D=>{S(m=>m.filter(v=>v.id!==Number(D))),C?.id===Number(D)&&j(null),u&&await u(D)},Kt=D=>{let m={...D,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};A(v=>[...v,m]),c?.(D)},Dt=D=>{j(D),p?.(D)},qt=[{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"}],Jt=f>0?`calc(100vh - ${f+120}px)`:"calc(100vh - 12rem)";return(0,_o.jsxs)("div",{ref:Le,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,_o.jsx)("div",{ref:G,className:"flex-shrink-0",children:(0,_o.jsx)(gt,{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:()=>w(!0)},secondaryAction:{label:"Add epic",onClick:()=>re(!0)}})}),(0,_o.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,_o.jsx)("div",{className:"h-full",style:{height:f>0?`calc(100vh - ${f+120}px)`:"calc(100vh - 12rem)"},children:(0,_o.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:qt.map(D=>{let m=me(D.status),v=Ze(m);return(0,_o.jsxs)(Ci,{title:D.title,status:D.status,taskCount:m.length,onDrop:bt,isCompact:D.status==="done",height:Jt,children:[v["no-epic"].map(O=>(0,_o.jsx)(ya,{epic:null,task:O,onDragStart:_t,onTaskClick:Dt,isCompact:D.status==="done"},O.id)),De.map(O=>{let ee=x.find(we=>we.id===O),Ne=v[O]||[];return Ne.length===0?null:(0,_o.jsxs)("div",{className:"mb-6",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${ee?.color}`}),(0,_o.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:ee?.name||"No Epic"}),(0,_o.jsx)(de,{variant:"secondary",className:"text-xs",children:Ne.length})]})," ",(0,_o.jsx)("div",{className:"space-y-3",children:Ne.map(we=>(0,_o.jsx)(ya,{task:we,epic:ee,onDragStart:_t,onTaskClick:Dt,isCompact:D.status==="done"},we.id))})]},O)})]},D.id)})})})}),(0,_o.jsx)(aa,{isOpen:_,onClose:()=>w(!1),onAddTask:na,assignees:[...T,...se],epics:x,sprints:y}),(0,_o.jsx)(ia,{isOpen:R,onClose:()=>re(!1),onAddEpic:Kt}),C&&(0,_o.jsx)(Hi,{isOpen:!!C,onClose:()=>j(null),initialTask:C,epics:x,sprints:y,onUpdateTask:St,onDeleteTask:Lt,colleagues:T,onAddComment:g})]})};var Wi=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddTaskToEpic:n,onAddEpic:d,onUpdateEpic:r,onDeleteEpic:u})=>{let[p,c]=(0,Ao.useState)(t),[g,P]=(0,Ao.useState)(null),[S,x]=(0,Ao.useState)(null),[A,y]=(0,Ao.useState)({}),[z,_]=(0,Ao.useState)(0),[w,R]=(0,Ao.useState)(!1),[re,C]=(0,Ao.useState)(!1),[j,q]=(0,Ao.useState)(null),U=(0,Ao.useRef)(null),se=(0,Ao.useRef)(null);(0,Ao.useEffect)(()=>{c(t)},[t]),(0,Ao.useEffect)(()=>{let k=()=>{if(U.current){let tt=U.current.offsetHeight;_(tt)}};k();let Z=new ResizeObserver(k);U.current&&Z.observe(U.current);let J=()=>{setTimeout(k,100)};return window.addEventListener("storage",J),()=>{Z.disconnect(),window.removeEventListener("storage",J)}},[]),(0,Ao.useEffect)(()=>{let k=setTimeout(()=>{U.current&&_(U.current.offsetHeight)},300);return()=>clearTimeout(k)},[S]);let H=k=>{P(k)},T=k=>{k.preventDefault()},he=(k,Z)=>{k.preventDefault(),g&&Se(g.epic).toString()!==Z&&(o(g.id.toString(),{epic:Number(Z)}),P(null))},f=k=>e.filter(Z=>Se(Z.epic).toString()===k),te=k=>{x(k.id.toString()),y({name:k.name,description:k.description,confidence:k.confidence,phase:k.phase})},G=async()=>{S&&A.name&&(await r(S.toString(),A),c(k=>k.map(Z=>Z.id.toString()===S?{...Z,...A}:Z)),x(null),y({}))},Le=()=>{x(null),y({})},De=async k=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await u(k),c(Z=>Z.filter(J=>J.id.toString()!==k)))},Ye=k=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[k]||`Phase ${k}`,Qe=k=>{switch(k){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,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsxs)("div",{ref:se,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,_o.jsx)("div",{ref:U,className:"flex-shrink-0",children:(0,_o.jsx)(gt,{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:()=>R(!0)}})}),(0,_o.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,_o.jsx)("div",{className:"h-full overflow-y-auto",style:{height:z>0?`calc(100vh - ${z+120}px)`:"calc(100vh - 12rem)"},children:(0,_o.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(k=>{let Z=f(k.id.toString()),J=Z.reduce((me,Ze)=>me+(Ze.storyPoints||0),0),tt=z>0?`calc(100vh - ${z+200}px)`:"calc(100vh - 14rem)";return(0,_o.jsxs)(ve,{className:`flex flex-col ${S===k.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:S===k.id.toString()?"auto":tt,minHeight:"400px"},onDragOver:T,onDrop:me=>he(me,k.id.toString()),children:[(0,_o.jsx)("div",{className:"p-4 border-b border-border",children:S===k.id.toString()?(0,_o.jsxs)("div",{className:"space-y-4",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)(ne,{value:A.name||"",onChange:me=>y({...A,name:me.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,_o.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,_o.jsx)(N,{size:"sm",variant:"ghost",onClick:G,className:"p-1 h-8 w-8",children:(0,_o.jsx)(At.Check,{className:"h-4 w-4"})}),(0,_o.jsx)(N,{size:"sm",variant:"ghost",onClick:Le,className:"p-1 h-8 w-8",children:(0,_o.jsx)(At._o,{className:"h-4 w-4"})})]})]}),(0,_o.jsx)(Be,{value:A.description||"",onChange:me=>y({...A,description:me.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,_o.jsxs)("select",{value:A.confidence||k.confidence,onChange:me=>y({...A,confidence:me.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,_o.jsx)("option",{value:"low",children:"Low"}),(0,_o.jsx)("option",{value:"medium",children:"Medium"}),(0,_o.jsx)("option",{value:"high",children:"High"})]})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,_o.jsx)("select",{value:A.phase?.toString()||k.phase.toString(),onChange:me=>y({...A,phase:parseInt(me.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(me=>(0,_o.jsxs)("option",{value:me.toString(),children:["Phase ",me]},me))})]})]})]}):(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,_o.jsx)("div",{className:`w-4 h-4 rounded-full ${k.color}`}),(0,_o.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:k.name}),(0,_o.jsxs)("div",{className:"flex gap-1",children:[(0,_o.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>te(k),className:"p-1 h-8 w-8",children:(0,_o.jsx)(At.Edit2,{className:"h-3 w-3"})}),(0,_o.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>De(k.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,_o.jsx)(At.Trash2,{className:"h-3 w-3"})})]})]}),(0,_o.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,_o.jsxs)(de,{className:`text-xs ${Qe(k.confidence)}`,children:[k.confidence," confidence"]}),(0,_o.jsxs)(de,{variant:"outline",className:"text-xs",children:["Phase ",k.phase]}),(0,_o.jsxs)(de,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[Z.length," tasks"]}),(0,_o.jsxs)(de,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[J," pts"]})]}),k.description&&(0,_o.jsx)("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:k.description}),(0,_o.jsxs)(N,{onClick:()=>{C(!0),q(k)},variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,_o.jsx)(At.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,_o.jsx)("div",{className:"flex-1 p-4 overflow-y-auto",children:(0,_o.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:Z.length===0?(0,_o.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,_o.jsx)(At.Move,{className:"h-8 w-8 mb-2"}),(0,_o.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):Z.map(me=>(0,_o.jsx)(ya,{task:me,epic:k,onDragStart:H,onTaskClick:i,isCompact:!0},me.id))})})]},k.id)})})})})]}),(0,_o.jsx)(ia,{isOpen:w,onClose:()=>R(!1),onAddEpic:d}),(0,_o.jsx)(aa,{isOpen:re,onClose:()=>C(!1),onAddTask:n,assignees:[],epics:[],defaultEpicId:j?.id.toString()||"",sprints:a})]})};var _i=require("react-day-picker");function Ka({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,_o.jsx)(_i.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:b("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center _o-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:b(ka({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-8 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:b("relative p-0 text-center text-sm focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-accent [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",o.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-_o-md first:[&:has([aria-selected])]:rounded-_o-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:b(ka({variant:"ghost"}),"h-8 w-8 p-0 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground aria-selected:bg-accent/50 aria-selected:text-muted-foreground",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},...o})}Ka.displayName="Calendar";var qi=le(require("react")),ft=le(require("@radix-ui/react-popover"));var No=ft.Root,Co=ft.Trigger;var qa=qi.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},i)=>(0,_o.jsx)(ft.Portal,{children:(0,_o.jsx)(ft.Content,{ref:i,align:t,sideOffset:a,className:b("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));qa.displayName=ft.Content.displayName;var So=require("date-fns");var Xi=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,i]=(0,Ao.useState)({name:"",description:"",startDate:void 0,endDate:void 0}),n=r=>{r.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate.toISOString(),endDate:o.endDate.toISOString(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()}),i({name:"",description:"",startDate:void 0,endDate:void 0}),t())},d=()=>{i({name:"",description:"",startDate:void 0,endDate:void 0}),t()};return(0,_o.jsx)(We,{open:e,onOpenChange:d,children:(0,_o.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,_o.jsx)(ze,{children:(0,_o.jsx)(Ue,{children:"Add New Sprint"})}),(0,_o.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"name",children:"Sprint Name *"}),(0,_o.jsx)(ne,{id:"name",value:o.name,onChange:r=>i(u=>({...u,name:r.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{htmlFor:"description",children:"Description"}),(0,_o.jsx)(Be,{id:"description",value:o.description,onChange:r=>i(u=>({...u,description:r.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"Start Date *"}),(0,_o.jsxs)(No,{children:[(0,_o.jsx)(Co,{asChild:!0,children:(0,_o.jsxs)(N,{variant:"outline",className:b("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,_o.jsx)(At.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,So.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,_o.jsx)(qa,{className:"w-auto p-0",align:"start",children:(0,_o.jsx)(Ka,{mode:"single",selected:o.startDate,onSelect:r=>i(u=>({...u,startDate:r})),initialFocus:!0})})]})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)(B,{children:"End Date *"}),(0,_o.jsxs)(No,{children:[(0,_o.jsx)(Co,{asChild:!0,children:(0,_o.jsxs)(N,{variant:"outline",className:b("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,_o.jsx)(At.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,So.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,_o.jsx)(qa,{className:"w-auto p-0",align:"start",children:(0,_o.jsx)(Ka,{mode:"single",selected:o.endDate,onSelect:r=>i(u=>({...u,endDate:r})),initialFocus:!0,disabled:r=>o.startDate?r<o.startDate:!1})})]})]})]}),(0,_o.jsxs)("div",{className:"flex justify-end gap-3 _o-4",children:[(0,_o.jsx)(N,{type:"button",variant:"outline",onClick:d,children:"Cancel"}),(0,_o.jsx)(N,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Yi=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:i,onAddSprint:n,onUpdateSprint:d,onDeleteSprint:r})=>{let[u,p]=(0,Ao.useState)([]),[c,g]=(0,Ao.useState)(new Set),[P,S]=(0,Ao.useState)(null),[x,A]=(0,Ao.useState)(!1),[y,z]=(0,Ao.useState)(null),[_,w]=(0,Ao.useState)(null),[R,re]=(0,Ao.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[C,j]=(0,Ao.useState)([]),[q,U]=(0,Ao.useState)("upcoming"),[se,H]=(0,Ao.useState)(!1),[T,he]=(0,Ao.useState)(0),f=(0,Ao.useRef)(null),te=(0,Ao.useRef)(null);(0,Ao.useEffect)(()=>{let m=()=>{f.current&&he(f.current.offsetHeight)};m();let v=new ResizeObserver(m);return f.current&&v.observe(f.current),()=>v.disconnect()},[]);let G=m=>t.find(v=>v.id===Number(m)),Le=m=>a.find(v=>v.id===Number(m)),De=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},Ye=m=>{if(!m||m?.length===0)return"";let v=m?.trim().split(" ");if(v?.length===1)return v[0];let O=v[0],ee=v[v.length-1][0].toUpperCase();return`${O} ${ee}`},Qe=m=>{let v={},O=[];return m.forEach(ee=>{ee.epic?(v[Se(ee.epic)]||(v[Se(ee.epic)]=[]),v[Se(ee.epic)].push(ee)):O.push(ee)}),{tasksByEpic:v,unassignedTasks:O}};(0,Ao.useEffect)(()=>{j(a)},[a]);let k=C.filter(m=>{switch(q){default:return!0}}),Z=C.filter(m=>u.includes(m.id.toString())),J=e.filter(m=>!m.sprint||m.status==="backlog"),tt=J.reduce((m,v)=>m+(v.storyPoints||0),0),me=m=>{p(v=>v.includes(m)?v.filter(O=>O!==m):v?.length<3?[...v,m]:v)},Ze=m=>{g(v=>{let O=new Set(v);return O.has(m)?O.delete(m):O.add(m),O})},_t=m=>{n(m),A(!1)},bt=m=>{w(m.id.toString()),re({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})},na=()=>{_&&(d(_,{name:R.name,description:R.description,startDate:R.startDate,endDate:R.endDate}),j(m=>m.map(v=>(v.id===Number(_)&&(v.name=R.name,v.description=R.description,v.startDate=R.startDate,v.endDate=R.endDate),v))),w(null))},St=()=>{w(null),re({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Lt=(m,v)=>{S(v),m.dataTransfer.effectAllowed="move"},Kt=m=>{m.preventDefault(),m.dataTransfer.dropEffect="move"},Dt=m=>{z(m)},qt=()=>{z(null)},Jt=(m,v)=>{if(m.preventDefault(),z(null),!P)return;(Se(P.sprint)||void 0)!==Number(v)&&o(P.id.toString(),{sprint:Number(v)}),S(null)},D=({task:m,showSprint:v=!1})=>{let O=m.epic?G(Se(m.epic).toString()):null,ee=m.sprint?Le(Se(m.sprint).toString()):null;return(0,_o.jsx)(ve,{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:$e=>{$e.dataTransfer.effectAllowed="move",$e.dataTransfer.setData("text/plain",m.id.toString()),Lt($e,m)},onClick:$e=>{P===null&&i(m)},style:{userSelect:"none"},children:(0,_o.jsxs)("div",{className:"space-y-2 pointer-events-none",children:[(0,_o.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,_o.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1",children:m.name}),(0,_o.jsx)(de,{className:`text-xs ${De(m.priority||"medium")}`,children:m.priority?.[0]?.toUpperCase()})]}),(0,_o.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-1",children:[O&&(0,_o.jsx)("div",{className:`w-2 h-2 rounded-full ${O.color}`}),(0,_o.jsx)("span",{className:"text-muted-foreground truncate",children:O?.name})]}),(0,_o.jsx)("span",{className:"text-muted-foreground",children:Ye(m.assignee?.value?.name)})]}),v&&ee&&(0,_o.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,_o.jsx)(At.Calendar,{className:"h-3 w-3"}),(0,_o.jsx)("span",{children:ee.name})]})]})})};return(0,_o.jsxs)("div",{ref:te,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[(0,_o.jsx)("div",{ref:f,className:"flex-shrink-0",children:(0,_o.jsx)(gt,{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,_o.jsx)("div",{className:"flex-1 min-h-0 mt-8",children:(0,_o.jsxs)("div",{className:"h-full",style:{height:T>0?`calc(100vh - ${T+120}px)`:"calc(100vh - 12rem)"},children:[(0,_o.jsxs)("div",{className:"mb-4",children:[(0,_o.jsx)(ve,{className:"p-3 bg-card shadow-sm",children:(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)("h3",{className:"font-semibold text-foreground text-sm",children:"Sprint Board"}),(0,_o.jsxs)("p",{className:"text-xs text-muted-foreground",children:[u?.length,"/3 selected"]})]}),u?.length>0&&(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsx)("span",{className:"text-xs text-muted-foreground",children:"Viewing:"}),(0,_o.jsx)("div",{className:"flex flex-wrap gap-1",children:Z.map(m=>(0,_o.jsxs)("div",{className:"flex items-center gap-1 bg-primary/10 text-primary px-2 py-0.5 rounded text-xs",children:[(0,_o.jsx)("span",{className:"max-w-[80px] truncate",children:m.name}),(0,_o.jsx)("button",{onClick:()=>me(m.id.toString()),className:"ml-0.5 hover:bg-primary/20 h-8 rounded p-0.5",children:(0,_o.jsx)(At._o,{className:"h-4 w-4"})})]},m.id))})]})]}),(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsxs)(N,{onClick:()=>A(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-1",size:"sm",children:[(0,_o.jsx)(At.Plus,{className:"h-3 w-3"}),"Add"]}),(0,_o.jsxs)(N,{onClick:()=>H(!se),variant:"outline",size:"sm",className:"gap-1",children:[(0,_o.jsx)(At.Calendar,{className:"h-3 w-3"}),se?"Close":"Select"]})]})]})}),se&&(0,_o.jsx)("div",{className:"fixed inset-0 bg-black/20 z-[5]",onClick:()=>H(!1)}),(0,_o.jsx)("div",{className:`fixed top-0 right-0 h-full w-80 bg-background border-_o shadow-xl z-10 transition-all duration-300 ease-in-out ${se?"translate-x-0 opacity-100 visible":"translate-x-full opacity-0 invisible"}`,children:(0,_o.jsxs)(ve,{className:"h-full rounded-none border-0 flex flex-col",children:[(0,_o.jsxs)("div",{className:"p-4 border-b bg-muted/30 flex-shrink-0",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsx)("h3",{className:"font-semibold text-foreground text-base",children:"Select Sprints"}),(0,_o.jsx)(N,{variant:"ghost",size:"sm",onClick:()=>H(!1),className:"h-8 w-8 p-0",children:(0,_o.jsx)(At._o,{className:"h-4 w-4"})})]}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Choose up to 3 sprints to view in your planning board"})]}),(0,_o.jsxs)("div",{className:"flex flex-col flex-1 p-4 min-h-0",children:[(0,_o.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,_o.jsxs)(N,{variant:q===m.key?"default":"outline",size:"sm",onClick:()=>U(m.key),className:"text-xs h-8 px-3 flex-1",children:[m.label," (",m.count,")"]},m.key))}),(0,_o.jsx)("div",{className:"space-y-2 flex-1 overflow-y-auto",children:k.length>0?k.map(m=>{let v=u.includes(m.id.toString()),O=e.filter(Ne=>Se(Ne.sprint)===m.id).length,ee=!v&&u.length<3;return(0,_o.jsx)("div",{className:`p-3 rounded-lg border transition-all ${v?"bg-primary/10 border-primary/30":ee?"bg-card border-border hover:border-primary/50":"bg-muted/30 border-border/30 opacity-60"}`,children:_===m.id.toString()?(0,_o.jsxs)("div",{className:"space-y-3",children:[(0,_o.jsx)(ne,{value:R.name,onChange:Ne=>re(we=>({...we,name:Ne.target.value})),className:"text-sm",placeholder:"Sprint name"}),(0,_o.jsx)(Be,{value:R.description,onChange:Ne=>re(we=>({...we,description:Ne.target.value})),className:"text-sm min-h-[60px]",placeholder:"Sprint description"}),(0,_o.jsxs)("div",{className:"flex gap-2",children:[(0,_o.jsxs)(N,{size:"sm",onClick:()=>na(),className:"flex-1",children:[(0,_o.jsx)(At.Check,{className:"h-3 w-3 mr-1"}),"Save"]}),(0,_o.jsxs)(N,{size:"sm",variant:"outline",onClick:St,className:"flex-1",children:[(0,_o.jsx)(At._o,{className:"h-3 w-3 mr-1"}),"Cancel"]})]})]}):(0,_o.jsxs)("div",{children:[(0,_o.jsxs)("div",{className:"flex items-start justify-between",children:[(0,_o.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,_o.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,_o.jsx)("h4",{className:"font-medium text-sm text-foreground truncate",children:m.name}),(0,_o.jsx)(de,{variant:"default",className:"text-xs bg-green-100 text-green-800 border-green-200",children:"Active"})]}),(0,_o.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:m.description}),(0,_o.jsxs)("div",{className:"flex items-center gap-3 text-xs text-muted-foreground",children:[(0,_o.jsxs)("span",{className:"flex items-center gap-1",children:[(0,_o.jsx)(At.CalendarDays,{className:"h-3 w-3"}),new Date(m.startDate).toLocaleDateString()]}),(0,_o.jsxs)("span",{className:"flex items-center gap-1",children:[(0,_o.jsx)(At.User,{className:"h-3 w-3"}),O," tasks"]})]})]}),(0,_o.jsxs)("div",{className:"flex items-center gap-1 ml-2",children:[(0,_o.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>bt(m),className:"h-6 w-6 p-0",children:(0,_o.jsx)(At.Edit2,{className:"h-3 w-3"})}),(0,_o.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>r(m.id.toString()),className:"h-6 w-6 p-0 text-destructive hover:text-destructive",children:(0,_o.jsx)(At.Trash2,{className:"h-3 w-3"})})]})]}),(0,_o.jsx)("div",{className:"flex items-center justify-between mt-2",children:(0,_o.jsx)(N,{variant:v?"default":"outline",size:"sm",className:"text-xs w-full h-8 flex items-center justify-center cursor-pointer",onClick:()=>me(m.id.toString()),disabled:!v&&u?.length>=3,children:(0,_o.jsx)("span",{className:"pointer-events-none select-none",children:v?"Deselect":u?.length>=3?"Limit Reached":"Select"})})})]})},m.id)}):(0,_o.jsxs)("div",{className:"text-center py-8 text-muted-foreground",children:[(0,_o.jsx)(At.Calendar,{className:"h-8 w-8 mx-auto mb-2 opacity-50"}),(0,_o.jsxs)("p",{className:"text-sm",children:['No sprints found for "',q,'" filter']}),(0,_o.jsx)(N,{variant:"link",size:"sm",onClick:()=>U("all"),className:"text-xs",children:"Show all sprints"})]})}),u?.length===0&&(0,_o.jsx)("div",{className:"mt-4 p-4 bg-muted/50 rounded-lg border-2 border-dashed border-border",children:(0,_o.jsxs)("div",{className:"text-center",children:[(0,_o.jsx)(At.Calendar,{className:"h-6 w-6 mx-auto mb-2 text-muted-foreground"}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground font-medium",children:"Select sprints to start planning"}),(0,_o.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Choose up to 3 sprints to view alongside your backlog"})]})})]})]})})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full flex-1 min-h-0",children:[(0,_o.jsx)("div",{className:"lg:col-span-1",children:(0,_o.jsxs)(ve,{className:"p-4 h-full bg-card border-_o-4 border-_o-gray-400 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Kt,onDragEnter:()=>Dt("backlog"),onDragLeave:qt,onDrop:m=>Jt(m,"backlog"),style:{height:T>0?`calc(100vh - ${T+200}px)`:"calc(100vh - 16rem)"},children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,_o.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:"Backlog"}),(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsxs)(de,{variant:"secondary",className:"bg-muted text-muted-foreground",children:[J?.length," tasks"]}),(0,_o.jsxs)(de,{variant:"outline",className:"bg-gray-50 text-gray-700 border-gray-200",children:[tt," pts"]})]})]}),(0,_o.jsx)("div",{className:`flex-1 overflow-y-auto space-y-3 min-h-0 p-3 rounded transition-colors ${y==="backlog"?"bg-primary/10":""}`,children:(()=>{let{tasksByEpic:m,unassignedTasks:v}=Qe(J);return(0,_o.jsxs)(_o.Fragment,{children:[Object.entries(m).map(([O,ee])=>{let Ne=G(O);if(!Ne)return null;let we=c.has(O);return(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.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:()=>Ze(O),children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${Ne.color}`}),(0,_o.jsx)("span",{className:"font-medium text-muted-foreground",children:Ne.name}),(0,_o.jsxs)("span",{className:"text-muted-foreground",children:["(",ee?.length,")"]}),(0,_o.jsx)("div",{className:"ml-auto",children:we?(0,_o.jsx)(At.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,_o.jsx)(At.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!we&&(0,_o.jsx)("div",{className:"space-y-2 pl-2",children:ee.map($e=>(0,_o.jsx)(D,{task:$e},$e.id))})]},O)}),v?.length>0&&(()=>{let O=c.has("no-epic");return(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.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:()=>Ze("no-epic"),children:[(0,_o.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,_o.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,_o.jsxs)("span",{className:"text-muted-foreground",children:["(",v?.length,")"]}),(0,_o.jsx)("div",{className:"ml-auto",children:O?(0,_o.jsx)(At.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,_o.jsx)(At.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!O&&(0,_o.jsx)("div",{className:"space-y-2 pl-2",children:v?.map(ee=>(0,_o.jsx)(D,{task:ee},ee.id))})]})})(),J?.length===0&&(0,_o.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"}),J?.length>0&&Object.keys(m).length===0&&v.length===0&&(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsx)("div",{className:"text-xs text-muted-foreground mb-2",children:"Direct backlog tasks:"}),J?.map(O=>(0,_o.jsx)(D,{task:O},O.id))]})]})})()})]})}),Z.map(m=>{let v=e.filter(ee=>Se(ee?.sprint)===m.id),O=v.reduce((ee,Ne)=>ee+(Ne?.storyPoints||0),0);return(0,_o.jsxs)(ve,{className:"p-4 h-full bg-card border-_o-4 border-_o-blue-500 shadow-sm hover:shadow-md transition-shadow duration-200 flex flex-col",onDragOver:Kt,onDragEnter:()=>Dt(m.id.toString()),onDragLeave:qt,onDrop:ee=>Jt(ee,m.id.toString()),style:{height:T>0?`calc(100vh - ${T+200}px)`:"calc(100vh - 16rem)"},children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[(0,_o.jsx)("div",{children:(0,_o.jsx)("h3",{className:"font-semibold text-foreground select-none text-lg",children:m.name})}),(0,_o.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_o.jsxs)(de,{variant:"secondary",className:"bg-muted flex items-center justify-center text-muted-foreground",children:[v?.length," tasks"]}),(0,_o.jsxs)(de,{variant:"outline",className:"bg-blue-50 flex items-center justify-center text-blue-700 border-blue-200",children:[O," pts"]}),(0,_o.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>{H(!0),bt(m)},className:"h-6 px-2",children:(0,_o.jsx)(At.Edit2,{className:"h-3 w-3"})}),(0,_o.jsx)(N,{size:"sm",variant:"ghost",onClick:()=>r(m.id.toString()),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,_o.jsx)(At.Trash2,{className:"h-3 w-3"})})]})]}),(0,_o.jsx)("div",{className:"flex-1 overflow-y-auto space-y-3 min-h-0",children:(()=>{let{tasksByEpic:ee,unassignedTasks:Ne}=Qe(v);return(0,_o.jsxs)(_o.Fragment,{children:[Object.entries(ee).map(([we,$e])=>{let sa=G(we);if(!sa)return null;let la=c.has(we);return(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.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:()=>Ze(we),children:[(0,_o.jsx)("div",{className:`w-3 h-3 rounded-full ${sa.color}`}),(0,_o.jsx)("span",{className:"font-medium text-muted-foreground",children:sa.name}),(0,_o.jsxs)("span",{className:"text-muted-foreground",children:["(",$e?.length,")"]}),(0,_o.jsx)("div",{className:"ml-auto",children:la?(0,_o.jsx)(At.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,_o.jsx)(At.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!la&&(0,_o.jsx)("div",{className:"space-y-2 pl-2",children:$e?.map(da=>(0,_o.jsx)(D,{task:da},da.id))})]},we)}),Ne?.length>0&&(()=>{let we=c.has("no-epic");return(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.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:()=>Ze("no-epic"),children:[(0,_o.jsx)("div",{className:"w-3 h-3 rounded-full bg-gray-400"}),(0,_o.jsx)("span",{className:"font-medium text-muted-foreground",children:"No Epic"}),(0,_o.jsxs)("span",{className:"text-muted-foreground",children:["(",Ne?.length,")"]}),(0,_o.jsx)("div",{className:"ml-auto",children:we?(0,_o.jsx)(At.ChevronDown,{className:"h-3 w-3 text-muted-foreground"}):(0,_o.jsx)(At.ChevronUp,{className:"h-3 w-3 text-muted-foreground"})})]}),!we&&(0,_o.jsx)("div",{className:"space-y-2 pl-2",children:Ne?.map($e=>(0,_o.jsx)(D,{task:$e},$e.id))})]})})(),v?.length===0&&(0,_o.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})})()})]},m.id)})]}),(0,_o.jsx)(Xi,{isOpen:x,onClose:()=>A(!1),onAddSprint:_t})]})})]})};var Mn=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),Bn=e=>{let[t,a]=e.split(":"),o=new Date;return o.setHours(parseInt(t),parseInt(a)),o.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0})},Do=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[i,n]=t.split(":");o.setHours(parseInt(i),parseInt(n))}return o<a},To=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Fn=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Ln=({colleagues:e,onAddReminder:t,open:a,setOpen:o})=>{let[i,n]=(0,Ao.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""}),[d,r]=(0,Ao.useState)(!1),u=c=>{if(c.preventDefault(),!e.find(S=>S?.id.toString()===i.colleagueId.toString())){console.error("No valid colleague selected"),r(!0);return}r(!1);let P={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(P),o(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})};(0,Ao.useEffect)(()=>{i.colleagueId&&r(!1)},[i.colleagueId]);let p=e.filter(Boolean);return(0,_o.jsx)(We,{open:a,onOpenChange:o,children:(0,_o.jsxs)(Oe,{className:"max-w-2xl",children:[(0,_o.jsx)(ze,{children:(0,_o.jsx)(Ue,{children:"Add New Reminder"})}),(0,_o.jsxs)("form",{onSubmit:u,className:"space-y-4",children:[(0,_o.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"title",children:"Title"}),(0,_o.jsx)(ne,{id:"title",value:i.title,onChange:c=>n({...i,title:c.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"description",children:"Description"}),(0,_o.jsx)(Be,{id:"description",value:i.description,onChange:c=>n({...i,description:c.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"dueDate",children:"Due Date"}),(0,_o.jsx)(ne,{id:"dueDate",type:"date",value:i.dueDate,onChange:c=>n({...i,dueDate:c.target.value}),required:!0})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,_o.jsx)(ne,{id:"dueTime",type:"time",value:i.dueTime,onChange:c=>n({...i,dueTime:c.target.value})})]})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{className:`${d?"text-destructive":""}`,htmlFor:"colleague",children:"Assigned Colleague"}),(0,_o.jsxs)(qe,{value:i.colleagueId,onValueChange:c=>{n({...i,colleagueId:c})},required:!0,children:[(0,_o.jsx)(He,{className:`${d?"text-destructive border-red-500":""}`,children:(0,_o.jsx)(ct,{className:`${d?"text-destructive border-red-500":""}`,placeholder:"Select a digital colleague",children:e.find(c=>c?.id.toString()===i.colleagueId.toString())?.name||"Select a digital colleague"})}),(0,_o.jsx)(Ve,{children:p.map(c=>(0,_o.jsx)(be,{value:c.id.toString(),children:c.name},c.id))})]}),d&&(0,_o.jsx)("p",{className:"text-destructive text-sm",children:"Please select a digital colleague"})]}),(0,_o.jsxs)("div",{className:"space-y-2",children:[(0,_o.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_o.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:c=>n({...i,isRecurring:c.target.checked}),className:"rounded border-border"}),(0,_o.jsx)(B,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,_o.jsxs)(qe,{value:i.recurrencePattern,onValueChange:c=>n({...i,recurrencePattern:c}),children:[(0,_o.jsx)(He,{children:(0,_o.jsx)(ct,{})}),(0,_o.jsxs)(Ve,{children:[(0,_o.jsx)(be,{value:"daily",children:"Daily"}),(0,_o.jsx)(be,{value:"weekly",children:"Weekly"}),(0,_o.jsx)(be,{value:"monthly",children:"Monthly"}),(0,_o.jsx)(be,{value:"yearly",children:"Yearly"})]})]})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"recurrenceInterval",children:"Every"}),(0,_o.jsx)(ne,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:c=>n({...i,recurrenceInterval:parseInt(c.target.value)})})]})]})]}),(0,_o.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,_o.jsx)(N,{type:"button",variant:"outline",onClick:()=>o(!1),children:"Cancel"}),(0,_o.jsx)(N,{type:"submit",children:"Add Reminder"})]})]})]})})},On=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:i})=>{let[n,d]=(0,Ao.useState)({title:e.title,description:e.description,dueDate:e.dueDate?.toString().split("T")[0],dueTime:e.dueTime||"",isRecurring:e.isRecurring}),r=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()},u=t.filter(Boolean);return(0,_o.jsx)(We,{open:o,onOpenChange:i,children:(0,_o.jsxs)(Oe,{className:"max-w-2xl",children:[(0,_o.jsx)(ze,{children:(0,_o.jsx)(Ue,{children:"Edit Reminder"})}),(0,_o.jsxs)("form",{onSubmit:r,className:"space-y-4",children:[(0,_o.jsx)("div",{className:"grid grid-cols-2 gap-4",children:(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"edit-title",children:"Title"}),(0,_o.jsx)(ne,{id:"edit-title",value:n.title,onChange:p=>d({...n,title:p.target.value}),placeholder:"Enter reminder title",required:!0})]})}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"edit-description",children:"Description"}),(0,_o.jsx)(Be,{id:"edit-description",value:n.description||"",onChange:p=>d({...n,description:p.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,_o.jsx)(ne,{id:"edit-dueDate",type:"date",value:n.dueDate,onChange:p=>d({...n,dueDate:p.target.value}),required:!0})]}),(0,_o.jsxs)("div",{children:[(0,_o.jsx)(B,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,_o.jsx)(ne,{id:"edit-dueTime",type:"time",value:n.dueTime,onChange:p=>d({...n,dueTime:p.target.value})})]})]}),(0,_o.jsx)("div",{className:"space-y-2",children:(0,_o.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_o.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:n.isRecurring||!1,onChange:p=>d({...n,isRecurring:p.target.checked}),className:"rounded border-border"}),(0,_o.jsx)(B,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]})}),(0,_o.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,_o.jsx)(N,{type:"button",variant:"outline",onClick:i,children:"Cancel"}),(0,_o.jsx)(N,{type:"submit",children:"Save Changes"})]})]})]})})},zn=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[i,n]=(0,Ao.useState)(!1);if(!e||!e.id)return null;let d=Do(new Date(e.dueDate||""),e.dueTime||""),r=To(new Date(e.dueDate||"")),u=Fn(new Date(e.dueDate||"")),p=()=>{a(e.id.toString(),{})},c=()=>r?"Today":u?"Tomorrow":Mn(new Date(e.dueDate||""));return(0,_o.jsxs)(_o.Fragment,{children:[(0,_o.jsx)(On,{reminder:e,colleagues:t,onUpdateReminder:a,open:i,onClose:()=>n(!1)}),(0,_o.jsx)(ve,{children:(0,_o.jsx)(ea,{className:"p-4",children:(0,_o.jsxs)("div",{className:"flex items-start justify-between",children:[(0,_o.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,_o.jsx)("button",{onClick:p,className:"mt-1 text-primary hover:text-primary/80"}),(0,_o.jsxs)("div",{className:"flex-1",children:[(0,_o.jsx)("div",{className:"flex items-center space-x-2 mb-1",children:(0,_o.jsx)("h3",{children:e.title})}),(0,_o.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,_o.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,_o.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,_o.jsx)(At.Calendar,{className:"h-4 w-4"}),(0,_o.jsx)("span",{className:d?"text-destructive font-medium":"",children:c()})]}),e.dueTime&&(0,_o.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,_o.jsx)(At.Clock,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:Bn(e.dueTime)})]}),(0,_o.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,_o.jsx)(At.User,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:typeof e.assignedColleague!="number"?e.assignedColleague.name:"Unknown Colleague"})]})]})]})]}),(0,_o.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,_o.jsx)(N,{variant:"ghost",size:"sm",onClick:()=>n(!0),className:"h-8 w-8 p-0",children:(0,_o.jsx)(At.Edit2,{className:"h-4 w-4"})}),(0,_o.jsx)(N,{variant:"ghost",size:"sm",onClick:()=>o(e.id.toString()),className:"h-8 w-8 p-0 text-destructive hover:text-destructive/80",children:(0,_o.jsx)(At.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Qi=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:i})=>{let[n,d]=(0,Ao.useState)(e.filter(Boolean)),[r,u]=(0,Ao.useState)(t.filter(Boolean)),[p,c]=(0,Ao.useState)("all"),[g,P]=(0,Ao.useState)(""),[S,x]=(0,Ao.useState)(!1);(0,Ao.useEffect)(()=>{d(e.filter(Boolean))},[e]),(0,Ao.useEffect)(()=>{u(t.filter(Boolean))},[t]);let A=C=>{if(!C.title){console.error("Invalid reminder data:",C);return}let j={...C,id:Date.now(),createdAt:new Date().toISOString()};d(q=>[...q,j]),a?.(C)},y=(C,j)=>{if(!C){console.error("No reminder ID provided for update");return}d(q=>q.map(U=>U?.id.toString()===C?{...U,...j}:U)),o?.(C,j)},z=C=>{if(!C){console.error("No reminder ID provided for deletion");return}d(j=>j.filter(q=>q?.id.toString()!==C)),i?.(C)},w=n.filter(C=>{if(!C)return!1;if(g){let j=g.toLowerCase();if(!(C.title.toLowerCase().includes(j)||C.description?.toLowerCase().includes(j)))return!1}switch(p){case"pending":case"completed":case"overdue":return Do(new Date(C.dueDate||""),C.dueTime||"");case"today":return To(new Date(C.dueDate||""));default:return!0}}).sort((C,j)=>{if(!C||!j)return 0;let q={high:3,medium:2,low:1},U=0;return U!==0?U:new Date(C.dueDate||"").getTime()-new Date(j.dueDate||"").getTime()}),R={total:n.filter(Boolean).length,overdue:n.filter(C=>C&&Do(new Date(C.dueDate||""),C.dueTime||"")).length,today:n.filter(C=>C&&To(new Date(C.dueDate||""))).length},re=r.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,_o.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,_o.jsx)(gt,{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:()=>{x(!0)}}}),(0,_o.jsxs)("div",{className:"h-full bg-background",children:[(0,_o.jsx)(Ln,{colleagues:r,onAddReminder:A,open:S,setOpen:x}),(0,_o.jsxs)("div",{className:"p-6",children:[(0,_o.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,_o.jsx)("p",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,_o.jsxs)(N,{className:"flex items-center space-x-2",onClick:()=>x(!0),children:[(0,_o.jsx)(At.Plus,{className:"h-4 w-4"}),(0,_o.jsx)("span",{children:"Add Reminder"})]})]}),(0,_o.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,_o.jsxs)(ve,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-foreground",children:R.total}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,_o.jsxs)(ve,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-primary",children:R.overdue}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,_o.jsxs)(ve,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-success",children:R.today}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,_o.jsxs)(ve,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-destructive",children:R.overdue}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,_o.jsxs)(ve,{className:"p-4",children:[(0,_o.jsx)("div",{className:"text-2xl font-bold text-warning",children:R.today}),(0,_o.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,_o.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,_o.jsx)("div",{className:"flex-1",children:(0,_o.jsx)(ne,{placeholder:"Search reminders...",value:g,onChange:C=>P(C.target.value),className:"max-w-md"})}),(0,_o.jsxs)(qe,{value:p,onValueChange:C=>c(C),children:[(0,_o.jsx)(He,{className:"w-40",children:(0,_o.jsx)(ct,{})}),(0,_o.jsxs)(Ve,{children:[(0,_o.jsxs)(be,{value:"all",children:["All (",R.total,")"]}),(0,_o.jsxs)(be,{value:"overdue",children:["Overdue (",R.overdue,")"]}),(0,_o.jsxs)(be,{value:"overdue",children:["Overdue (",R.overdue,")"]}),(0,_o.jsxs)(be,{value:"today",children:["Today (",R.today,")"]})]})]})]}),(0,_o.jsx)("div",{className:"space-y-4",children:w.length===0?(0,_o.jsxs)(ve,{className:"p-8 text-center",children:[(0,_o.jsx)("div",{className:"text-muted-foreground",children:g||p!=="all"?"No reminders match your filters":"No reminders yet"}),!g&&p==="all"&&(0,_o.jsx)("p",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):w.map(C=>C&&(0,_o.jsx)(zn,{reminder:C,colleagues:r,onUpdateReminder:y,onDeleteReminder:z},C.id))})]})]})]})};var Un=e=>{if(!e||e<=0)return"0 KB";let t=e/1024;return t<1024?`${t.toFixed(2)} KB`:`${(t/1024).toFixed(2)} MB`};function Ja({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:i=!0,className:n}){return(0,_o.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${n||""}`,children:[i&&(0,_o.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,_o.jsx)("div",{className:"col-span-6",children:"Name"}),(0,_o.jsx)("div",{className:"col-span-2",children:"Size"}),(0,_o.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,_o.jsx)("div",{className:"divide-y",children:e.map(d=>(0,_o.jsxs)(Ya.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(d),children:[(0,_o.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,_o.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted"}),(0,_o.jsx)("div",{children:(0,_o.jsx)("p",{className:"font-medium",children:d.name})})]}),(0,_o.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:Un(d.filesize)}),(0,_o.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,_o.jsx)("span",{className:"text-sm md:text-base",children:new Date(d.createdAt).toLocaleDateString()}),(0,_o.jsx)("div",{className:"flex gap-1",children:(0,_o.jsx)(N,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:r=>{r.stopPropagation(),o?.(d)},children:(0,_o.jsx)(At.Trash2,{className:"h-4 w-4"})})})]})]},d.name))})]})}var tr=({isOpen:e,onClose:t,onAddFile:a})=>{let[o,i]=(0,Ao.useState)(null),[n,d]=(0,Ao.useState)(""),[r,u]=(0,Ao.useState)(""),[p,c]=(0,Ao.useState)(""),g=S=>{let x=S.target.files?.[0];x&&(i(x),n||d(x.name))},P=async S=>{if(S.preventDefault(),!o)return;let x=new FormData;x.append("file",o),x.append("name",n),r&&x.append("description",r),p&&x.append("tags",p),a?.(x),t(),i(null),d(""),u(""),c("")};return(0,_o.jsx)(We,{open:e,onOpenChange:t,children:(0,_o.jsxs)(Oe,{className:"sm:max-w-md",children:[(0,_o.jsx)(ze,{children:(0,_o.jsx)(Ue,{children:"Add New File"})}),(0,_o.jsxs)("form",{onSubmit:P,className:"grid gap-4",children:[(0,_o.jsx)("div",{className:"flex items-center justify-center w-full",children:(0,_o.jsxs)("label",{htmlFor:"dropzone-file",className:"flex flex-col items-center justify-center w-full h-64 border-2 border-gray-300 border-dashed rounded-lg cursor-pointer bg-gray-50 dark:hover:bg-bray-800 dark:bg-gray-700 hover:bg-gray-100 dark:border-gray-600 dark:hover:border-gray-500 dark:hover:bg-gray-600",children:[(0,_o.jsxs)("div",{className:"flex flex-col items-center justify-center _o-5 pb-6",children:[(0,_o.jsx)(jn,{className:"w-10 h-10 text-gray-400"}),(0,_o.jsxs)("p",{className:"mb-2 text-sm text-gray-500 dark:text-gray-400",children:[(0,_o.jsx)("span",{className:"font-semibold",children:"Click to upload"})," or drag and drop"]}),(0,_o.jsx)("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"SVG, PNG, JPG or GIF (MAX. 800x400px)"})]}),(0,_o.jsx)("input",{id:"dropzone-file",type:"file",className:"hidden",onChange:g})]})}),o&&(0,_o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_o.jsxs)("div",{children:[(0,_o.jsx)("p",{className:"font-medium",children:o.name}),(0,_o.jsxs)("p",{className:"text-sm text-muted-foreground",children:[((o.size||0)/1024).toFixed(2)," KB"]})]}),(0,_o.jsx)(N,{type:"submit",onClick:P,children:"Upload"})]})]})]})})};function jn(e){return(0,_o.jsxs)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,_o.jsx)("path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}),(0,_o.jsx)("polyline",{points:"17 8 12 3 7 8"}),(0,_o.jsx)("line",{x1:"12",x2:"12",y1:"3",y2:"15"})]})}function Po({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:i,compactView:n=!1,className:d}){let[r,u]=(0,Ao.useState)(e),[p,c]=(0,Ao.useState)(""),[g,P]=(0,Ao.useState)("all"),[S,x]=(0,Ao.useState)("all"),[A,y]=(0,Ao.useState)(!1),z=(0,Ao.useRef)(""),_=H=>H.map(T=>`${T.id}-${new Date(T.createdAt).getTime()}-${new Date(T.updatedAt).getTime()}`).join("-");(0,Ao.useEffect)(()=>{let H=_(e);H!==z.current&&(u(e),z.current=H)},[e]);let w=r.filter(H=>H.name.toLowerCase().includes(p.toLowerCase())),R=w.slice(0,10),re=w.filter(Boolean),C=()=>{y(!0)},j=H=>{a?.(H)},q=H=>{console.log("deleting file",H),u(T=>T.filter(he=>he.name!==H.name)),o?.(H.id.toString())},U=H=>{i?.(H)},se=()=>{c(""),P("all")};return(0,_o.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,_o.jsx)(Ya.AnimatePresence,{mode:"wait",children:(0,_o.jsx)(Ya.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,_o.jsxs)("div",{className:`space-y-6 ${d||""}`,children:[(0,_o.jsx)(gt,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:C},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,_o.jsx)(ve,{children:(0,_o.jsx)(ea,{className:"_o-6",children:(0,_o.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,_o.jsx)("div",{className:"flex-1",children:(0,_o.jsxs)("div",{className:"relative",children:[(0,_o.jsx)(At.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,_o.jsx)(ne,{placeholder:"Search files...",value:p,onChange:H=>c(H.target.value),className:"pl-9"})]})}),(p||g!=="all")&&(0,_o.jsxs)(N,{variant:"outline",onClick:se,className:"gap-2",children:[(0,_o.jsx)(At.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,_o.jsxs)("div",{className:"space-y-4",children:[(0,_o.jsx)(Ha,{activeTab:S,onTabChange:x,tabOptions:[{value:"all",label:`All Files (${w.length})`},{value:"recent",label:`Recent (${R.length})`}],maxWidth:"500px",gridCols:3}),S==="all"&&(0,_o.jsx)(Ja,{files:w,onFileClick:U,onFileEdit:j,onFileDelete:q,showHeader:!n}),S==="recent"&&(0,_o.jsx)(Ja,{files:R,onFileClick:U,onFileEdit:j,onFileDelete:q,showHeader:!n}),S==="shared"&&(0,_o.jsx)(Ja,{files:re,onFileClick:U,onFileEdit:j,onFileDelete:q,showHeader:!n})]}),w.length===0&&(0,_o.jsx)(ve,{children:(0,_o.jsx)(ea,{className:"_o-6",children:(0,_o.jsxs)("div",{className:"text-center py-8",children:[(0,_o.jsx)(At.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,_o.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,_o.jsx)("p",{className:"text-muted-foreground mb-4",children:p||g!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,_o.jsxs)(N,{onClick:C,className:"gap-2",children:[(0,_o.jsx)(At.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")}),(0,_o.jsx)(tr,{isOpen:A,onClose:()=>y(!1),onAddFile:t})]})}var ar=require("next/navigation");function Ro({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:i=[],initialReminders:n=[],initialColleagues:d=[],initialUsers:r=[],initialFiles:u=[],initialView:p="kanban",onAddTask:c,onUpdateTask:g,onDeleteTask:P,onTaskClick:S,onAddEpic:x,onUpdateEpic:A,onDeleteEpic:y,onAddTaskToEpic:z,onAddSprint:_,onUpdateSprint:w,onDeleteSprint:R,onAddProject:re,onUpdateProject:C,onDeleteProject:j,onFileAdd:q,onFileEdit:U,onFileDelete:se,onFileClick:H,onAddReminder:T,onUpdateReminder:he,onDeleteReminder:f,onViewChange:te,onToggleMobileMenu:G,onTeamClick:Le,onTeamChange:De,onCopilotClick:Ye,handleAddComment:Qe}){let[k,Z]=(0,Ao.useState)(t),[J,tt]=(0,Ao.useState)(a),[me,Ze]=(0,Ao.useState)(o),[_t,bt]=(0,Ao.useState)(i),[na,St]=(0,Ao.useState)(n),[Lt,Kt]=(0,Ao.useState)(d),[Dt,qt]=(0,Ao.useState)(r),[Jt,D]=(0,Ao.useState)(u),[m,v]=(0,Ao.useState)(!1),[O,ee]=(0,Ao.useState)(!1),[Ne,we]=(0,Ao.useState)(null),[$e,sa]=(0,Ao.useState)(null),[la,da]=(0,Ao.useState)(null),[Ot,Eo]=(0,Ao.useState)(p||"kanban"),[Vn,ir]=(0,Ao.useState)(!1),rr=(0,ar.useRouter)();(0,Ao.useEffect)(()=>{Z(t)},[t]),(0,Ao.useEffect)(()=>{Ze(o)},[o]),(0,Ao.useEffect)(()=>{tt(a)},[a]),(0,Ao.useEffect)(()=>{bt(i)},[i]),(0,Ao.useEffect)(()=>{D(u)},[u]),(0,Ao.useEffect)(()=>{qt(r)},[r]),(0,Ao.useEffect)(()=>{Kt(d)},[d]),(0,Ao.useEffect)(()=>{St(n)},[n]),(0,Ao.useEffect)(()=>{Eo(p)},[p]);let nr=k.filter(h=>{}),Gn=h=>nr.filter(F=>F.status===h),$n=h=>{let F={};return J.forEach($=>{}),F},Wn=h=>{da(h)},_n=h=>{la&&(Z(F=>F.map($=>$.id===la.id?{...$,status:h}:$)),da(null))},Io=h=>{let F={...h,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};Z($=>[...$,F]),c?.(F)},Na=async(h,F)=>(Z($=>$.map(Re=>Re.id===Number(h)?{...Re,...F}:Re)),await g?.(h,F)),Kn=async(h,F)=>{Na(h,F)},Mo=h=>{Z(F=>F.filter($=>$.id!==Number(h))),Ne?.id===Number(h)&&we(null),P?.(h)},qn=async h=>{Mo(h)},Jn=h=>{let F={...h,id:Date.now()};bt($=>[...$,F]),re?.(h)},Xn=(h,F)=>{bt($=>$.map(Re=>Re.id===Number(h)?{...Re,...F}:Re)),C?.(h,F)},Yn=h=>{bt(F=>F.filter($=>$.id!==Number(h))),j?.(h)},Bo=h=>{let F={...h,id:Date.now(),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};tt($=>[...$,F]),x?.({...F})},sr=()=>{ee(!0)},lr=(h,F)=>{tt($=>$.map(Re=>Re.id===Number(h)?{...Re,...F}:Re)),A?.(h,F)},dr=h=>{tt(F=>F.filter($=>$.id!==Number(h))),Z(F=>F.filter($=>Se($.epic)!==Number(h))),y?.(h)},cr=h=>{let F={...h,id:Date.now()};Ze($=>[...$,F]),_?.(h)},mr=(h,F)=>{Ze($=>$.map(Re=>Re.id===Number(h)?{...Re,...F}:Re)),w?.(h,F)},pr=h=>{h==="backlog"||h==="all-tasks"||(Ze(F=>F.filter($=>$.id!==Number(h))),Z(F=>F.map($=>Se($.sprint)===Number(h)?{...$,sprint:void 0}:$)),R?.(h))},Qa=h=>{we(h)},ur=h=>{h==="planning"&&window.innerWidth<768||(Eo(h),te?.(h))},Qn=()=>{ir(h=>!h),G?.()},Zn=()=>{rr.push("/")},es=h=>{console.log("Switching to team:",h)},ts=h=>{console.log("Switching to team:",h)},gr=h=>{v(!0)},fr=()=>{v(!1),sa(null)},vr=h=>{let F={...h,id:Date.now(),createdAt:new Date().toISOString()};St($=>[...$,F]),T?.(h)},br=(h,F)=>{St($=>$.map(Re=>Re.id===Number(h)?{...Re,...F}:Re)),he?.(h,F)},hr=h=>{St(F=>F.filter($=>$.id!==Number(h))),f?.(h)},yr=()=>{q?.()},xr=h=>{U?.(h)},wr=h=>{D(F=>F.filter($=>$.name!==h)),se?.(h)},Nr=h=>{H?.(h)},as=[{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"}],os=()=>{switch(Ot){case"kanban":return"Project Board";case"planning":return"Sprint Planning";case"tasks":return"Task Reminders";case"files":return"Documentation";case"epics":return"Epic Planning";default:return"Project Board"}},Za=[{id:"1",name:"Product Development",avatar:"PD",lastUsed:new Date("2024-01-20")},{id:"2",name:"Engineering",avatar:"ENG",lastUsed:new Date("2024-01-19")},{id:"3",name:"Marketing Team",avatar:"MT",lastUsed:new Date("2024-01-18")},{id:"4",name:"Design System",avatar:"DS",lastUsed:new Date("2024-01-17")},{id:"5",name:"Sales Operations",avatar:"SO",lastUsed:new Date("2024-01-16")},{id:"6",name:"Customer Success",avatar:"CS",lastUsed:new Date("2024-01-15")}],is=Za.sort((h,F)=>F.lastUsed.getTime()-h.lastUsed.getTime()).slice(0,3),rs=Za.length>3,ns=Za.slice(3);return(0,_o.jsxs)(Ni,{currentView:Ot,onViewChange:ur,children:[Ot==="kanban"&&(0,_o.jsx)("div",{className:"h-full overflow-hidden",children:(0,_o.jsx)($i,{initialProjects:_t,initialEpics:J,initialSprints:me.map(h=>({...h,isSelected:!1})),initialTasks:k,initialColleagues:Lt,initialUsers:Dt,onAddTask:Io,onUpdateTask:Na,onDeleteTask:Mo,onTaskClick:Qa,onAddEpic:Bo,onAddComment:Qe})}),Ot==="planning"&&(0,_o.jsx)("div",{className:"hidden md:block h-full",children:(0,_o.jsx)(Yi,{tasks:k,epics:J,sprints:me,onUpdateTask:Na,onTaskClick:Qa,onAddSprint:cr,onUpdateSprint:mr,onDeleteSprint:pr})}),Ot==="tasks"&&(0,_o.jsx)("div",{className:"h-full",children:(0,_o.jsx)(Qi,{initialReminders:na,initialColleagues:Lt,onAddReminder:vr,onUpdateReminder:br,onDeleteReminder:hr})}),Ot==="files"&&(0,_o.jsx)("div",{className:"h-full",children:(0,_o.jsx)(Po,{initialFiles:Jt,onFileAdd:yr,onFileEdit:xr,onFileDelete:wr,onFileClick:Nr,compactView:!1})}),Ot==="epics"&&(0,_o.jsx)("div",{className:"h-full",children:(0,_o.jsx)(Wi,{tasks:k,epics:J,sprints:me,onUpdateTask:Na,onTaskClick:Qa,onAddTaskToEpic:gr,onAddEpic:sr,onUpdateEpic:lr,onDeleteEpic:dr})}),(0,_o.jsx)(aa,{isOpen:m,onClose:fr,onAddTask:Io,epics:J,sprints:me,assignees:[...Lt,...Dt],defaultEpicId:$e||void 0}),(0,_o.jsx)(ia,{isOpen:O,onClose:()=>ee(!1),onAddEpic:Bo})]})}function or({title:e="",projects:t,businessUnits:a,epics:o,sprints:i,tasks:n,currentView:d,onAddTask:r,onUpdateTask:u,onDeleteTask:p,onTaskClick:c,onAddEpic:g,onUpdateEpic:P,onDeleteEpic:S,onAddTaskToEpic:x,onAddSprint:A,onUpdateSprint:y,onDeleteSprint:z,onAddProject:_,onUpdateProject:w,onDeleteProject:R,onViewChange:re,mobileMenuOpen:C,onToggleMobileMenu:j,onTeamClick:q,onTeamChange:U,onCopilotClick:se}){let[H,T]=(0,Ao.useState)("projects"),[he,f]=(0,Ao.useState)(a[0]),te=J=>{console.log("Opening app:",J.name)},G=J=>{console.log("Favoriting app:",J.name)},Le=J=>{console.log("Opening file:",J.name)},De=J=>{console.log("Sharing file:",J.name)},Ye=J=>{console.log("Opening project:",J.name)},Qe=J=>{console.log("Sharing project:",J.name)},k=J=>{console.log("Business unit changed to:",J.name)},Z=()=>{switch(H){case"projects":return(0,_o.jsx)(Ro,{initialProjects:t,initialEpics:o,initialSprints:i,initialTasks:n,onAddTask:r,onUpdateTask:u,onDeleteTask:p,onTaskClick:c,onAddEpic:g,onUpdateEpic:P,onDeleteEpic:S,onAddTaskToEpic:x,onAddSprint:A,onUpdateSprint:y,onDeleteSprint:z,onAddProject:_,onUpdateProject:w,onDeleteProject:R,onViewChange:re,onToggleMobileMenu:j,onTeamClick:q,onTeamChange:U,onCopilotClick:se});default:return null}};return(0,_o.jsx)(wi,{sidebarItems:ri,title:e,notifications:ni,businessUnits:a,currentBusinessUnit:he,onBusinessUnitChange:k,activeTab:H,onTabChange:T,showTabs:!0,children:(0,_o.jsx)(Ya.AnimatePresence,{mode:"wait",children:(0,_o.jsx)(Ya.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:Z()},H)})})}