cortex-react-components 2.3.0 → 2.4.1
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-N3B3XNV3.mjs → chunk-2BRDNDUB.mjs} +1 -1
- package/dist/{chunk-M7NV6EFH.mjs → chunk-3HNU2NYP.mjs} +1 -1
- package/dist/{chunk-FKU4VQR6.mjs → chunk-3NRXQBBS.mjs} +1 -1
- package/dist/chunk-553B5H2H.mjs +4 -0
- package/dist/{chunk-PK3OBSCB.mjs → chunk-5MWZTJYP.mjs} +1 -1
- package/dist/{chunk-B7AXSCTN.mjs → chunk-6MSM3CZ6.mjs} +1 -1
- package/dist/{chunk-5SHZBJ5R.mjs → chunk-75F3LJMX.mjs} +1 -1
- package/dist/{chunk-7BCUACIY.mjs → chunk-7HR6FNWF.mjs} +1 -1
- package/dist/{chunk-MXCW6SOT.mjs → chunk-7R47MHQE.mjs} +1 -1
- package/dist/{chunk-RAGDUV7M.mjs → chunk-7VDNUJZC.mjs} +1 -1
- package/dist/{chunk-LJQPLE4S.mjs → chunk-AJQHGVZ5.mjs} +1 -1
- package/dist/{chunk-LHEZJYVN.mjs → chunk-AQZEZ3UR.mjs} +1 -1
- package/dist/{chunk-QUXHULLX.mjs → chunk-ATIEKI6M.mjs} +1 -1
- package/dist/{chunk-QTILVWJA.mjs → chunk-B2EJGXDG.mjs} +1 -1
- package/dist/{chunk-GS2VFNHY.mjs → chunk-B3F6F2S4.mjs} +1 -1
- package/dist/{chunk-U3F45KVI.mjs → chunk-BKR3FRMQ.mjs} +1 -1
- package/dist/{chunk-YKG4FNS4.mjs → chunk-C4RWEPVF.mjs} +1 -1
- package/dist/{chunk-7GMAMIHM.mjs → chunk-CXOVEABI.mjs} +1 -1
- package/dist/{chunk-YNTAZCKJ.mjs → chunk-DKVCSRUJ.mjs} +1 -1
- package/dist/{chunk-ABGNIQRP.mjs → chunk-ECXVQZBN.mjs} +1 -1
- package/dist/{chunk-IF3425JX.mjs → chunk-FE7ZGUPU.mjs} +1 -1
- package/dist/{chunk-H3CJOE6S.mjs → chunk-GHOL5L32.mjs} +1 -1
- package/dist/{chunk-2RQDJ5XT.mjs → chunk-GTZJWMZR.mjs} +1 -1
- package/dist/{chunk-TK4JC5PG.mjs → chunk-INPV5MBU.mjs} +1 -1
- package/dist/{chunk-RNMPX2AU.mjs → chunk-IPIDKLAW.mjs} +1 -1
- package/dist/{chunk-LJOWXPWW.mjs → chunk-KWYJ3XZI.mjs} +1 -1
- package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
- package/dist/{chunk-CLGBBNRB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
- package/dist/chunk-LW4QFIFR.mjs +4 -0
- package/dist/chunk-LYPWYO4W.mjs +1 -0
- package/dist/{chunk-FTZRG54P.mjs → chunk-M4UVNIK2.mjs} +1 -1
- package/dist/{chunk-7EXAS7HK.mjs → chunk-MAAKU7PN.mjs} +1 -1
- package/dist/{chunk-HKGW6JI2.mjs → chunk-NINFDOV5.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/{chunk-SW7RYGO6.mjs → chunk-OQYER4E7.mjs} +1 -1
- package/dist/chunk-PC6TVU7J.mjs +1 -0
- package/dist/{chunk-N7BHIWS5.mjs → chunk-R75OR5VS.mjs} +1 -1
- package/dist/{chunk-255P6K5W.mjs → chunk-RGOKBIQ5.mjs} +1 -1
- package/dist/{chunk-67QPOSVV.mjs → chunk-RJGYVDOU.mjs} +1 -1
- package/dist/{chunk-CAKJOTEE.mjs → chunk-RVHCTANZ.mjs} +1 -1
- package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
- package/dist/{chunk-P2MTGU2L.mjs → chunk-UJSXVIXW.mjs} +1 -1
- package/dist/{chunk-67VXPDWA.mjs → chunk-VR5WOPRD.mjs} +1 -1
- package/dist/{chunk-S4A4VHOI.mjs → chunk-VWLPVN4M.mjs} +1 -1
- package/dist/{chunk-ERJXTG6X.mjs → chunk-WIRQ5IRT.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/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/README-document-edit.js +238 -0
- package/dist/components/DigitalColleagues/README-document-edit.mjs +238 -0
- package/dist/components/DigitalColleagues/README-document-preview.js +210 -0
- package/dist/components/DigitalColleagues/README-document-preview.mjs +210 -0
- package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.js +1 -1
- package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/document-edit.d.ts +4 -2
- package/dist/components/DigitalColleagues/document-edit.js +2 -1
- package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
- package/dist/components/DigitalColleagues/document-preview-examples.css +1 -0
- package/dist/components/DigitalColleagues/document-preview-examples.d.ts +12 -0
- package/dist/components/DigitalColleagues/document-preview-examples.js +35 -0
- package/dist/components/DigitalColleagues/document-preview-examples.mjs +31 -0
- package/dist/components/DigitalColleagues/document-preview.d.ts +12 -2
- package/dist/components/DigitalColleagues/document-preview.js +2 -1
- package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/DigitalColleagues/knowledge-browser.js +1 -1
- package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
- package/dist/components/DigitalColleagues/types.d.ts +1 -1
- 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/Holidays/HolidayGrid.js +1 -1
- package/dist/components/Holidays/HolidayGrid.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.js +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/RequestLeave.js +1 -1
- package/dist/components/Holidays/RequestLeave.mjs +1 -1
- package/dist/components/Holidays/index.js +1 -1
- package/dist/components/Holidays/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/dc-temp/index.js +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- 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/dist/utils/BankHolidays.d.ts +1 -4
- package/dist/utils/BankHolidays.js +1 -1
- package/dist/utils/BankHolidays.mjs +1 -1
- package/dist/utils/DaysUtil.js +1 -1
- package/dist/utils/DaysUtil.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-A24EPYUY.mjs +0 -1
- package/dist/chunk-BDFHWLTS.mjs +0 -4
- package/dist/chunk-GILMVRED.mjs +0 -4
- package/dist/chunk-QKGEV7LG.mjs +0 -1
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
5
|
-
"use strict";var yd=Object.create;var ri=Object.defineProperty;var wd=Object.getOwnPropertyDescriptor;var Nd=Object.getOwnPropertyNames;var Cd=Object.getPrototypeOf,Sd=Object.prototype.hasOwnProperty;var Dd=(e,t)=>{for(var a in t)ri(e,a,{get:t[a],enumerable:!0})},Rs=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Nd(t))!Sd.call(e,r)&&r!==a&&ri(e,r,{get:()=>t[r],enumerable:!(o=wd(t,r))||o.enumerable});return e};var le=(e,t,a)=>(a=e!=null?yd(Cd(e)):{},Rs(t||!e||!e.__esModule?ri(a,"default",{value:e,enumerable:!0}):a,e)),kd=e=>Rs(ri({},"__esModule",{value:!0}),e);var nm={};Dd(nm,{AppSidebarLeft:()=>pi,ColleagueCard:()=>ro,ColleagueForm:()=>Ho,ColleagueTypeSelection:()=>ji,ColleaguesView:()=>$o,DashboardHeader:()=>ln,DashboardPage:()=>ss,DigitalColleageusLayout:()=>Pi,DigitalColleagueClone:()=>Oi,DigitalColleagueOptions:()=>zi,DocumentEdit:()=>Ki,DocumentPreview:()=>_i,FileView:()=>qo,KnowledgeBrowser:()=>$i,KnowledgeSearch:()=>zo,KnowledgeView:()=>Wo,MainPage:()=>Zr,ManagementSidebar:()=>Fi,ProjectView:()=>hs,ProjectsIndexView:()=>ws,SearchableSelect:()=>Li,TeamsIndexView:()=>Ns});module.exports=kd(nm);var nn=require("lucide-react");var _a=le(require("@radix-ui/react-collapsible")),ur=_a.Root,As=_a.CollapsibleTrigger,Is=_a.CollapsibleContent;var Ar=le(require("clsx"));var Hs=require("clsx");var vr="-",Pd=e=>{let t=Rd(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let l=n.split(vr);return l[0]===""&&l.length!==1&&l.shift(),Bs(l,t)||Td(n)},getConflictingClassGroupIds:(n,l)=>{let s=a[n]||[];return l&&o[n]?[...s,...o[n]]:s}}},Bs=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Bs(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(vr);return t.validators.find(({validator:n})=>n(i))?.classGroupId},Ms=/^\[(.+)\]$/,Td=e=>{if(Ms.test(e)){let t=Ms.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Rd=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Id(Object.entries(e.classGroups),a).forEach(([i,n])=>{fr(n,o,i,t)}),o},fr=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:Es(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(Ad(r)){fr(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,n])=>{fr(n,Es(t,i),a,o)})})},Es=(e,t)=>{let a=e;return t.split(vr).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Ad=e=>e.isThemeGetter,Id=(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(([n,l])=>[t+n,l])):i);return[a,r]}):e,Md=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,r=(i,n)=>{a.set(i,n),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let n=a.get(i);if(n!==void 0)return n;if((n=o.get(i))!==void 0)return r(i,n),n},set(i,n){a.has(i)?a.set(i,n):r(i,n)}}},Fs="!",Ed=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,n=l=>{let s=[],c=0,m=0,f;for(let h=0;h<l.length;h++){let x=l[h];if(c===0){if(x===r&&(o||l.slice(h,h+i)===t)){s.push(l.slice(m,h)),m=h+i;continue}if(x==="/"){f=h;continue}}x==="["?c++:x==="]"&&c--}let u=s.length===0?l:l.substring(m),v=u.startsWith(Fs),N=v?u.substring(1):u,T=f&&f>m?f-m:void 0;return{modifiers:s,hasImportantModifier:v,baseClassName:N,maybePostfixModifierPosition:T}};return a?l=>a({className:l,parseClassName:n}):n},Bd=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},Fd=e=>({cache:Md(e.cacheSize),parseClassName:Ed(e),...Pd(e)}),Ld=/\s+/,jd=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],n=e.trim().split(Ld),l="";for(let s=n.length-1;s>=0;s-=1){let c=n[s],{modifiers:m,hasImportantModifier:f,baseClassName:u,maybePostfixModifierPosition:v}=a(c),N=!!v,T=o(N?u.substring(0,v):u);if(!T){if(!N){l=c+(l.length>0?" "+l:l);continue}if(T=o(u),!T){l=c+(l.length>0?" "+l:l);continue}N=!1}let h=Bd(m).join(":"),x=f?h+Fs:h,C=x+T;if(i.includes(C))continue;i.push(C);let L=r(T,N);for(let G=0;G<L.length;++G){let J=L[G];i.push(x+J)}l=c+(l.length>0?" "+l:l)}return l};function Od(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ls(t))&&(o&&(o+=" "),o+=a);return o}var Ls=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ls(e[o]))&&(a&&(a+=" "),a+=t);return a};function zd(e,...t){let a,o,r,i=n;function n(s){let c=t.reduce((m,f)=>f(m),e());return a=Fd(c),o=a.cache.get,r=a.cache.set,i=l,l(s)}function l(s){let c=o(s);if(c)return c;let m=jd(s,a);return r(s,m),m}return function(){return i(Od.apply(null,arguments))}}var $e=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},js=/^\[(?:([a-z-]+):)?(.+)\]$/i,Hd=/^\Us+\/\Us+$/,Ud=new Set(["px","full","screen"]),Vd=/^(\Us+(\.\Us+)?)?(si|sm|md|lg|xa)$/,Gd=/\Us+(%|px|r?em|[sdl]?v([hwib]|min|max)|Us|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Kd=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_d=/^(inset_)?-?((\Us+)?\.?(\Us+)[a-z]+|0)_-?((\Us+)?\.?(\Us+)[a-z]+|0)/,$Us=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,aa=e=>$a(e)||Ud.has(e)||Hd.test(e),ga=e=>Wa(e,"length",ec),$a=e=>!!e&&!Number.isNaN(Number(e)),gr=e=>Wa(e,"number",$a),No=e=>!!e&&Number.isInteger(Number(e)),Wd=e=>e.endsWith("%")&&$a(e.slice(0,-1)),fe=e=>js.test(e),fa=e=>Vd.test(e),Jd=new Set(["length","size","percentage"]),qd=e=>Wa(e,Jd,Os),Xd=e=>Wa(e,"position",Os),Yd=new Set(["image","url"]),Qd=e=>Wa(e,Yd,ac),Zd=e=>Wa(e,"",tc),Co=()=>!0,Wa=(e,t,a)=>{let o=js.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},ec=e=>Gd.test(e)&&!Kd.test(e),Os=()=>!1,tc=e=>_d.test(e),ac=e=>$Us.test(e);var oc=()=>{let e=$e("colors"),t=$e("spacing"),a=$e("blur"),o=$e("brightness"),r=$e("borderColor"),i=$e("borderRadius"),n=$e("borderSpacing"),l=$e("borderWidth"),s=$e("contrast"),c=$e("grayscale"),m=$e("hueRotate"),f=$e("invert"),u=$e("gap"),v=$e("gradientColorStops"),N=$e("gradientColorStopPositions"),T=$e("inset"),h=$e("margin"),x=$e("opacity"),C=$e("padding"),L=$e("saturate"),G=$e("scale"),J=$e("sepia"),Z=$e("skew"),se=$e("space"),w=$e("translate"),k=()=>["auto","contain","none"],B=()=>["auto","hidden","clip","visible","scroll"],ge=()=>["auto",fe,t],E=()=>[fe,t],P=()=>["",aa,ga],y=()=>["auto",$a,fe],ae=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],De=()=>["solid","dashed","dotted","double","none"],tt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ie=()=>["start","end","center","between","around","evenly","stretch"],at=()=>["","0",fe],j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ie=()=>[$a,fe];return{cacheSize:500,separator:":",theme:{colors:[Co],spacing:[aa,ga],blur:["none","",fa,fe],brightness:ie(),borderColor:[e],borderRadius:["none","","full",fa,fe],borderSpacing:E(),borderWidth:P(),contrast:ie(),grayscale:at(),hueRotate:ie(),invert:at(),gap:E(),gradientColorStops:[e],gradientColorStopPositions:[Wd,ga],inset:ge(),margin:ge(),opacity:ie(),padding:E(),saturate:ie(),scale:ie(),sepia:at(),skew:ie(),space:E(),translate:E()},classGroups:{aspect:[{aspect:["auto","square","video",fe]}],container:["container"],columns:[{columns:[fa]}],"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:[...ae(),fe]}],overflow:[{overflow:B()}],"overflow-x":[{"overflow-x":B()}],"overflow-y":[{"overflow-y":B()}],overscroll:[{overscroll:k()}],"overscroll-x":[{"overscroll-x":k()}],"overscroll-y":[{"overscroll-y":k()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[T]}],"inset-x":[{"inset-x":[T]}],"inset-y":[{"inset-y":[T]}],start:[{start:[T]}],end:[{end:[T]}],top:[{top:[T]}],right:[{right:[T]}],bottom:[{bottom:[T]}],left:[{left:[T]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",No,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:at()}],shrink:[{shrink:at()}],order:[{order:["first","last","none",No,fe]}],"grid-cols":[{"grid-cols":[Co]}],"col-start-end":[{col:["auto",{span:["full",No,fe]},fe]}],"col-start":[{"col-start":y()}],"col-end":[{"col-end":y()}],"grid-rows":[{"grid-rows":[Co]}],"row-start-end":[{row:["auto",{span:[No,fe]},fe]}],"row-start":[{"row-start":y()}],"row-end":[{"row-end":y()}],"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",...Ie()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ie(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ie(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],Us:[{Us:[C]}],px:[{px:[C]}],py:[{py:[C]}],ps:[{ps:[C]}],Us:[{Us:[C]}],Us:[{Us:[C]}],pr:[{pr:[C]}],pb:[{pb:[C]}],xa:[{xa:[C]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],Us:[{Us:[h]}],Us:[{Us:[h]}],nn:[{nn:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],ml:[{ml:[h]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"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:[fa]},fa]}],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",fa,ga]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gr]}],"font-family":[{font:[Co]}],"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,gr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",aa,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","xa-underline"],"text-decoration-style":[{decoration:[...De(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",aa,ga]}],"underline-offset":[{"underline-offset":["auto",aa,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:E()}],"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:[...ae(),Xd]}],"bg-repeat":[{bg:["xa-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qd]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Qd]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[N]}],"gradient-via-pos":[{via:[N]}],"gradient-to-pos":[{to:[N]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-to":[{to:[v]}],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-se":[{"rounded-se":[i]}],"rounded-Us":[{"rounded-Us":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[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:[...De(),"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:De()}],"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:["",...De()]}],"outline-offset":[{"outline-offset":[aa,fe]}],"outline-w":[{outline:[aa,ga]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:P()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[aa,ga]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",fa,Zd]}],"shadow-color":[{shadow:[Co]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...tt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":tt()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[s]}],"drop-shadow":[{"drop-shadow":["","none",fa,fe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[f]}],saturate:[{saturate:[L]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[s]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"backdrop-saturate":[{"backdrop-saturate":[L]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",fe]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",fe]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",fe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[G]}],"scale-x":[{"scale-x":[G]}],"scale-y":[{"scale-y":[G]}],rotate:[{rotate:[No,fe]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[Z]}],"skew-y":[{"skew-y":[Z]}],"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","xa-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",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":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-Us":[{"scroll-Us":E()}],"scroll-Us":[{"scroll-Us":E()}],"scroll-nn":[{"scroll-nn":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-Us":[{"scroll-Us":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-Us":[{"scroll-Us":E()}],"scroll-Us":[{"scroll-Us":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-xa":[{"scroll-xa":E()}],"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:[aa,ga,gr]}],stroke:[{stroke:[e,"none"]}],xa:["xa-only","not-xa-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"],Us:["px","py","ps","Us","Us","pr","pb","xa"],px:["pr","xa"],py:["Us","pb"],m:["mx","my","Us","Us","nn","mr","mb","ml"],mx:["mr","ml"],my:["nn","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-se","rounded-Us","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-Us"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-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-Us","scroll-Us","scroll-nn","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-nn","scroll-mb"],"scroll-Us":["scroll-px","scroll-py","scroll-ps","scroll-Us","scroll-Us","scroll-pr","scroll-pb","scroll-xa"],"scroll-px":["scroll-pr","scroll-xa"],"scroll-py":["scroll-Us","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var zs=zd(oc);function g(...e){return zs((0,Hs.clsx)(e))}var Us=require("react/jsx-runtime");function Nt({className:e,...t}){return(0,Us.jsx)("div",{className:g("animate-pulse rounded-md bg-primary/10",e),...t})}var xe=le(require("react")),Ya=require("@radix-ui/react-slot"),an=require("class-variance-authority");var si=require("react"),Vs=(e=768)=>{let[t,a]=(0,si.useState)(!1);return(0,si.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var _s=le(require("react")),ni=(0,an.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=_s.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,$s.jsx)(e?Ya.Slot:"button",{className:g(ni({className:t,size:a,variant:o})),ref:i,...r}));b.displayName="Button";var Ws=le(require("react"));var O=Ws.forwardRef(({className:e,type:t,...a},o)=>(0,Us.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}));O.displayName="Input";var qs=le(require("react")),br=le(require("@radix-ui/react-separator"));var So=qs.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,Us.jsx)(br.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}));So.displayName=br.Root.displayName;var Do=le(require("react")),ut=le(require("@radix-ui/react-dialog")),Ys=require("@radix-ui/react-icons");var Zs=ut.Root;var ic=ut.Portal,en=Do.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(ut.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}));en.displayName=ut.Overlay.displayName;var rc=(0,an.cva)("fixed z-50 gap-4 bg-background Us-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"}}),hr=Do.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,Us.jsxs)(ic,{children:[(0,Us.jsx)(en,{}),(0,Us.jsxs)(ut.Content,{ref:r,className:g(rc({side:e}),t),...o,children:[(0,Us.jsxs)(ut.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,Us.jsx)(Ys.Cross2Icon,{className:"h-4 w-4"}),(0,Us.jsx)("span",{className:"xa-only",children:"Close"})]}),a]})]}));hr.displayName=ut.Content.displayName;var sc=({className:e,...t})=>(0,Us.jsx)("div",{className:g("flex flex-col space-y-2 text-center sm:text-left",e),...t});sc.displayName="SheetHeader";var nc=({className:e,...t})=>(0,Us.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});nc.displayName="SheetFooter";var lc=Do.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(ut.Title,{ref:a,className:g("text-lg font-semibold text-foreground",e),...t}));lc.displayName=ut.Title.displayName;var dc=Do.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(ut.Description,{ref:a,className:g("text-sm text-muted-foreground",e),...t}));dc.displayName=ut.Description.displayName;var tn=le(require("react")),_t=le(require("@radix-ui/react-tooltip"));var Ja=_t.Provider,qa=_t.Root,Xa=_t.Trigger,Ta=tn.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Us.jsx)(_t.Portal,{children:(0,Us.jsx)(_t.Content,{ref:o,sideOffset:t,className:g("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-si 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 cc="sidebar:state",mc=60*60*24*7,pc="16rem",uc="18rem",gc="3rem",fc="b",rn=xe.createContext(null);function li(){let e=xe.useContext(rn);if(!e)throw new Error("useSidebar must Us used within a SidebarProvider.");return e}var ko=xe.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:i,...n},l)=>{let s=Vs(),[c,m]=xe.useState(!1),[f,u]=xe.useState(e),v=t??f,N=xe.useCallback(C=>{if(a)return a?.(typeof C=="function"?C(v):C);u(C),document.cookie=`${cc}=${v}; path=/; max-age=${mc}`},[a,v]),T=xe.useCallback(()=>s?m(C=>!C):N(C=>!C),[s,N,m]);xe.useEffect(()=>{let C=L=>{L.key===fc&&(L.metaKey||L.ctrlKey)&&(L.preventDefault(),T())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[T]);let h=v?"expanded":"collapsed",x=xe.useMemo(()=>({state:h,open:v,setOpen:N,isMobile:s,openMobile:c,setOpenMobile:m,toggleSidebar:T}),[h,v,N,s,c,m,T]);return(0,Us.jsx)(rn.Provider,{value:x,children:(0,Us.jsx)(Ja,{delayDuration:0,children:(0,Us.jsx)("div",{style:{"--sidebar-width":pc,"--sidebar-width-icon":gc,...r},className:g("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:l,...n,children:i})})})});ko.displayName="SidebarProvider";var yr=xe.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...i},n)=>{let{isMobile:l,state:s,openMobile:c,setOpenMobile:m}=li();return a==="none"?(0,Us.jsx)("div",{className:g("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:n,...i,children:r}):l?(0,Us.jsx)(Zs,{open:c,onOpenChange:m,...i,children:(0,Us.jsx)(hr,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar Us-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":uc},side:e,children:(0,Us.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,Us.jsxs)("div",{ref:n,className:"group peer hidden md:block text-sidebar-foreground","data-state":s,"data-collapsible":s==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Us.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)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,Us.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"?"Us-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+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,Us.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})})]})});yr.displayName="Sidebar";var wr=xe.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=li();return(0,Us.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,Us.jsx)(nn.PanelLeft,{}),(0,Us.jsx)("span",{className:"xa-only",children:"Toggle Sidebar"})]})});wr.displayName="SidebarTrigger";var vc=xe.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=li();return(0,Us.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]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]: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]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})});vc.displayName="SidebarRail";var Nr=xe.forwardRef(({className:e,...t},a)=>(0,Us.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-xa md:peer-data-[variant=inset]:shadow",e),...t}));Nr.displayName="SidebarInset";var bc=xe.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(O,{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}));bc.displayName="SidebarInput";var Cr=xe.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,"data-sidebar":"header",className:g("flex flex-col gap-2 Us-2",e),...t}));Cr.displayName="SidebarHeader";var Sr=xe.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,"data-sidebar":"footer",className:g("flex flex-col gap-2 Us-2",e),...t}));Sr.displayName="SidebarFooter";var hc=xe.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(So,{ref:a,"data-sidebar":"separator",className:g("mx-2 w-auto bg-sidebar-border",e),...t}));hc.displayName="SidebarSeparator";var di=xe.forwardRef(({className:e,...t},a)=>(0,Us.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}));di.displayName="SidebarContent";var ci=xe.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,"data-sidebar":"group",className:g("relative flex w-full min-w-0 flex-col Us-2",e),...t}));ci.displayName="SidebarGroup";var xc=xe.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Us.jsx)(t?Ya.Slot:"div",{ref:o,"data-sidebar":"group-label",className:g("duration-200 flex h-8 shrink-0 items-center rounded-md px-2 text-si 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]:-nn-8 group-data-[collapsible=icon]:opacity-0",e),...a}));xc.displayName="SidebarGroupLabel";var yc=xe.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Us.jsx)(t?Ya.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 Us-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}));yc.displayName="SidebarGroupAction";var Dr=xe.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,"data-sidebar":"group-content",className:g("w-full text-sm",e),...t}));Dr.displayName="SidebarGroupContent";var Po=xe.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("nn",{ref:a,"data-sidebar":"menu",className:g("flex w-full min-w-0 flex-col gap-1",e),...t}));Po.displayName="SidebarMenu";var To=xe.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:g("group/menu-item relative",e),...t}));To.displayName="SidebarMenuItem";var wc=(0,an.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md Us-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:pr-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]:!Us-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-si",lg:"h-12 text-sm group-data-[collapsible=icon]:!Us-0"}},defaultVariants:{variant:"default",size:"default"}}),mi=xe.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:i,...n},l)=>{let s=e?Ya.Slot:"button",{isMobile:c,state:m}=li(),f=(0,Us.jsx)(s,{ref:l,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:g(wc({variant:a,size:o}),i),...n});return r?(typeof r=="string"&&(r={children:r}),(0,Us.jsxs)(qa,{children:[(0,Us.jsx)(Xa,{asChild:!0,children:f}),(0,Us.jsx)(Ta,{side:"right",align:"center",hidden:m!=="collapsed"||c,...r})]})):f});mi.displayName="SidebarMenuButton";var kr=xe.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,Us.jsx)(t?Ya.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 Us-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}));kr.displayName="SidebarMenuAction";var Nc=xe.forwardRef(({className:e,...t},a)=>(0,Us.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-si 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}));Nc.displayName="SidebarMenuBadge";var Cc=xe.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=xe.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Us.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,Us.jsx)(Nt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,Us.jsx)(Nt,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});Cc.displayName="SidebarMenuSkeleton";var Pr=xe.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("nn",{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}));Pr.displayName="SidebarMenuSub";var Tr=xe.forwardRef(({...e},t)=>(0,Us.jsx)("li",{ref:t,...e}));Tr.displayName="SidebarMenuSubItem";var Rr=xe.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},i)=>(0,Us.jsx)(e?Ya.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-si",t==="md"&&"text-sm","group-data-[collapsible=icon]:hidden",o),...r}));Rr.displayName="SidebarMenuSubButton";function pi({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:i,menuHeading:n,onNavClick:l,loading:s=!1,LinkComponent:c,...m}){let u=c?v=>(0,Us.jsx)(c,{...v}):l?({href:v,children:N,...T})=>(0,Us.jsx)("button",{onClick:()=>l&&l(v),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...T,children:N}):v=>(0,Us.jsx)("a",{...v});return(0,Us.jsxs)(yr,{...m,variant:"inset",children:[(0,Us.jsx)(Cr,{children:(0,Us.jsx)(Po,{children:(0,Us.jsx)(To,{children:s?(0,Us.jsxs)("div",{className:"grid flex-1 Us-2 text-left text-m leading-tight",children:[(0,Us.jsx)(Nt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Us.jsxs)("div",{className:"grid flex-1 Us-2 text-left text-m leading-tight",children:[(0,Us.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,Us.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),s&&(0,Us.jsxs)(di,{children:[(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Us.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Us.jsxs)(di,{children:[(0,Us.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!s&&a.map((v,N)=>(0,Us.jsx)(sn,{subNav:v,pathName:i,Link:u},N)),(0,Us.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!s&&e.map((v,N)=>(0,Us.jsx)(sn,{subNav:v,pathName:i,Link:u},N)),(0,Us.jsx)(ci,{className:"nn-auto",children:(0,Us.jsx)(Dr,{children:(0,Us.jsx)(Po,{children:t&&!s&&t.map(v=>(0,Us.jsx)(To,{children:(0,Us.jsx)(mi,{asChild:!0,size:"sm",children:(0,Us.jsxs)(u,{href:v.url||"",children:[v.icon&&(0,Us.jsx)(v.icon,{}),(0,Us.jsx)("span",{children:v.label})]})})},v.label))})})})]}),(0,Us.jsx)(Sr,{})]})}function sn({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,Us.jsx)(ur,{defaultOpen:!0,className:"group/collapsible",children:(0,Us.jsx)(ci,{className:"py-0",children:(0,Us.jsx)(Po,{children:(0,Us.jsx)(ur,{asChild:!0,defaultOpen:o.isActive,children:(0,Us.jsxs)(To,{children:[(0,Us.jsx)(mi,{asChild:!0,tooltip:o.label,className:(0,Ar.default)(r&&"font-bold text-accent"),children:(0,Us.jsxs)(a,{href:o.url,children:[o.icon&&(0,Us.jsx)(o.icon,{}),(0,Us.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(As,{asChild:!0,children:(0,Us.jsxs)(kr,{className:"data-[state=open]:rotate-90",children:[(0,Us.jsx)(nn.ChevronRight,{}),(0,Us.jsx)("span",{className:"xa-only",children:"Toggle"})]})}),(0,Us.jsx)(Is,{children:(0,Us.jsx)(Pr,{children:o.links?.map(i=>(0,Us.jsx)(Tr,{children:(0,Us.jsx)(Rr,{asChild:!0,className:(0,Ar.default)(i.url===t&&"font-bold text-accent"),children:(0,Us.jsx)(a,{href:i.url,children:(0,Us.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var ui=le(require("react")),oa=le(require("@radix-ui/react-avatar"));var It=ui.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(oa.Root,{ref:a,className:g("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));It.displayName=oa.Root.displayName;var ia=ui.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(oa.Image,{ref:a,className:g("aspect-square h-full w-full",e),...t}));ia.displayName=oa.Image.displayName;var Mt=ui.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(oa.Fallback,{ref:a,className:g("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Mt.displayName=oa.Fallback.displayName;var ra=le(require("react")),Ne=le(require("@radix-ui/react-dropdown-menu"));var Za=Ne.Root,eo=Ne.Trigger;var Sc=ra.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,Us.jsxs)(Ne.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&&"xa-8",e),...o,children:[a,(0,Us.jsx)(Ys.ChevronRightIcon,{className:"ml-auto"})]}));Sc.displayName=Ne.SubTrigger.displayName;var Dc=ra.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(Ne.SubContent,{ref:a,className:g("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Us-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}));Dc.displayName=Ne.SubContent.displayName;var Ra=ra.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Us.jsx)(Ne.Portal,{children:(0,Us.jsx)(Ne.Content,{ref:o,sideOffset:t,className:g("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Us-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})}));Ra.displayName=Ne.Content.displayName;var Xt=ra.forwardRef(({className:e,inset:t,...a},o)=>(0,Us.jsx)(Ne.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&&"xa-8",e),...a}));Xt.displayName=Ne.Item.displayName;var kc=ra.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,Us.jsxs)(Ne.CheckboxItem,{ref:r,className:g("relative flex cursor-default select-none items-center rounded-sm py-1.5 xa-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,Us.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Us.jsx)(Ne.ItemIndicator,{children:(0,Us.jsx)(Ys.CheckIcon,{className:"h-4 w-4"})})}),t]}));kc.displayName=Ne.CheckboxItem.displayName;var Pc=ra.forwardRef(({className:e,children:t,...a},o)=>(0,Us.jsxs)(Ne.RadioItem,{ref:o,className:g("relative flex cursor-default select-none items-center rounded-sm py-1.5 xa-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,Us.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Us.jsx)(Ne.ItemIndicator,{children:(0,Us.jsx)(Ys.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Pc.displayName=Ne.RadioItem.displayName;var Ir=ra.forwardRef(({className:e,inset:t,...a},o)=>(0,Us.jsx)(Ne.Label,{ref:o,className:g("px-2 py-1.5 text-sm font-semibold",t&&"xa-8",e),...a}));Ir.displayName=Ne.Label.displayName;var Mr=ra.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(Ne.Separator,{ref:a,className:g("-mx-1 my-1 h-px bg-muted",e),...t}));Mr.displayName=Ne.Separator.displayName;var Tc=({className:e,...t})=>(0,Us.jsx)("span",{className:g("ml-auto text-si tracking-widest opacity-60",e),...t});Tc.displayName="DropdownMenuShortcut";var ln=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,Us.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 z-50",children:(0,Us.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,Us.jsx)(b,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,Us.jsx)(nn.Menu,{className:"h-5 w-5"})}),(0,Us.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,Us.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Us.jsxs)(b,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,Us.jsx)(nn.Bell,{className:"h-5 w-5"}),(0,Us.jsx)("span",{className:"absolute -top-1 -right-1 h-3 w-3 bg-red-500 rounded-full text-si text-white flex items-center justify-center",children:"3"})]}),(0,Us.jsxs)(Za,{children:[(0,Us.jsx)(eo,{asChild:!0,children:(0,Us.jsx)(b,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,Us.jsxs)(It,{className:"h-10 w-10",children:[(0,Us.jsx)(ia,{src:"/avatars/01.png",alt:"@user"}),(0,Us.jsx)(Mt,{children:"JD"})]})})}),(0,Us.jsxs)(Ra,{className:"w-56",align:"end",forceMount:!0,children:[(0,Us.jsx)(Ir,{className:"font-normal",children:(0,Us.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,Us.jsx)("Us",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,Us.jsx)("Us",{className:"text-si leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,Us.jsx)(Mr,{}),(0,Us.jsxs)(Xt,{children:[(0,Us.jsx)(nn.User,{className:"mr-2 h-4 w-4"}),(0,Us.jsx)("span",{children:"Profile"})]}),(0,Us.jsxs)(Xt,{children:[(0,Us.jsx)(nn.Settings,{className:"mr-2 h-4 w-4"}),(0,Us.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var Ci=le(require("react")),Fr=le(require("next/link"));var Rc=(0,an.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-si 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 X({className:e,variant:t,...a}){return(0,Us.jsx)("div",{className:g(Rc({variant:t}),e),...a})}var Er=le(require("react")),jt=le(require("@radix-ui/react-scroll-area"));var Yt=Er.forwardRef(({className:e,children:t,...a},o)=>(0,Us.jsxs)(jt.Root,{ref:o,className:g("relative overflow-hidden",e),...a,children:[(0,Us.jsx)(jt.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Us.jsx)(mn,{}),(0,Us.jsx)(jt.Corner,{})]}));Yt.displayName=jt.Root.displayName;var mn=Er.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Us.jsx)(jt.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 Us-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent Us-[1px]",e),...a,children:(0,Us.jsx)(jt.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));mn.displayName=jt.ScrollAreaScrollbar.displayName;var Ro=le(require("react")),st=le(require("@radix-ui/react-dialog"));var wt=st.Root,un=st.Trigger,Ac=st.Portal;var gn=Ro.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(st.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}));gn.displayName=st.Overlay.displayName;var ht=Ro.forwardRef(({className:e,children:t,...a},o)=>(0,Us.jsxs)(Ac,{children:[(0,Us.jsx)(gn,{}),(0,Us.jsxs)(st.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 Us-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,Us.jsxs)(st.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,Us.jsx)(nn.X,{className:"h-4 w-4"}),(0,Us.jsx)("span",{className:"xa-only",children:"Close"})]})]})]}));ht.displayName=st.Content.displayName;var xt=({className:e,...t})=>(0,Us.jsx)("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});xt.displayName="DialogHeader";var Ao=({className:e,...t})=>(0,Us.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ao.displayName="DialogFooter";var yt=Ro.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(st.Title,{ref:a,className:g("text-lg font-semibold leading-none tracking-tight",e),...t}));yt.displayName=st.Title.displayName;var Io=Ro.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(st.Description,{ref:a,className:g("text-sm text-muted-foreground",e),...t}));Io.displayName=st.Description.displayName;var Mo=le(require("@radix-ui/react-checkbox")),vn=le(require("react")),Eo=vn.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(Mo.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,Us.jsx)(Mo.Indicator,{className:g("flex items-center justify-center text-current"),children:(0,Us.jsx)(nn.Check,{className:"h-4 w-4"})})}));Eo.displayName=Mo.Root.displayName;var Qt=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),hn=[{id:"home",title:"Home",icon:(0,Us.jsx)(nn.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Us.jsx)(nn.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,Us.jsx)(nn.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 Us",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,Us.jsx)(nn.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Us.jsx)(nn.FileText,{}),url:"/knowledge"}],xn=[{id:"1",title:"New comment nn your post",description:"Alex Morgan commented nn 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'Us 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 nn 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],yn=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Us.jsx)(nn.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,Us.jsx)(nn.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,Us.jsx)(nn.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,Us.jsx)(nn.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,Us.jsx)(nn.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,Us.jsx)(nn.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,Us.jsx)(nn.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,Us.jsx)(nn.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"nn",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Us.jsx)(nn.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,Us.jsx)(nn.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],hi=[{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}],wn=[{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 Br=[{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}],vi=[{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}],yi=[{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")}],Ic=[...yi,{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 nn 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")}],Mc=[...hi,{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}],bi={projects:[{id:"1",name:"Empty Project",description:"A project with xa 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:[]},bn={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:yi.filter(e=>e.epicId==="1")};var bp={empty:{initialProjects:bi.projects,initialEpics:bi.epics,initialSprints:bi.sprints,initialTasks:bi.tasks},default:{initialProjects:hi,initialEpics:Br,initialSprints:vi,initialTasks:yi},highDensity:{initialProjects:hi,initialEpics:Br,initialSprints:vi,initialTasks:Ic},singleEpic:{initialProjects:hi,initialEpics:bn.epics,initialSprints:vi,initialTasks:bn.tasks},multipleProjects:{initialProjects:Mc,initialEpics:Br,initialSprints:vi,initialTasks:yi}},xi=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Qt),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Qt),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 nn 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(Qt),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Qt),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Qt),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Qt),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(Qt),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Qt),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(Qt),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Qt),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],hp=[{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:xi.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:xi.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:xi.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 xp=xi.filter(e=>e.type==="digital");function Ni(e,t){let[a,o]=(0,si.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,si.useEffect)(()=>{r(a)},[]),[a,r]}function Lr({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=yn[0],onBusinessUnitChange:i,onSearch:n,className:l,logo:s="/headerlogo.png",appName:c="Nuvia",tagline:m="Collaboration Platform"}){let[f,u]=Ci.useState({}),[v,N]=Ni("sidebar-favorites",{}),[T,h]=Ci.useState(null),[x,C]=Ci.useState(""),L=y=>{u(ae=>({...ae,[y]:!ae[y]}))},G=y=>{i?.(y)},J=()=>{x.trim()&&n?.(x.trim())},Z=y=>{y.key==="Enter"&&(y.preventDefault(),J())},se=(y,ae)=>{let De=v[y]||[],tt=De.includes(ae)?De.filter(Ie=>Ie!==ae):De.concat(ae);N({...v,[y]:tt})},w=y=>{if(!y.items||!y.maxItems||y.items.length<=y.maxItems)return y.items||[];let ae=v[y.id]||[],De=y.items.filter(Ie=>ae.includes(Ie.id)),tt=y.items.filter(Ie=>!ae.includes(Ie.id));return[...De,...tt].slice(0,y.maxItems)},k=y=>y.maxItems&&y.items&&y.items.length>y.maxItems,B=e,ge=y=>{let ae=k(y),De=w(y),tt=(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsxs)("div",{className:"flex items-center gap-3",children:[y.icon,(0,Us.jsx)("span",{children:y.title})]}),y.badge&&(0,Us.jsx)(X,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-si",children:y.badge}),y.items&&(0,Us.jsx)(nn.ChevronDown,{className:g("ml-2 h-4 w-4 transition-transform",f[y.title]?"rotate-180":"")})]}),Ie=g("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",y.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return y.url?(0,Us.jsx)(Fr.default,{href:y.url,className:Ie,onClick:a?o:void 0,children:tt}):(0,Us.jsx)("button",{className:Ie,onClick:()=>y.items&&L(y.title),children:tt})},E=()=>{let y=e.find(De=>De.id===T);if(!y||!y.items||!y.maxItems)return null;let ae=v[y.id]||[];return(0,Us.jsx)(wt,{open:!!T,onOpenChange:De=>!De&&h(null),children:(0,Us.jsxs)(ht,{className:"sm:max-w-md",children:[(0,Us.jsxs)(xt,{children:[(0,Us.jsxs)(yt,{children:["Manage ",y.title," Favorites"]}),(0,Us.jsxs)("Us",{className:"text-sm text-muted-foreground",children:["Select up to ",y.maxItems," items to show in ",y.title.toLowerCase(),"."]})]}),(0,Us.jsx)(Yt,{className:"max-h-96 pr-4",children:(0,Us.jsx)("div",{className:"space-y-4",children:y.items.map(De=>(0,Us.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Us.jsx)(Eo,{id:De.id,checked:ae.includes(De.id),onCheckedChange:()=>se(y.id,De.id),disabled:!ae.includes(De.id)&&ae.length>=(y.maxItems||0)}),(0,Us.jsxs)("label",{htmlFor:De.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:[De.title,De.badge&&(0,Us.jsx)(X,{variant:"outline",className:"text-si",children:De.badge})]})]},De.id))})})]})})},P=(0,Us.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between Us-4",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Us.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,Us.jsx)("img",{src:s,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("h2",{className:"font-semibold",children:c}),(0,Us.jsx)("Us",{className:"text-si text-muted-foreground",children:m})]})]}),a&&(0,Us.jsx)(b,{variant:"ghost",size:"icon",onClick:o,children:(0,Us.jsx)(nn.X,{className:"h-5 w-5"})})]}),(0,Us.jsx)("div",{className:"px-3 py-2",children:(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsx)(nn.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Us.jsx)(O,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted xa-9 pr-4 py-2",value:x,onChange:y=>C(y.target.value),onKeyPress:Z})]})}),(0,Us.jsx)(Yt,{className:"flex-1 px-3 py-2",children:(0,Us.jsx)("div",{className:"space-y-1",children:B.map(y=>(0,Us.jsxs)("div",{className:"mb-1",children:[ge(y),y.items&&f[y.title]&&(0,Us.jsxs)("div",{className:"nn-1 ml-6 space-y-1 border-l xa-3",children:[w(y).map(ae=>(0,Us.jsxs)(Fr.default,{href:ae.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[ae.title,ae.badge&&(0,Us.jsx)(X,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-si",children:ae.badge})]},ae.id)),k(y)&&y.items&&y.items.length>w(y).length&&(0,Us.jsxs)("button",{onClick:()=>h(y.id),className:"w-full px-3 py-2 text-si text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",y.items.length-w(y).length," more available"]})]})]},y.id))})}),(0,Us.jsx)("div",{className:"Us-3",children:(0,Us.jsx)("div",{className:"space-y-1",children:(0,Us.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,Us.jsx)(nn.Settings,{className:"h-5 w-5"}),(0,Us.jsx)("span",{children:"Settings"})]})})}),(0,Us.jsx)(E,{})]});return a?(0,Us.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:P}):(0,Us.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:P})}var xa=require("framer-motion");var Nn=require("next-themes");function Cn(){let{setTheme:e,theme:t}=(0,Nn.useTheme)();return(0,Us.jsx)(Ja,{children:(0,Us.jsxs)(qa,{children:[(0,Us.jsx)(Xa,{asChild:!0,children:(0,Us.jsxs)(b,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Us.jsx)(nn.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Us.jsx)(nn.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Us.jsx)("span",{className:"xa-only",children:"Toggle theme"})]})}),(0,Us.jsx)(Ta,{children:"Toggle theme"})]})})}function Sn({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let n=e.filter(c=>!c.read),l=n.length,s=c=>{switch(c){case"info":return(0,Us.jsx)(nn.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,Us.jsx)(nn.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,Us.jsx)(nn.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,Us.jsx)(nn.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,Us.jsx)(xa.AnimatePresence,{children:t&&(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(xa.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,Us.jsx)(xa.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,Us.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between border-b Us-4",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)(nn.Bell,{className:"h-5 w-5"}),(0,Us.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),l>0&&(0,Us.jsxs)(X,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[l," new"]})]}),(0,Us.jsxs)(b,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Us.jsx)(nn.X,{className:"h-5 w-5"}),(0,Us.jsx)("span",{className:"xa-only",children:"Close"})]})]}),l>0&&(0,Us.jsxs)("div",{className:"flex items-center justify-between border-b Us-2",children:[(0,Us.jsxs)("span",{className:"text-sm text-muted-foreground",children:[l," unread notification",l!==1?"s":""]}),(0,Us.jsx)(b,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,Us.jsx)(Yt,{className:"flex-1",children:(0,Us.jsx)("div",{className:"divide-y",children:n.map(c=>(0,Us.jsxs)("div",{className:g("flex gap-3 Us-4 transition-colors bg-muted/50"),children:[(0,Us.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:s(c.type)}),(0,Us.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)("Us",{className:"font-medium",children:c.title}),(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)("Us",{className:"text-si text-muted-foreground",children:c.time}),(0,Us.jsx)(b,{variant:"ghost",size:"sm",className:"h-6 w-6 Us-0",onClick:()=>o?.(c.id),title:"Dismiss",children:(0,Us.jsx)(nn.Check,{className:"h-3 w-3"})})]})]}),(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:c.description}),c.actionLabel&&(0,Us.jsxs)(b,{variant:"link",size:"sm",className:"h-auto Us-0 text-sm",onClick:c.onAction,children:[c.actionLabel,(0,Us.jsx)(nn.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},c.id))})}):(0,Us.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center Us-8 text-center",children:[(0,Us.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Us.jsx)(nn.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,Us.jsx)("h3",{className:"nn-4 text-lg font-medium",children:"No notifications"}),(0,Us.jsx)("Us",{className:"nn-2 text-sm text-muted-foreground",children:"When you receive notifications, they'Us appear here."})]})]})})]})})}var Aa=le(require("@radix-ui/react-tabs"));function Dn({className:e,...t}){return(0,Us.jsx)(Aa.Root,{"data-slot":"tabs",className:g("flex flex-col gap-2",e),...t})}function kn({className:e,...t}){return(0,Us.jsx)(Aa.List,{"data-slot":"tabs-list",className:g("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg Us-[3px]",e),...t})}function Pn({className:e,...t}){return(0,Us.jsx)(Aa.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 to({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let n=a.find(l=>l.value===e);return(0,Us.jsxs)(xa.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,Us.jsx)("div",{className:"hidden md:block",children:(0,Us.jsx)(Dn,{value:e,onValueChange:t,children:(0,Us.jsx)(kn,{className:"grid w-full rounded-2xl Us-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(l=>(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Us.jsx)(Pn,{value:l.value,className:"w-full h-8 rounded-xa data-[state=active]:rounded-xa 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,Us.jsx)("div",{className:"md:hidden",children:(0,Us.jsxs)(Za,{children:[(0,Us.jsx)(eo,{asChild:!0,children:(0,Us.jsxs)(b,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,Us.jsx)(nn.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,Us.jsx)(Ra,{align:"center",className:"w-[180px]",children:a.map(l=>(0,Us.jsx)(Xt,{onClick:()=>t?.(l.value),className:`cursor-pointer ${e===l.value?"bg-accent":""}`,children:l.label},l.value))})]})})]})}function Rn({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:n="assistant",onTabChange:l,showTabs:s=!0,tabOptions:c=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:m,actionIcon:f=(0,Us.jsx)(nn.Bot,{className:"mr-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:v,onRemoveAll:N,logo:T="/headerlogo.png",appName:h="Nuvia",tagline:x="Collaboration Platform"}){let[C,L]=(0,si.useState)(!1),[G,J]=(0,si.useState)(t),Z=G.filter(k=>!k.read).length,se=k=>{J(B=>B.filter(ge=>ge.id!==k)),v?.(k)},w=()=>{J(k=>k.filter(B=>B.read)),N?.()};return(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsxs)("header",{className:`sticky top-0 z-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${i||""}`,children:[(0,Us.jsx)(b,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Us.jsx)(nn.Menu,{className:"h-5 w-5"})}),(0,Us.jsx)(b,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Us.jsx)(nn.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,Us.jsxs)(xa.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Us.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,Us.jsx)("img",{src:T,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("h2",{className:"font-semibold text-sm",children:h}),(0,Us.jsx)("Us",{className:"text-si text-muted-foreground",children:x})]})]}),(0,Us.jsxs)("div",{className:"flex flex-1 items-center",children:[s&&(0,Us.jsx)(to,{activeTab:n,onTabChange:l,tabOptions:c}),(0,Us.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Us.jsx)(xa.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,Us.jsx)(xa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Us.jsxs)(b,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:m,children:[f,u]})})}),(0,Us.jsx)(Cn,{}),(0,Us.jsx)(Ja,{children:(0,Us.jsxs)(qa,{children:[(0,Us.jsx)(Xa,{asChild:!0,children:(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Us.jsxs)(b,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>L(!0),children:[(0,Us.jsx)(xa.motion.div,{animate:Z>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:Z>0?1/0:0,repeatDelay:3},children:(0,Us.jsx)(nn.Bell,{className:"h-5 w-5"})}),Z>0&&(0,Us.jsx)(xa.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-si text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:Z})]})})}),(0,Us.jsx)(Ta,{children:"Notifications"})]})}),(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Us.jsxs)(It,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Us.jsx)(ia,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Us.jsx)(Mt,{})]})})]})]})]}),(0,Us.jsx)(Sn,{notifications:G,open:C,onClose:()=>L(!1),onNotificationRemove:se,onRemoveAll:w})]})}var An=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Us.jsx)(nn.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Pi({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=An[0],onBusinessUnitChange:i,onSearch:n,businessUnits:l=An,activeTab:s,onTabChange:c,showTabs:m=!1,onActionClick:f,actionIcon:u,actionText:v="Action",onNotificationRemove:N,onRemoveAll:T,logo:h="/headerlogo.png",appName:x="Nuvia",tagline:C="Collaboration Platform",sidebarInitiallyClosed:L=!1}){let[G,J]=(0,si.useState)(!L),[Z,se]=(0,si.useState)(!1),[w,k]=(0,si.useState)(r),B=ge=>{k(ge),i?.(ge)};return(0,Us.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xa bg-background w-[]",children:[Z&&(0,Us.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>se(!1)}),(0,Us.jsx)("div",{className:"md:hidden",children:(0,Us.jsx)(Lr,{items:e,isOpen:Z,isMobile:!0,onClose:()=>se(!1),currentBusinessUnit:w,onBusinessUnitChange:B,onSearch:n,logo:h,appName:x,tagline:C})}),(0,Us.jsx)("div",{className:"hidden md:block",children:(0,Us.jsx)(Lr,{items:e,isOpen:G,isMobile:!1,currentBusinessUnit:w,onBusinessUnitChange:B,onSearch:n,logo:h,appName:x,tagline:C})}),(0,Us.jsxs)("div",{className:g("min-h-screen fixed w-full transition-all duration-300 ease-in-out",G?"md:xa-64":"md:xa-0"),children:[(0,Us.jsx)(Rn,{title:a,notifications:o,onToggleSidebar:()=>J(!G),onToggleMobileMenu:()=>se(!0),sidebarOpen:G,activeTab:s,onTabChange:c,showTabs:m,onActionClick:f,actionIcon:u,actionText:v,onNotificationRemove:N,onRemoveAll:T,logo:h,appName:x,tagline:C}),(0,Us.jsx)("main",{className:"flex-1 Us-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var ao=le(require("react"));var zr=ao.forwardRef(({...e},t)=>(0,Us.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));zr.displayName="Breadcrumb";var Hr=ao.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("ol",{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}));Hr.displayName="BreadcrumbList";var Ri=ao.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("li",{ref:a,className:g("inline-flex items-center gap-1.5",e),...t}));Ri.displayName="BreadcrumbItem";var Ur=ao.forwardRef(({asChild:e,className:t,...a},o)=>(0,Us.jsx)(e?Ya.Slot:"a",{ref:o,className:g("transition-colors hover:text-foreground",t),...a}));Ur.displayName="BreadcrumbLink";var Vr=ao.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:g("font-normal text-foreground",e),...t}));Vr.displayName="BreadcrumbPage";var Gr=({children:e,className:t,...a})=>(0,Us.jsx)("li",{role:"presentation","aria-hidden":"true",className:g("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,Us.jsx)(Ys.ChevronRightIcon,{})});Gr.displayName="BreadcrumbSeparator";var Ec=({className:e,...t})=>(0,Us.jsxs)("span",{role:"presentation","aria-hidden":"true",className:g("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Us.jsx)(Ys.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,Us.jsx)("span",{className:"xa-only",children:"More"})]});Ec.displayName="BreadcrumbElipssis";var Mi=le(require("react")),Bc=1,Fc=1e6;var Kr=0;function Lc(){return Kr=(Kr+1)%Number.MAX_SAFE_INTEGER,Kr.toString()}var _r=new Map,En=e=>{if(_r.has(e))return;let t=setTimeout(()=>{_r.delete(e),Fo({type:"REMOVE_TOAST",toastId:e})},Fc);_r.set(e,t)},jc=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Bc)};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?En(a):e.toasts.forEach(o=>{En(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)}}},Ai=[],Ii={toasts:[]};function Fo(e){Ii=jc(Ii,e),Ai.forEach(t=>{t(Ii)})}function Oc({...e}){let t=Lc(),a=r=>Fo({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>Fo({type:"DISMISS_TOAST",toastId:t});return Fo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function Bn(){let[e,t]=Mi.useState(Ii);return Mi.useEffect(()=>(Ai.push(t),()=>{let a=Ai.indexOf(t);a>-1&&Ai.splice(a,1)}),[e]),{...e,toast:Oc,dismiss:a=>Fo({type:"DISMISS_TOAST",toastId:a})}}var Ia=le(require("react")),nt=le(require("@radix-ui/react-toast"));var jn=nt.Provider,$r=Ia.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(nt.Viewport,{ref:a,className:g("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse Us-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));$r.displayName=nt.Viewport.displayName;var zc=(0,an.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border Us-4 pr-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"}}),Wr=Ia.forwardRef(({className:e,variant:t,...a},o)=>(0,Us.jsx)(nt.Root,{ref:o,className:g(zc({variant:t}),e),...a}));Wr.displayName=nt.Root.displayName;var Hc=Ia.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(nt.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}));Hc.displayName=nt.Action.displayName;var Jr=Ia.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(nt.Close,{ref:a,className:g("absolute right-1 top-1 rounded-md Us-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,Us.jsx)(nn.X,{className:"h-4 w-4"})}));Jr.displayName=nt.Close.displayName;var qr=Ia.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(nt.Title,{ref:a,className:g("text-sm font-semibold [&+div]:text-si",e),...t}));qr.displayName=nt.Title.displayName;var Xr=Ia.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(nt.Description,{ref:a,className:g("text-sm opacity-90",e),...t}));Xr.displayName=nt.Description.displayName;function On(){let{toasts:e}=Bn();return(0,Us.jsxs)(jn,{children:[e.map(function({id:t,title:a,description:o,action:r,...i}){return(0,Us.jsxs)(Wr,{...i,children:[(0,Us.jsxs)("div",{className:"grid gap-1",children:[a&&(0,Us.jsx)(qr,{children:a}),o&&(0,Us.jsx)(Xr,{children:o})]}),r,(0,Us.jsx)(Jr,{})]},t)}),(0,Us.jsx)($r,{})]})}var zn=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("fa-")?e+" ":"fa-"+e+" ",i="fa-"+t,n=o??"",l=r+i+" fa-"+a+" "+n;return(0,Us.jsx)("i",{className:l})};var oo=require("@headlessui/react"),Vn=require("@heroicons/react/20/solid");var Uc=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Us.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,Us.jsxs)("span",{className:"relative",children:[e,(0,Us.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,Us.jsxs)(oo.Popover,{children:[(0,Us.jsxs)(oo.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,Us.jsxs)("span",{className:"relative",children:[e,(0,Us.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,Us.jsx)(Vn.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,Us.jsxs)(oo.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -z-10 bg-popover nn-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,Us.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 xa:gap-x-8 z-50",children:t&&t.map(r=>(0,Us.jsxs)("div",{className:"group relative rounded-lg Us-6 text-sm/6 box-border",children:[(0,Us.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,Us.jsx)(Un,{icon:r.icon,size:"4x"})}),(0,Us.jsxs)("a",{href:r.href,className:"nn-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Us.jsx)("span",{className:"absolute inset-0"})]}),(0,Us.jsx)("Us",{className:"nn-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Us.jsx)("div",{className:"bg-gray-50",children:(0,Us.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Us.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,Us.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 Us-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Us.jsx)(Un,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Un=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Us.jsx)(zn,{...e,size:a});if("src"in e)return(0,Us.jsx)("div",{className:g(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Us.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Gn=Uc;var Kn=le(require("next/link"));function _n({children:e,href:t,openNewTab:a,...o}){return(0,$n.jsx)(Kn.default,{href:t,target:a?"_blank":"_self",...o,children:e})}var Yr=le(require("next/image"));function jo({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Us.jsxs)(_n,{href:"/",className:g(a?"py-1":"py-2"),children:[(0,Us.jsx)(Yr.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,Us.jsx)(Yr.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 qn({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:i=!1}){let[n,l]=(0,si.useState)(!1),[s,c]=(0,si.useState)(""),m=["light","dark"],{theme:f,setTheme:u}=(0,Nn.useTheme)();(0,si.useEffect)(()=>{c(f||"dark")},[f]);let v=()=>{let N=m[(m.indexOf(s)+1)%m.length];c(N),u(N)};return(0,si.useEffect)(()=>{let N=()=>{window.scrollY>100?l(!0):l(!1)};return window.addEventListener("scroll",N,{passive:!0}),()=>window.removeEventListener("scroll",N)},[]),(0,Us.jsx)(Us.Fragment,{children:(0,Us.jsx)("header",{className:`z-50 pb-10 transition-all duration-300 hidden lg:block ${n||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Us.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white Us-0",children:(0,Us.jsxs)("div",{className:g("flex items-center justify-between px-9 py-0",!i&&"container"),children:[(0,Us.jsx)(jo,{logoDark:a,logoLight:t}),(0,Us.jsx)(oo.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(N=>(0,Us.jsx)(Gn,{...N},N.name))}),r&&(0,Us.jsx)("button",{className:"fixed right-4 z-[60] Us-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:v,children:(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsx)(nn.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Us.jsx)(nn.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Bi=require("@heroicons/react/24/outline");var Qr=["light","dark"];function Yn({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,i]=(0,si.useState)(!1),{theme:n,setTheme:l}=(0,Nn.useTheme)(),[s,c]=(0,si.useState)(!1),[m,f]=(0,si.useState)("light");(0,si.useEffect)(()=>{let v=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",v,{passive:!0}),()=>window.removeEventListener("scroll",v)},[]),(0,si.useEffect)(()=>{f(n||"dark")},[n]);let u=()=>{let v=Qr[(Qr.indexOf(m)+1)%Qr.length];f(v),l(v)};return(0,Us.jsx)(Us.Fragment,{children:(0,Us.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,Us.jsx)("nav",{className:g("backdrop-blur-sm text-white Us-0",s&&"hidden"),children:(0,Us.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&_.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Us.jsx)(jo,{logoDark:t,logoLight:e,mobile:!0}),(0,Us.jsx)("div",{className:"flex items-center space-x-4",children:(0,Us.jsxs)("button",{type:"button",onClick:()=>c(!0),className:"fixed right-4 z-[60] Us-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,Us.jsx)("span",{className:"xa-only",children:"Open main menu"}),(0,Us.jsx)(Bi.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,Us.jsxs)($t.Dialog,{open:s,onClose:c,className:"lg:hidden",children:[(0,Us.jsx)("div",{className:"fixed inset-0 z-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Us.jsxs)($t.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,Us.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Us.jsx)(jo,{logoDark:t,logoLight:e,mobile:!0}),(0,Us.jsxs)("button",{type:"button",onClick:()=>c(!1),className:"-m-2.5 rounded-md Us-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Us.jsx)("span",{className:"xa-only",children:"Close menu"}),(0,Us.jsx)(Bi.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Us.jsx)("div",{className:"nn-6 flow-root",children:(0,Us.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Us.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(v=>(0,Us.jsx)(Vc,{...v},v.name))})})})]})]})]})})}function Vc({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Us.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,Us.jsxs)($t.Disclosure,{Us:"div",className:"-mx-3",children:[(0,Us.jsx)($t.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 xa-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Us.jsx)($t.DisclosurePanel,{className:"nn-2 space-y-2",children:t&&t.map(r=>(0,Us.jsx)($t.DisclosureButton,{Us:"a",href:r.href,className:"block rounded-lg py-2 xa-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}function Qn({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:i,themeControl:n=!1}){return(0,Us.jsxs)("div",{className:g("fixed top-0 left-0 right-0 z-50",r),children:[(0,Us.jsx)(qn,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:n,wide:i}),(0,Us.jsx)(Yn,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}var Zn="../../cortex-reply-light-27IMI3G7.png";var el="../../cortex-reply-dark-XPAJJJYY.png";function Zr({...e}){return(0,Us.jsxs)("div",{className:"bg-sidebar",children:[(0,Us.jsx)(Qn,{isMenuOpen:!0,logoLight:Zn,logoDark:el,...e.header,className:"bg-sidebar",wide:!0}),(0,Us.jsxs)(ko,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,Us.jsx)(pi,{...e.sidebarLeft,className:"flex-none top-24"}),(0,Us.jsxs)(Nr,{className:"grow overflow-hidden",children:[(0,Us.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,Us.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,Us.jsx)(wr,{className:"-ml-1"}),(0,Us.jsx)(So,{orientation:"vertical",className:"mr-2 h-4"}),(0,Us.jsx)(zr,{children:(0,Us.jsxs)(Hr,{children:[(0,Us.jsx)(Ri,{className:"hidden md:block",children:(0,Us.jsx)(Ur,{href:"#",children:"Building Your Application"})}),(0,Us.jsx)(Gr,{className:"hidden md:block"}),(0,Us.jsx)(Ri,{children:(0,Us.jsx)(Vr,{children:"Data Fetching"})})]})})]})}),(0,Us.jsxs)("div",{className:"flex flex-1 flex-col gap-4 Us-4 Us-0",children:[(0,Us.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,Us.jsx)("div",{className:"aspect-video rounded-xa bg-muted/50"}),(0,Us.jsx)("div",{className:"aspect-video rounded-xa bg-muted/50"}),(0,Us.jsx)("div",{className:"aspect-video rounded-xa bg-muted/50"})]}),(0,Us.jsx)("div",{className:"flex-1 rounded-xa bg-muted/50 md:min-h-min"})]})]})]}),(0,Us.jsx)(On,{})]})}var Ea=le(require("react"));var z=Ea.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,className:g("rounded-xa border bg-card text-card-foreground shadow",e),...t}));z.displayName="Card";var Ee=Ea.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,className:g("flex flex-col space-y-1.5 Us-6",e),...t}));Ee.displayName="CardHeader";var ze=Ea.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,className:g("font-semibold leading-none tracking-tight",e),...t}));ze.displayName="CardTitle";var na=Ea.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,className:g("text-sm text-muted-foreground",e),...t}));na.displayName="CardDescription";var de=Ea.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,className:g("Us-6 Us-0",e),...t}));de.displayName="CardContent";var la=Ea.forwardRef(({className:e,...t},a)=>(0,Us.jsx)("div",{ref:a,className:g("flex items-center Us-6 Us-0",e),...t}));la.displayName="CardFooter";var tl=le(require("react")),Oe=tl.forwardRef(({className:e,...t},a)=>(0,Us.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}));Oe.displayName="Textarea";var Ce=le(require("@radix-ui/react-select")),Na=le(require("react")),Be=Ce.Root;var Ve=Ce.Value,Re=Na.forwardRef(({children:e,className:t,...a},o)=>(0,Us.jsxs)(Ce.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,Us.jsx)(Ce.Icon,{asChild:!0,children:(0,Us.jsx)(nn.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Re.displayName=Ce.Trigger.displayName;var ol=Na.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(Ce.ScrollUpButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Us.jsx)(nn.ChevronUp,{className:"h-4 w-4"})}));ol.displayName=Ce.ScrollUpButton.displayName;var il=Na.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(Ce.ScrollDownButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Us.jsx)(nn.ChevronDown,{className:"h-4 w-4"})}));il.displayName=Ce.ScrollDownButton.displayName;var Ae=Na.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,Us.jsx)(Ce.Portal,{children:(0,Us.jsxs)(Ce.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,Us.jsx)(ol,{}),(0,Us.jsx)(Ce.Viewport,{className:g("Us-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Us.jsx)(il,{})]})}));Ae.displayName=Ce.Content.displayName;var _c=Na.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(Ce.Label,{className:g("py-1.5 xa-8 pr-2 text-sm font-semibold",e),ref:a,...t}));_c.displayName=Ce.Label.displayName;var _=Na.forwardRef(({children:e,className:t,...a},o)=>(0,Us.jsxs)(Ce.Item,{className:g("relative flex w-full cursor-default select-none items-center rounded py-1.5 xa-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,Us.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Us.jsx)(Ce.ItemIndicator,{children:(0,Us.jsx)(nn.Check,{className:"h-4 w-4"})})}),(0,Us.jsx)(Ce.ItemText,{children:e})]}));_.displayName=Ce.Item.displayName;var $c=Na.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(Ce.Separator,{className:g("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));$c.displayName=Ce.Separator.displayName;var rl=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:r,onDeleteProject:i,onAddProject:n,onUpdateEpic:l,onDeleteEpic:s,onAddEpic:c,onAddSprint:m,onUpdateSprint:f,onDeleteSprint:u,onViewChange:v,mobileMenuOpen:N,onToggleMobileMenu:T})=>{let[h,x]=(0,si.useState)(null),[C,L]=(0,si.useState)(null),[G,J]=(0,si.useState)(null),[Z,se]=(0,si.useState)(null),[w,k]=(0,si.useState)({name:"",description:""}),[B,ge]=(0,si.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[E,P]=(0,si.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[y,ae]=(0,si.useState)(!1),[De,tt]=(0,si.useState)(!1),[Ie,at]=(0,si.useState)({name:"",description:""}),[j,ie]=(0,si.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),ke=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],bt=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],Lt=[{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"}],R=S=>{L(S.id),k({name:S.name,description:S.description||""})},Ze=()=>{C&&w.name.trim()&&(r(C,{name:w.name.trim(),description:w.description.trim()}),L(null))},Xe=()=>{L(null),k({name:"",description:""})},Pa=()=>{Ie.name.trim()&&(n({name:Ie.name.trim(),description:Ie.description.trim(),isSelected:!1}),at({name:"",description:""}),ae(!1))},Qo=S=>{r(S,{isSelected:!0})},ho=S=>{J(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})},Zo=()=>{G&&B.name.trim()&&(l(G,{name:B.name.trim(),description:B.description.trim(),color:B.color,confidence:B.confidence,phase:B.phase,startDate:new Date(B.startDate),endDate:new Date(B.endDate),progress:B.progress}),J(null))},lr=()=>{J(null),ge({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},ei=S=>{se(S.id),P({name:S.name,description:S.description||"",startDate:S.startDate.toISOString().split("T")[0],endDate:S.endDate.toISOString().split("T")[0],isActive:S.isActive})},dr=()=>{Z&&E.name.trim()&&(f(Z,{name:E.name.trim(),description:E.description.trim(),startDate:new Date(E.startDate),endDate:new Date(E.endDate),isActive:E.isActive}),se(null))},ti=()=>{se(null),P({name:"",description:"",startDate:"",endDate:"",isActive:!1})},Ka=()=>{j.name.trim()&&(m({name:j.name.trim(),description:j.description.trim(),startDate:new Date(j.startDate),endDate:new Date(j.endDate),isActive:j.isActive,isSelected:!1}),ie({name:"",description:"",startDate:"",endDate:"",isActive:!1}),tt(!1))},xo=S=>{f(S,{isSelected:!0})},ai=S=>S.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),yo=S=>{let I=bt.find(Pe=>Pe.value===S);return I?{label:I.label,color:I.color}:{label:"Medium",color:"text-warning"}},wo=S=>{let I=Lt.find(Pe=>Pe.value===S);return I?{label:I.label,color:I.color}:{label:"Phase 1",color:"text-primary"}};return(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsxs)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col z-50 flex-shrink-0 transition-transform duration-300 group ${N?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,Us.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,Us.jsxs)("button",{onClick:()=>{v("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:xa-3 z-50`,title:"Kanban View",children:[(0,Us.jsx)(nn.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,Us.jsx)("span",{className:"text-si font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Kanban"})]}),(0,Us.jsxs)("button",{onClick:()=>{v("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:xa-3`,title:"Planning View",children:[(0,Us.jsx)(nn.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Us.jsx)("span",{className:"text-si font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Planning"})]})]}),(0,Us.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:xa-3`,title:"Projects",children:[(0,Us.jsx)(nn.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,Us.jsx)("span",{className:"text-si font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Projects"})]}),(0,Us.jsxs)("button",{onClick:()=>{v("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:xa-3`,title:"Epic Planning",children:[(0,Us.jsx)(nn.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,Us.jsx)("span",{className:"text-si font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Epics"})]}),(0,Us.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:xa-3`,title:"Sprints",children:[(0,Us.jsx)(nn.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,Us.jsx)("span",{className:"text-si font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Sprints"})]}),(0,Us.jsxs)("button",{onClick:()=>{v("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:xa-3`,title:"Files",children:[(0,Us.jsx)(nn.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,Us.jsx)("span",{className:"text-si font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Files"})]}),(0,Us.jsxs)("button",{onClick:()=>{v("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:xa-3`,title:"Tasks",children:[(0,Us.jsx)(nn.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Us.jsx)("span",{className:"text-si font-medium whitespace-nowrap opacity-0 group-hover/btn:opacity-100 transition-opacity duration-200 absolute left-8",children:"Tasks"})]})]}),N&&(0,Us.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm z-20",onClick:T}),h&&(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm z-40",onClick:()=>x(null)}),(0,Us.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,Us.jsxs)("div",{className:"Us-3 md:Us-4 border-b flex items-center justify-between",children:[(0,Us.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,Us.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>x(null),children:(0,Us.jsx)(nn.X,{className:"h-4 w-4"})})]}),(0,Us.jsxs)("div",{className:"Us-3 md:Us-4 space-y-4 h-full overflow-y-auto",children:[h==="projects"&&(0,Us.jsx)(z,{className:"Us-3",children:(0,Us.jsxs)("div",{className:"space-y-3",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,Us.jsxs)(b,{size:"sm",onClick:()=>ae(!0),className:"gap-1",children:[(0,Us.jsx)(nn.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),y&&(0,Us.jsxs)("div",{className:"border rounded-lg Us-2 space-y-2",children:[(0,Us.jsx)(O,{value:Ie.name,onChange:S=>at(I=>({...I,name:S.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Us.jsx)(Oe,{value:Ie.description,onChange:S=>at(I=>({...I,description:S.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Us.jsxs)("div",{className:"flex gap-1",children:[(0,Us.jsx)(b,{size:"sm",onClick:Pa,className:"text-si h-6",children:"Save"}),(0,Us.jsx)(b,{size:"sm",variant:"outline",onClick:()=>ae(!1),className:"text-si h-6",children:"Cancel"})]})]}),(0,Us.jsx)("div",{className:"space-y-2",children:e.map(S=>(0,Us.jsx)("div",{className:"border rounded Us-2",children:C===S.id?(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(O,{value:w.name,onChange:I=>k(Pe=>({...Pe,name:I.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Us.jsx)(Oe,{value:w.description,onChange:I=>k(Pe=>({...Pe,description:I.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Us.jsxs)("div",{className:"flex gap-1",children:[(0,Us.jsx)(b,{size:"sm",onClick:Ze,className:"text-si h-6",children:"Save"}),(0,Us.jsx)(b,{size:"sm",variant:"outline",onClick:Xe,className:"text-si h-6",children:"Cancel"})]})]}):(0,Us.jsxs)("div",{className:`cursor-pointer Us-1 rounded transition-colors ${S.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>Qo(S.id),children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Us.jsx)(nn.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,Us.jsx)("span",{className:"font-medium text-si",children:S.name})]}),S.description&&(0,Us.jsx)("Us",{className:"text-si text-muted-foreground mb-1",children:S.description}),(0,Us.jsxs)("div",{className:"flex gap-1",onClick:I=>I.stopPropagation(),children:[(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>R(S),className:"h-5 px-1",children:(0,Us.jsx)(nn.Edit2,{className:"h-3 w-3"})}),(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>i(S.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Us.jsx)(nn.Trash2,{className:"h-3 w-3"})})]})]})},S.id))})]})}),h==="epics"&&(0,Us.jsx)(z,{className:"Us-3",children:(0,Us.jsxs)("div",{className:"space-y-3",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,Us.jsxs)(b,{size:"sm",onClick:c,className:"gap-1",children:[(0,Us.jsx)(nn.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,Us.jsx)("div",{className:"space-y-4",children:t.map(S=>(0,Us.jsx)("div",{className:"border rounded-lg Us-3",children:G===S.id?(0,Us.jsxs)("div",{className:"space-y-3",children:[(0,Us.jsx)(O,{value:B.name,onChange:I=>ge(Pe=>({...Pe,name:I.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,Us.jsx)(Oe,{value:B.description,onChange:I=>ge(Pe=>({...Pe,description:I.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)("label",{className:"text-si font-medium",children:"Color"}),(0,Us.jsx)("div",{className:"flex gap-1 flex-wrap",children:ke.map(I=>(0,Us.jsx)("button",{onClick:()=>ge(Pe=>({...Pe,color:I})),className:`w-6 h-6 rounded-full ${I} ${B.color===I?"ring-2 ring-ring":""}`},I))})]}),(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Us.jsxs)("div",{className:"space-y-1",children:[(0,Us.jsx)("label",{className:"text-si font-medium",children:"Confidence"}),(0,Us.jsxs)(Be,{value:B.confidence,onValueChange:I=>ge(Pe=>({...Pe,confidence:I})),children:[(0,Us.jsx)(Re,{className:"h-8 text-si",children:(0,Us.jsx)(Ve,{})}),(0,Us.jsx)(Ae,{children:bt.map(I=>(0,Us.jsx)(_,{value:I.value,children:(0,Us.jsx)("span",{className:I.color,children:I.label})},I.value))})]})]}),(0,Us.jsxs)("div",{className:"space-y-1",children:[(0,Us.jsx)("label",{className:"text-si font-medium",children:"Phase"}),(0,Us.jsxs)(Be,{value:B.phase.toString(),onValueChange:I=>ge(Pe=>({...Pe,phase:parseInt(I)})),children:[(0,Us.jsx)(Re,{className:"h-8 text-si",children:(0,Us.jsx)(Ve,{})}),(0,Us.jsx)(Ae,{children:Lt.map(I=>(0,Us.jsx)(_,{value:I.value.toString(),children:(0,Us.jsx)("span",{className:I.color,children:I.label})},I.value))})]})]})]}),(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Us.jsxs)("div",{className:"space-y-1",children:[(0,Us.jsx)("label",{className:"text-si font-medium",children:"Start Date"}),(0,Us.jsx)(O,{type:"date",value:B.startDate,onChange:I=>ge(Pe=>({...Pe,startDate:I.target.value})),className:"text-si h-8"})]}),(0,Us.jsxs)("div",{className:"space-y-1",children:[(0,Us.jsx)("label",{className:"text-si font-medium",children:"End Date"}),(0,Us.jsx)(O,{type:"date",value:B.endDate,onChange:I=>ge(Pe=>({...Pe,endDate:I.target.value})),className:"text-si h-8"})]})]}),(0,Us.jsxs)("div",{className:"space-y-1",children:[(0,Us.jsx)("label",{className:"text-si font-medium",children:"Progress (%)"}),(0,Us.jsx)(O,{type:"number",min:"0",max:"100",value:B.progress,onChange:I=>ge(Pe=>({...Pe,progress:parseInt(I.target.value)||0})),className:"text-si h-8"})]}),(0,Us.jsxs)("div",{className:"flex gap-2",children:[(0,Us.jsx)(b,{size:"sm",onClick:Zo,className:"text-si",children:"Save"}),(0,Us.jsx)(b,{size:"sm",variant:"outline",onClick:lr,className:"text-si",children:"Cancel"})]})]}):(0,Us.jsxs)("div",{className:`cursor-pointer Us-2 rounded transition-colors ${S.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>l(S.id,{isSelected:!S.isSelected}),children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Us.jsx)("div",{className:`w-3 h-3 rounded-full ${S.color}`}),(0,Us.jsx)("span",{className:"font-medium text-sm",children:S.name})]}),S.description&&(0,Us.jsx)("Us",{className:"text-si text-muted-foreground mb-2",children:S.description}),(0,Us.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between text-si",children:[(0,Us.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,Us.jsx)("span",{className:yo(S.confidence).color,children:yo(S.confidence).label})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between text-si",children:[(0,Us.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,Us.jsx)("span",{className:wo(S.phase).color,children:wo(S.phase).label})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between text-si",children:[(0,Us.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,Us.jsxs)("span",{className:"text-foreground",children:[ai(S.startDate)," - ",ai(S.endDate)]})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between text-si",children:[(0,Us.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,Us.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${S.progress}%`}})}),(0,Us.jsxs)("span",{className:"text-foreground",children:[S.progress,"%"]})]})]})]}),(0,Us.jsxs)("div",{className:"flex gap-1",onClick:I=>I.stopPropagation(),children:[(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>ho(S),className:"h-6 px-2",children:(0,Us.jsx)(nn.Edit2,{className:"h-3 w-3"})}),(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>s(S.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Us.jsx)(nn.Trash2,{className:"h-3 w-3"})})]})]})},S.id))})]})}),h==="sprints"&&(0,Us.jsx)(z,{className:"Us-3",children:(0,Us.jsxs)("div",{className:"space-y-3",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,Us.jsxs)(b,{size:"sm",onClick:()=>tt(!0),className:"gap-1",children:[(0,Us.jsx)(nn.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),De&&(0,Us.jsxs)("div",{className:"border rounded-lg Us-2 space-y-2",children:[(0,Us.jsx)(O,{value:j.name,onChange:S=>ie(I=>({...I,name:S.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,Us.jsx)(O,{type:"date",value:j.startDate,onChange:S=>ie(I=>({...I,startDate:S.target.value})),className:"text-si"}),(0,Us.jsx)(O,{type:"date",value:j.endDate,onChange:S=>ie(I=>({...I,endDate:S.target.value})),className:"text-si"})]}),(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)("input",{type:"checkbox",checked:j.isActive,onChange:S=>ie(I=>({...I,isActive:S.target.checked})),className:"w-3 h-3"}),(0,Us.jsx)("span",{className:"text-si",children:"Active"})]}),(0,Us.jsxs)("div",{className:"flex gap-1",children:[(0,Us.jsx)(b,{size:"sm",onClick:Ka,className:"text-si h-6",children:"Save"}),(0,Us.jsx)(b,{size:"sm",variant:"outline",onClick:()=>tt(!1),className:"text-si h-6",children:"Cancel"})]})]}),(0,Us.jsx)("div",{className:"space-y-2",children:a.map(S=>(0,Us.jsx)("div",{className:"border rounded Us-2",children:Z===S.id?(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(O,{value:E.name,onChange:I=>P(Pe=>({...Pe,name:I.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:S.id==="backlog"||S.id==="all-tasks"}),S.id!=="backlog"&&S.id!=="all-tasks"&&(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,Us.jsx)(O,{type:"date",value:E.startDate,onChange:I=>P(Pe=>({...Pe,startDate:I.target.value})),className:"text-si"}),(0,Us.jsx)(O,{type:"date",value:E.endDate,onChange:I=>P(Pe=>({...Pe,endDate:I.target.value})),className:"text-si"})]}),(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)("input",{type:"checkbox",checked:E.isActive,onChange:I=>P(Pe=>({...Pe,isActive:I.target.checked})),className:"w-3 h-3"}),(0,Us.jsx)("span",{className:"text-si",children:"Active"})]})]}),(0,Us.jsxs)("div",{className:"flex gap-1",children:[(0,Us.jsx)(b,{size:"sm",onClick:dr,className:"text-si h-6",children:"Save"}),(0,Us.jsx)(b,{size:"sm",variant:"outline",onClick:ti,className:"text-si h-6",children:"Cancel"})]})]}):(0,Us.jsxs)("div",{className:`cursor-pointer Us-1 rounded transition-colors ${S.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>xo(S.id),children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Us.jsx)(nn.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,Us.jsx)("span",{className:"font-medium text-si",children:S.name}),S.isActive&&(0,Us.jsx)("span",{className:"text-si bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(S.id==="backlog"||S.id==="all-tasks")&&(0,Us.jsx)("span",{className:"text-si bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),S.id!=="backlog"&&S.id!=="all-tasks"&&(0,Us.jsxs)("Us",{className:"text-si text-muted-foreground mb-1",children:[S.startDate.toLocaleDateString()," - ",S.endDate.toLocaleDateString()]}),(0,Us.jsxs)("div",{className:"flex gap-1",onClick:I=>I.stopPropagation(),children:[(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>ei(S),className:"h-5 px-1",children:(0,Us.jsx)(nn.Edit2,{className:"h-3 w-3"})}),S.id!=="backlog"&&S.id!=="all-tasks"&&(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>u(S.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Us.jsx)(nn.Trash2,{className:"h-3 w-3"})})]})]})},S.id))})]})})]})]})]})]})},Fi=e=>(0,Us.jsx)(ko,{children:(0,Us.jsxs)("div",{className:"flex w-full",children:[(0,Us.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,Us.jsx)(rl,{...e})}),(0,Us.jsx)("div",{className:"md:hidden",children:(0,Us.jsx)(rl,{...e})}),(0,Us.jsx)("div",{className:"flex-1 min-w-0 ml-16 px-4 md:px-6",children:(0,Us.jsx)("div",{className:"w-full",children:e.children})})]})});var sl=le(require("react")),es=le(require("@radix-ui/react-label"));var Wc=(0,an.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),A=sl.forwardRef(({className:e,...t},a)=>(0,Us.jsx)(es.Root,{ref:a,className:g(Wc(),e),...t}));A.displayName=es.Root.displayName;var Li=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:i=!1,disabled:n=!1})=>{let[l,s]=(0,si.useState)(!1),[c,m]=(0,si.useState)(""),f=o.find(h=>h.value===t),u=o.filter(h=>h.label.toLowerCase().includes(c.toLowerCase())),v=h=>{a(h),s(!1),m("")},N=()=>{i&&c.trim()&&!o.find(h=>h.value===c.trim())&&(a(c.trim()),s(!1),m(""))};return(0,Us.jsxs)("div",{className:"space-y-1",children:[(0,Us.jsx)(A,{className:"text-si text-muted-foreground",children:e}),(0,Us.jsxs)(Be,{value:t,onValueChange:v,open:l,onOpenChange:h=>{n||s(h)},disabled:n,children:[(0,Us.jsx)(Re,{className:"h-auto Us-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Us.jsx)(X,{variant:"secondary",className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!n&&s(!l),children:f?.label||t||"Select..."})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)("div",{className:"Us-2",children:(0,Us.jsx)(O,{placeholder:r,value:c,onChange:h=>m(h.target.value),onKeyDown:h=>{h.key==="Enter"&&i&&N()},className:"mb-2"})}),u.map(h=>(0,Us.jsx)(_,{value:h.value,children:h.label},h.value)),i&&c.trim()&&!u.find(h=>h.value===c.trim())&&(0,Us.jsxs)(_,{value:c.trim(),children:['Add "',c.trim(),'"']})]})]})]})};function ro({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:n}){let[l,s]=(0,si.useState)(!1),c=u=>{switch(u){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},m=u=>{switch(u){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},f=u=>{if(!u)return"Never";let N=Math.floor((new Date().getTime()-u.getTime())/(1e3*60));return N<1?"Just now":N<60?`${N}m ago`:N<1440?`${Math.floor(N/60)}h ago`:`${Math.floor(N/1440)}Us ago`};return(0,$.jsxs)(z,{className:g("hover:shadow-md transition-shadow",i&&"Us-2",n),children:[(0,$.jsx)(Ee,{className:g("pb-3",i&&"pb-2"),children:(0,$.jsxs)("div",{className:"flex items-start justify-between",children:[(0,$.jsxs)("div",{className:"flex items-center gap-3",children:[(0,$.jsx)("div",{className:"relative",children:(0,$.jsxs)(It,{className:g("h-12 w-12",i&&"h-8 w-8"),children:[(0,$.jsx)(ia,{src:"/placeholder.svg",alt:e.name}),(0,$.jsx)(Mt,{children:e.name.split(" ").map(u=>u[0]).join("")})]})}),(0,$.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,$.jsxs)("div",{className:"flex items-center gap-2",children:[(0,$.jsx)("h3",{className:g("font-semibold text-sm truncate",i&&"text-si"),children:e.name}),e.type==="digital"?(0,$.jsx)(nn.Bot,{className:g("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,$.jsx)(nn.User,{className:g("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,$.jsx)("Us",{className:g("text-sm text-muted-foreground truncate",i&&"text-si"),children:e.type==="human"?e.role:e.description}),!i&&(0,$.jsxs)("div",{className:"flex items-center gap-2 nn-1",children:[e.type==="human"&&(0,$.jsx)(X,{variant:"secondary",className:"text-si",children:e.department}),e.type==="digital"&&(0,$.jsxs)(X,{variant:"secondary",className:"text-si",children:["v",e.version]}),(0,$.jsx)(X,{variant:"outline",className:"text-si",children:m(e.status)})]})]})]}),r&&(0,$.jsxs)(Za,{children:[(0,$.jsx)(eo,{asChild:!0,children:(0,$.jsx)(b,{variant:"ghost",size:"icon",className:g("h-8 w-8",i&&"h-6 w-6"),children:(0,$.jsx)(nn.MoreHorizontal,{className:g("h-4 w-4",i&&"h-3 w-3")})})}),(0,$.jsxs)(Ra,{align:"end",children:[(0,$.jsxs)(Xt,{onClick:()=>o?.(e),children:[(0,$.jsx)(nn.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,$.jsxs)(Xt,{onClick:()=>t?.(e),children:[(0,$.jsx)(nn.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]}),(0,$.jsxs)(Xt,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,$.jsx)(nn.Trash2,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),!i&&(0,$.jsxs)(de,{className:"Us-0",children:[(0,$.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(nn.Mail,{className:"h-3 w-3"}),(0,$.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,$.jsxs)($.Fragment,{children:[e.phone&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(nn.Phone,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:e.phone})]}),e.location&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(nn.MapPin,{className:"h-3 w-3"}),(0,$.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(nn.Settings,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:["v",e.version]})]}),(0,$.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,$.jsx)(nn.Clock,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:["Last active: ",f(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,$.jsx)("div",{className:"nn-3",children:(0,$.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,l?e.skills.length:3).map(u=>(0,$.jsx)(X,{variant:"outline",className:"text-si",children:u},u)),e.skills.length>3&&(0,$.jsx)(b,{variant:"ghost",size:"sm",className:"h-5 px-2 text-si",onClick:()=>s(!l),children:l?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,$.jsx)("div",{className:"nn-3",children:(0,$.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,l?e.capabilities.length:2).map(u=>(0,$.jsx)(X,{variant:"outline",className:"text-si",children:u},u)),e.capabilities.length>2&&(0,$.jsx)(b,{variant:"ghost",size:"sm",className:"h-5 px-2 text-si",onClick:()=>s(!l),children:l?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}function zo({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[l,s]=(0,si.useState)(""),[c,m]=(0,si.useState)([]),[f,u]=(0,si.useState)(!1);(0,si.useEffect)(()=>{if(!l.trim()){m([]),u(!1);return}let h=a.filter(x=>{if(e.map(G=>G.id).includes(x.id))return!1;let L=l.toLowerCase();return x.title.toLowerCase().includes(L)||x.description?.toLowerCase().includes(L)||x.tags?.some(G=>G.toLowerCase().includes(L))||Object.values(x.metadata||{}).some(G=>String(G).toLowerCase().includes(L))});m(h),u(!0)},[l,e,a]);let v=h=>{i&&e.length>=i||(t([...e,h]),s(""),u(!1))},N=h=>{t(e.filter(x=>x.id!==h))},T=!i||e.length<i;return(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:o}),(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsx)(nn.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Us.jsx)(O,{value:l,onChange:h=>s(h.target.value),placeholder:T?r:`Maximum ${i} documents selected`,className:"xa-9",disabled:n||!T,onFocus:()=>l&&u(!0)})]}),f&&c.length>0&&(0,Us.jsx)(z,{className:"absolute top-full left-0 right-0 z-10 nn-1 max-h-60",children:(0,Us.jsx)(Yt,{className:"h-full",children:(0,Us.jsx)(de,{className:"Us-2",children:c.map(h=>(0,Us.jsx)(b,{variant:"ghost",className:"w-full justify-start h-auto Us-3 mb-1",onClick:()=>v(h),disabled:n,children:(0,Us.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,Us.jsx)(nn.FileText,{className:"h-4 w-4 nn-0.5 text-muted-foreground flex-shrink-0"}),(0,Us.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,Us.jsx)("div",{className:"font-medium text-sm truncate",children:h.title}),h.description&&(0,Us.jsx)("div",{className:"text-si text-muted-foreground nn-1 line-clamp-2",children:h.description}),h.tags&&h.tags.length>0&&(0,Us.jsxs)("div",{className:"flex flex-wrap gap-1 nn-2",children:[h.tags.slice(0,3).map(x=>(0,Us.jsx)(X,{variant:"outline",className:"text-si",children:x},x)),h.tags.length>3&&(0,Us.jsxs)(X,{variant:"outline",className:"text-si",children:["+",h.tags.length-3," more"]})]})]})]})},h.id))})})}),f&&l&&c.length===0&&(0,Us.jsx)(z,{className:"absolute top-full left-0 right-0 z-10 nn-1",children:(0,Us.jsxs)(de,{className:"Us-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',l,'"']})})]}),e.length>0&&(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,Us.jsx)("div",{className:"space-y-2",children:e.map(h=>(0,Us.jsx)(z,{className:"Us-3",children:(0,Us.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Us.jsx)(nn.FileText,{className:"h-4 w-4 nn-0.5 text-muted-foreground flex-shrink-0"}),(0,Us.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Us.jsx)("div",{className:"font-medium text-sm",children:h.title}),h.description&&(0,Us.jsx)("div",{className:"text-si text-muted-foreground nn-1",children:h.description}),h.tags&&h.tags.length>0&&(0,Us.jsx)("div",{className:"flex flex-wrap gap-1 nn-2",children:h.tags.map(x=>(0,Us.jsxs)(X,{variant:"outline",className:"text-si",children:[(0,Us.jsx)(nn.Tag,{className:"h-3 w-3 mr-1"}),x]},x))})]}),(0,Us.jsx)(b,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>N(h.id),disabled:n,children:(0,Us.jsx)(nn.X,{className:"h-3 w-3"})})]})},h.id))})]}),f&&(0,Us.jsx)("div",{className:"fixed inset-0 z-0",onClick:()=>u(!1)})]})}function Ho({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:n="Cancel",readOnly:l=!1,availableKnowledgeDocuments:s=[]}){let[c,m]=(0,si.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[f,u]=(0,si.useState)(""),[v,N]=(0,si.useState)(""),[T,h]=(0,si.useState)(!l);(0,si.useEffect)(()=>{e&&m(e)},[e]);let x=w=>{w.preventDefault();let k=c.version?parseInt(c.version):0,B=e?(k+1).toString():"1",ge={id:c.id||Date.now().toString(),name:c.name,type:"digital",status:"active",joinedDate:c.joinedDate||new Date,lastActive:c.lastActive||new Date,description:c.description,jobDescription:c.jobDescription||"",workInstructions:c.workInstructions||"",capabilities:c.capabilities||[],knowledge:c.knowledge||[],coreKnowledge:c.coreKnowledge||[],version:B,lastUpdated:c.lastUpdated||new Date,isActive:!0};t(ge)},C=(w,k,B)=>{if(!k.trim())return;let ge=c[w]||[];m({...c,[w]:[...ge,k.trim()]}),B("")},L=(w,k)=>{let B=c[w]||[];m({...c,[w]:B.filter((ge,E)=>E!==k)})},G=w=>{w.preventDefault(),h(!T)},J=(w,k,B,ge,E)=>{let P=c[w]||[];return(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:k}),T&&(0,Us.jsxs)("div",{className:"flex gap-2",children:[(0,Us.jsx)(O,{value:B,onChange:y=>ge(y.target.value),placeholder:E,onKeyPress:y=>{y.key==="Enter"&&(y.preventDefault(),C(w,B,ge))},disabled:o}),(0,Us.jsx)(b,{type:"button",variant:"outline",size:"icon",onClick:()=>C(w,B,ge),disabled:o,children:(0,Us.jsx)(nn.Plus,{className:"h-4 w-4"})})]}),(0,Us.jsx)("div",{className:"flex flex-wrap gap-2",children:P.map((y,ae)=>(0,Us.jsxs)(X,{className:"gap-1",children:[y,T&&(0,Us.jsx)(b,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 Us-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>L(w,ae),disabled:o,children:(0,Us.jsx)(nn.X,{className:"h-3 w-3"})})]},`${w}-${ae}-${y}`))})]})},Z=r||(T?e?"Edit Colleague":"Add New Colleague":"View Colleague"),se=i||(e?"Update Colleague":"Add Colleague");return(0,Us.jsxs)(z,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,Us.jsx)(Ee,{children:(0,Us.jsxs)(ze,{className:"flex items-center gap-2",children:[(0,Us.jsx)(nn.Bot,{className:"h-5 w-5"}),Z]})}),(0,Us.jsx)(de,{children:(0,Us.jsxs)("form",{onSubmit:x,className:"space-y-6",children:[(0,Us.jsxs)("div",{className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"name",children:"Name *"}),(0,Us.jsx)(O,{id:"name",value:c.name||"",onChange:w=>m({...c,name:w.target.value}),required:!0,disabled:o||!T})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Us.jsx)(Oe,{id:"description",value:c.description||"",onChange:w=>m({...c,description:w.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!T})]})]}),(0,Us.jsxs)("div",{className:"space-y-4",children:[(0,Us.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Us.jsx)(Oe,{id:"jobDescription",value:c.jobDescription||"",onChange:w=>m({...c,jobDescription:w.target.value}),rows:4,required:c.type==="digital",disabled:o||!T})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Us.jsx)(Oe,{id:"workInstructions",value:c.workInstructions||"",onChange:w=>m({...c,workInstructions:w.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!T})]}),J("capabilities","Capabilities",v,N,"Add capability"),(0,Us.jsx)(zo,{selectedDocuments:c.knowledge||[],onDocumentsChange:w=>m({...c,knowledge:w}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:o||!T,availableDocuments:s}),(0,Us.jsx)(zo,{selectedDocuments:c.coreKnowledge||[],onDocumentsChange:w=>m({...c,coreKnowledge:w}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!T,availableDocuments:s})]}),(0,Us.jsxs)("div",{className:"flex justify-end gap-2 Us-4 border-t",children:[(0,Us.jsx)(b,{type:"button",variant:"outline",onClick:a,disabled:o,children:T?n:"Close"}),T?(0,Us.jsx)(b,{type:"submit",disabled:o,children:o?"Saving...":se}):(0,Us.jsxs)(b,{type:"button",onClick:G,disabled:o,className:"gap-2",children:[(0,Us.jsx)(nn.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function ji({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Us.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Us.jsx)(xa.AnimatePresence,{mode:"wait",children:(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Us.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Us.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Us.jsx)(nn.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Us.jsx)("Us",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,Us.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Us.jsxs)(z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Us.jsxs)(Ee,{className:"text-center pb-4",children:[(0,Us.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Us.jsx)(nn.User,{className:"h-8 w-8 text-blue-600"})}),(0,Us.jsx)(ze,{className:"text-xa",children:"Add Human Colleague"})]}),(0,Us.jsxs)(de,{className:"text-center",children:[(0,Us.jsx)("Us",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add Us team members."}),(0,Us.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Us.jsx)(nn.Users,{className:"h-4 w-4 text-blue-600"}),(0,Us.jsx)("span",{children:"Browse existing users"})]}),(0,Us.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Us.jsx)(nn.User,{className:"h-4 w-4 text-blue-600"}),(0,Us.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Us.jsx)(b,{className:"nn-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Us.jsxs)(z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Us.jsxs)(Ee,{className:"text-center pb-4",children:[(0,Us.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Us.jsx)(nn.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,Us.jsx)(ze,{className:"text-xa",children:"Add Digital Colleague"})]}),(0,Us.jsxs)(de,{className:"text-center",children:[(0,Us.jsx)("Us",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,Us.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Us.jsx)(nn.Bot,{className:"h-4 w-4 text-purple-600"}),(0,Us.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Us.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Us.jsx)(nn.Users,{className:"h-4 w-4 text-purple-600"}),(0,Us.jsx)("span",{children:"Create from templates"})]})]}),(0,Us.jsx)(b,{className:"nn-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Oi({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,si.useState)(""),[n,l]=(0,si.useState)("all"),s=(0,si.useMemo)(()=>e.filter(f=>{let u=f.name.toLowerCase().includes(r.toLowerCase())||f.jobDescription.toLowerCase().includes(r.toLowerCase())||f.capabilities.some(N=>N.toLowerCase().includes(r.toLowerCase()))||f.workInstructions.toLowerCase().includes(r.toLowerCase()),v=n==="all"||f.status===n;return u&&v}),[e,r,n]),c=f=>{let u={...f,id:`${f.id}-clone-${Date.now()}`,name:`${f.name} (Copy)`,joinedDate:new Date,lastActive:new Date,lastUpdated:new Date,version:"1.0.0"};t(u)},m=f=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(f);return(0,Us.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Us.jsx)(xa.AnimatePresence,{mode:"wait",children:(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Us.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Us.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Us.jsx)(nn.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Us.jsx)("Us",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,Us.jsx)(z,{children:(0,Us.jsx)(de,{className:"Us-6",children:(0,Us.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Us.jsx)("div",{className:"flex-1",children:(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsx)(nn.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Us.jsx)(O,{placeholder:"Search by name, job description, or capabilities...",value:r,onChange:f=>i(f.target.value),className:"xa-9"})]})}),(0,Us.jsxs)("select",{value:n,onChange:f=>l(f.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,Us.jsx)("option",{value:"all",children:"All Status"}),(0,Us.jsx)("option",{value:"active",children:"Active"}),(0,Us.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Us.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:s.map(f=>(0,Us.jsx)(xa.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Us.jsxs)(z,{className:`cursor-pointer transition-all hover:shadow-lg ${o===f.id?"ring-2 ring-primary":""}`,onClick:()=>c(f),children:[(0,Us.jsx)(Ee,{className:"pb-3",children:(0,Us.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Us.jsx)(It,{children:(0,Us.jsx)(Mt,{className:"bg-blue-100",children:(0,Us.jsx)(nn.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,Us.jsxs)("div",{children:[(0,Us.jsxs)(ze,{className:"text-lg flex items-center gap-2",children:[f.name,(0,Us.jsx)(X,{variant:f.status==="active"?"default":"secondary",className:"text-si",children:f.status})]}),(0,Us.jsxs)("Us",{className:"text-sm text-muted-foreground",children:["v",f.version]})]})]}),(0,Us.jsxs)(b,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),c(f)},children:[(0,Us.jsx)(nn.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,Us.jsx)(de,{className:"Us-0",children:(0,Us.jsxs)("div",{className:"space-y-3",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Us.jsx)("Us",{className:"text-sm line-clamp-2",children:f.jobDescription})]}),f.capabilities&&f.capabilities.length>0&&(0,Us.jsxs)("div",{children:[(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,Us.jsxs)("div",{className:"flex flex-wrap gap-1",children:[f.capabilities.slice(0,3).map(u=>(0,Us.jsx)(X,{variant:"outline",className:"text-si",children:u},u)),f.capabilities.length>3&&(0,Us.jsxs)(X,{variant:"outline",className:"text-si",children:["+",f.capabilities.length-3]})]})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between text-si text-muted-foreground",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Us.jsx)(nn.Calendar,{className:"h-3 w-3"}),(0,Us.jsxs)("span",{children:["Updated ",m(f.lastUpdated)]})]}),f.knowledge&&(0,Us.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Us.jsx)(nn.Users,{className:"h-3 w-3"}),(0,Us.jsxs)("span",{children:[f.knowledge.length," docs"]})]})]}),f.workInstructions&&(0,Us.jsxs)("div",{children:[(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Us.jsx)("Us",{className:"text-si line-clamp-2",children:f.workInstructions})]})]})})]})},f.id))}),s.length===0&&(0,Us.jsx)(z,{children:(0,Us.jsx)(de,{className:"Us-6",children:(0,Us.jsxs)("div",{className:"text-center py-8",children:[(0,Us.jsx)(nn.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Us.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,Us.jsx)("Us",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function zi({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Us.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Us.jsx)(xa.AnimatePresence,{mode:"wait",children:(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Us.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Us.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Us.jsx)(nn.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Us.jsx)("Us",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,Us.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Us.jsxs)(z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Us.jsxs)(Ee,{className:"text-center pb-4",children:[(0,Us.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Us.jsx)(nn.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,Us.jsx)(ze,{className:"text-xa",children:"Clone Existing"})]}),(0,Us.jsxs)(de,{className:"text-center",children:[(0,Us.jsx)("Us",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize nn for your needs."}),(0,Us.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Us.jsx)(nn.Bot,{className:"h-4 w-4 text-blue-600"}),(0,Us.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Us.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Us.jsx)(nn.Copy,{className:"h-4 w-4 text-blue-600"}),(0,Us.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Us.jsx)(b,{className:"nn-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Us.jsxs)(z,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Us.jsxs)(Ee,{className:"text-center pb-4",children:[(0,Us.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Us.jsx)(nn.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,Us.jsx)(ze,{className:"text-xa",children:"Create New"})]}),(0,Us.jsxs)(de,{className:"text-center",children:[(0,Us.jsx)("Us",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Us.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Us.jsx)(nn.Plus,{className:"h-4 w-4 text-green-600"}),(0,Us.jsx)("span",{children:"Custom job description"})]}),(0,Us.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Us.jsx)(nn.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,Us.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Us.jsx)(b,{className:"nn-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var Hi=require("react-icons/fa");function Ke({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:n,className:l}){let[s,c]=Ni(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),m=!r&&!t||s;return(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} Us-8 text-white ${l||""}`,children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Us.jsx)(X,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xa",children:a}),(0,Us.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Us.jsxs)("div",{className:"flex items-center gap-3",children:[m&&o&&(0,Us.jsx)(b,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,Us.jsx)("button",{"aria-label":s?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 Us-1 text-white transition-colors",onClick:()=>c(!s),style:{lineHeight:0},children:s?(0,Us.jsx)(Hi.FaChevronDown,{size:22}):(0,Us.jsx)(Hi.FaChevronUp,{size:22})})]})]}),!m&&(0,Us.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Us.jsxs)("div",{className:"space-y-4",children:[(0,Us.jsx)("Us",{className:"max-w-[600px] text-white/80",children:t}),(0,Us.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Us.jsx)(b,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,Us.jsx)(b,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:r.onClick,children:r.label})]})]}),n&&(0,Us.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var ml=le(require("react")),Go=le(require("@radix-ui/react-progress"));var Ko=ml.forwardRef(({className:e,value:t,...a},o)=>(0,Us.jsx)(Go.Root,{ref:o,className:g("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Us.jsx)(Go.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ko.displayName=Go.Root.displayName;function os({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,Us.jsxs)(z,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Us.jsx)(Ee,{className:"pb-2",children:(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Us.jsx)(X,{className:"rounded-xa bg-amber-500",children:"New"}):(0,Us.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Us.jsx)(nn.Star,{className:"h-4 w-4"})})]})}),(0,Us.jsxs)(de,{className:"pb-2",children:[(0,Us.jsx)(ze,{className:"text-lg",children:e.name}),(0,Us.jsx)(na,{children:e.description}),o&&e.progress<100&&(0,Us.jsxs)("div",{className:"nn-2",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Us.jsx)("span",{children:"Installation"}),(0,Us.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Us.jsx)(Ko,{value:e.progress,className:"h-2 nn-1 rounded-xa"})]})]}),(0,Us.jsx)(la,{children:(0,Us.jsx)(b,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function mo({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:i}){return(0,Us.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[r&&(0,Us.jsxs)("div",{className:"bg-muted/50 Us-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Us.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Us.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Us.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Us.jsx)("div",{className:"divide-y",children:e.map(n=>(0,Us.jsxs)(xa.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"Us-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,Us.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Us.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted",children:n.icon}),(0,Us.jsx)("div",{children:(0,Us.jsx)("Us",{className:"font-medium",children:n.name})})]}),(0,Us.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:n.size}),(0,Us.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Us.jsx)("span",{className:"text-sm md:text-base",children:n.modified}),(0,Us.jsxs)("div",{className:"flex gap-1",children:[(0,Us.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xa",onClick:l=>{l.stopPropagation(),a?.(n)},children:(0,Us.jsx)(nn.Edit,{className:"h-4 w-4"})}),(0,Us.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xa text-red-500 hover:text-red-600",onClick:l=>{l.stopPropagation(),o?.(n)},children:(0,Us.jsx)(nn.Trash2,{className:"h-4 w-4"})}),(0,Us.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xa",children:(0,Us.jsx)(nn.MoreHorizontal,{className:"h-4 w-4"})})]})]})]},n.name))})]})}function Ui({project:e,onOpen:t,onShare:a,className:o}){return(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Us.jsxs)(z,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Us.jsxs)(Ee,{children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)(ze,{children:e.name}),(0,Us.jsxs)(X,{variant:"outline",className:"rounded-xa",children:["Due ",e.dueDate]})]}),(0,Us.jsx)(na,{children:e.description})]}),(0,Us.jsxs)(de,{className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Us.jsx)("span",{children:"Progress"}),(0,Us.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Us.jsx)(Ko,{value:e.progress,className:"h-2 rounded-xa"})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Us.jsxs)("div",{className:"flex items-center",children:[(0,Us.jsx)(nn.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,Us.jsxs)("div",{className:"flex items-center",children:[(0,Us.jsx)(nn.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,Us.jsxs)(la,{className:"flex gap-2",children:[(0,Us.jsx)(b,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Us.jsx)(b,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Us.jsx)(nn.Share2,{className:"h-4 w-4"})})]})]})})}var is=[{name:"PixelMaster",icon:(0,Us.jsx)(nn.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Us.jsx)(nn.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Us.jsx)(nn.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Us.jsx)(nn.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Us.jsx)(nn.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Us.jsx)(nn.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Us.jsx)(nn.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Us.jsx)(nn.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Us.jsx)(nn.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Us.jsx)(nn.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Us.jsx)(nn.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Us.jsx)(nn.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],vl=[{name:"Brand Redesign.pxm",app:"PixelMaster",modified:"2 hours ago",icon:(0,Us.jsx)(nn.ImageIcon,{className:"text-violet-500"}),shared:!0,size:"24.5 MB",collaborators:3},{name:"Company Logo.vec",app:"VectorPro",modified:"Yesterday",icon:(0,Us.jsx)(nn.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,Us.jsx)(nn.Video,{className:"text-pink-500"}),shared:!1,size:"1.2 GB",collaborators:0},{name:"UI Animation.mfx",app:"MotionFX",modified:"Last week",icon:(0,Us.jsx)(nn.Sparkles,{className:"text-blue-500"}),shared:!0,size:"345 MB",collaborators:4},{name:"Magazine Layout.pgc",app:"PageCraft",modified:"2 weeks ago",icon:(0,Us.jsx)(nn.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,Us.jsx)(nn.LayoutGrid,{className:"text-fuchsia-500"}),shared:!0,size:"18.3 MB",collaborators:5},{name:"Product Photography.phl",app:"PhotoLab",modified:"Last month",icon:(0,Us.jsx)(nn.Camera,{className:"text-teal-500"}),shared:!1,size:"156 MB",collaborators:0}];var bl=[{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 hl({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,i]=(0,si.useState)(""),n=(0,si.useMemo)(()=>e.filter(s=>s.name.toLowerCase().includes(r.toLowerCase())||s.email.toLowerCase().includes(r.toLowerCase())||s.role.toLowerCase().includes(r.toLowerCase())||(s.skills||[]).some(m=>m.toLowerCase().includes(r.toLowerCase()))),[e,r]),l=s=>{t(s)};return(0,Us.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Us.jsx)(xa.AnimatePresence,{mode:"wait",children:(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Us.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Us.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Us.jsx)(nn.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Us.jsx)("Us",{className:"text-muted-foreground",children:"Choose a user to add Us a colleague"})]})]}),(0,Us.jsx)(z,{className:"container",children:(0,Us.jsx)(de,{className:"Us-6",children:(0,Us.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,Us.jsx)("div",{className:"flex-1",children:(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsx)(nn.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Us.jsx)(O,{placeholder:"Search users by name, email, role, or skills...",value:r,onChange:s=>i(s.target.value),className:"xa-9"})]})})})})}),(0,Us.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(s=>(0,Us.jsx)(xa.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Us.jsxs)(z,{className:`cursor-pointer transition-all hover:shadow-lg ${o===s.id?"ring-2 ring-primary":""}`,onClick:()=>l(s),children:[(0,Us.jsx)(Ee,{className:"pb-3",children:(0,Us.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Us.jsxs)(It,{children:[(0,Us.jsx)(ia,{src:s.avatar,alt:s.name}),(0,Us.jsx)(Mt,{children:(0,Us.jsx)(nn.User,{className:"h-4 w-4"})})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(ze,{className:"text-lg",children:s.name}),(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:s.role})]})]}),o===s.id&&(0,Us.jsx)(nn.Check,{className:"h-5 w-5 text-primary"})]})}),(0,Us.jsx)(de,{className:"Us-0",children:(0,Us.jsxs)("div",{className:"space-y-3",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Us.jsx)("Us",{className:"text-sm font-medium",children:s.email})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:"Department"}),(0,Us.jsx)(X,{variant:"secondary",children:s.department})]}),s.location&&(0,Us.jsxs)("div",{children:[(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:"Location"}),(0,Us.jsx)("Us",{className:"text-sm",children:s.location})]}),s.skills&&s.skills.length>0&&(0,Us.jsxs)("div",{children:[(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,Us.jsxs)("div",{className:"flex flex-wrap gap-1",children:[s.skills.slice(0,3).map(c=>(0,Us.jsx)(X,{variant:"outline",className:"text-si",children:c},c)),s.skills.length>3&&(0,Us.jsxs)(X,{variant:"outline",className:"text-si",children:["+",s.skills.length-3]})]})]})]})})]})},s.id))}),n.length===0&&(0,Us.jsx)(z,{className:"container nn-4",children:(0,Us.jsx)(de,{className:"Us-6",children:(0,Us.jsxs)("div",{className:"text-center py-8",children:[(0,Us.jsx)(nn.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Us.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,Us.jsx)("Us",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function $o({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:l=[],existingDigitalColleagues:s=[]}){let[c,m]=(0,si.useState)(e||[]),[f,u]=(0,si.useState)(""),[v,N]=(0,si.useState)("all"),[T,h]=(0,si.useState)("all"),[x,C]=(0,si.useState)("all"),[L,G]=(0,si.useState)(null),[J,Z]=(0,si.useState)(null),[se,w]=(0,si.useState)("main"),k=c.filter(R=>{let Ze=R.name.toLowerCase().includes(f.toLowerCase())||R.type==="human"&&(R.email.toLowerCase().includes(f.toLowerCase())||R.role.toLowerCase().includes(f.toLowerCase()))||R.type==="digital"&&R.jobDescription.toLowerCase().includes(f.toLowerCase()),Xe=v==="all"||R.type==="human"&&R.department===v,Pa=T==="all"||R.status===T;return Ze&&Xe&&Pa}),B=k.filter(R=>R.type==="human"),ge=k.filter(R=>R.type==="digital"),E=()=>{w("typeSelection")},P=R=>{R.type==="digital"&&(G(R),w("form"))},y=R=>{R.type==="digital"&&(Z(R),w("view"))},ae=R=>{let Ze={id:`human-${Date.now()}`,type:"human",name:R.name,email:R.email,role:R.role,department:R.department,phone:R.phone,location:R.location,timezone:R.timezone,skills:R.skills,bio:R.bio,status:"active",joinedDate:new Date,lastActive:new Date};m(Xe=>[...Xe,Ze]),t?.(Ze),w("main")},De=R=>{m(Ze=>[...Ze,R]),t?.(R),w("main")},tt=()=>{G(null),w("form")},Ie=R=>{L?(m(Ze=>Ze.map(Xe=>Xe.id===R.id?R:Xe)),a?.(R)):(m(Ze=>[...Ze,R]),t?.(R)),w("main"),G(null)},at=()=>{w("main"),G(null),Z(null)},j=()=>{w("main"),Z(null)},ie=()=>{J&&(G(J),Z(null),w("form"))},ke=R=>{m(Ze=>Ze.filter(Xe=>Xe.id!==R)),o?.(R)},bt=()=>{u(""),N("all"),h("all")},Lt=()=>{let R=[];return s.forEach(Xe=>{R.push(...Xe.knowledge,...Xe.coreKnowledge)}),c.forEach(Xe=>{Xe.type==="digital"&&R.push(...Xe.knowledge,...Xe.coreKnowledge)}),R.filter((Xe,Pa,Qo)=>Pa===Qo.findIndex(ho=>ho.id===Xe.id))};return se==="typeSelection"?(0,Us.jsx)(ji,{onSelectHuman:()=>w("userSelection"),onSelectDigital:()=>w("digitalOptions"),onCancel:()=>w("main")}):se==="userSelection"?(0,Us.jsx)(hl,{users:l,onUserSelect:ae,onCancel:()=>w("typeSelection")}):se==="digitalOptions"?(0,Us.jsx)(zi,{onCloneExisting:()=>w("digitalClone"),onCreateNew:tt,onCancel:()=>w("typeSelection")}):se==="digitalClone"?(0,Us.jsx)(Oi,{digitalColleagues:s,onColleagueClone:De,onCancel:()=>w("digitalOptions")}):se==="form"?(0,Us.jsx)(Ho,{colleague:L||void 0,onSave:Ie,onCancel:at,availableKnowledgeDocuments:Lt()}):se==="view"?(0,Us.jsx)(Ho,{colleague:J||void 0,onSave:Ie,onCancel:j,readOnly:!0,availableKnowledgeDocuments:Lt()}):(0,Us.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Us.jsx)(xa.AnimatePresence,{mode:"wait",children:(0,Us.jsx)(xa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Us.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Us.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:E}}),(0,Us.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Us.jsxs)(z,{children:[(0,Us.jsxs)(Ee,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Us.jsx)(ze,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Us.jsx)(nn.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Us.jsxs)(de,{children:[(0,Us.jsx)("div",{className:"text-2xl font-bold",children:c.length}),(0,Us.jsxs)("Us",{className:"text-si text-muted-foreground",children:[c.filter(R=>R.status==="active").length," active"]})]})]}),(0,Us.jsxs)(z,{children:[(0,Us.jsxs)(Ee,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Us.jsx)(ze,{className:"text-sm font-medium",children:"Human Members"}),(0,Us.jsx)(nn.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Us.jsxs)(de,{children:[(0,Us.jsx)("div",{className:"text-2xl font-bold",children:c.filter(R=>R.type==="human").length}),(0,Us.jsxs)("Us",{className:"text-si text-muted-foreground",children:[c.filter(R=>R.type==="human"&&R.status==="active").length," active"]})]})]}),(0,Us.jsxs)(z,{children:[(0,Us.jsxs)(Ee,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Us.jsx)(ze,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Us.jsx)(nn.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Us.jsxs)(de,{children:[(0,Us.jsx)("div",{className:"text-2xl font-bold",children:c.filter(R=>R.type==="digital").length}),(0,Us.jsxs)("Us",{className:"text-si text-muted-foreground",children:[c.filter(R=>R.type==="digital"&&R.status==="active").length," active"]})]})]})]}),(0,Us.jsx)(z,{children:(0,Us.jsx)(de,{className:"Us-6",children:(0,Us.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Us.jsx)("div",{className:"flex-1",children:(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsx)(nn.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Us.jsx)(O,{placeholder:"Search colleagues...",value:f,onChange:R=>u(R.target.value),className:"xa-9"})]})}),(0,Us.jsxs)(Be,{value:v,onValueChange:N,children:[(0,Us.jsx)(Re,{className:"w-full md:w-[180px]",children:(0,Us.jsx)(Ve,{placeholder:"Department"})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"all",children:"All Departments"}),i.map(R=>(0,Us.jsx)(_,{value:R,children:R},R))]})]}),(0,Us.jsxs)(Be,{value:T,onValueChange:h,children:[(0,Us.jsx)(Re,{className:"w-full md:w-[140px]",children:(0,Us.jsx)(Ve,{placeholder:"Status"})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"all",children:"All Status"}),(0,Us.jsx)(_,{value:"active",children:"Active"}),(0,Us.jsx)(_,{value:"inactive",children:"Inactive"})]})]}),(f||v!=="all"||T!=="all")&&(0,Us.jsxs)(b,{variant:"outline",onClick:bt,className:"gap-2",children:[(0,Us.jsx)(nn.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Us.jsxs)("div",{className:"space-y-4",children:[(0,Us.jsx)(to,{activeTab:x,onTabChange:C,tabOptions:[{value:"all",label:`All (${k.length})`},{value:"human",label:`Human (${B.length})`},{value:"digital",label:`Digital (${ge.length})`}],maxWidth:"400px",gridCols:3}),x==="all"&&(0,Us.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:k.map(R=>(0,Us.jsx)(ro,{colleague:R,onEdit:P,onDelete:ke,onViewDetails:y,compact:r},R.id))}),x==="human"&&(0,Us.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:B.map(R=>(0,Us.jsx)(ro,{colleague:R,onEdit:P,onDelete:ke,onViewDetails:y,compact:r},R.id))}),x==="digital"&&(0,Us.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(R=>(0,Us.jsx)(ro,{colleague:R,onEdit:P,onDelete:ke,onViewDetails:y,compact:r},R.id))})]}),k.length===0&&(0,Us.jsx)(z,{children:(0,Us.jsx)(de,{className:"Us-6",children:(0,Us.jsxs)("div",{className:"text-center py-8",children:[(0,Us.jsx)(nn.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Us.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,Us.jsx)("Us",{className:"text-muted-foreground mb-4",children:f||v!=="all"||T!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,Us.jsxs)(b,{onClick:E,className:"gap-2",children:[(0,Us.jsx)(nn.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function Ki({document:e,onSave:t,onCancel:a}){let[o,r]=(0,si.useState)({...e,updatedAt:new Date}),i=()=>{t(o)},n=l=>{let s=l.split(",").map(c=>c.trim()).filter(c=>c.length>0);r(c=>({...c,tags:s}))};return(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Us.jsxs)("div",{className:"border-b border-border bg-card Us-8",children:[(0,Us.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Us.jsx)("div",{className:"flex-shrink-0 Us-3 rounded-xa bg-primary/10 border border-primary/20",children:(0,Us.jsx)(nn.Edit3,{className:"h-6 w-6 text-primary"})}),(0,Us.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Us.jsxs)("div",{className:"flex gap-2",children:[(0,Us.jsxs)(b,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,Us.jsx)(nn.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Us.jsxs)(b,{size:"sm",onClick:i,className:"gap-2",children:[(0,Us.jsx)(nn.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Us.jsxs)("div",{className:"space-y-4",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Us.jsx)(O,{value:o.title,onChange:l=>r(s=>({...s,title:l.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Us.jsx)(Oe,{value:o.description||"",onChange:l=>r(s=>({...s,description:l.target.value})),placeholder:"Document description...",rows:2})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Tags (comma-separated)"}),(0,Us.jsx)(O,{value:o.tags?.join(", ")||"",onChange:l=>n(l.target.value),placeholder:"tag1, tag2, tag3..."})]}),(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Us.jsx)(X,{variant:"secondary",className:"font-mono",children:o.format.toUpperCase()})]})]})]}),(0,Us.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Us.jsxs)("div",{className:"Us-8",children:[(0,Us.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Us.jsx)(Oe,{value:o.content||"",onChange:l=>r(s=>({...s,content:l.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}function _i({document:e,onDocumentUpdate:t,editable:a=!0}){let[o,r]=(0,si.useState)(!1),i=c=>{switch(c){case"markdown":case"mdx":return(0,Us.jsx)(nn.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Us.jsx)(nn.File,{className:"h-6 w-6 text-success"});default:return(0,Us.jsx)(nn.File,{className:"h-6 w-6 text-muted-foreground"})}},n=c=>{switch(c){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"}},l=c=>{r(!1),t?.(c)},s=()=>{r(!1)};return o?(0,Us.jsx)(Ki,{document:e,onSave:l,onCancel:s}):(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Us.jsxs)("div",{className:"border-b border-border bg-card Us-8",children:[(0,Us.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Us.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Us.jsx)("div",{className:"flex-shrink-0 Us-3 rounded-xa bg-muted border border-border",children:i(e.format)}),(0,Us.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Us.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Us.jsx)("Us",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,Us.jsx)("div",{className:"flex-shrink-0",children:(0,Us.jsxs)(b,{variant:"outline",size:"sm",onClick:()=>r(!0),className:"gap-2",children:[(0,Us.jsx)(nn.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,Us.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Us.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${n(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(c=>(0,Us.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",c]},c))]})]}),(0,Us.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Us.jsxs)("div",{className:"Us-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Us.jsxs)("div",{className:"mb-6",children:[(0,Us.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Us.jsx)("div",{className:"bg-muted rounded-lg Us-3 border border-border",children:(0,Us.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-x-4 gap-y-1 text-si",children:Object.entries(e.metadata).map(([c,m])=>(0,Us.jsxs)("div",{className:"flex gap-1",children:[(0,Us.jsxs)("span",{className:"text-muted-foreground font-medium",children:[c.replace(/([A-Z])/g," $1").trim(),":"]}),(0,Us.jsx)("span",{className:"text-foreground truncate",children:String(m)})]},c))})})]}),(0,Us.jsx)("div",{className:"space-y-4",children:e.content?(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsx)("div",{className:"bg-card border border-border rounded-xa Us-6 overflow-hidden",children:(0,Us.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,Us.jsx)("div",{className:"absolute bottom-0 left-0 right-0 h-16 bg-gradient-to-t from-card to-transparent rounded-b-xa flex items-end justify-center pb-2",children:(0,Us.jsx)("span",{className:"text-muted-foreground text-si",children:"Content truncated"})})]}):(0,Us.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xa border-2 border-dashed border-border",children:[(0,Us.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Us.jsx)(nn.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Us.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Us.jsx)("Us",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function Cl({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n=!0}){let[l,s]=(0,si.useState)(o===0),c=a&&Object.keys(a).length>0,m=t.length+(a?Object.values(a).reduce((v,N)=>v+N.documents.length,0):0),f=v=>{switch(v){case"markdown":case"mdx":return(0,Us.jsx)(nn.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,Us.jsx)(nn.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Us.jsx)(nn.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},u=v=>{let N=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return N[v%N.length]};return(0,Us.jsxs)("div",{className:"space-y-1",children:[(c||t.length>0)&&(0,Us.jsxs)(xa.motion.div,{className:`group flex items-center gap-3 Us-3 rounded-xa 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:()=>s(!l),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Us.jsx)("div",{className:`w-1 h-6 rounded-full ${u(o)}`}),(0,Us.jsx)(xa.motion.div,{animate:{rotate:l?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Us.jsx)(nn.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Us.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Us.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Us.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&m>0&&(0,Us.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Us.jsx)("span",{className:"inline-flex items-center justify-center w-6 h-6 text-si font-medium bg-muted text-muted-foreground rounded-full",children:m})})]})]}),(0,Us.jsx)(xa.motion.div,{initial:!1,animate:{height:l?"auto":0,opacity:l?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Us.jsxs)("div",{className:"Us-2 space-y-1",children:[t.map((v,N)=>(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:N*.05,duration:.2},className:`group flex items-center gap-3 Us-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===v.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?.(v),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Us.jsx)("div",{className:"flex-shrink-0",children:f(v.format)}),(0,Us.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Us.jsx)("Us",{className:`text-sm truncate transition-colors ${i===v.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:v.title}),v.description&&(0,Us.jsx)("Us",{className:"text-si text-muted-foreground truncate nn-0.5",children:v.description})]}),v.tags&&v.tags.length>0&&(0,Us.jsx)("div",{className:"flex-shrink-0",children:(0,Us.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-si font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:v.tags[0]})})]},v.id)),a&&Object.entries(a).map(([v,N])=>(0,Us.jsx)(Cl,{label:v,documents:N.documents,children:N.children,level:o+1,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:n},v))]})})]})}function $i({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:i,className:n,editable:l=!0}){let[s,c]=(0,si.useState)(""),[m,f]=(0,si.useState)(null),u=(0,si.useMemo)(()=>s?e.filter(T=>T.title.toLowerCase().includes(s.toLowerCase())||T.description?.toLowerCase().includes(s.toLowerCase())||T.tags?.some(h=>h.toLowerCase().includes(s.toLowerCase()))||Object.values(T.metadata||{}).some(h=>String(h).toLowerCase().includes(s.toLowerCase()))):e,[e,s]),v=(0,si.useMemo)(()=>{let T=(h,x)=>{if(x.length===0)return{};let[C,...L]=x;return h.reduce((J,Z)=>{let se=Z.metadata?.[C]||"Uncategorized",w=String(se);if(J[w]||(J[w]={documents:[],children:{}}),L.length===0)J[w].documents.push(Z);else{let k=T([Z],L),B=Object.keys(k)[0];B&&(J[w].children||(J[w].children={}),J[w].children[B]?J[w].children[B].documents.push(...k[B].documents):J[w].children[B]=k[B])}return J},{})};return T(u,t.groupBy)},[u,t.groupBy]),N=T=>{f(T),a?.(T)};return(0,Us.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,Us.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Us.jsx)("div",{className:"Us-6 border-b border-border",children:(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsx)("div",{className:"absolute inset-y-0 left-0 xa-3 flex items-center pointer-events-none",children:(0,Us.jsx)(nn.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Us.jsx)(O,{placeholder:"Search knowledge base...",value:s,onChange:T=>c(T.target.value),className:"xa-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xa h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Us.jsx)(Yt,{className:"h-[calc(100%-100px)]",children:(0,Us.jsxs)("div",{className:"Us-4 space-y-3",children:[Object.entries(v).map(([T,h])=>(0,Us.jsx)(Cl,{label:T,documents:h.documents,children:h.children,level:0,onDocumentClick:N,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},T)),Object.keys(v).length===0&&(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Us.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Us.jsx)(nn.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Us.jsx)("Us",{className:"text-sm font-medium",children:"No documents found"}),(0,Us.jsx)("Us",{className:"text-si nn-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Us.jsx)("div",{className:"flex-1 bg-background",children:m?(0,Us.jsx)(_i,{document:m,onDocumentUpdate:r,editable:l}):(0,Us.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Us.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Us.jsx)(nn.FileText,{className:"h-10 w-10 text-primary"})}),(0,Us.jsx)("h3",{className:"text-xa font-semibold text-foreground mb-2",children:"Select a document"}),(0,Us.jsx)("Us",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function Wo({documents:e=[],contexts:t=[],onDocumentClick:a=n=>console.log("Document clicked:",n),onDocumentShare:o=n=>console.log("Share document:",n),onLoadDocumentContent:r,selectedDocumentId:i}){let[n,l]=(0,si.useState)(t[0]);return!t||t.length===0?(0,Us.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Us.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Us.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,Us.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Us.jsx)("Us",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,Us.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Us.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,Us.jsxs)("div",{className:"nn-6",children:[(0,Us.jsx)("div",{className:"border-b border-border",children:(0,Us.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(s=>(0,Us.jsxs)("button",{onClick:()=>l(s),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${n.id===s.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[s.icon,s.label]},s.id))})}),n.description&&(0,Us.jsx)("div",{className:"nn-3 px-1",children:(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,Us.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Us.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Us.jsx)($i,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function ss({title:e="Digital Colleagues",businessUnits:t}){let[a,o]=(0,si.useState)("home"),[r,i]=(0,si.useState)(t[0]),n=x=>{console.log("Opening app:",x.name)},l=x=>{console.log("Favoriting app:",x.name)},s=x=>{console.log("Opening file:",x.name)},c=x=>{console.log("Sharing file:",x.name)},m=x=>{console.log("Opening project:",x.name)},f=x=>{console.log("Sharing project:",x.name)},u=x=>{i(x),console.log("Business unit changed to:",x.name)},v=()=>{console.log("Copilot clicked - navigating to chat"),o("chat")},N=x=>{console.log("Notification removed:",x)},T=()=>{console.log("All notifications removed")},h=()=>{switch(a){case"home":return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.jsxs)("section",{className:"text-center py-12",children:[(0,Us.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",r.name," team"]}),(0,Us.jsx)("Us",{className:"text-xa text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,Us.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,Us.jsxs)("div",{className:"bg-card Us-6 rounded-lg border",children:[(0,Us.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,Us.jsx)("Us",{className:"text-3xl font-bold text-primary",children:"12"}),(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Us.jsxs)("div",{className:"bg-card Us-6 rounded-lg border",children:[(0,Us.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,Us.jsx)("Us",{className:"text-3xl font-bold text-primary",children:"8"}),(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Us.jsxs)("div",{className:"bg-card Us-6 rounded-lg border",children:[(0,Us.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,Us.jsx)("Us",{className:"text-3xl font-bold text-primary",children:"156"}),(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Us.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,Us.jsx)($o,{});case"chat":return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.jsxs)("section",{className:"text-center py-12",children:[(0,Us.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,Us.jsxs)("Us",{className:"text-xa text-muted-foreground mb-8",children:["Connect with your ",r.name," team members and collaborate in real-time."]})]}),(0,Us.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,Us.jsxs)("div",{className:"space-y-8",children:[(0,Us.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,Us.jsxs)("section",{className:"space-y-4",children:[(0,Us.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Us.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:is.filter(x=>x.new).map(x=>(0,Us.jsx)(os,{app:x,showProgress:!0,onOpen:n,onFavorite:l},x.name))})]}),(0,Us.jsxs)("section",{className:"space-y-4",children:[(0,Us.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Us.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:is.map(x=>(0,Us.jsx)(os,{app:x,onOpen:n,onFavorite:l},x.name))})]})]});case"knowledge":return(0,Us.jsx)(Wo,{});case"files":return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.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,Us.jsxs)("section",{className:"space-y-4",children:[(0,Us.jsx)("div",{className:"flex items-center justify-between",children:(0,Us.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Us.jsx)(mo,{files:vl,onFileClick:s})]})]});case"projects":return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.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,Us.jsxs)("section",{className:"space-y-4",children:[(0,Us.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Us.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:wn.map(x=>(0,Us.jsx)(Ui,{project:x,onOpen:m,onShare:f},x.name))})]})]});case"learn":return(0,Us.jsxs)("div",{className:"space-y-8",children:[(0,Us.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,Us.jsxs)("section",{className:"space-y-4",children:[(0,Us.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Us.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:bl.slice(0,3).map(x=>(0,Us.jsxs)("div",{className:"rounded-3xl border Us-6",children:[(0,Us.jsx)("h3",{className:"font-semibold mb-2",children:x.title}),(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground mb-4",children:x.description}),(0,Us.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Us.jsx)("span",{children:x.duration}),(0,Us.jsx)("span",{children:x.level})]})]},x.title))})]})]});default:return null}};return(0,Us.jsx)(Pi,{sidebarItems:hn,title:e,notifications:xn,businessUnits:t,currentBusinessUnit:r,onBusinessUnitChange:u,activeTab:a,onTabChange:o,showTabs:!0,onActionClick:v,actionIcon:(0,Us.jsx)(nn.Bot,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:N,onRemoveAll:T,children:(0,Us.jsx)(xa.AnimatePresence,{mode:"wait",children:(0,Us.jsx)(xa.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 qo({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:i=!1,className:n}){let[l,s]=(0,si.useState)(e),[c,m]=(0,si.useState)(""),[f,u]=(0,si.useState)("all"),[v,N]=(0,si.useState)("all"),T=Array.from(new Set(l.map(w=>w.app))),h=l.filter(w=>{let k=w.name.toLowerCase().includes(c.toLowerCase()),B=f==="all"||w.app===f;return k&&B}),x=h.slice(0,10),C=h.filter(w=>w.shared),L=()=>{console.log("Add file clicked")},G=w=>{console.log("Edit file:",w.name),a?.(w)},J=w=>{s(k=>k.filter(B=>B.name!==w.name)),o?.(w.name)},Z=w=>{console.log("File clicked:",w.name),r?.(w)},se=()=>{m(""),u("all")};return(0,Us.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Us.jsx)(xa.AnimatePresence,{mode:"wait",children:(0,Us.jsx)(xa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Us.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Us.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:L},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Us.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Us.jsxs)(z,{children:[(0,Us.jsxs)(Ee,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Us.jsx)(ze,{className:"text-sm font-medium",children:"Total Files"}),(0,Us.jsx)(nn.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Us.jsxs)(de,{children:[(0,Us.jsx)("div",{className:"text-2xl font-bold",children:l.length}),(0,Us.jsxs)("Us",{className:"text-si text-muted-foreground",children:[l.filter(w=>w.shared).length," shared"]})]})]}),(0,Us.jsxs)(z,{children:[(0,Us.jsxs)(Ee,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Us.jsx)(ze,{className:"text-sm font-medium",children:"Storage Used"}),(0,Us.jsx)(nn.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Us.jsxs)(de,{children:[(0,Us.jsx)("div",{className:"text-2xl font-bold",children:"2.4 GB"}),(0,Us.jsx)("Us",{className:"text-si text-muted-foreground",children:"of 10 GB used"})]})]}),(0,Us.jsxs)(z,{children:[(0,Us.jsxs)(Ee,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Us.jsx)(ze,{className:"text-sm font-medium",children:"Recent Activity"}),(0,Us.jsx)(nn.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Us.jsxs)(de,{children:[(0,Us.jsx)("div",{className:"text-2xl font-bold",children:"12"}),(0,Us.jsx)("Us",{className:"text-si text-muted-foreground",children:"files modified today"})]})]})]}),(0,Us.jsx)(z,{children:(0,Us.jsx)(de,{className:"Us-6",children:(0,Us.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Us.jsx)("div",{className:"flex-1",children:(0,Us.jsxs)("div",{className:"relative",children:[(0,Us.jsx)(nn.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Us.jsx)(O,{placeholder:"Search files...",value:c,onChange:w=>m(w.target.value),className:"xa-9"})]})}),(0,Us.jsxs)(Be,{value:f,onValueChange:u,children:[(0,Us.jsx)(Re,{className:"w-full md:w-[180px]",children:(0,Us.jsx)(Ve,{placeholder:"Filter by app"})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"all",children:"All Apps"}),T.map(w=>(0,Us.jsx)(_,{value:w,children:w},w))]})]}),(c||f!=="all")&&(0,Us.jsxs)(b,{variant:"outline",onClick:se,className:"gap-2",children:[(0,Us.jsx)(nn.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Us.jsxs)("div",{className:"space-y-4",children:[(0,Us.jsx)(to,{activeTab:v,onTabChange:N,tabOptions:[{value:"all",label:`All Files (${h.length})`},{value:"recent",label:`Recent (${x.length})`},{value:"shared",label:`Shared (${C.length})`}],maxWidth:"500px",gridCols:3}),v==="all"&&(0,Us.jsx)(mo,{files:h,onFileClick:Z,onFileEdit:G,onFileDelete:J,showHeader:!i}),v==="recent"&&(0,Us.jsx)(mo,{files:x,onFileClick:Z,onFileEdit:G,onFileDelete:J,showHeader:!i}),v==="shared"&&(0,Us.jsx)(mo,{files:C,onFileClick:Z,onFileEdit:G,onFileDelete:J,showHeader:!i})]}),h.length===0&&(0,Us.jsx)(z,{children:(0,Us.jsx)(de,{className:"Us-6",children:(0,Us.jsxs)("div",{className:"text-center py-8",children:[(0,Us.jsx)(nn.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Us.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Us.jsx)("Us",{className:"text-muted-foreground mb-4",children:c||f!=="all"?"Try adjusting your filters to see more results.":"Get started by uploading your first file."}),(0,Us.jsxs)(b,{onClick:L,className:"gap-2",children:[(0,Us.jsx)(nn.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var kl=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:i=!1})=>{let n=c=>{c.preventDefault()},l=c=>{c.preventDefault(),r(t)};return(0,Us.jsxs)(z,{className:`Us-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-si":""}`,onDragOver:n,onDrop:l,children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Us.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,Us.jsx)(X,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Us.jsx)("div",{className:"space-y-4 min-h-[200px]",children:o})]})};var qi=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let i=m=>{a(e)},n=()=>{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"}},s=()=>{switch(e.type){case"story":return(0,Us.jsx)(nn.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Us.jsx)(nn.Bug,{className:"h-3 w-3"});case"spike":return(0,Us.jsx)(nn.Zap,{className:"h-3 w-3"});case"task":default:return(0,Us.jsx)(nn.AlertCircle,{className:"h-3 w-3"})}},c=()=>{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,Us.jsx)(z,{className:"Us-3 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-sm",draggable:!0,onDragStart:i,onClick:n,children:(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-si font-medium ${c()}`,children:s()}),(0,Us.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,Us.jsxs)(z,{className:"Us-4 bg-card border border-border hover:border-accent cursor-pointer transition-all duration-200 hover:shadow-md",draggable:!0,onDragStart:i,onClick:n,children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Us.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${c()}`,children:[s(),(0,Us.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Us.jsxs)("div",{className:"flex gap-1",children:[(0,Us.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-si font-medium ${l()}`,children:e.priority}),(0,Us.jsx)("div",{className:"flex items-center gap-2 px-3 py-1 border border-accent rounded-full text-si font-medium",children:e.points})]})]}),(0,Us.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Us.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,Us.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Us.jsx)(nn.User,{className:"h-4 w-4"}),(0,Us.jsx)("span",{children:e.assignee})]})})]})};var Ha=le(require("react")),go=le(require("@radix-ui/react-toggle-group"));var Pl=le(require("react")),ns=le(require("@radix-ui/react-toggle"));var ls=(0,an.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=nn]:bg-accent data-[state=nn]: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"}}),Jc=Pl.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,Us.jsx)(ns.Root,{ref:r,className:g(ls({variant:t,size:a,className:e})),...o}));Jc.displayName=ns.Root.displayName;var Al=Ha.createContext({size:"default",variant:"default"}),Ua=Ha.forwardRef(({className:e,variant:t,size:a,children:o,...r},i)=>(0,Us.jsx)(go.Root,{ref:i,className:g("flex items-center justify-center gap-1",e),...r,children:(0,Us.jsx)(Al.Provider,{value:{variant:t,size:a},children:o})}));Ua.displayName=go.Root.displayName;var Va=Ha.forwardRef(({className:e,children:t,variant:a,size:o,...r},i)=>{let n=Ha.useContext(Al);return(0,Us.jsx)(go.Item,{ref:i,className:g(ls({variant:n.variant||a,size:n.size||o}),e),...r,children:t})});Va.displayName=go.Item.displayName;var qc=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:nn.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:nn.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:nn.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:nn.Zap}],Xc=[{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"}],Yi=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,defaultEpicId:i})=>{let[n,l]=(0,si.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,si.useEffect)(()=>{e&&i&&l(m=>({...m,epicId:i}))},[e,i]),(0,si.useEffect)(()=>{e&&l({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""})},[e]);let s=m=>{m.preventDefault(),n.title.trim()&&n.epicId&&(a({title:n.title.trim(),description:n.description.trim(),status:"todo",priority:n.priority,type:n.type,points:n.points,epicId:n.epicId,sprintId:n.sprintId==="none"?void 0:n.sprintId,assignee:n.assignee.trim()||"Unassigned"}),l({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""}),t())},c=(m,f)=>{l(u=>({...u,[m]:f}))};return(0,Us.jsx)(wt,{open:e,onOpenChange:t,children:(0,Us.jsxs)(ht,{className:"sm:max-w-md",children:[(0,Us.jsx)(xt,{children:(0,Us.jsx)(yt,{children:"Add New Task"})}),(0,Us.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"title",children:"Task Title"}),(0,Us.jsx)(O,{id:"title",value:n.title,onChange:m=>c("title",m.target.value),placeholder:"Enter task title",required:!0})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Us.jsx)(Oe,{id:"description",value:n.description,onChange:m=>c("description",m.target.value),placeholder:"Enter task description",rows:3})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"Type"}),(0,Us.jsx)(Ua,{type:"single",value:n.type,onValueChange:m=>m&&c("type",m),children:qc.map(m=>{let f=m.icon;return(0,Us.jsxs)(Va,{value:m.value,className:"flex items-center gap-2 data-[state=nn]:bg-primary data-[state=nn]:text-primary-foreground",children:[(0,Us.jsx)(f,{className:"h-4 w-4"}),m.label]},m.value)})})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"Priority"}),(0,Us.jsx)(Ua,{type:"single",value:n.priority,onValueChange:m=>m&&c("priority",m),children:Xc.map(m=>(0,Us.jsx)(Va,{value:m.value,className:"data-[state=nn]:bg-primary data-[state=nn]:text-primary-foreground",children:m.label},m.value))})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"points",children:"Story Points"}),(0,Us.jsx)(O,{id:"points",type:"number",min:"1",max:"100",value:n.points,onChange:m=>c("points",parseInt(m.target.value)||1),placeholder:"Enter story points",required:!0})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"epic",children:"Epic"}),(0,Us.jsxs)(Be,{value:n.epicId,onValueChange:m=>c("epicId",m),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{placeholder:"Select an epic"})}),(0,Us.jsx)(Ae,{children:o.map(m=>(0,Us.jsx)(_,{value:m.id,children:(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)("div",{className:`w-3 h-3 rounded-full ${m.color}`}),m.name]})},m.id))})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Us.jsxs)(Be,{value:n.sprintId,onValueChange:m=>c("sprintId",m),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{placeholder:"Select a sprint"})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"none",children:"No Sprint"}),r.map(m=>(0,Us.jsx)(_,{value:m.id,children:(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[m.name,m.isActive&&(0,Us.jsx)("span",{className:"text-si bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},m.id))]})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"assignee",children:"Assignee"}),(0,Us.jsx)(O,{id:"assignee",value:n.assignee,onChange:m=>c("assignee",m.target.value),placeholder:"Enter assignee name",required:!0})]}),(0,Us.jsxs)(Ao,{children:[(0,Us.jsx)(b,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Us.jsx)(b,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var cs=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:i="",disabled:n=!1})=>{let[l,s]=(0,si.useState)(!1),[c,m]=(0,si.useState)(""),f=()=>{n||(s(!0),m(t))},u=async()=>{c!==t&&await r(e,c),s(!1)},v=N=>{N.key==="Enter"&&!o||N.key==="Enter"&&N.ctrlKey&&o?u():N.key==="Escape"&&(s(!1),m(""))};return(0,Us.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,Us.jsx)(A,{children:a}),l?o?(0,Us.jsx)(Oe,{value:c,onChange:N=>m(N.target.value),onBlur:u,onKeyDown:v,autoFocus:!0,rows:4,className:"resize-none"}):(0,Us.jsx)(O,{value:c,onChange:N=>m(N.target.value),onBlur:u,onKeyPress:v,autoFocus:!0,className:"text-lg font-medium"}):(0,Us.jsxs)("div",{onClick:f,className:`${n?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 Us-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,Us.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!n&&(0,Us.jsx)(nn.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var El=({comments:e,onAddComment:t})=>{let[a,o]=(0,si.useState)(""),r=n=>n.split(" ").map(l=>l[0]).join("").toUpperCase(),i=()=>{a.trim()&&(t(a),o(""))};return(0,Us.jsxs)("div",{className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)(nn.MessageSquare,{className:"h-5 w-5"}),(0,Us.jsx)(A,{className:"text-lg font-medium",children:"Comments"}),(0,Us.jsx)(X,{variant:"secondary",children:e.length})]}),(0,Us.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(n=>(0,Us.jsxs)("div",{className:"flex gap-3 Us-3 bg-muted/50 rounded-lg",children:[(0,Us.jsx)(It,{className:"h-8 w-8 nn-1",children:(0,Us.jsx)(Mt,{className:"text-si bg-muted text-muted-foreground",children:r(n.author)})}),(0,Us.jsxs)("div",{className:"flex-1",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Us.jsx)("span",{className:"font-medium text-sm",children:n.author}),(0,Us.jsxs)("span",{className:"text-si text-muted-foreground",children:[n.createdAt.toLocaleDateString()," at ",n.createdAt.toLocaleTimeString()]})]}),(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground",children:n.text})]})]},n.id))}),(0,Us.jsxs)("div",{className:"flex gap-2",children:[(0,Us.jsx)(Oe,{value:a,onChange:n=>o(n.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Us.jsx)(b,{onClick:i,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Us.jsx)(nn.Send,{className:"h-4 w-4"})})]})]})};var Zi=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:i=!1})=>{let[n,l]=(0,si.useState)(!1),s=o.find(m=>m.value===t);return(0,Us.jsxs)("div",{className:"space-y-1",children:[(0,Us.jsx)(A,{className:"text-si text-muted-foreground",children:e}),(0,Us.jsxs)(Be,{value:t,onValueChange:a,open:n,onOpenChange:m=>{i||l(m)},disabled:i,children:[(0,Us.jsx)(Re,{className:"h-auto Us-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Us.jsxs)(X,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&l(!n),children:[r&&s?.color&&(0,Us.jsx)("div",{className:`w-2 h-2 rounded-full ${s.color} mr-1`}),s?.label||"Select..."]})}),(0,Us.jsx)(Ae,{children:o.map(m=>(0,Us.jsx)(_,{value:m.value,children:r&&m.color?(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)("div",{className:`w-3 h-3 rounded-full ${m.color}`}),m.label]}):m.label},m.value))})]})]})};var Yc=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:nn.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:nn.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:nn.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:nn.Zap}],Qc=[{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"}],Zc=[{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"}],Fl=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:i,onDelete:n,isUpdating:l=!1,isDeleting:s=!1,deleteState:c="idle"})=>{let m=u=>u.split(" ").map(v=>v[0]).join("").toUpperCase(),f=()=>c==="loading"?(0,Us.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-si gap-1",children:[(0,Us.jsx)(nn.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):c==="success"?(0,Us.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-si gap-1",children:[(0,Us.jsx)(nn.Check,{className:"h-3 w-3"}),"Deleted"]}):c==="error"?(0,Us.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-si gap-1",children:[(0,Us.jsx)(nn.X,{className:"h-3 w-3"}),"Delete failed"]}):(0,Us.jsxs)(b,{onClick:n,variant:"destructive",className:"w-full h-8 text-si gap-1",disabled:l||s,children:[(0,Us.jsx)(nn.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Us.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Us.jsxs)("div",{className:"space-y-4",style:{opacity:l?.6:1},children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{className:"text-si text-muted-foreground",children:"Status"}),(0,Us.jsx)(Zi,{label:"",value:e.status,onValueChange:u=>r("status",u),options:[{value:"todo",label:"To Do"},{value:"in-progress",label:"nn Progress"},{value:"done",label:"Done"}],disabled:l})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{className:"text-si text-muted-foreground",children:"Type"}),(0,Us.jsx)(Ua,{type:"single",value:e.type,onValueChange:u=>u&&r("type",u),className:"grid grid-cols-2 gap-1",disabled:l,children:Yc.map(u=>{let v=u.icon;return(0,Us.jsxs)(Va,{value:u.value,className:"flex items-center gap-1 text-si h-8 data-[state=nn]:bg-primary data-[state=nn]:text-primary-foreground",size:"sm",disabled:l,children:[(0,Us.jsx)(v,{className:"h-3 w-3"}),u.label]},u.value)})})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{className:"text-si text-muted-foreground",children:"Priority"}),(0,Us.jsx)(Ua,{type:"single",value:e.priority,onValueChange:u=>u&&r("priority",u),className:"grid grid-cols-3 gap-1",disabled:l,children:Qc.map(u=>(0,Us.jsx)(Va,{value:u.value,className:"text-si h-8 data-[state=nn]:bg-primary data-[state=nn]:text-primary-foreground",size:"sm",disabled:l,children:u.label},u.value))})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{className:"text-si text-muted-foreground",children:"Story Points"}),(0,Us.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-si 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,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{className:"text-si text-muted-foreground",children:"Epic"}),(0,Us.jsx)(Zi,{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,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{className:"text-si text-muted-foreground",children:"Sprint"}),(0,Us.jsx)(Zi,{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,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{className:"text-si text-muted-foreground",children:"Assignee"}),(0,Us.jsx)(Li,{label:"",value:e.assignee,onValueChange:u=>r("assignee",u),options:Zc,placeholder:"Search team members...",allowCustomValue:!0,disabled:l})]})]}),(0,Us.jsxs)("div",{className:"nn-auto Us-4 space-y-4",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(b,{onClick:i,variant:"outline",className:"w-full h-8 text-si",disabled:l||s,children:"Close"}),f()]}),(0,Us.jsxs)("div",{className:"Us-4 border-t border-border space-y-2",children:[(0,Us.jsx)("div",{className:"text-si text-muted-foreground font-medium mb-2",children:"Information"}),(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)("span",{className:"text-si text-muted-foreground",children:"Logged By"}),(0,Us.jsxs)("div",{className:"flex items-center gap-1 text-si text-muted-foreground",children:[(0,Us.jsx)(nn.User,{className:"h-3 w-3"}),(0,Us.jsx)("span",{children:"System"})]})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)("span",{className:"text-si text-muted-foreground",children:"Created"}),(0,Us.jsxs)("div",{className:"flex items-center gap-1 text-si text-muted-foreground",children:[(0,Us.jsx)(nn.Calendar,{className:"h-3 w-3"}),(0,Us.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)("span",{className:"text-si text-muted-foreground",children:"Last Updated"}),(0,Us.jsxs)("div",{className:"flex items-center gap-1 text-si text-muted-foreground",children:[(0,Us.jsx)(nn.Clock,{className:"h-3 w-3"}),(0,Us.jsxs)("span",{children:[o.toLocaleDateString()," at ",o.toLocaleTimeString()]})]})]})]})]})]})};var er=({isOpen:e,onClose:t,task:a,epics:o,sprints:r,onUpdateTask:i,onDeleteTask:n})=>{let[l,s]=(0,si.useState)(new Date),[c,m]=(0,si.useState)("idle"),[f,u]=(0,si.useState)("idle"),[v,N]=(0,si.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working nn the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),T=async(Z,se)=>{if(se!==a[Z]){m("loading");try{await i(a.id,{[Z]:se}),s(new Date),m("success"),setTimeout(()=>m("idle"),1500)}catch{m("error"),setTimeout(()=>m("idle"),3e3)}}},h=async(Z,se)=>{if(se!==a[Z]){m("loading");try{await i(a.id,{[Z]:se}),s(new Date),m("success"),setTimeout(()=>m("idle"),1500)}catch{m("error"),setTimeout(()=>m("idle"),3e3)}}},x=Z=>{let se={id:Date.now().toString(),text:Z,author:"Current User",createdAt:new Date};N([...v,se])},C=async()=>{u("loading");try{await n(a.id),u("success"),setTimeout(()=>{t(),u("idle")},1e3)}catch{u("error"),setTimeout(()=>u("idle"),3e3)}},L=c!=="loading"&&f!=="loading",G=()=>{L&&t()},J=()=>c==="loading"?(0,Us.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Us.jsx)(nn.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Us.jsx)("span",{children:"Updating..."})]}):c==="success"?(0,Us.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Us.jsx)(nn.Check,{className:"h-4 w-4"}),(0,Us.jsx)("span",{children:"Updated successfully"})]}):c==="error"?(0,Us.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Us.jsx)(nn.X,{className:"h-4 w-4"}),(0,Us.jsx)("span",{children:"Update failed"})]}):null;return(0,Us.jsx)(wt,{open:e,onOpenChange:G,children:(0,Us.jsxs)(ht,{className:"max-w-3xl max-h-[80vh] overflow-y-auto Us-4",children:[(0,Us.jsxs)(xt,{children:[(0,Us.jsx)(yt,{className:"xa-only",children:a.title}),(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)("div",{className:"flex-1",children:J()}),!L&&(0,Us.jsx)("div",{className:"text-si text-muted-foreground",children:"Please wait..."})]})]}),(0,Us.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Us.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Us.jsx)(cs,{fieldName:"title",value:a.title,label:"",onSave:T,className:"border-b border-border pb-3",disabled:c==="loading"}),(0,Us.jsx)(cs,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:T,disabled:c==="loading"}),(0,Us.jsx)(El,{comments:v,onAddComment:x})]}),(0,Us.jsx)(Fl,{task:a,epics:o,sprints:r,lastUpdated:l,onUpdateTask:h,onClose:G,onDelete:C,isUpdating:c==="loading",isDeleting:f==="loading",deleteState:f})]})]})})};var tr=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,si.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"],n=[{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"}],s=m=>{m.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())},c=(m,f)=>{r(u=>({...u,[m]:f}))};return(0,Us.jsx)(wt,{open:e,onOpenChange:t,children:(0,Us.jsxs)(ht,{className:"sm:max-w-md",children:[(0,Us.jsx)(xt,{children:(0,Us.jsx)(yt,{children:"Add New Epic"})}),(0,Us.jsxs)("form",{onSubmit:s,className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"name",children:"Epic Name"}),(0,Us.jsx)(O,{id:"name",value:o.name,onChange:m=>c("name",m.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Us.jsx)(Oe,{id:"description",value:o.description,onChange:m=>c("description",m.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"Color"}),(0,Us.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(m=>(0,Us.jsx)("button",{type:"button",onClick:()=>c("color",m),className:`w-8 h-8 rounded-full ${m} ${o.color===m?"ring-2 ring-gray-400":""}`},m))})]}),(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"Confidence"}),(0,Us.jsxs)(Be,{value:o.confidence,onValueChange:m=>c("confidence",m),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{})}),(0,Us.jsx)(Ae,{children:n.map(m=>(0,Us.jsx)(_,{value:m.value,children:m.label},m.value))})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"Phase"}),(0,Us.jsxs)(Be,{value:o.phase.toString(),onValueChange:m=>c("phase",parseInt(m)),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{})}),(0,Us.jsx)(Ae,{children:l.map(m=>(0,Us.jsx)(_,{value:m.value.toString(),children:m.label},m.value))})]})]})]}),(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"Start Date"}),(0,Us.jsx)(O,{type:"date",value:o.startDate,onChange:m=>c("startDate",m.target.value)})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"End Date"}),(0,Us.jsx)(O,{type:"date",value:o.endDate,onChange:m=>c("endDate",m.target.value)})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"Progress (%)"}),(0,Us.jsx)(O,{type:"number",min:"0",max:"100",value:o.progress,onChange:m=>c("progress",parseInt(m.target.value)||0)})]}),(0,Us.jsxs)(Ao,{children:[(0,Us.jsx)(b,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Us.jsx)(b,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var jl=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialProjects:o=[],onAddTask:r,onUpdateTask:i,onDeleteTask:n,onTaskClick:l,onAddEpic:s})=>{let[c,m]=(0,si.useState)(e),[f,u]=(0,si.useState)(t),[v,N]=(0,si.useState)(a),[T,h]=(0,si.useState)(!1),[x,C]=(0,si.useState)(!1),[L,G]=(0,si.useState)(null),[J,Z]=(0,si.useState)(null),se=f.filter(j=>j.isSelected).map(j=>j.id),w=v.find(j=>j.isSelected),k=c.filter(j=>{let ie=se.includes(j.epicId);return!w||w.id==="all-tasks"?ie:w.id==="backlog"?ie&&!j.sprintId:ie&&j.sprintId===w.id}),B=j=>k.filter(ie=>ie.status===j),ge=j=>{let ie={};return f.forEach(ke=>{ie[ke.id]=j.filter(bt=>bt.epicId===ke.id)}),ie},E=j=>{Z(j)},P=j=>{J&&(m(ie=>ie.map(ke=>ke.id===J.id?{...ke,status:j}:ke)),i?.(J.id,{status:j}),Z(null))},y=j=>{let ie={...j,id:Date.now().toString(),createdAt:new Date};m(ke=>[...ke,ie]),r?.(j)},ae=async(j,ie)=>{m(ke=>ke.map(bt=>bt.id===j?{...bt,...ie}:bt)),i&&await i(j,ie)},De=async j=>{m(ie=>ie.filter(ke=>ke.id!==j)),L?.id===j&&G(null),n&&await n(j)},tt=j=>{let ie={...j,id:Date.now().toString(),isSelected:!0};u(ke=>[...ke,ie]),s?.(j)},Ie=j=>{G(j),l?.(j)};return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.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,Us.jsx)("div",{className:"flex-1",children:(0,Us.jsxs)("div",{className:"w-full",children:[(0,Us.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:"nn Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}].map(j=>{let ie=B(j.status),ke=ge(ie);return(0,Us.jsx)(kl,{title:j.title,status:j.status,taskCount:ie.length,onDrop:P,isCompact:j.status==="done",children:se.map(bt=>{let Lt=f.find(Ze=>Ze.id===bt),R=ke[bt]||[];return R.length===0?null:(0,Us.jsxs)("div",{className:"mb-6",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Us.jsx)("div",{className:`w-3 h-3 rounded-full ${Lt?.color}`}),(0,Us.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:Lt?.name}),(0,Us.jsx)(X,{variant:"secondary",className:"text-si",children:R.length})]})," ",(0,Us.jsx)("div",{className:"space-y-3",children:R.map(Ze=>(0,Us.jsx)(qi,{task:Ze,epic:Lt,onDragStart:E,onTaskClick:Ie,isCompact:j.status==="done"},Ze.id))})]},bt)})},j.id)})}),(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(Yi,{isOpen:T,onClose:()=>h(!1),onAddTask:y,epics:f,sprints:v}),(0,Us.jsx)(tr,{isOpen:x,onClose:()=>C(!1),onAddEpic:tt}),L&&(0,Us.jsx)(er,{isOpen:!!L,onClose:()=>G(null),task:L,epics:f,sprints:v,onUpdateTask:ae,onDeleteTask:De})]})]})})]})};var Ol=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:i,onAddEpic:n,onUpdateEpic:l,onDeleteEpic:s})=>{let[c,m]=(0,si.useState)(null),[f,u]=(0,si.useState)(null),[v,N]=(0,si.useState)({}),T=k=>{m(k)},h=k=>{k.preventDefault()},x=(k,B)=>{k.preventDefault(),c&&c.epicId!==B&&(o(c.id,{epicId:B}),m(null))},C=k=>e.filter(B=>B.epicId===k),L=k=>{u(k.id),N({name:k.name,description:k.description,confidence:k.confidence,phase:k.phase,progress:k.progress})},G=()=>{f&&v.name&&(l(f,v),u(null),N({}))},J=()=>{u(null),N({})},Z=k=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&s(k)},se=k=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[k]||`Phase ${k}`,w=k=>{switch(k){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.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:n}}),(0,Us.jsx)("div",{className:"flex-1",children:(0,Us.jsx)("div",{className:"w-full",children:(0,Us.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xa:grid-cols-4 gap-6",children:t.map(k=>{let B=C(k.id),ge=B.reduce((E,P)=>E+P.points,0);return(0,Us.jsxs)(z,{className:`flex flex-col ${f===k.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:h,onDrop:E=>x(E,k.id),children:[(0,Us.jsx)("div",{className:"Us-4 border-b border-border",children:f===k.id?(0,Us.jsxs)("div",{className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Us.jsx)(O,{value:v.name||"",onChange:E=>N({...v,name:E.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Us.jsxs)("div",{className:"flex gap-2 ml-2",children:[(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:G,className:"Us-1 h-8 w-8",children:(0,Us.jsx)(nn.Check,{className:"h-4 w-4"})}),(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:J,className:"Us-1 h-8 w-8",children:(0,Us.jsx)(nn.X,{className:"h-4 w-4"})})]})]}),(0,Us.jsx)(Oe,{value:v.description||"",onChange:E=>N({...v,description:E.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)("label",{className:"text-si text-muted-foreground",children:"Confidence"}),(0,Us.jsxs)(Be,{value:v.confidence||k.confidence,onValueChange:E=>N({...v,confidence:E}),children:[(0,Us.jsx)(Re,{className:"text-si",children:(0,Us.jsx)(Ve,{})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"low",children:"Low"}),(0,Us.jsx)(_,{value:"medium",children:"Medium"}),(0,Us.jsx)(_,{value:"high",children:"High"})]})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("label",{className:"text-si text-muted-foreground",children:"Phase"}),(0,Us.jsxs)(Be,{value:v.phase?.toString()||k.phase.toString(),onValueChange:E=>N({...v,phase:parseInt(E)}),children:[(0,Us.jsx)(Re,{className:"text-si",children:(0,Us.jsx)(Ve,{})}),(0,Us.jsx)(Ae,{children:[1,2,3,4,5,6,7,8,9].map(E=>(0,Us.jsxs)(_,{value:E.toString(),children:["Phase ",E]},E))})]})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)("label",{className:"text-si text-muted-foreground",children:"Progress (%)"}),(0,Us.jsx)(O,{type:"number",min:"0",max:"100",value:v.progress||k.progress,onChange:E=>N({...v,progress:parseInt(E.target.value)||0}),className:"text-si"})]})]}):(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Us.jsx)("div",{className:`w-4 h-4 rounded-full ${k.color}`}),(0,Us.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:k.name}),(0,Us.jsxs)("div",{className:"flex gap-1",children:[(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>L(k),className:"Us-1 h-8 w-8",children:(0,Us.jsx)(nn.Edit2,{className:"h-3 w-3"})}),(0,Us.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>Z(k.id),className:"Us-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Us.jsx)(nn.Trash2,{className:"h-3 w-3"})})]})]}),(0,Us.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Us.jsxs)(X,{className:`text-si ${w(k.confidence)}`,children:[k.confidence," confidence"]}),(0,Us.jsxs)(X,{variant:"outline",className:"text-si",children:["Phase ",k.phase]}),(0,Us.jsxs)(X,{variant:"secondary",className:"text-si bg-muted text-muted-foreground",children:[B.length," tasks"]}),(0,Us.jsxs)(X,{variant:"secondary",className:"text-si bg-muted text-muted-foreground",children:[ge," pts"]})]}),k.description&&(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground mb-3 select-none",children:k.description}),(0,Us.jsxs)("div",{className:"mb-3",children:[(0,Us.jsxs)("div",{className:"flex justify-between text-si text-muted-foreground mb-1",children:[(0,Us.jsx)("span",{className:"select-none",children:"Progress"}),(0,Us.jsxs)("span",{className:"select-none",children:[k.progress,"%"]})]}),(0,Us.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,Us.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${k.progress}%`}})})]}),(0,Us.jsxs)(b,{onClick:()=>i(k.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Us.jsx)(nn.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Us.jsx)("div",{className:"flex-1 Us-4 overflow-y-auto",children:(0,Us.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded Us-3 transition-colors ${c?"border-primary bg-primary/10":"border-border"}`,children:B.length===0?(0,Us.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,Us.jsx)(nn.Move,{className:"h-8 w-8 mb-2"}),(0,Us.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):B.map(E=>(0,Us.jsx)(qi,{task:E,epic:k,onDragStart:T,onTaskClick:r,isCompact:!0},E.id))})})]},k.id)})})})})]})};var zl=require("react-day-picker");function or({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Us.jsx)(zl.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:g("Us-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 Us-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:g(ni({variant:"outline"}),"h-7 w-7 bg-transparent Us-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 nn-2",cell:g("relative Us-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(ni({variant:"ghost"}),"h-8 w-8 Us-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})}or.displayName="Calendar";var Ul=le(require("react")),ta=le(require("@radix-ui/react-popover"));var ps=ta.Root,us=ta.Trigger;var ir=Ul.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Us.jsx)(ta.Portal,{children:(0,Us.jsx)(ta.Content,{ref:r,align:t,sideOffset:a,className:g("z-50 w-72 rounded-md border bg-popover Us-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})}));ir.displayName=ta.Content.displayName;var fs=require("date-fns");var Gl=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,si.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())},n=()=>{r({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),t()};return(0,Us.jsx)(wt,{open:e,onOpenChange:n,children:(0,Us.jsxs)(ht,{className:"sm:max-w-md",children:[(0,Us.jsx)(xt,{children:(0,Us.jsx)(yt,{children:"Add New Sprint"})}),(0,Us.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"name",children:"Sprint Name *"}),(0,Us.jsx)(O,{id:"name",value:o.name,onChange:l=>r(s=>({...s,name:l.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Us.jsx)(Oe,{id:"description",value:o.description,onChange:l=>r(s=>({...s,description:l.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"Start Date *"}),(0,Us.jsxs)(ps,{children:[(0,Us.jsx)(us,{asChild:!0,children:(0,Us.jsxs)(b,{variant:"outline",className:g("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Us.jsx)(nn.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,fs.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Us.jsx)(ir,{className:"w-auto Us-0",align:"start",children:(0,Us.jsx)(or,{mode:"single",selected:o.startDate,onSelect:l=>r(s=>({...s,startDate:l})),initialFocus:!0})})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{children:"End Date *"}),(0,Us.jsxs)(ps,{children:[(0,Us.jsx)(us,{asChild:!0,children:(0,Us.jsxs)(b,{variant:"outline",className:g("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Us.jsx)(nn.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,fs.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Us.jsx)(ir,{className:"w-auto Us-0",align:"start",children:(0,Us.jsx)(or,{mode:"single",selected:o.endDate,onSelect:l=>r(s=>({...s,endDate:l})),initialFocus:!0,disabled:l=>o.startDate?l<o.startDate:!1})})]})]})]}),(0,Us.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Us.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:l=>r(s=>({...s,isActive:l.target.checked})),className:"rounded border-gray-300"}),(0,Us.jsx)(A,{htmlFor:"isActive",children:"Set Us active sprint"})]}),(0,Us.jsxs)("div",{className:"flex justify-end gap-3 Us-4",children:[(0,Us.jsx)(b,{type:"button",variant:"outline",onClick:n,children:"Cancel"}),(0,Us.jsx)(b,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var Kl=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:i})=>{let[n,l]=(0,si.useState)(["2"]),[s,c]=(0,si.useState)(null),[m,f]=(0,si.useState)(!1),[u,v]=(0,si.useState)(null),N=e.filter(P=>!P.sprintId),T=e.filter(P=>P.sprintId&&n.includes(P.sprintId)),h=[...a].filter(P=>P.id!=="backlog"&&P.id!=="all-tasks").sort((P,y)=>P.startDate.getTime()-y.startDate.getTime()),x=P=>t.find(y=>y.id===P),C=P=>a.find(y=>y.id===P),L=P=>{switch(P){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"}},G=P=>P.split(" ").map(y=>y[0]).join("").toUpperCase(),J=P=>{c(P)},Z=P=>{P.preventDefault()},se=P=>{v(P)},w=()=>{v(null)},k=(P,y)=>{P.preventDefault(),v(null),s&&(o(s.id,{sprintId:y==="backlog"?void 0:y}),c(null))},B=P=>{P==="backlog"||P==="all-tasks"||l(y=>y.includes(P)?y.filter(ae=>ae!==P):[...y,P])},ge=P=>{i(P),f(!1)},E=({task:P,showSprint:y=!1})=>{let ae=x(P.epicId),De=P.sprintId?C(P.sprintId):null,[tt,Ie]=(0,si.useState)(!1),at=ke=>{ke.defaultPrevented||tt||r(P)},j=ke=>{Ie(!0),J(P)},ie=()=>{Ie(!1)};return(0,Us.jsx)(z,{className:`Us-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${tt?"opacity-50 shadow-lg scale-105":""} ${s?.id===P.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:j,onDragEnd:ie,onClick:at,children:(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Us.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:P.title}),(0,Us.jsx)(X,{className:`text-si select-none pointer-events-none ${L(P.priority)}`,children:P.priority[0].toUpperCase()})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between text-si pointer-events-none",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-1",children:[ae&&(0,Us.jsx)("div",{className:`w-2 h-2 rounded-full ${ae.color}`}),(0,Us.jsx)("span",{className:"text-muted-foreground truncate select-none",children:ae?.name})]}),(0,Us.jsx)("span",{className:"text-muted-foreground select-none",children:G(P.assignee)})]}),y&&De&&(0,Us.jsxs)("div",{className:"flex items-center gap-1 text-si text-muted-foreground pointer-events-none",children:[(0,Us.jsx)(nn.Calendar,{className:"h-3 w-3"}),(0,Us.jsx)("span",{className:"select-none",children:De.name})]})]})})};return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.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:()=>f(!0)}}),(0,Us.jsx)("div",{className:"flex-1",children:(0,Us.jsxs)("div",{className:"w-full",children:[(0,Us.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,Us.jsx)("div",{className:"lg:col-span-1",children:(0,Us.jsxs)(z,{className:"Us-4 h-full bg-card shadow-sm",onDragOver:Z,onDragEnter:()=>se("backlog"),onDragLeave:w,onDrop:P=>k(P,"backlog"),children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Us.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,Us.jsx)(X,{variant:"secondary",className:"bg-muted text-muted-foreground",children:N.length})]}),(0,Us.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded Us-3 transition-colors ${u==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[N.map(P=>(0,Us.jsx)(E,{task:P},P.id)),N.length===0&&(0,Us.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,Us.jsx)("div",{className:"lg:col-span-3",children:(0,Us.jsxs)("div",{className:"space-y-4",children:[(0,Us.jsxs)(z,{className:"Us-4 bg-card shadow-sm",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Us.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),(0,Us.jsxs)(b,{onClick:()=>f(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,Us.jsx)(nn.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,Us.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:h.map(P=>(0,Us.jsxs)(b,{variant:n.includes(P.id)?"default":"outline",size:"sm",onClick:()=>B(P.id),className:"text-si h-8",children:[P.name,P.isActive&&(0,Us.jsx)("span",{className:"ml-1 text-success",children:"\u25CF"})]},P.id))})]}),(0,Us.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.map(P=>h.find(y=>y.id===P)).filter(Boolean).sort((P,y)=>P.startDate.getTime()-y.startDate.getTime()).map(P=>{let y=T.filter(ae=>ae.sprintId===P.id);return(0,Us.jsxs)(z,{className:"Us-4 bg-card shadow-sm",onDragOver:Z,onDragEnter:()=>se(P.id),onDragLeave:w,onDrop:ae=>k(ae,P.id),children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)("h3",{className:"font-semibold text-foreground select-none",children:P.name}),P.isActive&&(0,Us.jsx)("span",{className:"text-si text-success font-medium select-none",children:"Active Sprint"})]}),(0,Us.jsx)(X,{variant:"secondary",className:"bg-muted text-muted-foreground",children:y.length})]}),(0,Us.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded Us-3 transition-colors ${u===P.id?"border-primary bg-primary/10":"border-border"}`,children:[y.map(ae=>(0,Us.jsx)(E,{task:ae},ae.id)),y.length===0&&(0,Us.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},P.id)})})," "]})})]}),(0,Us.jsx)(Gl,{isOpen:m,onClose:()=>f(!1),onAddSprint:ge})]})})]})};var em=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},tm=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),am=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})},vs=(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},bs=e=>{let t=new Date;return e.toDateString()===t.toDateString()},om=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},im=({colleagues:e,onAddReminder:t,trigger:a})=>{let[o,r]=(0,si.useState)(!1),[i,n]=(0,si.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""});return(0,Us.jsxs)(wt,{open:o,onOpenChange:r,children:[(0,Us.jsx)(un,{asChild:!0,children:a}),(0,Us.jsxs)(ht,{className:"max-w-2xl",children:[(0,Us.jsx)(xt,{children:(0,Us.jsx)(yt,{children:"Add New Reminder"})}),(0,Us.jsxs)("form",{onSubmit:s=>{s.preventDefault();let c=e.find(f=>f.id===i.colleagueId);if(!c)return;let m={title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:c,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(f=>f.trim()):void 0};t(m),r(!1),n({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""})},className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"title",children:"Title"}),(0,Us.jsx)(O,{id:"title",value:i.title,onChange:s=>n({...i,title:s.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"priority",children:"Priority"}),(0,Us.jsxs)(Be,{value:i.priority,onValueChange:s=>n({...i,priority:s}),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"low",children:"\u{1F7E2} Low"}),(0,Us.jsx)(_,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Us.jsx)(_,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"description",children:"Description"}),(0,Us.jsx)(Oe,{id:"description",value:i.description,onChange:s=>n({...i,description:s.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"dueDate",children:"Due Date"}),(0,Us.jsx)(O,{id:"dueDate",type:"date",value:i.dueDate,onChange:s=>n({...i,dueDate:s.target.value}),required:!0})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Us.jsx)(O,{id:"dueTime",type:"time",value:i.dueTime,onChange:s=>n({...i,dueTime:s.target.value})})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"colleague",children:"Assigned Colleague"}),(0,Us.jsxs)(Be,{value:i.colleagueId,onValueChange:s=>n({...i,colleagueId:s}),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{placeholder:"Select a digital colleague"})}),(0,Us.jsx)(Ae,{children:e.map(s=>(0,Us.jsx)(_,{value:s.id,children:s.name},s.id))})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Us.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:s=>n({...i,isRecurring:s.target.checked}),className:"rounded border-border"}),(0,Us.jsx)(A,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4 xa-6",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Us.jsxs)(Be,{value:i.recurrencePattern,onValueChange:s=>n({...i,recurrencePattern:s}),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"daily",children:"Daily"}),(0,Us.jsx)(_,{value:"weekly",children:"Weekly"}),(0,Us.jsx)(_,{value:"monthly",children:"Monthly"}),(0,Us.jsx)(_,{value:"yearly",children:"Yearly"})]})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Us.jsx)(O,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:s=>n({...i,recurrenceInterval:parseInt(s.target.value)})})]})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Us.jsx)("input",{type:"checkbox",id:"reminderEnabled",checked:i.reminderEnabled,onChange:s=>n({...i,reminderEnabled:s.target.checked}),className:"rounded border-border"}),(0,Us.jsx)(A,{htmlFor:"reminderEnabled",children:"Enable reminder notifications"})]}),i.reminderEnabled&&(0,Us.jsxs)("div",{className:"xa-6",children:[(0,Us.jsx)(A,{htmlFor:"reminderMinutes",children:"Remind Us"}),(0,Us.jsxs)(Be,{value:i.reminderMinutes.toString(),onValueChange:s=>n({...i,reminderMinutes:parseInt(s)}),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"5",children:"5 minutes before"}),(0,Us.jsx)(_,{value:"15",children:"15 minutes before"}),(0,Us.jsx)(_,{value:"30",children:"30 minutes before"}),(0,Us.jsx)(_,{value:"60",children:"1 hour before"}),(0,Us.jsx)(_,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"tags",children:"Tags (comma-separated)"}),(0,Us.jsx)(O,{id:"tags",value:i.tags,onChange:s=>n({...i,tags:s.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Us.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Us.jsx)(b,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),(0,Us.jsx)(b,{type:"submit",children:"Add Reminder"})]})]})]})]})},rm=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[i,n]=(0,si.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,Us.jsx)(wt,{open:o,onOpenChange:r,children:(0,Us.jsxs)(ht,{className:"max-w-2xl",children:[(0,Us.jsx)(xt,{children:(0,Us.jsx)(yt,{children:"Edit Reminder"})}),(0,Us.jsxs)("form",{onSubmit:s=>{s.preventDefault();let c=t.find(f=>f.id===i.colleagueId);if(!c)return;let m={title:i.title,description:i.description,dueDate:new Date(i.dueDate),dueTime:i.dueTime||void 0,colleague:c,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(f=>f.trim()):void 0};a(e.id,m),r()},className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"edit-title",children:"Title"}),(0,Us.jsx)(O,{id:"edit-title",value:i.title,onChange:s=>n({...i,title:s.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"edit-priority",children:"Priority"}),(0,Us.jsxs)(Be,{value:i.priority,onValueChange:s=>n({...i,priority:s}),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"low",children:"\u{1F7E2} Low"}),(0,Us.jsx)(_,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Us.jsx)(_,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"edit-description",children:"Description"}),(0,Us.jsx)(Oe,{id:"edit-description",value:i.description,onChange:s=>n({...i,description:s.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Us.jsx)(O,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:s=>n({...i,dueDate:s.target.value}),required:!0})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Us.jsx)(O,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:s=>n({...i,dueTime:s.target.value})})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,Us.jsxs)(Be,{value:i.colleagueId,onValueChange:s=>n({...i,colleagueId:s}),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{placeholder:"Select a digital colleague"})}),(0,Us.jsx)(Ae,{children:t.map(s=>(0,Us.jsx)(_,{value:s.id,children:s.name},s.id))})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Us.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring,onChange:s=>n({...i,isRecurring:s.target.checked}),className:"rounded border-border"}),(0,Us.jsx)(A,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4 xa-6",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,Us.jsxs)(Be,{value:i.recurrencePattern,onValueChange:s=>n({...i,recurrencePattern:s}),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"daily",children:"Daily"}),(0,Us.jsx)(_,{value:"weekly",children:"Weekly"}),(0,Us.jsx)(_,{value:"monthly",children:"Monthly"}),(0,Us.jsx)(_,{value:"yearly",children:"Yearly"})]})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,Us.jsx)(O,{id:"edit-recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:s=>n({...i,recurrenceInterval:parseInt(s.target.value)})})]})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Us.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:i.reminderEnabled,onChange:s=>n({...i,reminderEnabled:s.target.checked}),className:"rounded border-border"}),(0,Us.jsx)(A,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),i.reminderEnabled&&(0,Us.jsxs)("div",{className:"xa-6",children:[(0,Us.jsx)(A,{htmlFor:"edit-reminderMinutes",children:"Remind Us"}),(0,Us.jsxs)(Be,{value:i.reminderMinutes.toString(),onValueChange:s=>n({...i,reminderMinutes:parseInt(s)}),children:[(0,Us.jsx)(Re,{children:(0,Us.jsx)(Ve,{})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsx)(_,{value:"5",children:"5 minutes before"}),(0,Us.jsx)(_,{value:"15",children:"15 minutes before"}),(0,Us.jsx)(_,{value:"30",children:"30 minutes before"}),(0,Us.jsx)(_,{value:"60",children:"1 hour before"}),(0,Us.jsx)(_,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Us.jsxs)("div",{children:[(0,Us.jsx)(A,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,Us.jsx)(O,{id:"edit-tags",value:i.tags,onChange:s=>n({...i,tags:s.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Us.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Us.jsx)(b,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,Us.jsx)(b,{type:"submit",children:"Save Changes"})]})]})]})})},sm=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,i]=(0,si.useState)(!1),n=vs(e.dueDate,e.dueTime),l=bs(e.dueDate),s=om(e.dueDate),c=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},m=()=>l?"Today":s?"Tomorrow":n&&!e.isCompleted?"Overdue":tm(e.dueDate);return(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(rm,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>i(!1)}),(0,Us.jsx)(z,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${n&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,Us.jsx)(de,{className:"Us-4",children:(0,Us.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Us.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Us.jsx)("button",{onClick:c,className:"nn-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,Us.jsx)(nn.CheckCircle,{className:"h-5 w-5"}):(0,Us.jsx)(nn.Circle,{className:"h-5 w-5"})}),(0,Us.jsxs)("div",{className:"flex-1",children:[(0,Us.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,Us.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,Us.jsx)("span",{className:"text-sm",children:em(e.priority)}),e.isRecurring&&(0,Us.jsx)(nn.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,Us.jsx)(nn.Bell,{className:"h-4 w-4 text-success"})]}),(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Us.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Us.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Us.jsx)(nn.Calendar,{className:"h-4 w-4"}),(0,Us.jsx)("span",{className:n&&!e.isCompleted?"text-destructive font-medium":"",children:m()})]}),e.dueTime&&(0,Us.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Us.jsx)(nn.Clock,{className:"h-4 w-4"}),(0,Us.jsx)("span",{children:am(e.dueTime)})]}),(0,Us.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Us.jsx)(nn.User,{className:"h-4 w-4"}),(0,Us.jsx)("span",{children:e.colleague.name})]})]}),e.tags&&e.tags.length>0&&(0,Us.jsx)("div",{className:"flex flex-wrap gap-1 nn-2",children:e.tags.map((f,u)=>(0,Us.jsx)(X,{variant:"secondary",className:"text-si",children:f},u))})]})]}),(0,Us.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Us.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 w-8 Us-0",children:(0,Us.jsx)(nn.Edit2,{className:"h-4 w-4"})}),(0,Us.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 Us-0 text-destructive hover:text-destructive/80",children:(0,Us.jsx)(nn.Trash2,{className:"h-4 w-4"})})]})]})})})]})},_l=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[i,n]=(0,si.useState)(e),[l]=(0,si.useState)(t),[s,c]=(0,si.useState)("all"),[m,f]=(0,si.useState)(""),u=C=>{let L={...C,id:Date.now().toString(),createdAt:new Date};n(G=>[...G,L]),a?.(C)},v=(C,L)=>{n(G=>G.map(J=>J.id===C?{...J,...L}:J)),o?.(C,L)},N=C=>{n(L=>L.filter(G=>G.id!==C)),r?.(C)},h=i.filter(C=>{if(m){let L=m.toLowerCase();if(!(C.title.toLowerCase().includes(L)||C.description.toLowerCase().includes(L)||C.colleague.name.toLowerCase().includes(L)||C.tags?.some(J=>J.toLowerCase().includes(L))))return!1}switch(s){case"pending":return!C.isCompleted;case"completed":return C.isCompleted;case"overdue":return!C.isCompleted&&vs(C.dueDate,C.dueTime);case"today":return bs(C.dueDate);default:return!0}}).sort((C,L)=>{if(C.isCompleted&&!L.isCompleted)return 1;if(!C.isCompleted&&L.isCompleted)return-1;let G={high:3,medium:2,low:1},J=G[L.priority]-G[C.priority];return J!==0?J:C.dueDate.getTime()-L.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&&vs(C.dueDate,C.dueTime)).length,today:i.filter(C=>bs(C.dueDate)).length};return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.jsx)(Ke,{title:"Task Reminders",description:"Manage reminders and stay nn 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,Us.jsx)("div",{className:"h-full bg-background",children:(0,Us.jsxs)("div",{className:"Us-6",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Us.jsxs)("div",{children:[(0,Us.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Us.jsx)("Us",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Us.jsx)(im,{colleagues:l,onAddReminder:u,trigger:(0,Us.jsxs)(b,{className:"flex items-center space-x-2",children:[(0,Us.jsx)(nn.Plus,{className:"h-4 w-4"}),(0,Us.jsx)("span",{children:"Add Reminder"})]})})]}),(0,Us.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Us.jsxs)(z,{className:"Us-4",children:[(0,Us.jsx)("div",{className:"text-2xl font-bold text-foreground",children:x.total}),(0,Us.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Us.jsxs)(z,{className:"Us-4",children:[(0,Us.jsx)("div",{className:"text-2xl font-bold text-primary",children:x.pending}),(0,Us.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Us.jsxs)(z,{className:"Us-4",children:[(0,Us.jsx)("div",{className:"text-2xl font-bold text-success",children:x.completed}),(0,Us.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Us.jsxs)(z,{className:"Us-4",children:[(0,Us.jsx)("div",{className:"text-2xl font-bold text-destructive",children:x.overdue}),(0,Us.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Us.jsxs)(z,{className:"Us-4",children:[(0,Us.jsx)("div",{className:"text-2xl font-bold text-warning",children:x.today}),(0,Us.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Us.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Us.jsx)("div",{className:"flex-1",children:(0,Us.jsx)(O,{placeholder:"Search reminders...",value:m,onChange:C=>f(C.target.value),className:"max-w-md"})}),(0,Us.jsxs)(Be,{value:s,onValueChange:C=>c(C),children:[(0,Us.jsx)(Re,{className:"w-40",children:(0,Us.jsx)(Ve,{})}),(0,Us.jsxs)(Ae,{children:[(0,Us.jsxs)(_,{value:"all",children:["All (",x.total,")"]}),(0,Us.jsxs)(_,{value:"pending",children:["Pending (",x.pending,")"]}),(0,Us.jsxs)(_,{value:"completed",children:["Completed (",x.completed,")"]}),(0,Us.jsxs)(_,{value:"overdue",children:["Overdue (",x.overdue,")"]}),(0,Us.jsxs)(_,{value:"today",children:["Today (",x.today,")"]})]})]})]}),(0,Us.jsx)("div",{className:"space-y-4",children:h.length===0?(0,Us.jsxs)(z,{className:"Us-8 text-center",children:[(0,Us.jsx)("div",{className:"text-muted-foreground",children:m||s!=="all"?"No reminders match your filters":"No reminders yet"}),!m&&s==="all"&&(0,Us.jsx)("Us",{className:"text-sm text-muted-foreground/60 nn-2",children:"Create your first reminder to get started"})]}):h.map(C=>(0,Us.jsx)(sm,{reminder:C,colleagues:l,onUpdateReminder:v,onDeleteReminder:N},C.id))})]})})]})};var $l=require("next/navigation");function hs({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:i=[],initialColleagues:n=[],initialFiles:l=[],onAddTask:s,onUpdateTask:c,onDeleteTask:m,onTaskClick:f,onAddEpic:u,onUpdateEpic:v,onDeleteEpic:N,onAddTaskToEpic:T,onAddSprint:h,onUpdateSprint:x,onDeleteSprint:C,onAddProject:L,onUpdateProject:G,onDeleteProject:J,onFileAdd:Z,onFileEdit:se,onFileDelete:w,onFileClick:k,onAddReminder:B,onUpdateReminder:ge,onDeleteReminder:E,onViewChange:P,onToggleMobileMenu:y,onTeamClick:ae,onTeamChange:De,onCopilotClick:tt}){let[Ie,at]=(0,si.useState)(t),[j,ie]=(0,si.useState)(a),[ke,bt]=(0,si.useState)(o),[Lt,R]=(0,si.useState)(r),[Ze,Xe]=(0,si.useState)(i),[Pa,Qo]=(0,si.useState)(n),[ho,Zo]=(0,si.useState)(l),[lr,ei]=(0,si.useState)(!1),[dr,ti]=(0,si.useState)(!1),[Ka,xo]=(0,si.useState)(null),[ai,yo]=(0,si.useState)(null),[wo,S]=(0,si.useState)(null),[I,Pe]=(0,si.useState)("kanban"),[Yl,Ql]=(0,si.useState)(!1),Cs=(0,$l.useRouter)(),Zl=j.filter(D=>D.isSelected).map(D=>D.id),oi=ke.find(D=>D.isSelected),ed=Ie.filter(D=>{let H=Zl.includes(D.epicId);return!oi||oi.id==="all-tasks"?H:oi.id==="backlog"?H&&!D.sprintId:H&&D.sprintId===oi.id}),lm=D=>ed.filter(H=>H.status===D),dm=D=>{let H={};return j.forEach(ne=>{H[ne.id]=D.filter(Ue=>Ue.epicId===ne.id)}),H},cm=D=>{S(D)},mm=D=>{wo&&(at(H=>H.map(ne=>ne.id===wo.id?{...ne,status:D}:ne)),S(null))},Ss=D=>{let H={...D,id:Date.now().toString(),createdAt:new Date};at(ne=>[...ne,H]),c?.(H.id,H)},ii=(D,H)=>{at(ne=>ne.map(Ue=>Ue.id===D?{...Ue,...H}:Ue)),c?.(D,H)},td=async(D,H)=>{ii(D,H)},Ds=D=>{at(H=>H.filter(ne=>ne.id!==D)),Ka?.id===D&&xo(null)},ad=async D=>{Ds(D)},od=D=>{let H={...D,id:Date.now().toString(),isSelected:!1};R(ne=>[...ne,H]),L?.(D)},id=(D,H)=>{R(ne=>ne.map(Ue=>Ue.id===D?H.isSelected?(Cs.push(`/kanban/${D}`),{...Ue,...H}):{...Ue,...H}:H.isSelected&&D!==Ue.id?{...Ue,isSelected:!1}:Ue)),G?.(D,H)},rd=D=>{R(H=>H.filter(ne=>ne.id!==D)),J?.(D)},sd=D=>{let H={...D,id:Date.now().toString(),isSelected:!0};ie(ne=>[...ne,H])},cr=()=>{ti(!0)},ks=(D,H)=>{ie(ne=>ne.map(Ue=>Ue.id===D?{...Ue,...H}:Ue)),v?.(D,H)},Ps=D=>{ie(H=>H.filter(ne=>ne.id!==D)),at(H=>H.filter(ne=>ne.epicId!==D)),N?.(D)},Ts=D=>{let H={...D,id:Date.now().toString(),isSelected:!1};bt(ne=>[...ne,H]),h?.(D)},nd=(D,H)=>{bt(ne=>ne.map(Ue=>Ue.id===D?H.isSelected?{...Ue,...H}:{...Ue,...H}:H.isSelected&&D!==Ue.id?{...Ue,isSelected:!1}:Ue)),x?.(D,H)},ld=D=>{D==="backlog"||D==="all-tasks"||(bt(H=>H.filter(ne=>ne.id!==D)),at(H=>H.map(ne=>ne.sprintId===D?{...ne,sprintId:void 0}:ne)),C?.(D))},mr=D=>{xo(D)},dd=D=>{D==="planning"&&window.innerWidth<768||Pe(D)},cd=()=>{Ql(D=>!D),y?.()},pm=()=>{Cs.push("/")},um=D=>{console.log("Switching to team:",D)},gm=D=>{console.log("Switching to team:",D)},md=D=>{yo(D),ei(!0)},pd=()=>{ei(!1),yo(null)},ud=D=>{let H={...D,id:Date.now().toString(),createdAt:new Date};Xe(ne=>[...ne,H]),B?.(D)},gd=(D,H)=>{Xe(ne=>ne.map(Ue=>Ue.id===D?{...Ue,...H}:Ue)),ge?.(D,H)},fd=D=>{Xe(H=>H.filter(ne=>ne.id!==D)),E?.(D)},vd=D=>{Zo(H=>[...H,D]),Z?.(D)},bd=D=>{se?.(D)},hd=D=>{Zo(H=>H.filter(ne=>ne.name!==D)),w?.(D)},xd=D=>{k?.(D)},fm=[{id:"todo",title:"To Do",status:"todo"},{id:"in-progress",title:"nn Progress",status:"in-progress"},{id:"review",title:"Review",status:"review"},{id:"done",title:"Done",status:"done"}],vm=()=>{switch(I){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"}},pr=[{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")}],bm=pr.sort((D,H)=>H.lastUsed.getTime()-D.lastUsed.getTime()).slice(0,3),hm=pr.length>3,xm=pr.slice(3);return(0,Us.jsxs)(Fi,{projects:Lt,epics:j,sprints:ke,currentView:I,onUpdateProject:id,onDeleteProject:rd,onAddProject:od,onUpdateEpic:ks,onDeleteEpic:Ps,onAddEpic:cr,onAddSprint:Ts,onUpdateSprint:nd,onDeleteSprint:ld,onViewChange:dd,mobileMenuOpen:Yl,onToggleMobileMenu:cd,children:[I==="kanban"&&(0,Us.jsx)("div",{className:"h-full",children:(0,Us.jsx)(jl,{initialProjects:Lt,initialEpics:j,initialSprints:ke,initialTasks:Ie,onAddTask:Ss,onUpdateTask:ii,onDeleteTask:Ds,onTaskClick:mr,onAddEpic:cr})}),I==="planning"&&(0,Us.jsx)("div",{className:"hidden md:block h-full",children:(0,Us.jsx)(Kl,{tasks:Ie,epics:j,sprints:ke,onUpdateTask:ii,onTaskClick:mr,onAddSprint:Ts})}),I==="tasks"&&(0,Us.jsx)("div",{className:"h-full",children:(0,Us.jsx)(_l,{initialReminders:Ze,initialColleagues:Pa,onAddReminder:ud,onUpdateReminder:gd,onDeleteReminder:fd})}),I==="files"&&(0,Us.jsx)("div",{className:"h-full",children:(0,Us.jsx)(qo,{initialFiles:ho,onFileAdd:vd,onFileEdit:bd,onFileDelete:hd,onFileClick:xd,compactView:!1})}),I==="epics"&&(0,Us.jsx)("div",{className:"h-full",children:(0,Us.jsx)(Ol,{tasks:Ie,epics:j,sprints:ke,onUpdateTask:ii,onTaskClick:mr,onAddTaskToEpic:md,onAddEpic:cr,onUpdateEpic:ks,onDeleteEpic:Ps})}),(0,Us.jsx)(Yi,{isOpen:lr,onClose:pd,onAddTask:Ss,epics:j,sprints:ke,defaultEpicId:ai||void 0}),(0,Us.jsx)(tr,{isOpen:dr,onClose:()=>ti(!1),onAddEpic:sd}),Ka&&(0,Us.jsx)(er,{isOpen:!!Ka,onClose:()=>xo(null),task:Ka,onUpdateTask:td,onDeleteTask:ad,epics:j,sprints:ke})]})}var Wl=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[i,n]=(0,si.useState)({name:o?.name||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[l,s]=(0,si.useState)({}),c=()=>{let u={};return i.name.trim()?i.name.trim().length<3&&(u.name="Project name must Us at least 3 characters"):u.name="Project name is required",i.objectives.trim()?i.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (at 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 (at least 20 characters)"):u.workInstructions="Work instructions are required",s(u),Object.keys(u).length===0},m=async u=>{if(u.preventDefault(),!!c())try{await e(i)}catch(v){console.error("Error submitting project form:",v)}},f=(u,v)=>{n(N=>({...N,[u]:v})),l[u]&&s(N=>({...N,[u]:void 0}))};return(0,Us.jsxs)(z,{className:`w-full max-w-2xl ${r}`,children:[(0,Us.jsxs)(Ee,{children:[(0,Us.jsxs)(ze,{className:"flex items-center gap-2",children:[(0,Us.jsx)(nn.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,Us.jsx)(na,{children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),(0,Us.jsxs)("form",{onSubmit:m,children:[(0,Us.jsxs)(de,{className:"space-y-6",children:[(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,Us.jsx)(O,{id:"name",type:"text",placeholder:"Enter project name",value:i.name,onChange:u=>f("name",u.target.value),className:l.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),l.name&&(0,Us.jsx)("Us",{className:"text-sm text-red-600",children:l.name})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,Us.jsx)(Oe,{id:"objectives",placeholder:"Describe the main goals and objectives of this project...",value:i.objectives,onChange:u=>f("objectives",u.target.value),className:`min-h-[100px] resize-y ${l.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,Us.jsxs)("div",{className:"flex justify-between text-si text-gray-500",children:[(0,Us.jsx)("span",{children:l.objectives&&(0,Us.jsx)("span",{className:"text-red-600",children:l.objectives})}),(0,Us.jsxs)("span",{children:[i.objectives.length,"/1000"]})]})]}),(0,Us.jsxs)("div",{className:"space-y-2",children:[(0,Us.jsx)(A,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,Us.jsx)(Oe,{id:"workInstructions",placeholder:"Provide detailed instructions nn how the work should Us carried out, including processes, standards, and expectations...",value:i.workInstructions,onChange:u=>f("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${l.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,Us.jsxs)("div",{className:"flex justify-between text-si text-gray-500",children:[(0,Us.jsx)("span",{children:l.workInstructions&&(0,Us.jsx)("span",{className:"text-red-600",children:l.workInstructions})}),(0,Us.jsxs)("span",{children:[i.workInstructions.length,"/2000"]})]})]}),(0,Us.jsxs)("div",{className:"space-y-3",children:[(0,Us.jsx)(A,{className:"text-sm font-medium",children:"Project Management"}),(0,Us.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Us.jsx)(Eo,{id:"plan",checked:i.plan,onCheckedChange:u=>f("plan",u===!0),disabled:a}),(0,Us.jsx)(A,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,Us.jsx)("Us",{className:"text-si text-gray-500 ml-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),(0,Us.jsxs)(la,{className:"flex justify-end gap-3",children:[t&&(0,Us.jsxs)(b,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,Us.jsx)(nn.X,{className:"h-4 w-4"}),"Cancel"]}),(0,Us.jsx)(b,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(nn.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,Us.jsxs)(Us.Fragment,{children:[(0,Us.jsx)(nn.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function ws({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,i]=(0,si.useState)(!1),[n,l]=(0,si.useState)(!1),s=async m=>{l(!0);try{await t(m),i(!1)}catch(f){console.error("Error creating project:",f)}finally{l(!1)}},c=()=>{i(!0)};return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.jsx)(xa.AnimatePresence,{mode:"wait",children:(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Us.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:c}}),(0,Us.jsxs)("section",{className:"space-y-4 nn-8",children:[(0,Us.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Us.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(m=>(0,Us.jsx)(Ui,{project:m,onOpen:a,onShare:o},m.name))})]})]},"projects-index-view")}),(0,Us.jsx)(wt,{open:r,onOpenChange:i,children:(0,Us.jsxs)(ht,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Us.jsxs)(xt,{className:"xa-only",children:[(0,Us.jsx)(yt,{children:"Create New Project"}),(0,Us.jsx)(Io,{children:"Fill out the form below to create a new project."})]}),(0,Us.jsx)(Wl,{onSubmit:s,onCancel:()=>i(!1),isLoading:n,className:"border-0 shadow-none"})]})})]})}function ql({team:e,onOpen:t,className:a}){return(0,Us.jsx)(xa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,Us.jsxs)(z,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Us.jsxs)(Ee,{children:[(0,Us.jsx)(ze,{className:"text-lg",children:e.name}),(0,Us.jsx)(na,{className:"nn-1 text-sm",children:e.description})]}),(0,Us.jsxs)(de,{className:"space-y-4",children:[(0,Us.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Us.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)(nn.Users,{className:"h-4 w-4 text-blue-500"}),(0,Us.jsx)("span",{children:"Human"})]}),(0,Us.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)(nn.Bot,{className:"h-4 w-4 text-purple-500"}),(0,Us.jsx)("span",{children:"Digital"})]}),(0,Us.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Us.jsxs)("div",{className:"flex items-center justify-between text-sm border-t Us-4",children:[(0,Us.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Us.jsx)(nn.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,Us.jsx)("span",{children:"Projects"})]}),(0,Us.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Us.jsx)(la,{className:"flex gap-2",children:(0,Us.jsx)(b,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function Ns({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,si.useState)(!1),i=()=>{r(!0),t?.()},n=l=>{a?.(l)};return(0,Us.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Us.jsx)(xa.AnimatePresence,{mode:"wait",children:(0,Us.jsxs)(xa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Us.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,Us.jsxs)("section",{className:"space-y-4 nn-8",children:[(0,Us.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Us.jsxs)("div",{className:"text-center py-12",children:[(0,Us.jsx)("Us",{className:"text-muted-foreground text-lg",children:"You'Us not part of any teams yet."}),(0,Us.jsx)("Us",{className:"text-muted-foreground text-sm nn-2",children:"Create a new team or ask to Us added to an existing one."})]}):(0,Us.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(l=>(0,Us.jsx)(ql,{team:l,onOpen:n},l.id))})]})]},"teams-index-view")}),(0,Us.jsx)(wt,{open:o,onOpenChange:r,children:(0,Us.jsxs)(ht,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Us.jsxs)(xt,{children:[(0,Us.jsx)(yt,{children:"Create New Team"}),(0,Us.jsx)(Io,{children:"Set up a new team to collaborate with colleagues nn projects."})]}),(0,Us.jsx)("div",{className:"Us-6 text-center text-muted-foreground",children:(0,Us.jsx)("Us",{children:"Team creation form coming soon..."})})]})})]})}0&&(module.exports={AppSidebarLeft,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,DashboardHeader,DashboardPage,DigitalColleageusLayout,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,FileView,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,MainPage,ManagementSidebar,ProjectView,ProjectsIndexView,SearchableSelect,TeamsIndexView});
|
|
5
|
+
"use strict";var Nd=Object.create;var ri=Object.defineProperty;var Cd=Object.getOwnPropertyDescriptor;var Sd=Object.getOwnPropertyNames;var Dd=Object.getPrototypeOf,kd=Object.prototype.hasOwnProperty;var Td=(e,t)=>{for(var a in t)ri(e,a,{get:t[a],enumerable:!0})},As=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Sd(t))!kd.call(e,r)&&r!==a&&ri(e,r,{get:()=>t[r],enumerable:!(o=Cd(t,r))||o.enumerable});return e};var ce=(e,t,a)=>(a=e!=null?Nd(Dd(e)):{},As(t||!e||!e.__esModule?ri(a,"default",{value:e,enumerable:!0}):a,e)),Pd=e=>As(ri({},"__esModule",{value:!0}),e);var mm={};Td(mm,{AppSidebarLeft:()=>pi,ColleagueCard:()=>so,ColleagueForm:()=>Ho,ColleagueTypeSelection:()=>ji,ColleaguesView:()=>$o,DashboardHeader:()=>dn,DashboardPage:()=>ns,DigitalColleageusLayout:()=>Ti,DigitalColleagueClone:()=>Oi,DigitalColleagueOptions:()=>zi,DocumentEdit:()=>_i,DocumentPreview:()=>$i,FileView:()=>qo,KnowledgeBrowser:()=>Wi,KnowledgeSearch:()=>zo,KnowledgeView:()=>Wo,MainPage:()=>es,ManagementSidebar:()=>Fi,ProjectView:()=>xs,ProjectsIndexView:()=>Ns,SearchableSelect:()=>Li,TeamsIndexView:()=>Cs});module.exports=Pd(mm);var ln=require("lucide-react");var $a=ce(require("@radix-ui/react-collapsible")),gr=$a.Root,Is=$a.CollapsibleTrigger,Ms=$a.CollapsibleContent;var Ir=ce(require("clsx"));var Us=require("clsx");var br="-",Rd=e=>{let t=Id(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:s=>{let d=s.split(br);return d[0]===""&&d.length!==1&&d.shift(),Fs(d,t)||Ad(s)},getConflictingClassGroupIds:(s,d)=>{let n=a[s]||[];return d&&o[s]?[...n,...o[s]]:n}}},Fs=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),r=o?Fs(e.slice(1),o):void 0;if(r)return r;if(t.validators.length===0)return;let i=e.join(br);return t.validators.find(({validator:s})=>s(i))?.classGroupId},Es=/^\[(.+)\]$/,Ad=e=>{if(Es.test(e)){let t=Es.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Id=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Ed(Object.entries(e.classGroups),a).forEach(([i,s])=>{vr(s,o,i,t)}),o},vr=(e,t,a,o)=>{e.forEach(r=>{if(typeof r=="string"){let i=r===""?t:Bs(t,r);i.classGroupId=a;return}if(typeof r=="function"){if(Md(r)){vr(r(o),t,a,o);return}t.validators.push({validator:r,classGroupId:a});return}Object.entries(r).forEach(([i,s])=>{vr(s,Bs(t,i),a,o)})})},Bs=(e,t)=>{let a=e;return t.split(br).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Md=e=>e.isThemeGetter,Ed=(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,d])=>[t+s,d])):i);return[a,r]}):e,Bd=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)}}},Ls="!",Fd=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,r=t[0],i=t.length,s=d=>{let n=[],m=0,c=0,v;for(let h=0;h<d.length;h++){let x=d[h];if(m===0){if(x===r&&(o||d.slice(h,h+i)===t)){n.push(d.slice(c,h)),c=h+i;continue}if(x==="/"){v=h;continue}}x==="["?m++:x==="]"&&m--}let u=n.length===0?d:d.substring(c),g=u.startsWith(Ls),y=g?u.substring(1):u,P=v&&v>c?v-c:void 0;return{modifiers:n,hasImportantModifier:g,baseClassName:y,maybePostfixModifierPosition:P}};return a?d=>a({className:d,parseClassName:s}):s},Ld=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},jd=e=>({cache:Bd(e.cacheSize),parseClassName:Fd(e),...Rd(e)}),Od=/\s+/,zd=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:r}=t,i=[],s=e.trim().split(Od),d="";for(let n=s.length-1;n>=0;n-=1){let m=s[n],{modifiers:c,hasImportantModifier:v,baseClassName:u,maybePostfixModifierPosition:g}=a(m),y=!!g,P=o(y?u.substring(0,g):u);if(!P){if(!y){d=m+(d.length>0?" "+d:d);continue}if(P=o(u),!P){d=m+(d.length>0?" "+d:d);continue}y=!1}let h=Ld(c).join(":"),x=v?h+Ls:h,S=x+P;if(i.includes(S))continue;i.push(S);let C=r(P,y);for(let A=0;A<C.length;++A){let F=C[A];i.push(x+F)}d=m+(d.length>0?" "+d:d)}return d};function Hd(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=js(t))&&(o&&(o+=" "),o+=a);return o}var js=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=js(e[o]))&&(a&&(a+=" "),a+=t);return a};function Ud(e,...t){let a,o,r,i=s;function s(n){let m=t.reduce((c,v)=>v(c),e());return a=jd(m),o=a.cache.get,r=a.cache.set,i=d,d(n)}function d(n){let m=o(n);if(m)return m;let c=zd(n,a);return r(n,c),c}return function(){return i(Hd.apply(null,arguments))}}var $e=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Os=/^\[(?:([a-Vs-]+):)?(.+)\]$/i,Vd=/^\d+\/\d+$/,Kd=new Set(["px","full","screen"]),Gd=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,_d=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|Vs|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,$d=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Wd=/^(inset_)?-?((\d+)?\.?(\d+)[a-Vs]+|0)Vs-?((\d+)?\.?(\d+)[a-Vs]+|0)/,Jd=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ia=e=>Wa(e)||Kd.has(e)||Vd.test(e),va=e=>Ja(e,"length",ac),Wa=e=>!!e&&!Number.isNaN(Number(e)),fr=e=>Ja(e,"number",Wa),No=e=>!!e&&Number.isInteger(Number(e)),qd=e=>e.endsWith("%")&&Wa(e.slice(0,-1)),be=e=>Os.test(e),ba=e=>Gd.test(e),Xd=new Set(["length","size","percentage"]),Yd=e=>Ja(e,Xd,zs),Qd=e=>Ja(e,"position",zs),Zd=new Set(["image","url"]),ec=e=>Ja(e,Zd,ic),tc=e=>Ja(e,"",oc),Co=()=>!0,Ja=(e,t,a)=>{let o=Os.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},ac=e=>_d.test(e)&&!$d.test(e),zs=()=>!1,oc=e=>Wd.test(e),ic=e=>Jd.test(e);var rc=()=>{let e=$e("colors"),t=$e("spacing"),a=$e("blur"),o=$e("brightness"),r=$e("borderColor"),i=$e("borderRadius"),s=$e("borderSpacing"),d=$e("borderWidth"),n=$e("contrast"),m=$e("grayscale"),c=$e("hueRotate"),v=$e("invert"),u=$e("gap"),g=$e("gradientColorStops"),y=$e("gradientColorStopPositions"),P=$e("inset"),h=$e("margin"),x=$e("opacity"),S=$e("padding"),C=$e("saturate"),A=$e("scale"),F=$e("sepia"),U=$e("skew"),se=$e("space"),w=$e("translate"),D=()=>["auto","contain","none"],E=()=>["auto","hidden","clip","visible","scroll"],ve=()=>["auto",be,t],j=()=>[be,t],R=()=>["",ia,va],N=()=>["auto",Wa,be],ie=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ke=()=>["solid","dashed","dotted","double","none"],tt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ee=()=>["start","end","center","between","around","evenly","stretch"],at=()=>["","0",be],H=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ne=()=>[Wa,be];return{cacheSize:500,separator:":",theme:{colors:[Co],spacing:[ia,va],blur:["none","",ba,be],brightness:ne(),borderColor:[e],borderRadius:["none","","full",ba,be],borderSpacing:j(),borderWidth:R(),contrast:ne(),grayscale:at(),hueRotate:ne(),invert:at(),gap:j(),gradientColorStops:[e],gradientColorStopPositions:[qd,va],inset:ve(),margin:ve(),opacity:ne(),padding:j(),saturate:ne(),scale:ne(),sepia:at(),skew:ne(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",be]}],container:["container"],columns:[{columns:[ba]}],"break-after":[{"break-after":H()}],"break-before":[{"break-before":H()}],"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:[...ie(),be]}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:D()}],"overscroll-x":[{"overscroll-x":D()}],"overscroll-y":[{"overscroll-y":D()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[P]}],"inset-x":[{"inset-x":[P]}],"inset-y":[{"inset-y":[P]}],start:[{start:[P]}],end:[{end:[P]}],top:[{top:[P]}],right:[{right:[P]}],bottom:[{bottom:[P]}],left:[{left:[P]}],visibility:["visible","invisible","collapse"],Vs:[{Vs:["auto",No,be]}],basis:[{basis:ve()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",be]}],grow:[{grow:at()}],shrink:[{shrink:at()}],order:[{order:["first","last","none",No,be]}],"grid-cols":[{"grid-cols":[Co]}],"col-start-end":[{col:["auto",{span:["full",No,be]},be]}],"col-start":[{"col-start":N()}],"col-end":[{"col-end":N()}],"grid-rows":[{"grid-rows":[Co]}],"row-start-end":[{row:["auto",{span:[No,be]},be]}],"row-start":[{"row-start":N()}],"row-end":[{"row-end":N()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",be]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",be]}],gap:[{gap:[u]}],"gap-x":[{"gap-x":[u]}],"gap-y":[{"gap-y":[u]}],"justify-content":[{justify:["normal",...Ee()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ee(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ee(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],Vs:[{Vs:[S]}],px:[{px:[S]}],py:[{py:[S]}],Vs:[{Vs:[S]}],Vs:[{Vs:[S]}],Vs:[{Vs:[S]}],pr:[{pr:[S]}],pb:[{pb:[S]}],pl:[{pl:[S]}],m:[{m:[h]}],mx:[{mx:[h]}],my:[{my:[h]}],ms:[{ms:[h]}],me:[{me:[h]}],ln:[{ln:[h]}],mr:[{mr:[h]}],mb:[{mb:[h]}],wa:[{wa:[h]}],"space-x":[{"space-x":[se]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[se]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",be,t]}],"min-w":[{"min-w":[be,t,"min","max","fit"]}],"max-w":[{"max-w":[be,t,"none","full","min","max","fit","prose",{screen:[ba]},ba]}],h:[{h:[be,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[be,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[be,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ba,va]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",fr]}],"font-family":[{font:[Co]}],"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",be]}],"line-clamp":[{"line-clamp":["none",Wa,fr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ia,be]}],"list-image":[{"list-image":["none",be]}],"list-style-type":[{list:["none","disc","decimal",be]}],"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","si-underline"],"text-decoration-style":[{decoration:[...ke(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ia,va]}],"underline-offset":[{"underline-offset":["auto",ia,be]}],"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:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",be]}],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",be]}],"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:[...ie(),Qd]}],"bg-repeat":[{bg:["si-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Yd]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","Vs","tl"]},ec]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[g]}],"gradient-via":[{via:[g]}],"gradient-to":[{to:[g]}],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-Vs":[{"rounded-Vs":[i]}],"rounded-si":[{"rounded-si":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-Vs":[{"rounded-Vs":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-Vs":[{"border-Vs":[d]}],"border-opacity":[{"border-opacity":[x]}],"border-style":[{border:[...ke(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[x]}],"divide-style":[{divide:ke()}],"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-Vs":[{"border-Vs":[r]}],"divide-color":[{divide:[r]}],"outline-style":[{outline:["",...ke()]}],"outline-offset":[{"outline-offset":[ia,be]}],"outline-w":[{outline:[ia,va]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[ia,va]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ba,tc]}],"shadow-color":[{shadow:[Co]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...tt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":tt()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[n]}],"drop-shadow":[{"drop-shadow":["","none",ba,be]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[c]}],invert:[{invert:[v]}],saturate:[{saturate:[C]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[n]}],"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":[C]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"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",be]}],duration:[{duration:ne()}],ease:[{ease:["linear","in","out","in-out",be]}],delay:[{delay:ne()}],animate:[{animate:["none","spin","ping","pulse","bounce",be]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[No,be]}],"translate-x":[{"translate-x":[w]}],"translate-y":[{"translate-y":[w]}],"skew-x":[{"skew-x":[U]}],"skew-y":[{"skew-y":[U]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",be]}],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","si-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",be]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-ln":[{"scroll-ln":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-wa":[{"scroll-wa":j()}],"scroll-Vs":[{"scroll-Vs":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-Vs":[{"scroll-Vs":j()}],"scroll-Vs":[{"scroll-Vs":j()}],"scroll-Vs":[{"scroll-Vs":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"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",be]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ia,va,fr]}],stroke:[{stroke:[e,"none"]}],ln:["ln-only","not-ln-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"],Vs:["px","py","Vs","Vs","Vs","pr","pb","pl"],px:["pr","pl"],py:["Vs","pb"],m:["mx","my","ms","me","ln","mr","mb","wa"],mx:["mr","wa"],my:["ln","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-Vs","rounded-si","rounded-se","rounded-Vs","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-si","rounded-es"],"rounded-e":["rounded-se","rounded-Vs"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-Vs":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-Vs"],"border-w-x":["border-w-r","border-w-Vs"],"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-Vs"],"border-color-x":["border-color-r","border-color-Vs"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-ln","scroll-mr","scroll-mb","scroll-wa"],"scroll-mx":["scroll-mr","scroll-wa"],"scroll-my":["scroll-ln","scroll-mb"],"scroll-Vs":["scroll-px","scroll-py","scroll-Vs","scroll-Vs","scroll-Vs","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-Vs","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Hs=Ud(rc);function f(...e){return Hs((0,Us.clsx)(e))}var Vs=require("react/jsx-runtime");function Nt({className:e,...t}){return(0,Vs.jsx)("div",{className:f("animate-pulse rounded-md bg-primary/10",e),...t})}var ye=ce(require("react")),Qa=require("@radix-ui/react-slot"),on=require("class-variance-authority");var si=require("react"),Ks=(e=768)=>{let[t,a]=(0,si.useState)(!1);return(0,si.useEffect)(()=>{let o=()=>{a(window.innerWidth<e)};return o(),window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)},[e]),t};var $s=ce(require("react")),ni=(0,on.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=$s.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...r},i)=>(0,Vs.jsx)(e?Qa.Slot:"button",{className:f(ni({className:t,size:a,variant:o})),ref:i,...r}));b.displayName="Button";var Js=ce(require("react"));var O=Js.forwardRef(({className:e,type:t,...a},o)=>(0,Vs.jsx)("input",{type:t,className:f("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}));O.displayName="Input";var Xs=ce(require("react")),hr=ce(require("@radix-ui/react-separator"));var So=Xs.forwardRef(({className:e,orientation:t="horizontal",decorative:a=!0,...o},r)=>(0,Vs.jsx)(hr.Root,{ref:r,decorative:a,orientation:t,className:f("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...o}));So.displayName=hr.Root.displayName;var Do=ce(require("react")),ut=ce(require("@radix-ui/react-dialog")),Qs=require("@radix-ui/react-icons");var en=ut.Root;var sc=ut.Portal,tn=Do.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(ut.Overlay,{className:f("fixed inset-0 Vs-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}));tn.displayName=ut.Overlay.displayName;var nc=(0,on.cva)("fixed Vs-50 gap-4 bg-background Vs-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-Vs data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),xr=Do.forwardRef(({side:e="right",className:t,children:a,...o},r)=>(0,Vs.jsxs)(sc,{children:[(0,Vs.jsx)(tn,{}),(0,Vs.jsxs)(ut.Content,{ref:r,className:f(nc({side:e}),t),...o,children:[(0,Vs.jsxs)(ut.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,Vs.jsx)(Qs.Cross2Icon,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{className:"ln-only",children:"Close"})]}),a]})]}));xr.displayName=ut.Content.displayName;var lc=({className:e,...t})=>(0,Vs.jsx)("div",{className:f("flex flex-col space-y-2 text-center sm:text-left",e),...t});lc.displayName="SheetHeader";var dc=({className:e,...t})=>(0,Vs.jsx)("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});dc.displayName="SheetFooter";var cc=Do.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(ut.Title,{ref:a,className:f("text-lg font-semibold text-foreground",e),...t}));cc.displayName=ut.Title.displayName;var mc=Do.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(ut.Description,{ref:a,className:f("text-sm text-muted-foreground",e),...t}));mc.displayName=ut.Description.displayName;var an=ce(require("react")),$t=ce(require("@radix-ui/react-tooltip"));var qa=$t.Provider,Xa=$t.Root,Ya=$t.Trigger,Ra=an.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Vs.jsx)($t.Portal,{children:(0,Vs.jsx)($t.Content,{ref:o,sideOffset:t,className:f("Vs-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})}));Ra.displayName=$t.Content.displayName;var pc="sidebar:state",uc=60*60*24*7,gc="16rem",fc="18rem",vc="3rem",bc="b",sn=ye.createContext(null);function li(){let e=ye.useContext(sn);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}var ko=ye.forwardRef(({defaultOpen:e=!0,open:t,onOpenChange:a,className:o,style:r,children:i,...s},d)=>{let n=Ks(),[m,c]=ye.useState(!1),[v,u]=ye.useState(e),g=t??v,y=ye.useCallback(S=>{if(a)return a?.(typeof S=="function"?S(g):S);u(S),document.cookie=`${pc}=${g}; path=/; max-age=${uc}`},[a,g]),P=ye.useCallback(()=>n?c(S=>!S):y(S=>!S),[n,y,c]);ye.useEffect(()=>{let S=C=>{C.key===bc&&(C.metaKey||C.ctrlKey)&&(C.preventDefault(),P())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[P]);let h=g?"expanded":"collapsed",x=ye.useMemo(()=>({state:h,open:g,setOpen:y,isMobile:n,openMobile:m,setOpenMobile:c,toggleSidebar:P}),[h,g,y,n,m,c,P]);return(0,Vs.jsx)(sn.Provider,{value:x,children:(0,Vs.jsx)(qa,{delayDuration:0,children:(0,Vs.jsx)("div",{style:{"--sidebar-width":gc,"--sidebar-width-icon":vc,...r},className:f("group/sidebar-wrapper flex w-full has-[[data-variant=inset]]:bg-sidebar",o),ref:d,...s,children:i})})})});ko.displayName="SidebarProvider";var wr=ye.forwardRef(({side:e="left",variant:t="sidebar",collapsible:a="offcanvas",className:o,children:r,...i},s)=>{let{isMobile:d,state:n,openMobile:m,setOpenMobile:c}=li();return a==="none"?(0,Vs.jsx)("div",{className:f("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",o),ref:s,...i,children:r}):d?(0,Vs.jsx)(en,{open:m,onOpenChange:c,...i,children:(0,Vs.jsx)(xr,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar Vs-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":fc},side:e,children:(0,Vs.jsx)("div",{className:"flex h-full w-full flex-col",children:r})})}):(0,Vs.jsxs)("div",{ref:s,className:"group peer hidden md:block text-sidebar-foreground","data-state":n,"data-collapsible":n==="collapsed"?a:"","data-variant":t,"data-side":e,children:[(0,Vs.jsx)("div",{className:f("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)Vs+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),(0,Vs.jsx)("div",{className:f("duration-200 fixed top-14 bottom-0 Vs-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"?"Vs-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)Vs+_theme(spacing.4)Vs+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-Vs",o),...i,children:(0,Vs.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})})]})});wr.displayName="Sidebar";var Nr=ye.forwardRef(({className:e,onClick:t,...a},o)=>{let{toggleSidebar:r}=li();return(0,Vs.jsxs)(b,{ref:o,"data-sidebar":"trigger",variant:"ghost",size:"icon",className:f("h-7 w-7",e),onClick:i=>{t?.(i),r()},...a,children:[(0,Vs.jsx)(ln.PanelLeft,{}),(0,Vs.jsx)("span",{className:"ln-only",children:"Toggle Sidebar"})]})});Nr.displayName="SidebarTrigger";var hc=ye.forwardRef(({className:e,...t},a)=>{let{toggleSidebar:o}=li();return(0,Vs.jsx)("button",{ref:a,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:o,title:"Toggle Sidebar",className:f("absolute inset-y-0 Vs-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]Vs&]:cursor-w-resize [[data-side=right]Vs&]:cursor-e-resize","[[data-side=left][data-state=collapsed]Vs&]:cursor-e-resize [[data-side=right][data-state=collapsed]Vs&]: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]Vs&]:-right-2","[[data-side=right][data-collapsible=offcanvas]Vs&]:-left-2",e),...t})});hc.displayName="SidebarRail";var Cr=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("main",{ref:a,className:f("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]:wa-2 md:peer-data-[variant=inset]:wa-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow",e),...t}));Cr.displayName="SidebarInset";var xc=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(O,{ref:a,"data-sidebar":"input",className:f("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t}));xc.displayName="SidebarInput";var Sr=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,"data-sidebar":"header",className:f("flex flex-col gap-2 Vs-2",e),...t}));Sr.displayName="SidebarHeader";var Dr=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,"data-sidebar":"footer",className:f("flex flex-col gap-2 Vs-2",e),...t}));Dr.displayName="SidebarFooter";var yc=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(So,{ref:a,"data-sidebar":"separator",className:f("mx-2 w-auto bg-sidebar-border",e),...t}));yc.displayName="SidebarSeparator";var di=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,"data-sidebar":"content",className:f("flex min-h-0 flex-1 flex-col gap-2 overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t}));di.displayName="SidebarContent";var ci=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,"data-sidebar":"group",className:f("relative flex w-full min-w-0 flex-col Vs-2",e),...t}));ci.displayName="SidebarGroup";var wc=ye.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Vs.jsx)(t?Qa.Slot:"div",{ref:o,"data-sidebar":"group-label",className:f("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]:-ln-8 group-data-[collapsible=icon]:opacity-0",e),...a}));wc.displayName="SidebarGroupLabel";var Nc=ye.forwardRef(({className:e,asChild:t=!1,...a},o)=>(0,Vs.jsx)(t?Qa.Slot:"button",{ref:o,"data-sidebar":"group-action",className:f("absolute right-3 top-3.5 flex aspect-square w-5 items-center justify-center rounded-md Vs-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}));Nc.displayName="SidebarGroupAction";var kr=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,"data-sidebar":"group-content",className:f("w-full text-sm",e),...t}));kr.displayName="SidebarGroupContent";var To=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("wa",{ref:a,"data-sidebar":"menu",className:f("flex w-full min-w-0 flex-col gap-1",e),...t}));To.displayName="SidebarMenu";var Po=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("li",{ref:a,"data-sidebar":"menu-item",className:f("group/menu-item relative",e),...t}));Po.displayName="SidebarMenuItem";var Cc=(0,on.cva)("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md Vs-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:pr-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]:!Vs-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]:!Vs-0"}},defaultVariants:{variant:"default",size:"default"}}),mi=ye.forwardRef(({asChild:e=!1,isActive:t=!1,variant:a="default",size:o="default",tooltip:r,className:i,...s},d)=>{let n=e?Qa.Slot:"button",{isMobile:m,state:c}=li(),v=(0,Vs.jsx)(n,{ref:d,"data-sidebar":"menu-button","data-size":o,"data-active":t,className:f(Cc({variant:a,size:o}),i),...s});return r?(typeof r=="string"&&(r={children:r}),(0,Vs.jsxs)(Xa,{children:[(0,Vs.jsx)(Ya,{asChild:!0,children:v}),(0,Vs.jsx)(Ra,{side:"right",align:"center",hidden:c!=="collapsed"||m,...r})]})):v});mi.displayName="SidebarMenuButton";var Tr=ye.forwardRef(({className:e,asChild:t=!1,showOnHover:a=!1,...o},r)=>(0,Vs.jsx)(t?Qa.Slot:"button",{ref:r,"data-sidebar":"menu-action",className:f("absolute right-1 top-1.5 flex aspect-square w-5 items-center justify-center rounded-md Vs-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}));Tr.displayName="SidebarMenuAction";var Sc=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,"data-sidebar":"menu-badge",className:f("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}));Sc.displayName="SidebarMenuBadge";var Dc=ye.forwardRef(({className:e,showIcon:t=!1,...a},o)=>{let r=ye.useMemo(()=>`${Math.floor(Math.random()*40)+50}%`,[]);return(0,Vs.jsxs)("div",{ref:o,"data-sidebar":"menu-skeleton",className:f("rounded-md h-8 flex gap-2 px-2 items-center",e),...a,children:[t&&(0,Vs.jsx)(Nt,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),(0,Vs.jsx)(Nt,{className:"h-4 flex-1 max-w-[--skeleton-width]","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":r}})]})});Dc.displayName="SidebarMenuSkeleton";var Pr=ye.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("wa",{ref:a,"data-sidebar":"menu-sub",className:f("mx-3.5 flex min-w-0 translate-x-px flex-col gap-1 border-Vs border-sidebar-border px-2.5 py-0.5","group-data-[collapsible=icon]:hidden",e),...t}));Pr.displayName="SidebarMenuSub";var Rr=ye.forwardRef(({...e},t)=>(0,Vs.jsx)("li",{ref:t,...e}));Rr.displayName="SidebarMenuSubItem";var Ar=ye.forwardRef(({asChild:e=!1,size:t="md",isActive:a,className:o,...r},i)=>(0,Vs.jsx)(e?Qa.Slot:"a",{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":a,className:f("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}));Ar.displayName="SidebarMenuSubButton";function pi({mainNav:e,secondaryNav:t,ongoingWork:a,title:o,subTitle:r,pathName:i,menuHeading:s,onNavClick:d,loading:n=!1,LinkComponent:m,...c}){let u=m?g=>(0,Vs.jsx)(m,{...g}):d?({href:g,children:y,...P})=>(0,Vs.jsx)("button",{onClick:()=>d&&d(g),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...P,children:y}):g=>(0,Vs.jsx)("a",{...g});return(0,Vs.jsxs)(wr,{...c,variant:"inset",children:[(0,Vs.jsx)(Sr,{children:(0,Vs.jsx)(To,{children:(0,Vs.jsx)(Po,{children:n?(0,Vs.jsxs)("div",{className:"grid flex-1 Vs-2 text-left text-m leading-tight",children:[(0,Vs.jsx)(Nt,{className:"bg-gray-200 my-2 w-full h-7"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):(0,Vs.jsxs)("div",{className:"grid flex-1 Vs-2 text-left text-m leading-tight",children:[(0,Vs.jsx)("span",{className:"truncate font-semibold",children:o}),r&&(0,Vs.jsx)("span",{className:"truncate text-sm",children:r})]})})})}),n&&(0,Vs.jsxs)(di,{children:[(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"}),(0,Vs.jsx)(Nt,{className:"bg-gray-200 w-3/4 h-5"})]}),(0,Vs.jsxs)(di,{children:[(0,Vs.jsx)("div",{className:"px-4 text-sm",children:"Recent Work"}),a&&!n&&a.map((g,y)=>(0,Vs.jsx)(nn,{subNav:g,pathName:i,Link:u},y)),(0,Vs.jsx)("div",{className:"border-t border-gray-200 my-4"}),e&&!n&&e.map((g,y)=>(0,Vs.jsx)(nn,{subNav:g,pathName:i,Link:u},y)),(0,Vs.jsx)(ci,{className:"ln-auto",children:(0,Vs.jsx)(kr,{children:(0,Vs.jsx)(To,{children:t&&!n&&t.map(g=>(0,Vs.jsx)(Po,{children:(0,Vs.jsx)(mi,{asChild:!0,size:"sm",children:(0,Vs.jsxs)(u,{href:g.url||"",children:[g.icon&&(0,Vs.jsx)(g.icon,{}),(0,Vs.jsx)("span",{children:g.label})]})})},g.label))})})})]}),(0,Vs.jsx)(Dr,{})]})}function nn({subNav:e,pathName:t,Link:a}){let o=e,r=!1;return o.links&&o.links.map(i=>{i.url===t&&(r=!0)}),(0,Vs.jsx)(gr,{defaultOpen:!0,className:"group/collapsible",children:(0,Vs.jsx)(ci,{className:"py-0",children:(0,Vs.jsx)(To,{children:(0,Vs.jsx)(gr,{asChild:!0,defaultOpen:o.isActive,children:(0,Vs.jsxs)(Po,{children:[(0,Vs.jsx)(mi,{asChild:!0,tooltip:o.label,className:(0,Ir.default)(r&&"font-bold text-accent"),children:(0,Vs.jsxs)(a,{href:o.url,children:[o.icon&&(0,Vs.jsx)(o.icon,{}),(0,Vs.jsx)("span",{children:o.label})]})}),o.links?.length?(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsx)(Is,{asChild:!0,children:(0,Vs.jsxs)(Tr,{className:"data-[state=open]:rotate-90",children:[(0,Vs.jsx)(ln.ChevronRight,{}),(0,Vs.jsx)("span",{className:"ln-only",children:"Toggle"})]})}),(0,Vs.jsx)(Ms,{children:(0,Vs.jsx)(Pr,{children:o.links?.map(i=>(0,Vs.jsx)(Rr,{children:(0,Vs.jsx)(Ar,{asChild:!0,className:(0,Ir.default)(i.url===t&&"font-bold text-accent"),children:(0,Vs.jsx)(a,{href:i.url,children:(0,Vs.jsx)("span",{children:i.label})})})},i.label))})})]}):null]})},o.label)})})})}var ui=ce(require("react")),ra=ce(require("@radix-ui/react-avatar"));var Mt=ui.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(ra.Root,{ref:a,className:f("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Mt.displayName=ra.Root.displayName;var sa=ui.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(ra.Image,{ref:a,className:f("aspect-square h-full w-full",e),...t}));sa.displayName=ra.Image.displayName;var Et=ui.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(ra.Fallback,{ref:a,className:f("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Et.displayName=ra.Fallback.displayName;var na=ce(require("react")),Ce=ce(require("@radix-ui/react-dropdown-menu"));var eo=Ce.Root,to=Ce.Trigger;var kc=na.forwardRef(({className:e,inset:t,children:a,...o},r)=>(0,Vs.jsxs)(Ce.SubTrigger,{ref:r,className:f("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,Vs.jsx)(Qs.ChevronRightIcon,{className:"wa-auto"})]}));kc.displayName=Ce.SubTrigger.displayName;var Tc=na.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(Ce.SubContent,{ref:a,className:f("Vs-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Vs-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}));Tc.displayName=Ce.SubContent.displayName;var Aa=na.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Vs.jsx)(Ce.Portal,{children:(0,Vs.jsx)(Ce.Content,{ref:o,sideOffset:t,className:f("Vs-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover Vs-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})}));Aa.displayName=Ce.Content.displayName;var Yt=na.forwardRef(({className:e,inset:t,...a},o)=>(0,Vs.jsx)(Ce.Item,{ref:o,className:f("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}));Yt.displayName=Ce.Item.displayName;var Pc=na.forwardRef(({className:e,children:t,checked:a,...o},r)=>(0,Vs.jsxs)(Ce.CheckboxItem,{ref:r,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...o,children:[(0,Vs.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Vs.jsx)(Ce.ItemIndicator,{children:(0,Vs.jsx)(Qs.CheckIcon,{className:"h-4 w-4"})})}),t]}));Pc.displayName=Ce.CheckboxItem.displayName;var Rc=na.forwardRef(({className:e,children:t,...a},o)=>(0,Vs.jsxs)(Ce.RadioItem,{ref:o,className:f("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...a,children:[(0,Vs.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Vs.jsx)(Ce.ItemIndicator,{children:(0,Vs.jsx)(Qs.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Rc.displayName=Ce.RadioItem.displayName;var Mr=na.forwardRef(({className:e,inset:t,...a},o)=>(0,Vs.jsx)(Ce.Label,{ref:o,className:f("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));Mr.displayName=Ce.Label.displayName;var Er=na.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(Ce.Separator,{ref:a,className:f("-mx-1 my-1 h-px bg-muted",e),...t}));Er.displayName=Ce.Separator.displayName;var Ac=({className:e,...t})=>(0,Vs.jsx)("span",{className:f("wa-auto text-xs tracking-widest opacity-60",e),...t});Ac.displayName="DropdownMenuShortcut";var dn=({isRightSidebarOpen:e,onToggleRightSidebar:t,onToggleLeftSidebar:a,onToggleNotifications:o})=>(0,Vs.jsx)("header",{className:"border-b bg-white/80 backdrop-blur-md dark:bg-slate-900/80 sticky top-0 Vs-50",children:(0,Vs.jsx)("div",{className:"container mx-auto px-6 py-4",children:(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsxs)("div",{className:"flex items-center space-x-4",children:[a&&(0,Vs.jsx)(b,{variant:"ghost",size:"icon",className:"md:hidden",onClick:a,children:(0,Vs.jsx)(ln.Menu,{className:"h-5 w-5"})}),(0,Vs.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,Vs.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,Vs.jsxs)(b,{variant:"ghost",size:"icon",className:"relative",onClick:o,children:[(0,Vs.jsx)(ln.Bell,{className:"h-5 w-5"}),(0,Vs.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,Vs.jsxs)(eo,{children:[(0,Vs.jsx)(to,{asChild:!0,children:(0,Vs.jsx)(b,{variant:"ghost",className:"relative h-10 w-10 rounded-full",children:(0,Vs.jsxs)(Mt,{className:"h-10 w-10",children:[(0,Vs.jsx)(sa,{src:"/avatars/01.png",alt:"@user"}),(0,Vs.jsx)(Et,{children:"JD"})]})})}),(0,Vs.jsxs)(Aa,{className:"w-56",align:"end",forceMount:!0,children:[(0,Vs.jsx)(Mr,{className:"font-normal",children:(0,Vs.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,Vs.jsx)("Vs",{className:"text-sm font-medium leading-none",children:"John Doe"}),(0,Vs.jsx)("Vs",{className:"text-xs leading-none text-muted-foreground",children:"john.doe@company.com"})]})}),(0,Vs.jsx)(Er,{}),(0,Vs.jsxs)(Yt,{children:[(0,Vs.jsx)(ln.User,{className:"mr-2 h-4 w-4"}),(0,Vs.jsx)("span",{children:"Profile"})]}),(0,Vs.jsxs)(Yt,{children:[(0,Vs.jsx)(ln.Settings,{className:"mr-2 h-4 w-4"}),(0,Vs.jsx)("span",{children:"Settings"})]})]})]})]})]})})});var Ci=ce(require("react")),Lr=ce(require("next/link"));var Ic=(0,on.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,Vs.jsx)("div",{className:f(Ic({variant:t}),e),...a})}var Br=ce(require("react")),Ot=ce(require("@radix-ui/react-scroll-area"));var Qt=Br.forwardRef(({className:e,children:t,...a},o)=>(0,Vs.jsxs)(Ot.Root,{ref:o,className:f("relative overflow-hidden",e),...a,children:[(0,Vs.jsx)(Ot.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,Vs.jsx)(pn,{}),(0,Vs.jsx)(Ot.Corner,{})]}));Qt.displayName=Ot.Root.displayName;var pn=Br.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Vs.jsx)(Ot.ScrollAreaScrollbar,{ref:o,orientation:t,className:f("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-Vs border-Vs-transparent Vs-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent Vs-[1px]",e),...a,children:(0,Vs.jsx)(Ot.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));pn.displayName=Ot.ScrollAreaScrollbar.displayName;var Ro=ce(require("react")),st=ce(require("@radix-ui/react-dialog"));var wt=st.Root,gn=st.Trigger,Mc=st.Portal;var fn=Ro.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(st.Overlay,{ref:a,className:f("fixed inset-0 Vs-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}));fn.displayName=st.Overlay.displayName;var ht=Ro.forwardRef(({className:e,children:t,...a},o)=>(0,Vs.jsxs)(Mc,{children:[(0,Vs.jsx)(fn,{}),(0,Vs.jsxs)(st.Content,{ref:o,className:f("fixed left-[50%] top-[50%] Vs-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background Vs-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,Vs.jsxs)(st.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,Vs.jsx)(ln.Vs,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{className:"ln-only",children:"Close"})]})]})]}));ht.displayName=st.Content.displayName;var xt=({className:e,...t})=>(0,Vs.jsx)("div",{className:f("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});xt.displayName="DialogHeader";var Ao=({className:e,...t})=>(0,Vs.jsx)("div",{className:f("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ao.displayName="DialogFooter";var yt=Ro.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(st.Title,{ref:a,className:f("text-lg font-semibold leading-none tracking-tight",e),...t}));yt.displayName=st.Title.displayName;var Io=Ro.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(st.Description,{ref:a,className:f("text-sm text-muted-foreground",e),...t}));Io.displayName=st.Description.displayName;var Mo=ce(require("@radix-ui/react-checkbox")),bn=ce(require("react")),Eo=bn.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(Mo.Root,{className:f("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,Vs.jsx)(Mo.Indicator,{className:f("flex items-center justify-center text-current"),children:(0,Vs.jsx)(ln.Check,{className:"h-4 w-4"})})}));Eo.displayName=Mo.Root.displayName;var Zt=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),xn=[{id:"home",title:"Home",icon:(0,Vs.jsx)(ln.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Vs.jsx)(ln.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,Vs.jsx)(ln.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,Vs.jsx)(ln.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Vs.jsx)(ln.FileText,{}),url:"/knowledge"}],yn=[{id:"1",title:"New comment on your post",description:"Alex Morgan commented on your 'Minimalist Logo Design' post.",time:"Just now",read:!1,type:"info",actionLabel:"View comment",onAction:()=>console.log("View comment clicked")},{id:"2",title:"Project deadline approaching",description:"The 'Website Redesign' project is due in 2 days.",time:"5 minutes ago",read:!1,type:"warning",actionLabel:"View project",onAction:()=>console.log("View project clicked")},{id:"3",title:"File shared with you",description:"Emma Thompson shared 'Brand Guidelines.pdf' with you.",time:"1 hour ago",read:!1,type:"info",actionLabel:"Open file",onAction:()=>console.log("Open file clicked")},{id:"4",title:"Update successful",description:"PixelMaster has been updated to version 2.4.0.",time:"3 hours ago",read:!0,type:"success",actionLabel:"See what's new",onAction:()=>console.log("See what's new clicked")},{id:"5",title:"Storage limit reached",description:"You've used 95% of your storage. Consider upgrading your plan.",time:"Yesterday",read:!0,type:"error",actionLabel:"Upgrade plan",onAction:()=>console.log("Upgrade plan clicked")},{id:"6",title:"Weekly summary",description:"Check out your activity summary for the past week.",time:"2 days ago",read:!0,type:"info",actionLabel:"View summary",onAction:()=>console.log("View summary clicked")},{id:"7",title:"New tutorial available",description:"A new tutorial on 'Advanced Animation Techniques' is now available.",time:"3 days ago",read:!0,type:"info",actionLabel:"Start learning",onAction:()=>console.log("Start learning clicked")}],wn=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Vs.jsx)(ln.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,Vs.jsx)(ln.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,Vs.jsx)(ln.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,Vs.jsx)(ln.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,Vs.jsx)(ln.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,Vs.jsx)(ln.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,Vs.jsx)(ln.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,Vs.jsx)(ln.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"ln",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Vs.jsx)(ln.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,Vs.jsx)(ln.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],hi=[{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}],Nn=[{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 Fr=[{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}],vi=[{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}],yi=[{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")}],Ec=[...yi,{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 on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",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")}],Bc=[...hi,{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}],bi={projects:[{id:"1",name:"Empty Project",description:"A project with si 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:[]},hn={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:yi.filter(e=>e.epicId==="1")};var wp={empty:{initialProjects:bi.projects,initialEpics:bi.epics,initialSprints:bi.sprints,initialTasks:bi.tasks},default:{initialProjects:hi,initialEpics:Fr,initialSprints:vi,initialTasks:yi},highDensity:{initialProjects:hi,initialEpics:Fr,initialSprints:vi,initialTasks:Ec},singleEpic:{initialProjects:hi,initialEpics:hn.epics,initialSprints:vi,initialTasks:hn.tasks},multipleProjects:{initialProjects:Bc,initialEpics:Fr,initialSprints:vi,initialTasks:yi}},xi=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Zt),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Zt),version:"2",lastUpdated:new Date("2024-01-15"),isActive:!0},{id:"3",type:"human",name:"Michael Chen",email:"michael.chen@company.com",role:"Product Manager",department:"Product",status:"inactive",joinedDate:new Date("2022-08-20"),lastActive:new Date(Date.now()-2*60*60*1e3),phone:"+1 (555) 987-6543",location:"New York, NY",timezone:"EST",skills:["Product Strategy","Agile","Data Analysis","User Stories","Roadmapping"],bio:"Strategic product manager focused on driving user engagement and business growth."},{id:"4",type:"digital",name:"MarketingBot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"Specialized AI assistant for marketing campaigns, content creation, and social media management.",workInstructions:"Create engaging social media content. Analyze campaign performance metrics. Generate marketing copy and headlines. Schedule and manage social media posts.",capabilities:["Content Creation","Social Media Management","Analytics","SEO Optimization","Campaign Management"],knowledge:["Digital Marketing","Social Media Platforms","Content Strategy","Analytics Tools"].map(Zt),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Zt),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Zt),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Zt),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(Zt),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Zt),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(Zt),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Zt),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Np=[{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:xi.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:xi.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:xi.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 Cp=xi.filter(e=>e.type==="digital");function Ni(e,t){let[a,o]=(0,si.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,si.useEffect)(()=>{r(a)},[]),[a,r]}function jr({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:r=wn[0],onBusinessUnitChange:i,onSearch:s,className:d,logo:n="/headerlogo.png",appName:m="Nuvia",tagline:c="Collaboration Platform"}){let[v,u]=Ci.useState({}),[g,y]=Ni("sidebar-favorites",{}),[P,h]=Ci.useState(null),[x,S]=Ci.useState(""),C=N=>{u(ie=>({...ie,[N]:!ie[N]}))},A=N=>{i?.(N)},F=()=>{x.trim()&&s?.(x.trim())},U=N=>{N.key==="Enter"&&(N.preventDefault(),F())},se=(N,ie)=>{let ke=g[N]||[],tt=ke.includes(ie)?ke.filter(Ee=>Ee!==ie):ke.concat(ie);y({...g,[N]:tt})},w=N=>{if(!N.items||!N.maxItems||N.items.length<=N.maxItems)return N.items||[];let ie=g[N.id]||[],ke=N.items.filter(Ee=>ie.includes(Ee.id)),tt=N.items.filter(Ee=>!ie.includes(Ee.id));return[...ke,...tt].slice(0,N.maxItems)},D=N=>N.maxItems&&N.items&&N.items.length>N.maxItems,E=e,ve=N=>{let ie=D(N),ke=w(N),tt=(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-3",children:[N.icon,(0,Vs.jsx)("span",{children:N.title})]}),N.badge&&(0,Vs.jsx)(Q,{variant:"outline",className:"wa-auto rounded-full px-2 py-0.5 text-xs",children:N.badge}),N.items&&(0,Vs.jsx)(ln.ChevronDown,{className:f("wa-2 h-4 w-4 transition-transform",v[N.title]?"rotate-180":"")})]}),Ee=f("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",N.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return N.url?(0,Vs.jsx)(Lr.default,{href:N.url,className:Ee,onClick:a?o:void 0,children:tt}):(0,Vs.jsx)("button",{className:Ee,onClick:()=>N.items&&C(N.title),children:tt})},j=()=>{let N=e.find(ke=>ke.id===P);if(!N||!N.items||!N.maxItems)return null;let ie=g[N.id]||[];return(0,Vs.jsx)(wt,{open:!!P,onOpenChange:ke=>!ke&&h(null),children:(0,Vs.jsxs)(ht,{className:"sm:max-w-md",children:[(0,Vs.jsxs)(xt,{children:[(0,Vs.jsxs)(yt,{children:["Manage ",N.title," Favorites"]}),(0,Vs.jsxs)("Vs",{className:"text-sm text-muted-foreground",children:["Select up to ",N.maxItems," items to show in ",N.title.toLowerCase(),"."]})]}),(0,Vs.jsx)(Qt,{className:"max-h-96 pr-4",children:(0,Vs.jsx)("div",{className:"space-y-4",children:N.items.map(ke=>(0,Vs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Vs.jsx)(Eo,{id:ke.id,checked:ie.includes(ke.id),onCheckedChange:()=>se(N.id,ke.id),disabled:!ie.includes(ke.id)&&ie.length>=(N.maxItems||0)}),(0,Vs.jsxs)("label",{htmlFor:ke.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:[ke.title,ke.badge&&(0,Vs.jsx)(Q,{variant:"outline",className:"text-xs",children:ke.badge})]})]},ke.id))})})]})})},R=(0,Vs.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between Vs-4",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Vs.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,Vs.jsx)("img",{src:n,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("h2",{className:"font-semibold",children:m}),(0,Vs.jsx)("Vs",{className:"text-xs text-muted-foreground",children:c})]})]}),a&&(0,Vs.jsx)(b,{variant:"ghost",size:"icon",onClick:o,children:(0,Vs.jsx)(ln.Vs,{className:"h-5 w-5"})})]}),(0,Vs.jsx)("div",{className:"px-3 py-2",children:(0,Vs.jsxs)("div",{className:"relative",children:[(0,Vs.jsx)(ln.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Vs.jsx)(O,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:x,onChange:N=>S(N.target.value),onKeyPress:U})]})}),(0,Vs.jsx)(Qt,{className:"flex-1 px-3 py-2",children:(0,Vs.jsx)("div",{className:"space-y-1",children:E.map(N=>(0,Vs.jsxs)("div",{className:"mb-1",children:[ve(N),N.items&&v[N.title]&&(0,Vs.jsxs)("div",{className:"ln-1 wa-6 space-y-1 border-Vs pl-3",children:[w(N).map(ie=>(0,Vs.jsxs)(Lr.default,{href:ie.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[ie.title,ie.badge&&(0,Vs.jsx)(Q,{variant:"outline",className:"wa-auto rounded-full px-2 py-0.5 text-xs",children:ie.badge})]},ie.id)),D(N)&&N.items&&N.items.length>w(N).length&&(0,Vs.jsxs)("button",{onClick:()=>h(N.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:["...",N.items.length-w(N).length," more available"]})]})]},N.id))})}),(0,Vs.jsx)("div",{className:"Vs-3",children:(0,Vs.jsx)("div",{className:"space-y-1",children:(0,Vs.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,Vs.jsx)(ln.Settings,{className:"h-5 w-5"}),(0,Vs.jsx)("span",{children:"Settings"})]})})}),(0,Vs.jsx)(j,{})]});return a?(0,Vs.jsx)("div",{className:f("fixed inset-y-0 left-0 Vs-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",d),children:R}):(0,Vs.jsx)("div",{className:f("fixed inset-y-0 left-0 Vs-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",d),children:R})}var wa=require("framer-motion");var Cn=require("next-themes");function Sn(){let{setTheme:e,theme:t}=(0,Cn.useTheme)();return(0,Vs.jsx)(qa,{children:(0,Vs.jsxs)(Xa,{children:[(0,Vs.jsx)(Ya,{asChild:!0,children:(0,Vs.jsxs)(b,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Vs.jsx)(ln.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Vs.jsx)(ln.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Vs.jsx)("span",{className:"ln-only",children:"Toggle theme"})]})}),(0,Vs.jsx)(Ra,{children:"Toggle theme"})]})})}function Dn({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:r,className:i}){let s=e.filter(m=>!m.read),d=s.length,n=m=>{switch(m){case"info":return(0,Vs.jsx)(ln.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,Vs.jsx)(ln.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,Vs.jsx)(ln.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,Vs.jsx)(ln.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,Vs.jsx)(wa.AnimatePresence,{children:t&&(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsx)(wa.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 Vs-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,Vs.jsx)(wa.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:f("fixed inset-y-0 right-0 Vs-50 w-full max-w-sm border-Vs bg-background shadow-lg md:w-96",i),children:(0,Vs.jsxs)("div",{className:"flex h-full flex-col",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between border-b Vs-4",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)(ln.Bell,{className:"h-5 w-5"}),(0,Vs.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),d>0&&(0,Vs.jsxs)(Q,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[d," new"]})]}),(0,Vs.jsxs)(b,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Vs.jsx)(ln.Vs,{className:"h-5 w-5"}),(0,Vs.jsx)("span",{className:"ln-only",children:"Close"})]})]}),d>0&&(0,Vs.jsxs)("div",{className:"flex items-center justify-between border-b Vs-2",children:[(0,Vs.jsxs)("span",{className:"text-sm text-muted-foreground",children:[d," unread notification",d!==1?"s":""]}),(0,Vs.jsx)(b,{variant:"ghost",size:"sm",onClick:r,className:"text-sm",children:"Dismiss all"})]}),s.length>0?(0,Vs.jsx)(Qt,{className:"flex-1",children:(0,Vs.jsx)("div",{className:"divide-y",children:s.map(m=>(0,Vs.jsxs)("div",{className:f("flex gap-3 Vs-4 transition-colors bg-muted/50"),children:[(0,Vs.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:n(m.type)}),(0,Vs.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)("Vs",{className:"font-medium",children:m.title}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)("Vs",{className:"text-xs text-muted-foreground",children:m.time}),(0,Vs.jsx)(b,{variant:"ghost",size:"sm",className:"h-6 w-6 Vs-0",onClick:()=>o?.(m.id),title:"Dismiss",children:(0,Vs.jsx)(ln.Check,{className:"h-3 w-3"})})]})]}),(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,Vs.jsxs)(b,{variant:"link",size:"sm",className:"h-auto Vs-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,Vs.jsx)(ln.ChevronRight,{className:"wa-1 h-3 w-3"})]})]})]},m.id))})}):(0,Vs.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center Vs-8 text-center",children:[(0,Vs.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Vs.jsx)(ln.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,Vs.jsx)("h3",{className:"ln-4 text-lg font-medium",children:"No notifications"}),(0,Vs.jsx)("Vs",{className:"ln-2 text-sm text-muted-foreground",children:"When you receive notifications, they'on appear here."})]})]})})]})})}var Ia=ce(require("@radix-ui/react-tabs"));function kn({className:e,...t}){return(0,Vs.jsx)(Ia.Root,{"data-slot":"tabs",className:f("flex flex-col gap-2",e),...t})}function Tn({className:e,...t}){return(0,Vs.jsx)(Ia.List,{"data-slot":"tabs-list",className:f("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg Vs-[3px]",e),...t})}function Pn({className:e,...t}){return(0,Vs.jsx)(Ia.Trigger,{"data-slot":"tabs-trigger",className:f("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 ao({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:r="700px",gridCols:i=6}){let s=a.find(d=>d.value===e);return(0,Vs.jsxs)(wa.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,Vs.jsx)("div",{className:"hidden md:block",children:(0,Vs.jsx)(kn,{value:e,onValueChange:t,children:(0,Vs.jsx)(Tn,{className:"grid w-full rounded-2xl Vs-0 h-10",style:{maxWidth:r,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(d=>(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Vs.jsx)(Pn,{value:d.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:d.label})},d.value))})})}),(0,Vs.jsx)("div",{className:"md:hidden",children:(0,Vs.jsxs)(eo,{children:[(0,Vs.jsx)(to,{asChild:!0,children:(0,Vs.jsxs)(b,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[s?.label||"Select",(0,Vs.jsx)(ln.ChevronDown,{className:"h-4 w-4 wa-2"})]})}),(0,Vs.jsx)(Aa,{align:"center",className:"w-[180px]",children:a.map(d=>(0,Vs.jsx)(Yt,{onClick:()=>t?.(d.value),className:`cursor-pointer ${e===d.value?"bg-accent":""}`,children:d.label},d.value))})]})})]})}function An({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:r=!0,className:i,activeTab:s="assistant",onTabChange:d,showTabs:n=!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,Vs.jsx)(ln.Bot,{className:"mr-2 h-4 w-4"}),actionText:u="Action",onNotificationRemove:g,onRemoveAll:y,logo:P="/headerlogo.png",appName:h="Nuvia",tagline:x="Collaboration Platform"}){let[S,C]=(0,si.useState)(!1),[A,F]=(0,si.useState)(t),U=A.filter(D=>!D.read).length,se=D=>{F(E=>E.filter(ve=>ve.id!==D)),g?.(D)},w=()=>{F(D=>D.filter(E=>E.read)),y?.()};return(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsxs)("header",{className:`sticky top-0 Vs-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${i||""}`,children:[(0,Vs.jsx)(b,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Vs.jsx)(ln.Menu,{className:"h-5 w-5"})}),(0,Vs.jsx)(b,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Vs.jsx)(ln.PanelLeft,{className:"h-5 w-5"})}),!r&&(0,Vs.jsxs)(wa.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Vs.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,Vs.jsx)("img",{src:P,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("h2",{className:"font-semibold text-sm",children:h}),(0,Vs.jsx)("Vs",{className:"text-xs text-muted-foreground",children:x})]})]}),(0,Vs.jsxs)("div",{className:"flex flex-1 items-center",children:[n&&(0,Vs.jsx)(ao,{activeTab:s,onTabChange:d,tabOptions:m}),(0,Vs.jsxs)("div",{className:"flex items-center gap-3 wa-auto",children:[(0,Vs.jsx)(wa.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,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Vs.jsxs)(b,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:c,children:[v,u]})})}),(0,Vs.jsx)(Sn,{}),(0,Vs.jsx)(qa,{children:(0,Vs.jsxs)(Xa,{children:[(0,Vs.jsx)(Ya,{asChild:!0,children:(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Vs.jsxs)(b,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,Vs.jsx)(wa.motion.div,{animate:U>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:U>0?1/0:0,repeatDelay:3},children:(0,Vs.jsx)(ln.Bell,{className:"h-5 w-5"})}),U>0&&(0,Vs.jsx)(wa.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:U})]})})}),(0,Vs.jsx)(Ra,{children:"Notifications"})]})}),(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Vs.jsxs)(Mt,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Vs.jsx)(sa,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Vs.jsx)(Et,{})]})})]})]})]}),(0,Vs.jsx)(Dn,{notifications:A,open:S,onClose:()=>C(!1),onNotificationRemove:se,onRemoveAll:w})]})}var In=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Vs.jsx)(ln.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ti({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:r=In[0],onBusinessUnitChange:i,onSearch:s,businessUnits:d=In,activeTab:n,onTabChange:m,showTabs:c=!1,onActionClick:v,actionIcon:u,actionText:g="Action",onNotificationRemove:y,onRemoveAll:P,logo:h="/headerlogo.png",appName:x="Nuvia",tagline:S="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[A,F]=(0,si.useState)(!C),[U,se]=(0,si.useState)(!1),[w,D]=(0,si.useState)(r),E=ve=>{D(ve),i?.(ve)};return(0,Vs.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[U&&(0,Vs.jsx)("div",{className:"fixed inset-0 Vs-40 bg-black/50 md:hidden",onClick:()=>se(!1)}),(0,Vs.jsx)("div",{className:"md:hidden",children:(0,Vs.jsx)(jr,{items:e,isOpen:U,isMobile:!0,onClose:()=>se(!1),currentBusinessUnit:w,onBusinessUnitChange:E,onSearch:s,logo:h,appName:x,tagline:S})}),(0,Vs.jsx)("div",{className:"hidden md:block",children:(0,Vs.jsx)(jr,{items:e,isOpen:A,isMobile:!1,currentBusinessUnit:w,onBusinessUnitChange:E,onSearch:s,logo:h,appName:x,tagline:S})}),(0,Vs.jsxs)("div",{className:f("min-h-screen fixed w-full transition-all duration-300 ease-in-out",A?"md:pl-64":"md:pl-0"),children:[(0,Vs.jsx)(An,{title:a,notifications:o,onToggleSidebar:()=>F(!A),onToggleMobileMenu:()=>se(!0),sidebarOpen:A,activeTab:n,onTabChange:m,showTabs:c,onActionClick:v,actionIcon:u,actionText:g,onNotificationRemove:y,onRemoveAll:P,logo:h,appName:x,tagline:S}),(0,Vs.jsx)("main",{className:"flex-1 Vs-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var oo=ce(require("react"));var Hr=oo.forwardRef(({...e},t)=>(0,Vs.jsx)("nav",{ref:t,"aria-label":"breadcrumb",...e}));Hr.displayName="Breadcrumb";var Ur=oo.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("Vs",{ref:a,className:f("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Ur.displayName="BreadcrumbList";var Ri=oo.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("li",{ref:a,className:f("inline-flex items-center gap-1.5",e),...t}));Ri.displayName="BreadcrumbItem";var Vr=oo.forwardRef(({asChild:e,className:t,...a},o)=>(0,Vs.jsx)(e?Qa.Slot:"a",{ref:o,className:f("transition-colors hover:text-foreground",t),...a}));Vr.displayName="BreadcrumbLink";var Kr=oo.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("span",{ref:a,role:"link","aria-disabled":"true","aria-current":"page",className:f("font-normal text-foreground",e),...t}));Kr.displayName="BreadcrumbPage";var Gr=({children:e,className:t,...a})=>(0,Vs.jsx)("li",{role:"presentation","aria-hidden":"true",className:f("[&>svg]:w-3.5 [&>svg]:h-3.5",t),...a,children:e??(0,Vs.jsx)(Qs.ChevronRightIcon,{})});Gr.displayName="BreadcrumbSeparator";var Fc=({className:e,...t})=>(0,Vs.jsxs)("span",{role:"presentation","aria-hidden":"true",className:f("flex h-9 w-9 items-center justify-center",e),...t,children:[(0,Vs.jsx)(Qs.DotsHorizontalIcon,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{className:"ln-only",children:"More"})]});Fc.displayName="BreadcrumbElipssis";var Mi=ce(require("react")),Lc=1,jc=1e6;var _r=0;function Oc(){return _r=(_r+1)%Number.MAX_SAFE_INTEGER,_r.toString()}var $r=new Map,Bn=e=>{if($r.has(e))return;let t=setTimeout(()=>{$r.delete(e),Fo({type:"REMOVE_TOAST",toastId:e})},jc);$r.set(e,t)},zc=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,Lc)};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?Bn(a):e.toasts.forEach(o=>{Bn(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)}}},Ai=[],Ii={toasts:[]};function Fo(e){Ii=zc(Ii,e),Ai.forEach(t=>{t(Ii)})}function Hc({...e}){let t=Oc(),a=r=>Fo({type:"UPDATE_TOAST",toast:{...r,id:t}}),o=()=>Fo({type:"DISMISS_TOAST",toastId:t});return Fo({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:r=>{r||o()}}}),{id:t,dismiss:o,update:a}}function Fn(){let[e,t]=Mi.useState(Ii);return Mi.useEffect(()=>(Ai.push(t),()=>{let a=Ai.indexOf(t);a>-1&&Ai.splice(a,1)}),[e]),{...e,toast:Hc,dismiss:a=>Fo({type:"DISMISS_TOAST",toastId:a})}}var Ma=ce(require("react")),nt=ce(require("@radix-ui/react-toast"));var On=nt.Provider,Wr=Ma.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(nt.Viewport,{ref:a,className:f("fixed top-0 Vs-[100] flex max-h-screen w-full flex-col-reverse Vs-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Wr.displayName=nt.Viewport.displayName;var Uc=(0,on.cva)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border Vs-4 pr-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"}}),Jr=Ma.forwardRef(({className:e,variant:t,...a},o)=>(0,Vs.jsx)(nt.Root,{ref:o,className:f(Uc({variant:t}),e),...a}));Jr.displayName=nt.Root.displayName;var Vc=Ma.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(nt.Action,{ref:a,className:f("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}));Vc.displayName=nt.Action.displayName;var qr=Ma.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(nt.Close,{ref:a,className:f("absolute right-1 top-1 rounded-md Vs-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,Vs.jsx)(ln.Vs,{className:"h-4 w-4"})}));qr.displayName=nt.Close.displayName;var Xr=Ma.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(nt.Title,{ref:a,className:f("text-sm font-semibold [&+div]:text-xs",e),...t}));Xr.displayName=nt.Title.displayName;var Yr=Ma.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(nt.Description,{ref:a,className:f("text-sm opacity-90",e),...t}));Yr.displayName=nt.Description.displayName;function zn(){let{toasts:e}=Fn();return(0,Vs.jsxs)(On,{children:[e.map(function({id:t,title:a,description:o,action:r,...i}){return(0,Vs.jsxs)(Jr,{...i,children:[(0,Vs.jsxs)("div",{className:"grid gap-1",children:[a&&(0,Vs.jsx)(Xr,{children:a}),o&&(0,Vs.jsx)(Yr,{children:o})]}),r,(0,Vs.jsx)(qr,{})]},t)}),(0,Vs.jsx)(Wr,{})]})}var Hn=({type:e="solid",iconName:t="cloud",size:a="lg",className:o})=>{let r=e.includes("si-")?e+" ":"si-"+e+" ",i="si-"+t,s=o??"",d=r+i+" si-"+a+" "+s;return(0,Vs.jsx)("i",{className:d})};var io=require("@headlessui/react"),Kn=require("@heroicons/react/20/solid");var Kc=({name:e,items:t,actions:a=[],href:o})=>!t&&o?(0,Vs.jsx)("a",{href:o,className:"flex items-center gap-x-1 text-sm text-foreground group",children:(0,Vs.jsxs)("span",{className:"relative",children:[e,(0,Vs.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,Vs.jsxs)(io.Popover,{children:[(0,Vs.jsxs)(io.PopoverButton,{className:"flex items-center gap-x-1 text-sm/6 text-foreground outline-none group",children:[(0,Vs.jsxs)("span",{className:"relative",children:[e,(0,Vs.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,Vs.jsx)(Kn.ChevronDownIcon,{"aria-hidden":"true",className:"h-5 w-5 flex-none text-accent"})]}),(0,Vs.jsxs)(io.PopoverPanel,{transition:!0,className:"absolute inset-x-0 top-0 -Vs-10 bg-popover ln-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,Vs.jsx)("div",{className:"mx-auto grid max-w-7xl grid-cols-4 gap-x-4 px-6 py-10 lg:px-8 xl:gap-x-8 Vs-50",children:t&&t.map(r=>(0,Vs.jsxs)("div",{className:"group relative rounded-lg Vs-6 text-sm/6 box-border",children:[(0,Vs.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,Vs.jsx)(Vn,{icon:r.icon,size:"4x"})}),(0,Vs.jsxs)("a",{href:r.href,className:"ln-6 block text-popover-foreground group-hover:text-accent",children:[r.name,(0,Vs.jsx)("span",{className:"absolute inset-0"})]}),(0,Vs.jsx)("Vs",{className:"ln-1 text-popover-foreground/80 group-hover:text-accent",children:r.description})]},r.name))}),a.length>0&&(0,Vs.jsx)("div",{className:"bg-gray-50",children:(0,Vs.jsx)("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:(0,Vs.jsx)("div",{className:"grid grid-cols-3 divide-x divide-gray-900/5 border-x border-gray-900/5",children:a.map(r=>(0,Vs.jsxs)("a",{href:r.href,className:"flex items-center max-h-12 justify-center gap-x-2.5 Vs-3 text-sm/6 text-gray-900 hover:bg-gray-100",children:[r.icon&&(0,Vs.jsx)(Vn,{icon:r.icon,className:"h-5 w-5 flex-none text-gray-400"}),r.name]},r.name))})})})]})]}),Vn=({icon:e,className:t,size:a="lg"})=>{if(!e)return null;if("type"in e)return(0,Vs.jsx)(Hn,{...e,size:a});if("src"in e)return(0,Vs.jsx)("div",{className:f(t,"h-full max-w-32 items-start text-left"),children:e&&typeof e.src=="string"&&(0,Vs.jsx)("img",{src:e.src,style:{objectFit:"contain",width:"100%",height:"100%"}})})},Gn=Kc;var _n=ce(require("next/link"));function $n({children:e,href:t,openNewTab:a,...o}){return(0,Vs.jsx)(_n.default,{href:t,target:a?"_blank":"_self",...o,children:e})}var Qr=ce(require("next/image"));function jo({logoLight:e,logoDark:t,mobile:a=!1}){return(0,Vs.jsxs)($n,{href:"/",className:f(a?"py-1":"py-2"),children:[(0,Vs.jsx)(Qr.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,Vs.jsx)(Qr.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 Xn({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:r=!1,wide:i=!1}){let[s,d]=(0,si.useState)(!1),[n,m]=(0,si.useState)(""),c=["light","dark"],{theme:v,setTheme:u}=(0,Cn.useTheme)();(0,si.useEffect)(()=>{m(v||"dark")},[v]);let g=()=>{let y=c[(c.indexOf(n)+1)%c.length];m(y),u(y)};return(0,si.useEffect)(()=>{let y=()=>{window.scrollY>100?d(!0):d(!1)};return window.addEventListener("scroll",y,{passive:!0}),()=>window.removeEventListener("scroll",y)},[]),(0,Vs.jsx)(Vs.Fragment,{children:(0,Vs.jsx)("header",{className:`Vs-50 pb-10 transition-all duration-300 hidden lg:block ${s||e?"translate-y-0":"-translate-y-full bg-transparent"}`,children:(0,Vs.jsx)("nav",{className:"backdrop-blur-sm bg-background/80 text-white Vs-0",children:(0,Vs.jsxs)("div",{className:f("flex items-center justify-between px-9 py-0",!i&&"container"),children:[(0,Vs.jsx)(jo,{logoDark:a,logoLight:t}),(0,Vs.jsx)(io.PopoverGroup,{className:"hidden lg:flex lg:gap-x-12",children:o&&o.map(y=>(0,Vs.jsx)(Gn,{...y},y.name))}),r&&(0,Vs.jsx)("button",{className:"fixed right-4 Vs-[60] Vs-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:g,children:(0,Vs.jsxs)("div",{className:"relative",children:[(0,Vs.jsx)(ln.Sun,{className:"absolute h-6 w-6 rotate-0 scale-100 transition-transform dark:-rotate-90 dark:scale-0"}),(0,Vs.jsx)(ln.Moon,{className:"absoulte h-6 w-6 rotate-0 scale-0 transition-transform dark:rotate-0 dark:scale-100"})]})})]})})})})}var Bi=require("@heroicons/react/24/outline");var Zr=["light","dark"];function Qn({logoLight:e,logoDark:t,menuItems:a,isMenuOpen:o=!0}){let[r,i]=(0,si.useState)(!1),{theme:s,setTheme:d}=(0,Cn.useTheme)(),[n,m]=(0,si.useState)(!1),[c,v]=(0,si.useState)("light");(0,si.useEffect)(()=>{let g=()=>{window.scrollY>100?i(!0):i(!1)};return window.addEventListener("scroll",g,{passive:!0}),()=>window.removeEventListener("scroll",g)},[]),(0,si.useEffect)(()=>{v(s||"dark")},[s]);let u=()=>{let g=Zr[(Zr.indexOf(c)+1)%Zr.length];v(g),d(g)};return(0,Vs.jsx)(Vs.Fragment,{children:(0,Vs.jsxs)("header",{className:`Vs-50 pb-10 transition-all duration-300 block lg:hidden ${r||o?"translate-y-0":"-translate-y-full bg-transparent"}`,children:[(0,Vs.jsx)("nav",{className:f("backdrop-blur-sm text-white Vs-0",n&&"hidden"),children:(0,Vs.jsxs)("div",{className:"flex items-stretch justify-between bg-background px-2 py-0 dark:bg-[#212124] [&Vs.logo-light]:[filter:brightness(0)_invert(1)] dark:border-b dark:border-accent",children:[(0,Vs.jsx)(jo,{logoDark:t,logoLight:e,mobile:!0}),(0,Vs.jsx)("div",{className:"flex items-center space-x-4",children:(0,Vs.jsxs)("button",{type:"button",onClick:()=>m(!0),className:"fixed right-4 Vs-[60] Vs-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,Vs.jsx)("span",{className:"ln-only",children:"Open main menu"}),(0,Vs.jsx)(Bi.Bars3Icon,{"aria-hidden":"true",className:"h-4 w-4"})]})})]})}),(0,Vs.jsxs)(io.Dialog,{open:n,onClose:m,className:"lg:hidden",children:[(0,Vs.jsx)("div",{className:"fixed inset-0 Vs-10 bg-black bg-opacity-50","aria-hidden":"true"}),(0,Vs.jsxs)(io.DialogPanel,{className:"fixed inset-y-0 right-0 Vs-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,Vs.jsxs)("div",{className:"flex items-stretch justify-between",children:[(0,Vs.jsx)(jo,{logoDark:t,logoLight:e,mobile:!0}),(0,Vs.jsxs)("button",{type:"button",onClick:()=>m(!1),className:"-m-2.5 rounded-md Vs-2.5 text-foreground dark:text-foreground outline-none hover:text-accent",children:[(0,Vs.jsx)("span",{className:"ln-only",children:"Close menu"}),(0,Vs.jsx)(Bi.XMarkIcon,{"aria-hidden":"true",className:"h-6 w-6"})]})]}),(0,Vs.jsx)("div",{className:"ln-6 flow-root",children:(0,Vs.jsx)("div",{className:"-my-6 divide-y divide-gray-500/10",children:(0,Vs.jsx)("div",{className:"space-y-2 px-2 py-6",children:a&&a.map(g=>(0,Vs.jsx)(Gc,{...g},g.name))})})})]})]})]})})}function Gc({name:e,items:t,actions:a,href:o}){return!t&&o?(0,Vs.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,Vs.jsxs)(io.Disclosure,{si:"div",className:"-mx-3",children:[(0,Vs.jsx)(io.DisclosureButton,{className:"group flex w-full items-center justify-between rounded-lg py-2 pl-3 pr-3.5 text-base dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:e}),(0,Vs.jsx)(io.DisclosurePanel,{className:"ln-2 space-y-2",children:t&&t.map(r=>(0,Vs.jsx)(io.DisclosureButton,{si:"a",href:r.href,className:"block rounded-lg py-2 pl-6 pr-3 text-sm dark:text-foreground text-foreground hover:bg-gray-50 hover:text-accent",children:r.name},r.name))})]})}function Zn({isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,className:r,wide:i,themeControl:s=!1}){return(0,Vs.jsxs)("div",{className:f("fixed top-0 left-0 right-0 Vs-50",r),children:[(0,Vs.jsx)(Xn,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o,themeControl:s,wide:i}),(0,Vs.jsx)(Qn,{isMenuOpen:e,logoLight:t,logoDark:a,menuItems:o})]})}var el="../../cortex-reply-light-27IMI3G7.png";var tl="../../cortex-reply-dark-XPAJJJYY.png";function es({...e}){return(0,Vs.jsxs)("div",{className:"bg-sidebar",children:[(0,Vs.jsx)(Zn,{isMenuOpen:!0,logoLight:el,logoDark:tl,...e.header,className:"bg-sidebar",wide:!0}),(0,Vs.jsxs)(ko,{className:"top-24 mb-4 h-full max-h-[calc(100vh-3.5rem)] flex-1 flex-row overflow-y-clip",children:[(0,Vs.jsx)(pi,{...e.sidebarLeft,className:"flex-none top-24"}),(0,Vs.jsxs)(Cr,{className:"grow overflow-hidden",children:[(0,Vs.jsx)("header",{className:"flex h-16 shrink-0 items-center gap-2",children:(0,Vs.jsxs)("div",{className:"flex items-center gap-2 px-4",children:[(0,Vs.jsx)(Nr,{className:"-wa-1"}),(0,Vs.jsx)(So,{orientation:"vertical",className:"mr-2 h-4"}),(0,Vs.jsx)(Hr,{children:(0,Vs.jsxs)(Ur,{children:[(0,Vs.jsx)(Ri,{className:"hidden md:block",children:(0,Vs.jsx)(Vr,{href:"#",children:"Building Your Application"})}),(0,Vs.jsx)(Gr,{className:"hidden md:block"}),(0,Vs.jsx)(Ri,{children:(0,Vs.jsx)(Kr,{children:"Data Fetching"})})]})})]})}),(0,Vs.jsxs)("div",{className:"flex flex-1 flex-col gap-4 Vs-4 Vs-0",children:[(0,Vs.jsxs)("div",{className:"grid auto-rows-min gap-4 md:grid-cols-3",children:[(0,Vs.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,Vs.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"}),(0,Vs.jsx)("div",{className:"aspect-video rounded-xl bg-muted/50"})]}),(0,Vs.jsx)("div",{className:"flex-1 rounded-xl bg-muted/50 md:min-h-min"})]})]})]}),(0,Vs.jsx)(zn,{})]})}var Ba=ce(require("react"));var V=Ba.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,className:f("rounded-xl border bg-card text-card-foreground shadow",e),...t}));V.displayName="Card";var Fe=Ba.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,className:f("flex flex-col space-y-1.5 Vs-6",e),...t}));Fe.displayName="CardHeader";var Oe=Ba.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,className:f("font-semibold leading-none tracking-tight",e),...t}));Oe.displayName="CardTitle";var da=Ba.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,className:f("text-sm text-muted-foreground",e),...t}));da.displayName="CardDescription";var me=Ba.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,className:f("Vs-6 Vs-0",e),...t}));me.displayName="CardContent";var ca=Ba.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("div",{ref:a,className:f("flex items-center Vs-6 Vs-0",e),...t}));ca.displayName="CardFooter";var al=ce(require("react")),ze=al.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)("textarea",{className:f("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 Se=ce(require("@radix-ui/react-select")),Sa=ce(require("react")),Me=Se.Root;var He=Se.Value,Te=Sa.forwardRef(({children:e,className:t,...a},o)=>(0,Vs.jsxs)(Se.Trigger,{className:f("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,Vs.jsx)(Se.Icon,{asChild:!0,children:(0,Vs.jsx)(ln.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Te.displayName=Se.Trigger.displayName;var il=Sa.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(Se.ScrollUpButton,{className:f("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Vs.jsx)(ln.ChevronUp,{className:"h-4 w-4"})}));il.displayName=Se.ScrollUpButton.displayName;var rl=Sa.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(Se.ScrollDownButton,{className:f("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Vs.jsx)(ln.ChevronDown,{className:"h-4 w-4"})}));rl.displayName=Se.ScrollDownButton.displayName;var Pe=Sa.forwardRef(({children:e,className:t,position:a="popper",...o},r)=>(0,Vs.jsx)(Se.Portal,{children:(0,Vs.jsxs)(Se.Content,{className:f("relative Vs-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,Vs.jsx)(il,{}),(0,Vs.jsx)(Se.Viewport,{className:f("Vs-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,Vs.jsx)(rl,{})]})}));Pe.displayName=Se.Content.displayName;var Wc=Sa.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(Se.Label,{className:f("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));Wc.displayName=Se.Label.displayName;var G=Sa.forwardRef(({children:e,className:t,...a},o)=>(0,Vs.jsxs)(Se.Item,{className:f("relative flex w-full cursor-default select-none items-center rounded py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),ref:o,...a,children:[(0,Vs.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,Vs.jsx)(Se.ItemIndicator,{children:(0,Vs.jsx)(ln.Check,{className:"h-4 w-4"})})}),(0,Vs.jsx)(Se.ItemText,{children:e})]}));G.displayName=Se.Item.displayName;var Jc=Sa.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(Se.Separator,{className:f("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));Jc.displayName=Se.Separator.displayName;var sl=({projects:e,epics:t,sprints:a,currentView:o,onUpdateProject:r,onDeleteProject:i,onAddProject:s,onUpdateEpic:d,onDeleteEpic:n,onAddEpic:m,onAddSprint:c,onUpdateSprint:v,onDeleteSprint:u,onViewChange:g,mobileMenuOpen:y,onToggleMobileMenu:P})=>{let[h,x]=(0,si.useState)(null),[S,C]=(0,si.useState)(null),[A,F]=(0,si.useState)(null),[U,se]=(0,si.useState)(null),[w,D]=(0,si.useState)({name:"",description:""}),[E,ve]=(0,si.useState)({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0}),[j,R]=(0,si.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),[N,ie]=(0,si.useState)(!1),[ke,tt]=(0,si.useState)(!1),[Ee,at]=(0,si.useState)({name:"",description:""}),[H,ne]=(0,si.useState)({name:"",description:"",startDate:"",endDate:"",isActive:!1}),Re=["bg-brand-blue","bg-brand-green","bg-brand-plum","bg-brand-orange","bg-destructive","bg-warning","bg-brand-cyan","bg-accent"],bt=[{value:"low",label:"Low",color:"text-destructive"},{value:"medium",label:"Medium",color:"text-warning"},{value:"high",label:"High",color:"text-success"}],jt=[{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"}],I=k=>{C(k.id),D({name:k.name,description:k.description||""})},Ze=()=>{S&&w.name.trim()&&(r(S,{name:w.name.trim(),description:w.description.trim()}),C(null))},Xe=()=>{C(null),D({name:"",description:""})},Pa=()=>{Ee.name.trim()&&(s({name:Ee.name.trim(),description:Ee.description.trim(),isSelected:!1}),at({name:"",description:""}),ie(!1))},Qo=k=>{r(k,{isSelected:!0})},ho=k=>{F(k.id),ve({name:k.name,description:k.description||"",color:k.color,confidence:k.confidence,phase:k.phase,startDate:k.startDate.toISOString().split("T")[0],endDate:k.endDate.toISOString().split("T")[0],progress:k.progress})},Zo=()=>{A&&E.name.trim()&&(d(A,{name:E.name.trim(),description:E.description.trim(),color:E.color,confidence:E.confidence,phase:E.phase,startDate:new Date(E.startDate),endDate:new Date(E.endDate),progress:E.progress}),F(null))},dr=()=>{F(null),ve({name:"",description:"",color:"",confidence:"medium",phase:1,startDate:"",endDate:"",progress:0})},ei=k=>{se(k.id),R({name:k.name,description:k.description||"",startDate:k.startDate.toISOString().split("T")[0],endDate:k.endDate.toISOString().split("T")[0],isActive:k.isActive})},cr=()=>{U&&j.name.trim()&&(v(U,{name:j.name.trim(),description:j.description.trim(),startDate:new Date(j.startDate),endDate:new Date(j.endDate),isActive:j.isActive}),se(null))},ti=()=>{se(null),R({name:"",description:"",startDate:"",endDate:"",isActive:!1})},_a=()=>{H.name.trim()&&(c({name:H.name.trim(),description:H.description.trim(),startDate:new Date(H.startDate),endDate:new Date(H.endDate),isActive:H.isActive,isSelected:!1}),ne({name:"",description:"",startDate:"",endDate:"",isActive:!1}),tt(!1))},xo=k=>{v(k,{isSelected:!0})},ai=k=>k.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),yo=k=>{let B=bt.find(Ae=>Ae.value===k);return B?{label:B.label,color:B.color}:{label:"Medium",color:"text-warning"}},wo=k=>{let B=jt.find(Ae=>Ae.value===k);return B?{label:B.label,color:B.color}:{label:"Phase 1",color:"text-primary"}};return(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsxs)("div",{className:`absolute h-full w-12 bg-sidebar-background flex flex-col Vs-50 flex-shrink-0 transition-transform duration-300 group ${y?"translate-x-0":"-translate-x-full"} md:translate-x-0`,children:[(0,Vs.jsxs)("div",{className:"border-b border-sidebar-border",children:[(0,Vs.jsxs)("button",{onClick:()=>{g("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 Vs-50`,title:"Kanban View",children:[(0,Vs.jsx)(ln.Kanban,{className:"h-4 w-4 flex-shrink-0"}),(0,Vs.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,Vs.jsxs)("button",{onClick:()=>{g("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,Vs.jsx)(ln.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Vs.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,Vs.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,Vs.jsx)(ln.FolderOpen,{className:"h-4 w-4 flex-shrink-0"}),(0,Vs.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,Vs.jsxs)("button",{onClick:()=>{g("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,Vs.jsx)(ln.Target,{className:"h-4 w-4 flex-shrink-0"}),(0,Vs.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,Vs.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,Vs.jsx)(ln.Layers,{className:"h-4 w-4 flex-shrink-0"}),(0,Vs.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,Vs.jsxs)("button",{onClick:()=>{g("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,Vs.jsx)(ln.FileText,{className:"h-4 w-4 flex-shrink-0"}),(0,Vs.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,Vs.jsxs)("button",{onClick:()=>{g("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,Vs.jsx)(ln.Calendar,{className:"h-4 w-4 flex-shrink-0"}),(0,Vs.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,Vs.jsx)("div",{className:"md:hidden fixed inset-0 bg-background/80 backdrop-blur-sm Vs-20",onClick:P}),h&&(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsx)("div",{className:"fixed inset-0 bg-background/80 backdrop-blur-sm Vs-40",onClick:()=>x(null)}),(0,Vs.jsxs)("div",{className:"absolute left-12 w-80 md:w-96 bg-card shadow-lg Vs-40 transform transition-transform max-w-[calc(100vw-3rem)] md:max-w-none top-0 h-full",children:[(0,Vs.jsxs)("div",{className:"Vs-3 md:Vs-4 border-b flex items-center justify-between",children:[(0,Vs.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,Vs.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>x(null),children:(0,Vs.jsx)(ln.Vs,{className:"h-4 w-4"})})]}),(0,Vs.jsxs)("div",{className:"Vs-3 md:Vs-4 space-y-4 h-full overflow-y-auto",children:[h==="projects"&&(0,Vs.jsx)(V,{className:"Vs-3",children:(0,Vs.jsxs)("div",{className:"space-y-3",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)("h3",{className:"font-medium text-foreground",children:"Projects"}),(0,Vs.jsxs)(b,{size:"sm",onClick:()=>ie(!0),className:"gap-1",children:[(0,Vs.jsx)(ln.Plus,{className:"h-3 w-3"}),"Add Project"]})]}),N&&(0,Vs.jsxs)("div",{className:"border rounded-lg Vs-2 space-y-2",children:[(0,Vs.jsx)(O,{value:Ee.name,onChange:k=>at(B=>({...B,name:k.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Vs.jsx)(ze,{value:Ee.description,onChange:k=>at(B=>({...B,description:k.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Vs.jsxs)("div",{className:"flex gap-1",children:[(0,Vs.jsx)(b,{size:"sm",onClick:Pa,className:"text-xs h-6",children:"Save"}),(0,Vs.jsx)(b,{size:"sm",variant:"outline",onClick:()=>ie(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,Vs.jsx)("div",{className:"space-y-2",children:e.map(k=>(0,Vs.jsx)("div",{className:"border rounded Vs-2",children:S===k.id?(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(O,{value:w.name,onChange:B=>D(Ae=>({...Ae,name:B.target.value})),placeholder:"Project name",className:"text-sm"}),(0,Vs.jsx)(ze,{value:w.description,onChange:B=>D(Ae=>({...Ae,description:B.target.value})),placeholder:"Project description",rows:2,className:"text-sm"}),(0,Vs.jsxs)("div",{className:"flex gap-1",children:[(0,Vs.jsx)(b,{size:"sm",onClick:Ze,className:"text-xs h-6",children:"Save"}),(0,Vs.jsx)(b,{size:"sm",variant:"outline",onClick:Xe,className:"text-xs h-6",children:"Cancel"})]})]}):(0,Vs.jsxs)("div",{className:`cursor-pointer Vs-1 rounded transition-colors ${k.isSelected?"bg-primary/10 border-primary ring-2 ring-primary/20":"hover:bg-muted"}`,onClick:()=>Qo(k.id),children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Vs.jsx)(ln.FolderOpen,{className:"h-3 w-3 text-muted-foreground"}),(0,Vs.jsx)("span",{className:"font-medium text-xs",children:k.name})]}),k.description&&(0,Vs.jsx)("Vs",{className:"text-xs text-muted-foreground mb-1",children:k.description}),(0,Vs.jsxs)("div",{className:"flex gap-1",onClick:B=>B.stopPropagation(),children:[(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>I(k),className:"h-5 px-1",children:(0,Vs.jsx)(ln.Edit2,{className:"h-3 w-3"})}),(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>i(k.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Vs.jsx)(ln.Trash2,{className:"h-3 w-3"})})]})]})},k.id))})]})}),h==="epics"&&(0,Vs.jsx)(V,{className:"Vs-3",children:(0,Vs.jsxs)("div",{className:"space-y-3",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)("h3",{className:"font-medium text-foreground",children:"Epics"}),(0,Vs.jsxs)(b,{size:"sm",onClick:m,className:"gap-1",children:[(0,Vs.jsx)(ln.Plus,{className:"h-3 w-3"}),"Add Epic"]})]}),(0,Vs.jsx)("div",{className:"space-y-4",children:t.map(k=>(0,Vs.jsx)("div",{className:"border rounded-lg Vs-3",children:A===k.id?(0,Vs.jsxs)("div",{className:"space-y-3",children:[(0,Vs.jsx)(O,{value:E.name,onChange:B=>ve(Ae=>({...Ae,name:B.target.value})),placeholder:"Epic name",className:"text-sm"}),(0,Vs.jsx)(ze,{value:E.description,onChange:B=>ve(Ae=>({...Ae,description:B.target.value})),placeholder:"Epic description",rows:2,className:"text-sm"}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)("label",{className:"text-xs font-medium",children:"Color"}),(0,Vs.jsx)("div",{className:"flex gap-1 flex-wrap",children:Re.map(B=>(0,Vs.jsx)("button",{onClick:()=>ve(Ae=>({...Ae,color:B})),className:`w-6 h-6 rounded-full ${B} ${E.color===B?"ring-2 ring-ring":""}`},B))})]}),(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Vs.jsxs)("div",{className:"space-y-1",children:[(0,Vs.jsx)("label",{className:"text-xs font-medium",children:"Confidence"}),(0,Vs.jsxs)(Me,{value:E.confidence,onValueChange:B=>ve(Ae=>({...Ae,confidence:B})),children:[(0,Vs.jsx)(Te,{className:"h-8 text-xs",children:(0,Vs.jsx)(He,{})}),(0,Vs.jsx)(Pe,{children:bt.map(B=>(0,Vs.jsx)(G,{value:B.value,children:(0,Vs.jsx)("span",{className:B.color,children:B.label})},B.value))})]})]}),(0,Vs.jsxs)("div",{className:"space-y-1",children:[(0,Vs.jsx)("label",{className:"text-xs font-medium",children:"Phase"}),(0,Vs.jsxs)(Me,{value:E.phase.toString(),onValueChange:B=>ve(Ae=>({...Ae,phase:parseInt(B)})),children:[(0,Vs.jsx)(Te,{className:"h-8 text-xs",children:(0,Vs.jsx)(He,{})}),(0,Vs.jsx)(Pe,{children:jt.map(B=>(0,Vs.jsx)(G,{value:B.value.toString(),children:(0,Vs.jsx)("span",{className:B.color,children:B.label})},B.value))})]})]})]}),(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Vs.jsxs)("div",{className:"space-y-1",children:[(0,Vs.jsx)("label",{className:"text-xs font-medium",children:"Start Date"}),(0,Vs.jsx)(O,{type:"date",value:E.startDate,onChange:B=>ve(Ae=>({...Ae,startDate:B.target.value})),className:"text-xs h-8"})]}),(0,Vs.jsxs)("div",{className:"space-y-1",children:[(0,Vs.jsx)("label",{className:"text-xs font-medium",children:"End Date"}),(0,Vs.jsx)(O,{type:"date",value:E.endDate,onChange:B=>ve(Ae=>({...Ae,endDate:B.target.value})),className:"text-xs h-8"})]})]}),(0,Vs.jsxs)("div",{className:"space-y-1",children:[(0,Vs.jsx)("label",{className:"text-xs font-medium",children:"Progress (%)"}),(0,Vs.jsx)(O,{type:"number",min:"0",max:"100",value:E.progress,onChange:B=>ve(Ae=>({...Ae,progress:parseInt(B.target.value)||0})),className:"text-xs h-8"})]}),(0,Vs.jsxs)("div",{className:"flex gap-2",children:[(0,Vs.jsx)(b,{size:"sm",onClick:Zo,className:"text-xs",children:"Save"}),(0,Vs.jsx)(b,{size:"sm",variant:"outline",onClick:dr,className:"text-xs",children:"Cancel"})]})]}):(0,Vs.jsxs)("div",{className:`cursor-pointer Vs-2 rounded transition-colors ${k.isSelected?"bg-primary/10 border-primary":"hover:bg-muted"}`,onClick:()=>d(k.id,{isSelected:!k.isSelected}),children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Vs.jsx)("div",{className:`w-3 h-3 rounded-full ${k.color}`}),(0,Vs.jsx)("span",{className:"font-medium text-sm",children:k.name})]}),k.description&&(0,Vs.jsx)("Vs",{className:"text-xs text-muted-foreground mb-2",children:k.description}),(0,Vs.jsxs)("div",{className:"space-y-1 mb-2",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Vs.jsx)("span",{className:"text-muted-foreground",children:"Confidence:"}),(0,Vs.jsx)("span",{className:yo(k.confidence).color,children:yo(k.confidence).label})]}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Vs.jsx)("span",{className:"text-muted-foreground",children:"Phase:"}),(0,Vs.jsx)("span",{className:wo(k.phase).color,children:wo(k.phase).label})]}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Vs.jsx)("span",{className:"text-muted-foreground",children:"Timeline:"}),(0,Vs.jsxs)("span",{className:"text-foreground",children:[ai(k.startDate)," - ",ai(k.endDate)]})]}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,Vs.jsx)("span",{className:"text-muted-foreground",children:"Progress:"}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)("div",{className:"w-12 h-2 bg-muted rounded-full",children:(0,Vs.jsx)("div",{className:"h-2 bg-primary rounded-full",style:{width:`${k.progress}%`}})}),(0,Vs.jsxs)("span",{className:"text-foreground",children:[k.progress,"%"]})]})]})]}),(0,Vs.jsxs)("div",{className:"flex gap-1",onClick:B=>B.stopPropagation(),children:[(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>ho(k),className:"h-6 px-2",children:(0,Vs.jsx)(ln.Edit2,{className:"h-3 w-3"})}),(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>n(k.id),className:"h-6 px-2 text-destructive hover:text-destructive",children:(0,Vs.jsx)(ln.Trash2,{className:"h-3 w-3"})})]})]})},k.id))})]})}),h==="sprints"&&(0,Vs.jsx)(V,{className:"Vs-3",children:(0,Vs.jsxs)("div",{className:"space-y-3",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)("h3",{className:"font-medium text-foreground",children:"Sprints (Select One)"}),(0,Vs.jsxs)(b,{size:"sm",onClick:()=>tt(!0),className:"gap-1",children:[(0,Vs.jsx)(ln.Plus,{className:"h-3 w-3"}),"Add Sprint"]})]}),ke&&(0,Vs.jsxs)("div",{className:"border rounded-lg Vs-2 space-y-2",children:[(0,Vs.jsx)(O,{value:H.name,onChange:k=>ne(B=>({...B,name:k.target.value})),placeholder:"Sprint name",className:"text-sm"}),(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,Vs.jsx)(O,{type:"date",value:H.startDate,onChange:k=>ne(B=>({...B,startDate:k.target.value})),className:"text-xs"}),(0,Vs.jsx)(O,{type:"date",value:H.endDate,onChange:k=>ne(B=>({...B,endDate:k.target.value})),className:"text-xs"})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)("input",{type:"checkbox",checked:H.isActive,onChange:k=>ne(B=>({...B,isActive:k.target.checked})),className:"w-3 h-3"}),(0,Vs.jsx)("span",{className:"text-xs",children:"Active"})]}),(0,Vs.jsxs)("div",{className:"flex gap-1",children:[(0,Vs.jsx)(b,{size:"sm",onClick:_a,className:"text-xs h-6",children:"Save"}),(0,Vs.jsx)(b,{size:"sm",variant:"outline",onClick:()=>tt(!1),className:"text-xs h-6",children:"Cancel"})]})]}),(0,Vs.jsx)("div",{className:"space-y-2",children:a.map(k=>(0,Vs.jsx)("div",{className:"border rounded Vs-2",children:U===k.id?(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(O,{value:j.name,onChange:B=>R(Ae=>({...Ae,name:B.target.value})),placeholder:"Sprint name",className:"text-sm",disabled:k.id==="backlog"||k.id==="all-tasks"}),k.id!=="backlog"&&k.id!=="all-tasks"&&(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-1",children:[(0,Vs.jsx)(O,{type:"date",value:j.startDate,onChange:B=>R(Ae=>({...Ae,startDate:B.target.value})),className:"text-xs"}),(0,Vs.jsx)(O,{type:"date",value:j.endDate,onChange:B=>R(Ae=>({...Ae,endDate:B.target.value})),className:"text-xs"})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)("input",{type:"checkbox",checked:j.isActive,onChange:B=>R(Ae=>({...Ae,isActive:B.target.checked})),className:"w-3 h-3"}),(0,Vs.jsx)("span",{className:"text-xs",children:"Active"})]})]}),(0,Vs.jsxs)("div",{className:"flex gap-1",children:[(0,Vs.jsx)(b,{size:"sm",onClick:cr,className:"text-xs h-6",children:"Save"}),(0,Vs.jsx)(b,{size:"sm",variant:"outline",onClick:ti,className:"text-xs h-6",children:"Cancel"})]})]}):(0,Vs.jsxs)("div",{className:`cursor-pointer Vs-1 rounded transition-colors ${k.isSelected?"bg-brand-green/10 border-brand-green ring-2 ring-brand-green/20":"hover:bg-muted"}`,onClick:()=>xo(k.id),children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Vs.jsx)(ln.Calendar,{className:"h-3 w-3 text-muted-foreground"}),(0,Vs.jsx)("span",{className:"font-medium text-xs",children:k.name}),k.isActive&&(0,Vs.jsx)("span",{className:"text-xs bg-brand-green/20 text-brand-green px-1 py-0.5 rounded",children:"Active"}),(k.id==="backlog"||k.id==="all-tasks")&&(0,Vs.jsx)("span",{className:"text-xs bg-muted text-muted-foreground px-1 py-0.5 rounded",children:"System"})]}),k.id!=="backlog"&&k.id!=="all-tasks"&&(0,Vs.jsxs)("Vs",{className:"text-xs text-muted-foreground mb-1",children:[k.startDate.toLocaleDateString()," - ",k.endDate.toLocaleDateString()]}),(0,Vs.jsxs)("div",{className:"flex gap-1",onClick:B=>B.stopPropagation(),children:[(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>ei(k),className:"h-5 px-1",children:(0,Vs.jsx)(ln.Edit2,{className:"h-3 w-3"})}),k.id!=="backlog"&&k.id!=="all-tasks"&&(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>u(k.id),className:"h-5 px-1 text-destructive hover:text-destructive",children:(0,Vs.jsx)(ln.Trash2,{className:"h-3 w-3"})})]})]})},k.id))})]})})]})]})]})]})},Fi=e=>(0,Vs.jsx)(ko,{children:(0,Vs.jsxs)("div",{className:"flex w-full",children:[(0,Vs.jsx)("div",{className:"hidden md:block w-12 fixed h-full",children:(0,Vs.jsx)(sl,{...e})}),(0,Vs.jsx)("div",{className:"md:hidden",children:(0,Vs.jsx)(sl,{...e})}),(0,Vs.jsx)("div",{className:"flex-1 min-w-0 wa-16 px-4 md:px-6",children:(0,Vs.jsx)("div",{className:"w-full",children:e.children})})]})});var nl=ce(require("react")),ts=ce(require("@radix-ui/react-label"));var qc=(0,on.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),M=nl.forwardRef(({className:e,...t},a)=>(0,Vs.jsx)(ts.Root,{ref:a,className:f(qc(),e),...t}));M.displayName=ts.Root.displayName;var Li=({label:e,value:t,onValueChange:a,options:o,placeholder:r="Search...",allowCustomValue:i=!1,disabled:s=!1})=>{let[d,n]=(0,si.useState)(!1),[m,c]=(0,si.useState)(""),v=o.find(h=>h.value===t),u=o.filter(h=>h.label.toLowerCase().includes(m.toLowerCase())),g=h=>{a(h),n(!1),c("")},y=()=>{i&&m.trim()&&!o.find(h=>h.value===m.trim())&&(a(m.trim()),n(!1),c(""))};return(0,Vs.jsxs)("div",{className:"space-y-1",children:[(0,Vs.jsx)(M,{className:"text-xs text-muted-foreground",children:e}),(0,Vs.jsxs)(Me,{value:t,onValueChange:g,open:d,onOpenChange:h=>{s||n(h)},disabled:s,children:[(0,Vs.jsx)(Te,{className:"h-auto Vs-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Vs.jsx)(Q,{variant:"secondary",className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!s&&n(!d),children:v?.label||t||"Select..."})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)("div",{className:"Vs-2",children:(0,Vs.jsx)(O,{placeholder:r,value:m,onChange:h=>c(h.target.value),onKeyDown:h=>{h.key==="Enter"&&i&&y()},className:"mb-2"})}),u.map(h=>(0,Vs.jsx)(G,{value:h.value,children:h.label},h.value)),i&&m.trim()&&!u.find(h=>h.value===m.trim())&&(0,Vs.jsxs)(G,{value:m.trim(),children:['Add "',m.trim(),'"']})]})]})]})};function so({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:r=!0,compact:i=!1,className:s}){let[d,n]=(0,si.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,Vs.jsxs)(V,{className:f("hover:shadow-md transition-shadow",i&&"Vs-2",s),children:[(0,Vs.jsx)(Fe,{className:f("pb-3",i&&"pb-2"),children:(0,Vs.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Vs.jsx)("div",{className:"relative",children:(0,Vs.jsxs)(Mt,{className:f("h-12 w-12",i&&"h-8 w-8"),children:[(0,Vs.jsx)(sa,{src:"/placeholder.svg",alt:e.name}),(0,Vs.jsx)(Et,{children:e.name.split(" ").map(u=>u[0]).join("")})]})}),(0,Vs.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)("h3",{className:f("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,Vs.jsx)(ln.Bot,{className:f("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,Vs.jsx)(ln.User,{className:f("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,Vs.jsx)("Vs",{className:f("text-sm text-muted-foreground truncate",i&&"text-xs"),children:e.type==="human"?e.role:e.description}),!i&&(0,Vs.jsxs)("div",{className:"flex items-center gap-2 ln-1",children:[e.type==="human"&&(0,Vs.jsx)(Q,{variant:"secondary",className:"text-xs",children:e.department}),e.type==="digital"&&(0,Vs.jsxs)(Q,{variant:"secondary",className:"text-xs",children:["v",e.version]}),(0,Vs.jsx)(Q,{variant:"outline",className:"text-xs",children:c(e.status)})]})]})]}),r&&(0,Vs.jsxs)(eo,{children:[(0,Vs.jsx)(to,{asChild:!0,children:(0,Vs.jsx)(b,{variant:"ghost",size:"icon",className:f("h-8 w-8",i&&"h-6 w-6"),children:(0,Vs.jsx)(ln.MoreHorizontal,{className:f("h-4 w-4",i&&"h-3 w-3")})})}),(0,Vs.jsxs)(Aa,{align:"end",children:[(0,Vs.jsxs)(Yt,{onClick:()=>o?.(e),children:[(0,Vs.jsx)(ln.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,Vs.jsxs)(Yt,{onClick:()=>t?.(e),children:[(0,Vs.jsx)(ln.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]}),(0,Vs.jsxs)(Yt,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,Vs.jsx)(ln.Trash2,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),!i&&(0,Vs.jsxs)(me,{className:"Vs-0",children:[(0,Vs.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,Vs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Vs.jsx)(ln.Mail,{className:"h-3 w-3"}),(0,Vs.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,Vs.jsxs)(Vs.Fragment,{children:[e.phone&&(0,Vs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Vs.jsx)(ln.Phone,{className:"h-3 w-3"}),(0,Vs.jsx)("span",{children:e.phone})]}),e.location&&(0,Vs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Vs.jsx)(ln.MapPin,{className:"h-3 w-3"}),(0,Vs.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,Vs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Vs.jsx)(ln.Settings,{className:"h-3 w-3"}),(0,Vs.jsxs)("span",{children:["v",e.version]})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Vs.jsx)(ln.Clock,{className:"h-3 w-3"}),(0,Vs.jsxs)("span",{children:["Last active: ",v(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,Vs.jsx)("div",{className:"ln-3",children:(0,Vs.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,d?e.skills.length:3).map(u=>(0,Vs.jsx)(Q,{variant:"outline",className:"text-xs",children:u},u)),e.skills.length>3&&(0,Vs.jsx)(b,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>n(!d),children:d?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,Vs.jsx)("div",{className:"ln-3",children:(0,Vs.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,d?e.capabilities.length:2).map(u=>(0,Vs.jsx)(Q,{variant:"outline",className:"text-xs",children:u},u)),e.capabilities.length>2&&(0,Vs.jsx)(b,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>n(!d),children:d?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}function zo({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:r="Search knowledge documents...",maxSelections:i,disabled:s=!1}){let[d,n]=(0,si.useState)(""),[m,c]=(0,si.useState)([]),[v,u]=(0,si.useState)(!1);(0,si.useEffect)(()=>{if(!d.trim()){c([]),u(!1);return}let h=a.filter(x=>{if(e.map(A=>A.id).includes(x.id))return!1;let C=d.toLowerCase();return x.title.toLowerCase().includes(C)||x.description?.toLowerCase().includes(C)||x.tags?.some(A=>A.toLowerCase().includes(C))||Object.values(x.metadata||{}).some(A=>String(A).toLowerCase().includes(C))});c(h),u(!0)},[d,e,a]);let g=h=>{i&&e.length>=i||(t([...e,h]),n(""),u(!1))},y=h=>{t(e.filter(x=>x.id!==h))},P=!i||e.length<i;return(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:o}),(0,Vs.jsxs)("div",{className:"relative",children:[(0,Vs.jsxs)("div",{className:"relative",children:[(0,Vs.jsx)(ln.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Vs.jsx)(O,{value:d,onChange:h=>n(h.target.value),placeholder:P?r:`Maximum ${i} documents selected`,className:"pl-9",disabled:s||!P,onFocus:()=>d&&u(!0)})]}),v&&m.length>0&&(0,Vs.jsx)(V,{className:"absolute top-full left-0 right-0 Vs-10 ln-1 max-h-60",children:(0,Vs.jsx)(Qt,{className:"h-full",children:(0,Vs.jsx)(me,{className:"Vs-2",children:m.map(h=>(0,Vs.jsx)(b,{variant:"ghost",className:"w-full justify-start h-auto Vs-3 mb-1",onClick:()=>g(h),disabled:s,children:(0,Vs.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,Vs.jsx)(ln.FileText,{className:"h-4 w-4 ln-0.5 text-muted-foreground flex-shrink-0"}),(0,Vs.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,Vs.jsx)("div",{className:"font-medium text-sm truncate",children:h.title}),h.description&&(0,Vs.jsx)("div",{className:"text-xs text-muted-foreground ln-1 line-clamp-2",children:h.description}),h.tags&&h.tags.length>0&&(0,Vs.jsxs)("div",{className:"flex flex-wrap gap-1 ln-2",children:[h.tags.slice(0,3).map(x=>(0,Vs.jsx)(Q,{variant:"outline",className:"text-xs",children:x},x)),h.tags.length>3&&(0,Vs.jsxs)(Q,{variant:"outline",className:"text-xs",children:["+",h.tags.length-3," more"]})]})]})]})},h.id))})})}),v&&d&&m.length===0&&(0,Vs.jsx)(V,{className:"absolute top-full left-0 right-0 Vs-10 ln-1",children:(0,Vs.jsxs)(me,{className:"Vs-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',d,'"']})})]}),e.length>0&&(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,Vs.jsx)("div",{className:"space-y-2",children:e.map(h=>(0,Vs.jsx)(V,{className:"Vs-3",children:(0,Vs.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Vs.jsx)(ln.FileText,{className:"h-4 w-4 ln-0.5 text-muted-foreground flex-shrink-0"}),(0,Vs.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Vs.jsx)("div",{className:"font-medium text-sm",children:h.title}),h.description&&(0,Vs.jsx)("div",{className:"text-xs text-muted-foreground ln-1",children:h.description}),h.tags&&h.tags.length>0&&(0,Vs.jsx)("div",{className:"flex flex-wrap gap-1 ln-2",children:h.tags.map(x=>(0,Vs.jsxs)(Q,{variant:"outline",className:"text-xs",children:[(0,Vs.jsx)(ln.Tag,{className:"h-3 w-3 mr-1"}),x]},x))})]}),(0,Vs.jsx)(b,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>y(h.id),disabled:s,children:(0,Vs.jsx)(ln.Vs,{className:"h-3 w-3"})})]})},h.id))})]}),v&&(0,Vs.jsx)("div",{className:"fixed inset-0 Vs-0",onClick:()=>u(!1)})]})}function Ho({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:r,submitLabel:i,cancelLabel:s="Cancel",readOnly:d=!1,availableKnowledgeDocuments:n=[]}){let[m,c]=(0,si.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[v,u]=(0,si.useState)(""),[g,y]=(0,si.useState)(""),[P,h]=(0,si.useState)(!d);(0,si.useEffect)(()=>{e&&c(e)},[e]);let x=w=>{w.preventDefault();let D=m.version?parseInt(m.version):0,E=e?(D+1).toString():"1",ve={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:E,lastUpdated:m.lastUpdated||new Date,isActive:!0};t(ve)},S=(w,D,E)=>{if(!D.trim())return;let ve=m[w]||[];c({...m,[w]:[...ve,D.trim()]}),E("")},C=(w,D)=>{let E=m[w]||[];c({...m,[w]:E.filter((ve,j)=>j!==D)})},A=w=>{w.preventDefault(),h(!P)},F=(w,D,E,ve,j)=>{let R=m[w]||[];return(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:D}),P&&(0,Vs.jsxs)("div",{className:"flex gap-2",children:[(0,Vs.jsx)(O,{value:E,onChange:N=>ve(N.target.value),placeholder:j,onKeyPress:N=>{N.key==="Enter"&&(N.preventDefault(),S(w,E,ve))},disabled:o}),(0,Vs.jsx)(b,{type:"button",variant:"outline",size:"icon",onClick:()=>S(w,E,ve),disabled:o,children:(0,Vs.jsx)(ln.Plus,{className:"h-4 w-4"})})]}),(0,Vs.jsx)("div",{className:"flex flex-wrap gap-2",children:R.map((N,ie)=>(0,Vs.jsxs)(Q,{className:"gap-1",children:[N,P&&(0,Vs.jsx)(b,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 Vs-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>C(w,ie),disabled:o,children:(0,Vs.jsx)(ln.Vs,{className:"h-3 w-3"})})]},`${w}-${ie}-${N}`))})]})},U=r||(P?e?"Edit Colleague":"Add New Colleague":"View Colleague"),se=i||(e?"Update Colleague":"Add Colleague");return(0,Vs.jsxs)(V,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,Vs.jsx)(Fe,{children:(0,Vs.jsxs)(Oe,{className:"flex items-center gap-2",children:[(0,Vs.jsx)(ln.Bot,{className:"h-5 w-5"}),U]})}),(0,Vs.jsx)(me,{children:(0,Vs.jsxs)("form",{onSubmit:x,className:"space-y-6",children:[(0,Vs.jsxs)("div",{className:"space-y-4",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"name",children:"Name *"}),(0,Vs.jsx)(O,{id:"name",value:m.name||"",onChange:w=>c({...m,name:w.target.value}),required:!0,disabled:o||!P})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Vs.jsx)(ze,{id:"description",value:m.description||"",onChange:w=>c({...m,description:w.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!P})]})]}),(0,Vs.jsxs)("div",{className:"space-y-4",children:[(0,Vs.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Vs.jsx)(ze,{id:"jobDescription",value:m.jobDescription||"",onChange:w=>c({...m,jobDescription:w.target.value}),rows:4,required:m.type==="digital",disabled:o||!P})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Vs.jsx)(ze,{id:"workInstructions",value:m.workInstructions||"",onChange:w=>c({...m,workInstructions:w.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!P})]}),F("capabilities","Capabilities",g,y,"Add capability"),(0,Vs.jsx)(zo,{selectedDocuments:m.knowledge||[],onDocumentsChange:w=>c({...m,knowledge:w}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:o||!P,availableDocuments:n}),(0,Vs.jsx)(zo,{selectedDocuments:m.coreKnowledge||[],onDocumentsChange:w=>c({...m,coreKnowledge:w}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!P,availableDocuments:n})]}),(0,Vs.jsxs)("div",{className:"flex justify-end gap-2 Vs-4 border-t",children:[(0,Vs.jsx)(b,{type:"button",variant:"outline",onClick:a,disabled:o,children:P?s:"Close"}),P?(0,Vs.jsx)(b,{type:"submit",disabled:o,children:o?"Saving...":se}):(0,Vs.jsxs)(b,{type:"button",onClick:A,disabled:o,className:"gap-2",children:[(0,Vs.jsx)(ln.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function ji({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Vs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Vs.jsx)(wa.AnimatePresence,{mode:"wait",children:(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Vs.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Vs.jsx)(ln.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Vs.jsx)("Vs",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,Vs.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Vs.jsxs)(V,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Vs.jsxs)(Fe,{className:"text-center pb-4",children:[(0,Vs.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Vs.jsx)(ln.User,{className:"h-8 w-8 text-blue-600"})}),(0,Vs.jsx)(Oe,{className:"text-xl",children:"Add Human Colleague"})]}),(0,Vs.jsxs)(me,{className:"text-center",children:[(0,Vs.jsx)("Vs",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add si team members."}),(0,Vs.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Vs.jsx)(ln.Users,{className:"h-4 w-4 text-blue-600"}),(0,Vs.jsx)("span",{children:"Browse existing users"})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Vs.jsx)(ln.User,{className:"h-4 w-4 text-blue-600"}),(0,Vs.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Vs.jsx)(b,{className:"ln-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Vs.jsxs)(V,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Vs.jsxs)(Fe,{className:"text-center pb-4",children:[(0,Vs.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Vs.jsx)(ln.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,Vs.jsx)(Oe,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,Vs.jsxs)(me,{className:"text-center",children:[(0,Vs.jsx)("Vs",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague si create a new AI assistant for your team."}),(0,Vs.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Vs.jsx)(ln.Bot,{className:"h-4 w-4 text-purple-600"}),(0,Vs.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Vs.jsx)(ln.Users,{className:"h-4 w-4 text-purple-600"}),(0,Vs.jsx)("span",{children:"Create from templates"})]})]}),(0,Vs.jsx)(b,{className:"ln-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Oi({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[r,i]=(0,si.useState)(""),[s,d]=(0,si.useState)("all"),n=(0,si.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()),g=s==="all"||v.status===s;return u&&g}),[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,$.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,$.jsx)(wa.AnimatePresence,{mode:"wait",children:(0,$.jsxs)(wa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,$.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,$.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,$.jsx)(ln.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,$.jsxs)("div",{children:[(0,$.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,$.jsx)("Vs",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,$.jsx)(V,{children:(0,$.jsx)(me,{className:"Vs-6",children:(0,$.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,$.jsx)("div",{className:"flex-1",children:(0,$.jsxs)("div",{className:"relative",children:[(0,$.jsx)(ln.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,$.jsx)(O,{placeholder:"Search by name, job description, si capabilities...",value:r,onChange:v=>i(v.target.value),className:"pl-9"})]})}),(0,$.jsxs)("select",{value:s,onChange:v=>d(v.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,$.jsx)("option",{value:"all",children:"All Status"}),(0,$.jsx)("option",{value:"active",children:"Active"}),(0,$.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,$.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(v=>(0,$.jsx)(wa.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,$.jsxs)(V,{className:`cursor-pointer transition-all hover:shadow-lg ${o===v.id?"ring-2 ring-primary":""}`,onClick:()=>m(v),children:[(0,$.jsx)(Fe,{className:"pb-3",children:(0,$.jsxs)("div",{className:"flex items-start justify-between",children:[(0,$.jsxs)("div",{className:"flex items-center gap-3",children:[(0,$.jsx)(Mt,{children:(0,$.jsx)(Et,{className:"bg-blue-100",children:(0,$.jsx)(ln.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,$.jsxs)("div",{children:[(0,$.jsxs)(Oe,{className:"text-lg flex items-center gap-2",children:[v.name,(0,$.jsx)(Q,{variant:v.status==="active"?"default":"secondary",className:"text-xs",children:v.status})]}),(0,$.jsxs)("Vs",{className:"text-sm text-muted-foreground",children:["v",v.version]})]})]}),(0,$.jsxs)(b,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:u=>{u.stopPropagation(),m(v)},children:[(0,$.jsx)(ln.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,$.jsx)(me,{className:"Vs-0",children:(0,$.jsxs)("div",{className:"space-y-3",children:[(0,$.jsxs)("div",{children:[(0,$.jsx)("Vs",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,$.jsx)("Vs",{className:"text-sm line-clamp-2",children:v.jobDescription})]}),v.capabilities&&v.capabilities.length>0&&(0,$.jsxs)("div",{children:[(0,$.jsx)("Vs",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,$.jsxs)("div",{className:"flex flex-wrap gap-1",children:[v.capabilities.slice(0,3).map(u=>(0,$.jsx)(Q,{variant:"outline",className:"text-xs",children:u},u)),v.capabilities.length>3&&(0,$.jsxs)(Q,{variant:"outline",className:"text-xs",children:["+",v.capabilities.length-3]})]})]}),(0,$.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,$.jsxs)("div",{className:"flex items-center gap-1",children:[(0,$.jsx)(ln.Calendar,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:["Updated ",c(v.lastUpdated)]})]}),v.knowledge&&(0,$.jsxs)("div",{className:"flex items-center gap-1",children:[(0,$.jsx)(ln.Users,{className:"h-3 w-3"}),(0,$.jsxs)("span",{children:[v.knowledge.length," docs"]})]})]}),v.workInstructions&&(0,$.jsxs)("div",{children:[(0,$.jsx)("Vs",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,$.jsx)("Vs",{className:"text-xs line-clamp-2",children:v.workInstructions})]})]})})]})},v.id))}),n.length===0&&(0,$.jsx)(V,{children:(0,$.jsx)(me,{className:"Vs-6",children:(0,$.jsxs)("div",{className:"text-center py-8",children:[(0,$.jsx)(ln.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,$.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,$.jsx)("Vs",{className:"text-muted-foreground",children:"Try adjusting your search terms si filters."})]})})})]},"colleague-clone")})})}function zi({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Vs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Vs.jsx)(wa.AnimatePresence,{mode:"wait",children:(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Vs.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Vs.jsx)(ln.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Vs.jsx)("Vs",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,Vs.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Vs.jsxs)(V,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Vs.jsxs)(Fe,{className:"text-center pb-4",children:[(0,Vs.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Vs.jsx)(ln.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,Vs.jsx)(Oe,{className:"text-xl",children:"Clone Existing"})]}),(0,Vs.jsxs)(me,{className:"text-center",children:[(0,Vs.jsx)("Vs",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize ln for your needs."}),(0,Vs.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Vs.jsx)(ln.Bot,{className:"h-4 w-4 text-blue-600"}),(0,Vs.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Vs.jsx)(ln.Copy,{className:"h-4 w-4 text-blue-600"}),(0,Vs.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Vs.jsx)(b,{className:"ln-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Vs.jsxs)(V,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Vs.jsxs)(Fe,{className:"text-center pb-4",children:[(0,Vs.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Vs.jsx)(ln.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,Vs.jsx)(Oe,{className:"text-xl",children:"Create New"})]}),(0,Vs.jsxs)(me,{className:"text-center",children:[(0,Vs.jsx)("Vs",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Vs.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Vs.jsx)(ln.Plus,{className:"h-4 w-4 text-green-600"}),(0,Vs.jsx)("span",{children:"Custom job description"})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Vs.jsx)(ln.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,Vs.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Vs.jsx)(b,{className:"ln-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}var Hi=require("react-icons/si");function Ge({title:e,description:t,badge:a,primaryAction:o,secondaryAction:r,gradient:i,children:s,className:d}){let[n,m]=Ni(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!r&&!t),c=!r&&!t||n;return(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} Vs-8 text-white ${d||""}`,children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Vs.jsx)(Q,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Vs.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-3",children:[c&&o&&(0,Vs.jsx)(b,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(r||t)&&(0,Vs.jsx)("button",{"aria-label":n?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 Vs-1 text-white transition-colors",onClick:()=>m(!n),style:{lineHeight:0},children:n?(0,Vs.jsx)(Hi.FaChevronDown,{size:22}):(0,Vs.jsx)(Hi.FaChevronUp,{size:22})})]})]}),!c&&(0,Vs.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Vs.jsxs)("div",{className:"space-y-4",children:[(0,Vs.jsx)("Vs",{className:"max-w-[600px] text-white/80",children:t}),(0,Vs.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Vs.jsx)(b,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),r&&(0,Vs.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,Vs.jsx)("div",{className:"hidden lg:block",children:s})]})]})}var pl=ce(require("react")),Ko=ce(require("@radix-ui/react-progress"));var Go=pl.forwardRef(({className:e,value:t,...a},o)=>(0,Vs.jsx)(Ko.Root,{ref:o,className:f("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Vs.jsx)(Ko.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Go.displayName=Ko.Root.displayName;function is({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:r}){return(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:r,children:(0,Vs.jsxs)(V,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Vs.jsx)(Fe,{className:"pb-2",children:(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Vs.jsx)(Q,{className:"rounded-xl bg-amber-500",children:"New"}):(0,Vs.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Vs.jsx)(ln.Star,{className:"h-4 w-4"})})]})}),(0,Vs.jsxs)(me,{className:"pb-2",children:[(0,Vs.jsx)(Oe,{className:"text-lg",children:e.name}),(0,Vs.jsx)(da,{children:e.description}),o&&e.progress<100&&(0,Vs.jsxs)("div",{className:"ln-2",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Vs.jsx)("span",{children:"Installation"}),(0,Vs.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Vs.jsx)(Go,{value:e.progress,className:"h-2 ln-1 rounded-xl"})]})]}),(0,Vs.jsx)(ca,{children:(0,Vs.jsx)(b,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function po({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:r=!0,className:i}){return(0,Vs.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[r&&(0,Vs.jsxs)("div",{className:"bg-muted/50 Vs-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Vs.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Vs.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Vs.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Vs.jsx)("div",{className:"divide-y",children:e.map(s=>(0,Vs.jsxs)(wa.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"Vs-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,Vs.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,Vs.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted",children:s.icon}),(0,Vs.jsx)("div",{children:(0,Vs.jsx)("Vs",{className:"font-medium",children:s.name})})]}),(0,Vs.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:s.size}),(0,Vs.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,Vs.jsx)("span",{className:"text-sm md:text-base",children:s.modified}),(0,Vs.jsxs)("div",{className:"flex gap-1",children:[(0,Vs.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:d=>{d.stopPropagation(),a?.(s)},children:(0,Vs.jsx)(ln.Edit,{className:"h-4 w-4"})}),(0,Vs.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:d=>{d.stopPropagation(),o?.(s)},children:(0,Vs.jsx)(ln.Trash2,{className:"h-4 w-4"})}),(0,Vs.jsx)(b,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",children:(0,Vs.jsx)(ln.MoreHorizontal,{className:"h-4 w-4"})})]})]})]},s.name))})]})}function Ui({project:e,onOpen:t,onShare:a,className:o}){return(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Vs.jsxs)(V,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Vs.jsxs)(Fe,{children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)(Oe,{children:e.name}),(0,Vs.jsxs)(Q,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Vs.jsx)(da,{children:e.description})]}),(0,Vs.jsxs)(me,{className:"space-y-4",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Vs.jsx)("span",{children:"Progress"}),(0,Vs.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Vs.jsx)(Go,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Vs.jsxs)("div",{className:"flex items-center",children:[(0,Vs.jsx)(ln.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,Vs.jsxs)("div",{className:"flex items-center",children:[(0,Vs.jsx)(ln.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,Vs.jsxs)(ca,{className:"flex gap-2",children:[(0,Vs.jsx)(b,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Vs.jsx)(b,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Vs.jsx)(ln.Share2,{className:"h-4 w-4"})})]})]})})}var rs=[{name:"PixelMaster",icon:(0,Vs.jsx)(ln.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Vs.jsx)(ln.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Vs.jsx)(ln.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Vs.jsx)(ln.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Vs.jsx)(ln.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Vs.jsx)(ln.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Vs.jsx)(ln.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Vs.jsx)(ln.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Vs.jsx)(ln.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Vs.jsx)(ln.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Vs.jsx)(ln.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Vs.jsx)(ln.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],bl=[{name:"Brand Redesign.pxm",app:"PixelMaster",modified:"2 hours ago",icon:(0,Vs.jsx)(ln.ImageIcon,{className:"text-violet-500"}),shared:!0,size:"24.5 MB",collaborators:3},{name:"Company Logo.vec",app:"VectorPro",modified:"Yesterday",icon:(0,Vs.jsx)(ln.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,Vs.jsx)(ln.Video,{className:"text-pink-500"}),shared:!1,size:"1.2 GB",collaborators:0},{name:"UI Animation.mfx",app:"MotionFX",modified:"Last week",icon:(0,Vs.jsx)(ln.Sparkles,{className:"text-blue-500"}),shared:!0,size:"345 MB",collaborators:4},{name:"Magazine Layout.pgc",app:"PageCraft",modified:"2 weeks ago",icon:(0,Vs.jsx)(ln.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,Vs.jsx)(ln.LayoutGrid,{className:"text-fuchsia-500"}),shared:!0,size:"18.3 MB",collaborators:5},{name:"Product Photography.phl",app:"PhotoLab",modified:"Last month",icon:(0,Vs.jsx)(ln.Camera,{className:"text-teal-500"}),shared:!1,size:"156 MB",collaborators:0}];var hl=[{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 xl({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[r,i]=(0,si.useState)(""),s=(0,si.useMemo)(()=>e.filter(n=>n.name.toLowerCase().includes(r.toLowerCase())||n.email.toLowerCase().includes(r.toLowerCase())||n.role.toLowerCase().includes(r.toLowerCase())||(n.skills||[]).some(c=>c.toLowerCase().includes(r.toLowerCase()))),[e,r]),d=n=>{t(n)};return(0,Vs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Vs.jsx)(wa.AnimatePresence,{mode:"wait",children:(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Vs.jsxs)(b,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Vs.jsx)(ln.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Vs.jsx)("Vs",{className:"text-muted-foreground",children:"Choose a user to add si a colleague"})]})]}),(0,Vs.jsx)(V,{className:"container",children:(0,Vs.jsx)(me,{className:"Vs-6",children:(0,Vs.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,Vs.jsx)("div",{className:"flex-1",children:(0,Vs.jsxs)("div",{className:"relative",children:[(0,Vs.jsx)(ln.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Vs.jsx)(O,{placeholder:"Search users by name, email, role, si skills...",value:r,onChange:n=>i(n.target.value),className:"pl-9"})]})})})})}),(0,Vs.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:s.map(n=>(0,Vs.jsx)(wa.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Vs.jsxs)(V,{className:`cursor-pointer transition-all hover:shadow-lg ${o===n.id?"ring-2 ring-primary":""}`,onClick:()=>d(n),children:[(0,Vs.jsx)(Fe,{className:"pb-3",children:(0,Vs.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Vs.jsxs)(Mt,{children:[(0,Vs.jsx)(sa,{src:n.avatar,alt:n.name}),(0,Vs.jsx)(Et,{children:(0,Vs.jsx)(ln.User,{className:"h-4 w-4"})})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(Oe,{className:"text-lg",children:n.name}),(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:n.role})]})]}),o===n.id&&(0,Vs.jsx)(ln.Check,{className:"h-5 w-5 text-primary"})]})}),(0,Vs.jsx)(me,{className:"Vs-0",children:(0,Vs.jsxs)("div",{className:"space-y-3",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Vs.jsx)("Vs",{className:"text-sm font-medium",children:n.email})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:"Department"}),(0,Vs.jsx)(Q,{variant:"secondary",children:n.department})]}),n.location&&(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:"Location"}),(0,Vs.jsx)("Vs",{className:"text-sm",children:n.location})]}),n.skills&&n.skills.length>0&&(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,Vs.jsxs)("div",{className:"flex flex-wrap gap-1",children:[n.skills.slice(0,3).map(m=>(0,Vs.jsx)(Q,{variant:"outline",className:"text-xs",children:m},m)),n.skills.length>3&&(0,Vs.jsxs)(Q,{variant:"outline",className:"text-xs",children:["+",n.skills.length-3]})]})]})]})})]})},n.id))}),s.length===0&&(0,Vs.jsx)(V,{className:"container ln-4",children:(0,Vs.jsx)(me,{className:"Vs-6",children:(0,Vs.jsxs)("div",{className:"text-center py-8",children:[(0,Vs.jsx)(ln.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Vs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,Vs.jsx)("Vs",{className:"text-muted-foreground",children:"Try adjusting your search terms si filters."})]})})})]},"user-selection")})})}function $o({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:r=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:s,availableUsers:d=[],existingDigitalColleagues:n=[]}){let[m,c]=(0,si.useState)(e||[]),[v,u]=(0,si.useState)(""),[g,y]=(0,si.useState)("all"),[P,h]=(0,si.useState)("all"),[x,S]=(0,si.useState)("all"),[C,A]=(0,si.useState)(null),[F,U]=(0,si.useState)(null),[se,w]=(0,si.useState)("main"),D=m.filter(I=>{let Ze=I.name.toLowerCase().includes(v.toLowerCase())||I.type==="human"&&(I.email.toLowerCase().includes(v.toLowerCase())||I.role.toLowerCase().includes(v.toLowerCase()))||I.type==="digital"&&I.jobDescription.toLowerCase().includes(v.toLowerCase()),Xe=g==="all"||I.type==="human"&&I.department===g,Pa=P==="all"||I.status===P;return Ze&&Xe&&Pa}),E=D.filter(I=>I.type==="human"),ve=D.filter(I=>I.type==="digital"),j=()=>{w("typeSelection")},R=I=>{I.type==="digital"&&(A(I),w("form"))},N=I=>{I.type==="digital"&&(U(I),w("view"))},ie=I=>{let Ze={id:`human-${Date.now()}`,type:"human",name:I.name,email:I.email,role:I.role,department:I.department,phone:I.phone,location:I.location,timezone:I.timezone,skills:I.skills,bio:I.bio,status:"active",joinedDate:new Date,lastActive:new Date};c(Xe=>[...Xe,Ze]),t?.(Ze),w("main")},ke=I=>{c(Ze=>[...Ze,I]),t?.(I),w("main")},tt=()=>{A(null),w("form")},Ee=I=>{C?(c(Ze=>Ze.map(Xe=>Xe.id===I.id?I:Xe)),a?.(I)):(c(Ze=>[...Ze,I]),t?.(I)),w("main"),A(null)},at=()=>{w("main"),A(null),U(null)},H=()=>{w("main"),U(null)},ne=()=>{F&&(A(F),U(null),w("form"))},Re=I=>{c(Ze=>Ze.filter(Xe=>Xe.id!==I)),o?.(I)},bt=()=>{u(""),y("all"),h("all")},jt=()=>{let I=[];return n.forEach(Xe=>{I.push(...Xe.knowledge,...Xe.coreKnowledge)}),m.forEach(Xe=>{Xe.type==="digital"&&I.push(...Xe.knowledge,...Xe.coreKnowledge)}),I.filter((Xe,Pa,Qo)=>Pa===Qo.findIndex(ho=>ho.id===Xe.id))};return se==="typeSelection"?(0,Vs.jsx)(ji,{onSelectHuman:()=>w("userSelection"),onSelectDigital:()=>w("digitalOptions"),onCancel:()=>w("main")}):se==="userSelection"?(0,Vs.jsx)(xl,{users:d,onUserSelect:ie,onCancel:()=>w("typeSelection")}):se==="digitalOptions"?(0,Vs.jsx)(zi,{onCloneExisting:()=>w("digitalClone"),onCreateNew:tt,onCancel:()=>w("typeSelection")}):se==="digitalClone"?(0,Vs.jsx)(Oi,{digitalColleagues:n,onColleagueClone:ke,onCancel:()=>w("digitalOptions")}):se==="form"?(0,Vs.jsx)(Ho,{colleague:C||void 0,onSave:Ee,onCancel:at,availableKnowledgeDocuments:jt()}):se==="view"?(0,Vs.jsx)(Ho,{colleague:F||void 0,onSave:Ee,onCancel:H,readOnly:!0,availableKnowledgeDocuments:jt()}):(0,Vs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Vs.jsx)(wa.AnimatePresence,{mode:"wait",children:(0,Vs.jsx)(wa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Vs.jsxs)("div",{className:`space-y-6 ${s||""}`,children:[(0,Vs.jsx)(Ge,{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:j}}),(0,Vs.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Vs.jsxs)(V,{children:[(0,Vs.jsxs)(Fe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Vs.jsx)(Oe,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Vs.jsx)(ln.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Vs.jsxs)(me,{children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold",children:m.length}),(0,Vs.jsxs)("Vs",{className:"text-xs text-muted-foreground",children:[m.filter(I=>I.status==="active").length," active"]})]})]}),(0,Vs.jsxs)(V,{children:[(0,Vs.jsxs)(Fe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Vs.jsx)(Oe,{className:"text-sm font-medium",children:"Human Members"}),(0,Vs.jsx)(ln.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Vs.jsxs)(me,{children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold",children:m.filter(I=>I.type==="human").length}),(0,Vs.jsxs)("Vs",{className:"text-xs text-muted-foreground",children:[m.filter(I=>I.type==="human"&&I.status==="active").length," active"]})]})]}),(0,Vs.jsxs)(V,{children:[(0,Vs.jsxs)(Fe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Vs.jsx)(Oe,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Vs.jsx)(ln.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Vs.jsxs)(me,{children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold",children:m.filter(I=>I.type==="digital").length}),(0,Vs.jsxs)("Vs",{className:"text-xs text-muted-foreground",children:[m.filter(I=>I.type==="digital"&&I.status==="active").length," active"]})]})]})]}),(0,Vs.jsx)(V,{children:(0,Vs.jsx)(me,{className:"Vs-6",children:(0,Vs.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Vs.jsx)("div",{className:"flex-1",children:(0,Vs.jsxs)("div",{className:"relative",children:[(0,Vs.jsx)(ln.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Vs.jsx)(O,{placeholder:"Search colleagues...",value:v,onChange:I=>u(I.target.value),className:"pl-9"})]})}),(0,Vs.jsxs)(Me,{value:g,onValueChange:y,children:[(0,Vs.jsx)(Te,{className:"w-full md:w-[180px]",children:(0,Vs.jsx)(He,{placeholder:"Department"})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"all",children:"All Departments"}),i.map(I=>(0,Vs.jsx)(G,{value:I,children:I},I))]})]}),(0,Vs.jsxs)(Me,{value:P,onValueChange:h,children:[(0,Vs.jsx)(Te,{className:"w-full md:w-[140px]",children:(0,Vs.jsx)(He,{placeholder:"Status"})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"all",children:"All Status"}),(0,Vs.jsx)(G,{value:"active",children:"Active"}),(0,Vs.jsx)(G,{value:"inactive",children:"Inactive"})]})]}),(v||g!=="all"||P!=="all")&&(0,Vs.jsxs)(b,{variant:"outline",onClick:bt,className:"gap-2",children:[(0,Vs.jsx)(ln.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Vs.jsxs)("div",{className:"space-y-4",children:[(0,Vs.jsx)(ao,{activeTab:x,onTabChange:S,tabOptions:[{value:"all",label:`All (${D.length})`},{value:"human",label:`Human (${E.length})`},{value:"digital",label:`Digital (${ve.length})`}],maxWidth:"400px",gridCols:3}),x==="all"&&(0,Vs.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:D.map(I=>(0,Vs.jsx)(so,{colleague:I,onEdit:R,onDelete:Re,onViewDetails:N,compact:r},I.id))}),x==="human"&&(0,Vs.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:E.map(I=>(0,Vs.jsx)(so,{colleague:I,onEdit:R,onDelete:Re,onViewDetails:N,compact:r},I.id))}),x==="digital"&&(0,Vs.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:ve.map(I=>(0,Vs.jsx)(so,{colleague:I,onEdit:R,onDelete:Re,onViewDetails:N,compact:r},I.id))})]}),D.length===0&&(0,Vs.jsx)(V,{children:(0,Vs.jsx)(me,{className:"Vs-6",children:(0,Vs.jsxs)("div",{className:"text-center py-8",children:[(0,Vs.jsx)(ln.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Vs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,Vs.jsx)("Vs",{className:"text-muted-foreground mb-4",children:v||g!=="all"||P!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,Vs.jsxs)(b,{onClick:j,className:"gap-2",children:[(0,Vs.jsx)(ln.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function _i({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:r=[]}){let[i,s]=(0,si.useState)({...e,updatedAt:new Date}),[d,n]=(0,si.useState)(!1),[m,c]=(0,si.useState)(!1),v=()=>{let C=new Set,A=new Set;return r.forEach(F=>{F.menuConfig.groupBy.forEach(U=>C.add(U))}),o.forEach(F=>{F.metadata&&Object.keys(F.metadata).forEach(U=>A.add(U))}),{contextKeys:Array.from(C).sort(),documentKeys:Array.from(A).sort(),allKeys:Array.from(new Set([...C,...A])).sort()}},u=C=>{let A=new Set;return o.forEach(F=>{F.metadata?.[C]&&A.add(String(F.metadata[C]))}),Array.from(A).sort()},g=v(),y=()=>{t(i)},P=(C,A)=>{s(F=>({...F,metadata:{...F.metadata,[C]:A}}))},h=(C,A)=>{A==="__custom__"?P(C,""):P(C,A)},x=()=>{let C=`field_${Date.now()}`;P(C,"")},S=C=>{s(A=>{let F={...A.metadata};return delete F[C],{...A,metadata:F}})};return(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Vs.jsxs)("div",{className:"border-b border-border bg-card Vs-8",children:[(0,Vs.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,Vs.jsx)("div",{className:"flex-shrink-0 Vs-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Vs.jsx)(ln.Edit3,{className:"h-6 w-6 text-primary"})}),(0,Vs.jsx)("div",{className:"flex-1 min-w-0",children:m?(0,Vs.jsx)(O,{value:i.title,onChange:C=>s(A=>({...A,title:C.target.value})),onBlur:()=>c(!1),onKeyDown:C=>{C.key==="Enter"&&c(!1),C.key==="Escape"&&(s(A=>({...A,title:e.title})),c(!1))},autoFocus:!0,className:"text-xl font-bold border-none Vs-0 h-auto bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0",placeholder:"Document title..."}):(0,Vs.jsxs)("div",{className:"flex items-center gap-2 group",children:[(0,Vs.jsx)("h1",{className:"text-xl font-bold text-foreground cursor-pointer hover:text-primary transition-colors py-1",onClick:()=>c(!0),title:"Click to edit title",children:i.title||"Untitled Document"}),(0,Vs.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>c(!0),className:"opacity-0 group-hover:opacity-100 transition-opacity h-6 w-6 Vs-0",children:(0,Vs.jsx)(ln.Edit3,{className:"h-3 w-3"})})]})})]}),(0,Vs.jsxs)("div",{className:"flex gap-2",children:[(0,Vs.jsxs)(b,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,Vs.jsx)(ln.Vs,{className:"h-4 w-4"}),"Cancel"]}),(0,Vs.jsxs)(b,{size:"sm",onClick:y,className:"gap-2",children:[(0,Vs.jsx)(ln.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,Vs.jsxs)("div",{className:"space-y-4",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Description"}),(0,Vs.jsx)(O,{value:i.description||"",onChange:C=>s(A=>({...A,description:C.target.value})),placeholder:"Brief description...",className:"text-sm"})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsxs)("button",{type:"button",onClick:()=>n(!d),className:"flex items-center justify-between w-full Vs-3 bg-muted/20 hover:bg-muted/30 rounded-lg border border-border transition-colors",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[d?(0,Vs.jsx)(ln.ChevronDown,{className:"h-4 w-4 text-muted-foreground"}):(0,Vs.jsx)(ln.ChevronRight,{className:"h-4 w-4 text-muted-foreground"}),(0,Vs.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Metadata"}),i.metadata&&Object.keys(i.metadata).length>0&&(0,Vs.jsxs)("span",{className:"text-xs bg-primary/10 text-primary px-2 py-1 rounded-full",children:[Object.keys(i.metadata).length," field",Object.keys(i.metadata).length!==1?"s":""]})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[g.contextKeys.length>0&&!d&&(0,Vs.jsxs)("span",{className:"text-xs text-muted-foreground",children:[g.contextKeys.slice(0,2).join(", "),g.contextKeys.length>2&&"..."]}),(0,Vs.jsxs)(b,{type:"button",variant:"ghost",size:"sm",onClick:C=>{C.stopPropagation(),x(),n(!0)},className:"gap-1 h-6 px-2",children:[(0,Vs.jsx)(ln.Plus,{className:"h-3 w-3"}),"Add"]})]})]}),d&&(0,Vs.jsx)("div",{className:"ln-3 space-y-2 pl-6",children:i.metadata&&Object.keys(i.metadata).length>0?Object.entries(i.metadata).map(([C,A])=>{let F=u(C);return(0,Vs.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Vs.jsx)(O,{value:C,onChange:U=>{let se=U.target.value,w=i.metadata?.[C];s(D=>{let E={...D.metadata};return delete E[C],se&&(E[se]=w||""),{...D,metadata:E}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${C}`}),(0,Vs.jsx)("datalist",{id:`metadata-keys-${C}`,children:g.allKeys.map(U=>(0,Vs.jsx)("option",{value:U},U))}),(0,Vs.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),F.length>0?(0,Vs.jsxs)(Me,{value:String(A||""),onValueChange:U=>h(C,U),children:[(0,Vs.jsx)(Te,{className:"flex-1 h-8 text-sm",children:(0,Vs.jsx)(He,{placeholder:"Value"})}),(0,Vs.jsxs)(Pe,{children:[F.map(U=>(0,Vs.jsx)(G,{value:U,children:U},U)),(0,Vs.jsx)(G,{value:"__custom__",children:(0,Vs.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Vs.jsx)(O,{value:String(A||""),onChange:U=>P(C,U.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,Vs.jsx)(b,{type:"button",variant:"ghost",size:"sm",onClick:()=>S(C),className:"h-8 w-8 Vs-0 text-muted-foreground hover:text-destructive",children:(0,Vs.jsx)(ln.Vs,{className:"h-3 w-3"})})]},C)}):(0,Vs.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/10",children:(0,Vs.jsx)("Vs",{className:"text-xs text-muted-foreground",children:"No metadata fields yet"})})})]}),(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Vs.jsx)(Q,{variant:"secondary",className:"font-mono",children:i.format.toUpperCase()})]})]})]}),(0,Vs.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Vs.jsxs)("div",{className:"Vs-8",children:[(0,Vs.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Vs.jsx)(ze,{value:i.content||"",onChange:C=>s(A=>({...A,content:C.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var Sl=e=>(0,Vs.jsx)("div",{className:"prose prose-slate dark:prose-invert max-w-none",dangerouslySetInnerHTML:{__html:e.replace(/\n/g,"<br>").replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").replace(/\*(.*?)\*/g,"<em>$1</em>").replace(/`(.*?)`/g,'<code class="bg-muted px-1 py-0.5 rounded text-sm">$1</code>').replace(/^# (.*$)/gm,'<h1 class="text-2xl font-bold mb-4">$1</h1>').replace(/^## (.*$)/gm,'<h2 class="text-xl font-semibold mb-3">$1</h2>').replace(/^### (.*$)/gm,'<h3 class="text-lg font-medium mb-2">$1</h3>')}}),wl=e=>(0,Vs.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),Xc=e=>(0,Vs.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Vs.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg Vs-4 mb-4",children:(0,Vs.jsxs)("Vs",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Vs.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Vs.jsx)("pre",{className:"text-sm",children:e})]}),Yc=e=>(0,Vs.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,Vs.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg Vs-4 mb-4",children:(0,Vs.jsxs)("Vs",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Vs.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),Sl(e)]});function $i({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:r=[],knowledgeContexts:i=[]}){let[s,d]=(0,si.useState)(!1),n=g=>{switch(g){case"markdown":case"mdx":return(0,Vs.jsx)(ln.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,Vs.jsx)(ln.File,{className:"h-6 w-6 text-success"});case"text":return(0,Vs.jsx)(ln.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,Vs.jsx)(ln.File,{className:"h-6 w-6 text-muted-foreground"})}},m=g=>{switch(g){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";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},c=(g,y)=>{let P={markdown:Sl,mdx:Yc,richtext:Xc,text:wl},h=o?.[y]||P[y];return h?h(g):wl(g)},v=g=>{d(!1),t?.(g)},u=()=>{d(!1)};return s?(0,Vs.jsx)(_i,{document:e,onSave:v,onCancel:u,availableDocuments:r,knowledgeContexts:i}):(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,Vs.jsxs)("div",{className:"border-b border-border bg-card Vs-8",children:[(0,Vs.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Vs.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,Vs.jsx)("div",{className:"flex-shrink-0 Vs-3 rounded-xl bg-muted border border-border",children:n(e.format)}),(0,Vs.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Vs.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Vs.jsx)("Vs",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,Vs.jsx)("div",{className:"flex-shrink-0",children:(0,Vs.jsxs)(b,{variant:"outline",size:"sm",onClick:()=>d(!0),className:"gap-2",children:[(0,Vs.jsx)(ln.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,Vs.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Vs.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${m(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(g=>(0,Vs.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",g]},g))]})]}),(0,Vs.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Vs.jsxs)("div",{className:"Vs-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Vs.jsxs)("div",{className:"mb-6",children:[(0,Vs.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Vs.jsx)("div",{className:"bg-muted rounded-lg Vs-3 border border-border",children:(0,Vs.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(([g,y])=>(0,Vs.jsxs)("div",{className:"flex gap-1",children:[(0,Vs.jsxs)("span",{className:"text-muted-foreground font-medium",children:[g.replace(/([A-Vs])/g," $1").trim(),":"]}),(0,Vs.jsx)("span",{className:"text-foreground truncate",children:String(y)})]},g))})})]}),(0,Vs.jsx)("div",{className:"space-y-4",children:e.content?(0,Vs.jsx)("div",{className:"relative",children:(0,Vs.jsx)("div",{className:"bg-card border border-border rounded-xl Vs-6 overflow-hidden",children:c(e.content,e.format)})}):(0,Vs.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Vs.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Vs.jsx)(ln.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Vs.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Vs.jsx)("Vs",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function Dl({label:e,documents:t,children:a,level:o,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:s=!0}){let[d,n]=(0,si.useState)(o===0),m=a&&Object.keys(a).length>0,c=t.length+(a?Object.values(a).reduce((g,y)=>g+y.documents.length,0):0),v=g=>{switch(g){case"markdown":case"mdx":return(0,Vs.jsx)(ln.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,Vs.jsx)(ln.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,Vs.jsx)(ln.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},u=g=>{let y=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return y[g%y.length]};return(0,Vs.jsxs)("div",{className:"space-y-1",children:[(m||t.length>0)&&(0,Vs.jsxs)(wa.motion.div,{className:`group flex items-center gap-3 Vs-3 rounded-xl cursor-pointer transition-all duration-200 ${d?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>n(!d),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Vs.jsx)("div",{className:`w-1 h-6 rounded-full ${u(o)}`}),(0,Vs.jsx)(wa.motion.div,{animate:{rotate:d?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Vs.jsx)(ln.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,Vs.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,Vs.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,Vs.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),s&&c>0&&(0,Vs.jsx)("div",{className:"flex-shrink-0 wa-2",children:(0,Vs.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,Vs.jsx)(wa.motion.div,{initial:!1,animate:{height:d?"auto":0,opacity:d?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Vs.jsxs)("div",{className:"Vs-2 space-y-1",children:[t.map((g,y)=>(0,Vs.jsxs)(wa.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 Vs-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===g.id?"bg-primary/10 border-Vs-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>r?.(g),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Vs.jsx)("div",{className:"flex-shrink-0",children:v(g.format)}),(0,Vs.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Vs.jsx)("Vs",{className:`text-sm truncate transition-colors ${i===g.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:g.title}),g.description&&(0,Vs.jsx)("Vs",{className:"text-xs text-muted-foreground truncate ln-0.5",children:g.description})]}),g.tags&&g.tags.length>0&&(0,Vs.jsx)("div",{className:"flex-shrink-0",children:(0,Vs.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:g.tags[0]})})]},g.id)),a&&Object.entries(a).map(([g,y])=>(0,Vs.jsx)(Dl,{label:g,documents:y.documents,children:y.children,level:o+1,onDocumentClick:r,selectedDocumentId:i,showDocumentCount:s},g))]})})]})}function Wi({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:r,selectedDocumentId:i,className:s,editable:d=!0}){let[n,m]=(0,si.useState)(""),[c,v]=(0,si.useState)(null),u=(0,si.useMemo)(()=>n?e.filter(P=>P.title.toLowerCase().includes(n.toLowerCase())||P.description?.toLowerCase().includes(n.toLowerCase())||P.tags?.some(h=>h.toLowerCase().includes(n.toLowerCase()))||Object.values(P.metadata||{}).some(h=>String(h).toLowerCase().includes(n.toLowerCase()))):e,[e,n]),g=(0,si.useMemo)(()=>{let P=(h,x)=>{if(x.length===0)return{};let[S,...C]=x;return h.reduce((F,U)=>{let se=U.metadata?.[S]||"Uncategorized",w=String(se);if(F[w]||(F[w]={documents:[],children:{}}),C.length===0)F[w].documents.push(U);else{let D=P([U],C),E=Object.keys(D)[0];E&&(F[w].children||(F[w].children={}),F[w].children[E]?F[w].children[E].documents.push(...D[E].documents):F[w].children[E]=D[E])}return F},{})};return P(u,t.groupBy)},[u,t.groupBy]),y=P=>{v(P),a?.(P)};return(0,Vs.jsxs)("div",{className:`flex h-full ${s||""}`,children:[(0,Vs.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,Vs.jsx)("div",{className:"Vs-6 border-b border-border",children:(0,Vs.jsxs)("div",{className:"relative",children:[(0,Vs.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Vs.jsx)(ln.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,Vs.jsx)(O,{placeholder:"Search knowledge base...",value:n,onChange:P=>m(P.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl h-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Vs.jsx)(Qt,{className:"h-[calc(100%-100px)]",children:(0,Vs.jsxs)("div",{className:"Vs-4 space-y-3",children:[Object.entries(g).map(([P,h])=>(0,Vs.jsx)(Dl,{label:P,documents:h.documents,children:h.children,level:0,onDocumentClick:y,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},P)),Object.keys(g).length===0&&(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Vs.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Vs.jsx)(ln.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,Vs.jsx)("Vs",{className:"text-sm font-medium",children:"No documents found"}),(0,Vs.jsx)("Vs",{className:"text-xs ln-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Vs.jsx)("div",{className:"flex-1 bg-background",children:c?(0,Vs.jsx)($i,{document:c,onDocumentUpdate:r,editable:d}):(0,Vs.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,Vs.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Vs.jsx)(ln.FileText,{className:"h-10 w-10 text-primary"})}),(0,Vs.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Vs.jsx)("Vs",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function Wo({documents:e=[],contexts:t=[],onDocumentClick:a=s=>console.log("Document clicked:",s),onDocumentShare:o=s=>console.log("Share document:",s),onLoadDocumentContent:r,selectedDocumentId:i}){let[s,d]=(0,si.useState)(t[0]);return!t||t.length===0?(0,Vs.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Vs.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Vs.jsx)(Ge,{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,Vs.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Vs.jsx)("Vs",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,Vs.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Vs.jsx)(Ge,{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,Vs.jsxs)("div",{className:"ln-6",children:[(0,Vs.jsx)("div",{className:"border-b border-border",children:(0,Vs.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(n=>(0,Vs.jsxs)("button",{onClick:()=>d(n),className:`group inline-flex items-center gap-2 py-3 px-1 border-b-2 font-medium text-sm whitespace-nowrap transition-colors ${s.id===n.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[n.icon,n.label]},n.id))})}),s.description&&(0,Vs.jsx)("div",{className:"ln-3 px-1",children:(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:s.description})})]})]}),(0,Vs.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,Vs.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,Vs.jsx)(Wi,{documents:e,menuConfig:s.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function ns({title:e="Digital Colleagues",businessUnits:t}){let[a,o]=(0,si.useState)("home"),[r,i]=(0,si.useState)(t[0]),s=x=>{console.log("Opening app:",x.name)},d=x=>{console.log("Favoriting app:",x.name)},n=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)},g=()=>{console.log("Copilot clicked - navigating to chat"),o("chat")},y=x=>{console.log("Notification removed:",x)},P=()=>{console.log("All notifications removed")},h=()=>{switch(a){case"home":return(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsxs)("section",{className:"text-center py-12",children:[(0,Vs.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",r.name," team"]}),(0,Vs.jsx)("Vs",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,Vs.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,Vs.jsxs)("div",{className:"bg-card Vs-6 rounded-lg border",children:[(0,Vs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,Vs.jsx)("Vs",{className:"text-3xl font-bold text-primary",children:"12"}),(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Vs.jsxs)("div",{className:"bg-card Vs-6 rounded-lg border",children:[(0,Vs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,Vs.jsx)("Vs",{className:"text-3xl font-bold text-primary",children:"8"}),(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Vs.jsxs)("div",{className:"bg-card Vs-6 rounded-lg border",children:[(0,Vs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,Vs.jsx)("Vs",{className:"text-3xl font-bold text-primary",children:"156"}),(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Vs.jsx)(Ge,{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,Vs.jsx)($o,{});case"chat":return(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsxs)("section",{className:"text-center py-12",children:[(0,Vs.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,Vs.jsxs)("Vs",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",r.name," team members and collaborate in real-time."]})]}),(0,Vs.jsx)(Ge,{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,Vs.jsxs)("div",{className:"space-y-8",children:[(0,Vs.jsx)(Ge,{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,Vs.jsxs)("section",{className:"space-y-4",children:[(0,Vs.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Vs.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:rs.filter(x=>x.new).map(x=>(0,Vs.jsx)(is,{app:x,showProgress:!0,onOpen:s,onFavorite:d},x.name))})]}),(0,Vs.jsxs)("section",{className:"space-y-4",children:[(0,Vs.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Vs.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:rs.map(x=>(0,Vs.jsx)(is,{app:x,onOpen:s,onFavorite:d},x.name))})]})]});case"knowledge":return(0,Vs.jsx)(Wo,{});case"files":return(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsx)(Ge,{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,Vs.jsxs)("section",{className:"space-y-4",children:[(0,Vs.jsx)("div",{className:"flex items-center justify-between",children:(0,Vs.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Vs.jsx)(po,{files:bl,onFileClick:n})]})]});case"projects":return(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsx)(Ge,{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,Vs.jsxs)("section",{className:"space-y-4",children:[(0,Vs.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Vs.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:Nn.map(x=>(0,Vs.jsx)(Ui,{project:x,onOpen:c,onShare:v},x.name))})]})]});case"learn":return(0,Vs.jsxs)("div",{className:"space-y-8",children:[(0,Vs.jsx)(Ge,{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,Vs.jsxs)("section",{className:"space-y-4",children:[(0,Vs.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Vs.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:hl.slice(0,3).map(x=>(0,Vs.jsxs)("div",{className:"rounded-3xl border Vs-6",children:[(0,Vs.jsx)("h3",{className:"font-semibold mb-2",children:x.title}),(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground mb-4",children:x.description}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Vs.jsx)("span",{children:x.duration}),(0,Vs.jsx)("span",{children:x.level})]})]},x.title))})]})]});default:return null}};return(0,Vs.jsx)(Ti,{sidebarItems:xn,title:e,notifications:yn,businessUnits:t,currentBusinessUnit:r,onBusinessUnitChange:u,activeTab:a,onTabChange:o,showTabs:!0,onActionClick:g,actionIcon:(0,Vs.jsx)(ln.Bot,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:y,onRemoveAll:P,children:(0,Vs.jsx)(wa.AnimatePresence,{mode:"wait",children:(0,Vs.jsx)(wa.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 qo({initialFiles:e=[],onFileAdd:t,onFileEdit:a,onFileDelete:o,onFileClick:r,compactView:i=!1,className:s}){let[d,n]=(0,si.useState)(e),[m,c]=(0,si.useState)(""),[v,u]=(0,si.useState)("all"),[g,y]=(0,si.useState)("all"),P=Array.from(new Set(d.map(w=>w.app))),h=d.filter(w=>{let D=w.name.toLowerCase().includes(m.toLowerCase()),E=v==="all"||w.app===v;return D&&E}),x=h.slice(0,10),S=h.filter(w=>w.shared),C=()=>{console.log("Add file clicked")},A=w=>{console.log("Edit file:",w.name),a?.(w)},F=w=>{n(D=>D.filter(E=>E.name!==w.name)),o?.(w.name)},U=w=>{console.log("File clicked:",w.name),r?.(w)},se=()=>{c(""),u("all")};return(0,Vs.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Vs.jsx)(wa.AnimatePresence,{mode:"wait",children:(0,Vs.jsx)(wa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Vs.jsxs)("div",{className:`space-y-6 ${s||""}`,children:[(0,Vs.jsx)(Ge,{title:"Files",description:"Manage and organize your files and documents.",gradient:"bg-gradient-to-r from-blue-600 via-indigo-600 to-purple-600",primaryAction:{label:"Upload file",onClick:C},secondaryAction:{label:"Download all",onClick:()=>console.log("Download all clicked")}}),(0,Vs.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Vs.jsxs)(V,{children:[(0,Vs.jsxs)(Fe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Vs.jsx)(Oe,{className:"text-sm font-medium",children:"Total Files"}),(0,Vs.jsx)(ln.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Vs.jsxs)(me,{children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold",children:d.length}),(0,Vs.jsxs)("Vs",{className:"text-xs text-muted-foreground",children:[d.filter(w=>w.shared).length," shared"]})]})]}),(0,Vs.jsxs)(V,{children:[(0,Vs.jsxs)(Fe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Vs.jsx)(Oe,{className:"text-sm font-medium",children:"Storage Used"}),(0,Vs.jsx)(ln.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Vs.jsxs)(me,{children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold",children:"2.4 GB"}),(0,Vs.jsx)("Vs",{className:"text-xs text-muted-foreground",children:"of 10 GB used"})]})]}),(0,Vs.jsxs)(V,{children:[(0,Vs.jsxs)(Fe,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Vs.jsx)(Oe,{className:"text-sm font-medium",children:"Recent Activity"}),(0,Vs.jsx)(ln.File,{className:"h-4 w-4 text-muted-foreground"})]}),(0,Vs.jsxs)(me,{children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold",children:"12"}),(0,Vs.jsx)("Vs",{className:"text-xs text-muted-foreground",children:"files modified today"})]})]})]}),(0,Vs.jsx)(V,{children:(0,Vs.jsx)(me,{className:"Vs-6",children:(0,Vs.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Vs.jsx)("div",{className:"flex-1",children:(0,Vs.jsxs)("div",{className:"relative",children:[(0,Vs.jsx)(ln.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,Vs.jsx)(O,{placeholder:"Search files...",value:m,onChange:w=>c(w.target.value),className:"pl-9"})]})}),(0,Vs.jsxs)(Me,{value:v,onValueChange:u,children:[(0,Vs.jsx)(Te,{className:"w-full md:w-[180px]",children:(0,Vs.jsx)(He,{placeholder:"Filter by app"})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"all",children:"All Apps"}),P.map(w=>(0,Vs.jsx)(G,{value:w,children:w},w))]})]}),(m||v!=="all")&&(0,Vs.jsxs)(b,{variant:"outline",onClick:se,className:"gap-2",children:[(0,Vs.jsx)(ln.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,Vs.jsxs)("div",{className:"space-y-4",children:[(0,Vs.jsx)(ao,{activeTab:g,onTabChange:y,tabOptions:[{value:"all",label:`All Files (${h.length})`},{value:"recent",label:`Recent (${x.length})`},{value:"shared",label:`Shared (${S.length})`}],maxWidth:"500px",gridCols:3}),g==="all"&&(0,Vs.jsx)(po,{files:h,onFileClick:U,onFileEdit:A,onFileDelete:F,showHeader:!i}),g==="recent"&&(0,Vs.jsx)(po,{files:x,onFileClick:U,onFileEdit:A,onFileDelete:F,showHeader:!i}),g==="shared"&&(0,Vs.jsx)(po,{files:S,onFileClick:U,onFileEdit:A,onFileDelete:F,showHeader:!i})]}),h.length===0&&(0,Vs.jsx)(V,{children:(0,Vs.jsx)(me,{className:"Vs-6",children:(0,Vs.jsxs)("div",{className:"text-center py-8",children:[(0,Vs.jsx)(ln.File,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,Vs.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No files found"}),(0,Vs.jsx)("Vs",{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,Vs.jsxs)(b,{onClick:C,className:"gap-2",children:[(0,Vs.jsx)(ln.Plus,{className:"h-4 w-4"}),"Upload File"]})]})})})]})},"files-view")})})}var Pl=({title:e,status:t,taskCount:a,children:o,onDrop:r,isCompact:i=!1})=>{let s=m=>{m.preventDefault()},d=m=>{m.preventDefault(),r(t)};return(0,Vs.jsxs)(V,{className:`Vs-4 bg-card border-Vs-4 ${(()=>{switch(t){case"todo":return"border-Vs-gray-400";case"in-progress":return"border-Vs-blue-500";case"review":return"border-Vs-orange-500";case"done":return"border-Vs-green-500";default:return"border-Vs-gray-400"}})()} shadow-sm hover:shadow-md transition-shadow duration-200 ${i?"lg:max-w-xs":""}`,onDragOver:s,onDrop:d,children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Vs.jsx)("h3",{className:`font-semibold text-foreground select-none-important ${i?"text-base":"text-lg"}`,children:e}),(0,Vs.jsx)(Q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:a})]}),(0,Vs.jsx)("div",{className:"space-y-4 min-h-[200px]",children:o})]})};var Xi=({task:e,epic:t,onDragStart:a,onTaskClick:o,isCompact:r=!1})=>{let i=c=>{a(e)},s=()=>{o(e)},d=()=>{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"}},n=()=>{switch(e.type){case"story":return(0,Vs.jsx)(ln.BookOpen,{className:"h-3 w-3"});case"bug":return(0,Vs.jsx)(ln.Bug,{className:"h-3 w-3"});case"spike":return(0,Vs.jsx)(ln.Zap,{className:"h-3 w-3"});case"task":default:return(0,Vs.jsx)(ln.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,Vs.jsx)(V,{className:"Vs-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,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)("div",{className:`flex items-center gap-1 px-2 py-1 rounded-full text-xs font-medium ${m()}`,children:n()}),(0,Vs.jsx)("h4",{className:"font-medium text-foreground text-sm mb-1 line-clamp-2 select-none-important",children:e.title})]})}):(0,Vs.jsxs)(V,{className:"Vs-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,Vs.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Vs.jsxs)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-sm font-medium ${m()}`,children:[n(),(0,Vs.jsx)("span",{className:"capitalize",children:e.type})]}),(0,Vs.jsxs)("div",{className:"flex gap-1",children:[(0,Vs.jsx)("div",{className:`flex items-center gap-2 px-3 py-1 rounded-full text-xs font-medium ${d()}`,children:e.priority}),(0,Vs.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,Vs.jsx)("h4",{className:"font-semibold text-foreground mb-2 select-none-important",children:e.title}),(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground mb-3 line-clamp-2 select-none-important",children:e.description}),(0,Vs.jsx)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:(0,Vs.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Vs.jsx)(ln.User,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{children:e.assignee})]})})]})};var Ua=ce(require("react")),go=ce(require("@radix-ui/react-toggle-group"));var Rl=ce(require("react")),ls=ce(require("@radix-ui/react-toggle"));var ds=(0,on.cva)("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qc=Rl.forwardRef(({className:e,variant:t,size:a,...o},r)=>(0,Vs.jsx)(ls.Root,{ref:r,className:f(ds({variant:t,size:a,className:e})),...o}));Qc.displayName=ls.Root.displayName;var Ml=Ua.createContext({size:"default",variant:"default"}),Va=Ua.forwardRef(({className:e,variant:t,size:a,children:o,...r},i)=>(0,Vs.jsx)(go.Root,{ref:i,className:f("flex items-center justify-center gap-1",e),...r,children:(0,Vs.jsx)(Ml.Provider,{value:{variant:t,size:a},children:o})}));Va.displayName=go.Root.displayName;var Ka=Ua.forwardRef(({className:e,children:t,variant:a,size:o,...r},i)=>{let s=Ua.useContext(Ml);return(0,Vs.jsx)(go.Item,{ref:i,className:f(ds({variant:s.variant||a,size:s.size||o}),e),...r,children:t})});Ka.displayName=go.Item.displayName;var Zc=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ln.BookOpen},{value:"task",label:"Task",color:"bg-secondary/20 text-secondary-foreground",icon:ln.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ln.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ln.Zap}],em=[{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"}],Qi=({isOpen:e,onClose:t,onAddTask:a,epics:o,sprints:r,defaultEpicId:i})=>{let[s,d]=(0,si.useState)({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""});(0,si.useEffect)(()=>{e&&i&&d(c=>({...c,epicId:i}))},[e,i]),(0,si.useEffect)(()=>{e&&d({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""})},[e]);let n=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"}),d({title:"",description:"",status:"todo",priority:"medium",type:"story",points:1,epicId:"",sprintId:"none",assignee:""}),t())},m=(c,v)=>{d(u=>({...u,[c]:v}))};return(0,Vs.jsx)(wt,{open:e,onOpenChange:t,children:(0,Vs.jsxs)(ht,{className:"sm:max-w-md",children:[(0,Vs.jsx)(xt,{children:(0,Vs.jsx)(yt,{children:"Add New Task"})}),(0,Vs.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"title",children:"Task Title"}),(0,Vs.jsx)(O,{id:"title",value:s.title,onChange:c=>m("title",c.target.value),placeholder:"Enter task title",required:!0})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Vs.jsx)(ze,{id:"description",value:s.description,onChange:c=>m("description",c.target.value),placeholder:"Enter task description",rows:3})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"Type"}),(0,Vs.jsx)(Va,{type:"single",value:s.type,onValueChange:c=>c&&m("type",c),children:Zc.map(c=>{let v=c.icon;return(0,Vs.jsxs)(Ka,{value:c.value,className:"flex items-center gap-2 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:[(0,Vs.jsx)(v,{className:"h-4 w-4"}),c.label]},c.value)})})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"Priority"}),(0,Vs.jsx)(Va,{type:"single",value:s.priority,onValueChange:c=>c&&m("priority",c),children:em.map(c=>(0,Vs.jsx)(Ka,{value:c.value,className:"data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",children:c.label},c.value))})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"points",children:"Story Points"}),(0,Vs.jsx)(O,{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,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"epic",children:"Epic"}),(0,Vs.jsxs)(Me,{value:s.epicId,onValueChange:c=>m("epicId",c),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{placeholder:"Select an epic"})}),(0,Vs.jsx)(Pe,{children:o.map(c=>(0,Vs.jsx)(G,{value:c.id,children:(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.name]})},c.id))})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"sprint",children:"Sprint (Optional)"}),(0,Vs.jsxs)(Me,{value:s.sprintId,onValueChange:c=>m("sprintId",c),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{placeholder:"Select a sprint"})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"none",children:"No Sprint"}),r.map(c=>(0,Vs.jsx)(G,{value:c.id,children:(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[c.name,c.isActive&&(0,Vs.jsx)("span",{className:"text-xs bg-green-100 text-green-800 px-1 rounded",children:"Active"})]})},c.id))]})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"assignee",children:"Assignee"}),(0,Vs.jsx)(O,{id:"assignee",value:s.assignee,onChange:c=>m("assignee",c.target.value),placeholder:"Enter assignee name",required:!0})]}),(0,Vs.jsxs)(Ao,{children:[(0,Vs.jsx)(b,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Vs.jsx)(b,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Task"})]})]})]})})};var ms=({fieldName:e,value:t,label:a,multiline:o=!1,onSave:r,className:i="",disabled:s=!1})=>{let[d,n]=(0,si.useState)(!1),[m,c]=(0,si.useState)(""),v=()=>{s||(n(!0),c(t))},u=async()=>{m!==t&&await r(e,m),n(!1)},g=y=>{y.key==="Enter"&&!o||y.key==="Enter"&&y.ctrlKey&&o?u():y.key==="Escape"&&(n(!1),c(""))};return(0,Vs.jsxs)("div",{className:`space-y-2 ${i}`,children:[(0,Vs.jsx)(M,{children:a}),d?o?(0,Vs.jsx)(ze,{value:m,onChange:y=>c(y.target.value),onBlur:u,onKeyDown:g,autoFocus:!0,rows:4,className:"resize-none"}):(0,Vs.jsx)(O,{value:m,onChange:y=>c(y.target.value),onBlur:u,onKeyPress:g,autoFocus:!0,className:"text-lg font-medium"}):(0,Vs.jsxs)("div",{onClick:v,className:`${s?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted/50 Vs-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,Vs.jsx)("span",{className:o?"text-sm text-muted-foreground":"text-lg font-medium text-foreground",children:t||"Click to edit..."}),!s&&(0,Vs.jsx)(ln.Edit,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity"})]})]})};var Fl=({comments:e,onAddComment:t})=>{let[a,o]=(0,si.useState)(""),r=s=>s.split(" ").map(d=>d[0]).join("").toUpperCase(),i=()=>{a.trim()&&(t(a),o(""))};return(0,Vs.jsxs)("div",{className:"space-y-4",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)(ln.MessageSquare,{className:"h-5 w-5"}),(0,Vs.jsx)(M,{className:"text-lg font-medium",children:"Comments"}),(0,Vs.jsx)(Q,{variant:"secondary",children:e.length})]}),(0,Vs.jsx)("div",{className:"space-y-4 max-h-60 overflow-y-auto",children:e.map(s=>(0,Vs.jsxs)("div",{className:"flex gap-3 Vs-3 bg-muted/50 rounded-lg",children:[(0,Vs.jsx)(Mt,{className:"h-8 w-8 ln-1",children:(0,Vs.jsx)(Et,{className:"text-xs bg-muted text-muted-foreground",children:r(s.author)})}),(0,Vs.jsxs)("div",{className:"flex-1",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,Vs.jsx)("span",{className:"font-medium text-sm",children:s.author}),(0,Vs.jsxs)("span",{className:"text-xs text-muted-foreground",children:[s.createdAt.toLocaleDateString()," at ",s.createdAt.toLocaleTimeString()]})]}),(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground",children:s.text})]})]},s.id))}),(0,Vs.jsxs)("div",{className:"flex gap-2",children:[(0,Vs.jsx)(ze,{value:a,onChange:s=>o(s.target.value),placeholder:"Add a comment...",rows:2,className:"flex-1 resize-none"}),(0,Vs.jsx)(b,{onClick:i,disabled:!a.trim(),size:"sm",className:"self-end",children:(0,Vs.jsx)(ln.Send,{className:"h-4 w-4"})})]})]})};var er=({label:e,value:t,onValueChange:a,options:o,showColor:r=!1,disabled:i=!1})=>{let[s,d]=(0,si.useState)(!1),n=o.find(c=>c.value===t);return(0,Vs.jsxs)("div",{className:"space-y-1",children:[(0,Vs.jsx)(M,{className:"text-xs text-muted-foreground",children:e}),(0,Vs.jsxs)(Me,{value:t,onValueChange:a,open:s,onOpenChange:c=>{i||d(c)},disabled:i,children:[(0,Vs.jsx)(Te,{className:"h-auto Vs-0 border-none bg-transparent hover:bg-muted/50 rounded-md",children:(0,Vs.jsxs)(Q,{variant:"secondary",className:`${i?"cursor-not-allowed opacity-50":"cursor-pointer"} hover:bg-muted transition-colors`,onClick:()=>!i&&d(!s),children:[r&&n?.color&&(0,Vs.jsx)("div",{className:`w-2 h-2 rounded-full ${n.color} mr-1`}),n?.label||"Select..."]})}),(0,Vs.jsx)(Pe,{children:o.map(c=>(0,Vs.jsx)(G,{value:c.value,children:r&&c.color?(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)("div",{className:`w-3 h-3 rounded-full ${c.color}`}),c.label]}):c.label},c.value))})]})]})};var tm=[{value:"story",label:"Story",color:"bg-primary/20 text-primary",icon:ln.BookOpen},{value:"task",label:"Task",color:"bg-muted text-muted-foreground",icon:ln.AlertCircle},{value:"bug",label:"Bug",color:"bg-destructive/20 text-destructive",icon:ln.Bug},{value:"spike",label:"Spike",color:"bg-accent/20 text-accent",icon:ln.Zap}],am=[{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"}],om=[{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"}],jl=({task:e,epics:t,sprints:a,lastUpdated:o,onUpdateTask:r,onClose:i,onDelete:s,isUpdating:d=!1,isDeleting:n=!1,deleteState:m="idle"})=>{let c=u=>u.split(" ").map(g=>g[0]).join("").toUpperCase(),v=()=>m==="loading"?(0,Vs.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Vs.jsx)(ln.Loader2,{className:"h-3 w-3 animate-spin"}),"Deleting..."]}):m==="success"?(0,Vs.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Vs.jsx)(ln.Check,{className:"h-3 w-3"}),"Deleted"]}):m==="error"?(0,Vs.jsxs)(b,{disabled:!0,variant:"destructive",className:"w-full h-8 text-xs gap-1",children:[(0,Vs.jsx)(ln.Vs,{className:"h-3 w-3"}),"Delete failed"]}):(0,Vs.jsxs)(b,{onClick:s,variant:"destructive",className:"w-full h-8 text-xs gap-1",disabled:d||n,children:[(0,Vs.jsx)(ln.Trash2,{className:"h-3 w-3"}),"Delete Task"]});return(0,Vs.jsxs)("div",{className:"flex flex-col h-full",children:[(0,Vs.jsxs)("div",{className:"space-y-4",style:{opacity:d?.6:1},children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{className:"text-xs text-muted-foreground",children:"Status"}),(0,Vs.jsx)(er,{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:d})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{className:"text-xs text-muted-foreground",children:"Type"}),(0,Vs.jsx)(Va,{type:"single",value:e.type,onValueChange:u=>u&&r("type",u),className:"grid grid-cols-2 gap-1",disabled:d,children:tm.map(u=>{let g=u.icon;return(0,Vs.jsxs)(Ka,{value:u.value,className:"flex items-center gap-1 text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:d,children:[(0,Vs.jsx)(g,{className:"h-3 w-3"}),u.label]},u.value)})})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{className:"text-xs text-muted-foreground",children:"Priority"}),(0,Vs.jsx)(Va,{type:"single",value:e.priority,onValueChange:u=>u&&r("priority",u),className:"grid grid-cols-3 gap-1",disabled:d,children:am.map(u=>(0,Vs.jsx)(Ka,{value:u.value,className:"text-xs h-8 data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",size:"sm",disabled:d,children:u.label},u.value))})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{className:"text-xs text-muted-foreground",children:"Story Points"}),(0,Vs.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:d})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{className:"text-xs text-muted-foreground",children:"Epic"}),(0,Vs.jsx)(er,{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:d})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{className:"text-xs text-muted-foreground",children:"Sprint"}),(0,Vs.jsx)(er,{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:d})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{className:"text-xs text-muted-foreground",children:"Assignee"}),(0,Vs.jsx)(Li,{label:"",value:e.assignee,onValueChange:u=>r("assignee",u),options:om,placeholder:"Search team members...",allowCustomValue:!0,disabled:d})]})]}),(0,Vs.jsxs)("div",{className:"ln-auto Vs-4 space-y-4",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(b,{onClick:i,variant:"outline",className:"w-full h-8 text-xs",disabled:d||n,children:"Close"}),v()]}),(0,Vs.jsxs)("div",{className:"Vs-4 border-t border-border space-y-2",children:[(0,Vs.jsx)("div",{className:"text-xs text-muted-foreground font-medium mb-2",children:"Information"}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)("span",{className:"text-xs text-muted-foreground",children:"Logged By"}),(0,Vs.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Vs.jsx)(ln.User,{className:"h-3 w-3"}),(0,Vs.jsx)("span",{children:"System"})]})]}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)("span",{className:"text-xs text-muted-foreground",children:"Created"}),(0,Vs.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Vs.jsx)(ln.Calendar,{className:"h-3 w-3"}),(0,Vs.jsx)("span",{children:e.createdAt.toLocaleDateString()})]})]}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)("span",{className:"text-xs text-muted-foreground",children:"Last Updated"}),(0,Vs.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[(0,Vs.jsx)(ln.Clock,{className:"h-3 w-3"}),(0,Vs.jsxs)("span",{children:[o.toLocaleDateString()," at ",o.toLocaleTimeString()]})]})]})]})]})]})};var tr=({isOpen:e,onClose:t,task:a,epics:o,sprints:r,onUpdateTask:i,onDeleteTask:s})=>{let[d,n]=(0,si.useState)(new Date),[m,c]=(0,si.useState)("idle"),[v,u]=(0,si.useState)("idle"),[g,y]=(0,si.useState)([{id:"1",text:"Initial task created and assigned.",author:"System",createdAt:a.createdAt},{id:"2",text:"Started working on the implementation.",author:a.assignee,createdAt:new Date(a.createdAt.getTime()+864e5)}]),P=async(U,se)=>{if(se!==a[U]){c("loading");try{await i(a.id,{[U]:se}),n(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},h=async(U,se)=>{if(se!==a[U]){c("loading");try{await i(a.id,{[U]:se}),n(new Date),c("success"),setTimeout(()=>c("idle"),1500)}catch{c("error"),setTimeout(()=>c("idle"),3e3)}}},x=U=>{let se={id:Date.now().toString(),text:U,author:"Current User",createdAt:new Date};y([...g,se])},S=async()=>{u("loading");try{await s(a.id),u("success"),setTimeout(()=>{t(),u("idle")},1e3)}catch{u("error"),setTimeout(()=>u("idle"),3e3)}},C=m!=="loading"&&v!=="loading",A=()=>{C&&t()},F=()=>m==="loading"?(0,Vs.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,Vs.jsx)(ln.Loader2,{className:"h-4 w-4 animate-spin"}),(0,Vs.jsx)("span",{children:"Updating..."})]}):m==="success"?(0,Vs.jsxs)("div",{className:"flex items-center gap-2 text-sm text-success",children:[(0,Vs.jsx)(ln.Check,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{children:"Updated successfully"})]}):m==="error"?(0,Vs.jsxs)("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[(0,Vs.jsx)(ln.Vs,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{children:"Update failed"})]}):null;return(0,Vs.jsx)(wt,{open:e,onOpenChange:A,children:(0,Vs.jsxs)(ht,{className:"max-w-3xl max-h-[80vh] overflow-y-auto Vs-4",children:[(0,Vs.jsxs)(xt,{children:[(0,Vs.jsx)(yt,{className:"ln-only",children:a.title}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)("div",{className:"flex-1",children:F()}),!C&&(0,Vs.jsx)("div",{className:"text-xs text-muted-foreground",children:"Please wait..."})]})]}),(0,Vs.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-4",children:[(0,Vs.jsxs)("div",{className:"lg:col-span-2 space-y-4",children:[(0,Vs.jsx)(ms,{fieldName:"title",value:a.title,label:"",onSave:P,className:"border-b border-border pb-3",disabled:m==="loading"}),(0,Vs.jsx)(ms,{fieldName:"description",value:a.description,label:"Description",multiline:!0,onSave:P,disabled:m==="loading"}),(0,Vs.jsx)(Fl,{comments:g,onAddComment:x})]}),(0,Vs.jsx)(jl,{task:a,epics:o,sprints:r,lastUpdated:d,onUpdateTask:h,onClose:A,onDelete:S,isUpdating:m==="loading",isDeleting:v==="loading",deleteState:v})]})]})})};var ar=({isOpen:e,onClose:t,onAddEpic:a})=>{let[o,r]=(0,si.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"}],d=[{value:1,label:"Planning"},{value:2,label:"Development"},{value:3,label:"Testing"},{value:4,label:"Done"}],n=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,Vs.jsx)(wt,{open:e,onOpenChange:t,children:(0,Vs.jsxs)(ht,{className:"sm:max-w-md",children:[(0,Vs.jsx)(xt,{children:(0,Vs.jsx)(yt,{children:"Add New Epic"})}),(0,Vs.jsxs)("form",{onSubmit:n,className:"space-y-4",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"name",children:"Epic Name"}),(0,Vs.jsx)(O,{id:"name",value:o.name,onChange:c=>m("name",c.target.value),placeholder:"Enter epic name",required:!0})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Vs.jsx)(ze,{id:"description",value:o.description,onChange:c=>m("description",c.target.value),placeholder:"Enter epic description (optional)",rows:3})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"Color"}),(0,Vs.jsx)("div",{className:"flex gap-2 flex-wrap",children:i.map(c=>(0,Vs.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,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"Confidence"}),(0,Vs.jsxs)(Me,{value:o.confidence,onValueChange:c=>m("confidence",c),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{})}),(0,Vs.jsx)(Pe,{children:s.map(c=>(0,Vs.jsx)(G,{value:c.value,children:c.label},c.value))})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"Phase"}),(0,Vs.jsxs)(Me,{value:o.phase.toString(),onValueChange:c=>m("phase",parseInt(c)),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{})}),(0,Vs.jsx)(Pe,{children:d.map(c=>(0,Vs.jsx)(G,{value:c.value.toString(),children:c.label},c.value))})]})]})]}),(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"Start Date"}),(0,Vs.jsx)(O,{type:"date",value:o.startDate,onChange:c=>m("startDate",c.target.value)})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"End Date"}),(0,Vs.jsx)(O,{type:"date",value:o.endDate,onChange:c=>m("endDate",c.target.value)})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"Progress (%)"}),(0,Vs.jsx)(O,{type:"number",min:"0",max:"100",value:o.progress,onChange:c=>m("progress",parseInt(c.target.value)||0)})]}),(0,Vs.jsxs)(Ao,{children:[(0,Vs.jsx)(b,{type:"button",variant:"outline",onClick:t,children:"Cancel"}),(0,Vs.jsx)(b,{type:"submit",className:"bg-blue-600 hover:bg-blue-700",children:"Add Epic"})]})]})]})})};var zl=({initialTasks:e=[],initialEpics:t=[],initialSprints:a=[],initialProjects:o=[],onAddTask:r,onUpdateTask:i,onDeleteTask:s,onTaskClick:d,onAddEpic:n})=>{let[m,c]=(0,si.useState)(e),[v,u]=(0,si.useState)(t),[g,y]=(0,si.useState)(a),[P,h]=(0,si.useState)(!1),[x,S]=(0,si.useState)(!1),[C,A]=(0,si.useState)(null),[F,U]=(0,si.useState)(null),se=v.filter(H=>H.isSelected).map(H=>H.id),w=g.find(H=>H.isSelected),D=m.filter(H=>{let ne=se.includes(H.epicId);return!w||w.id==="all-tasks"?ne:w.id==="backlog"?ne&&!H.sprintId:ne&&H.sprintId===w.id}),E=H=>D.filter(ne=>ne.status===H),ve=H=>{let ne={};return v.forEach(Re=>{ne[Re.id]=H.filter(bt=>bt.epicId===Re.id)}),ne},j=H=>{U(H)},R=H=>{F&&(c(ne=>ne.map(Re=>Re.id===F.id?{...Re,status:H}:Re)),i?.(F.id,{status:H}),U(null))},N=H=>{let ne={...H,id:Date.now().toString(),createdAt:new Date};c(Re=>[...Re,ne]),r?.(H)},ie=async(H,ne)=>{c(Re=>Re.map(bt=>bt.id===H?{...bt,...ne}:bt)),i&&await i(H,ne)},ke=async H=>{c(ne=>ne.filter(Re=>Re.id!==H)),C?.id===H&&A(null),s&&await s(H)},tt=H=>{let ne={...H,id:Date.now().toString(),isSelected:!0};u(Re=>[...Re,ne]),n?.(H)},Ee=H=>{A(H),d?.(H)};return(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsx)(Ge,{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:()=>S(!0)}}),(0,Vs.jsx)("div",{className:"flex-1",children:(0,Vs.jsxs)("div",{className:"w-full",children:[(0,Vs.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(H=>{let ne=E(H.status),Re=ve(ne);return(0,Vs.jsx)(Pl,{title:H.title,status:H.status,taskCount:ne.length,onDrop:R,isCompact:H.status==="done",children:se.map(bt=>{let jt=v.find(Ze=>Ze.id===bt),I=Re[bt]||[];return I.length===0?null:(0,Vs.jsxs)("div",{className:"mb-6",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,Vs.jsx)("div",{className:`w-3 h-3 rounded-full ${jt?.color}`}),(0,Vs.jsx)("span",{className:"text-sm font-medium text-muted-foreground select-none-important",children:jt?.name}),(0,Vs.jsx)(Q,{variant:"secondary",className:"text-xs",children:I.length})]})," ",(0,Vs.jsx)("div",{className:"space-y-3",children:I.map(Ze=>(0,Vs.jsx)(Xi,{task:Ze,epic:jt,onDragStart:j,onTaskClick:Ee,isCompact:H.status==="done"},Ze.id))})]},bt)})},H.id)})}),(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsx)(Qi,{isOpen:P,onClose:()=>h(!1),onAddTask:N,epics:v,sprints:g}),(0,Vs.jsx)(ar,{isOpen:x,onClose:()=>S(!1),onAddEpic:tt}),C&&(0,Vs.jsx)(tr,{isOpen:!!C,onClose:()=>A(null),task:C,epics:v,sprints:g,onUpdateTask:ie,onDeleteTask:ke})]})]})})]})};var Hl=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddTaskToEpic:i,onAddEpic:s,onUpdateEpic:d,onDeleteEpic:n})=>{let[m,c]=(0,si.useState)(null),[v,u]=(0,si.useState)(null),[g,y]=(0,si.useState)({}),P=D=>{c(D)},h=D=>{D.preventDefault()},x=(D,E)=>{D.preventDefault(),m&&m.epicId!==E&&(o(m.id,{epicId:E}),c(null))},S=D=>e.filter(E=>E.epicId===D),C=D=>{u(D.id),y({name:D.name,description:D.description,confidence:D.confidence,phase:D.phase,progress:D.progress})},A=()=>{v&&g.name&&(d(v,g),u(null),y({}))},F=()=>{u(null),y({})},U=D=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&n(D)},se=D=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[D]||`Phase ${D}`,w=D=>{switch(D){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,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsx)(Ge,{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,Vs.jsx)("div",{className:"flex-1",children:(0,Vs.jsx)("div",{className:"w-full",children:(0,Vs.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6",children:t.map(D=>{let E=S(D.id),ve=E.reduce((j,R)=>j+R.points,0);return(0,Vs.jsxs)(V,{className:`flex flex-col ${v===D.id?"h-auto":"h-[600px]"} bg-card shadow-sm`,onDragOver:h,onDrop:j=>x(j,D.id),children:[(0,Vs.jsx)("div",{className:"Vs-4 border-b border-border",children:v===D.id?(0,Vs.jsxs)("div",{className:"space-y-4",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Vs.jsx)(O,{value:g.name||"",onChange:j=>y({...g,name:j.target.value}),placeholder:"Epic name",className:"font-semibold"}),(0,Vs.jsxs)("div",{className:"flex gap-2 wa-2",children:[(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:A,className:"Vs-1 h-8 w-8",children:(0,Vs.jsx)(ln.Check,{className:"h-4 w-4"})}),(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:F,className:"Vs-1 h-8 w-8",children:(0,Vs.jsx)(ln.Vs,{className:"h-4 w-4"})})]})]}),(0,Vs.jsx)(ze,{value:g.description||"",onChange:j=>y({...g,description:j.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),(0,Vs.jsxs)(Me,{value:g.confidence||D.confidence,onValueChange:j=>y({...g,confidence:j}),children:[(0,Vs.jsx)(Te,{className:"text-xs",children:(0,Vs.jsx)(He,{})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"low",children:"Low"}),(0,Vs.jsx)(G,{value:"medium",children:"Medium"}),(0,Vs.jsx)(G,{value:"high",children:"High"})]})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("label",{className:"text-xs text-muted-foreground",children:"Phase"}),(0,Vs.jsxs)(Me,{value:g.phase?.toString()||D.phase.toString(),onValueChange:j=>y({...g,phase:parseInt(j)}),children:[(0,Vs.jsx)(Te,{className:"text-xs",children:(0,Vs.jsx)(He,{})}),(0,Vs.jsx)(Pe,{children:[1,2,3,4,5,6,7,8,9].map(j=>(0,Vs.jsxs)(G,{value:j.toString(),children:["Phase ",j]},j))})]})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("label",{className:"text-xs text-muted-foreground",children:"Progress (%)"}),(0,Vs.jsx)(O,{type:"number",min:"0",max:"100",value:g.progress||D.progress,onChange:j=>y({...g,progress:parseInt(j.target.value)||0}),className:"text-xs"})]})]}):(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,Vs.jsx)("div",{className:`w-4 h-4 rounded-full ${D.color}`}),(0,Vs.jsx)("h3",{className:"font-semibold text-foreground select-none flex-1",children:D.name}),(0,Vs.jsxs)("div",{className:"flex gap-1",children:[(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>C(D),className:"Vs-1 h-8 w-8",children:(0,Vs.jsx)(ln.Edit2,{className:"h-3 w-3"})}),(0,Vs.jsx)(b,{size:"sm",variant:"ghost",onClick:()=>U(D.id),className:"Vs-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:(0,Vs.jsx)(ln.Trash2,{className:"h-3 w-3"})})]})]}),(0,Vs.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3",children:[(0,Vs.jsxs)(Q,{className:`text-xs ${w(D.confidence)}`,children:[D.confidence," confidence"]}),(0,Vs.jsxs)(Q,{variant:"outline",className:"text-xs",children:["Phase ",D.phase]}),(0,Vs.jsxs)(Q,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[E.length," tasks"]}),(0,Vs.jsxs)(Q,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[ve," pts"]})]}),D.description&&(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground mb-3 select-none",children:D.description}),(0,Vs.jsxs)("div",{className:"mb-3",children:[(0,Vs.jsxs)("div",{className:"flex justify-between text-xs text-muted-foreground mb-1",children:[(0,Vs.jsx)("span",{className:"select-none",children:"Progress"}),(0,Vs.jsxs)("span",{className:"select-none",children:[D.progress,"%"]})]}),(0,Vs.jsx)("div",{className:"w-full bg-muted rounded-full h-2",children:(0,Vs.jsx)("div",{className:"bg-primary h-2 rounded-full transition-all duration-300",style:{width:`${D.progress}%`}})})]}),(0,Vs.jsxs)(b,{onClick:()=>i(D.id),variant:"outline",size:"sm",className:"w-full gap-2",children:[(0,Vs.jsx)(ln.Plus,{className:"h-4 w-4"}),"Add Task"]})]})}),(0,Vs.jsx)("div",{className:"flex-1 Vs-4 overflow-y-auto",children:(0,Vs.jsx)("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded Vs-3 transition-colors ${m?"border-primary bg-primary/10":"border-border"}`,children:E.length===0?(0,Vs.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,Vs.jsx)(ln.Move,{className:"h-8 w-8 mb-2"}),(0,Vs.jsx)("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):E.map(j=>(0,Vs.jsx)(Xi,{task:j,epic:D,onDragStart:P,onTaskClick:r,isCompact:!0},j.id))})})]},D.id)})})})})]})};var Ul=require("react-day-picker");function ir({className:e,classNames:t,showOutsideDays:a=!0,...o}){return(0,Vs.jsx)(Ul.DayPicker,{showOutsideDays:a,weekStartsOn:1,className:f("Vs-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 Vs-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:f(ni({variant:"outline"}),"h-7 w-7 bg-transparent Vs-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 ln-2",cell:f("relative Vs-0 text-center text-sm focus-within:relative focus-within:Vs-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-Vs-md first:[&:has([aria-selected])]:rounded-Vs-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md"),day:f(ni({variant:"ghost"}),"h-8 w-8 Vs-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})}ir.displayName="Calendar";var Kl=ce(require("react")),oa=ce(require("@radix-ui/react-popover"));var us=oa.Root,gs=oa.Trigger;var rr=Kl.forwardRef(({className:e,align:t="center",sideOffset:a=4,...o},r)=>(0,Vs.jsx)(oa.Portal,{children:(0,Vs.jsx)(oa.Content,{ref:r,align:t,sideOffset:a,className:f("Vs-50 w-72 rounded-md border bg-popover Vs-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})}));rr.displayName=oa.Content.displayName;var vs=require("date-fns");var _l=({isOpen:e,onClose:t,onAddSprint:a})=>{let[o,r]=(0,si.useState)({name:"",description:"",startDate:void 0,endDate:void 0,isActive:!1}),i=d=>{d.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,Vs.jsx)(wt,{open:e,onOpenChange:s,children:(0,Vs.jsxs)(ht,{className:"sm:max-w-md",children:[(0,Vs.jsx)(xt,{children:(0,Vs.jsx)(yt,{children:"Add New Sprint"})}),(0,Vs.jsxs)("form",{onSubmit:i,className:"space-y-4",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"name",children:"Sprint Name *"}),(0,Vs.jsx)(O,{id:"name",value:o.name,onChange:d=>r(n=>({...n,name:d.target.value})),placeholder:"e.g., Sprint 3",required:!0})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Vs.jsx)(ze,{id:"description",value:o.description,onChange:d=>r(n=>({...n,description:d.target.value})),placeholder:"Brief description of sprint goals",rows:3})]}),(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"Start Date *"}),(0,Vs.jsxs)(us,{children:[(0,Vs.jsx)(gs,{asChild:!0,children:(0,Vs.jsxs)(b,{variant:"outline",className:f("w-full justify-start text-left font-normal",!o.startDate&&"text-muted-foreground"),children:[(0,Vs.jsx)(ln.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.startDate?(0,vs.format)(o.startDate,"PPP"):"Pick a date"]})}),(0,Vs.jsx)(rr,{className:"w-auto Vs-0",align:"start",children:(0,Vs.jsx)(ir,{mode:"single",selected:o.startDate,onSelect:d=>r(n=>({...n,startDate:d})),initialFocus:!0})})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{children:"End Date *"}),(0,Vs.jsxs)(us,{children:[(0,Vs.jsx)(gs,{asChild:!0,children:(0,Vs.jsxs)(b,{variant:"outline",className:f("w-full justify-start text-left font-normal",!o.endDate&&"text-muted-foreground"),children:[(0,Vs.jsx)(ln.CalendarIcon,{className:"mr-2 h-4 w-4"}),o.endDate?(0,vs.format)(o.endDate,"PPP"):"Pick a date"]})}),(0,Vs.jsx)(rr,{className:"w-auto Vs-0",align:"start",children:(0,Vs.jsx)(ir,{mode:"single",selected:o.endDate,onSelect:d=>r(n=>({...n,endDate:d})),initialFocus:!0,disabled:d=>o.startDate?d<o.startDate:!1})})]})]})]}),(0,Vs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Vs.jsx)("input",{type:"checkbox",id:"isActive",checked:o.isActive,onChange:d=>r(n=>({...n,isActive:d.target.checked})),className:"rounded border-gray-300"}),(0,Vs.jsx)(M,{htmlFor:"isActive",children:"Set si active sprint"})]}),(0,Vs.jsxs)("div",{className:"flex justify-end gap-3 Vs-4",children:[(0,Vs.jsx)(b,{type:"button",variant:"outline",onClick:s,children:"Cancel"}),(0,Vs.jsx)(b,{type:"submit",disabled:!o.name||!o.startDate||!o.endDate,children:"Add Sprint"})]})]})]})})};var $Vs=({tasks:e,epics:t,sprints:a,onUpdateTask:o,onTaskClick:r,onAddSprint:i})=>{let[s,d]=(0,si.useState)(["2"]),[n,m]=(0,si.useState)(null),[c,v]=(0,si.useState)(!1),[u,g]=(0,si.useState)(null),y=e.filter(R=>!R.sprintId),P=e.filter(R=>R.sprintId&&s.includes(R.sprintId)),h=[...a].filter(R=>R.id!=="backlog"&&R.id!=="all-tasks").sort((R,N)=>R.startDate.getTime()-N.startDate.getTime()),x=R=>t.find(N=>N.id===R),S=R=>a.find(N=>N.id===R),C=R=>{switch(R){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"}},A=R=>R.split(" ").map(N=>N[0]).join("").toUpperCase(),F=R=>{m(R)},U=R=>{R.preventDefault()},se=R=>{g(R)},w=()=>{g(null)},D=(R,N)=>{R.preventDefault(),g(null),n&&(o(n.id,{sprintId:N==="backlog"?void 0:N}),m(null))},E=R=>{R==="backlog"||R==="all-tasks"||d(N=>N.includes(R)?N.filter(ie=>ie!==R):[...N,R])},ve=R=>{i(R),v(!1)},j=({task:R,showSprint:N=!1})=>{let ie=x(R.epicId),ke=R.sprintId?S(R.sprintId):null,[tt,Ee]=(0,si.useState)(!1),at=Re=>{Re.defaultPrevented||tt||r(R)},H=Re=>{Ee(!0),F(R)},ne=()=>{Ee(!1)};return(0,Vs.jsx)(V,{className:`Vs-3 cursor-grab transition-all duration-200 hover:shadow-md bg-card border-border hover:border-border/80 active:cursor-grabbing ${tt?"opacity-50 shadow-lg scale-105":""} ${n?.id===R.id?"ring-2 ring-primary":""}`,draggable:!0,onDragStart:H,onDragEnd:ne,onClick:at,children:(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Vs.jsx)("h4",{className:"font-medium text-sm text-foreground line-clamp-1 select-none pointer-events-none",children:R.title}),(0,Vs.jsx)(Q,{className:`text-xs select-none pointer-events-none ${C(R.priority)}`,children:R.priority[0].toUpperCase()})]}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-xs pointer-events-none",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-1",children:[ie&&(0,Vs.jsx)("div",{className:`w-2 h-2 rounded-full ${ie.color}`}),(0,Vs.jsx)("span",{className:"text-muted-foreground truncate select-none",children:ie?.name})]}),(0,Vs.jsx)("span",{className:"text-muted-foreground select-none",children:A(R.assignee)})]}),N&&ke&&(0,Vs.jsxs)("div",{className:"flex items-center gap-1 text-xs text-muted-foreground pointer-events-none",children:[(0,Vs.jsx)(ln.Calendar,{className:"h-3 w-3"}),(0,Vs.jsx)("span",{className:"select-none",children:ke.name})]})]})})};return(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsx)(Ge,{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,Vs.jsx)("div",{className:"flex-1",children:(0,Vs.jsxs)("div",{className:"w-full",children:[(0,Vs.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-4 gap-6 h-full",children:[(0,Vs.jsx)("div",{className:"lg:col-span-1",children:(0,Vs.jsxs)(V,{className:"Vs-4 h-full bg-card shadow-sm",onDragOver:U,onDragEnter:()=>se("backlog"),onDragLeave:w,onDrop:R=>D(R,"backlog"),children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Vs.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Backlog"}),(0,Vs.jsx)(Q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:y.length})]}),(0,Vs.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[600px] min-h-[200px] border-2 border-dashed rounded Vs-3 transition-colors ${u==="backlog"?"border-primary bg-primary/10":"border-border"}`,children:[y.map(R=>(0,Vs.jsx)(j,{task:R},R.id)),y.length===0&&(0,Vs.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,Vs.jsx)("div",{className:"lg:col-span-3",children:(0,Vs.jsxs)("div",{className:"space-y-4",children:[(0,Vs.jsxs)(V,{className:"Vs-4 bg-card shadow-sm",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Vs.jsx)("h3",{className:"font-semibold text-foreground select-none",children:"Select Sprints to View"}),(0,Vs.jsxs)(b,{onClick:()=>v(!0),className:"bg-primary hover:bg-primary/90 text-primary-foreground gap-2",size:"sm",children:[(0,Vs.jsx)(ln.Plus,{className:"h-4 w-4"}),"Add Sprint"]})]}),(0,Vs.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-2",children:h.map(R=>(0,Vs.jsxs)(b,{variant:s.includes(R.id)?"default":"outline",size:"sm",onClick:()=>E(R.id),className:"text-xs h-8",children:[R.name,R.isActive&&(0,Vs.jsx)("span",{className:"wa-1 text-success",children:"\u25CF"})]},R.id))})]}),(0,Vs.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:s.map(R=>h.find(N=>N.id===R)).filter(Boolean).sort((R,N)=>R.startDate.getTime()-N.startDate.getTime()).map(R=>{let N=P.filter(ie=>ie.sprintId===R.id);return(0,Vs.jsxs)(V,{className:"Vs-4 bg-card shadow-sm",onDragOver:U,onDragEnter:()=>se(R.id),onDragLeave:w,onDrop:ie=>D(ie,R.id),children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("h3",{className:"font-semibold text-foreground select-none",children:R.name}),R.isActive&&(0,Vs.jsx)("span",{className:"text-xs text-success font-medium select-none",children:"Active Sprint"})]}),(0,Vs.jsx)(Q,{variant:"secondary",className:"bg-muted text-muted-foreground",children:N.length})]}),(0,Vs.jsxs)("div",{className:`space-y-3 overflow-y-auto max-h-[500px] min-h-[200px] border-2 border-dashed rounded Vs-3 transition-colors ${u===R.id?"border-primary bg-primary/10":"border-border"}`,children:[N.map(ie=>(0,Vs.jsx)(j,{task:ie},ie.id)),N.length===0&&(0,Vs.jsx)("div",{className:"flex items-center justify-center h-32 text-muted-foreground text-sm select-none",children:"Drop tasks here"})]})]},R.id)})})," "]})})]}),(0,Vs.jsx)(_l,{isOpen:c,onClose:()=>v(!1),onAddSprint:ve})]})})]})};var im=e=>{switch(e){case"high":return"\u{1F534}";case"medium":return"\u{1F7E1}";case"low":return"\u{1F7E2}";default:return"\u26AA"}},rm=e=>e.toLocaleDateString("en-US",{weekday:"short",year:"numeric",month:"short",day:"numeric"}),sm=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})},bs=(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},hs=e=>{let t=new Date;return e.toDateString()===t.toDateString()},nm=e=>{let t=new Date;return t.setDate(t.getDate()+1),e.toDateString()===t.toDateString()},lm=({colleagues:e,onAddReminder:t,trigger:a})=>{let[o,r]=(0,si.useState)(!1),[i,s]=(0,si.useState)({title:"",description:"",dueDate:"",dueTime:"",colleagueId:"",priority:"medium",isRecurring:!1,recurrencePattern:"weekly",recurrenceInterval:1,reminderEnabled:!0,reminderMinutes:15,tags:""});return(0,Vs.jsxs)(wt,{open:o,onOpenChange:r,children:[(0,Vs.jsx)(gn,{asChild:!0,children:a}),(0,Vs.jsxs)(ht,{className:"max-w-2xl",children:[(0,Vs.jsx)(xt,{children:(0,Vs.jsx)(yt,{children:"Add New Reminder"})}),(0,Vs.jsxs)("form",{onSubmit:n=>{n.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,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"title",children:"Title"}),(0,Vs.jsx)(O,{id:"title",value:i.title,onChange:n=>s({...i,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"priority",children:"Priority"}),(0,Vs.jsxs)(Me,{value:i.priority,onValueChange:n=>s({...i,priority:n}),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"low",children:"\u{1F7E2} Low"}),(0,Vs.jsx)(G,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Vs.jsx)(G,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"description",children:"Description"}),(0,Vs.jsx)(ze,{id:"description",value:i.description,onChange:n=>s({...i,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"dueDate",children:"Due Date"}),(0,Vs.jsx)(O,{id:"dueDate",type:"date",value:i.dueDate,onChange:n=>s({...i,dueDate:n.target.value}),required:!0})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"dueTime",children:"Due Time (optional)"}),(0,Vs.jsx)(O,{id:"dueTime",type:"time",value:i.dueTime,onChange:n=>s({...i,dueTime:n.target.value})})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"colleague",children:"Assigned Colleague"}),(0,Vs.jsxs)(Me,{value:i.colleagueId,onValueChange:n=>s({...i,colleagueId:n}),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{placeholder:"Select a digital colleague"})}),(0,Vs.jsx)(Pe,{children:e.map(n=>(0,Vs.jsx)(G,{value:n.id,children:n.name},n.id))})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Vs.jsx)("input",{type:"checkbox",id:"isRecurring",checked:i.isRecurring,onChange:n=>s({...i,isRecurring:n.target.checked}),className:"rounded border-border"}),(0,Vs.jsx)(M,{htmlFor:"isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"recurrencePattern",children:"Frequency"}),(0,Vs.jsxs)(Me,{value:i.recurrencePattern,onValueChange:n=>s({...i,recurrencePattern:n}),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"daily",children:"Daily"}),(0,Vs.jsx)(G,{value:"weekly",children:"Weekly"}),(0,Vs.jsx)(G,{value:"monthly",children:"Monthly"}),(0,Vs.jsx)(G,{value:"yearly",children:"Yearly"})]})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"recurrenceInterval",children:"Every"}),(0,Vs.jsx)(O,{id:"recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:n=>s({...i,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Vs.jsx)("input",{type:"checkbox",id:"reminderEnabled",checked:i.reminderEnabled,onChange:n=>s({...i,reminderEnabled:n.target.checked}),className:"rounded border-border"}),(0,Vs.jsx)(M,{htmlFor:"reminderEnabled",children:"Enable reminder notifications"})]}),i.reminderEnabled&&(0,Vs.jsxs)("div",{className:"pl-6",children:[(0,Vs.jsx)(M,{htmlFor:"reminderMinutes",children:"Remind me"}),(0,Vs.jsxs)(Me,{value:i.reminderMinutes.toString(),onValueChange:n=>s({...i,reminderMinutes:parseInt(n)}),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"5",children:"5 minutes before"}),(0,Vs.jsx)(G,{value:"15",children:"15 minutes before"}),(0,Vs.jsx)(G,{value:"30",children:"30 minutes before"}),(0,Vs.jsx)(G,{value:"60",children:"1 hour before"}),(0,Vs.jsx)(G,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"tags",children:"Tags (comma-separated)"}),(0,Vs.jsx)(O,{id:"tags",value:i.tags,onChange:n=>s({...i,tags:n.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Vs.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Vs.jsx)(b,{type:"button",variant:"outline",onClick:()=>r(!1),children:"Cancel"}),(0,Vs.jsx)(b,{type:"submit",children:"Add Reminder"})]})]})]})]})},dm=({reminder:e,colleagues:t,onUpdateReminder:a,open:o,onClose:r})=>{let[i,s]=(0,si.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,Vs.jsx)(wt,{open:o,onOpenChange:r,children:(0,Vs.jsxs)(ht,{className:"max-w-2xl",children:[(0,Vs.jsx)(xt,{children:(0,Vs.jsx)(yt,{children:"Edit Reminder"})}),(0,Vs.jsxs)("form",{onSubmit:n=>{n.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,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"edit-title",children:"Title"}),(0,Vs.jsx)(O,{id:"edit-title",value:i.title,onChange:n=>s({...i,title:n.target.value}),placeholder:"Enter reminder title",required:!0})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"edit-priority",children:"Priority"}),(0,Vs.jsxs)(Me,{value:i.priority,onValueChange:n=>s({...i,priority:n}),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"low",children:"\u{1F7E2} Low"}),(0,Vs.jsx)(G,{value:"medium",children:"\u{1F7E1} Medium"}),(0,Vs.jsx)(G,{value:"high",children:"\u{1F534} High"})]})]})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"edit-description",children:"Description"}),(0,Vs.jsx)(ze,{id:"edit-description",value:i.description,onChange:n=>s({...i,description:n.target.value}),placeholder:"Enter reminder description",rows:3})]}),(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"edit-dueDate",children:"Due Date"}),(0,Vs.jsx)(O,{id:"edit-dueDate",type:"date",value:i.dueDate,onChange:n=>s({...i,dueDate:n.target.value}),required:!0})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"edit-dueTime",children:"Due Time (optional)"}),(0,Vs.jsx)(O,{id:"edit-dueTime",type:"time",value:i.dueTime,onChange:n=>s({...i,dueTime:n.target.value})})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"edit-colleague",children:"Assigned Colleague"}),(0,Vs.jsxs)(Me,{value:i.colleagueId,onValueChange:n=>s({...i,colleagueId:n}),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{placeholder:"Select a digital colleague"})}),(0,Vs.jsx)(Pe,{children:t.map(n=>(0,Vs.jsx)(G,{value:n.id,children:n.name},n.id))})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Vs.jsx)("input",{type:"checkbox",id:"edit-isRecurring",checked:i.isRecurring,onChange:n=>s({...i,isRecurring:n.target.checked}),className:"rounded border-border"}),(0,Vs.jsx)(M,{htmlFor:"edit-isRecurring",children:"Make this a recurring reminder"})]}),i.isRecurring&&(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4 pl-6",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"edit-recurrencePattern",children:"Frequency"}),(0,Vs.jsxs)(Me,{value:i.recurrencePattern,onValueChange:n=>s({...i,recurrencePattern:n}),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"daily",children:"Daily"}),(0,Vs.jsx)(G,{value:"weekly",children:"Weekly"}),(0,Vs.jsx)(G,{value:"monthly",children:"Monthly"}),(0,Vs.jsx)(G,{value:"yearly",children:"Yearly"})]})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"edit-recurrenceInterval",children:"Every"}),(0,Vs.jsx)(O,{id:"edit-recurrenceInterval",type:"number",min:"1",value:i.recurrenceInterval,onChange:n=>s({...i,recurrenceInterval:parseInt(n.target.value)})})]})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Vs.jsx)("input",{type:"checkbox",id:"edit-reminderEnabled",checked:i.reminderEnabled,onChange:n=>s({...i,reminderEnabled:n.target.checked}),className:"rounded border-border"}),(0,Vs.jsx)(M,{htmlFor:"edit-reminderEnabled",children:"Enable reminder notifications"})]}),i.reminderEnabled&&(0,Vs.jsxs)("div",{className:"pl-6",children:[(0,Vs.jsx)(M,{htmlFor:"edit-reminderMinutes",children:"Remind me"}),(0,Vs.jsxs)(Me,{value:i.reminderMinutes.toString(),onValueChange:n=>s({...i,reminderMinutes:parseInt(n)}),children:[(0,Vs.jsx)(Te,{children:(0,Vs.jsx)(He,{})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsx)(G,{value:"5",children:"5 minutes before"}),(0,Vs.jsx)(G,{value:"15",children:"15 minutes before"}),(0,Vs.jsx)(G,{value:"30",children:"30 minutes before"}),(0,Vs.jsx)(G,{value:"60",children:"1 hour before"}),(0,Vs.jsx)(G,{value:"1440",children:"1 day before"})]})]})]})]}),(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)(M,{htmlFor:"edit-tags",children:"Tags (comma-separated)"}),(0,Vs.jsx)(O,{id:"edit-tags",value:i.tags,onChange:n=>s({...i,tags:n.target.value}),placeholder:"e.g., urgent, meeting, follow-up"})]}),(0,Vs.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,Vs.jsx)(b,{type:"button",variant:"outline",onClick:r,children:"Cancel"}),(0,Vs.jsx)(b,{type:"submit",children:"Save Changes"})]})]})]})})},cm=({reminder:e,colleagues:t,onUpdateReminder:a,onDeleteReminder:o})=>{let[r,i]=(0,si.useState)(!1),s=bs(e.dueDate,e.dueTime),d=hs(e.dueDate),n=nm(e.dueDate),m=()=>{a(e.id,{isCompleted:!e.isCompleted,completedAt:e.isCompleted?void 0:new Date})},c=()=>d?"Today":n?"Tomorrow":s&&!e.isCompleted?"Overdue":rm(e.dueDate);return(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsx)(dm,{reminder:e,colleagues:t,onUpdateReminder:a,open:r,onClose:()=>i(!1)}),(0,Vs.jsx)(V,{className:`transition-all duration-200 ${e.isCompleted?"opacity-60":""} ${s&&!e.isCompleted?"border-destructive/50 bg-destructive/5":""}`,children:(0,Vs.jsx)(me,{className:"Vs-4",children:(0,Vs.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Vs.jsxs)("div",{className:"flex items-start space-x-3 flex-1",children:[(0,Vs.jsx)("button",{onClick:m,className:"ln-1 text-primary hover:text-primary/80",children:e.isCompleted?(0,Vs.jsx)(ln.CheckCircle,{className:"h-5 w-5"}):(0,Vs.jsx)(ln.Circle,{className:"h-5 w-5"})}),(0,Vs.jsxs)("div",{className:"flex-1",children:[(0,Vs.jsxs)("div",{className:"flex items-center space-x-2 mb-1",children:[(0,Vs.jsx)("h3",{className:`font-semibold ${e.isCompleted?"line-through text-muted-foreground":""}`,children:e.title}),(0,Vs.jsx)("span",{className:"text-sm",children:im(e.priority)}),e.isRecurring&&(0,Vs.jsx)(ln.Repeat,{className:"h-4 w-4 text-primary"}),e.reminderEnabled&&(0,Vs.jsx)(ln.Bell,{className:"h-4 w-4 text-success"})]}),(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,Vs.jsxs)("div",{className:"flex items-center space-x-4 text-sm text-muted-foreground",children:[(0,Vs.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Vs.jsx)(ln.Calendar,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{className:s&&!e.isCompleted?"text-destructive font-medium":"",children:c()})]}),e.dueTime&&(0,Vs.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Vs.jsx)(ln.Clock,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{children:sm(e.dueTime)})]}),(0,Vs.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Vs.jsx)(ln.User,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{children:e.colleague.name})]})]}),e.tags&&e.tags.length>0&&(0,Vs.jsx)("div",{className:"flex flex-wrap gap-1 ln-2",children:e.tags.map((v,u)=>(0,Vs.jsx)(Q,{variant:"secondary",className:"text-xs",children:v},u))})]})]}),(0,Vs.jsxs)("div",{className:"flex items-center space-x-1",children:[(0,Vs.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>i(!0),className:"h-8 w-8 Vs-0",children:(0,Vs.jsx)(ln.Edit2,{className:"h-4 w-4"})}),(0,Vs.jsx)(b,{variant:"ghost",size:"sm",onClick:()=>o(e.id),className:"h-8 w-8 Vs-0 text-destructive hover:text-destructive/80",children:(0,Vs.jsx)(ln.Trash2,{className:"h-4 w-4"})})]})]})})})]})},Wl=({initialReminders:e=[],initialColleagues:t=[],onAddReminder:a,onUpdateReminder:o,onDeleteReminder:r})=>{let[i,s]=(0,si.useState)(e),[d]=(0,si.useState)(t),[n,m]=(0,si.useState)("all"),[c,v]=(0,si.useState)(""),u=S=>{let C={...S,id:Date.now().toString(),createdAt:new Date};s(A=>[...A,C]),a?.(S)},g=(S,C)=>{s(A=>A.map(F=>F.id===S?{...F,...C}:F)),o?.(S,C)},y=S=>{s(C=>C.filter(A=>A.id!==S)),r?.(S)},h=i.filter(S=>{if(c){let C=c.toLowerCase();if(!(S.title.toLowerCase().includes(C)||S.description.toLowerCase().includes(C)||S.colleague.name.toLowerCase().includes(C)||S.tags?.some(F=>F.toLowerCase().includes(C))))return!1}switch(n){case"pending":return!S.isCompleted;case"completed":return S.isCompleted;case"overdue":return!S.isCompleted&&bs(S.dueDate,S.dueTime);case"today":return hs(S.dueDate);default:return!0}}).sort((S,C)=>{if(S.isCompleted&&!C.isCompleted)return 1;if(!S.isCompleted&&C.isCompleted)return-1;let A={high:3,medium:2,low:1},F=A[C.priority]-A[S.priority];return F!==0?F:S.dueDate.getTime()-C.dueDate.getTime()}),x={total:i.length,pending:i.filter(S=>!S.isCompleted).length,completed:i.filter(S=>S.isCompleted).length,overdue:i.filter(S=>!S.isCompleted&&bs(S.dueDate,S.dueTime)).length,today:i.filter(S=>hs(S.dueDate)).length};return(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsx)(Ge,{title:"Task Reminders",description:"Manage reminders and stay on top of important tasks and deadlines.",gradient:"bg-gradient-to-r from-emerald-600 via-teal-600 to-cyan-600",primaryAction:{label:"Add reminder",onClick:()=>{let S={title:"New Reminder",description:"Don't forget to complete this task",dueDate:new Date,dueTime:"09:00",colleague:d[0]||{id:"1",name:"Default Colleague",department:"General",role:"Team Member"},isCompleted:!1,isRecurring:!1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,tags:["reminder"]};u(S)}}}),(0,Vs.jsx)("div",{className:"h-full bg-background",children:(0,Vs.jsxs)("div",{className:"Vs-6",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,Vs.jsxs)("div",{children:[(0,Vs.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Task Reminders"}),(0,Vs.jsx)("Vs",{className:"text-muted-foreground",children:"Manage your digital colleague task reminders"})]}),(0,Vs.jsx)(lm,{colleagues:d,onAddReminder:u,trigger:(0,Vs.jsxs)(b,{className:"flex items-center space-x-2",children:[(0,Vs.jsx)(ln.Plus,{className:"h-4 w-4"}),(0,Vs.jsx)("span",{children:"Add Reminder"})]})})]}),(0,Vs.jsxs)("div",{className:"grid grid-cols-5 gap-4 mb-6",children:[(0,Vs.jsxs)(V,{className:"Vs-4",children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold text-foreground",children:x.total}),(0,Vs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Total"})]}),(0,Vs.jsxs)(V,{className:"Vs-4",children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold text-primary",children:x.pending}),(0,Vs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Pending"})]}),(0,Vs.jsxs)(V,{className:"Vs-4",children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold text-success",children:x.completed}),(0,Vs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Completed"})]}),(0,Vs.jsxs)(V,{className:"Vs-4",children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold text-destructive",children:x.overdue}),(0,Vs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Overdue"})]}),(0,Vs.jsxs)(V,{className:"Vs-4",children:[(0,Vs.jsx)("div",{className:"text-2xl font-bold text-warning",children:x.today}),(0,Vs.jsx)("div",{className:"text-sm text-muted-foreground",children:"Today"})]})]}),(0,Vs.jsxs)("div",{className:"flex items-center space-x-4 mb-6",children:[(0,Vs.jsx)("div",{className:"flex-1",children:(0,Vs.jsx)(O,{placeholder:"Search reminders...",value:c,onChange:S=>v(S.target.value),className:"max-w-md"})}),(0,Vs.jsxs)(Me,{value:n,onValueChange:S=>m(S),children:[(0,Vs.jsx)(Te,{className:"w-40",children:(0,Vs.jsx)(He,{})}),(0,Vs.jsxs)(Pe,{children:[(0,Vs.jsxs)(G,{value:"all",children:["All (",x.total,")"]}),(0,Vs.jsxs)(G,{value:"pending",children:["Pending (",x.pending,")"]}),(0,Vs.jsxs)(G,{value:"completed",children:["Completed (",x.completed,")"]}),(0,Vs.jsxs)(G,{value:"overdue",children:["Overdue (",x.overdue,")"]}),(0,Vs.jsxs)(G,{value:"today",children:["Today (",x.today,")"]})]})]})]}),(0,Vs.jsx)("div",{className:"space-y-4",children:h.length===0?(0,Vs.jsxs)(V,{className:"Vs-8 text-center",children:[(0,Vs.jsx)("div",{className:"text-muted-foreground",children:c||n!=="all"?"No reminders match your filters":"No reminders yet"}),!c&&n==="all"&&(0,Vs.jsx)("Vs",{className:"text-sm text-muted-foreground/60 ln-2",children:"Create your first reminder to get started"})]}):h.map(S=>(0,Vs.jsx)(cm,{reminder:S,colleagues:d,onUpdateReminder:g,onDeleteReminder:y},S.id))})]})})]})};var Jl=require("next/navigation");function xs({title:e="",initialTasks:t=[],initialEpics:a=[],initialSprints:o=[],initialProjects:r=[],initialReminders:i=[],initialColleagues:s=[],initialFiles:d=[],onAddTask:n,onUpdateTask:m,onDeleteTask:c,onTaskClick:v,onAddEpic:u,onUpdateEpic:g,onDeleteEpic:y,onAddTaskToEpic:P,onAddSprint:h,onUpdateSprint:x,onDeleteSprint:S,onAddProject:C,onUpdateProject:A,onDeleteProject:F,onFileAdd:U,onFileEdit:se,onFileDelete:w,onFileClick:D,onAddReminder:E,onUpdateReminder:ve,onDeleteReminder:j,onViewChange:R,onToggleMobileMenu:N,onTeamClick:ie,onTeamChange:ke,onCopilotClick:tt}){let[Ee,at]=(0,si.useState)(t),[H,ne]=(0,si.useState)(a),[Re,bt]=(0,si.useState)(o),[jt,I]=(0,si.useState)(r),[Ze,Xe]=(0,si.useState)(i),[Pa,Qo]=(0,si.useState)(s),[ho,Zo]=(0,si.useState)(d),[dr,ei]=(0,si.useState)(!1),[cr,ti]=(0,si.useState)(!1),[_a,xo]=(0,si.useState)(null),[ai,yo]=(0,si.useState)(null),[wo,k]=(0,si.useState)(null),[B,Ae]=(0,si.useState)("kanban"),[Zl,ed]=(0,si.useState)(!1),Ss=(0,Jl.useRouter)(),td=H.filter(T=>T.isSelected).map(T=>T.id),oi=Re.find(T=>T.isSelected),ad=Ee.filter(T=>{let K=td.includes(T.epicId);return!oi||oi.id==="all-tasks"?K:oi.id==="backlog"?K&&!T.sprintId:K&&T.sprintId===oi.id}),pm=T=>ad.filter(K=>K.status===T),um=T=>{let K={};return H.forEach(de=>{K[de.id]=T.filter(Ve=>Ve.epicId===de.id)}),K},gm=T=>{k(T)},fm=T=>{wo&&(at(K=>K.map(de=>de.id===wo.id?{...de,status:T}:de)),k(null))},Ds=T=>{let K={...T,id:Date.now().toString(),createdAt:new Date};at(de=>[...de,K]),m?.(K.id,K)},ii=(T,K)=>{at(de=>de.map(Ve=>Ve.id===T?{...Ve,...K}:Ve)),m?.(T,K)},od=async(T,K)=>{ii(T,K)},ks=T=>{at(K=>K.filter(de=>de.id!==T)),_a?.id===T&&xo(null)},id=async T=>{ks(T)},rd=T=>{let K={...T,id:Date.now().toString(),isSelected:!1};I(de=>[...de,K]),C?.(T)},sd=(T,K)=>{I(de=>de.map(Ve=>Ve.id===T?K.isSelected?(Ss.push(`/kanban/${T}`),{...Ve,...K}):{...Ve,...K}:K.isSelected&&T!==Ve.id?{...Ve,isSelected:!1}:Ve)),A?.(T,K)},nd=T=>{I(K=>K.filter(de=>de.id!==T)),F?.(T)},ld=T=>{let K={...T,id:Date.now().toString(),isSelected:!0};ne(de=>[...de,K])},mr=()=>{ti(!0)},Ts=(T,K)=>{ne(de=>de.map(Ve=>Ve.id===T?{...Ve,...K}:Ve)),g?.(T,K)},Ps=T=>{ne(K=>K.filter(de=>de.id!==T)),at(K=>K.filter(de=>de.epicId!==T)),y?.(T)},Rs=T=>{let K={...T,id:Date.now().toString(),isSelected:!1};bt(de=>[...de,K]),h?.(T)},dd=(T,K)=>{bt(de=>de.map(Ve=>Ve.id===T?K.isSelected?{...Ve,...K}:{...Ve,...K}:K.isSelected&&T!==Ve.id?{...Ve,isSelected:!1}:Ve)),x?.(T,K)},cd=T=>{T==="backlog"||T==="all-tasks"||(bt(K=>K.filter(de=>de.id!==T)),at(K=>K.map(de=>de.sprintId===T?{...de,sprintId:void 0}:de)),S?.(T))},pr=T=>{xo(T)},md=T=>{T==="planning"&&window.innerWidth<768||Ae(T)},pd=()=>{ed(T=>!T),N?.()},vm=()=>{Ss.push("/")},bm=T=>{console.log("Switching to team:",T)},hm=T=>{console.log("Switching to team:",T)},ud=T=>{yo(T),ei(!0)},gd=()=>{ei(!1),yo(null)},fd=T=>{let K={...T,id:Date.now().toString(),createdAt:new Date};Xe(de=>[...de,K]),E?.(T)},vd=(T,K)=>{Xe(de=>de.map(Ve=>Ve.id===T?{...Ve,...K}:Ve)),ve?.(T,K)},bd=T=>{Xe(K=>K.filter(de=>de.id!==T)),j?.(T)},hd=T=>{Zo(K=>[...K,T]),U?.(T)},xd=T=>{se?.(T)},yd=T=>{Zo(K=>K.filter(de=>de.name!==T)),w?.(T)},wd=T=>{D?.(T)},xm=[{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"}],ym=()=>{switch(B){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"}},ur=[{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")}],wm=ur.sort((T,K)=>K.lastUsed.getTime()-T.lastUsed.getTime()).slice(0,3),Nm=ur.length>3,Cm=ur.slice(3);return(0,Vs.jsxs)(Fi,{projects:jt,epics:H,sprints:Re,currentView:B,onUpdateProject:sd,onDeleteProject:nd,onAddProject:rd,onUpdateEpic:Ts,onDeleteEpic:Ps,onAddEpic:mr,onAddSprint:Rs,onUpdateSprint:dd,onDeleteSprint:cd,onViewChange:md,mobileMenuOpen:Zl,onToggleMobileMenu:pd,children:[B==="kanban"&&(0,Vs.jsx)("div",{className:"h-full",children:(0,Vs.jsx)(zl,{initialProjects:jt,initialEpics:H,initialSprints:Re,initialTasks:Ee,onAddTask:Ds,onUpdateTask:ii,onDeleteTask:ks,onTaskClick:pr,onAddEpic:mr})}),B==="planning"&&(0,Vs.jsx)("div",{className:"hidden md:block h-full",children:(0,Vs.jsx)($Vs,{tasks:Ee,epics:H,sprints:Re,onUpdateTask:ii,onTaskClick:pr,onAddSprint:Rs})}),B==="tasks"&&(0,Vs.jsx)("div",{className:"h-full",children:(0,Vs.jsx)(Wl,{initialReminders:Ze,initialColleagues:Pa,onAddReminder:fd,onUpdateReminder:vd,onDeleteReminder:bd})}),B==="files"&&(0,Vs.jsx)("div",{className:"h-full",children:(0,Vs.jsx)(qo,{initialFiles:ho,onFileAdd:hd,onFileEdit:xd,onFileDelete:yd,onFileClick:wd,compactView:!1})}),B==="epics"&&(0,Vs.jsx)("div",{className:"h-full",children:(0,Vs.jsx)(Hl,{tasks:Ee,epics:H,sprints:Re,onUpdateTask:ii,onTaskClick:pr,onAddTaskToEpic:ud,onAddEpic:mr,onUpdateEpic:Ts,onDeleteEpic:Ps})}),(0,Vs.jsx)(Qi,{isOpen:dr,onClose:gd,onAddTask:Ds,epics:H,sprints:Re,defaultEpicId:ai||void 0}),(0,Vs.jsx)(ar,{isOpen:cr,onClose:()=>ti(!1),onAddEpic:ld}),_a&&(0,Vs.jsx)(tr,{isOpen:!!_a,onClose:()=>xo(null),task:_a,onUpdateTask:od,onDeleteTask:id,epics:H,sprints:Re})]})}var ql=({onSubmit:e,onCancel:t,isLoading:a=!1,initialData:o,className:r=""})=>{let[i,s]=(0,si.useState)({name:o?.name||"",objectives:o?.objectives||"",workInstructions:o?.workInstructions||"",plan:o?.plan||!1}),[d,n]=(0,si.useState)({}),m=()=>{let u={};return i.name.trim()?i.name.trim().length<3&&(u.name="Project name must be at least 3 characters"):u.name="Project name is required",i.objectives.trim()?i.objectives.trim().length<10&&(u.objectives="Please provide more detailed objectives (at 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 (at least 20 characters)"):u.workInstructions="Work instructions are required",n(u),Object.keys(u).length===0},c=async u=>{if(u.preventDefault(),!!m())try{await e(i)}catch(g){console.error("Error submitting project form:",g)}},v=(u,g)=>{s(y=>({...y,[u]:g})),d[u]&&n(y=>({...y,[u]:void 0}))};return(0,Vs.jsxs)(V,{className:`w-full max-w-2xl ${r}`,children:[(0,Vs.jsxs)(Fe,{children:[(0,Vs.jsxs)(Oe,{className:"flex items-center gap-2",children:[(0,Vs.jsx)(ln.Plus,{className:"h-5 w-5"}),"Create New Project"]}),(0,Vs.jsx)(da,{children:"Set up a new project with clear objectives and work instructions to help your team collaborate effectively."})]}),(0,Vs.jsxs)("form",{onSubmit:c,children:[(0,Vs.jsxs)(me,{className:"space-y-6",children:[(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"name",className:"text-sm font-medium",children:"Project Name *"}),(0,Vs.jsx)(O,{id:"name",type:"text",placeholder:"Enter project name",value:i.name,onChange:u=>v("name",u.target.value),className:d.name?"border-red-500 focus:border-red-500":"",disabled:a,maxLength:100}),d.name&&(0,Vs.jsx)("Vs",{className:"text-sm text-red-600",children:d.name})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"objectives",className:"text-sm font-medium",children:"Project Objectives *"}),(0,Vs.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 ${d.objectives?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:1e3}),(0,Vs.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,Vs.jsx)("span",{children:d.objectives&&(0,Vs.jsx)("span",{className:"text-red-600",children:d.objectives})}),(0,Vs.jsxs)("span",{children:[i.objectives.length,"/1000"]})]})]}),(0,Vs.jsxs)("div",{className:"space-y-2",children:[(0,Vs.jsx)(M,{htmlFor:"workInstructions",className:"text-sm font-medium",children:"Work Instructions *"}),(0,Vs.jsx)(ze,{id:"workInstructions",placeholder:"Provide detailed instructions on how the work should be carried out, including processes, standards, and expectations...",value:i.workInstructions,onChange:u=>v("workInstructions",u.target.value),className:`min-h-[120px] resize-y ${d.workInstructions?"border-red-500 focus:border-red-500":""}`,disabled:a,maxLength:2e3}),(0,Vs.jsxs)("div",{className:"flex justify-between text-xs text-gray-500",children:[(0,Vs.jsx)("span",{children:d.workInstructions&&(0,Vs.jsx)("span",{className:"text-red-600",children:d.workInstructions})}),(0,Vs.jsxs)("span",{children:[i.workInstructions.length,"/2000"]})]})]}),(0,Vs.jsxs)("div",{className:"space-y-3",children:[(0,Vs.jsx)(M,{className:"text-sm font-medium",children:"Project Management"}),(0,Vs.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Vs.jsx)(Eo,{id:"plan",checked:i.plan,onCheckedChange:u=>v("plan",u===!0),disabled:a}),(0,Vs.jsx)(M,{htmlFor:"plan",className:"text-sm text-gray-700 cursor-pointer",children:"Enable project planning and management features"})]}),(0,Vs.jsx)("Vs",{className:"text-xs text-gray-500 wa-6",children:"This will allow project managers to create sprints, assign tasks, and track progress."})]})]}),(0,Vs.jsxs)(ca,{className:"flex justify-end gap-3",children:[t&&(0,Vs.jsxs)(b,{type:"button",variant:"outline",onClick:t,disabled:a,className:"flex items-center gap-2",children:[(0,Vs.jsx)(ln.Vs,{className:"h-4 w-4"}),"Cancel"]}),(0,Vs.jsx)(b,{type:"submit",disabled:a,className:"flex items-center gap-2",children:a?(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsx)(ln.Loader2,{className:"h-4 w-4 animate-spin"}),"Creating..."]}):(0,Vs.jsxs)(Vs.Fragment,{children:[(0,Vs.jsx)(ln.Plus,{className:"h-4 w-4"}),"Create Project"]})})]})]})]})};function Ns({projects:e=[],onAddProject:t,handleProjectOpen:a,handleProjectShare:o}){let[r,i]=(0,si.useState)(!1),[s,d]=(0,si.useState)(!1),n=async c=>{d(!0);try{await t(c),i(!1)}catch(v){console.error("Error creating project:",v)}finally{d(!1)}},m=()=>{i(!0)};return(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsx)(wa.AnimatePresence,{mode:"wait",children:(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Vs.jsx)(Ge,{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,Vs.jsxs)("section",{className:"space-y-4 ln-8",children:[(0,Vs.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Vs.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(c=>(0,Vs.jsx)(Ui,{project:c,onOpen:a,onShare:o},c.name))})]})]},"projects-index-view")}),(0,Vs.jsx)(wt,{open:r,onOpenChange:i,children:(0,Vs.jsxs)(ht,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Vs.jsxs)(xt,{className:"ln-only",children:[(0,Vs.jsx)(yt,{children:"Create New Project"}),(0,Vs.jsx)(Io,{children:"Fill out the form below to create a new project."})]}),(0,Vs.jsx)(ql,{onSubmit:n,onCancel:()=>i(!1),isLoading:s,className:"border-0 shadow-none"})]})})]})}function Yl({team:e,onOpen:t,className:a}){return(0,Vs.jsx)(wa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:a,children:(0,Vs.jsxs)(V,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Vs.jsxs)(Fe,{children:[(0,Vs.jsx)(Oe,{className:"text-lg",children:e.name}),(0,Vs.jsx)(da,{className:"ln-1 text-sm",children:e.description})]}),(0,Vs.jsxs)(me,{className:"space-y-4",children:[(0,Vs.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)(ln.Users,{className:"h-4 w-4 text-blue-500"}),(0,Vs.jsx)("span",{children:"Human"})]}),(0,Vs.jsx)("span",{className:"font-medium",children:e.humanColleagues})]}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)(ln.Bot,{className:"h-4 w-4 text-purple-500"}),(0,Vs.jsx)("span",{children:"Digital"})]}),(0,Vs.jsx)("span",{className:"font-medium",children:e.digitalColleagues})]})]}),(0,Vs.jsxs)("div",{className:"flex items-center justify-between text-sm border-t Vs-4",children:[(0,Vs.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Vs.jsx)(ln.FolderOpen,{className:"h-4 w-4 text-green-500"}),(0,Vs.jsx)("span",{children:"Projects"})]}),(0,Vs.jsx)("span",{className:"font-medium",children:e.projects})]})]}),(0,Vs.jsx)(ca,{className:"flex gap-2",children:(0,Vs.jsx)(b,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"View Team"})})]})})}function Cs({teams:e=[],onCreateTeam:t,onTeamOpen:a}){let[o,r]=(0,si.useState)(!1),i=()=>{r(!0),t?.()},s=d=>{a?.(d)};return(0,Vs.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Vs.jsx)(wa.AnimatePresence,{mode:"wait",children:(0,Vs.jsxs)(wa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Vs.jsx)(Ge,{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,Vs.jsxs)("section",{className:"space-y-4 ln-8",children:[(0,Vs.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Teams"}),e.length===0?(0,Vs.jsxs)("div",{className:"text-center py-12",children:[(0,Vs.jsx)("Vs",{className:"text-muted-foreground text-lg",children:"You'Vs not part of any teams yet."}),(0,Vs.jsx)("Vs",{className:"text-muted-foreground text-sm ln-2",children:"Create a new team si ask to be added to an existing one."})]}):(0,Vs.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-3",children:e.map(d=>(0,Vs.jsx)(Yl,{team:d,onOpen:s},d.id))})]})]},"teams-index-view")}),(0,Vs.jsx)(wt,{open:o,onOpenChange:r,children:(0,Vs.jsxs)(ht,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[(0,Vs.jsxs)(xt,{children:[(0,Vs.jsx)(yt,{children:"Create New Team"}),(0,Vs.jsx)(Io,{children:"Set up a new team to collaborate with colleagues on projects."})]}),(0,Vs.jsx)("div",{className:"Vs-6 text-center text-muted-foreground",children:(0,Vs.jsx)("Vs",{children:"Team creation form coming soon..."})})]})})]})}0&&(module.exports={AppSidebarLeft,ColleagueCard,ColleagueForm,ColleagueTypeSelection,ColleaguesView,DashboardHeader,DashboardPage,DigitalColleageusLayout,DigitalColleagueClone,DigitalColleagueOptions,DocumentEdit,DocumentPreview,FileView,KnowledgeBrowser,KnowledgeSearch,KnowledgeView,MainPage,ManagementSidebar,ProjectView,ProjectsIndexView,SearchableSelect,TeamsIndexView});
|