cortex-react-components 2.0.11 → 2.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-RGOKBIQ5.mjs → chunk-255P6K5W.mjs} +1 -1
- package/dist/{chunk-FGH7ESCA.mjs → chunk-2GNX22CR.mjs} +1 -1
- package/dist/{chunk-GTZJWMZR.mjs → chunk-2RQDJ5XT.mjs} +1 -1
- package/dist/{chunk-YTK3LJ6Z.mjs → chunk-3UMWGTHK.mjs} +1 -1
- package/dist/chunk-5BNMRE6J.mjs +4 -0
- package/dist/{chunk-75F3LJMX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
- package/dist/{chunk-RJGYVDOU.mjs → chunk-67QPOSVV.mjs} +1 -1
- package/dist/{chunk-CXOVEABI.mjs → chunk-7GMAMIHM.mjs} +1 -1
- package/dist/{chunk-RAGDUV7M.mjs → chunk-7VDNUJZC.mjs} +1 -1
- package/dist/{chunk-GBTFOUD6.mjs → chunk-AQZEZ3UR.mjs} +1 -1
- package/dist/{chunk-QTILVWJA.mjs → chunk-B2EJGXDG.mjs} +1 -1
- package/dist/{chunk-GVDM4RRN.mjs → chunk-B7AXSCTN.mjs} +1 -1
- package/dist/{chunk-V7F26YS5.mjs → chunk-BE5B22X7.mjs} +1 -1
- package/dist/{chunk-ABGNIQRP.mjs → chunk-ECXVQZBN.mjs} +1 -1
- package/dist/{chunk-WIRQ5IRT.mjs → chunk-ERJXTG6X.mjs} +1 -1
- package/dist/{chunk-3NRXQBBS.mjs → chunk-FKU4VQR6.mjs} +1 -1
- package/dist/{chunk-M4UVNIK2.mjs → chunk-FTZRG54P.mjs} +1 -1
- package/dist/{chunk-GHOL5L32.mjs → chunk-H3CJOE6S.mjs} +1 -1
- package/dist/{chunk-XXQPX7T3.mjs → chunk-H7PR7Q2X.mjs} +1 -1
- package/dist/{chunk-NINFDOV5.mjs → chunk-HKGW6JI2.mjs} +1 -1
- package/dist/{chunk-FE7ZGUPU.mjs → chunk-IF3425JX.mjs} +1 -1
- package/dist/{chunk-TK4JC5PG.mjs → chunk-INPV5MBU.mjs} +1 -1
- package/dist/{chunk-V25DRKWY.mjs → chunk-JPLBPV7J.mjs} +1 -1
- package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
- package/dist/{chunk-75WE6ZXB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
- package/dist/{chunk-KWYJ3XZI.mjs → chunk-LJOWXPWW.mjs} +1 -1
- package/dist/{chunk-AJQHGVZ5.mjs → chunk-LJQPLE4S.mjs} +1 -1
- package/dist/{chunk-3HNU2NYP.mjs → chunk-M7NV6EFH.mjs} +1 -1
- package/dist/{chunk-7R47MHQE.mjs → chunk-MXCW6SOT.mjs} +1 -1
- package/dist/{chunk-2BRDNDUB.mjs → chunk-N3B3XNV3.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/{chunk-5MWZTJYP.mjs → chunk-PK3OBSCB.mjs} +1 -1
- package/dist/{chunk-IPIDKLAW.mjs → chunk-RNMPX2AU.mjs} +1 -1
- package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
- package/dist/{chunk-OQYER4E7.mjs → chunk-SW7RYGO6.mjs} +1 -1
- package/dist/chunk-TR6RBROH.mjs +1 -0
- package/dist/{chunk-YP5YVY6N.mjs → chunk-VVCAOIYO.mjs} +1 -1
- package/dist/chunk-VWLPVN4M.mjs +4 -0
- package/dist/{chunk-7HR6FNWF.mjs → chunk-XHR2HXMP.mjs} +1 -1
- package/dist/{chunk-C4RWEPVF.mjs → chunk-YKG4FNS4.mjs} +1 -1
- package/dist/{chunk-UEBQJNVT.mjs → chunk-ZGQC6O62.mjs} +1 -1
- package/dist/components/{DigitalColleagues/sidebar.d.ts → AdvancedComponents/AppSidebar.d.ts} +2 -2
- package/dist/components/AdvancedComponents/AppSidebar.js +5 -0
- package/dist/components/{DigitalColleagues/sidebar.mjs → AdvancedComponents/AppSidebar.mjs} +1 -1
- package/dist/components/AdvancedComponents/index.d.ts +3 -0
- package/dist/components/AdvancedComponents/index.js +1 -1
- package/dist/components/AdvancedComponents/index.mjs +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo.js +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
- package/dist/components/DeliveryLead/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/DashboardHeader.mjs +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.js +1 -1
- package/dist/components/DigitalColleagues/DigitalColleageusLayout.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -3
- package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -3
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.d.ts +13 -0
- package/dist/components/DigitalColleagues/index.js +5 -0
- package/dist/components/DigitalColleagues/index.mjs +1 -0
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/business-unit-switcher.mjs +3 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +11 -11
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +15 -15
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-HNCC3AOT.mjs +0 -4
- package/dist/components/AdvancedComponents/sidebar.d.ts +0 -16
- package/dist/components/AdvancedComponents/sidebar.js +0 -5
- package/dist/components/AdvancedComponents/sidebar.mjs +0 -4
- package/dist/components/DigitalColleagues/sidebar-new.d.ts +0 -17
- package/dist/components/DigitalColleagues/sidebar-new.js +0 -5
- package/dist/components/DigitalColleagues/sidebar-new.mjs +0 -4
- package/dist/components/DigitalColleagues/sidebar.css +0 -1
- package/dist/components/DigitalColleagues/sidebar.js +0 -5
- /package/dist/components/AdvancedComponents/{sidebar.css → AppSidebar.css} +0 -0
- /package/dist/components/{DigitalColleagues → AdvancedComponents}/sidebar-favorites-readme.js +0 -0
- /package/dist/components/{DigitalColleagues → AdvancedComponents}/sidebar-favorites-readme.mjs +0 -0
- /package/dist/components/DigitalColleagues/{sidebar-new.css → index.css} +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use strict";
|
|
3
|
+
"use client"
|
|
4
|
+
|
|
5
|
+
"use strict";var md=Object.create;var ti=Object.defineProperty;var pd=Object.getOwnPropertyDescriptor;var ud=Object.getOwnPropertyNames;var gd=Object.getPrototypeOf,fd=Object.prototype.hasOwnProperty;var vd=(e,t)=>{for(var a in t)ti(e,a,{get:t[a],enumerable:!0})},Cs=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ud(t))!fd.call(e,r)&&r!==a&&ti(e,r,{get:()=>t[r],enumerable:!(o=pd(t,r))||o.enumerable});return e};var le=(e,t,a)=>(a=e!=null?md(gd(e)):{},Cs(t||!e||!e.__esModule?ti(a,"default",{value:e,enumerable:!0}):a,e)),bd=e=>Cs(ti({},"__esModule",{value:!0}),e);var em={};vd(em,{AppSidebarLeft:()=>li,ColleagueCard:()=>oo,ColleagueForm:()=>Lo,ColleagueTypeSelection:()=>Ei,ColleaguesView:()=>Vo,DashboardHeader:()=>tn,DashboardPage:()=>es,DigitalColleageusLayout:()=>Ci,DigitalColleagueClone:()=>Bi,DigitalColleagueOptions:()=>Fi,FileView:()=>Ko,KnowledgeView:()=>Go,MainPage:()=>$r,ManagementSidebar:()=>Ii,ProjectView:()=>ps,ProjectsIndexView:()=>fs,SearchableSelect:()=>Mi,TeamsIndexView:()=>vs});module.exports=bd(em);var en=require("lucide-react");var Ga=le(require("@radix-ui/react-collapsible")),sr=Ga.Root,Ss=Ga.CollapsibleTrigger,Ds=Ga.CollapsibleContent;var Cr=le(require("clsx"));var Bs=require("clsx");var dr="-",hd=e=>{let t=yd(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let l=s.split(dr);return l[0]===""&&l.length!==1&&l.shift(),Ps(l,t)||xd(s)},getConflictingClassGroupIds:(s,l)=>{let d=a[s]||[];return l&&o[s]?[...d,...o[s]]:d}}},Ps=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Ps(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(dr);return t.validators.find(({validator:s})=>s(i))?.classGroupId},ks=/^\[(.+)\]$/,xd=e=>{if(ks.test(e)){let t=ks.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},yd=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Nd(Object.entries(e.classGroups),a).forEach(([i,s])=>{lr(s,o,i,t)}),o},lr=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:Ts(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(wd(r)){lr(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,s])=>{lr(s,Ts(t,i),a,o)})})},Ts=(e,t)=>{let a=e;return t.split(dr).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},wd=e=>e.isThemeGetter,Nd=(e,t)=>t?e.map(([a,o])=>{let r=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([s,l])=>[t+s,l])):i);return[a,r]}):e,Cd=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,s)=>{a.set(i,s),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let s=a.get(i);if(s!==void 0)return s;if((s=o.get(i))!==void 0)return r(i,s),s},set(i,s){a.has(i)?a.set(i,s):r(i,s)}}},Rs="!",Sd=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,s=l=>{let d=[],m=0,c=0,v;for(let h=0;h<l.length;h++){let x=l[h];if(m===0){if(x===r&&(o||l.slice(h,h+i)===t)){d.push(l.slice(c,h)),c=h+i;continue}if(x==="/"){v=h;continue}}x==="["?m++:x==="]"&&m--}let u=d.length===0?l:l.substring(c),f=u.startsWith(Rs),y=f?u.substring(1):u,I=v&&v>c?v-c:void 0;return{modifiers:d,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:I}};return a?l=>a({className:l,parseClassName:s}):s},Dd=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},kd=e=>({cache:Cd(e.cacheSize),parseClassName:Sd(e),...hd(e)}),Td=/\s+/,Pd=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],s=e.trim().split(Td),l="";for(let d=s.length-1;d>=0;d-=1){let m=s[d],{modifiers:c,hasImportantModifier:v,baseClassName:u,maybePostfixModifierPosition:f}=a(m),y=!!f,I=o(y?u.substring(0,f):u);if(!I){if(!y){l=m+(l.length>0?" "+l:l);continue}if(I=o(u),!I){l=m+(l.length>0?" "+l:l);continue}y=!1}let h=Dd(c).join(":"),x=v?h+Rs:h,C=x+I;if(i.includes(C))continue;i.push(C);let M=r(I,y);for(let H=0;H<M.length;++H){let ae=M[H];i.push(x+ae)}l=m+(l.length>0?" "+l:l)}return l};function Rd(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=As(t))&&(o&&(o+=" "),o+=a);return o}var As=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=As(e[o]))&&(a&&(a+=" "),a+=t);return a};function Ad(e,...t){let a,o,r,i=s;function s(d){let m=t.reduce((c,v)=>v(c),e());return a=kd(m),o=a.cache.get,r=a.cache.set,i=l,l(d)}function l(d){let m=o(d);if(m)return m;let c=Pd(d,a);return r(d,c),c}return function(){return i(Rd.apply(null,arguments))}}var Ge=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Is=/^\[(?:([a-z-]+):)?(.+)\]$/i,Id=/^\d+\/\d+$/,Md=new Set(["px","full","screen"]),Ed=/^(\d+(\.\d+)?)?(xs|sm|md|lg|Xs)$/,Bd=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|Fs|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Fd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ld=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)Fs-?((\d+)?\.?(\d+)[a-z]+|0)/,jd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ea=e=>_a(e)||Md.has(e)||Id.test(e),pa=e=>Ka(e,"length",Kd),_a=e=>!!e&&!Number.isNaN(Number(e)),nr=e=>Ka(e,"number",_a),xo=e=>!!e&&Number.isInteger(Number(e)),Od=e=>e.endsWith("%")&&_a(e.slice(0,-1)),fe=e=>Is.test(e),ua=e=>Ed.test(e),zd=new Set(["length","size","percentage"]),Hd=e=>Ka(e,zd,Ms),Ud=e=>Ka(e,"position",Ms),Vd=new Set(["image","url"]),Gd=e=>Ka(e,Vd,Wd),_d=e=>Ka(e,"",$d),yo=()=>!0,Ka=(e,t,a)=>{let o=Is.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Kd=e=>Bd.test(e)&&!Fd.test(e),Ms=()=>!1,$d=e=>Ld.test(e),Wd=e=>jd.test(e);var Jd=()=>{let e=Ge("colors"),t=Ge("spacing"),a=Ge("blur"),o=Ge("brightness"),r=Ge("borderColor"),i=Ge("borderRadius"),s=Ge("borderSpacing"),l=Ge("borderWidth"),d=Ge("contrast"),m=Ge("grayscale"),c=Ge("hueRotate"),v=Ge("invert"),u=Ge("gap"),f=Ge("gradientColorStops"),y=Ge("gradientColorStopPositions"),I=Ge("inset"),h=Ge("margin"),x=Ge("opacity"),C=Ge("padding"),M=Ge("saturate"),H=Ge("scale"),ae=Ge("sepia"),X=Ge("skew"),ie=Ge("space"),N=Ge("translate"),T=()=>["auto","contain","none"],V=()=>["auto","hidden","clip","visible","scroll"],ge=()=>["auto",fe,t],F=()=>[fe,t],k=()=>["",ea,pa],w=()=>["auto",_a,fe],oe=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Se=()=>["solid","dashed","dotted","double","none"],Ze=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ae=()=>["start","end","center","between","around","evenly","stretch"],et=()=>["","0",fe],j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],re=()=>[_a,fe];return{cacheSize:500,separator:":",theme:{colors:[yo],spacing:[ea,pa],blur:["none","",ua,fe],brightness:re(),borderColor:[e],borderRadius:["none","","full",ua,fe],borderSpacing:F(),borderWidth:k(),contrast:re(),grayscale:et(),hueRotate:re(),invert:et(),gap:F(),gradientColorStops:[e],gradientColorStopPositions:[Od,pa],inset:ge(),margin:ge(),opacity:re(),padding:F(),saturate:re(),scale:re(),sepia:et(),skew:re(),space:F(),translate:F()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[ua]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"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:[...oe(),fe]}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[I]}],"inset-x":[{"inset-x":[I]}],"inset-y":[{"inset-y":[I]}],start:[{start:[I]}],end:[{end:[I]}],top:[{top:[I]}],right:[{right:[I]}],bottom:[{bottom:[I]}],left:[{left:[I]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",xo,fe]}],basis:[{basis:ge()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",fe]}],grow:[{grow:et()}],shrink:[{shrink:et()}],order:[{order:["first","last","none",xo,fe]}],"grid-cols":[{"grid-cols":[yo]}],"col-start-end":[{col:["auto",{span:["full",xo,fe]},fe]}],"col-start":[{"col-start":w()}],"col-end":[{"col-end":w()}],"grid-rows":[{"grid-rows":[yo]}],"row-start-end":[{row:["auto",{span:[xo,fe]},fe]}],"row-start":[{"row-start":w()}],"row-end":[{"row-end":w()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",fe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",fe]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...Ae()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ae(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ae(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],Fs:[{Fs:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],Fs:[{Fs:[C]}],Fs:[{Fs:[C]}],Fs:[{Fs:[C]}],pb:[{pb:[C]}],pl:[{pl:[C]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],Fs:[{Fs:[h]}],mt:[{mt:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[ie]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ie]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",fe,t]}],"min-w":[{"min-w":[fe,t,"min","max","fit"]}],"max-w":[{"max-w":[fe,t,"none","full","min","max","fit","prose",{screen:[ua]},ua]}],h:[{h:[fe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[fe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[fe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ua,pa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",nr]}],"font-family":[{font:[yo]}],"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",fe]}],"line-clamp":[{"line-clamp":["none",_a,nr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ea,fe]}],"list-image":[{"list-image":["none",fe]}],"list-style-type":[{list:["none","disc","decimal",fe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","en-underline"],"text-decoration-style":[{decoration:[...Se(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ea,pa]}],"underline-offset":[{"underline-offset":["auto",ea,fe]}],"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:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",fe]}],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",fe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...oe(),Ud]}],"bg-repeat":[{bg:["en-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Hd]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","Xs"]},Gd]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-Fs":[{"rounded-Fs":[i]}],"rounded-Fs":[{"rounded-Fs":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-Xs":[{"rounded-Xs":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[l]}],"border-w-x":[{"border-x":[l]}],"border-w-y":[{"border-y":[l]}],"border-w-s":[{"border-s":[l]}],"border-w-e":[{"border-e":[l]}],"border-w-t":[{"border-t":[l]}],"border-w-r":[{"border-r":[l]}],"border-w-b":[{"border-b":[l]}],"border-w-l":[{"border-l":[l]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...Se(),"hidden"]}],"divide-x":[{"divide-x":[l]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[l]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:Se()}],"border-color":[{border:[r]}],"border-color-x":[{"border-x":[r]}],"border-color-y":[{"border-y":[r]}],"border-color-s":[{"border-s":[r]}],"border-color-e":[{"border-e":[r]}],"border-color-t":[{"border-t":[r]}],"border-color-r":[{"border-r":[r]}],"border-color-b":[{"border-b":[r]}],"border-color-l":[{"border-l":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...Se()]}],"outline-offset":[{"outline-offset":[ea,fe]}],"outline-w":[{outline:[ea,pa]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:k()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[ea,pa]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ua,_d]}],"shadow-color":[{shadow:[yo]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...Ze(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ze()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",ua,fe]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[v]}],saturate:[{saturate:[M]}],sepia:[{sepia:[ae]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[c]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[M]}],"backdrop-sepia":[{"backdrop-sepia":[ae]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",fe]}],duration:[{duration:re()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:re()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[H]}],"scale-x":[{"scale-x":[H]}],"scale-y":[{"scale-y":[H]}],rotate:[{rotate:[xo,fe]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[X]}],"skew-y":[{"skew-y":[X]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",fe]}],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","en-drop","grab","grabbing","all-scroll","col-resize","row-resize","Fs-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","Fs-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",fe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-Fs":[{"scroll-Fs":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-Fs":[{"scroll-Fs":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-Fs":[{"scroll-Fs":F()}],"scroll-Fs":[{"scroll-Fs":F()}],"scroll-Fs":[{"scroll-Fs":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",fe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ea,pa,nr]}],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"],Fs:["px","py","ps","Fs","Fs","Fs","pb","pl"],px:["Fs","pl"],py:["Fs","pb"],m:["mx","my","ms","Fs","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-Fs","rounded-Fs","rounded-es","rounded-Xs","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Fs","rounded-Fs"],"rounded-t":["rounded-Xs","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-Xs","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-Fs","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-Fs":["scroll-px","scroll-py","scroll-ps","scroll-Fs","scroll-Fs","scroll-Fs","scroll-pb","scroll-pl"],"scroll-px":["scroll-Fs","scroll-pl"],"scroll-py":["scroll-Fs","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Es=Ad(Jd);function g(...e){return Es((0,Bs.clsx)(e))}var Fs=require("react/jsx-runtime");function yt({className:e,...t}){return(0,Fs.jsx)("div",{className:g("animate-pulse rounded-md bg-primary/10",e),...t})}var he=le(require("react")),qa=require("@radix-ui/react-slot"),Xs=require("class-variance-authority");var ai=require("react"),Ls=(e=768)=>{let[t,a]=(0,ai.useState)(!1);return(0,ai.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var zs=le(require("react")),oi=(0,Xs.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"}}}),b=zs.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,Fs.jsx)(e?qa.Slot:"button",{className:g(oi({className:t,size:a,variant:o})),ref:i,...r}));b.displayName="Button";var Us=le(require("react"));var U=Us.forwardRef(({className:e,type:t,...a},o)=>(0,Fs.jsx)("input",{type:t,className:g("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}));U.displayName="Input";var Gs=le(require("react")),cr=le(require("@radix-ui/react-separator"));var wo=Gs.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,Fs.jsx)(cr.Root,{ref:r,decorative:a,orientation:t,className:g("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));wo.displayName=cr.Root.displayName;var No=le(require("react")),mt=le(require("@radix-ui/react-dialog")),Ks=require("@radix-ui/react-icons");var Ws=mt.Root;var qd=mt.Portal,Js=No.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(mt.Overlay,{className:g("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,ref:a}));Js.displayName=mt.Overlay.displayName;var Xd=(0,$s.cva)("fixed z-50 gap-4 bg-background Fs-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),mr=No.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,Fs.jsxs)(qd,{children:[(0,Fs.jsx)(Js,{}),(0,Fs.jsxs)(mt.Content,{ref:r,className:g(Xd({side:e}),t),...o,children:[(0,Fs.jsxs)(mt.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-secondary",children:[(0,Fs.jsx)(Ks.Cross2Icon,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{className:"sr-only",children:"Close"})]}),a]})]}));mr.displayName=mt.Content.displayName;var Yd=({className:e,...t})=>(0,Fs.jsx)("div",{className:g("flex flex-col space-y-2 text-center sm:text-left",e),...t});Yd.displayName="SheetHeader";var Qd=({className:e,...t})=>(0,Fs.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Qd.displayName="SheetFooter";var Zd=No.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(mt.Title,{ref:a,className:g("text-lg font-semibold text-foreground",e),...t}));Zd.displayName=mt.Title.displayName;var ec=No.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(mt.Description,{ref:a,className:g("text-sm text-muted-foreground",e),...t}));ec.displayName=mt.Description.displayName;var qs=le(require("react")),_t=le(require("@radix-ui/react-tooltip"));var $a=_t.Provider,Wa=_t.Root,Ja=_t.Trigger,Ta=qs.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Fs.jsx)(_t.Portal,{children:(0,Fs.jsx)(_t.Content,{ref:o,sideOffset:t,className:g("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})}));Ta.displayName=_t.Content.displayName;var tc="sidebar:state",ac=60*60*24*7,oc="16rem",ic="18rem",rc="3rem",sc="b",Qs=he.createContext(null);function ii(){let e=he.useContext(Qs);if(!e)throw new Error("useSidebar must Fs used within a SidebarProvider.");return e}var Co=he.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:i,...s},l)=>{let d=Ls(),[m,c]=he.useState(!1),[v,u]=he.useState(e),f=t??v,y=he.useCallback(C=>{if(a)return a?.(typeof C=="function"?C(f):C);u(C),document.cookie=`${tc}=${f}; path=/; max-age=${ac}`},[a,f]),I=he.useCallback(()=>d?c(C=>!C):y(C=>!C),[d,y,c]);he.useEffect(()=>{let C=M=>{M.key===sc&&(M.metaKey||M.ctrlKey)&&(M.preventDefault(),I())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[I]);let h=f?"expanded":"collapsed",x=he.useMemo(()=>({state:h,open:f,setOpen:y,isMobile:d,openMobile:m,setOpenMobile:c,toggleSidebar:I}),[h,f,y,d,m,c,I]);return(0,Fs.jsx)(Qs.Provider,{value:x,children:(0,Fs.jsx)($a,{delayDuration:0,children:(0,Fs.jsx)("div",{style:{"--sidebar-width":oc,"--sidebar-width-icon":rc,...r},className:g("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:l,...s,children:i})})})});Co.displayName="SidebarProvider";var ur=he.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...i},s)=>{let{isMobile:l,state:d,openMobile:m,setOpenMobile:c}=ii();return a==="none"?(0,Fs.jsx)("div",{className:g("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:s,...i,children:r}):l?(0,Fs.jsx)(Ws,{open:m,onOpenChange:c,...i,children:(0,Fs.jsx)(mr,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar Fs-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":ic},side:e,children:(0,Fs.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,Fs.jsxs)("div",{ref:s,className:"group peer hidden md:block text-sidebar-foreground","data-state":d,"data-collapsible":d==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Fs.jsx)("div",{className:g("duration-200 relative h-svh w-[--sidebar-width] bg-transparent transition-[width] ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",t==="floating"||t==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)Fs+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,Fs.jsx)("div",{className:g("duration-200 fixed top-14 bottom-0 z-10 hidden w-[--sidebar-width] transition-[left,right,width] ease-linear md:flex",e==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]",t==="floating"||t==="inset"?"Fs-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)Fs+_theme(spacing.4)Fs+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",o),...i,children:(0,Fs.jsx)("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:r})})]})});ur.displayName="Sidebar";var gr=he.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=ii();return(0,Fs.jsxs)(b,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:g("h-7 w-7",e),onClick:i=>{t?.(i),r()},...a,children:[(0,Fs.jsx)(en.PanelLeft,{}),(0,Fs.jsx)("span",{className:"sr-only",children:"Toggle Sidebar"})]})});gr.displayName="SidebarTrigger";var nc=he.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=ii();return(0,Fs.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:g("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]Fs&]:cursor-w-resize [[data-side=right]Fs&]:cursor-e-resize","[[data-side=left][data-state=collapsed]Fs&]:cursor-e-resize [[data-side=right][data-state=collapsed]Fs&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]Fs&]:-right-2","[[data-side=right][data-collapsible=offcanvas]Fs&]:-left-2",e),...t})});nc.displayName="SidebarRail";var fr=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("main",{ref:a,className:g("flex flex-1 flex-col bg-background overflow-y-auto relative max-h-full","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-Xs md:peer-data-[variant=inset]:shadow",e),...t}));fr.displayName="SidebarInset";var lc=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(U,{ref:a,"data-sidebar":"input",className:g("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));lc.displayName="SidebarInput";var vr=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,"data-sidebar":"header",className:g("flex flex-col gap-2 Fs-2",e),...t}));vr.displayName="SidebarHeader";var br=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,"data-sidebar":"footer",className:g("flex flex-col gap-2 Fs-2",e),...t}));br.displayName="SidebarFooter";var dc=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(wo,{ref:a,"data-sidebar":"separator",className:g("mx-2 w-auto bg-sidebar-border",e),...t}));dc.displayName="SidebarSeparator";var ri=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,"data-sidebar":"content",className:g("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));ri.displayName="SidebarContent";var si=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,"data-sidebar":"group",className:g("relative flex w-full min-w-0 flex-col Fs-2",e),...t}));si.displayName="SidebarGroup";var cc=he.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Fs.jsx)(t?qa.Slot:"div",{ref:o,"data-sidebar":"group-label",className:g("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 outline-none ring-sidebar-ring transition-[margin,opa] ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",e),...a}));cc.displayName="SidebarGroupLabel";var mc=he.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Fs.jsx)(t?qa.Slot:"button",{ref:o,"data-sidebar":"group-action",className:g("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md Fs-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...a}));mc.displayName="SidebarGroupAction";var hr=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,"data-sidebar":"group-content",className:g("w-full text-sm",e),...t}));hr.displayName="SidebarGroupContent";var So=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("ul",{ref:a,"data-sidebar":"menu",className:g("flex w-full min-w-0 flex-col gap-1",e),...t}));So.displayName="SidebarMenu";var Do=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:g("group/menu-item relative",e),...t}));Do.displayName="SidebarMenuItem";var pc=(0,Xs.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md Fs-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:Fs-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:font-medium data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!Fs-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm group-data-[collapsible=icon]:!Fs-0"}},defaultVariants:{variant:"default",size:"default"}}),ni=he.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:i,...s},l)=>{let d=e?qa.Slot:"button",{isMobile:m,state:c}=ii(),v=(0,Fs.jsx)(d,{ref:l,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:g(pc({variant:a,size:o}),i),...s});return r?(typeof r=="string"&&(r={children:r}),(0,Fs.jsxs)(Wa,{children:[(0,Fs.jsx)(Ja,{asChild:!0,children:v}),(0,Fs.jsx)(Ta,{side:"right",align:"center",hidden:c!=="collapsed"||m,...r})]})):v});ni.displayName="SidebarMenuButton";var xr=he.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,Fs.jsx)(t?qa.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:g("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md Fs-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",a&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...o}));xr.displayName="SidebarMenuAction";var uc=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:g("absolute right-1 flex h-5 min-w-5 items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground select-none pointer-events-none","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-1","peer-data-[size=default]/menu-button:top-1.5","peer-data-[size=lg]/menu-button:top-2.5","group-data-[collapsible=icon]:hidden",e),...t}));uc.displayName="SidebarMenuBadge";var gc=he.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=he.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Fs.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:g("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Fs.jsx)(yt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,Fs.jsx)(yt,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});gc.displayName="SidebarMenuSkeleton";var yr=he.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("ul",{ref:a,"data-sidebar":"menu-sub",className:g("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-l border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));yr.displayName="SidebarMenuSub";var wr=he.forwardRef(({...e},t)=>(0,Fs.jsx)("li",{ref:t,...e}));wr.displayName="SidebarMenuSubItem";var Nr=he.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},i)=>(0,Fs.jsx)(e?qa.Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:g("flex h-7 min-w-0 -translate-x-px items-center gap-2 overflow-hidden rounded-md px-2 text-sidebar-foreground outline-none ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-sidebar-accent-foreground","data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground",t==="sm"&&"text-xs",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));Nr.displayName="SidebarMenuSubButton";function li({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:i,menuHeading:s,onNavClick:l,loading:d=!1,LinkComponent:m,...c}){let u=m?f=>(0,Fs.jsx)(m,{...f}):l?({href:f,children:y,...I})=>(0,Fs.jsx)("button",{onClick:()=>l&&l(f),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:y}):f=>(0,Fs.jsx)("a",{...f});return(0,Fs.jsxs)(ur,{...c,variant:"inset",children:[(0,Fs.jsx)(vr,{children:(0,Fs.jsx)(So,{children:(0,Fs.jsx)(Do,{children:d?(0,Fs.jsxs)("div",{className:"grid flex-1 Fs-2 text-left text-m leading-tight",children:[(0,Fs.jsx)(yt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Fs.jsxs)("div",{className:"grid flex-1 Fs-2 text-left text-m leading-tight",children:[(0,Fs.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,Fs.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),d&&(0,Fs.jsxs)(ri,{children:[(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Fs.jsx)(yt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Fs.jsxs)(ri,{children:[(0,Fs.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!d&&a.map((f,y)=>(0,Fs.jsx)(Zs,{subNav:f,pathName:i,Link:u},y)),(0,Fs.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!d&&e.map((f,y)=>(0,Fs.jsx)(Zs,{subNav:f,pathName:i,Link:u},y)),(0,Fs.jsx)(si,{className:"mt-auto",children:(0,Fs.jsx)(hr,{children:(0,Fs.jsx)(So,{children:t&&!d&&t.map(f=>(0,Fs.jsx)(Do,{children:(0,Fs.jsx)(ni,{asChild:!0,size:"sm",children:(0,Fs.jsxs)(u,{href:f.url||"",children:[f.icon&&(0,Fs.jsx)(f.icon,{}),(0,Fs.jsx)("span",{children:f.label})]})})},f.label))})})})]}),(0,Fs.jsx)(br,{})]})}function Zs({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,Fs.jsx)(sr,{defaultOpen:!0,className:"group/collapsible",children:(0,Fs.jsx)(si,{className:"py-0",children:(0,Fs.jsx)(So,{children:(0,Fs.jsx)(sr,{asChild:!0,defaultOpen:o.isActive,children:(0,Fs.jsxs)(Do,{children:[(0,Fs.jsx)(ni,{asChild:!0,tooltip:o.label,className:(0,Cr.default)(r&&"font-bold text-accent"),children:(0,Fs.jsxs)(a,{href:o.url,children:[o.icon&&(0,Fs.jsx)(o.icon,{}),(0,Fs.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsx)(Ss,{asChild:!0,children:(0,Fs.jsxs)(xr,{className:"data-[state=open]:rotate-90",children:[(0,Fs.jsx)(en.ChevronRight,{}),(0,Fs.jsx)("span",{className:"sr-only",children:"Toggle"})]})}),(0,Fs.jsx)(Ds,{children:(0,Fs.jsx)(yr,{children:o.links?.map(i=>(0,Fs.jsx)(wr,{children:(0,Fs.jsx)(Nr,{asChild:!0,className:(0,Cr.default)(i.url===t&&"font-bold text-accent"),children:(0,Fs.jsx)(a,{href:i.url,children:(0,Fs.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var di=le(require("react")),ta=le(require("@radix-ui/react-avatar"));var At=di.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(ta.Root,{ref:a,className:g("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));At.displayName=ta.Root.displayName;var aa=di.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(ta.Image,{ref:a,className:g("aspect-square h-full w-full",e),...t}));aa.displayName=ta.Image.displayName;var It=di.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(ta.Fallback,{ref:a,className:g("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));It.displayName=ta.Fallback.displayName;var oa=le(require("react")),we=le(require("@radix-ui/react-dropdown-menu"));var Ya=we.Root,Qa=we.Trigger;var fc=oa.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,Fs.jsxs)(we.SubTrigger,{ref:r,className:g("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,Fs.jsx)(Ks.ChevronRightIcon,{className:"ml-auto"})]}));fc.displayName=we.SubTrigger.displayName;var vc=oa.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(we.SubContent,{ref:a,className:g("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Fs-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}));vc.displayName=we.SubContent.displayName;var Pa=oa.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Fs.jsx)(we.Portal,{children:(0,Fs.jsx)(we.Content,{ref:o,sideOffset:t,className:g("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Fs-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})}));Pa.displayName=we.Content.displayName;var Jt=oa.forwardRef(({className:e,inset:t,...a},o)=>(0,Fs.jsx)(we.Item,{ref:o,className:g("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}));Jt.displayName=we.Item.displayName;var bc=oa.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,Fs.jsxs)(we.CheckboxItem,{ref:r,className:g("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Fs-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,Fs.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Fs.jsx)(we.ItemIndicator,{children:(0,Fs.jsx)(Ks.CheckIcon,{className:"h-4 w-4"})})}),t]}));bc.displayName=we.CheckboxItem.displayName;var hc=oa.forwardRef(({className:e,children:t,...a},o)=>(0,Fs.jsxs)(we.RadioItem,{ref:o,className:g("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 Fs-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,Fs.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Fs.jsx)(we.ItemIndicator,{children:(0,Fs.jsx)(Ks.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));hc.displayName=we.RadioItem.displayName;var Sr=oa.forwardRef(({className:e,inset:t,...a},o)=>(0,Fs.jsx)(we.Label,{ref:o,className:g("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Sr.displayName=we.Label.displayName;var Dr=oa.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(we.Separator,{ref:a,className:g("-mx-1 my-1 h-px bg-muted",e),...t}));Dr.displayName=we.Separator.displayName;var xc=({className:e,...t})=>(0,Fs.jsx)("span",{className:g("ml-auto text-xs tracking-widest opacity-60",e),...t});xc.displayName="DropdownMenuShortcut";var tn=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,Fs.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,Fs.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,Fs.jsx)(b,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,Fs.jsx)(en.Menu,{className:"h-5 w-5"})}),(0,Fs.jsx)("h1",{className:"text-2xl font-bold bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent",children:"Cortex Copilot"})]}),(0,Fs.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Fs.jsxs)(b,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,Fs.jsx)(en.Bell,{className:"h-5 w-5"}),(0,Fs.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-xs text-white flex items-center justify-center",children:"3"})]}),(0,Fs.jsxs)(Ya,{children:[(0,Fs.jsx)(Qa,{asChild:!0,children:(0,Fs.jsx)(b,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,Fs.jsxs)(At,{className:"h-10 w-10",children:[(0,Fs.jsx)(aa,{src:"/avatars/01.png",alt:"@user"}),(0,Fs.jsx)(It,{children:"JD"})]})})}),(0,Fs.jsxs)(Pa,{className:"w-56",align:"end",forceMount:!0,children:[(0,Fs.jsx)(Sr,{className:"font-normal",children:(0,Fs.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,Fs.jsx)("Fs",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,Fs.jsx)("Fs",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,Fs.jsx)(Dr,{}),(0,Fs.jsxs)(Jt,{children:[(0,Fs.jsx)(en.User,{className:"mr-2 h-4 w-4"}),(0,Fs.jsx)("span",{children:"Profile"})]}),(0,Fs.jsxs)(Jt,{children:[(0,Fs.jsx)(en.Settings,{className:"mr-2 h-4 w-4"}),(0,Fs.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var xi=le(require("react")),Pr=le(require("next/link"));var yc=(0,Xs.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 Q({className:e,variant:t,...a}){return(0,Fs.jsx)("div",{className:g(yc({variant:t}),e),...a})}var kr=le(require("react")),Lt=le(require("@radix-ui/react-scroll-area"));var qt=kr.forwardRef(({className:e,children:t,...a},o)=>(0,Fs.jsxs)(Lt.Root,{ref:o,className:g("relative overflow-hidden",e),...a,children:[(0,Fs.jsx)(Lt.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Fs.jsx)(rn,{}),(0,Fs.jsx)(Lt.Corner,{})]}));qt.displayName=Lt.Root.displayName;var rn=kr.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Fs.jsx)(Lt.ScrollAreaScrollbar,{ref:o,orientation:t,className:g("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent Fs-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent Fs-[1px]",e),...a,children:(0,Fs.jsx)(Lt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));rn.displayName=Lt.ScrollAreaScrollbar.displayName;var ko=le(require("react")),it=le(require("@radix-ui/react-dialog"));var xt=it.Root,nn=it.Trigger,wc=it.Portal;var ln=ko.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(it.Overlay,{ref:a,className:g("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}));ln.displayName=it.Overlay.displayName;var ft=ko.forwardRef(({className:e,children:t,...a},o)=>(0,Fs.jsxs)(wc,{children:[(0,Fs.jsx)(ln,{}),(0,Fs.jsxs)(it.Content,{ref:o,className:g("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background Fs-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,Fs.jsxs)(it.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,Fs.jsx)(en.X,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ft.displayName=it.Content.displayName;var vt=({className:e,...t})=>(0,Fs.jsx)("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});vt.displayName="DialogHeader";var To=({className:e,...t})=>(0,Fs.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});To.displayName="DialogFooter";var bt=ko.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(it.Title,{ref:a,className:g("text-lg font-semibold leading-none tracking-tight",e),...t}));bt.displayName=it.Title.displayName;var Po=ko.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(it.Description,{ref:a,className:g("text-sm text-muted-foreground",e),...t}));Po.displayName=it.Description.displayName;var Ro=le(require("@radix-ui/react-checkbox")),cn=le(require("react")),Ao=cn.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(Ro.Root,{className:g("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,Fs.jsx)(Ro.Indicator,{className:g("flex items-center justify-center text-current"),children:(0,Fs.jsx)(en.Check,{className:"h-4 w-4"})})}));Ao.displayName=Ro.Root.displayName;var Xt=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),pn=[{id:"home",title:"Home",icon:(0,Fs.jsx)(en.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Fs.jsx)(en.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,Fs.jsx)(en.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 Me",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,Fs.jsx)(en.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Fs.jsx)(en.FileText,{}),url:"/knowledge"}],un=[{id:"1",title:"New comment Fs your post",description:"Alex Morgan commented Fs 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's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You'Fs 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 Fs 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],gn=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Fs.jsx)(en.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,Fs.jsx)(en.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,Fs.jsx)(en.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,Fs.jsx)(en.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,Fs.jsx)(en.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,Fs.jsx)(en.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,Fs.jsx)(en.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,Fs.jsx)(en.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,Fs.jsx)(en.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,Fs.jsx)(en.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],gi=[{id:"1",name:"E-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}],fn=[{name:"Website Redesign",description:"Complete overhaul of company website",progress:75,dueDate:"June 15, 2025",members:4,files:23},{name:"Mobile App Launch",description:"Design and assets for new mobile application",progress:60,dueDate:"July 30, 2025",members:6,files:42},{name:"Brand Identity",description:"New brand guidelines and assets",progress:90,dueDate:"May 25, 2025",members:3,files:18},{name:"Marketing Campaign",description:"Summer promotion materials",progress:40,dueDate:"August 10, 2025",members:5,files:31}];var Tr=[{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}],pi=[{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}],vi=[{id:"1",title:"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",title:"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",title:"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",title:"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",title:"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",title:"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",title:"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")}],Nc=[...vi,{id:"8",title:"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",title:"Fix mobile responsive issues",description:"Resolve layout problems Fs 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",title:"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",title:"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",title:"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")}],Cc=[...gi,{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}],ui={projects:[{id:"1",name:"Empty Project",description:"A project with en 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:[]},mn={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:vi.filter(e=>e.epicId==="1")};var cp={empty:{initialProjects:ui.projects,initialEpics:ui.epics,initialSprints:ui.sprints,initialTasks:ui.tasks},default:{initialProjects:gi,initialEpics:Tr,initialSprints:pi,initialTasks:vi},highDensity:{initialProjects:gi,initialEpics:Tr,initialSprints:pi,initialTasks:Nc},singleEpic:{initialProjects:gi,initialEpics:mn.epics,initialSprints:pi,initialTasks:mn.tasks},multipleProjects:{initialProjects:Cc,initialEpics:Tr,initialSprints:pi,initialTasks:vi}},fi=[{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.qa","Python","Git"].map(Xt),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Xt),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 Fs 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(Xt),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Xt),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","Fs","Statistics"].map(Xt),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Xt),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(Xt),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Xt),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(Xt),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Xt),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],mp=[{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:fi.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:fi.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:fi.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 pp=fi.filter(e=>e.type==="digital");function hi(e,t){let[a,o]=(0,ai.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),r=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,ai.useEffect)(()=>{r(a)},[]),[a,r]}function Rr({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=gn[0],onBusinessUnitChange:i,onSearch:s,className:l,logo:d="/headerlogo.png",appName:m="Nuvia",tagline:c="Collaboration Platform"}){let[v,u]=xi.useState({}),[f,y]=hi("sidebar-favorites",{}),[I,h]=xi.useState(null),[x,C]=xi.useState(""),M=w=>{u(oe=>({...oe,[w]:!oe[w]}))},H=w=>{i?.(w)},ae=()=>{x.trim()&&s?.(x.trim())},X=w=>{w.key==="Enter"&&(w.preventDefault(),ae())},ie=(w,oe)=>{let Se=f[w]||[],Ze=Se.includes(oe)?Se.filter(Ae=>Ae!==oe):Se.concat(oe);y({...f,[w]:Ze})},N=w=>{if(!w.items||!w.maxItems||w.items.length<=w.maxItems)return w.items||[];let oe=f[w.id]||[],Se=w.items.filter(Ae=>oe.includes(Ae.id)),Ze=w.items.filter(Ae=>!oe.includes(Ae.id));return[...Se,...Ze].slice(0,w.maxItems)},T=w=>w.maxItems&&w.items&&w.items.length>w.maxItems,V=e,ge=w=>{let oe=T(w),Se=N(w),Ze=(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-3",children:[w.icon,(0,Fs.jsx)("span",{children:w.title})]}),w.badge&&(0,Fs.jsx)(Q,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:w.badge}),w.items&&(0,Fs.jsx)(en.ChevronDown,{className:g("ml-2 h-4 w-4 transition-transform",v[w.title]?"rotate-180":"")})]}),Ae=g("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",w.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return w.url?(0,Fs.jsx)(Pr.default,{href:w.url,className:Ae,onClick:a?o:void 0,children:Ze}):(0,Fs.jsx)("button",{className:Ae,onClick:()=>w.items&&M(w.title),children:Ze})},F=()=>{let w=e.find(Se=>Se.id===I);if(!w||!w.items||!w.maxItems)return null;let oe=f[w.id]||[];return(0,Fs.jsx)(xt,{open:!!I,onOpenChange:Se=>!Se&&h(null),children:(0,Fs.jsxs)(ft,{className:"sm:max-w-md",children:[(0,Fs.jsxs)(vt,{children:[(0,Fs.jsxs)(bt,{children:["Manage ",w.title," Favorites"]}),(0,Fs.jsxs)("Fs",{className:"text-sm text-muted-foreground",children:["Select up to ",w.maxItems," items to show in ",w.title.toLowerCase(),"."]})]}),(0,Fs.jsx)(qt,{className:"max-h-96 Fs-4",children:(0,Fs.jsx)("div",{className:"space-y-4",children:w.items.map(Se=>(0,Fs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Fs.jsx)(Ao,{id:Se.id,checked:oe.includes(Se.id),onCheckedChange:()=>ie(w.id,Se.id),disabled:!oe.includes(Se.id)&&oe.length>=(w.maxItems||0)}),(0,Fs.jsxs)("label",{htmlFor:Se.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:[Se.title,Se.badge&&(0,Fs.jsx)(Q,{variant:"outline",className:"text-xs",children:Se.badge})]})]},Se.id))})})]})})},k=(0,Fs.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between Fs-4",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Fs.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,Fs.jsx)("img",{src:d,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("h2",{className:"font-semibold",children:m}),(0,Fs.jsx)("Fs",{className:"text-xs text-muted-foreground",children:c})]})]}),a&&(0,Fs.jsx)(b,{variant:"ghost",size:"icon",onClick:o,children:(0,Fs.jsx)(en.X,{className:"h-5 w-5"})})]}),(0,Fs.jsx)("div",{className:"px-3 py-2",children:(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsx)(en.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Fs.jsx)(U,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 Fs-4 py-2",value:x,onChange:w=>C(w.target.value),onKeyPress:X})]})}),(0,Fs.jsx)(qt,{className:"flex-1 px-3 py-2",children:(0,Fs.jsx)("div",{className:"space-y-1",children:V.map(w=>(0,Fs.jsxs)("div",{className:"mb-1",children:[ge(w),w.items&&v[w.title]&&(0,Fs.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[N(w).map(oe=>(0,Fs.jsxs)(Pr.default,{href:oe.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[oe.title,oe.badge&&(0,Fs.jsx)(Q,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:oe.badge})]},oe.id)),T(w)&&w.items&&w.items.length>N(w).length&&(0,Fs.jsxs)("button",{onClick:()=>h(w.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:["...",w.items.length-N(w).length," more available"]})]})]},w.id))})}),(0,Fs.jsx)("div",{className:"Fs-3",children:(0,Fs.jsx)("div",{className:"space-y-1",children:(0,Fs.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,Fs.jsx)(en.Settings,{className:"h-5 w-5"}),(0,Fs.jsx)("span",{children:"Settings"})]})})}),(0,Fs.jsx)(F,{})]});return a?(0,Fs.jsx)("div",{className:g("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",l),children:k}):(0,Fs.jsx)("div",{className:g("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",l),children:k})}var ba=require("framer-motion");var vn=require("next-themes");function bn(){let{setTheme:e,theme:t}=(0,vn.useTheme)();return(0,Fs.jsx)($a,{children:(0,Fs.jsxs)(Wa,{children:[(0,Fs.jsx)(Ja,{asChild:!0,children:(0,Fs.jsxs)(b,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Fs.jsx)(en.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Fs.jsx)(en.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Fs.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Fs.jsx)(Ta,{children:"Toggle theme"})]})})}function hn({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let s=e.filter(m=>!m.read),l=s.length,d=m=>{switch(m){case"info":return(0,Fs.jsx)(en.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,Fs.jsx)(en.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,Fs.jsx)(en.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,Fs.jsx)(en.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,Fs.jsx)(ba.AnimatePresence,{children:t&&(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsx)(ba.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,Fs.jsx)(ba.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:g("fixed inset-y-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,Fs.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between border-b Fs-4",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)(en.Bell,{className:"h-5 w-5"}),(0,Fs.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),l>0&&(0,Fs.jsxs)(Q,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[l," new"]})]}),(0,Fs.jsxs)(b,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Fs.jsx)(en.X,{className:"h-5 w-5"}),(0,Fs.jsx)("span",{className:"sr-only",children:"Close"})]})]}),l>0&&(0,Fs.jsxs)("div",{className:"flex items-center justify-between border-b Fs-2",children:[(0,Fs.jsxs)("span",{className:"text-sm text-muted-foreground",children:[l," unread notification",l!==1?"s":""]}),(0,Fs.jsx)(b,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),s.length>0?(0,Fs.jsx)(qt,{className:"flex-1",children:(0,Fs.jsx)("div",{className:"divide-y",children:s.map(m=>(0,Fs.jsxs)("div",{className:g("flex gap-3 Fs-4 transition-colors bg-muted/50"),children:[(0,Fs.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(m.type)}),(0,Fs.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)("Fs",{className:"font-medium",children:m.title}),(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)("Fs",{className:"text-xs text-muted-foreground",children:m.time}),(0,Fs.jsx)(b,{variant:"ghost",size:"sm",className:"h-6 w-6 Fs-0",onClick:()=>o?.(m.id),title:"Dismiss",children:(0,Fs.jsx)(en.Check,{className:"h-3 w-3"})})]})]}),(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,Fs.jsxs)(b,{variant:"link",size:"sm",className:"h-auto Fs-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,Fs.jsx)(en.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},m.id))})}):(0,Fs.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center Fs-8 text-center",children:[(0,Fs.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Fs.jsx)(en.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,Fs.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,Fs.jsx)("Fs",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'ba appear here."})]})]})})]})})}var Ra=le(require("@radix-ui/react-tabs"));function xn({className:e,...t}){return(0,Fs.jsx)(Ra.Root,{"data-slot":"tabs",className:g("flex flex-col gap-2",e),...t})}function yn({className:e,...t}){return(0,Fs.jsx)(Ra.List,{"data-slot":"tabs-list",className:g("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg Fs-[3px]",e),...t})}function wn({className:e,...t}){return(0,Fs.jsx)(Ra.Trigger,{"data-slot":"tabs-trigger",className:g("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})}function Za({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let s=a.find(l=>l.value===e);return(0,Fs.jsxs)(ba.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,Fs.jsx)("div",{className:"hidden md:block",children:(0,Fs.jsx)(xn,{value:e,onValueChange:t,children:(0,Fs.jsx)(yn,{className:"grid w-full rounded-2xl Fs-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(l=>(0,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Fs.jsx)(wn,{value:l.value,className:"w-full h-8 rounded-Xs data-[state=active]:rounded-Xs transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:l.label})},l.value))})})}),(0,Fs.jsx)("div",{className:"md:hidden",children:(0,Fs.jsxs)(Ya,{children:[(0,Fs.jsx)(Qa,{asChild:!0,children:(0,Fs.jsxs)(b,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[s?.label||"Select",(0,Fs.jsx)(en.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Fs.jsx)(Pa,{align:"center",className:"w-[180px]",children:a.map(l=>(0,Fs.jsx)(Jt,{onClick:()=>t?.(l.value),className:`cursor-pointer ${e===l.value?"bg-accent":""}`,children:l.label},l.value))})]})})]})}function Cn({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:s="assistant",onTabChange:l,showTabs:d=!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:v=(0,Fs.jsx)(en.Bot,{className:"mr-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:f,onRemoveAll:y,logo:I="/headerlogo.png",appName:h="Nuvia",tagline:x="Collaboration Platform"}){let[C,M]=(0,ai.useState)(!1),[H,ae]=(0,ai.useState)(t),X=H.filter(T=>!T.read).length,ie=T=>{ae(V=>V.filter(ge=>ge.id!==T)),f?.(T)},N=()=>{ae(T=>T.filter(V=>V.read)),y?.()};return(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${i||""}`,children:[(0,Fs.jsx)(b,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Fs.jsx)(en.Menu,{className:"h-5 w-5"})}),(0,Fs.jsx)(b,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Fs.jsx)(en.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,Fs.jsxs)(ba.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Fs.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,Fs.jsx)("img",{src:I,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("h2",{className:"font-semibold text-sm",children:h}),(0,Fs.jsx)("Fs",{className:"text-xs text-muted-foreground",children:x})]})]}),(0,Fs.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,Fs.jsx)(Za,{activeTab:s,onTabChange:l,tabOptions:m}),(0,Fs.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Fs.jsx)(ba.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,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Fs.jsxs)(b,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:c,children:[v,u]})})}),(0,Fs.jsx)(bn,{}),(0,Fs.jsx)($a,{children:(0,Fs.jsxs)(Wa,{children:[(0,Fs.jsx)(Ja,{asChild:!0,children:(0,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Fs.jsxs)(b,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>M(!0),children:[(0,Fs.jsx)(ba.motion.div,{animate:X>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:X>0?1/0:0,repeatDelay:3},children:(0,Fs.jsx)(en.Bell,{className:"h-5 w-5"})}),X>0&&(0,Fs.jsx)(ba.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:X})]})})}),(0,Fs.jsx)(Ta,{children:"Notifications"})]})}),(0,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Fs.jsxs)(At,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Fs.jsx)(aa,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Fs.jsx)(It,{})]})})]})]})]}),(0,Fs.jsx)(hn,{notifications:H,open:C,onClose:()=>M(!1),onNotificationRemove:ie,onRemoveAll:N})]})}var Sn=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Fs.jsx)(en.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ci({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=Sn[0],onBusinessUnitChange:i,onSearch:s,businessUnits:l=Sn,activeTab:d,onTabChange:m,showTabs:c=!1,onActionClick:v,actionIcon:u,actionText:f="Action",onNotificationRemove:y,onRemoveAll:I,logo:h="/headerlogo.png",appName:x="Nuvia",tagline:C="Collaboration Platform",sidebarInitiallyClosed:M=!1}){let[H,ae]=(0,ai.useState)(!M),[X,ie]=(0,ai.useState)(!1),[N,T]=(0,ai.useState)(r),V=ge=>{T(ge),i?.(ge)};return(0,Fs.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-Xs bg-background w-[]",children:[X&&(0,Fs.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>ie(!1)}),(0,Fs.jsx)("div",{className:"md:hidden",children:(0,Fs.jsx)(Rr,{items:e,isOpen:X,isMobile:!0,onClose:()=>ie(!1),currentBusinessUnit:N,onBusinessUnitChange:V,onSearch:s,logo:h,appName:x,tagline:C})}),(0,Fs.jsx)("div",{className:"hidden md:block",children:(0,Fs.jsx)(Rr,{items:e,isOpen:H,isMobile:!1,currentBusinessUnit:N,onBusinessUnitChange:V,onSearch:s,logo:h,appName:x,tagline:C})}),(0,Fs.jsxs)("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",H?"md:pl-64":"md:pl-0"),children:[(0,Fs.jsx)(Cn,{title:a,notifications:o,onToggleSidebar:()=>ae(!H),onToggleMobileMenu:()=>ie(!0),sidebarOpen:H,activeTab:d,onTabChange:m,showTabs:c,onActionClick:v,actionIcon:u,actionText:f,onNotificationRemove:y,onRemoveAll:I,logo:h,appName:x,tagline:C}),(0,Fs.jsx)("main",{className:"flex-1 Fs-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var eo=le(require("react"));var Mr=eo.forwardRef(({...e},t)=>(0,Fs.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Mr.displayName="Breadcrumb";var Er=eo.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("ai",{ref:a,className:g("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Er.displayName="BreadcrumbList";var Di=eo.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("li",{ref:a,className:g("inline-flex items-center gap-1.5",e),...t}));Di.displayName="BreadcrumbItem";var Br=eo.forwardRef(({asChild:e,className:t,...a},o)=>(0,Fs.jsx)(e?qa.Slot:"a",{ref:o,className:g("transition-colors hover:text-foreground",t),...a}));Br.displayName="BreadcrumbLink";var Fr=eo.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:g("font-normal text-foreground",e),...t}));Fr.displayName="BreadcrumbPage";var Lr=({children:e,className:t,...a})=>(0,Fs.jsx)("li",{role:"presentation","aria-hidden":"true",className:g("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,Fs.jsx)(Ks.ChevronRightIcon,{})});Lr.displayName="BreadcrumbSeparator";var Sc=({className:e,...t})=>(0,Fs.jsxs)("span",{role:"presentation","aria-hidden":"true",className:g("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Fs.jsx)(Ks.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{className:"sr-only",children:"More"})]});Sc.displayName="BreadcrumbElipssis";var Pi=le(require("react")),Dc=1,kc=1e6;var jr=0;function Tc(){return jr=(jr+1)%Number.MAX_SAFE_INTEGER,jr.toString()}var Or=new Map,Tn=e=>{if(Or.has(e))return;let t=setTimeout(()=>{Or.delete(e),Mo({type:"REMOVE_TOAST",toastId:e})},kc);Or.set(e,t)},Pc=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Dc)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(a=>a.id===t.toast.id?{...a,...t.toast}:a)};case"DISMISS_TOAST":{let{toastId:a}=t;return a?Tn(a):e.toasts.forEach(o=>{Tn(o.id)}),{...e,toasts:e.toasts.map(o=>o.id===a||a===void 0?{...o,open:!1}:o)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(a=>a.id!==t.toastId)}}},ki=[],Ti={toasts:[]};function Mo(e){Ti=Pc(Ti,e),ki.forEach(t=>{t(Ti)})}function Rc({...e}){let t=Tc(),a=r=>Mo({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>Mo({type:"DISMISS_TOAST",toastId:t});return Mo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function Pn(){let[e,t]=Pi.useState(Ti);return Pi.useEffect(()=>(ki.push(t),()=>{let a=ki.indexOf(t);a>-1&&ki.splice(a,1)}),[e]),{...e,toast:Rc,dismiss:a=>Mo({type:"DISMISS_TOAST",toastId:a})}}var Aa=le(require("react")),rt=le(require("@radix-ui/react-toast"));var In=rt.Provider,zr=Aa.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(rt.Viewport,{ref:a,className:g("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse Fs-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));zr.displayName=rt.Viewport.displayName;var Ac=(0,Xs.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border Fs-4 Fs-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Hr=Aa.forwardRef(({className:e,variant:t,...a},o)=>(0,Fs.jsx)(rt.Root,{ref:o,className:g(Ac({variant:t}),e),...a}));Hr.displayName=rt.Root.displayName;var Ic=Aa.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(rt.Action,{ref:a,className:g("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Ic.displayName=rt.Action.displayName;var Ur=Aa.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(rt.Close,{ref:a,className:g("absolute right-1 top-1 rounded-md Fs-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,Fs.jsx)(en.X,{className:"h-4 w-4"})}));Ur.displayName=rt.Close.displayName;var Vr=Aa.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(rt.Title,{ref:a,className:g("text-sm font-semibold [&+div]:text-xs",e),...t}));Vr.displayName=rt.Title.displayName;var Gr=Aa.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(rt.Description,{ref:a,className:g("text-sm opacity-90",e),...t}));Gr.displayName=rt.Description.displayName;function Mn(){let{toasts:e}=Pn();return(0,Fs.jsxs)(In,{children:[e.map(function({id:t,title:a,description:o,action:r,...i}){return(0,Fs.jsxs)(Hr,{...i,children:[(0,Fs.jsxs)("div",{className:"grid gap-1",children:[a&&(0,Fs.jsx)(Vr,{children:a}),o&&(0,Fs.jsx)(Gr,{children:o})]}),r,(0,Fs.jsx)(Ur,{})]},t)}),(0,Fs.jsx)(zr,{})]})}var En=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("Fs-")?e+" ":"Fs-"+e+" ",i="Fs-"+t,s=o??"",l=r+i+" Fs-"+a+" "+s;return(0,Fs.jsx)("i",{className:l})};var to=require("@headlessui/react"),Ln=require("@heroicons/react/20/solid");var Mc=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Fs.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,Fs.jsxs)("span",{className:"relative",children:[e,(0,Fs.jsx)("span",{className:"absolute -bottom-1 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]})}):(0,Fs.jsxs)(to.Popover,{children:[(0,Fs.jsxs)(to.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,Fs.jsxs)("span",{className:"relative",children:[e,(0,Fs.jsx)("span",{className:"absolute bottom-0 left-1/2 w-1/2 h-0.5 bg-accent transform -translate-x-1/2 scale-x-0 transition-transform duration-300 ease-in-out group-hover:scale-x-100"})]}),(0,Fs.jsx)(Ln.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,Fs.jsxs)(to.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover mt-14 shadow-lg ring-1 ring-ring/5 transition data-[closed]:-translate-y-1 data-[closed]:opacity-0 data-[enter]:duration-200 data-[leave]:duration-150 data-[enter]:ease-out data-[leave]:ease-in",children:[(0,Fs.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 Xs:gap-x-8 z-50",children:t&&t.map(r=>(0,Fs.jsxs)("div",{className:"group relative rounded-lg Fs-6 text-sm/6 box-border",children:[(0,Fs.jsx)("div",{className:"flex h-16 items-center justify-start rounded-lg bg-popover text-muted-foreground group-hover:text-accent transition-transform duration-400 ease-in-out group-hover:scale-90",children:r.icon&&(0,Fs.jsx)(Fn,{icon:r.icon,size:"4x"})}),(0,Fs.jsxs)("a",{href:r.href,className:"mt-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Fs.jsx)("span",{className:"absolute inset-0"})]}),(0,Fs.jsx)("Fs",{className:"mt-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Fs.jsx)("div",{className:"bg-gray-50",children:(0,Fs.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Fs.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,Fs.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 Fs-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Fs.jsx)(Fn,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Fn=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Fs.jsx)(En,{...e,size:a});if("src"in e)return(0,Fs.jsx)("div",{className:g(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Fs.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},jn=Mc;var On=le(require("next/link"));function zn({children:e,href:t,openNewTab:a,...o}){return(0,Fs.jsx)(On.default,{href:t,target:a?"_blank":"_self",...o,children:e})}var _r=le(require("next/image"));function Bo({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Fs.jsxs)(zn,{href:"/",className:g(a?"py-1":"py-2"),children:[(0,Fs.jsx)(_r.default,{className:"logo-light dark:hidden",src:e.src,width:e.width,height:e.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}}),(0,Fs.jsx)(_r.default,{className:"hidden dark:block",src:t.src,width:t.width,height:t.height,alt:`${process.env.NEXT_PUBLIC_SITE_NAME} brand logo`,sizes:"100vw",priority:!0,style:{width:"auto",height:a?35:50}})]})}function Gn({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:i=!1}){let[s,l]=(0,ai.useState)(!1),[d,m]=(0,ai.useState)(""),c=["light","dark"],{theme:v,setTheme:u}=(0,vn.useTheme)();(0,ai.useEffect)(()=>{m(v||"dark")},[v]);let f=()=>{let y=c[(c.indexOf(d)+1)%c.length];m(y),u(y)};return(0,ai.useEffect)(()=>{let y=()=>{window.scrollY>100?l(!0):l(!1)};return window.addEventListener("scroll",y,{passive:!0}),()=>window.removeEventListener("scroll",y)},[]),(0,Fs.jsx)(Fs.Fragment,{children:(0,Fs.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${s||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Fs.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white Fs-0",children:(0,Fs.jsxs)("div",{className:g("flex items-center justify-between px-9 py-0",!i&&"container"),children:[(0,Fs.jsx)(Bo,{logoDark:a,logoLight:t}),(0,Fs.jsx)(to.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(y=>(0,Fs.jsx)(jn,{...y},y.name))}),r&&(0,Fs.jsx)("button",{className:"fixed right-4 z-[60] Fs-2 rounded-full hover:border hover:border-accent backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-primary dark:text-white hover:text-accent hover:scale-125",onClick:f,children:(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsx)(en.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Fs.jsx)(en.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Ai=require("@heroicons/react/24/outline");var Kr=["light","dark"];function Kn({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,i]=(0,ai.useState)(!1),{theme:s,setTheme:l}=(0,vn.useTheme)(),[d,m]=(0,ai.useState)(!1),[c,v]=(0,ai.useState)("light");(0,ai.useEffect)(()=>{let f=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",f,{passive:!0}),()=>window.removeEventListener("scroll",f)},[]),(0,ai.useEffect)(()=>{v(s||"dark")},[s]);let u=()=>{let f=Kr[(Kr.indexOf(c)+1)%Kr.length];v(f),l(f)};return(0,Fs.jsx)(Fs.Fragment,{children:(0,Fs.jsxs)("header",{className:`z-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,Fs.jsx)("nav",{className:g("backdrop-blur-sm text-white Fs-0",d&&"hidden"),children:(0,Fs.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&Fs.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Fs.jsx)(Bo,{logoDark:t,logoLight:e,mobile:!0}),(0,Fs.jsx)("div",{className:"flex items-center space-x-4",children:(0,Fs.jsxs)("button",{type:"button",onClick:()=>m(!0),className:"fixed right-4 z-[60] Fs-2 rounded-full bg-white/10 backdrop-blur-sm transition-all duration-300 hover:bg-white/20 text-white dark:hover:text-accent",children:[(0,Fs.jsx)("span",{className:"sr-only",children:"Open main menu"}),(0,Fs.jsx)(Ai.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,Fs.jsxs)(to.Dialog,{open:d,onClose:m,className:"lg:hidden",children:[(0,Fs.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Fs.jsxs)(to.DialogPanel,{className:"fixed inset-y-0 right-0 z-20 w-full overflow-y-auto bg-background dark:bg-[#212124] px-2 sm:max-w-sm sm:ring-1 sm:ring-gray-900/10",children:[(0,Fs.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Fs.jsx)(Bo,{logoDark:t,logoLight:e,mobile:!0}),(0,Fs.jsxs)("button",{type:"button",onClick:()=>m(!1),className:"-m-2.5 rounded-md Fs-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Fs.jsx)("span",{className:"sr-only",children:"Close menu"}),(0,Fs.jsx)(Ai.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Fs.jsx)("div",{className:"mt-6 flow-root",children:(0,Fs.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Fs.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(f=>(0,Fs.jsx)(Ec,{...f},f.name))})})})]})]})]})})}function Ec({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Fs.jsx)("a",{href:o,className:"-mx-3 block rounded-lg px-3 py-2 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}):(0,Fs.jsxs)(to.Disclosure,{as:"div",className:"-mx-3",children:[(0,Fs.jsx)(to.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 Fs-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Fs.jsx)(to.DisclosurePanel,{className:"mt-2 space-y-2",children:t&&t.map(r=>(0,Fs.jsx)(to.DisclosureButton,{as:"a",href:r.href,className:"block rounded-lg py-2 pl-6 Fs-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}function $Fs({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:i,themeControl:s=!1}){return(0,Fs.jsxs)("div",{className:g("fixed top-0 left-0 right-0 z-50",r),children:[(0,Fs.jsx)(Gn,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:s,wide:i}),(0,Fs.jsx)(Kn,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}var Wn="../../cortex-reply-light-27IMI3G7.png";var Jn="../../cortex-reply-dark-XPAJJJYY.png";function $r({...e}){return(0,Fs.jsxs)("div",{className:"bg-sidebar",children:[(0,Fs.jsx)($Fs,{isMenuOpen:!0,logoLight:Wn,logoDark:Jn,...e.header,className:"bg-sidebar",wide:!0}),(0,Fs.jsxs)(Co,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,Fs.jsx)(li,{...e.sidebarLeft,className:"flex-none top-24"}),(0,Fs.jsxs)(fr,{className:"grow overflow-hidden",children:[(0,Fs.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,Fs.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,Fs.jsx)(gr,{className:"-ml-1"}),(0,Fs.jsx)(wo,{orientation:"vertical",className:"mr-2 h-4"}),(0,Fs.jsx)(Mr,{children:(0,Fs.jsxs)(Er,{children:[(0,Fs.jsx)(Di,{className:"hidden md:block",children:(0,Fs.jsx)(Br,{href:"#",children:"Building Your Application"})}),(0,Fs.jsx)(Lr,{className:"hidden md:block"}),(0,Fs.jsx)(Di,{children:(0,Fs.jsx)(Fr,{children:"Data Fetching"})})]})})]})}),(0,Fs.jsxs)("div",{className:"flex flex-1 flex-col gap-4 Fs-4 Fs-0",children:[(0,Fs.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,Fs.jsx)("div",{className:"aspect-video rounded-Xs bg-muted/50"}),(0,Fs.jsx)("div",{className:"aspect-video rounded-Xs bg-muted/50"}),(0,Fs.jsx)("div",{className:"aspect-video rounded-Xs bg-muted/50"})]}),(0,Fs.jsx)("div",{className:"flex-1 rounded-Xs bg-muted/50 md:min-h-min"})]})]})]}),(0,Fs.jsx)(Mn,{})]})}var Ma=le(require("react"));var O=Ma.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,className:g("rounded-Xs border bg-card text-card-foreground shadow",e),...t}));O.displayName="Card";var Me=Ma.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,className:g("flex flex-col space-y-1.5 Fs-6",e),...t}));Me.displayName="CardHeader";var Le=Ma.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,className:g("font-semibold leading-none tracking-tight",e),...t}));Le.displayName="CardTitle";var ra=Ma.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,className:g("text-sm text-muted-foreground",e),...t}));ra.displayName="CardDescription";var de=Ma.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,className:g("Fs-6 Fs-0",e),...t}));de.displayName="CardContent";var sa=Ma.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("div",{ref:a,className:g("flex items-center Fs-6 Fs-0",e),...t}));sa.displayName="CardFooter";var qn=le(require("react")),ze=qn.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)("textarea",{className:g("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}));ze.displayName="Textarea";var Ne=le(require("@radix-ui/react-select")),ya=le(require("react")),Ee=Ne.Root;var He=Ne.Value,Pe=ya.forwardRef(({children:e,className:t,...a},o)=>(0,Fs.jsxs)(Ne.Trigger,{className:g("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,Fs.jsx)(Ne.Icon,{asChild:!0,children:(0,Fs.jsx)(en.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Pe.displayName=Ne.Trigger.displayName;var Yn=ya.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(Ne.ScrollUpButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Fs.jsx)(en.ChevronUp,{className:"h-4 w-4"})}));Yn.displayName=Ne.ScrollUpButton.displayName;var Qn=ya.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(Ne.ScrollDownButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Fs.jsx)(en.ChevronDown,{className:"h-4 w-4"})}));Qn.displayName=Ne.ScrollDownButton.displayName;var Re=ya.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,Fs.jsx)(Ne.Portal,{children:(0,Fs.jsxs)(Ne.Content,{className:g("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded border bg-card text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",a==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:a,ref:r,...o,children:[(0,Fs.jsx)(Yn,{}),(0,Fs.jsx)(Ne.Viewport,{className:g("Fs-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Fs.jsx)(Qn,{})]})}));Re.displayName=Ne.Content.displayName;var Lc=ya.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(Ne.Label,{className:g("py-1.5 pl-8 Fs-2 text-sm font-semibold",e),ref:a,...t}));Lc.displayName=Ne.Label.displayName;var $=ya.forwardRef(({children:e,className:t,...a},o)=>(0,Fs.jsxs)(Ne.Item,{className:g("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 Fs-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,Fs.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Fs.jsx)(Ne.ItemIndicator,{children:(0,Fs.jsx)(en.Check,{className:"h-4 w-4"})})}),(0,Fs.jsx)(Ne.ItemText,{children:e})]}));$.displayName=Ne.Item.displayName;var jc=ya.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(Ne.Separator,{className:g("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));jc.displayName=Ne.Separator.displayName;var Zn=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:r,onDeleteProject:i,onAddProject:s,onUpdateEpic:l,onDeleteEpic:d,onAddEpic:m,onAddSprint:c,onUpdateSprint:v,onDeleteSprint:u,onViewChange:f,mobileMenuOpen:y,onToggleMobileMenu:I})=>{let[h,x]=(0,ai.useState)(null),[C,M]=(0,ai.useState)(null),[H,ae]=(0,ai.useState)(null),[X,ie]=(0,ai.useState)(null),[N,T]=(0,ai.useState)({name:"",description:""}),[V,ge]=(0,ai.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[F,k]=(0,ai.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[w,oe]=(0,ai.useState)(!1),[Se,Ze]=(0,ai.useState)(!1),[Ae,et]=(0,ai.useState)({name:"",description:""}),[j,re]=(0,ai.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),De=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],gt=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],Ft=[{value:1,label:"Phase 1",color:"text-brand-blue"},{value:2,label:"Phase 2",color:"text-brand-plum"},{value:3,label:"Phase 3",color:"text-brand-orange"},{value:4,label:"Phase 4",color:"text-brand-green"},{value:5,label:"Phase 5",color:"text-destructive"},{value:6,label:"Phase 6",color:"text-warning"},{value:7,label:"Phase 7",color:"text-brand-cyan"},{value:8,label:"Phase 8",color:"text-accent"},{value:9,label:"Phase 9",color:"text-muted-foreground"}],P=S=>{M(S.id),T({name:S.name,description:S.description||""})},Ye=()=>{C&&N.name.trim()&&(r(C,{name:N.name.trim(),description:N.description.trim()}),M(null))},Je=()=>{M(null),T({name:"",description:""})},ka=()=>{Ae.name.trim()&&(s({name:Ae.name.trim(),description:Ae.description.trim(),isSelected:!1}),et({name:"",description:""}),oe(!1))},Jo=S=>{r(S,{isSelected:!0})},fo=S=>{ae(S.id),ge({name:S.name,description:S.description||"",color:S.color,confidence:S.confidence,phase:S.phase,startDate:S.startDate.toISOString().split("T")[0],endDate:S.endDate.toISOString().split("T")[0],progress:S.progress})},qo=()=>{H&&V.name.trim()&&(l(H,{name:V.name.trim(),description:V.description.trim(),color:V.color,confidence:V.confidence,phase:V.phase,startDate:new Date(V.startDate),endDate:new Date(V.endDate),progress:V.progress}),ae(null))},tr=()=>{ae(null),ge({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},Xo=S=>{ie(S.id),k({name:S.name,description:S.description||"",startDate:S.startDate.toISOString().split("T")[0],endDate:S.endDate.toISOString().split("T")[0],isActive:S.isActive})},ar=()=>{X&&F.name.trim()&&(v(X,{name:F.name.trim(),description:F.description.trim(),startDate:new Date(F.startDate),endDate:new Date(F.endDate),isActive:F.isActive}),ie(null))},Yo=()=>{ie(null),k({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Va=()=>{j.name.trim()&&(c({name:j.name.trim(),description:j.description.trim(),startDate:new Date(j.startDate),endDate:new Date(j.endDate),isActive:j.isActive,isSelected:!1}),re({name:"",description:"",startDate:"",endDate:"",isActive:!1}),Ze(!1))},vo=S=>{v(S,{isSelected:!0})},Qo=S=>S.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),bo=S=>{let E=gt.find(ke=>ke.value===S);return E?{label:E.label,color:E.color}:{label:"Medium",color:"text-warning"}},ho=S=>{let E=Ft.find(ke=>ke.value===S);return E?{label:E.label,color:E.color}:{label:"Phase 1",color:"text-primary"}};return(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsxs)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${y?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,Fs.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,Fs.jsxs)("button",{onClick:()=>{f("kanban"),x(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="kanban"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3 z-50`,title:"Kanban View",children:[(0,Fs.jsx)(en.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,Fs.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),(0,Fs.jsxs)("button",{onClick:()=>{f("planning"),x(null)},className:`w-12 h-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="planning"?"bg-brand-plum":"bg-brand-plum/75 hover:bg-brand-plum"} hidden md:flex hover:w-28 hover:justify-start hover:pl-3`,title:"Planning View",children:[(0,Fs.jsx)(en.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Fs.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),(0,Fs.jsxs)("button",{onClick:()=>x(h==="projects"?null:"projects"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${h==="projects"?"bg-sidebar-accent":"bg-sidebar-primary hover:bg-sidebar-accent"} hover:w-28 hover:justify-start hover:pl-3`,title:"Projects",children:[(0,Fs.jsx)(en.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,Fs.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),(0,Fs.jsxs)("button",{onClick:()=>{f("epics"),x(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="epics"?"bg-primary":"bg-primary/75 hover:bg-primary"} hover:w-28 hover:justify-start hover:pl-3`,title:"Epic Planning",children:[(0,Fs.jsx)(en.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,Fs.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),(0,Fs.jsxs)("button",{onClick:()=>x(h==="sprints"?null:"sprints"),className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${h==="sprints"?"bg-brand-green":"bg-brand-green/75 hover:bg-brand-green"} hover:w-28 hover:justify-start hover:pl-3`,title:"Sprints",children:[(0,Fs.jsx)(en.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,Fs.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),(0,Fs.jsxs)("button",{onClick:()=>{f("files"),x(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="files"?"bg-brand-orange":"bg-brand-orange/75 hover:bg-brand-orange"} hover:w-28 hover:justify-start hover:pl-3`,title:"Files",children:[(0,Fs.jsx)(en.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,Fs.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),(0,Fs.jsxs)("button",{onClick:()=>{f("tasks"),x(null)},className:`flex-1 w-12 flex items-center justify-center text-sidebar-foreground transition-all duration-200 relative overflow-hidden group/btn ${o==="tasks"?"bg-brand-cyan":"bg-brand-cyan/75 hover:bg-brand-cyan"} hover:w-28 hover:justify-start hover:pl-3`,title:"Tasks",children:[(0,Fs.jsx)(en.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Fs.jsx)("span",{className:"text-xs font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),y&&(0,Fs.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:I}),h&&(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>x(null)}),(0,Fs.jsxs)("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg z-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[(0,Fs.jsxs)("div",{className:"Fs-3 md:Fs-4 border-b flex items-center justify-between",children:[(0,Fs.jsxs)("h2",{className:"text-base md:text-lg font-semibold",children:[h==="projects"&&"Projects",h==="epics"&&"Manage Epics",h==="sprints"&&"Manage Sprints",h==="files"&&"Files"]}),(0,Fs.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>x(null),children:(0,Fs.jsx)(en.X,{className:"h-4 w-4"})})]}),(0,Fs.jsxs)("div",{className:"Fs-3 md:Fs-4 space-y-4 h-full overflow-y-auto",children:[h==="projects"&&(0,Fs.jsx)(O,{className:"Fs-3",children:(0,Fs.jsxs)("div",{className:"space-y-3",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,Fs.jsxs)(b,{size:"sm",onClick:()=>oe(!0),className:"gap-1",children:[(0,Fs.jsx)(en.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),w&&(0,Fs.jsxs)("div",{className:"border rounded-lg Fs-2 space-y-2",children:[(0,Fs.jsx)(U,{value:Ae.name,onChange:S=>et(E=>({...E,name:S.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Fs.jsx)(ze,{value:Ae.description,onChange:S=>et(E=>({...E,description:S.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Fs.jsxs)("div",{className:"flex gap-1",children:[(0,Fs.jsx)(b,{size:"sm",onClick:ka,className:"text-xs h-6",children:"Save"}),(0,Fs.jsx)(b,{size:"sm",variant:"outline",onClick:()=>oe(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,Fs.jsx)("div",{className:"space-y-2",children:e.map(S=>(0,Fs.jsx)("div",{className:"border rounded Fs-2",children:C===S.id?(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(U,{value:N.name,onChange:E=>T(ke=>({...ke,name:E.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Fs.jsx)(ze,{value:N.description,onChange:E=>T(ke=>({...ke,description:E.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Fs.jsxs)("div",{className:"flex gap-1",children:[(0,Fs.jsx)(b,{size:"sm",onClick:Ye,className:"text-xs h-6",children:"Save"}),(0,Fs.jsx)(b,{size:"sm",variant:"outline",onClick:Je,className:"text-xs h-6",children:"Cancel"})]})]}):(0,Fs.jsxs)("div",{className:`cursor-pointer Fs-1 rounded transition-colors ${S.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>Jo(S.id),children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Fs.jsx)(en.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,Fs.jsx)("span",{className:"font-medium text-xs",children:S.name})]}),S.description&&(0,Fs.jsx)("Fs",{className:"text-xs text-muted-foreground mb-1",children:S.description}),(0,Fs.jsxs)("div",{className:"flex gap-1",onClick:E=>E.stopPropagation(),children:[(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>P(S),className:"h-5 px-1",children:(0,Fs.jsx)(en.Edit2,{className:"h-3 w-3"})}),(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>i(S.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Fs.jsx)(en.Trash2,{className:"h-3 w-3"})})]})]})},S.id))})]})}),h==="epics"&&(0,Fs.jsx)(O,{className:"Fs-3",children:(0,Fs.jsxs)("div",{className:"space-y-3",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,Fs.jsxs)(b,{size:"sm",onClick:m,className:"gap-1",children:[(0,Fs.jsx)(en.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,Fs.jsx)("div",{className:"space-y-4",children:t.map(S=>(0,Fs.jsx)("div",{className:"border rounded-lg Fs-3",children:H===S.id?(0,Fs.jsxs)("div",{className:"space-y-3",children:[(0,Fs.jsx)(U,{value:V.name,onChange:E=>ge(ke=>({...ke,name:E.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,Fs.jsx)(ze,{value:V.description,onChange:E=>ge(ke=>({...ke,description:E.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)("label",{className:"text-xs font-medium",children:"Color"}),(0,Fs.jsx)("div",{className:"flex gap-1 flex-wrap",children:De.map(E=>(0,Fs.jsx)("button",{onClick:()=>ge(ke=>({...ke,color:E})),className:`w-6 h-6 rounded-full ${E} ${V.color===E?"ring-2 ring-ring":""}`},E))})]}),(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Fs.jsxs)("div",{className:"space-y-1",children:[(0,Fs.jsx)("label",{className:"text-xs font-medium",children:"Confidence"}),(0,Fs.jsxs)(Ee,{value:V.confidence,onValueChange:E=>ge(ke=>({...ke,confidence:E})),children:[(0,Fs.jsx)(Pe,{className:"h-8 text-xs",children:(0,Fs.jsx)(He,{})}),(0,Fs.jsx)(Re,{children:gt.map(E=>(0,Fs.jsx)($,{value:E.value,children:(0,Fs.jsx)("span",{className:E.color,children:E.label})},E.value))})]})]}),(0,Fs.jsxs)("div",{className:"space-y-1",children:[(0,Fs.jsx)("label",{className:"text-xs font-medium",children:"Phase"}),(0,Fs.jsxs)(Ee,{value:V.phase.toString(),onValueChange:E=>ge(ke=>({...ke,phase:parseInt(E)})),children:[(0,Fs.jsx)(Pe,{className:"h-8 text-xs",children:(0,Fs.jsx)(He,{})}),(0,Fs.jsx)(Re,{children:Ft.map(E=>(0,Fs.jsx)($,{value:E.value.toString(),children:(0,Fs.jsx)("span",{className:E.color,children:E.label})},E.value))})]})]})]}),(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Fs.jsxs)("div",{className:"space-y-1",children:[(0,Fs.jsx)("label",{className:"text-xs font-medium",children:"Start Date"}),(0,Fs.jsx)(U,{type:"date",value:V.startDate,onChange:E=>ge(ke=>({...ke,startDate:E.target.value})),className:"text-xs h-8"})]}),(0,Fs.jsxs)("div",{className:"space-y-1",children:[(0,Fs.jsx)("label",{className:"text-xs font-medium",children:"End Date"}),(0,Fs.jsx)(U,{type:"date",value:V.endDate,onChange:E=>ge(ke=>({...ke,endDate:E.target.value})),className:"text-xs h-8"})]})]}),(0,Fs.jsxs)("div",{className:"space-y-1",children:[(0,Fs.jsx)("label",{className:"text-xs font-medium",children:"Progress (%)"}),(0,Fs.jsx)(U,{type:"number",min:"0",max:"100",value:V.progress,onChange:E=>ge(ke=>({...ke,progress:parseInt(E.target.value)||0})),className:"text-xs h-8"})]}),(0,Fs.jsxs)("div",{className:"flex gap-2",children:[(0,Fs.jsx)(b,{size:"sm",onClick:qo,className:"text-xs",children:"Save"}),(0,Fs.jsx)(b,{size:"sm",variant:"outline",onClick:tr,className:"text-xs",children:"Cancel"})]})]}):(0,Fs.jsxs)("div",{className:`cursor-pointer Fs-2 rounded transition-colors ${S.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>l(S.id,{isSelected:!S.isSelected}),children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Fs.jsx)("div",{className:`w-3 h-3 rounded-full ${S.color}`}),(0,Fs.jsx)("span",{className:"font-medium text-sm",children:S.name})]}),S.description&&(0,Fs.jsx)("Fs",{className:"text-xs text-muted-foreground mb-2",children:S.description}),(0,Fs.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Fs.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,Fs.jsx)("span",{className:bo(S.confidence).color,children:bo(S.confidence).label})]}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Fs.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,Fs.jsx)("span",{className:ho(S.phase).color,children:ho(S.phase).label})]}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Fs.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,Fs.jsxs)("span",{className:"text-foreground",children:[Qo(S.startDate)," - ",Qo(S.endDate)]})]}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Fs.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,Fs.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${S.progress}%`}})}),(0,Fs.jsxs)("span",{className:"text-foreground",children:[S.progress,"%"]})]})]})]}),(0,Fs.jsxs)("div",{className:"flex gap-1",onClick:E=>E.stopPropagation(),children:[(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>fo(S),className:"h-6 px-2",children:(0,Fs.jsx)(en.Edit2,{className:"h-3 w-3"})}),(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>d(S.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Fs.jsx)(en.Trash2,{className:"h-3 w-3"})})]})]})},S.id))})]})}),h==="sprints"&&(0,Fs.jsx)(O,{className:"Fs-3",children:(0,Fs.jsxs)("div",{className:"space-y-3",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,Fs.jsxs)(b,{size:"sm",onClick:()=>Ze(!0),className:"gap-1",children:[(0,Fs.jsx)(en.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),Se&&(0,Fs.jsxs)("div",{className:"border rounded-lg Fs-2 space-y-2",children:[(0,Fs.jsx)(U,{value:j.name,onChange:S=>re(E=>({...E,name:S.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,Fs.jsx)(U,{type:"date",value:j.startDate,onChange:S=>re(E=>({...E,startDate:S.target.value})),className:"text-xs"}),(0,Fs.jsx)(U,{type:"date",value:j.endDate,onChange:S=>re(E=>({...E,endDate:S.target.value})),className:"text-xs"})]}),(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)("input",{type:"checkbox",checked:j.isActive,onChange:S=>re(E=>({...E,isActive:S.target.checked})),className:"w-3 h-3"}),(0,Fs.jsx)("span",{className:"text-xs",children:"Active"})]}),(0,Fs.jsxs)("div",{className:"flex gap-1",children:[(0,Fs.jsx)(b,{size:"sm",onClick:Va,className:"text-xs h-6",children:"Save"}),(0,Fs.jsx)(b,{size:"sm",variant:"outline",onClick:()=>Ze(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,Fs.jsx)("div",{className:"space-y-2",children:a.map(S=>(0,Fs.jsx)("div",{className:"border rounded Fs-2",children:X===S.id?(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(U,{value:F.name,onChange:E=>k(ke=>({...ke,name:E.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:S.id==="backlog"||S.id==="all-tasks"}),S.id!=="backlog"&&S.id!=="all-tasks"&&(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,Fs.jsx)(U,{type:"date",value:F.startDate,onChange:E=>k(ke=>({...ke,startDate:E.target.value})),className:"text-xs"}),(0,Fs.jsx)(U,{type:"date",value:F.endDate,onChange:E=>k(ke=>({...ke,endDate:E.target.value})),className:"text-xs"})]}),(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)("input",{type:"checkbox",checked:F.isActive,onChange:E=>k(ke=>({...ke,isActive:E.target.checked})),className:"w-3 h-3"}),(0,Fs.jsx)("span",{className:"text-xs",children:"Active"})]})]}),(0,Fs.jsxs)("div",{className:"flex gap-1",children:[(0,Fs.jsx)(b,{size:"sm",onClick:ar,className:"text-xs h-6",children:"Save"}),(0,Fs.jsx)(b,{size:"sm",variant:"outline",onClick:Yo,className:"text-xs h-6",children:"Cancel"})]})]}):(0,Fs.jsxs)("div",{className:`cursor-pointer Fs-1 rounded transition-colors ${S.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>vo(S.id),children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Fs.jsx)(en.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,Fs.jsx)("span",{className:"font-medium text-xs",children:S.name}),S.isActive&&(0,Fs.jsx)("span",{className:"text-xs bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(S.id==="backlog"||S.id==="all-tasks")&&(0,Fs.jsx)("span",{className:"text-xs bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),S.id!=="backlog"&&S.id!=="all-tasks"&&(0,Fs.jsxs)("Fs",{className:"text-xs text-muted-foreground mb-1",children:[S.startDate.toLocaleDateString()," - ",S.endDate.toLocaleDateString()]}),(0,Fs.jsxs)("div",{className:"flex gap-1",onClick:E=>E.stopPropagation(),children:[(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>Xo(S),className:"h-5 px-1",children:(0,Fs.jsx)(en.Edit2,{className:"h-3 w-3"})}),S.id!=="backlog"&&S.id!=="all-tasks"&&(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>u(S.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Fs.jsx)(en.Trash2,{className:"h-3 w-3"})})]})]})},S.id))})]})})]})]})]})]})},Ii=e=>(0,Fs.jsx)(Co,{children:(0,Fs.jsxs)("div",{className:"flex w-full",children:[(0,Fs.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,Fs.jsx)(Zn,{...e})}),(0,Fs.jsx)("div",{className:"md:hidden",children:(0,Fs.jsx)(Zn,{...e})}),(0,Fs.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:(0,Fs.jsx)("div",{className:"w-full",children:e.children})})]})});var el=le(require("react")),Wr=le(require("@radix-ui/react-label"));var Oc=(0,Xs.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),A=el.forwardRef(({className:e,...t},a)=>(0,Fs.jsx)(Wr.Root,{ref:a,className:g(Oc(),e),...t}));A.displayName=Wr.Root.displayName;var Mi=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:i=!1,disabled:s=!1})=>{let[l,d]=(0,ai.useState)(!1),[m,c]=(0,ai.useState)(""),v=o.find(h=>h.value===t),u=o.filter(h=>h.label.toLowerCase().includes(m.toLowerCase())),f=h=>{a(h),d(!1),c("")},y=()=>{i&&m.trim()&&!o.find(h=>h.value===m.trim())&&(a(m.trim()),d(!1),c(""))};return(0,Fs.jsxs)("div",{className:"space-y-1",children:[(0,Fs.jsx)(A,{className:"text-xs text-muted-foreground",children:e}),(0,Fs.jsxs)(Ee,{value:t,onValueChange:f,open:l,onOpenChange:h=>{s||d(h)},disabled:s,children:[(0,Fs.jsx)(Pe,{className:"h-auto Fs-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Fs.jsx)(Q,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&d(!l),children:v?.label||t||"Select..."})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)("div",{className:"Fs-2",children:(0,Fs.jsx)(U,{placeholder:r,value:m,onChange:h=>c(h.target.value),onKeyDown:h=>{h.key==="Enter"&&i&&y()},className:"mb-2"})}),u.map(h=>(0,Fs.jsx)($,{value:h.value,children:h.label},h.value)),i&&m.trim()&&!u.find(h=>h.value===m.trim())&&(0,Fs.jsxs)($,{value:m.trim(),children:['Add "',m.trim(),'"']})]})]})]})};function oo({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:s}){let[l,d]=(0,ai.useState)(!1),m=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},c=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},v=u=>{if(!u)return"Never";let y=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return y<1?"Just now":y<60?`${y}m ago`:y<1440?`${Math.floor(y/60)}h ago`:`${Math.floor(y/1440)}d ago`};return(0,Fs.jsxs)(O,{className:g("hover:shadow-md transition-shadow",i&&"Fs-2",s),children:[(0,Fs.jsx)(Me,{className:g("pb-3",i&&"pb-2"),children:(0,Fs.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Fs.jsx)("div",{className:"relative",children:(0,Fs.jsxs)(At,{className:g("h-12 w-12",i&&"h-8 w-8"),children:[(0,Fs.jsx)(aa,{src:"/placeholder.svg",alt:e.name}),(0,Fs.jsx)(It,{children:e.name.split(" ").map(u=>u[0]).join("")})]})}),(0,Fs.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)("h3",{className:g("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,Fs.jsx)(en.Bot,{className:g("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,Fs.jsx)(en.User,{className:g("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,Fs.jsx)("Fs",{className:g("text-sm text-muted-foreground truncate",i&&"text-xs"),children:e.type==="human"?e.role:e.description}),!i&&(0,Fs.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[e.type==="human"&&(0,Fs.jsx)(Q,{variant:"secondary",className:"text-xs",children:e.department}),e.type==="digital"&&(0,Fs.jsxs)(Q,{variant:"secondary",className:"text-xs",children:["v",e.version]}),(0,Fs.jsx)(Q,{variant:"outline",className:"text-xs",children:c(e.status)})]})]})]}),r&&(0,Fs.jsxs)(Ya,{children:[(0,Fs.jsx)(Qa,{asChild:!0,children:(0,Fs.jsx)(b,{variant:"ghost",size:"icon",className:g("h-8 w-8",i&&"h-6 w-6"),children:(0,Fs.jsx)(en.MoreHorizontal,{className:g("h-4 w-4",i&&"h-3 w-3")})})}),(0,Fs.jsxs)(Pa,{align:"end",children:[(0,Fs.jsxs)(Jt,{onClick:()=>o?.(e),children:[(0,Fs.jsx)(en.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,Fs.jsxs)(Jt,{onClick:()=>t?.(e),children:[(0,Fs.jsx)(en.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]}),(0,Fs.jsxs)(Jt,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,Fs.jsx)(en.Trash2,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),!i&&(0,Fs.jsxs)(de,{className:"Fs-0",children:[(0,Fs.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,Fs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Fs.jsx)(en.Mail,{className:"h-3 w-3"}),(0,Fs.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,Fs.jsxs)(Fs.Fragment,{children:[e.phone&&(0,Fs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Fs.jsx)(en.Phone,{className:"h-3 w-3"}),(0,Fs.jsx)("span",{children:e.phone})]}),e.location&&(0,Fs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Fs.jsx)(en.MapPin,{className:"h-3 w-3"}),(0,Fs.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,Fs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Fs.jsx)(en.Settings,{className:"h-3 w-3"}),(0,Fs.jsxs)("span",{children:["v",e.version]})]}),(0,Fs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Fs.jsx)(en.Clock,{className:"h-3 w-3"}),(0,Fs.jsxs)("span",{children:["Last active: ",v(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,Fs.jsx)("div",{className:"mt-3",children:(0,Fs.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,l?e.skills.length:3).map(u=>(0,Fs.jsx)(Q,{variant:"outline",className:"text-xs",children:u},u)),e.skills.length>3&&(0,Fs.jsx)(b,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>d(!l),children:l?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,Fs.jsx)("div",{className:"mt-3",children:(0,Fs.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,l?e.capabilities.length:2).map(u=>(0,Fs.jsx)(Q,{variant:"outline",className:"text-xs",children:u},u)),e.capabilities.length>2&&(0,Fs.jsx)(b,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>d(!l),children:l?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}function qr({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:i,disabled:s=!1}){let[l,d]=(0,ai.useState)(""),[m,c]=(0,ai.useState)([]),[v,u]=(0,ai.useState)(!1);(0,ai.useEffect)(()=>{if(!l.trim()){c([]),u(!1);return}let h=a.filter(x=>{if(e.map(H=>H.id).includes(x.id))return!1;let M=l.toLowerCase();return x.title.toLowerCase().includes(M)||x.description?.toLowerCase().includes(M)||x.tags?.some(H=>H.toLowerCase().includes(M))||Object.values(x.metadata||{}).some(H=>String(H).toLowerCase().includes(M))});c(h),u(!0)},[l,e,a]);let f=h=>{i&&e.length>=i||(t([...e,h]),d(""),u(!1))},y=h=>{t(e.filter(x=>x.id!==h))},I=!i||e.length<i;return(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:o}),(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsx)(en.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Fs.jsx)(U,{value:l,onChange:h=>d(h.target.value),placeholder:I?r:`Maximum ${i} documents selected`,className:"pl-9",disabled:s||!I,onFocus:()=>l&&u(!0)})]}),v&&m.length>0&&(0,Fs.jsx)(O,{className:"absolute top-full left-0 right-0 z-10 mt-1 max-h-60",children:(0,Fs.jsx)(qt,{className:"h-full",children:(0,Fs.jsx)(de,{className:"Fs-2",children:m.map(h=>(0,Fs.jsx)(b,{variant:"ghost",className:"w-full justify-start h-auto Fs-3 mb-1",onClick:()=>f(h),disabled:s,children:(0,Fs.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,Fs.jsx)(en.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,Fs.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,Fs.jsx)("div",{className:"font-medium text-sm truncate",children:h.title}),h.description&&(0,Fs.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:h.description}),h.tags&&h.tags.length>0&&(0,Fs.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[h.tags.slice(0,3).map(x=>(0,Fs.jsx)(Q,{variant:"outline",className:"text-xs",children:x},x)),h.tags.length>3&&(0,Fs.jsxs)(Q,{variant:"outline",className:"text-xs",children:["+",h.tags.length-3," more"]})]})]})]})},h.id))})})}),v&&l&&m.length===0&&(0,Fs.jsx)(O,{className:"absolute top-full left-0 right-0 z-10 mt-1",children:(0,Fs.jsxs)(de,{className:"Fs-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',l,'"']})})]}),e.length>0&&(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,Fs.jsx)("div",{className:"space-y-2",children:e.map(h=>(0,Fs.jsx)(O,{className:"Fs-3",children:(0,Fs.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Fs.jsx)(en.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,Fs.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Fs.jsx)("div",{className:"font-medium text-sm",children:h.title}),h.description&&(0,Fs.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:h.description}),h.tags&&h.tags.length>0&&(0,Fs.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:h.tags.map(x=>(0,Fs.jsxs)(Q,{variant:"outline",className:"text-xs",children:[(0,Fs.jsx)(en.Tag,{className:"h-3 w-3 mr-1"}),x]},x))})]}),(0,Fs.jsx)(b,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>y(h.id),disabled:s,children:(0,Fs.jsx)(en.X,{className:"h-3 w-3"})})]})},h.id))})]}),v&&(0,Fs.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}function Lo({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:s="Cancel",readOnly:l=!1,availableKnowledgeDocuments:d=[]}){let[m,c]=(0,ai.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[v,u]=(0,ai.useState)(""),[f,y]=(0,ai.useState)(""),[I,h]=(0,ai.useState)(!l);(0,ai.useEffect)(()=>{e&&c(e)},[e]);let x=N=>{N.preventDefault();let T=m.version?parseInt(m.version):0,V=e?(T+1).toString():"1",ge={id:m.id||Date.now().toString(),name:m.name,type:"digital",status:"active",joinedDate:m.joinedDate||new Date,lastActive:m.lastActive||new Date,description:m.description,jobDescription:m.jobDescription||"",workInstructions:m.workInstructions||"",capabilities:m.capabilities||[],knowledge:m.knowledge||[],coreKnowledge:m.coreKnowledge||[],version:V,lastUpdated:m.lastUpdated||new Date,isActive:!0};t(ge)},C=(N,T,V)=>{if(!T.trim())return;let ge=m[N]||[];c({...m,[N]:[...ge,T.trim()]}),V("")},M=(N,T)=>{let V=m[N]||[];c({...m,[N]:V.filter((ge,F)=>F!==T)})},H=N=>{N.preventDefault(),h(!I)},ae=(N,T,V,ge,F)=>{let k=m[N]||[];return(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:T}),I&&(0,Fs.jsxs)("div",{className:"flex gap-2",children:[(0,Fs.jsx)(U,{value:V,onChange:w=>ge(w.target.value),placeholder:F,onKeyPress:w=>{w.key==="Enter"&&(w.preventDefault(),C(N,V,ge))},disabled:o}),(0,Fs.jsx)(b,{type:"button",variant:"outline",size:"icon",onClick:()=>C(N,V,ge),disabled:o,children:(0,Fs.jsx)(en.Plus,{className:"h-4 w-4"})})]}),(0,Fs.jsx)("div",{className:"flex flex-wrap gap-2",children:k.map((w,oe)=>(0,Fs.jsxs)(Q,{className:"gap-1",children:[w,I&&(0,Fs.jsx)(b,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 Fs-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>M(N,oe),disabled:o,children:(0,Fs.jsx)(en.X,{className:"h-3 w-3"})})]},`${N}-${oe}-${w}`))})]})},X=r||(I?e?"Edit Colleague":"Add New Colleague":"View Colleague"),ie=i||(e?"Update Colleague":"Add Colleague");return(0,Fs.jsxs)(O,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,Fs.jsx)(Me,{children:(0,Fs.jsxs)(Le,{className:"flex items-center gap-2",children:[(0,Fs.jsx)(en.Bot,{className:"h-5 w-5"}),X]})}),(0,Fs.jsx)(de,{children:(0,Fs.jsxs)("form",{onSubmit:x,className:"space-y-6",children:[(0,Fs.jsxs)("div",{className:"space-y-4",children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"name",children:"Name *"}),(0,Fs.jsx)(U,{id:"name",value:m.name||"",onChange:N=>c({...m,name:N.target.value}),required:!0,disabled:o||!I})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Fs.jsx)(ze,{id:"description",value:m.description||"",onChange:N=>c({...m,description:N.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!I})]})]}),(0,Fs.jsxs)("div",{className:"space-y-4",children:[(0,Fs.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Fs.jsx)(ze,{id:"jobDescription",value:m.jobDescription||"",onChange:N=>c({...m,jobDescription:N.target.value}),rows:4,required:m.type==="digital",disabled:o||!I})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Fs.jsx)(ze,{id:"workInstructions",value:m.workInstructions||"",onChange:N=>c({...m,workInstructions:N.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!I})]}),ae("capabilities","Capabilities",f,y,"Add capability"),(0,Fs.jsx)(qr,{selectedDocuments:m.knowledge||[],onDocumentsChange:N=>c({...m,knowledge:N}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:o||!I,availableDocuments:d}),(0,Fs.jsx)(qr,{selectedDocuments:m.coreKnowledge||[],onDocumentsChange:N=>c({...m,coreKnowledge:N}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!I,availableDocuments:d})]}),(0,Fs.jsxs)("div",{className:"flex justify-end gap-2 Fs-4 border-t",children:[(0,Fs.jsx)(b,{type:"button",variant:"outline",onClick:a,disabled:o,children:I?s:"Close"}),I?(0,Fs.jsx)(b,{type:"submit",disabled:o,children:o?"Saving...":ie}):(0,Fs.jsxs)(b,{type:"button",onClick:H,disabled:o,className:"gap-2",children:[(0,Fs.jsx)(en.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Ei({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Fs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Fs.jsx)(ba.AnimatePresence,{mode:"wait",children:(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Fs.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Fs.jsx)($t.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,Fs.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Fs.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Fs.jsxs)(Me,{className:"text-center pb-4",children:[(0,Fs.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Fs.jsx)($t.User,{className:"h-8 w-8 text-blue-600"})}),(0,Fs.jsx)(Le,{className:"text-Xs",children:"Add Human Colleague"})]}),(0,Fs.jsxs)(de,{className:"text-center",children:[(0,Fs.jsx)("Fs",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add as team members."}),(0,Fs.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Fs.jsx)($t.Users,{className:"h-4 w-4 text-blue-600"}),(0,Fs.jsx)("span",{children:"Browse existing users"})]}),(0,Fs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Fs.jsx)($t.User,{className:"h-4 w-4 text-blue-600"}),(0,Fs.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Fs.jsx)(b,{className:"mt-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Fs.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Fs.jsxs)(Me,{className:"text-center pb-4",children:[(0,Fs.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Fs.jsx)($t.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,Fs.jsx)(Le,{className:"text-Xs",children:"Add Digital Colleague"})]}),(0,Fs.jsxs)(de,{className:"text-center",children:[(0,Fs.jsx)("Fs",{className:"text-muted-foreground mb-4",children:"Clone Xs existing digital colleague or create a new AI assistant for your team."}),(0,Fs.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Fs.jsx)($t.Bot,{className:"h-4 w-4 text-purple-600"}),(0,Fs.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Fs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Fs.jsx)($t.Users,{className:"h-4 w-4 text-purple-600"}),(0,Fs.jsx)("span",{children:"Create from templates"})]})]}),(0,Fs.jsx)(b,{className:"mt-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Bi({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,ai.useState)(""),[s,l]=(0,ai.useState)("all"),d=(0,ai.useMemo)(()=>e.filter(v=>{let u=v.name.toLowerCase().includes(r.toLowerCase())||v.jobDescription.toLowerCase().includes(r.toLowerCase())||v.capabilities.some(y=>y.toLowerCase().includes(r.toLowerCase()))||v.workInstructions.toLowerCase().includes(r.toLowerCase()),f=s==="all"||v.status===s;return u&&f}),[e,r,s]),m=v=>{let u={...v,id:`${v.id}-clone-${Date.now()}`,name:`${v.name} (Copy)`,joinedDate:new Date,lastActive:new Date,lastUpdated:new Date,version:"1.0.0"};t(u)},c=v=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(v);return(0,Fs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Fs.jsx)(ba.AnimatePresence,{mode:"wait",children:(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Fs.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Fs.jsx)(en.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,Fs.jsx)(O,{children:(0,Fs.jsx)(de,{className:"Fs-6",children:(0,Fs.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Fs.jsx)("div",{className:"flex-1",children:(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsx)(en.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Fs.jsx)(U,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:v=>i(v.target.value),className:"pl-9"})]})}),(0,Fs.jsxs)("select",{value:s,onChange:v=>l(v.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,Fs.jsx)("option",{value:"all",children:"All Status"}),(0,Fs.jsx)("option",{value:"active",children:"Active"}),(0,Fs.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Fs.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:d.map(v=>(0,Fs.jsx)(ba.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Fs.jsxs)(O,{className:`cursor-pointer transition-all hover:shadow-lg ${o===v.id?"ring-2 ring-primary":""}`,onClick:()=>m(v),children:[(0,Fs.jsx)(Me,{className:"pb-3",children:(0,Fs.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Fs.jsx)(At,{children:(0,Fs.jsx)(It,{className:"bg-blue-100",children:(0,Fs.jsx)(en.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsxs)(Le,{className:"text-lg flex items-center gap-2",children:[v.name,(0,Fs.jsx)(Q,{variant:v.status==="active"?"default":"secondary",className:"text-xs",children:v.status})]}),(0,Fs.jsxs)("Fs",{className:"text-sm text-muted-foreground",children:["v",v.version]})]})]}),(0,Fs.jsxs)(b,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),m(v)},children:[(0,Fs.jsx)(en.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,Fs.jsx)(de,{className:"Fs-0",children:(0,Fs.jsxs)("div",{className:"space-y-3",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Fs.jsx)("Fs",{className:"text-sm line-clamp-2",children:v.jobDescription})]}),v.capabilities&&v.capabilities.length>0&&(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,Fs.jsxs)("div",{className:"flex flex-wrap gap-1",children:[v.capabilities.slice(0,3).map(u=>(0,Fs.jsx)(Q,{variant:"outline",className:"text-xs",children:u},u)),v.capabilities.length>3&&(0,Fs.jsxs)(Q,{variant:"outline",className:"text-xs",children:["+",v.capabilities.length-3]})]})]}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Fs.jsx)(en.Calendar,{className:"h-3 w-3"}),(0,Fs.jsxs)("span",{children:["Updated ",c(v.lastUpdated)]})]}),v.knowledge&&(0,Fs.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Fs.jsx)(en.Users,{className:"h-3 w-3"}),(0,Fs.jsxs)("span",{children:[v.knowledge.length," docs"]})]})]}),v.workInstructions&&(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Fs.jsx)("Fs",{className:"text-xs line-clamp-2",children:v.workInstructions})]})]})})]})},v.id))}),d.length===0&&(0,Fs.jsx)(O,{children:(0,Fs.jsx)(de,{className:"Fs-6",children:(0,Fs.jsxs)("div",{className:"text-center py-8",children:[(0,Fs.jsx)(en.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Fs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Fi({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Fs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Fs.jsx)(ba.AnimatePresence,{mode:"wait",children:(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Fs.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Fs.jsx)(en.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,Fs.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Fs.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Fs.jsxs)(Me,{className:"text-center pb-4",children:[(0,Fs.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Fs.jsx)(en.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,Fs.jsx)(Le,{className:"text-Xs",children:"Clone Existing"})]}),(0,Fs.jsxs)(de,{className:"text-center",children:[(0,Fs.jsx)("Fs",{className:"text-muted-foreground mb-4",children:"Start with Xs existing digital colleague and customize it for your needs."}),(0,Fs.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Fs.jsx)(en.Bot,{className:"h-4 w-4 text-blue-600"}),(0,Fs.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Fs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Fs.jsx)(en.Copy,{className:"h-4 w-4 text-blue-600"}),(0,Fs.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Fs.jsx)(b,{className:"mt-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Fs.jsxs)(O,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Fs.jsxs)(Me,{className:"text-center pb-4",children:[(0,Fs.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Fs.jsx)(en.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,Fs.jsx)(Le,{className:"text-Xs",children:"Create New"})]}),(0,Fs.jsxs)(de,{className:"text-center",children:[(0,Fs.jsx)("Fs",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Fs.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Fs.jsx)(en.Plus,{className:"h-4 w-4 text-green-600"}),(0,Fs.jsx)("span",{children:"Custom job description"})]}),(0,Fs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Fs.jsx)(en.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,Fs.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Fs.jsx)(b,{className:"mt-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var Li=require("react-icons/Fs");function Ke({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:s,className:l}){let[d,m]=hi(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),c=!r&&!t||d;return(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} Fs-8 text-white ${l||""}`,children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Fs.jsx)(Q,{className:"bg-white/20 text-white hover:bg-white/30 rounded-Xs",children:a}),(0,Fs.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Fs.jsxs)("div",{className:"flex items-center gap-3",children:[c&&o&&(0,Fs.jsx)(b,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,Fs.jsx)("button",{"aria-label":d?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 Fs-1 text-white transition-colors",onClick:()=>m(!d),style:{lineHeight:0},children:d?(0,Fs.jsx)(Li.FaChevronDown,{size:22}):(0,Fs.jsx)(Li.FaChevronUp,{size:22})})]})]}),!c&&(0,Fs.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Fs.jsxs)("div",{className:"space-y-4",children:[(0,Fs.jsx)("Fs",{className:"max-w-[600px] text-white/80",children:t}),(0,Fs.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Fs.jsx)(b,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,Fs.jsx)(b,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),s&&(0,Fs.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var rl=le(require("react")),zo=le(require("@radix-ui/react-progress"));var Ho=rl.forwardRef(({className:e,value:t,...a},o)=>(0,Fs.jsx)(zo.Root,{ref:o,className:g("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Fs.jsx)(zo.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ho.displayName=zo.Root.displayName;function Yr({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,Fs.jsxs)(O,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Fs.jsx)(Me,{className:"pb-2",children:(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Fs.jsx)(Q,{className:"rounded-Xs bg-amber-500",children:"New"}):(0,Fs.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Fs.jsx)(en.Star,{className:"h-4 w-4"})})]})}),(0,Fs.jsxs)(de,{className:"pb-2",children:[(0,Fs.jsx)(Le,{className:"text-lg",children:e.name}),(0,Fs.jsx)(ra,{children:e.description}),o&&e.progress<100&&(0,Fs.jsxs)("div",{className:"mt-2",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Fs.jsx)("span",{children:"Installation"}),(0,Fs.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Fs.jsx)(Ho,{value:e.progress,className:"h-2 mt-1 rounded-Xs"})]})]}),(0,Fs.jsx)(sa,{children:(0,Fs.jsx)(b,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function lo({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:i}){return(0,Fs.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[r&&(0,Fs.jsxs)("div",{className:"bg-muted/50 Fs-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Fs.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Fs.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Fs.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Fs.jsx)("div",{className:"divide-y",children:e.map(s=>(0,Fs.jsxs)(ba.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"Fs-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(s),children:[(0,Fs.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Fs.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted",children:s.icon}),(0,Fs.jsx)("div",{children:(0,Fs.jsx)("Fs",{className:"font-medium",children:s.name})})]}),(0,Fs.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:s.size}),(0,Fs.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Fs.jsx)("span",{className:"text-sm md:text-base",children:s.modified}),(0,Fs.jsxs)("div",{className:"flex gap-1",children:[(0,Fs.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-Xs",onClick:l=>{l.stopPropagation(),a?.(s)},children:(0,Fs.jsx)(en.Edit,{className:"h-4 w-4"})}),(0,Fs.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-Xs text-red-500 hover:text-red-600",onClick:l=>{l.stopPropagation(),o?.(s)},children:(0,Fs.jsx)(en.Trash2,{className:"h-4 w-4"})}),(0,Fs.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-Xs",children:(0,Fs.jsx)(en.MoreHorizontal,{className:"h-4 w-4"})})]})]})]},s.name))})]})}function ji({project:e,onOpen:t,onShare:a,className:o}){return(0,$e.jsx)(ba.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,$e.jsxs)(O,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,$e.jsxs)(Me,{children:[(0,$e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,$e.jsx)(Le,{children:e.name}),(0,$e.jsxs)(Q,{variant:"outline",className:"rounded-Xs",children:["Due ",e.dueDate]})]}),(0,$e.jsx)(ra,{children:e.description})]}),(0,$e.jsxs)(de,{className:"space-y-4",children:[(0,$e.jsxs)("div",{className:"space-y-2",children:[(0,$e.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,$e.jsx)("span",{children:"Progress"}),(0,$e.jsxs)("span",{children:[e.progress,"%"]})]}),(0,$e.jsx)(Ho,{value:e.progress,className:"h-2 rounded-Xs"})]}),(0,$e.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,$e.jsxs)("div",{className:"flex items-center",children:[(0,$e.jsx)(en.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,$e.jsxs)("div",{className:"flex items-center",children:[(0,$e.jsx)(en.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,$e.jsxs)(sa,{className:"flex gap-2",children:[(0,$e.jsx)(b,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,$e.jsx)(b,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,$e.jsx)(en.Share2,{className:"h-4 w-4"})})]})]})})}var Qr=[{name:"PixelMaster",icon:(0,Fs.jsx)(en.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Fs.jsx)(en.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Fs.jsx)(en.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Fs.jsx)(en.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Fs.jsx)(en.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Fs.jsx)(en.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Fs.jsx)(en.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Fs.jsx)(en.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Fs.jsx)(en.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Fs.jsx)(en.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Fs.jsx)(en.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Fs.jsx)(en.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],cl=[{name:"Brand Redesign.pxm",app:"PixelMaster",modified:"2 hours ago",icon:(0,Fs.jsx)(en.ImageIcon,{className:"text-violet-500"}),shared:!0,size:"24.5 MB",collaborators:3},{name:"Company Logo.vec",app:"VectorPro",modified:"Yesterday",icon:(0,Fs.jsx)(en.Brush,{className:"text-orange-500"}),shared:!0,size:"8.2 MB",collaborators:2},{name:"Product Launch Video.vid",app:"VideoStudio",modified:"3 days ago",icon:(0,Fs.jsx)(en.Video,{className:"text-pink-500"}),shared:!1,size:"1.2 GB",collaborators:0},{name:"UI Animation.mfx",app:"MotionFX",modified:"Last week",icon:(0,Fs.jsx)(en.Sparkles,{className:"text-blue-500"}),shared:!0,size:"345 MB",collaborators:4},{name:"Magazine Layout.pgc",app:"PageCraft",modified:"2 weeks ago",icon:(0,Fs.jsx)(en.Layers,{className:"text-red-500"}),shared:!1,size:"42.8 MB",collaborators:0},{name:"Mobile App Design.uxf",app:"UXFlow",modified:"3 weeks ago",icon:(0,Fs.jsx)(en.LayoutGrid,{className:"text-fuchsia-500"}),shared:!0,size:"18.3 MB",collaborators:5},{name:"Product Photography.phl",app:"PhotoLab",modified:"Last month",icon:(0,Fs.jsx)(en.Camera,{className:"text-teal-500"}),shared:!1,size:"156 MB",collaborators:0}];var ml=[{title:"Mastering Digital Illustration",description:"Learn advanced techniques for creating stunning digital art",duration:"1h 45m",level:"Advanced",instructor:"Sarah Chen",category:"Illustration",views:"24K"},{title:"UI/UX Design Fundamentals",description:"Essential principles for creating intuitive user interfaces",duration:"2h 20m",level:"Intermediate",instructor:"Michael Rodriguez",category:"Design",views:"56K"},{title:"Video Editing Masterclass",description:"Professional techniques for cinematic video editing",duration:"3h 10m",level:"Advanced",instructor:"James Wilson",category:"Video",views:"32K"},{title:"Typography Essentials",description:"Create beautiful and effective typography for any project",duration:"1h 30m",level:"Beginner",instructor:"Emma Thompson",category:"Typography",views:"18K"},{title:"Color Theory for Designers",description:"Understanding color relationships and psychology",duration:"2h 05m",level:"Intermediate",instructor:"David Kim",category:"Design",views:"41K"}];function pl({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,i]=(0,ai.useState)(""),s=(0,ai.useMemo)(()=>e.filter(d=>d.name.toLowerCase().includes(r.toLowerCase())||d.email.toLowerCase().includes(r.toLowerCase())||d.role.toLowerCase().includes(r.toLowerCase())||(d.skills||[]).some(c=>c.toLowerCase().includes(r.toLowerCase()))),[e,r]),l=d=>{t(d)};return(0,Fs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Fs.jsx)(ba.AnimatePresence,{mode:"wait",children:(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Fs.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Fs.jsx)(en.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),(0,Fs.jsx)(O,{className:"container",children:(0,Fs.jsx)(de,{className:"Fs-6",children:(0,Fs.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,Fs.jsx)("div",{className:"flex-1",children:(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsx)(en.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Fs.jsx)(U,{placeholder:"Search users by name, email, role, or skills...",value:r,onChange:d=>i(d.target.value),className:"pl-9"})]})})})})}),(0,Fs.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:s.map(d=>(0,Fs.jsx)(ba.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Fs.jsxs)(O,{className:`cursor-pointer transition-all hover:shadow-lg ${o===d.id?"ring-2 ring-primary":""}`,onClick:()=>l(d),children:[(0,Fs.jsx)(Me,{className:"pb-3",children:(0,Fs.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Fs.jsxs)(At,{children:[(0,Fs.jsx)(aa,{src:d.avatar,alt:d.name}),(0,Fs.jsx)(It,{children:(0,Fs.jsx)(en.User,{className:"h-4 w-4"})})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(Le,{className:"text-lg",children:d.name}),(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:d.role})]})]}),o===d.id&&(0,Fs.jsx)(en.Check,{className:"h-5 w-5 text-primary"})]})}),(0,Fs.jsx)(de,{className:"Fs-0",children:(0,Fs.jsxs)("div",{className:"space-y-3",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Fs.jsx)("Fs",{className:"text-sm font-medium",children:d.email})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:"Department"}),(0,Fs.jsx)(Q,{variant:"secondary",children:d.department})]}),d.location&&(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:"Location"}),(0,Fs.jsx)("Fs",{className:"text-sm",children:d.location})]}),d.skills&&d.skills.length>0&&(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,Fs.jsxs)("div",{className:"flex flex-wrap gap-1",children:[d.skills.slice(0,3).map(m=>(0,Fs.jsx)(Q,{variant:"outline",className:"text-xs",children:m},m)),d.skills.length>3&&(0,Fs.jsxs)(Q,{variant:"outline",className:"text-xs",children:["+",d.skills.length-3]})]})]})]})})]})},d.id))}),s.length===0&&(0,Fs.jsx)(O,{className:"container mt-4",children:(0,Fs.jsx)(de,{className:"Fs-6",children:(0,Fs.jsxs)("div",{className:"text-center py-8",children:[(0,Fs.jsx)(en.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Fs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function Vo({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:s,availableUsers:l=[],existingDigitalColleagues:d=[]}){let[m,c]=(0,ai.useState)(e||[]),[v,u]=(0,ai.useState)(""),[f,y]=(0,ai.useState)("all"),[I,h]=(0,ai.useState)("all"),[x,C]=(0,ai.useState)("all"),[M,H]=(0,ai.useState)(null),[ae,X]=(0,ai.useState)(null),[ie,N]=(0,ai.useState)("main"),T=m.filter(P=>{let Ye=P.name.toLowerCase().includes(v.toLowerCase())||P.type==="human"&&(P.email.toLowerCase().includes(v.toLowerCase())||P.role.toLowerCase().includes(v.toLowerCase()))||P.type==="digital"&&P.jobDescription.toLowerCase().includes(v.toLowerCase()),Je=f==="all"||P.type==="human"&&P.department===f,ka=I==="all"||P.status===I;return Ye&&Je&&ka}),V=T.filter(P=>P.type==="human"),ge=T.filter(P=>P.type==="digital"),F=()=>{N("typeSelection")},k=P=>{P.type==="digital"&&(H(P),N("form"))},w=P=>{P.type==="digital"&&(X(P),N("view"))},oe=P=>{let Ye={id:`human-${Date.now()}`,type:"human",name:P.name,email:P.email,role:P.role,department:P.department,phone:P.phone,location:P.location,timezone:P.timezone,skills:P.skills,bio:P.bio,status:"active",joinedDate:new Date,lastActive:new Date};c(Je=>[...Je,Ye]),t?.(Ye),N("main")},Se=P=>{c(Ye=>[...Ye,P]),t?.(P),N("main")},Ze=()=>{H(null),N("form")},Ae=P=>{M?(c(Ye=>Ye.map(Je=>Je.id===P.id?P:Je)),a?.(P)):(c(Ye=>[...Ye,P]),t?.(P)),N("main"),H(null)},et=()=>{N("main"),H(null),X(null)},j=()=>{N("main"),X(null)},re=()=>{ae&&(H(ae),X(null),N("form"))},De=P=>{c(Ye=>Ye.filter(Je=>Je.id!==P)),o?.(P)},gt=()=>{u(""),y("all"),h("all")},Ft=()=>{let P=[];return d.forEach(Je=>{P.push(...Je.knowledge,...Je.coreKnowledge)}),m.forEach(Je=>{Je.type==="digital"&&P.push(...Je.knowledge,...Je.coreKnowledge)}),P.filter((Je,ka,Jo)=>ka===Jo.findIndex(fo=>fo.id===Je.id))};return ie==="typeSelection"?(0,Fs.jsx)(Ei,{onSelectHuman:()=>N("userSelection"),onSelectDigital:()=>N("digitalOptions"),onCancel:()=>N("main")}):ie==="userSelection"?(0,Fs.jsx)(pl,{users:l,onUserSelect:oe,onCancel:()=>N("typeSelection")}):ie==="digitalOptions"?(0,Fs.jsx)(Fi,{onCloneExisting:()=>N("digitalClone"),onCreateNew:Ze,onCancel:()=>N("typeSelection")}):ie==="digitalClone"?(0,Fs.jsx)(Bi,{digitalColleagues:d,onColleagueClone:Se,onCancel:()=>N("digitalOptions")}):ie==="form"?(0,Fs.jsx)(Lo,{colleague:M||void 0,onSave:Ae,onCancel:et,availableKnowledgeDocuments:Ft()}):ie==="view"?(0,Fs.jsx)(Lo,{colleague:ae||void 0,onSave:Ae,onCancel:j,readOnly:!0,availableKnowledgeDocuments:Ft()}):(0,Fs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Fs.jsx)(ba.AnimatePresence,{mode:"wait",children:(0,Fs.jsx)(ba.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Fs.jsxs)("div",{className:`space-y-6 ${s||""}`,children:[(0,Fs.jsx)(Ke,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Add colleague",onClick:F}}),(0,Fs.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Fs.jsxs)(O,{children:[(0,Fs.jsxs)(Me,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Fs.jsx)(Le,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Fs.jsx)(en.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Fs.jsxs)(de,{children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold",children:m.length}),(0,Fs.jsxs)("Fs",{className:"text-xs text-muted-foreground",children:[m.filter(P=>P.status==="active").length," active"]})]})]}),(0,Fs.jsxs)(O,{children:[(0,Fs.jsxs)(Me,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Fs.jsx)(Le,{className:"text-sm font-medium",children:"Human Members"}),(0,Fs.jsx)(en.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Fs.jsxs)(de,{children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold",children:m.filter(P=>P.type==="human").length}),(0,Fs.jsxs)("Fs",{className:"text-xs text-muted-foreground",children:[m.filter(P=>P.type==="human"&&P.status==="active").length," active"]})]})]}),(0,Fs.jsxs)(O,{children:[(0,Fs.jsxs)(Me,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Fs.jsx)(Le,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Fs.jsx)(en.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Fs.jsxs)(de,{children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold",children:m.filter(P=>P.type==="digital").length}),(0,Fs.jsxs)("Fs",{className:"text-xs text-muted-foreground",children:[m.filter(P=>P.type==="digital"&&P.status==="active").length," active"]})]})]})]}),(0,Fs.jsx)(O,{children:(0,Fs.jsx)(de,{className:"Fs-6",children:(0,Fs.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Fs.jsx)("div",{className:"flex-1",children:(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsx)(en.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Fs.jsx)(U,{placeholder:"Search colleagues...",value:v,onChange:P=>u(P.target.value),className:"pl-9"})]})}),(0,Fs.jsxs)(Ee,{value:f,onValueChange:y,children:[(0,Fs.jsx)(Pe,{className:"w-full md:w-[180px]",children:(0,Fs.jsx)(He,{placeholder:"Department"})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"all",children:"All Departments"}),i.map(P=>(0,Fs.jsx)($,{value:P,children:P},P))]})]}),(0,Fs.jsxs)(Ee,{value:I,onValueChange:h,children:[(0,Fs.jsx)(Pe,{className:"w-full md:w-[140px]",children:(0,Fs.jsx)(He,{placeholder:"Status"})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"all",children:"All Status"}),(0,Fs.jsx)($,{value:"active",children:"Active"}),(0,Fs.jsx)($,{value:"inactive",children:"Inactive"})]})]}),(v||f!=="all"||I!=="all")&&(0,Fs.jsxs)(b,{variant:"outline",onClick:gt,className:"gap-2",children:[(0,Fs.jsx)(en.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Fs.jsxs)("div",{className:"space-y-4",children:[(0,Fs.jsx)(Za,{activeTab:x,onTabChange:C,tabOptions:[{value:"all",label:`All (${T.length})`},{value:"human",label:`Human (${V.length})`},{value:"digital",label:`Digital (${ge.length})`}],maxWidth:"400px",gridCols:3}),x==="all"&&(0,Fs.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:T.map(P=>(0,Fs.jsx)(oo,{colleague:P,onEdit:k,onDelete:De,onViewDetails:w,compact:r},P.id))}),x==="human"&&(0,Fs.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:V.map(P=>(0,Fs.jsx)(oo,{colleague:P,onEdit:k,onDelete:De,onViewDetails:w,compact:r},P.id))}),x==="digital"&&(0,Fs.jsx)("div",{className:`grid gap-4 ${r?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:ge.map(P=>(0,Fs.jsx)(oo,{colleague:P,onEdit:k,onDelete:De,onViewDetails:w,compact:r},P.id))})]}),T.length===0&&(0,Fs.jsx)(O,{children:(0,Fs.jsx)(de,{className:"Fs-6",children:(0,Fs.jsxs)("div",{className:"text-center py-8",children:[(0,Fs.jsx)(en.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Fs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground mb-4",children:v||f!=="all"||I!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,Fs.jsxs)(b,{onClick:F,className:"gap-2",children:[(0,Fs.jsx)(en.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function ul({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:s=!0}){let[l,d]=(0,ai.useState)(o===0),m=a&&Object.keys(a).length>0,c=t.length+(a?Object.values(a).reduce((f,y)=>f+y.documents.length,0):0),v=f=>{switch(f){case"markdown":case"mdx":return(0,Fs.jsx)(en.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,Fs.jsx)(en.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Fs.jsx)(en.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},u=f=>{let y=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return y[f%y.length]};return(0,Fs.jsxs)("div",{className:"space-y-1",children:[(m||t.length>0)&&(0,Fs.jsxs)(ba.motion.div,{className:`group flex items-center gap-3 Fs-3 rounded-Xs cursor-pointer transition-all duration-200 ${l?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>d(!l),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Fs.jsx)("div",{className:`w-1 h-6 rounded-full ${u(o)}`}),(0,Fs.jsx)(ba.motion.div,{animate:{rotate:l?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Fs.jsx)(en.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Fs.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Fs.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Fs.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),s&&c>0&&(0,Fs.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Fs.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:c})})]})]}),(0,Fs.jsx)(ba.motion.div,{initial:!1,animate:{height:l?"auto":0,opacity:l?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Fs.jsxs)("div",{className:"Fs-2 space-y-1",children:[t.map((f,y)=>(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:y*.05,duration:.2},className:`group flex items-center gap-3 Fs-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===f.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Fs.jsx)("div",{className:"flex-shrink-0",children:v(f.format)}),(0,Fs.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Fs.jsx)("Fs",{className:`text-sm truncate transition-colors ${i===f.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,Fs.jsx)("Fs",{className:"text-xs text-muted-foreground truncate mt-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,Fs.jsx)("div",{className:"flex-shrink-0",children:(0,Fs.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.id)),a&&Object.entries(a).map(([f,y])=>(0,Fs.jsx)(ul,{label:f,documents:y.documents,children:y.children,level:o+1,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:s},f))]})})]})}function zc({document:e}){let t=o=>{switch(o){case"markdown":case"mdx":return(0,Fs.jsx)(en.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Fs.jsx)(en.File,{className:"h-6 w-6 text-success"});default:return(0,Fs.jsx)(en.File,{className:"h-6 w-6 text-muted-foreground"})}},a=o=>{switch(o){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}};return(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Fs.jsx)("div",{className:"border-b border-border bg-card Fs-8",children:(0,Fs.jsxs)("div",{className:"flex items-start gap-4",children:[(0,Fs.jsx)("div",{className:"flex-shrink-0 Fs-3 rounded-Xs bg-muted border border-border",children:t(e.format)}),(0,Fs.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Fs.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Fs.jsx)("Fs",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description}),(0,Fs.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Fs.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${a(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(o=>(0,Fs.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",o]},o))]})]})]})}),(0,Fs.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Fs.jsxs)("div",{className:"Fs-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Fs.jsxs)("div",{className:"mb-6",children:[(0,Fs.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Fs.jsx)("div",{className:"bg-muted rounded-lg Fs-3 border border-border",children:(0,Fs.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-xs",children:Object.entries(e.metadata).map(([o,r])=>(0,Fs.jsxs)("div",{className:"flex gap-1",children:[(0,Fs.jsxs)("span",{className:"text-muted-foreground font-medium",children:[o.replace(/([A-Fs])/g," $1").trim(),":"]}),(0,Fs.jsx)("span",{className:"text-foreground truncate",children:String(r)})]},o))})})]}),(0,Fs.jsx)("div",{className:"space-y-4",children:e.content?(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsx)("div",{className:"bg-card border border-border rounded-Xs Fs-6 overflow-hidden",children:(0,Fs.jsxs)("pre",{className:"text-card-foreground text-sm leading-relaxed whitespace-pre-wrap font-mono",children:[e.content.substring(0,1500),e.content.length>1500&&"..."]})}),e.content.length>1500&&(0,Fs.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-card to-transparent rounded-b-Xs flex items-end justify-center pb-2",children:(0,Fs.jsx)("span",{className:"text-muted-foreground text-xs",children:"Content truncated"})})]}):(0,Fs.jsxs)("div",{className:"text-center py-12 bg-muted rounded-Xs border-2 border-dashed border-border",children:[(0,Fs.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Fs.jsx)(en.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Fs.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function gl({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:r,className:i}){let[s,l]=(0,ai.useState)(""),[d,m]=(0,ai.useState)(null),c=(0,ai.useMemo)(()=>s?e.filter(f=>f.title.toLowerCase().includes(s.toLowerCase())||f.description?.toLowerCase().includes(s.toLowerCase())||f.tags?.some(y=>y.toLowerCase().includes(s.toLowerCase()))||Object.values(f.metadata||{}).some(y=>String(y).toLowerCase().includes(s.toLowerCase()))):e,[e,s]),v=(0,ai.useMemo)(()=>{let f=(y,I)=>{if(I.length===0)return{};let[h,...x]=I;return y.reduce((M,H)=>{let ae=H.metadata?.[h]||"Uncategorized",X=String(ae);if(M[X]||(M[X]={documents:[],children:{}}),x.length===0)M[X].documents.push(H);else{let ie=f([H],x),N=Object.keys(ie)[0];N&&(M[X].children||(M[X].children={}),M[X].children[N]?M[X].children[N].documents.push(...ie[N].documents):M[X].children[N]=ie[N])}return M},{})};return f(c,t.groupBy)},[c,t.groupBy]),u=f=>{m(f),a?.(f)};return(0,Fs.jsxs)("div",{className:`flex h-full ${i||""}`,children:[(0,Fs.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Fs.jsx)("div",{className:"Fs-6 border-b border-border",children:(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Fs.jsx)(en.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Fs.jsx)(U,{placeholder:"Search knowledge base...",value:s,onChange:f=>l(f.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-Xs h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Fs.jsx)(qt,{className:"h-[calc(100%-100px)]",children:(0,Fs.jsxs)("div",{className:"Fs-4 space-y-3",children:[Object.entries(v).map(([f,y])=>(0,Fs.jsx)(ul,{label:f,documents:y.documents,children:y.children,level:0,onDocumentClick:u,selectedDocumentId:r,showDocumentCount:t.showDocumentCount},f)),Object.keys(v).length===0&&(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Fs.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Fs.jsx)(en.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Fs.jsx)("Fs",{className:"text-sm font-medium",children:"No documents found"}),(0,Fs.jsx)("Fs",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Fs.jsx)("div",{className:"flex-1 bg-background",children:d?(0,Fs.jsx)(zc,{document:d}):(0,Fs.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Fs.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Fs.jsx)(en.FileText,{className:"h-10 w-10 text-primary"})}),(0,Fs.jsx)("h3",{className:"text-Xs font-semibold text-foreground mb-2",children:"Select a document"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}var Hc=[{id:"all",label:"All Documentation",description:"Browse all documentation organized by category and type",icon:(0,Fs.jsx)(en.BookOpen,{className:"h-4 w-4"}),menuConfig:{groupBy:["category","type"],sortBy:"title",sortOrder:"asc",showDocumentCount:!0}},{id:"services",label:"Services",description:"Documentation organized by service and team",icon:(0,Fs.jsx)(en.Server,{className:"h-4 w-4"}),menuConfig:{groupBy:["service","team"],sortBy:"updatedAt",sortOrder:"desc",showDocumentCount:!0}},{id:"architecture",label:"Architecture",description:"System architecture documentation by component and layer",icon:(0,Fs.jsx)(en.Code,{className:"h-4 w-4"}),menuConfig:{groupBy:["component","layer"],sortBy:"title",sortOrder:"asc",showDocumentCount:!0}},{id:"teams",label:"Teams",description:"Documentation organized by team and project",icon:(0,Fs.jsx)(en.Users,{className:"h-4 w-4"}),menuConfig:{groupBy:["team","project"],sortBy:"updatedAt",sortOrder:"desc",showDocumentCount:!0}}];function Go({documents:e=[],contexts:t=Hc,onDocumentClick:a=i=>console.log("Document clicked:",i),onDocumentShare:o=i=>console.log("Share document:",i),selectedDocumentId:r}){let[i,s]=(0,ai.useState)(t[0]);return(0,Fs.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Fs.jsx)(Ke,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Fs.jsxs)("div",{className:"mt-6",children:[(0,Fs.jsx)("div",{className:"border-b border-border",children:(0,Fs.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(l=>(0,Fs.jsxs)("button",{onClick:()=>s(l),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${i.id===l.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[l.icon,l.label]},l.id))})}),i.description&&(0,Fs.jsx)("div",{className:"mt-3 px-1",children:(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:i.description})})]})]}),(0,Fs.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Fs.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Fs.jsx)(gl,{documents:e,menuConfig:i.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:r})})})]})}function es({title:e="Digital Colleagues",businessUnits:t}){let[a,o]=(0,ai.useState)("home"),[r,i]=(0,ai.useState)(t[0]),s=x=>{console.log("Opening app:",x.name)},l=x=>{console.log("Favoriting app:",x.name)},d=x=>{console.log("Opening file:",x.name)},m=x=>{console.log("Sharing file:",x.name)},c=x=>{console.log("Opening project:",x.name)},v=x=>{console.log("Sharing project:",x.name)},u=x=>{i(x),console.log("Business unit changed to:",x.name)},f=()=>{console.log("Copilot clicked - navigating to chat"),o("chat")},y=x=>{console.log("Notification removed:",x)},I=()=>{console.log("All notifications removed")},h=()=>{switch(a){case"home":return(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsxs)("section",{className:"text-center py-12",children:[(0,Fs.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",r.name," team"]}),(0,Fs.jsx)("Fs",{className:"text-Xs text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,Fs.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,Fs.jsxs)("div",{className:"bg-card Fs-6 rounded-lg border",children:[(0,Fs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,Fs.jsx)("Fs",{className:"text-3xl font-bold text-primary",children:"12"}),(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Fs.jsxs)("div",{className:"bg-card Fs-6 rounded-lg border",children:[(0,Fs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,Fs.jsx)("Fs",{className:"text-3xl font-bold text-primary",children:"8"}),(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Fs.jsxs)("div",{className:"bg-card Fs-6 rounded-lg border",children:[(0,Fs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,Fs.jsx)("Fs",{className:"text-3xl font-bold text-primary",children:"156"}),(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Fs.jsx)(Ke,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Go",onClick:()=>o("chat")}})]});case"colleagues":return(0,Fs.jsx)(Vo,{});case"chat":return(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsxs)("section",{className:"text-center py-12",children:[(0,Fs.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,Fs.jsxs)("Fs",{className:"text-Xs text-muted-foreground mb-8",children:["Connect with your ",r.name," team members and collaborate in real-time."]})]}),(0,Fs.jsx)(Ke,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-to-r from-blue-600 via-purple-600 to-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,Fs.jsxs)("div",{className:"space-y-8",children:[(0,Fs.jsx)(Ke,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,Fs.jsxs)("section",{className:"space-y-4",children:[(0,Fs.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Fs.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Qr.filter(x=>x.new).map(x=>(0,Fs.jsx)(Yr,{app:x,showProgress:!0,onOpen:s,onFavorite:l},x.name))})]}),(0,Fs.jsxs)("section",{className:"space-y-4",children:[(0,Fs.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Fs.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Qr.map(x=>(0,Fs.jsx)(Yr,{app:x,onOpen:s,onFavorite:l},x.name))})]})]});case"knowledge":return(0,Fs.jsx)(Go,{});case"files":return(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsx)(Ke,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-to-r from-teal-600 via-cyan-600 to-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,Fs.jsxs)("section",{className:"space-y-4",children:[(0,Fs.jsx)("div",{className:"flex items-center justify-between",children:(0,Fs.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Fs.jsx)(lo,{files:cl,onFileClick:d})]})]});case"projects":return(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsx)(Ke,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:()=>console.log("New project clicked")}}),(0,Fs.jsxs)("section",{className:"space-y-4",children:[(0,Fs.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Fs.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:fn.map(x=>(0,Fs.jsx)(ji,{project:x,onOpen:c,onShare:v},x.name))})]})]});case"learn":return(0,Fs.jsxs)("div",{className:"space-y-8",children:[(0,Fs.jsx)(Ke,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-to-r from-green-600 via-emerald-600 to-teal-600",primaryAction:{label:"Upgrade to Pro",onClick:()=>console.log("Upgrade to pro clicked")}}),(0,Fs.jsxs)("section",{className:"space-y-4",children:[(0,Fs.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Fs.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:ml.slice(0,3).map(x=>(0,Fs.jsxs)("div",{className:"rounded-3xl border Fs-6",children:[(0,Fs.jsx)("h3",{className:"font-semibold mb-2",children:x.title}),(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground mb-4",children:x.description}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Fs.jsx)("span",{children:x.duration}),(0,Fs.jsx)("span",{children:x.level})]})]},x.title))})]})]});default:return null}};return(0,Fs.jsx)(Ci,{sidebarItems:pn,title:e,notifications:un,businessUnits:t,currentBusinessUnit:r,onBusinessUnitChange:u,activeTab:a,onTabChange:o,showTabs:!0,onActionClick:f,actionIcon:(0,Fs.jsx)(en.Bot,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:y,onRemoveAll:I,children:(0,Fs.jsx)(ba.AnimatePresence,{mode:"wait",children:(0,Fs.jsx)(ba.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:h()},a)})})}function Ko({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:i=!1,className:s}){let[l,d]=(0,ai.useState)(e),[m,c]=(0,ai.useState)(""),[v,u]=(0,ai.useState)("all"),[f,y]=(0,ai.useState)("all"),I=Array.from(new Set(l.map(N=>N.app))),h=l.filter(N=>{let T=N.name.toLowerCase().includes(m.toLowerCase()),V=v==="all"||N.app===v;return T&&V}),x=h.slice(0,10),C=h.filter(N=>N.shared),M=()=>{console.log("Add file clicked")},H=N=>{console.log("Edit file:",N.name),a?.(N)},ae=N=>{d(T=>T.filter(V=>V.name!==N.name)),o?.(N.name)},X=N=>{console.log("File clicked:",N.name),r?.(N)},ie=()=>{c(""),u("all")};return(0,Fs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Fs.jsx)(ba.AnimatePresence,{mode:"wait",children:(0,Fs.jsx)(ba.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Fs.jsxs)("div",{className:`space-y-6 ${s||""}`,children:[(0,Fs.jsx)(Ke,{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:M},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Fs.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Fs.jsxs)(O,{children:[(0,Fs.jsxs)(Me,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Fs.jsx)(Le,{className:"text-sm font-medium",children:"Total Files"}),(0,Fs.jsx)(en.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Fs.jsxs)(de,{children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold",children:l.length}),(0,Fs.jsxs)("Fs",{className:"text-xs text-muted-foreground",children:[l.filter(N=>N.shared).length," shared"]})]})]}),(0,Fs.jsxs)(O,{children:[(0,Fs.jsxs)(Me,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Fs.jsx)(Le,{className:"text-sm font-medium",children:"Storage Used"}),(0,Fs.jsx)(en.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Fs.jsxs)(de,{children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold",children:"2.4 GB"}),(0,Fs.jsx)("Fs",{className:"text-xs text-muted-foreground",children:"of 10 GB used"})]})]}),(0,Fs.jsxs)(O,{children:[(0,Fs.jsxs)(Me,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Fs.jsx)(Le,{className:"text-sm font-medium",children:"Recent Activity"}),(0,Fs.jsx)(en.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Fs.jsxs)(de,{children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold",children:"12"}),(0,Fs.jsx)("Fs",{className:"text-xs text-muted-foreground",children:"files modified today"})]})]})]}),(0,Fs.jsx)(O,{children:(0,Fs.jsx)(de,{className:"Fs-6",children:(0,Fs.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Fs.jsx)("div",{className:"flex-1",children:(0,Fs.jsxs)("div",{className:"relative",children:[(0,Fs.jsx)(en.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Fs.jsx)(U,{placeholder:"Search files...",value:m,onChange:N=>c(N.target.value),className:"pl-9"})]})}),(0,Fs.jsxs)(Ee,{value:v,onValueChange:u,children:[(0,Fs.jsx)(Pe,{className:"w-full md:w-[180px]",children:(0,Fs.jsx)(He,{placeholder:"Filter by app"})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"all",children:"All Apps"}),I.map(N=>(0,Fs.jsx)($,{value:N,children:N},N))]})]}),(m||v!=="all")&&(0,Fs.jsxs)(b,{variant:"outline",onClick:ie,className:"gap-2",children:[(0,Fs.jsx)(en.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Fs.jsxs)("div",{className:"space-y-4",children:[(0,Fs.jsx)(Za,{activeTab:f,onTabChange:y,tabOptions:[{value:"all",label:`All Files (${h.length})`},{value:"recent",label:`Recent (${x.length})`},{value:"shared",label:`Shared (${C.length})`}],maxWidth:"500px",gridCols:3}),f==="all"&&(0,Fs.jsx)(lo,{files:h,onFileClick:X,onFileEdit:H,onFileDelete:ae,showHeader:!i}),f==="recent"&&(0,Fs.jsx)(lo,{files:x,onFileClick:X,onFileEdit:H,onFileDelete:ae,showHeader:!i}),f==="shared"&&(0,Fs.jsx)(lo,{files:C,onFileClick:X,onFileEdit:H,onFileDelete:ae,showHeader:!i})]}),h.length===0&&(0,Fs.jsx)(O,{children:(0,Fs.jsx)(de,{className:"Fs-6",children:(0,Fs.jsxs)("div",{className:"text-center py-8",children:[(0,Fs.jsx)(en.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Fs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground mb-4",children:m||v!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Fs.jsxs)(b,{onClick:M,className:"gap-2",children:[(0,Fs.jsx)(en.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var bl=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:i=!1})=>{let s=m=>{m.preventDefault()},l=m=>{m.preventDefault(),r(t)};return(0,Fs.jsxs)(O,{className:`Fs-4 bg-card border-l-4 ${(()=>{switch(t){case"todo":return"border-l-gray-400";case"in-progress":return"border-l-blue-500";case"review":return"border-l-orange-500";case"done":return"border-l-green-500";default:return"border-l-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 ${i?"lg:max-w-xs":""}`,onDragOver:s,onDrop:l,children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Fs.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,Fs.jsx)(Q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Fs.jsx)("div",{className:"space-y-4 min-h-[200px]",children:o})]})};var Vi=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let i=c=>{a(e)},s=()=>{o(e)},l=()=>{switch(e.priority){case"high":return"bg-destructive/20 text-destructive border-destructive/20";case"medium":return"bg-warning/20 text-warning border-warning/20";case"low":return"bg-success/20 text-success border-success/20";default:return"bg-muted text-muted-foreground border-border"}},d=()=>{switch(e.type){case"story":return(0,Fs.jsx)(en.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Fs.jsx)(en.Bug,{className:"h-3 w-3"});case"spike":return(0,Fs.jsx)(en.Zap,{className:"h-3 w-3"});case"task":default:return(0,Fs.jsx)(en.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 r?(0,Fs.jsx)(O,{className:"Fs-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:i,onClick:s,children:(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${m()}`,children:d()}),(0,Fs.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,Fs.jsxs)(O,{className:"Fs-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:i,onClick:s,children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Fs.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${m()}`,children:[d(),(0,Fs.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Fs.jsxs)("div",{className:"flex gap-1",children:[(0,Fs.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${l()}`,children:e.priority}),(0,Fs.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-xs font-medium",children:e.points})]})]}),(0,Fs.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Fs.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,Fs.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Fs.jsx)(en.User,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{children:e.assignee})]})})]})};var Oa=le(require("react")),mo=le(require("@radix-ui/react-toggle-group"));var hl=le(require("react")),ts=le(require("@radix-ui/react-toggle"));var as=(0,Xs.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=Fs]:bg-accent data-[state=Fs]: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"}}),Uc=hl.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,Fs.jsx)(ts.Root,{ref:r,className:g(as({variant:t,size:a,className:e})),...o}));Uc.displayName=ts.Root.displayName;var wl=Oa.createContext({size:"default",variant:"default"}),za=Oa.forwardRef(({className:e,variant:t,size:a,children:o,...r},i)=>(0,Fs.jsx)(mo.Root,{ref:i,className:g("flex items-center justify-center gap-1",e),...r,children:(0,Fs.jsx)(wl.Provider,{value:{variant:t,size:a},children:o})}));za.displayName=mo.Root.displayName;var Ha=Oa.forwardRef(({className:e,children:t,variant:a,size:o,...r},i)=>{let s=Oa.useContext(wl);return(0,Fs.jsx)(mo.Item,{ref:i,className:g(as({variant:s.variant||a,size:s.size||o}),e),...r,children:t})});Ha.displayName=mo.Item.displayName;var Vc=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:en.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:en.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:en.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:en.Zap}],Gc=[{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"}],_i=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,defaultEpicId:i})=>{let[s,l]=(0,$o.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,$o.useEffect)(()=>{e&&i&&l(c=>({...c,epicId:i}))},[e,i]),(0,$o.useEffect)(()=>{e&&l({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""})},[e]);let d=c=>{c.preventDefault(),s.title.trim()&&s.epicId&&(a({title:s.title.trim(),description:s.description.trim(),status:"todo",priority:s.priority,type:s.type,points:s.points,epicId:s.epicId,sprintId:s.sprintId==="none"?void 0:s.sprintId,assignee:s.assignee.trim()||"Unassigned"}),l({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""}),t())},m=(c,v)=>{l(u=>({...u,[c]:v}))};return(0,Fs.jsx)(xt,{open:e,onOpenChange:t,children:(0,Fs.jsxs)(ft,{className:"sm:max-w-md",children:[(0,Fs.jsx)(vt,{children:(0,Fs.jsx)(bt,{children:"Add New Task"})}),(0,Fs.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"title",children:"Task Title"}),(0,Fs.jsx)(U,{id:"title",value:s.title,onChange:c=>m("title",c.target.value),placeholder:"Enter task title",required:!0})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Fs.jsx)(ze,{id:"description",value:s.description,onChange:c=>m("description",c.target.value),placeholder:"Enter task description",rows:3})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"Type"}),(0,Fs.jsx)(za,{type:"single",value:s.type,onValueChange:c=>c&&m("type",c),children:Vc.map(c=>{let v=c.icon;return(0,Fs.jsxs)(Ha,{value:c.value,className:"flex items-center gap-2 data-[state=Fs]:bg-primary data-[state=Fs]:text-primary-foreground",children:[(0,Fs.jsx)(v,{className:"h-4 w-4"}),c.label]},c.value)})})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"Priority"}),(0,Fs.jsx)(za,{type:"single",value:s.priority,onValueChange:c=>c&&m("priority",c),children:Gc.map(c=>(0,Fs.jsx)(Ha,{value:c.value,className:"data-[state=Fs]:bg-primary data-[state=Fs]:text-primary-foreground",children:c.label},c.value))})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"points",children:"Story Points"}),(0,Fs.jsx)(U,{id:"points",type:"number",min:"1",max:"100",value:s.points,onChange:c=>m("points",parseInt(c.target.value)||1),placeholder:"Enter story points",required:!0})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"epic",children:"Epic"}),(0,Fs.jsxs)(Ee,{value:s.epicId,onValueChange:c=>m("epicId",c),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{placeholder:"Select Xs epic"})}),(0,Fs.jsx)(Re,{children:o.map(c=>(0,Fs.jsx)($,{value:c.id,children:(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.name]})},c.id))})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Fs.jsxs)(Ee,{value:s.sprintId,onValueChange:c=>m("sprintId",c),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{placeholder:"Select a sprint"})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"none",children:"No Sprint"}),r.map(c=>(0,Fs.jsx)($,{value:c.id,children:(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[c.name,c.isActive&&(0,Fs.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},c.id))]})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"assignee",children:"Assignee"}),(0,Fs.jsx)(U,{id:"assignee",value:s.assignee,onChange:c=>m("assignee",c.target.value),placeholder:"Enter assignee name",required:!0})]}),(0,Fs.jsxs)(To,{children:[(0,Fs.jsx)(b,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Fs.jsx)(b,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var is=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:i="",disabled:s=!1})=>{let[l,d]=(0,ai.useState)(!1),[m,c]=(0,ai.useState)(""),v=()=>{s||(d(!0),c(t))},u=async()=>{m!==t&&await r(e,m),d(!1)},f=y=>{y.key==="Enter"&&!o||y.key==="Enter"&&y.ctrlKey&&o?u():y.key==="Escape"&&(d(!1),c(""))};return(0,Fs.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,Fs.jsx)(A,{children:a}),l?o?(0,Fs.jsx)(ze,{value:m,onChange:y=>c(y.target.value),onBlur:u,onKeyDown:f,autoFocus:!0,rows:4,className:"resize-none"}):(0,Fs.jsx)(U,{value:m,onChange:y=>c(y.target.value),onBlur:u,onKeyPress:f,autoFocus:!0,className:"text-lg font-medium"}):(0,Fs.jsxs)("div",{onClick:v,className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 Fs-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,Fs.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!s&&(0,Fs.jsx)(en.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Sl=({comments:e,onAddComment:t})=>{let[a,o]=(0,ai.useState)(""),r=s=>s.split(" ").map(l=>l[0]).join("").toUpperCase(),i=()=>{a.trim()&&(t(a),o(""))};return(0,Fs.jsxs)("div",{className:"space-y-4",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)(en.MessageSquare,{className:"h-5 w-5"}),(0,Fs.jsx)(A,{className:"text-lg font-medium",children:"Comments"}),(0,Fs.jsx)(Q,{variant:"secondary",children:e.length})]}),(0,Fs.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(s=>(0,Fs.jsxs)("div",{className:"flex gap-3 Fs-3 bg-muted/50 rounded-lg",children:[(0,Fs.jsx)(At,{className:"h-8 w-8 mt-1",children:(0,Fs.jsx)(It,{className:"text-xs bg-muted text-muted-foreground",children:r(s.author)})}),(0,Fs.jsxs)("div",{className:"flex-1",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Fs.jsx)("span",{className:"font-medium text-sm",children:s.author}),(0,Fs.jsxs)("span",{className:"text-xs text-muted-foreground",children:[s.createdAt.toLocaleDateString()," en ",s.createdAt.toLocaleTimeString()]})]}),(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground",children:s.text})]})]},s.id))}),(0,Fs.jsxs)("div",{className:"flex gap-2",children:[(0,Fs.jsx)(ze,{value:a,onChange:s=>o(s.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Fs.jsx)(b,{onClick:i,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Fs.jsx)(en.Send,{className:"h-4 w-4"})})]})]})};var $i=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:i=!1})=>{let[s,l]=(0,ai.useState)(!1),d=o.find(c=>c.value===t);return(0,Fs.jsxs)("div",{className:"space-y-1",children:[(0,Fs.jsx)(A,{className:"text-xs text-muted-foreground",children:e}),(0,Fs.jsxs)(Ee,{value:t,onValueChange:a,open:s,onOpenChange:c=>{i||l(c)},disabled:i,children:[(0,Fs.jsx)(Pe,{className:"h-auto Fs-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Fs.jsxs)(Q,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&l(!s),children:[r&&d?.color&&(0,Fs.jsx)("div",{className:`w-2 h-2 rounded-full ${d.color} mr-1`}),d?.label||"Select..."]})}),(0,Fs.jsx)(Re,{children:o.map(c=>(0,Fs.jsx)($,{value:c.value,children:r&&c.color?(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.label]}):c.label},c.value))})]})]})};var _c=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:en.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:en.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:en.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:en.Zap}],Kc=[{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"}],$c=[{value:"John Doe",label:"John Doe"},{value:"Jane Smith",label:"Jane Smith"},{value:"Bob Wilson",label:"Bob Wilson"},{value:"Alice Johnson",label:"Alice Johnson"},{value:"Carol Brown",label:"Carol Brown"},{value:"David Lee",label:"David Lee"},{value:"Emma Davis",label:"Emma Davis"},{value:"Frank Miller",label:"Frank Miller"},{value:"Grace Taylor",label:"Grace Taylor"},{value:"Unassigned",label:"Unassigned"}],kl=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:i,onDelete:s,isUpdating:l=!1,isDeleting:d=!1,deleteState:m="idle"})=>{let c=u=>u.split(" ").map(f=>f[0]).join("").toUpperCase(),v=()=>m==="loading"?(0,Fs.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Fs.jsx)(en.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):m==="success"?(0,Fs.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Fs.jsx)(en.Check,{className:"h-3 w-3"}),"Deleted"]}):m==="error"?(0,Fs.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Fs.jsx)(en.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Fs.jsxs)(b,{onClick:s,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:l||d,children:[(0,Fs.jsx)(en.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Fs.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Fs.jsxs)("div",{className:"space-y-4",style:{opacity:l?.6:1},children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Fs.jsx)($i,{label:"",value:e.status,onValueChange:u=>r("status",u),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"In Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Fs.jsx)(za,{type:"single",value:e.type,onValueChange:u=>u&&r("type",u),className:"grid grid-cols-2 gap-1",disabled:l,children:_c.map(u=>{let f=u.icon;return(0,Fs.jsxs)(Ha,{value:u.value,className:"flex items-center gap-1 text-xs h-8 data-[state=Fs]:bg-primary data-[state=Fs]:text-primary-foreground",size:"sm",disabled:l,children:[(0,Fs.jsx)(f,{className:"h-3 w-3"}),u.label]},u.value)})})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Fs.jsx)(za,{type:"single",value:e.priority,onValueChange:u=>u&&r("priority",u),className:"grid grid-cols-3 gap-1",disabled:l,children:Kc.map(u=>(0,Fs.jsx)(Ha,{value:u.value,className:"text-xs h-8 data-[state=Fs]:bg-primary data-[state=Fs]:text-primary-foreground",size:"sm",disabled:l,children:u.label},u.value))})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Fs.jsx)("input",{type:"number",min:"1",max:"100",value:e.points||1,onChange:u=>r("points",u.target.value),className:"w-full h-8 px-2 text-xs border border-border rounded-md focus:outline-none focus:ring-2 focus:ring-ring focus:border-transparent bg-background text-foreground disabled:opacity-50 disabled:cursor-not-allowed",disabled:l})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Fs.jsx)($i,{label:"",value:e.epicId,onValueChange:u=>r("epicId",u),options:(t||[]).map(u=>({value:u.id,label:u.name,color:u.color})),showColor:!0,disabled:l})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Fs.jsx)($i,{label:"",value:e.sprintId||"none",onValueChange:u=>r("sprintId",u==="none"?"":u),options:[{value:"none",label:"No Sprint"},...(a||[]).map(u=>({value:u.id,label:`${u.name}${u.isActive?" (Active)":""}`}))],disabled:l})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Fs.jsx)(Mi,{label:"",value:e.assignee,onValueChange:u=>r("assignee",u),options:$c,placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,Fs.jsxs)("div",{className:"mt-auto Fs-4 space-y-4",children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(b,{onClick:i,variant:"outline",className:"w-full h-8 text-xs",disabled:l||d,children:"Close"}),v()]}),(0,Fs.jsxs)("div",{className:"Fs-4 border-t border-border space-y-2",children:[(0,Fs.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Fs.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Fs.jsx)(en.User,{className:"h-3 w-3"}),(0,Fs.jsx)("span",{children:"System"})]})]}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Fs.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Fs.jsx)(en.Calendar,{className:"h-3 w-3"}),(0,Fs.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Fs.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Fs.jsx)(en.Clock,{className:"h-3 w-3"}),(0,Fs.jsxs)("span",{children:[o.toLocaleDateString()," en ",o.toLocaleTimeString()]})]})]})]})]})]})};var Wi=({isOpen:e,onClose:t,task:a,epics:o,sprints:r,onUpdateTask:i,onDeleteTask:s})=>{let[l,d]=(0,ai.useState)(new Date),[m,c]=(0,ai.useState)("idle"),[v,u]=(0,ai.useState)("idle"),[f,y]=(0,ai.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working Fs the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),I=async(X,ie)=>{if(ie!==a[X]){c("loading");try{await i(a.id,{[X]:ie}),d(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},h=async(X,ie)=>{if(ie!==a[X]){c("loading");try{await i(a.id,{[X]:ie}),d(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},x=X=>{let ie={id:Date.now().toString(),text:X,author:"Current User",createdAt:new Date};y([...f,ie])},C=async()=>{u("loading");try{await s(a.id),u("success"),setTimeout(()=>{t(),u("idle")},1e3)}catch{u("error"),setTimeout(()=>u("idle"),3e3)}},M=m!=="loading"&&v!=="loading",H=()=>{M&&t()},ae=()=>m==="loading"?(0,Fs.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Fs.jsx)(en.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Fs.jsx)("span",{children:"Updating..."})]}):m==="success"?(0,Fs.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Fs.jsx)(en.Check,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{children:"Updated successfully"})]}):m==="error"?(0,Fs.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Fs.jsx)(en.X,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{children:"Update failed"})]}):null;return(0,Fs.jsx)(xt,{open:e,onOpenChange:H,children:(0,Fs.jsxs)(ft,{className:"max-w-3xl max-h-[80vh] overflow-y-auto Fs-4",children:[(0,Fs.jsxs)(vt,{children:[(0,Fs.jsx)(bt,{className:"sr-only",children:a.title}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)("div",{className:"flex-1",children:ae()}),!M&&(0,Fs.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Fs.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Fs.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Fs.jsx)(is,{fieldName:"title",value:a.title,label:"",onSave:I,className:"border-b border-border pb-3",disabled:m==="loading"}),(0,Fs.jsx)(is,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:I,disabled:m==="loading"}),(0,Fs.jsx)(Sl,{comments:f,onAddComment:x})]}),(0,Fs.jsx)(kl,{task:a,epics:o,sprints:r,lastUpdated:l,onUpdateTask:h,onClose:H,onDelete:C,isUpdating:m==="loading",isDeleting:v==="loading",deleteState:v})]})]})})};var Ji=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,ai.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}),i=["bg-blue-500","bg-green-500","bg-purple-500","bg-orange-500","bg-red-500","bg-yellow-500","bg-pink-500","bg-indigo-500"],s=[{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}],l=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],d=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:new Date(o.startDate),endDate:new Date(o.endDate),progress:o.progress,isSelected:!0}),r({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}),t())},m=(c,v)=>{r(u=>({...u,[c]:v}))};return(0,Fs.jsx)(xt,{open:e,onOpenChange:t,children:(0,Fs.jsxs)(ft,{className:"sm:max-w-md",children:[(0,Fs.jsx)(vt,{children:(0,Fs.jsx)(bt,{children:"Add New Epic"})}),(0,Fs.jsxs)("form",{onSubmit:d,className:"space-y-4",children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"name",children:"Epic Name"}),(0,Fs.jsx)(U,{id:"name",value:o.name,onChange:c=>m("name",c.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Fs.jsx)(ze,{id:"description",value:o.description,onChange:c=>m("description",c.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"Color"}),(0,Fs.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(c=>(0,Fs.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,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"Confidence"}),(0,Fs.jsxs)(Ee,{value:o.confidence,onValueChange:c=>m("confidence",c),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{})}),(0,Fs.jsx)(Re,{children:s.map(c=>(0,Fs.jsx)($,{value:c.value,children:c.label},c.value))})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"Phase"}),(0,Fs.jsxs)(Ee,{value:o.phase.toString(),onValueChange:c=>m("phase",parseInt(c)),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{})}),(0,Fs.jsx)(Re,{children:l.map(c=>(0,Fs.jsx)($,{value:c.value.toString(),children:c.label},c.value))})]})]})]}),(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"Start Date"}),(0,Fs.jsx)(U,{type:"date",value:o.startDate,onChange:c=>m("startDate",c.target.value)})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"End Date"}),(0,Fs.jsx)(U,{type:"date",value:o.endDate,onChange:c=>m("endDate",c.target.value)})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"Progress (%)"}),(0,Fs.jsx)(U,{type:"number",min:"0",max:"100",value:o.progress,onChange:c=>m("progress",parseInt(c.target.value)||0)})]}),(0,Fs.jsxs)(To,{children:[(0,Fs.jsx)(b,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Fs.jsx)(b,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var Pl=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialProjects:o=[],onAddTask:r,onUpdateTask:i,onDeleteTask:s,onTaskClick:l,onAddEpic:d})=>{let[m,c]=(0,ai.useState)(e),[v,u]=(0,ai.useState)(t),[f,y]=(0,ai.useState)(a),[I,h]=(0,ai.useState)(!1),[x,C]=(0,ai.useState)(!1),[M,H]=(0,ai.useState)(null),[ae,X]=(0,ai.useState)(null),ie=v.filter(j=>j.isSelected).map(j=>j.id),N=f.find(j=>j.isSelected),T=m.filter(j=>{let re=ie.includes(j.epicId);return!N||N.id==="all-tasks"?re:N.id==="backlog"?re&&!j.sprintId:re&&j.sprintId===N.id}),V=j=>T.filter(re=>re.status===j),ge=j=>{let re={};return v.forEach(De=>{re[De.id]=j.filter(gt=>gt.epicId===De.id)}),re},F=j=>{X(j)},k=j=>{ae&&(c(re=>re.map(De=>De.id===ae.id?{...De,status:j}:De)),i?.(ae.id,{status:j}),X(null))},w=j=>{let re={...j,id:Date.now().toString(),createdAt:new Date};c(De=>[...De,re]),r?.(j)},oe=async(j,re)=>{c(De=>De.map(gt=>gt.id===j?{...gt,...re}:gt)),i&&await i(j,re)},Se=async j=>{c(re=>re.filter(De=>De.id!==j)),M?.id===j&&H(null),s&&await s(j)},Ze=j=>{let re={...j,id:Date.now().toString(),isSelected:!0};u(De=>[...De,re]),d?.(j)},Ae=j=>{H(j),l?.(j)};return(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsx)(Ke,{title:"Project Board",description:"Manage tasks and track progress across your project sprints.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"Add task",onClick:()=>h(!0)},secondaryAction:{label:"Add epic",onClick:()=>C(!0)}}),(0,Fs.jsx)("div",{className:"flex-1",children:(0,Fs.jsxs)("div",{className:"w-full",children:[(0,Fs.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6",children:[{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"}].map(j=>{let re=V(j.status),De=ge(re);return(0,Fs.jsx)(bl,{title:j.title,status:j.status,taskCount:re.length,onDrop:k,isCompact:j.status==="done",children:ie.map(gt=>{let Ft=v.find(Ye=>Ye.id===gt),P=De[gt]||[];return P.length===0?null:(0,Fs.jsxs)("div",{className:"mb-6",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Fs.jsx)("div",{className:`w-3 h-3 rounded-full ${Ft?.color}`}),(0,Fs.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:Ft?.name}),(0,Fs.jsx)(Q,{variant:"secondary",className:"text-xs",children:P.length})]})," ",(0,Fs.jsx)("div",{className:"space-y-3",children:P.map(Ye=>(0,Fs.jsx)(Vi,{task:Ye,epic:Ft,onDragStart:F,onTaskClick:Ae,isCompact:j.status==="done"},Ye.id))})]},gt)})},j.id)})}),(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsx)(_i,{isOpen:I,onClose:()=>h(!1),onAddTask:w,epics:v,sprints:f}),(0,Fs.jsx)(Ji,{isOpen:x,onClose:()=>C(!1),onAddEpic:Ze}),M&&(0,Fs.jsx)(Wi,{isOpen:!!M,onClose:()=>H(null),task:M,epics:v,sprints:f,onUpdateTask:oe,onDeleteTask:Se})]})]})})]})};var Rl=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:i,onAddEpic:s,onUpdateEpic:l,onDeleteEpic:d})=>{let[m,c]=(0,ai.useState)(null),[v,u]=(0,ai.useState)(null),[f,y]=(0,ai.useState)({}),I=T=>{c(T)},h=T=>{T.preventDefault()},x=(T,V)=>{T.preventDefault(),m&&m.epicId!==V&&(o(m.id,{epicId:V}),c(null))},C=T=>e.filter(V=>V.epicId===T),M=T=>{u(T.id),y({name:T.name,description:T.description,confidence:T.confidence,phase:T.phase,progress:T.progress})},H=()=>{v&&f.name&&(l(v,f),u(null),y({}))},ae=()=>{u(null),y({})},X=T=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&d(T)},ie=T=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[T]||`Phase ${T}`,N=T=>{switch(T){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,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsx)(Ke,{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:s}}),(0,Fs.jsx)("div",{className:"flex-1",children:(0,Fs.jsx)("div",{className:"w-full",children:(0,Fs.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 Xs:grid-cols-4 gap-6",children:t.map(T=>{let V=C(T.id),ge=V.reduce((F,k)=>F+k.points,0);return(0,Fs.jsxs)(O,{className:`flex flex-col ${v===T.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:h,onDrop:F=>x(F,T.id),children:[(0,Fs.jsx)("div",{className:"Fs-4 border-b border-border",children:v===T.id?(0,Fs.jsxs)("div",{className:"space-y-4",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Fs.jsx)(U,{value:f.name||"",onChange:F=>y({...f,name:F.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Fs.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:H,className:"Fs-1 h-8 w-8",children:(0,Fs.jsx)(en.Check,{className:"h-4 w-4"})}),(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:ae,className:"Fs-1 h-8 w-8",children:(0,Fs.jsx)(en.X,{className:"h-4 w-4"})})]})]}),(0,Fs.jsx)(ze,{value:f.description||"",onChange:F=>y({...f,description:F.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Fs.jsxs)(Ee,{value:f.confidence||T.confidence,onValueChange:F=>y({...f,confidence:F}),children:[(0,Fs.jsx)(Pe,{className:"text-xs",children:(0,Fs.jsx)(He,{})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"low",children:"Low"}),(0,Fs.jsx)($,{value:"medium",children:"Medium"}),(0,Fs.jsx)($,{value:"high",children:"High"})]})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Fs.jsxs)(Ee,{value:f.phase?.toString()||T.phase.toString(),onValueChange:F=>y({...f,phase:parseInt(F)}),children:[(0,Fs.jsx)(Pe,{className:"text-xs",children:(0,Fs.jsx)(He,{})}),(0,Fs.jsx)(Re,{children:[1,2,3,4,5,6,7,8,9].map(F=>(0,Fs.jsxs)($,{value:F.toString(),children:["Phase ",F]},F))})]})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,Fs.jsx)(U,{type:"number",min:"0",max:"100",value:f.progress||T.progress,onChange:F=>y({...f,progress:parseInt(F.target.value)||0}),className:"text-xs"})]})]}):(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Fs.jsx)("div",{className:`w-4 h-4 rounded-full ${T.color}`}),(0,Fs.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:T.name}),(0,Fs.jsxs)("div",{className:"flex gap-1",children:[(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>M(T),className:"Fs-1 h-8 w-8",children:(0,Fs.jsx)(en.Edit2,{className:"h-3 w-3"})}),(0,Fs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>X(T.id),className:"Fs-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Fs.jsx)(en.Trash2,{className:"h-3 w-3"})})]})]}),(0,Fs.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Fs.jsxs)(Q,{className:`text-xs ${N(T.confidence)}`,children:[T.confidence," confidence"]}),(0,Fs.jsxs)(Q,{variant:"outline",className:"text-xs",children:["Phase ",T.phase]}),(0,Fs.jsxs)(Q,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[V.length," tasks"]}),(0,Fs.jsxs)(Q,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ge," pts"]})]}),T.description&&(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground mb-3 select-none",children:T.description}),(0,Fs.jsxs)("div",{className:"mb-3",children:[(0,Fs.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,Fs.jsx)("span",{className:"select-none",children:"Progress"}),(0,Fs.jsxs)("span",{className:"select-none",children:[T.progress,"%"]})]}),(0,Fs.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,Fs.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${T.progress}%`}})})]}),(0,Fs.jsxs)(b,{onClick:()=>i(T.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Fs.jsx)(en.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Fs.jsx)("div",{className:"flex-1 Fs-4 overflow-y-auto",children:(0,Fs.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded Fs-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:V.length===0?(0,Fs.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,Fs.jsx)(en.Move,{className:"h-8 w-8 mb-2"}),(0,Fs.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):V.map(F=>(0,Fs.jsx)(Vi,{task:F,epic:T,onDragStart:I,onTaskClick:r,isCompact:!0},F.id))})})]},T.id)})})})})]})};var Al=require("react-day-picker");function Xi({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Fs.jsx)(Al.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:g("Fs-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 Fs-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:g(oi({variant:"outline"}),"h-7 w-7 bg-transparent Fs-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:g("relative Fs-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-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:g(oi({variant:"ghost"}),"h-8 w-8 Fs-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})}Xi.displayName="Calendar";var Ml=le(require("react")),Zt=le(require("@radix-ui/react-popover"));var ss=Zt.Root,ns=Zt.Trigger;var Yi=Ml.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Fs.jsx)(Zt.Portal,{children:(0,Fs.jsx)(Zt.Content,{ref:r,align:t,sideOffset:a,className:g("z-50 w-72 rounded-md border bg-popover Fs-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})}));Yi.displayName=Zt.Content.displayName;var ds=require("date-fns");var Bl=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,ai.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),i=l=>{l.preventDefault(),!(!o.name||!o.startDate||!o.endDate)&&(a({name:o.name,description:o.description,startDate:o.startDate,endDate:o.endDate,isActive:o.isActive,isSelected:!1}),r({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t())},s=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,Fs.jsx)(xt,{open:e,onOpenChange:s,children:(0,Fs.jsxs)(ft,{className:"sm:max-w-md",children:[(0,Fs.jsx)(vt,{children:(0,Fs.jsx)(bt,{children:"Add New Sprint"})}),(0,Fs.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"name",children:"Sprint Name *"}),(0,Fs.jsx)(U,{id:"name",value:o.name,onChange:l=>r(d=>({...d,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Fs.jsx)(ze,{id:"description",value:o.description,onChange:l=>r(d=>({...d,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"Start Date *"}),(0,Fs.jsxs)(ss,{children:[(0,Fs.jsx)(ns,{asChild:!0,children:(0,Fs.jsxs)(b,{variant:"outline",className:g("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Fs.jsx)(en.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,ds.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Fs.jsx)(Yi,{className:"w-auto Fs-0",align:"start",children:(0,Fs.jsx)(Xi,{mode:"single",selected:o.startDate,onSelect:l=>r(d=>({...d,startDate:l})),initialFocus:!0})})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{children:"End Date *"}),(0,Fs.jsxs)(ss,{children:[(0,Fs.jsx)(ns,{asChild:!0,children:(0,Fs.jsxs)(b,{variant:"outline",className:g("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Fs.jsx)(en.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,ds.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Fs.jsx)(Yi,{className:"w-auto Fs-0",align:"start",children:(0,Fs.jsx)(Xi,{mode:"single",selected:o.endDate,onSelect:l=>r(d=>({...d,endDate:l})),initialFocus:!0,disabled:l=>o.startDate?l<o.startDate:!1})})]})]})]}),(0,Fs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Fs.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:l=>r(d=>({...d,isActive:l.target.checked})),className:"rounded border-gray-300"}),(0,Fs.jsx)(A,{htmlFor:"isActive",children:"Set as active sprint"})]}),(0,Fs.jsxs)("div",{className:"flex justify-end gap-3 Fs-4",children:[(0,Fs.jsx)(b,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,Fs.jsx)(b,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Fl=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:i})=>{let[s,l]=(0,ai.useState)(["2"]),[d,m]=(0,ai.useState)(null),[c,v]=(0,ai.useState)(!1),[u,f]=(0,ai.useState)(null),y=e.filter(k=>!k.sprintId),I=e.filter(k=>k.sprintId&&s.includes(k.sprintId)),h=[...a].filter(k=>k.id!=="backlog"&&k.id!=="all-tasks").sort((k,w)=>k.startDate.getTime()-w.startDate.getTime()),x=k=>t.find(w=>w.id===k),C=k=>a.find(w=>w.id===k),M=k=>{switch(k){case"high":return"bg-destructive/20 text-destructive";case"medium":return"bg-warning/20 text-warning";case"low":return"bg-success/20 text-success";default:return"bg-muted text-muted-foreground"}},H=k=>k.split(" ").map(w=>w[0]).join("").toUpperCase(),ae=k=>{m(k)},X=k=>{k.preventDefault()},ie=k=>{f(k)},N=()=>{f(null)},T=(k,w)=>{k.preventDefault(),f(null),d&&(o(d.id,{sprintId:w==="backlog"?void 0:w}),m(null))},V=k=>{k==="backlog"||k==="all-tasks"||l(w=>w.includes(k)?w.filter(oe=>oe!==k):[...w,k])},ge=k=>{i(k),v(!1)},F=({task:k,showSprint:w=!1})=>{let oe=x(k.epicId),Se=k.sprintId?C(k.sprintId):null,[Ze,Ae]=(0,ai.useState)(!1),et=De=>{De.defaultPrevented||Ze||r(k)},j=De=>{Ae(!0),ae(k)},re=()=>{Ae(!1)};return(0,Fs.jsx)(O,{className:`Fs-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${Ze?"opacity-50 shadow-lg scale-105":""} ${d?.id===k.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:j,onDragEnd:re,onClick:et,children:(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Fs.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:k.title}),(0,Fs.jsx)(Q,{className:`text-xs select-none pointer-events-none ${M(k.priority)}`,children:k.priority[0].toUpperCase()})]}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-xs pointer-events-none",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-1",children:[oe&&(0,Fs.jsx)("div",{className:`w-2 h-2 rounded-full ${oe.color}`}),(0,Fs.jsx)("span",{className:"text-muted-foreground truncate select-none",children:oe?.name})]}),(0,Fs.jsx)("span",{className:"text-muted-foreground select-none",children:H(k.assignee)})]}),w&&Se&&(0,Fs.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[(0,Fs.jsx)(en.Calendar,{className:"h-3 w-3"}),(0,Fs.jsx)("span",{className:"select-none",children:Se.name})]})]})})};return(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsx)(Ke,{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:()=>v(!0)}}),(0,Fs.jsx)("div",{className:"flex-1",children:(0,Fs.jsxs)("div",{className:"w-full",children:[(0,Fs.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,Fs.jsx)("div",{className:"lg:col-span-1",children:(0,Fs.jsxs)(O,{className:"Fs-4 h-full bg-card shadow-sm",onDragOver:X,onDragEnter:()=>ie("backlog"),onDragLeave:N,onDrop:k=>T(k,"backlog"),children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Fs.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,Fs.jsx)(Q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:y.length})]}),(0,Fs.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded Fs-3 transition-colors ${u==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[y.map(k=>(0,Fs.jsx)(F,{task:k},k.id)),y.length===0&&(0,Fs.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"})]})]})}),(0,Fs.jsx)("div",{className:"lg:col-span-3",children:(0,Fs.jsxs)("div",{className:"space-y-4",children:[(0,Fs.jsxs)(O,{className:"Fs-4 bg-card shadow-sm",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Fs.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),(0,Fs.jsxs)(b,{onClick:()=>v(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,Fs.jsx)(en.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,Fs.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:h.map(k=>(0,Fs.jsxs)(b,{variant:s.includes(k.id)?"default":"outline",size:"sm",onClick:()=>V(k.id),className:"text-xs h-8",children:[k.name,k.isActive&&(0,Fs.jsx)("span",{className:"ml-1 text-success",children:"\u25CF"})]},k.id))})]}),(0,Fs.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map(k=>h.find(w=>w.id===k)).filter(Boolean).sort((k,w)=>k.startDate.getTime()-w.startDate.getTime()).map(k=>{let w=I.filter(oe=>oe.sprintId===k.id);return(0,Fs.jsxs)(O,{className:"Fs-4 bg-card shadow-sm",onDragOver:X,onDragEnter:()=>ie(k.id),onDragLeave:N,onDrop:oe=>T(oe,k.id),children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("h3",{className:"font-semibold text-foreground select-none",children:k.name}),k.isActive&&(0,Fs.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,Fs.jsx)(Q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:w.length})]}),(0,Fs.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded Fs-3 transition-colors ${u===k.id?"border-primary bg-primary/10":"border-border"}`,children:[w.map(oe=>(0,Fs.jsx)(F,{task:oe},oe.id)),w.length===0&&(0,Fs.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},k.id)})})," "]})})]}),(0,Fs.jsx)(Bl,{isOpen:c,onClose:()=>v(!1),onAddSprint:ge})]})})]})};var Wc=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},Jc=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),qc=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})},cs=(e,t)=>{let a=new Date,o=new Date(e);if(t){let[r,i]=t.split(":");o.setHours(parseInt(r),parseInt(i))}return o<a},ms=e=>{let t=new Date;return e.toDateString()===t.toDateString()},Xc=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},Yc=({colleagues:e,onAddReminder:t,trigger:a})=>{let[o,r]=(0,ai.useState)(!1),[i,s]=(0,ai.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""});return(0,Fs.jsxs)(xt,{open:o,onOpenChange:r,children:[(0,Fs.jsx)(nn,{asChild:!0,children:a}),(0,Fs.jsxs)(ft,{className:"max-w-2xl",children:[(0,Fs.jsx)(vt,{children:(0,Fs.jsx)(bt,{children:"Add New Reminder"})}),(0,Fs.jsxs)("form",{onSubmit:d=>{d.preventDefault();let m=e.find(v=>v.id===i.colleagueId);if(!m)return;let c={title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:m,isCompleted:!1,isRecurring:i.isRecurring,recurrencePattern:i.isRecurring?i.recurrencePattern:void 0,recurrenceInterval:i.isRecurring?i.recurrenceInterval:void 0,priority:i.priority,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderEnabled?i.reminderMinutes:void 0,tags:i.tags?i.tags.split(",").map(v=>v.trim()):void 0};t(c),r(!1),s({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})},className:"space-y-4",children:[(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"title",children:"Title"}),(0,Fs.jsx)(U,{id:"title",value:i.title,onChange:d=>s({...i,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"priority",children:"Priority"}),(0,Fs.jsxs)(Ee,{value:i.priority,onValueChange:d=>s({...i,priority:d}),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"low",children:"\u{1F7E2} Low"}),(0,Fs.jsx)($,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Fs.jsx)($,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Fs.jsx)(ze,{id:"description",value:i.description,onChange:d=>s({...i,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"dueDate",children:"Due Date"}),(0,Fs.jsx)(U,{id:"dueDate",type:"date",value:i.dueDate,onChange:d=>s({...i,dueDate:d.target.value}),required:!0})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Fs.jsx)(U,{id:"dueTime",type:"time",value:i.dueTime,onChange:d=>s({...i,dueTime:d.target.value})})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"colleague",children:"Assigned Colleague"}),(0,Fs.jsxs)(Ee,{value:i.colleagueId,onValueChange:d=>s({...i,colleagueId:d}),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{placeholder:"Select a digital colleague"})}),(0,Fs.jsx)(Re,{children:e.map(d=>(0,Fs.jsx)($,{value:d.id,children:d.name},d.id))})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Fs.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:d=>s({...i,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Fs.jsx)(A,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Fs.jsxs)(Ee,{value:i.recurrencePattern,onValueChange:d=>s({...i,recurrencePattern:d}),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"daily",children:"Daily"}),(0,Fs.jsx)($,{value:"weekly",children:"Weekly"}),(0,Fs.jsx)($,{value:"monthly",children:"Monthly"}),(0,Fs.jsx)($,{value:"yearly",children:"Yearly"})]})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Fs.jsx)(U,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:d=>s({...i,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Fs.jsx)("input",{type:"checkbox",id:"reminderEnabled",checked:i.reminderEnabled,onChange:d=>s({...i,reminderEnabled:d.target.checked}),className:"rounded border-border"}),(0,Fs.jsx)(A,{htmlFor:"reminderEnabled",children:"Enable reminder notifications"})]}),i.reminderEnabled&&(0,Fs.jsxs)("div",{className:"pl-6",children:[(0,Fs.jsx)(A,{htmlFor:"reminderMinutes",children:"Remind Fs"}),(0,Fs.jsxs)(Ee,{value:i.reminderMinutes.toString(),onValueChange:d=>s({...i,reminderMinutes:parseInt(d)}),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"5",children:"5 minutes before"}),(0,Fs.jsx)($,{value:"15",children:"15 minutes before"}),(0,Fs.jsx)($,{value:"30",children:"30 minutes before"}),(0,Fs.jsx)($,{value:"60",children:"1 hour before"}),(0,Fs.jsx)($,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"tags",children:"Tags (comma-separated)"}),(0,Fs.jsx)(U,{id:"tags",value:i.tags,onChange:d=>s({...i,tags:d.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Fs.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Fs.jsx)(b,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),(0,Fs.jsx)(b,{type:"submit",children:"Add Reminder"})]})]})]})]})},Qc=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[i,s]=(0,ai.useState)({title:e.title,description:e.description,dueDate:e.dueDate.toISOString().split("T")[0],dueTime:e.dueTime||"",colleagueId:e.colleague.id,priority:e.priority,isRecurring:e.isRecurring,recurrencePattern:e.recurrencePattern||"weekly",recurrenceInterval:e.recurrenceInterval||1,reminderEnabled:e.reminderEnabled,reminderMinutes:e.reminderMinutes||15,tags:e.tags?.join(", ")||""});return(0,Fs.jsx)(xt,{open:o,onOpenChange:r,children:(0,Fs.jsxs)(ft,{className:"max-w-2xl",children:[(0,Fs.jsx)(vt,{children:(0,Fs.jsx)(bt,{children:"Edit Reminder"})}),(0,Fs.jsxs)("form",{onSubmit:d=>{d.preventDefault();let m=t.find(v=>v.id===i.colleagueId);if(!m)return;let c={title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:m,isRecurring:i.isRecurring,recurrencePattern:i.isRecurring?i.recurrencePattern:void 0,recurrenceInterval:i.isRecurring?i.recurrenceInterval:void 0,priority:i.priority,reminderEnabled:i.reminderEnabled,reminderMinutes:i.reminderEnabled?i.reminderMinutes:void 0,tags:i.tags?i.tags.split(",").map(v=>v.trim()):void 0};a(e.id,c),r()},className:"space-y-4",children:[(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"edit-title",children:"Title"}),(0,Fs.jsx)(U,{id:"edit-title",value:i.title,onChange:d=>s({...i,title:d.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"edit-priority",children:"Priority"}),(0,Fs.jsxs)(Ee,{value:i.priority,onValueChange:d=>s({...i,priority:d}),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"low",children:"\u{1F7E2} Low"}),(0,Fs.jsx)($,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Fs.jsx)($,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"edit-description",children:"Description"}),(0,Fs.jsx)(ze,{id:"edit-description",value:i.description,onChange:d=>s({...i,description:d.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Fs.jsx)(U,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:d=>s({...i,dueDate:d.target.value}),required:!0})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Fs.jsx)(U,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:d=>s({...i,dueTime:d.target.value})})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,Fs.jsxs)(Ee,{value:i.colleagueId,onValueChange:d=>s({...i,colleagueId:d}),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{placeholder:"Select a digital colleague"})}),(0,Fs.jsx)(Re,{children:t.map(d=>(0,Fs.jsx)($,{value:d.id,children:d.name},d.id))})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Fs.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring,onChange:d=>s({...i,isRecurring:d.target.checked}),className:"rounded border-border"}),(0,Fs.jsx)(A,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,Fs.jsxs)(Ee,{value:i.recurrencePattern,onValueChange:d=>s({...i,recurrencePattern:d}),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"daily",children:"Daily"}),(0,Fs.jsx)($,{value:"weekly",children:"Weekly"}),(0,Fs.jsx)($,{value:"monthly",children:"Monthly"}),(0,Fs.jsx)($,{value:"yearly",children:"Yearly"})]})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,Fs.jsx)(U,{id:"edit-recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:d=>s({...i,recurrenceInterval:parseInt(d.target.value)})})]})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Fs.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:i.reminderEnabled,onChange:d=>s({...i,reminderEnabled:d.target.checked}),className:"rounded border-border"}),(0,Fs.jsx)(A,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),i.reminderEnabled&&(0,Fs.jsxs)("div",{className:"pl-6",children:[(0,Fs.jsx)(A,{htmlFor:"edit-reminderMinutes",children:"Remind Fs"}),(0,Fs.jsxs)(Ee,{value:i.reminderMinutes.toString(),onValueChange:d=>s({...i,reminderMinutes:parseInt(d)}),children:[(0,Fs.jsx)(Pe,{children:(0,Fs.jsx)(He,{})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsx)($,{value:"5",children:"5 minutes before"}),(0,Fs.jsx)($,{value:"15",children:"15 minutes before"}),(0,Fs.jsx)($,{value:"30",children:"30 minutes before"}),(0,Fs.jsx)($,{value:"60",children:"1 hour before"}),(0,Fs.jsx)($,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)(A,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,Fs.jsx)(U,{id:"edit-tags",value:i.tags,onChange:d=>s({...i,tags:d.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Fs.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Fs.jsx)(b,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,Fs.jsx)(b,{type:"submit",children:"Save Changes"})]})]})]})})},Zc=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,i]=(0,ai.useState)(!1),s=cs(e.dueDate,e.dueTime),l=ms(e.dueDate),d=Xc(e.dueDate),m=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},c=()=>l?"Today":d?"Tomorrow":s&&!e.isCompleted?"Overdue":Jc(e.dueDate);return(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsx)(Qc,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>i(!1)}),(0,Fs.jsx)(O,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${s&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,Fs.jsx)(de,{className:"Fs-4",children:(0,Fs.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Fs.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Fs.jsx)("button",{onClick:m,className:"mt-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,Fs.jsx)(en.CheckCircle,{className:"h-5 w-5"}):(0,Fs.jsx)(en.Circle,{className:"h-5 w-5"})}),(0,Fs.jsxs)("div",{className:"flex-1",children:[(0,Fs.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,Fs.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,Fs.jsx)("span",{className:"text-sm",children:Wc(e.priority)}),e.isRecurring&&(0,Fs.jsx)(en.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,Fs.jsx)(en.Bell,{className:"h-4 w-4 text-success"})]}),(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Fs.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Fs.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Fs.jsx)(en.Calendar,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{className:s&&!e.isCompleted?"text-destructive font-medium":"",children:c()})]}),e.dueTime&&(0,Fs.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Fs.jsx)(en.Clock,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{children:qc(e.dueTime)})]}),(0,Fs.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Fs.jsx)(en.User,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{children:e.colleague.name})]})]}),e.tags&&e.tags.length>0&&(0,Fs.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:e.tags.map((v,u)=>(0,Fs.jsx)(Q,{variant:"secondary",className:"text-xs",children:v},u))})]})]}),(0,Fs.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Fs.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 w-8 Fs-0",children:(0,Fs.jsx)(en.Edit2,{className:"h-4 w-4"})}),(0,Fs.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 Fs-0 text-destructive hover:text-destructive/80",children:(0,Fs.jsx)(en.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Ll=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[i,s]=(0,ai.useState)(e),[l]=(0,ai.useState)(t),[d,m]=(0,ai.useState)("all"),[c,v]=(0,ai.useState)(""),u=C=>{let M={...C,id:Date.now().toString(),createdAt:new Date};s(H=>[...H,M]),a?.(C)},f=(C,M)=>{s(H=>H.map(ae=>ae.id===C?{...ae,...M}:ae)),o?.(C,M)},y=C=>{s(M=>M.filter(H=>H.id!==C)),r?.(C)},h=i.filter(C=>{if(c){let M=c.toLowerCase();if(!(C.title.toLowerCase().includes(M)||C.description.toLowerCase().includes(M)||C.colleague.name.toLowerCase().includes(M)||C.tags?.some(ae=>ae.toLowerCase().includes(M))))return!1}switch(d){case"pending":return!C.isCompleted;case"completed":return C.isCompleted;case"overdue":return!C.isCompleted&&cs(C.dueDate,C.dueTime);case"today":return ms(C.dueDate);default:return!0}}).sort((C,M)=>{if(C.isCompleted&&!M.isCompleted)return 1;if(!C.isCompleted&&M.isCompleted)return-1;let H={high:3,medium:2,low:1},ae=H[M.priority]-H[C.priority];return ae!==0?ae:C.dueDate.getTime()-M.dueDate.getTime()}),x={total:i.length,pending:i.filter(C=>!C.isCompleted).length,completed:i.filter(C=>C.isCompleted).length,overdue:i.filter(C=>!C.isCompleted&&cs(C.dueDate,C.dueTime)).length,today:i.filter(C=>ms(C.dueDate)).length};return(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsx)(Ke,{title:"Task Reminders",description:"Manage reminders and stay Fs 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:()=>{let C={title:"New Reminder",description:"Don't forget to complete this task",dueDate:new Date,dueTime:"09:00",colleague:l[0]||{id:"1",name:"Default Colleague",department:"General",role:"Team Member"},isCompleted:!1,isRecurring:!1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,tags:["reminder"]};u(C)}}}),(0,Fs.jsx)("div",{className:"h-full bg-background",children:(0,Fs.jsxs)("div",{className:"Fs-6",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Fs.jsxs)("div",{children:[(0,Fs.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Fs.jsx)(Yc,{colleagues:l,onAddReminder:u,trigger:(0,Fs.jsxs)(b,{className:"flex items-center space-x-2",children:[(0,Fs.jsx)(en.Plus,{className:"h-4 w-4"}),(0,Fs.jsx)("span",{children:"Add Reminder"})]})})]}),(0,Fs.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Fs.jsxs)(O,{className:"Fs-4",children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold text-foreground",children:x.total}),(0,Fs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Fs.jsxs)(O,{className:"Fs-4",children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold text-primary",children:x.pending}),(0,Fs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Fs.jsxs)(O,{className:"Fs-4",children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold text-success",children:x.completed}),(0,Fs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Fs.jsxs)(O,{className:"Fs-4",children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold text-destructive",children:x.overdue}),(0,Fs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Fs.jsxs)(O,{className:"Fs-4",children:[(0,Fs.jsx)("div",{className:"text-2xl font-bold text-warning",children:x.today}),(0,Fs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Fs.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Fs.jsx)("div",{className:"flex-1",children:(0,Fs.jsx)(U,{placeholder:"Search reminders...",value:c,onChange:C=>v(C.target.value),className:"max-w-md"})}),(0,Fs.jsxs)(Ee,{value:d,onValueChange:C=>m(C),children:[(0,Fs.jsx)(Pe,{className:"w-40",children:(0,Fs.jsx)(He,{})}),(0,Fs.jsxs)(Re,{children:[(0,Fs.jsxs)($,{value:"all",children:["All (",x.total,")"]}),(0,Fs.jsxs)($,{value:"pending",children:["Pending (",x.pending,")"]}),(0,Fs.jsxs)($,{value:"completed",children:["Completed (",x.completed,")"]}),(0,Fs.jsxs)($,{value:"overdue",children:["Overdue (",x.overdue,")"]}),(0,Fs.jsxs)($,{value:"today",children:["Today (",x.today,")"]})]})]})]}),(0,Fs.jsx)("div",{className:"space-y-4",children:h.length===0?(0,Fs.jsxs)(O,{className:"Fs-8 text-center",children:[(0,Fs.jsx)("div",{className:"text-muted-foreground",children:c||d!=="all"?"No reminders match your filters":"No reminders yet"}),!c&&d==="all"&&(0,Fs.jsx)("Fs",{className:"text-sm text-muted-foreground/60 mt-2",children:"Create your first reminder to get started"})]}):h.map(C=>(0,Fs.jsx)(Zc,{reminder:C,colleagues:l,onUpdateReminder:f,onDeleteReminder:y},C.id))})]})})]})};var jl=require("next/navigation");function ps({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:i=[],initialColleagues:s=[],initialFiles:l=[],onAddTask:d,onUpdateTask:m,onDeleteTask:c,onTaskClick:v,onAddEpic:u,onUpdateEpic:f,onDeleteEpic:y,onAddTaskToEpic:I,onAddSprint:h,onUpdateSprint:x,onDeleteSprint:C,onAddProject:M,onUpdateProject:H,onDeleteProject:ae,onFileAdd:X,onFileEdit:ie,onFileDelete:N,onFileClick:T,onAddReminder:V,onUpdateReminder:ge,onDeleteReminder:F,onViewChange:k,onToggleMobileMenu:w,onTeamClick:oe,onTeamChange:Se,onCopilotClick:Ze}){let[Ae,et]=(0,ai.useState)(t),[j,re]=(0,ai.useState)(a),[De,gt]=(0,ai.useState)(o),[Ft,P]=(0,ai.useState)(r),[Ye,Je]=(0,ai.useState)(i),[ka,Jo]=(0,ai.useState)(s),[fo,qo]=(0,ai.useState)(l),[tr,Xo]=(0,ai.useState)(!1),[ar,Yo]=(0,ai.useState)(!1),[Va,vo]=(0,ai.useState)(null),[Qo,bo]=(0,ai.useState)(null),[ho,S]=(0,ai.useState)(null),[E,ke]=(0,ai.useState)("kanban"),[Vl,Gl]=(0,ai.useState)(!1),bs=(0,jl.useRouter)(),_l=j.filter(D=>D.isSelected).map(D=>D.id),Zo=De.find(D=>D.isSelected),Kl=Ae.filter(D=>{let z=_l.includes(D.epicId);return!Zo||Zo.id==="all-tasks"?z:Zo.id==="backlog"?z&&!D.sprintId:z&&D.sprintId===Zo.id}),tm=D=>Kl.filter(z=>z.status===D),am=D=>{let z={};return j.forEach(ne=>{z[ne.id]=D.filter(Oe=>Oe.epicId===ne.id)}),z},om=D=>{S(D)},im=D=>{ho&&(et(z=>z.map(ne=>ne.id===ho.id?{...ne,status:D}:ne)),S(null))},hs=D=>{let z={...D,id:Date.now().toString(),createdAt:new Date};et(ne=>[...ne,z]),m?.(z.id,z)},ei=(D,z)=>{et(ne=>ne.map(Oe=>Oe.id===D?{...Oe,...z}:Oe)),m?.(D,z)},$l=async(D,z)=>{ei(D,z)},xs=D=>{et(z=>z.filter(ne=>ne.id!==D)),Va?.id===D&&vo(null)},Wl=async D=>{xs(D)},Jl=D=>{let z={...D,id:Date.now().toString(),isSelected:!1};P(ne=>[...ne,z]),M?.(D)},ql=(D,z)=>{P(ne=>ne.map(Oe=>Oe.id===D?z.isSelected?(bs.push(`/kanban/${D}`),{...Oe,...z}):{...Oe,...z}:z.isSelected&&D!==Oe.id?{...Oe,isSelected:!1}:Oe)),H?.(D,z)},Xl=D=>{P(z=>z.filter(ne=>ne.id!==D)),ae?.(D)},Yl=D=>{let z={...D,id:Date.now().toString(),isSelected:!0};re(ne=>[...ne,z])},or=()=>{Yo(!0)},ys=(D,z)=>{re(ne=>ne.map(Oe=>Oe.id===D?{...Oe,...z}:Oe)),f?.(D,z)},ws=D=>{re(z=>z.filter(ne=>ne.id!==D)),et(z=>z.filter(ne=>ne.epicId!==D)),y?.(D)},Ns=D=>{let z={...D,id:Date.now().toString(),isSelected:!1};gt(ne=>[...ne,z]),h?.(D)},Ql=(D,z)=>{gt(ne=>ne.map(Oe=>Oe.id===D?z.isSelected?{...Oe,...z}:{...Oe,...z}:z.isSelected&&D!==Oe.id?{...Oe,isSelected:!1}:Oe)),x?.(D,z)},Zl=D=>{D==="backlog"||D==="all-tasks"||(gt(z=>z.filter(ne=>ne.id!==D)),et(z=>z.map(ne=>ne.sprintId===D?{...ne,sprintId:void 0}:ne)),C?.(D))},ir=D=>{vo(D)},ed=D=>{D==="planning"&&window.innerWidth<768||ke(D)},td=()=>{Gl(D=>!D),w?.()},rm=()=>{bs.push("/")},sm=D=>{console.log("Switching to team:",D)},nm=D=>{console.log("Switching to team:",D)},ad=D=>{bo(D),Xo(!0)},od=()=>{Xo(!1),bo(null)},id=D=>{let z={...D,id:Date.now().toString(),createdAt:new Date};Je(ne=>[...ne,z]),V?.(D)},rd=(D,z)=>{Je(ne=>ne.map(Oe=>Oe.id===D?{...Oe,...z}:Oe)),ge?.(D,z)},sd=D=>{Je(z=>z.filter(ne=>ne.id!==D)),F?.(D)},nd=D=>{qo(z=>[...z,D]),X?.(D)},ld=D=>{ie?.(D)},dd=D=>{qo(z=>z.filter(ne=>ne.name!==D)),N?.(D)},cd=D=>{T?.(D)},lm=[{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"}],dm=()=>{switch(E){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"}},rr=[{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")}],cm=rr.sort((D,z)=>z.lastUsed.getTime()-D.lastUsed.getTime()).slice(0,3),mm=rr.length>3,pm=rr.slice(3);return(0,Fs.jsxs)(Ii,{projects:Ft,epics:j,sprints:De,currentView:E,onUpdateProject:ql,onDeleteProject:Xl,onAddProject:Jl,onUpdateEpic:ys,onDeleteEpic:ws,onAddEpic:or,onAddSprint:Ns,onUpdateSprint:Ql,onDeleteSprint:Zl,onViewChange:ed,mobileMenuOpen:Vl,onToggleMobileMenu:td,children:[E==="kanban"&&(0,Fs.jsx)("div",{className:"h-full",children:(0,Fs.jsx)(Pl,{initialProjects:Ft,initialEpics:j,initialSprints:De,initialTasks:Ae,onAddTask:hs,onUpdateTask:ei,onDeleteTask:xs,onTaskClick:ir,onAddEpic:or})}),E==="planning"&&(0,Fs.jsx)("div",{className:"hidden md:block h-full",children:(0,Fs.jsx)(Fl,{tasks:Ae,epics:j,sprints:De,onUpdateTask:ei,onTaskClick:ir,onAddSprint:Ns})}),E==="tasks"&&(0,Fs.jsx)("div",{className:"h-full",children:(0,Fs.jsx)(Ll,{initialReminders:Ye,initialColleagues:ka,onAddReminder:id,onUpdateReminder:rd,onDeleteReminder:sd})}),E==="files"&&(0,Fs.jsx)("div",{className:"h-full",children:(0,Fs.jsx)(Ko,{initialFiles:fo,onFileAdd:nd,onFileEdit:ld,onFileDelete:dd,onFileClick:cd,compactView:!1})}),E==="epics"&&(0,Fs.jsx)("div",{className:"h-full",children:(0,Fs.jsx)(Rl,{tasks:Ae,epics:j,sprints:De,onUpdateTask:ei,onTaskClick:ir,onAddTaskToEpic:ad,onAddEpic:or,onUpdateEpic:ys,onDeleteEpic:ws})}),(0,Fs.jsx)(_i,{isOpen:tr,onClose:od,onAddTask:hs,epics:j,sprints:De,defaultEpicId:Qo||void 0}),(0,Fs.jsx)(Ji,{isOpen:ar,onClose:()=>Yo(!1),onAddEpic:Yl}),Va&&(0,Fs.jsx)(Wi,{isOpen:!!Va,onClose:()=>vo(null),task:Va,onUpdateTask:$l,onDeleteTask:Wl,epics:j,sprints:De})]})}var Ol=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[i,s]=(0,ai.useState)({name:o?.name||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[l,d]=(0,ai.useState)({}),m=()=>{let u={};return i.name.trim()?i.name.trim().length<3&&(u.name="Project name must Fs en least 3 characters"):u.name="Project name is required",i.objectives.trim()?i.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (en least 10 characters)"):u.objectives="Project objectives are required",i.workInstructions.trim()?i.workInstructions.trim().length<20&&(u.workInstructions="Please provide more detailed work instructions (en least 20 characters)"):u.workInstructions="Work instructions are required",d(u),Object.keys(u).length===0},c=async u=>{if(u.preventDefault(),!!m())try{await e(i)}catch(f){console.error("Error submitting project form:",f)}},v=(u,f)=>{s(y=>({...y,[u]:f})),l[u]&&d(y=>({...y,[u]:void 0}))};return(0,Fs.jsxs)(O,{className:`w-full max-w-2xl ${r}`,children:[(0,Fs.jsxs)(Me,{children:[(0,Fs.jsxs)(Le,{className:"flex items-center gap-2",children:[(0,Fs.jsx)(en.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,Fs.jsx)(ra,{children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),(0,Fs.jsxs)("form",{onSubmit:c,children:[(0,Fs.jsxs)(de,{className:"space-y-6",children:[(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,Fs.jsx)(U,{id:"name",type:"text",placeholder:"Enter project name",value:i.name,onChange:u=>v("name",u.target.value),className:l.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),l.name&&(0,Fs.jsx)("Fs",{className:"text-sm text-red-600",children:l.name})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,Fs.jsx)(ze,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:i.objectives,onChange:u=>v("objectives",u.target.value),className:`min-h-[100px] resize-y ${l.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,Fs.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,Fs.jsx)("span",{children:l.objectives&&(0,Fs.jsx)("span",{className:"text-red-600",children:l.objectives})}),(0,Fs.jsxs)("span",{children:[i.objectives.length,"/1000"]})]})]}),(0,Fs.jsxs)("div",{className:"space-y-2",children:[(0,Fs.jsx)(A,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,Fs.jsx)(ze,{id:"workInstructions",placeholder:"Provide detailed instructions Fs how the work should Fs carried out, including processes, standards, and expectations...",value:i.workInstructions,onChange:u=>v("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${l.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,Fs.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,Fs.jsx)("span",{children:l.workInstructions&&(0,Fs.jsx)("span",{className:"text-red-600",children:l.workInstructions})}),(0,Fs.jsxs)("span",{children:[i.workInstructions.length,"/2000"]})]})]}),(0,Fs.jsxs)("div",{className:"space-y-3",children:[(0,Fs.jsx)(A,{className:"text-sm font-medium",children:"Project Management"}),(0,Fs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Fs.jsx)(Ao,{id:"plan",checked:i.plan,onCheckedChange:u=>v("plan",u===!0),disabled:a}),(0,Fs.jsx)(A,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,Fs.jsx)("Fs",{className:"text-xs text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),(0,Fs.jsxs)(sa,{className:"flex justify-end gap-3",children:[t&&(0,Fs.jsxs)(b,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,Fs.jsx)(en.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Fs.jsx)(b,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsx)(en.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,Fs.jsxs)(Fs.Fragment,{children:[(0,Fs.jsx)(en.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function fs({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,i]=(0,ai.useState)(!1),[s,l]=(0,ai.useState)(!1),d=async c=>{l(!0);try{await t(c),i(!1)}catch(v){console.error("Error creating project:",v)}finally{l(!1)}},m=()=>{i(!0)};return(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsx)(ba.AnimatePresence,{mode:"wait",children:(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Fs.jsx)(Ke,{title:"Project Management",description:"Organise your work into projects to collaborate with your team.",gradient:"bg-gradient-to-r from-purple-600 via-violet-600 to-indigo-600",primaryAction:{label:"New Project",onClick:m}}),(0,Fs.jsxs)("section",{className:"space-y-4 mt-8",children:[(0,Fs.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Fs.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,Fs.jsx)(ji,{project:c,onOpen:a,onShare:o},c.name))})]})]},"projects-index-view")}),(0,Fs.jsx)(xt,{open:r,onOpenChange:i,children:(0,Fs.jsxs)(ft,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Fs.jsxs)(vt,{className:"sr-only",children:[(0,Fs.jsx)(bt,{children:"Create New Project"}),(0,Fs.jsx)(Po,{children:"Fill out the form below to create a new project."})]}),(0,Fs.jsx)(Ol,{onSubmit:d,onCancel:()=>i(!1),isLoading:s,className:"border-0 shadow-none"})]})})]})}function Hl({team:e,onOpen:t,className:a}){return(0,Fs.jsx)(ba.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,Fs.jsxs)(O,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Fs.jsxs)(Me,{children:[(0,Fs.jsx)(Le,{className:"text-lg",children:e.name}),(0,Fs.jsx)(ra,{className:"mt-1 text-sm",children:e.description})]}),(0,Fs.jsxs)(de,{className:"space-y-4",children:[(0,Fs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)(en.Users,{className:"h-4 w-4 text-blue-500"}),(0,Fs.jsx)("span",{children:"Human"})]}),(0,Fs.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)(en.Bot,{className:"h-4 w-4 text-purple-500"}),(0,Fs.jsx)("span",{children:"Digital"})]}),(0,Fs.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Fs.jsxs)("div",{className:"flex items-center justify-between text-sm border-t Fs-4",children:[(0,Fs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Fs.jsx)(en.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,Fs.jsx)("span",{children:"Projects"})]}),(0,Fs.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Fs.jsx)(sa,{className:"flex gap-2",children:(0,Fs.jsx)(b,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function vs({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,ai.useState)(!1),i=()=>{r(!0),t?.()},s=l=>{a?.(l)};return(0,Fs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Fs.jsx)(ba.AnimatePresence,{mode:"wait",children:(0,Fs.jsxs)(ba.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Fs.jsx)(Ke,{title:"My Teams",description:"Collaborate with your human and digital colleagues across different teams and projects.",gradient:"bg-gradient-to-r from-blue-600 via-cyan-600 to-teal-600",primaryAction:{label:"Create Team",onClick:i}}),(0,Fs.jsxs)("section",{className:"space-y-4 mt-8",children:[(0,Fs.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Fs.jsxs)("div",{className:"text-center py-12",children:[(0,Fs.jsx)("Fs",{className:"text-muted-foreground text-lg",children:"You're not part of any teams yet."}),(0,Fs.jsx)("Fs",{className:"text-muted-foreground text-sm mt-2",children:"Create a new team or ask to Fs added to Xs existing one."})]}):(0,Fs.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(l=>(0,Fs.jsx)(Hl,{team:l,onOpen:s},l.id))})]})]},"teams-index-view")}),(0,Fs.jsx)(xt,{open:o,onOpenChange:r,children:(0,Fs.jsxs)(ft,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Fs.jsxs)(vt,{children:[(0,Fs.jsx)(bt,{children:"Create New Team"}),(0,Fs.jsx)(Po,{children:"Set up a new team to collaborate with colleagues Fs projects."})]}),(0,Fs.jsx)("div",{className:"Fs-6 text-center text-muted-foreground",children:(0,Fs.jsx)("Fs",{children:"Team creation form coming soon..."})})]})})]})}0&&(module.exports={AppSidebarLeft,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,DashboardHeader,DashboardPage,DigitalColleageusLayout,DigitalColleagueClone,DigitalColleagueOptions,FileView,KnowledgeView,MainPage,ManagementSidebar,ProjectView,ProjectsIndexView,SearchableSelect,TeamsIndexView});
|