cortex-react-components 2.4.1 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/chunk-2CS6P44F.mjs +4 -0
  2. package/dist/{chunk-WIRQ5IRT.mjs → chunk-2GM2LPLB.mjs} +1 -1
  3. package/dist/{chunk-3HNU2NYP.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
  4. package/dist/chunk-34AVYSEY.mjs +4 -0
  5. package/dist/{chunk-7R47MHQE.mjs → chunk-4SRUEQTP.mjs} +1 -1
  6. package/dist/{chunk-BKR3FRMQ.mjs → chunk-5N32XPU2.mjs} +1 -1
  7. package/dist/{chunk-UJSXVIXW.mjs → chunk-6VHK4OL7.mjs} +1 -1
  8. package/dist/{chunk-M4UVNIK2.mjs → chunk-77PCUNUC.mjs} +1 -1
  9. package/dist/{chunk-CXOVEABI.mjs → chunk-7OMPPFGG.mjs} +1 -1
  10. package/dist/chunk-A3YDFYEB.mjs +1 -0
  11. package/dist/{chunk-ECXVQZBN.mjs → chunk-ABGNIQRP.mjs} +1 -1
  12. package/dist/{chunk-75F3LJMX.mjs → chunk-BQQ4V4PX.mjs} +1 -1
  13. package/dist/{chunk-LAQ3QAUW.mjs → chunk-CLGBBNRB.mjs} +1 -1
  14. package/dist/{chunk-7HR6FNWF.mjs → chunk-DYCG7KUN.mjs} +1 -1
  15. package/dist/{chunk-GHOL5L32.mjs → chunk-F64CA5CH.mjs} +1 -1
  16. package/dist/{chunk-2BRDNDUB.mjs → chunk-FYQBRCQM.mjs} +1 -1
  17. package/dist/{chunk-RJGYVDOU.mjs → chunk-GAZHKHGB.mjs} +1 -1
  18. package/dist/{chunk-RGOKBIQ5.mjs → chunk-GETYSIZV.mjs} +1 -1
  19. package/dist/{chunk-XBCYPOFD.mjs → chunk-GTK2SGS5.mjs} +1 -1
  20. package/dist/{chunk-3NRXQBBS.mjs → chunk-HDKHF3EA.mjs} +1 -1
  21. package/dist/{chunk-C4RWEPVF.mjs → chunk-HKMNAXLM.mjs} +1 -1
  22. package/dist/{chunk-ISBVFNWD.mjs → chunk-IDG2O4B7.mjs} +1 -1
  23. package/dist/{chunk-OQYER4E7.mjs → chunk-JHYWAL24.mjs} +1 -1
  24. package/dist/{chunk-KWYJ3XZI.mjs → chunk-KZAYLEFB.mjs} +1 -1
  25. package/dist/{chunk-R75OR5VS.mjs → chunk-MO2B5CDW.mjs} +1 -1
  26. package/dist/{chunk-5MWZTJYP.mjs → chunk-MO4HRQEL.mjs} +1 -1
  27. package/dist/chunk-MPTT6GRI.mjs +1 -0
  28. package/dist/{chunk-GTZJWMZR.mjs → chunk-P6OSMPUQ.mjs} +1 -1
  29. package/dist/{chunk-FE7ZGUPU.mjs → chunk-PNUBVBSR.mjs} +1 -1
  30. package/dist/{chunk-AJQHGVZ5.mjs → chunk-PTZT4QJW.mjs} +1 -1
  31. package/dist/{chunk-B2EJGXDG.mjs → chunk-QTILVWJA.mjs} +1 -1
  32. package/dist/{chunk-7VDNUJZC.mjs → chunk-RAGDUV7M.mjs} +1 -1
  33. package/dist/{chunk-6MSM3CZ6.mjs → chunk-RRME4EHD.mjs} +1 -1
  34. package/dist/{chunk-VWLPVN4M.mjs → chunk-S4A4VHOI.mjs} +1 -1
  35. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  36. package/dist/{chunk-INPV5MBU.mjs → chunk-TK4JC5PG.mjs} +1 -1
  37. package/dist/{chunk-NINFDOV5.mjs → chunk-U3FYDDE2.mjs} +1 -1
  38. package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
  39. package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
  40. package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
  41. package/dist/{chunk-IPIDKLAW.mjs → chunk-W7MEHF4G.mjs} +1 -1
  42. package/dist/chunk-WB2Y7HTT.mjs +1 -0
  43. package/dist/{chunk-L3BLBPSR.mjs → chunk-WUA65ZZB.mjs} +1 -1
  44. package/dist/chunk-WY2CT5AT.mjs +1 -0
  45. package/dist/chunk-Z72RUYUU.mjs +1 -0
  46. package/dist/{chunk-O5P35LEY.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  47. package/dist/components/Blocks/Banner.mjs +1 -1
  48. package/dist/components/Blocks/CallToAction.mjs +1 -1
  49. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  50. package/dist/components/Blocks/Content.mjs +1 -1
  51. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  52. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  53. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  54. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  55. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  56. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  57. package/dist/components/Blocks/index.mjs +1 -1
  58. package/dist/components/CRM/index.mjs +1 -1
  59. package/dist/components/Cards/ContentCard.mjs +1 -1
  60. package/dist/components/Cards/FeatureCard.mjs +1 -1
  61. package/dist/components/Cards/index.mjs +1 -1
  62. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  63. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  64. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  65. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  66. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  67. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  68. package/dist/components/DigitalColleagues/Views/index.d.ts +1 -0
  69. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  70. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  71. package/dist/components/DigitalColleagues/index.js +1 -1
  72. package/dist/components/DigitalColleagues/index.mjs +1 -1
  73. package/dist/components/HeaderFooter/Header.mjs +1 -1
  74. package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
  75. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  76. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  77. package/dist/components/HeaderFooter/index.mjs +1 -1
  78. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  79. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  80. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  81. package/dist/components/Heros/PostHero/index.mjs +1 -1
  82. package/dist/components/Heros/RenderHero.mjs +1 -1
  83. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  84. package/dist/components/Heros/index.mjs +1 -1
  85. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  86. package/dist/components/Layouts/Print.mjs +1 -1
  87. package/dist/components/Layouts/SlideShow.mjs +1 -1
  88. package/dist/components/Layouts/index.mjs +1 -1
  89. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  90. package/dist/components/Menus/SidebarRight.mjs +1 -1
  91. package/dist/components/Menus/index.mjs +1 -1
  92. package/dist/components/Other/index.mjs +1 -1
  93. package/dist/components/Payload/Card/index.mjs +1 -1
  94. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  95. package/dist/components/Payload/Media/index.mjs +1 -1
  96. package/dist/components/Payload/RichText/index.mjs +1 -1
  97. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  98. package/dist/components/Payload/index.mjs +1 -1
  99. package/dist/components/Projects/AddTaskModal.js +1 -1
  100. package/dist/components/Projects/AddTaskModal.mjs +1 -1
  101. package/dist/components/Projects/FileView.d.ts +2 -2
  102. package/dist/components/Projects/FileView.js +2 -2
  103. package/dist/components/Projects/FileView.mjs +1 -1
  104. package/dist/components/Projects/KanbanBoardView.js +1 -1
  105. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  106. package/dist/components/Projects/PlanningView.js +1 -1
  107. package/dist/components/Projects/PlanningView.mjs +1 -1
  108. package/dist/components/Projects/ProjectPage.js +1 -1
  109. package/dist/components/Projects/ProjectPage.mjs +1 -1
  110. package/dist/components/Projects/ProjectView.d.ts +4 -4
  111. package/dist/components/Projects/ProjectView.js +1 -1
  112. package/dist/components/Projects/ProjectView.mjs +1 -1
  113. package/dist/components/Projects/TasksView.js +1 -1
  114. package/dist/components/Projects/TasksView.mjs +1 -1
  115. package/dist/components/Projects/file-list.d.ts +2 -2
  116. package/dist/components/Projects/file-list.js +1 -1
  117. package/dist/components/Projects/file-list.mjs +1 -1
  118. package/dist/components/dc-temp/index.js +1 -1
  119. package/dist/components/dc-temp/index.mjs +1 -1
  120. package/dist/components/index.js +8 -8
  121. package/dist/components/index.mjs +1 -1
  122. package/dist/components/ui/index.mjs +1 -1
  123. package/dist/components/ui/sidebar.mjs +1 -1
  124. package/dist/index.js +14 -14
  125. package/dist/index.mjs +1 -1
  126. package/dist/metafile-cjs.json +1 -1
  127. package/dist/metafile-esm.json +1 -1
  128. package/dist/pages/Blog.mjs +1 -1
  129. package/dist/pages/Documentation.mjs +1 -1
  130. package/dist/pages/IndexPage.mjs +1 -1
  131. package/dist/pages/Intranet.mjs +1 -1
  132. package/dist/pages/LandingPage.mjs +1 -1
  133. package/dist/pages/Page.mjs +1 -1
  134. package/dist/pages/Publish.mjs +1 -1
  135. package/dist/pages/Website.mjs +1 -1
  136. package/dist/sections/AboutSection.mjs +1 -1
  137. package/dist/sections/BlogDetail.mjs +1 -1
  138. package/dist/sections/BlogList.mjs +1 -1
  139. package/dist/sections/BlogListSection.mjs +1 -1
  140. package/dist/sections/ContactSection.mjs +1 -1
  141. package/dist/sections/PageSections.mjs +1 -1
  142. package/dist/sections/PricingSection.mjs +1 -1
  143. package/dist/sections/ServiceDetail.mjs +1 -1
  144. package/dist/sections/ServiceDetailSection.mjs +1 -1
  145. package/dist/sections/ServiceSection.mjs +1 -1
  146. package/dist/sections/form/index.mjs +1 -1
  147. package/dist/sections/index.mjs +1 -1
  148. package/package.json +3 -2
  149. package/dist/chunk-2VZWOBGP.mjs +0 -1
  150. package/dist/chunk-3U3PZBHQ.mjs +0 -4
  151. package/dist/chunk-AQZEZ3UR.mjs +0 -1
  152. package/dist/chunk-DKVCSRUJ.mjs +0 -1
  153. package/dist/chunk-FV3W3WL7.mjs +0 -4
  154. package/dist/chunk-NZS3XKXU.mjs +0 -1
  155. package/dist/chunk-PXPSM7OQ.mjs +0 -1
@@ -2,4 +2,4 @@
2
2
  "use strict";
3
3
  'use client'
4
4
 
5
- "use strict";"use client";var fi=Object.create;var Wt=Object.defineProperty;var vi=Object.getOwnPropertyDescriptor;var hi=Object.getOwnPropertyNames;var bi=Object.getPrototypeOf,xi=Object.prototype.hasOwnProperty;var yi=(e,t)=>{for(var a in t)Wt(e,a,{get:t[a],enumerable:!0})},$a=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of hi(t))!xi.call(e,s)&&s!==a&&Wt(e,s,{get:()=>t[s],enumerable:!(o=vi(t,s))||o.enumerable});return e};var ae=(e,t,a)=>(a=e!=null?fi(bi(e)):{},$a(t||!e||!e.__esModule?Wt(a,"default",{value:e,enumerable:!0}):a,e)),wi=e=>$a(Wt({},"__esModule",{value:!0}),e);var br={};yi(br,{default:()=>mi});module.exports=wi(br);var Oa=require("react"),ha=require("framer-motion"),ci=require("lucide-react");var Za=require("clsx");var Na="-",Ni=e=>{let t=Di(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let r=n.split(Na);return r[0]===""&&r.length!==1&&r.shift(),_a(r,t)||Ci(n)},getConflictingClassGroupIds:(n,r)=>{let d=a[n]||[];return r&&o[n]?[...d,...o[n]]:d}}},_a=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?_a(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(Na);return t.validators.find(({validator:n})=>n(i))?.classGroupId},Wa=/^\[(.+)\]$/,Ci=e=>{if(Wa.test(e)){let t=Wa.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Di=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Pi(Object.entries(e.classGroups),a).forEach(([i,n])=>{wa(n,o,i,t)}),o},wa=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:Ga(t,s);i.classGroupId=a;return}if(typeof s=="function"){if(ki(s)){wa(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([i,n])=>{wa(n,Ga(t,i),a,o)})})},Ga=(e,t)=>{let a=e;return t.split(Na).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},ki=e=>e.isThemeGetter,Pi=(e,t)=>t?e.map(([a,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,r])=>[t+n,r])):i);return[a,s]}):e,Si=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(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 s(i,n),n},set(i,n){a.has(i)?a.set(i,n):s(i,n)}}},qa="!",Ri=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],i=t.length,n=r=>{let d=[],l=0,w=0,u;for(let g=0;g<r.length;g++){let c=r[g];if(l===0){if(c===s&&(o||r.slice(g,g+i)===t)){d.push(r.slice(w,g)),w=g+i;continue}if(c==="/"){u=g;continue}}c==="["?l++:c==="]"&&l--}let k=d.length===0?r:r.substring(w),f=k.startsWith(qa),A=f?k.substring(1):k,b=u&&u>w?u-w:void 0;return{modifiers:d,hasImportantModifier:f,baseClassName:A,maybePostfixModifierPosition:b}};return a?r=>a({className:r,parseClassName:n}):n},Ti=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},Ai=e=>({cache:Si(e.cacheSize),parseClassName:Ri(e),...Ni(e)}),Mi=/\s+/,Ii=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],n=e.trim().split(Mi),r="";for(let d=n.length-1;d>=0;d-=1){let l=n[d],{modifiers:w,hasImportantModifier:u,baseClassName:k,maybePostfixModifierPosition:f}=a(l),A=!!f,b=o(A?k.substring(0,f):k);if(!b){if(!A){r=l+(r.length>0?" "+r:r);continue}if(b=o(k),!b){r=l+(r.length>0?" "+r:r);continue}A=!1}let g=Ti(w).join(":"),c=u?g+qa:g,Z=c+b;if(i.includes(Z))continue;i.push(Z);let C=s(b,A);for(let R=0;R<C.length;++R){let L=C[R];i.push(c+L)}r=l+(r.length>0?" "+r:r)}return r};function Bi(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ja(t))&&(o&&(o+=" "),o+=a);return o}var Ja=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ja(e[o]))&&(a&&(a+=" "),a+=t);return a};function Li(e,...t){let a,o,s,i=n;function n(d){let l=t.reduce((w,u)=>u(w),e());return a=Ai(l),o=a.cache.get,s=a.cache.set,i=r,r(d)}function r(d){let l=o(d);if(l)return l;let w=Ii(d,a);return s(d,w),w}return function(){return i(Bi.apply(null,arguments))}}var oe=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Xa=/^\[(?:([a-to-]+):)?(.+)\]$/i,ji=/^\d+\/\d+$/,Ei=new Set(["px","full","screen"]),zi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fi=/\d+(%|px|r?em|[sdl]?to([hwib]|min|max)|to|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ui=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Hi=/^(inset_)?-?((\d+)?\.?(\d+)[a-to]+|0)_-?((\d+)?\.?(\d+)[a-to]+|0)/,Ki=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$e=e=>bt(e)||Ei.has(e)||ji.test(e),Ze=e=>xt(e,"length",Ji),bt=e=>!!e&&!Number.isNaN(Number(e)),ya=e=>xt(e,"number",bt),Rt=e=>!!e&&Number.isInteger(Number(e)),Oi=e=>e.endsWith("%")&&bt(e.slice(0,-1)),F=e=>Xa.test(e),et=e=>zi.test(e),Vi=new Set(["length","size","percentage"]),$i=e=>xt(e,Vi,Ya),Wi=e=>xt(e,"position",Ya),Gi=new Set(["image","url"]),_i=e=>xt(e,Gi,Yi),qi=e=>xt(e,"",Xi),Tt=()=>!0,xt=(e,t,a)=>{let o=Xa.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Ji=e=>Fi.test(e)&&!Ui.test(e),Ya=()=>!1,Xi=e=>Hi.test(e),Yi=e=>Ki.test(e);var Qi=()=>{let e=oe("colors"),t=oe("spacing"),a=oe("blur"),o=oe("brightness"),s=oe("borderColor"),i=oe("borderRadius"),n=oe("borderSpacing"),r=oe("borderWidth"),d=oe("contrast"),l=oe("grayscale"),w=oe("hueRotate"),u=oe("invert"),k=oe("gap"),f=oe("gradientColorStops"),A=oe("gradientColorStopPositions"),b=oe("inset"),g=oe("margin"),c=oe("opacity"),Z=oe("padding"),C=oe("saturate"),R=oe("scale"),L=oe("sepia"),U=oe("skew"),ie=oe("space"),x=oe("translate"),O=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],le=()=>["auto",F,t],q=()=>[F,t],Be=()=>["",$e,Ze],m=()=>["auto",bt,F],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],Le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>["start","end","center","between","around","evenly","stretch"],nt=()=>["","0",F],$t=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Fe=()=>[bt,F];return{cacheSize:500,separator:":",theme:{colors:[Tt],spacing:[$e,Ze],blur:["none","",et,F],brightness:Fe(),borderColor:[e],borderRadius:["none","","full",et,F],borderSpacing:q(),borderWidth:Be(),contrast:Fe(),grayscale:nt(),hueRotate:Fe(),invert:nt(),gap:q(),gradientColorStops:[e],gradientColorStopPositions:[Oi,Ze],inset:le(),margin:le(),opacity:Fe(),padding:q(),saturate:Fe(),scale:Fe(),sepia:nt(),skew:Fe(),space:q(),translate:q()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[et]}],"break-after":[{"break-after":$t()}],"break-before":[{"break-before":$t()}],"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:[...ee(),F]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],to:[{to:["auto",Rt,F]}],basis:[{basis:le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",F]}],grow:[{grow:nt()}],shrink:[{shrink:nt()}],order:[{order:["first","last","none",Rt,F]}],"grid-cols":[{"grid-cols":[Tt]}],"col-start-end":[{col:["auto",{span:["full",Rt,F]},F]}],"col-start":[{"col-start":m()}],"col-end":[{"col-end":m()}],"grid-rows":[{"grid-rows":[Tt]}],"row-start-end":[{row:["auto",{span:[Rt,F]},F]}],"row-start":[{"row-start":m()}],"row-end":[{"row-end":m()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...we()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...we(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...we(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[Z]}],px:[{px:[Z]}],py:[{py:[Z]}],ps:[{ps:[Z]}],ci:[{ci:[Z]}],to:[{to:[Z]}],pr:[{pr:[Z]}],pb:[{pb:[Z]}],pl:[{pl:[Z]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],to:[{to:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[ie]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ie]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-w":[{"min-w":[F,t,"min","max","fit"]}],"max-w":[{"max-w":[F,t,"none","full","min","max","fit","prose",{screen:[et]},et]}],h:[{h:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[F,t,"auto","min","max","fit"]}],"font-size":[{text:["base",et,Ze]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ya]}],"font-family":[{font:[Tt]}],"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",F]}],"line-clamp":[{"line-clamp":["none",bt,ya]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$e,F]}],"list-image":[{"list-image":["none",F]}],"list-style-type":[{list:["none","disc","decimal",F]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[c]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[c]}],"text-decoration":["underline","overline","line-through","to-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$e,Ze]}],"underline-offset":[{"underline-offset":["auto",$e,F]}],"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:q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F]}],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",F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[c]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),Wi]}],"bg-repeat":[{bg:["to-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$i]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_i]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[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:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-y":[{"border-y":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[c]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[c]}],"divide-style":[{divide:te()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[$e,F]}],"outline-w":[{outline:[$e,Ze]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[c]}],"ring-offset-w":[{"ring-offset":[$e,Ze]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",et,qi]}],"shadow-color":[{shadow:[Tt]}],opacity:[{opacity:[c]}],"mix-blend":[{"mix-blend":[...Le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Le()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",et,F]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[u]}],saturate:[{saturate:[C]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[c]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"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",F]}],duration:[{duration:Fe()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:Fe()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Rt,F]}],"translate-x":[{"translate-x":[x]}],"translate-y":[{"translate-y":[x]}],"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",F]}],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","to-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","to-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-to":[{"scroll-to":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-ci":[{"scroll-ci":q()}],"scroll-to":[{"scroll-to":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"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",F]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$e,Ze,ya]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","ci","to","pr","pb","pl"],px:["pr","pl"],py:["to","pb"],m:["mx","my","ms","to","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-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-ms","scroll-to","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-ci","scroll-to","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-to","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Qa=Li(Qi);function p(...e){return Qa((0,Za.clsx)(e))}var ea=ae(require("react")),Ta=ae(require("next/link"));var eo=require("class-variance-authority");var to=require("react/jsx-runtime"),Zi=(0,eo.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function _({className:e,variant:t,...a}){return(0,to.jsx)("div",{className:p(Zi({variant:t}),e),...a})}var ao=require("@radix-ui/react-slot"),io=ae(require("react")),er=(0,eo.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),y=io.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},i)=>(0,to.jsx)(e?ao.Slot:"button",{className:p(er({className:t,size:a,variant:o})),ref:i,...s}));y.displayName="Button";var so=ae(require("react"));var de=so.forwardRef(({className:e,type:t,...a},o)=>(0,to.jsx)("input",{type:t,className:p("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}));de.displayName="Input";var Ca=ae(require("react")),Te=ae(require("@radix-ui/react-scroll-area"));var Ue=Ca.forwardRef(({className:e,children:t,...a},o)=>(0,to.jsxs)(Te.Root,{ref:o,className:p("relative overflow-hidden",e),...a,children:[(0,to.jsx)(Te.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,to.jsx)(lo,{}),(0,to.jsx)(Te.Corner,{})]}));Ue.displayName=Te.Root.displayName;var lo=Ca.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,to.jsx)(Te.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,to.jsx)(Te.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));lo.displayName=Te.ScrollAreaScrollbar.displayName;var At=ae(require("react")),fe=ae(require("@radix-ui/react-dialog"));var mo=fe.Root;var tr=fe.Portal;var po=At.forwardRef(({className:e,...t},a)=>(0,to.jsx)(fe.Overlay,{ref:a,className:p("fixed inset-0 to-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}));po.displayName=fe.Overlay.displayName;var Da=At.forwardRef(({className:e,children:t,...a},o)=>(0,to.jsxs)(tr,{children:[(0,to.jsx)(po,{}),(0,to.jsxs)(fe.Content,{ref:o,className:p("fixed left-[50%] top-[50%] to-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,to.jsxs)(fe.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,to.jsx)(ci.X,{className:"h-4 w-4"}),(0,to.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Da.displayName=fe.Content.displayName;var ka=({className:e,...t})=>(0,to.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ka.displayName="DialogHeader";var ar=({className:e,...t})=>(0,to.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ar.displayName="DialogFooter";var Pa=At.forwardRef(({className:e,...t},a)=>(0,to.jsx)(fe.Title,{ref:a,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));Pa.displayName=fe.Title.displayName;var or=At.forwardRef(({className:e,...t},a)=>(0,to.jsx)(fe.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));or.displayName=fe.Description.displayName;var Mt=ae(require("@radix-ui/react-checkbox")),go=ae(require("react")),Sa=go.forwardRef(({className:e,...t},a)=>(0,to.jsx)(Mt.Root,{className:p("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,to.jsx)(Mt.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,to.jsx)(ci.Check,{className:"h-4 w-4"})})}));Sa.displayName=Mt.Root.displayName;var He=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),vo=[{id:"home",title:"Home",icon:(0,to.jsx)(ci.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,to.jsx)(ci.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,to.jsx)(ci.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,to.jsx)(ci.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,to.jsx)(ci.FileText,{}),url:"/knowledge"}],ho=[{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'to 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")}],bo=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,to.jsx)(ci.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,to.jsx)(ci.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,to.jsx)(ci.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,to.jsx)(ci.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,to.jsx)(ci.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,to.jsx)(ci.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,to.jsx)(ci.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,to.jsx)(ci.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"ci",name:"IT Support",description:"Information technology and infrastructure",icon:(0,to.jsx)(ci.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,to.jsx)(ci.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Jt=[{id:"1",name:"to-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}],xo=[{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 Ra=[{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}],_t=[{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}],Yt=[{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")}],ir=[...Yt,{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")}],rr=[...Jt,{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}],qt={projects:[{id:"1",name:"Empty Project",description:"A project with to 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:[]},fo={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:Yt.filter(e=>e.epicId==="1")};var Ur={empty:{initialProjects:qt.projects,initialEpics:qt.epics,initialSprints:qt.sprints,initialTasks:qt.tasks},default:{initialProjects:Jt,initialEpics:Ra,initialSprints:_t,initialTasks:Yt},highDensity:{initialProjects:Jt,initialEpics:Ra,initialSprints:_t,initialTasks:ir},singleEpic:{initialProjects:Jt,initialEpics:fo.epics,initialSprints:_t,initialTasks:fo.tasks},multipleProjects:{initialProjects:rr,initialEpics:Ra,initialSprints:_t,initialTasks:Yt}},Xt=[{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(He),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(He),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(He),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(He),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(He),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(He),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(He),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(He),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(He),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(He),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Hr=[{id:"1",title:"Review quarterly report",description:"eo through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Xt.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:Xt.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:Xt.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 Kr=Xt.filter(e=>e.type==="digital");function Zt(e,t){let[a,o]=(0,Oa.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),s=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Oa.useEffect)(()=>{s(a)},[]),[a,s]}function Aa({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=bo[0],onBusinessUnitChange:i,onSearch:n,className:r,logo:d="/headerlogo.png",appName:l="Nuvia",tagline:w="Collaboration Platform"}){let[u,k]=ea.useState({}),[f,A]=Zt("sidebar-favorites",{}),[b,g]=ea.useState(null),[c,Z]=ea.useState(""),C=m=>{k(ee=>({...ee,[m]:!ee[m]}))},R=m=>{i?.(m)},L=()=>{c.trim()&&n?.(c.trim())},U=m=>{m.key==="Enter"&&(m.preventDefault(),L())},ie=(m,ee)=>{let te=f[m]||[],Le=te.includes(ee)?te.filter(we=>we!==ee):te.concat(ee);A({...f,[m]:Le})},x=m=>{if(!m.items||!m.maxItems||m.items.length<=m.maxItems)return m.items||[];let ee=f[m.id]||[],te=m.items.filter(we=>ee.includes(we.id)),Le=m.items.filter(we=>!ee.includes(we.id));return[...te,...Le].slice(0,m.maxItems)},O=m=>m.maxItems&&m.items&&m.items.length>m.maxItems,$=e,le=m=>{let ee=O(m),te=x(m),Le=(0,to.jsxs)(to.Fragment,{children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[m.icon,(0,to.jsx)("span",{children:m.title})]}),m.badge&&(0,to.jsx)(_,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:m.badge}),m.items&&(0,to.jsx)(ci.ChevronDown,{className:p("ml-2 h-4 w-4 transition-transform",u[m.title]?"rotate-180":"")})]}),we=p("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",m.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return m.url?(0,to.jsx)(Ta.default,{href:m.url,className:we,onClick:a?o:void 0,children:Le}):(0,to.jsx)("button",{className:we,onClick:()=>m.items&&C(m.title),children:Le})},q=()=>{let m=e.find(te=>te.id===b);if(!m||!m.items||!m.maxItems)return null;let ee=f[m.id]||[];return(0,to.jsx)(mo,{open:!!b,onOpenChange:te=>!te&&g(null),children:(0,to.jsxs)(Da,{className:"sm:max-w-md",children:[(0,to.jsxs)(ka,{children:[(0,to.jsxs)(Pa,{children:["Manage ",m.title," Favorites"]}),(0,to.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",m.maxItems," items to show in ",m.title.toLowerCase(),"."]})]}),(0,to.jsx)(Ue,{className:"max-h-96 pr-4",children:(0,to.jsx)("div",{className:"space-y-4",children:m.items.map(te=>(0,to.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,to.jsx)(Sa,{id:te.id,checked:ee.includes(te.id),onCheckedChange:()=>ie(m.id,te.id),disabled:!ee.includes(te.id)&&ee.length>=(m.maxItems||0)}),(0,to.jsxs)("label",{htmlFor:te.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:[te.title,te.badge&&(0,to.jsx)(_,{variant:"outline",className:"text-xs",children:te.badge})]})]},te.id))})})]})})},Be=(0,to.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[(0,to.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,to.jsx)("img",{src:d,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h2",{className:"font-semibold",children:l}),(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:w})]})]}),a&&(0,to.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,to.jsx)(ci.X,{className:"h-5 w-5"})})]}),(0,to.jsx)("div",{className:"px-3 py-2",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,to.jsx)(de,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:c,onChange:m=>Z(m.target.value),onKeyPress:U})]})}),(0,to.jsx)(Ue,{className:"flex-1 px-3 py-2",children:(0,to.jsx)("div",{className:"space-y-1",children:$.map(m=>(0,to.jsxs)("div",{className:"mb-1",children:[le(m),m.items&&u[m.title]&&(0,to.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[x(m).map(ee=>(0,to.jsxs)(Ta.default,{href:ee.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[ee.title,ee.badge&&(0,to.jsx)(_,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:ee.badge})]},ee.id)),O(m)&&m.items&&m.items.length>x(m).length&&(0,to.jsxs)("button",{onClick:()=>g(m.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:["...",m.items.length-x(m).length," more available"]})]})]},m.id))})}),(0,to.jsx)("div",{className:"p-3",children:(0,to.jsx)("div",{className:"space-y-1",children:(0,to.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,to.jsx)(ci.Settings,{className:"h-5 w-5"}),(0,to.jsx)("span",{children:"Settings"})]})})}),(0,to.jsx)(q,{})]});return a?(0,to.jsx)("div",{className:p("fixed inset-y-0 left-0 to-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Be}):(0,to.jsx)("div",{className:p("fixed inset-y-0 left-0 to-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Be})}var ta=ae(require("react")),We=ae(require("@radix-ui/react-avatar"));var Ge=ta.forwardRef(({className:e,...t},a)=>(0,to.jsx)(We.Root,{ref:a,className:p("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ge.displayName=We.Root.displayName;var lt=ta.forwardRef(({className:e,...t},a)=>(0,to.jsx)(We.Image,{ref:a,className:p("aspect-square h-full w-full",e),...t}));lt.displayName=We.Image.displayName;var _e=ta.forwardRef(({className:e,...t},a)=>(0,to.jsx)(We.Fallback,{ref:a,className:p("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));_e.displayName=We.Fallback.displayName;var yo=ae(require("react")),je=ae(require("@radix-ui/react-tooltip"));var oa=je.Provider,ia=je.Root,ra=je.Trigger,It=yo.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,to.jsx)(je.Portal,{children:(0,to.jsx)(je.Content,{ref:o,sideOffset:t,className:p("to-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})}));It.displayName=je.Content.displayName;var wo=require("next-themes");function No(){let{setTheme:e,theme:t}=(0,wo.useTheme)();return(0,to.jsx)(oa,{children:(0,to.jsxs)(ia,{children:[(0,to.jsx)(ra,{asChild:!0,children:(0,to.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,to.jsx)(ci.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,to.jsx)(ci.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,to.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,to.jsx)(It,{children:"Toggle theme"})]})})}function Co({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:i}){let n=e.filter(l=>!l.read),r=n.length,d=l=>{switch(l){case"info":return(0,to.jsx)(ci.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,to.jsx)(ci.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,to.jsx)(ci.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,to.jsx)(ci.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,to.jsx)(ha.AnimatePresence,{children:t&&(0,to.jsxs)(to.Fragment,{children:[(0,to.jsx)(ha.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 to-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,to.jsx)(ha.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 to-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,to.jsxs)("div",{className:"flex h-full flex-col",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2",children:[(0,to.jsx)(ci.Bell,{className:"h-5 w-5"}),(0,to.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,to.jsxs)(_,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,to.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,to.jsx)(ci.X,{className:"h-5 w-5"}),(0,to.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,to.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,to.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,to.jsx)(y,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,to.jsx)(Ue,{className:"flex-1",children:(0,to.jsx)("div",{className:"divide-y",children:n.map(l=>(0,to.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,to.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(l.type)}),(0,to.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between",children:[(0,to.jsx)("p",{className:"font-medium",children:l.title}),(0,to.jsxs)("div",{className:"flex items-center gap-2",children:[(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:l.time}),(0,to.jsx)(y,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(l.id),title:"Dismiss",children:(0,to.jsx)(ci.Check,{className:"h-3 w-3"})})]})]}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:l.description}),l.actionLabel&&(0,to.jsxs)(y,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:l.onAction,children:[l.actionLabel,(0,to.jsx)(ci.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},l.id))})}):(0,to.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,to.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,to.jsx)(ci.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,to.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,to.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var dt=ae(require("@radix-ui/react-tabs"));function Do({className:e,...t}){return(0,to.jsx)(dt.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function ko({className:e,...t}){return(0,to.jsx)(dt.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Po({className:e,...t}){return(0,to.jsx)(dt.Trigger,{"data-slot":"tabs-trigger",className:p("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var qe=ae(require("react")),W=ae(require("@radix-ui/react-dropdown-menu")),yt=require("@radix-ui/react-icons");var la=W.Root,da=W.Trigger;var sr=qe.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,to.jsxs)(W.SubTrigger,{ref:s,className:p("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,to.jsx)(yt.ChevronRightIcon,{className:"ml-auto"})]}));sr.displayName=W.SubTrigger.displayName;var nr=qe.forwardRef(({className:e,...t},a)=>(0,to.jsx)(W.SubContent,{ref:a,className:p("to-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));nr.displayName=W.SubContent.displayName;var Lt=qe.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,to.jsx)(W.Portal,{children:(0,to.jsx)(W.Content,{ref:o,sideOffset:t,className:p("to-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Lt.displayName=W.Content.displayName;var ct=qe.forwardRef(({className:e,inset:t,...a},o)=>(0,to.jsx)(W.Item,{ref:o,className:p("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}));ct.displayName=W.Item.displayName;var lr=qe.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,to.jsxs)(W.CheckboxItem,{ref:s,className:p("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,to.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,to.jsx)(W.ItemIndicator,{children:(0,to.jsx)(yt.CheckIcon,{className:"h-4 w-4"})})}),t]}));lr.displayName=W.CheckboxItem.displayName;var dr=qe.forwardRef(({className:e,children:t,...a},o)=>(0,to.jsxs)(W.RadioItem,{ref:o,className:p("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,to.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,to.jsx)(W.ItemIndicator,{children:(0,to.jsx)(yt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));dr.displayName=W.RadioItem.displayName;var cr=qe.forwardRef(({className:e,inset:t,...a},o)=>(0,to.jsx)(W.Label,{ref:o,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));cr.displayName=W.Label.displayName;var mr=qe.forwardRef(({className:e,...t},a)=>(0,to.jsx)(W.Separator,{ref:a,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));mr.displayName=W.Separator.displayName;var pr=({className:e,...t})=>(0,to.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});pr.displayName="DropdownMenuShortcut";function ca({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:i=6}){let n=a.find(r=>r.value===e);return(0,to.jsxs)(ha.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,to.jsx)("div",{className:"hidden md:block",children:(0,to.jsx)(Do,{value:e,onValueChange:t,children:(0,to.jsx)(ko,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,to.jsx)(ha.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,to.jsx)(Po,{value:r.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:r.label})},r.value))})})}),(0,to.jsx)("div",{className:"md:hidden",children:(0,to.jsxs)(la,{children:[(0,to.jsx)(da,{asChild:!0,children:(0,to.jsxs)(y,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,to.jsx)(ci.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,to.jsx)(Lt,{align:"center",className:"w-[180px]",children:a.map(r=>(0,to.jsx)(ct,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function Ro({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:i,activeTab:n="assistant",onTabChange:r,showTabs:d=!0,tabOptions:l=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:w,actionIcon:u=(0,to.jsx)(ci.Bot,{className:"mr-2 h-4 w-4"}),actionText:k="Action",onNotificationRemove:f,onRemoveAll:A,logo:b="/headerlogo.png",appName:g="Nuvia",tagline:c="Collaboration Platform"}){let[Z,C]=(0,Oa.useState)(!1),[R,L]=(0,Oa.useState)(t),U=R.filter(O=>!O.read).length,ie=O=>{L($=>$.filter(le=>le.id!==O)),f?.(O)},x=()=>{L(O=>O.filter($=>$.read)),A?.()};return(0,to.jsxs)(to.Fragment,{children:[(0,to.jsxs)("header",{className:`sticky top-0 to-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${i||""}`,children:[(0,to.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,to.jsx)(ci.Menu,{className:"h-5 w-5"})}),(0,to.jsx)(y,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,to.jsx)(ci.PanelLeft,{className:"h-5 w-5"})}),!s&&(0,to.jsxs)(ha.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,to.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,to.jsx)("img",{src:b,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h2",{className:"font-semibold text-sm",children:g}),(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:c})]})]}),(0,to.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,to.jsx)(ca,{activeTab:n,onTabChange:r,tabOptions:l}),(0,to.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,to.jsx)(ha.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,to.jsx)(ha.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,to.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:w,children:[u,k]})})}),(0,to.jsx)(No,{}),(0,to.jsx)(oa,{children:(0,to.jsxs)(ia,{children:[(0,to.jsx)(ra,{asChild:!0,children:(0,to.jsx)(ha.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,to.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,to.jsx)(ha.motion.div,{animate:U>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:U>0?1/0:0,repeatDelay:3},children:(0,to.jsx)(ci.Bell,{className:"h-5 w-5"})}),U>0&&(0,to.jsx)(ha.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,to.jsx)(It,{children:"Notifications"})]})}),(0,to.jsx)(ha.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,to.jsxs)(Ge,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,to.jsx)(lt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,to.jsx)(_e,{})]})})]})]})]}),(0,to.jsx)(Co,{notifications:R,open:Z,onClose:()=>C(!1),onNotificationRemove:ie,onRemoveAll:x})]})}var To=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,to.jsx)(ci.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Mo({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=To[0],onBusinessUnitChange:i,onSearch:n,businessUnits:r=To,activeTab:d,onTabChange:l,showTabs:w=!1,onActionClick:u,actionIcon:k,actionText:f="Action",onNotificationRemove:A,onRemoveAll:b,logo:g="/headerlogo.png",appName:c="Nuvia",tagline:Z="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[R,L]=(0,Oa.useState)(!C),[U,ie]=(0,Oa.useState)(!1),[x,O]=(0,Oa.useState)(s),$=le=>{O(le),i?.(le)};return(0,to.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[U&&(0,to.jsx)("div",{className:"fixed inset-0 to-40 bg-black/50 md:hidden",onClick:()=>ie(!1)}),(0,to.jsx)("div",{className:"md:hidden",children:(0,to.jsx)(Aa,{items:e,isOpen:U,isMobile:!0,onClose:()=>ie(!1),currentBusinessUnit:x,onBusinessUnitChange:$,onSearch:n,logo:g,appName:c,tagline:Z})}),(0,to.jsx)("div",{className:"hidden md:block",children:(0,to.jsx)(Aa,{items:e,isOpen:R,isMobile:!1,currentBusinessUnit:x,onBusinessUnitChange:$,onSearch:n,logo:g,appName:c,tagline:Z})}),(0,to.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",R?"md:pl-64":"md:pl-0"),children:[(0,to.jsx)(Ro,{title:a,notifications:o,onToggleSidebar:()=>L(!R),onToggleMobileMenu:()=>ie(!0),sidebarOpen:R,activeTab:d,onTabChange:l,showTabs:w,onActionClick:u,actionIcon:k,actionText:f,onNotificationRemove:A,onRemoveAll:b,logo:g,appName:c,tagline:Z}),(0,to.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var pa=require("react-icons/ha");function Me({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:i,children:n,className:r}){let[d,l]=Zt(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),w=!s&&!t||d;return(0,to.jsxs)(ha.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${r||""}`,children:[(0,to.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,to.jsx)(_,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,to.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[w&&o&&(0,to.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,to.jsx)("button",{"aria-label":d?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>l(!d),style:{lineHeight:0},children:d?(0,to.jsx)(pa.FaChevronDown,{size:22}):(0,to.jsx)(pa.FaChevronUp,{size:22})})]})]}),!w&&(0,to.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,to.jsxs)("div",{className:"space-y-4",children:[(0,to.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,to.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,to.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,to.jsx)(y,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),n&&(0,to.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var mt=ae(require("react"));var X=mt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));X.displayName="Card";var se=mt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));se.displayName="CardHeader";var ce=mt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));ce.displayName="CardTitle";var jt=mt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:p("text-sm text-muted-foreground",e),...t}));jt.displayName="CardDescription";var Y=mt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:p("p-6 to-0",e),...t}));Y.displayName="CardContent";var Et=mt.forwardRef(({className:e,...t},a)=>(0,to.jsx)("div",{ref:a,className:p("flex items-center p-6 to-0",e),...t}));Et.displayName="CardFooter";var Bo=ae(require("react")),zt=ae(require("@radix-ui/react-progress"));var Ft=Bo.forwardRef(({className:e,value:t,...a},o)=>(0,to.jsx)(zt.Root,{ref:o,className:p("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,to.jsx)(zt.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ft.displayName=zt.Root.displayName;function ja({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:s}){return(0,to.jsx)(ha.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:s,children:(0,to.jsxs)(X,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,to.jsx)(se,{className:"pb-2",children:(0,to.jsxs)("div",{className:"flex items-center justify-between",children:[(0,to.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,to.jsx)(_,{className:"rounded-xl bg-amber-500",children:"New"}):(0,to.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,to.jsx)(ci.Star,{className:"h-4 w-4"})})]})}),(0,to.jsxs)(Y,{className:"pb-2",children:[(0,to.jsx)(ce,{className:"text-lg",children:e.name}),(0,to.jsx)(jt,{children:e.description}),o&&e.progress<100&&(0,to.jsxs)("div",{className:"mt-2",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,to.jsx)("span",{children:"Installation"}),(0,to.jsxs)("span",{children:[e.progress,"%"]})]}),(0,to.jsx)(Ft,{value:e.progress,className:"h-2 mt-1 rounded-xl"})]})]}),(0,to.jsx)(Et,{children:(0,to.jsx)(y,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function zo({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:i}){return(0,to.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[s&&(0,to.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,to.jsx)("div",{className:"col-span-6",children:"Name"}),(0,to.jsx)("div",{className:"col-span-2",children:"Size"}),(0,to.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,to.jsx)("div",{className:"divide-y",children:e.map(n=>(0,to.jsxs)(ha.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,to.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,to.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted",children:n.icon}),(0,to.jsx)("div",{children:(0,to.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,to.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:n.size}),(0,to.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,to.jsx)("span",{className:"text-sm md:text-base",children:n.modified}),(0,to.jsxs)("div",{className:"flex gap-1",children:[(0,to.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",onClick:r=>{r.stopPropagation(),a?.(n)},children:(0,to.jsx)(ci.Edit,{className:"h-4 w-4"})}),(0,to.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:r=>{r.stopPropagation(),o?.(n)},children:(0,to.jsx)(ci.Trash2,{className:"h-4 w-4"})}),(0,to.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl",children:(0,to.jsx)(ci.MoreHorizontal,{className:"h-4 w-4"})})]})]})]},n.name))})]})}function Uo({project:e,onOpen:t,onShare:a,className:o}){return(0,to.jsx)(ha.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,to.jsxs)(X,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,to.jsxs)(se,{children:[(0,to.jsxs)("div",{className:"flex items-center justify-between",children:[(0,to.jsx)(ce,{children:e.name}),(0,to.jsxs)(_,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,to.jsx)(jt,{children:e.description})]}),(0,to.jsxs)(Y,{className:"space-y-4",children:[(0,to.jsxs)("div",{className:"space-y-2",children:[(0,to.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,to.jsx)("span",{children:"Progress"}),(0,to.jsxs)("span",{children:[e.progress,"%"]})]}),(0,to.jsx)(Ft,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,to.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,to.jsxs)("div",{className:"flex items-center",children:[(0,to.jsx)(ci.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,to.jsxs)("div",{className:"flex items-center",children:[(0,to.jsx)(ci.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,to.jsxs)(Et,{className:"flex gap-2",children:[(0,to.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,to.jsx)(y,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,to.jsx)(ci.Share2,{className:"h-4 w-4"})})]})]})})}var Ea=[{name:"PixelMaster",icon:(0,to.jsx)(ci.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,to.jsx)(ci.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,to.jsx)(ci.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,to.jsx)(ci.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,to.jsx)(ci.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,to.jsx)(ci.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,to.jsx)(ci.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,to.jsx)(ci.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,to.jsx)(ci.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,to.jsx)(ci.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,to.jsx)(ci.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,to.jsx)(ci.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],Ho=[{name:"Brand Redesign.pxm",app:"PixelMaster",modified:"2 hours ago",icon:(0,to.jsx)(ci.ImageIcon,{className:"text-violet-500"}),shared:!0,size:"24.5 MB",collaborators:3},{name:"Company Logo.vec",app:"VectorPro",modified:"Yesterday",icon:(0,to.jsx)(ci.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,to.jsx)(ci.Video,{className:"text-pink-500"}),shared:!1,size:"1.2 GB",collaborators:0},{name:"UI Animation.mfx",app:"MotionFX",modified:"Last week",icon:(0,to.jsx)(ci.Sparkles,{className:"text-blue-500"}),shared:!0,size:"345 MB",collaborators:4},{name:"Magazine Layout.pgc",app:"PageCraft",modified:"2 weeks ago",icon:(0,to.jsx)(ci.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,to.jsx)(ci.LayoutGrid,{className:"text-fuchsia-500"}),shared:!0,size:"18.3 MB",collaborators:5},{name:"Product Photography.phl",app:"PhotoLab",modified:"Last month",icon:(0,to.jsx)(ci.Camera,{className:"text-teal-500"}),shared:!1,size:"156 MB",collaborators:0}];var Ko=[{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"}];var G=ae(require("@radix-ui/react-select")),rt=ae(require("react")),Ut=G.Root;var Ht=G.Value,Ct=rt.forwardRef(({children:e,className:t,...a},o)=>(0,to.jsxs)(G.Trigger,{className:p("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,to.jsx)(G.Icon,{asChild:!0,children:(0,to.jsx)(ci.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Ct.displayName=G.Trigger.displayName;var Oo=rt.forwardRef(({className:e,...t},a)=>(0,to.jsx)(G.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,to.jsx)(ci.ChevronUp,{className:"h-4 w-4"})}));Oo.displayName=G.ScrollUpButton.displayName;var Vo=rt.forwardRef(({className:e,...t},a)=>(0,to.jsx)(G.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,to.jsx)(ci.ChevronDown,{className:"h-4 w-4"})}));Vo.displayName=G.ScrollDownButton.displayName;var Dt=rt.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,to.jsx)(G.Portal,{children:(0,to.jsxs)(G.Content,{className:p("relative to-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:s,...o,children:[(0,to.jsx)(Oo,{}),(0,to.jsx)(G.Viewport,{className:p("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,to.jsx)(Vo,{})]})}));Dt.displayName=G.Content.displayName;var ur=rt.forwardRef(({className:e,...t},a)=>(0,to.jsx)(G.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));ur.displayName=G.Label.displayName;var Oe=rt.forwardRef(({children:e,className:t,...a},o)=>(0,to.jsxs)(G.Item,{className:p("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,to.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,to.jsx)(G.ItemIndicator,{children:(0,to.jsx)(ci.Check,{className:"h-4 w-4"})})}),(0,to.jsx)(G.ItemText,{children:e})]}));Oe.displayName=G.Item.displayName;var gr=rt.forwardRef(({className:e,...t},a)=>(0,to.jsx)(G.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));gr.displayName=G.Separator.displayName;function ua({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:s=!0,compact:i=!1,className:n}){let[r,d]=(0,$o.useState)(!1),l=k=>{switch(k){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},w=k=>{switch(k){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},u=k=>{if(!k)return"Never";let A=Math.floor((new Date().getTime()-k.getTime())/(1e3*60));return A<1?"Just now":A<60?`${A}m ago`:A<1440?`${Math.floor(A/60)}h ago`:`${Math.floor(A/1440)}d ago`};return(0,to.jsxs)(X,{className:p("hover:shadow-md transition-shadow",i&&"p-2",n),children:[(0,to.jsx)(se,{className:p("pb-3",i&&"pb-2"),children:(0,to.jsxs)("div",{className:"flex items-start justify-between",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[(0,to.jsx)("div",{className:"relative",children:(0,to.jsxs)(Ge,{className:p("h-12 w-12",i&&"h-8 w-8"),children:[(0,to.jsx)(lt,{src:"/placeholder.svg",alt:e.name}),(0,to.jsx)(_e,{children:e.name.split(" ").map(k=>k[0]).join("")})]})}),(0,to.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2",children:[(0,to.jsx)("h3",{className:p("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,to.jsx)(ci.Bot,{className:p("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,to.jsx)(ci.User,{className:p("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,to.jsx)("p",{className:p("text-sm text-muted-foreground truncate",i&&"text-xs"),children:e.type==="human"?e.role:e.description}),!i&&(0,to.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[e.type==="human"&&(0,to.jsx)(_,{variant:"secondary",className:"text-xs",children:e.department}),e.type==="digital"&&(0,to.jsxs)(_,{variant:"secondary",className:"text-xs",children:["to",e.version]}),(0,to.jsx)(_,{variant:"outline",className:"text-xs",children:w(e.status)})]})]})]}),s&&(0,to.jsxs)(la,{children:[(0,to.jsx)(da,{asChild:!0,children:(0,to.jsx)(y,{variant:"ghost",size:"icon",className:p("h-8 w-8",i&&"h-6 w-6"),children:(0,to.jsx)(ci.MoreHorizontal,{className:p("h-4 w-4",i&&"h-3 w-3")})})}),(0,to.jsxs)(Lt,{align:"end",children:[(0,to.jsxs)(ct,{onClick:()=>o?.(e),children:[(0,to.jsx)(ci.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,to.jsxs)(ct,{onClick:()=>t?.(e),children:[(0,to.jsx)(ci.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]}),(0,to.jsxs)(ct,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,to.jsx)(ci.Trash2,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),!i&&(0,to.jsxs)(Y,{className:"to-0",children:[(0,to.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,to.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,to.jsx)(ci.Mail,{className:"h-3 w-3"}),(0,to.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,to.jsxs)(to.Fragment,{children:[e.phone&&(0,to.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,to.jsx)(ci.Phone,{className:"h-3 w-3"}),(0,to.jsx)("span",{children:e.phone})]}),e.location&&(0,to.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,to.jsx)(ci.MapPin,{className:"h-3 w-3"}),(0,to.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,to.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,to.jsx)(ci.Settings,{className:"h-3 w-3"}),(0,to.jsxs)("span",{children:["to",e.version]})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,to.jsx)(ci.Clock,{className:"h-3 w-3"}),(0,to.jsxs)("span",{children:["Last active: ",u(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,to.jsx)("div",{className:"mt-3",children:(0,to.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,r?e.skills.length:3).map(k=>(0,to.jsx)(_,{variant:"outline",className:"text-xs",children:k},k)),e.skills.length>3&&(0,to.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>d(!r),children:r?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,to.jsx)("div",{className:"mt-3",children:(0,to.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,r?e.capabilities.length:2).map(k=>(0,to.jsx)(_,{variant:"outline",className:"text-xs",children:k},k)),e.capabilities.length>2&&(0,to.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>d(!r),children:r?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}var Wo=ae(require("react")),za=ae(require("@radix-ui/react-label"));var fr=(0,eo.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Je=Wo.forwardRef(({className:e,...t},a)=>(0,to.jsx)(za.Root,{ref:a,className:p(fr(),e),...t}));Je.displayName=za.Root.displayName;var qo=ae(require("react")),gt=qo.forwardRef(({className:e,...t},a)=>(0,to.jsx)("textarea",{className:p("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}));gt.displayName="Textarea";function Fa({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:s="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[r,d]=(0,Oa.useState)(""),[l,w]=(0,Oa.useState)([]),[u,k]=(0,Oa.useState)(!1);(0,Oa.useEffect)(()=>{if(!r.trim()){w([]),k(!1);return}let g=a.filter(c=>{if(e.map(R=>R.id).includes(c.id))return!1;let C=r.toLowerCase();return c.title.toLowerCase().includes(C)||c.description?.toLowerCase().includes(C)||c.tags?.some(R=>R.toLowerCase().includes(C))||Object.values(c.metadata||{}).some(R=>String(R).toLowerCase().includes(C))});w(g),k(!0)},[r,e,a]);let f=g=>{i&&e.length>=i||(t([...e,g]),d(""),k(!1))},A=g=>{t(e.filter(c=>c.id!==g))},b=!i||e.length<i;return(0,to.jsxs)("div",{className:"space-y-2",children:[(0,to.jsx)(Je,{children:o}),(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,to.jsx)(de,{value:r,onChange:g=>d(g.target.value),placeholder:b?s:`Maximum ${i} documents selected`,className:"pl-9",disabled:n||!b,onFocus:()=>r&&k(!0)})]}),u&&l.length>0&&(0,to.jsx)(X,{className:"absolute top-full left-0 right-0 to-10 mt-1 max-h-60",children:(0,to.jsx)(Ue,{className:"h-full",children:(0,to.jsx)(Y,{className:"p-2",children:l.map(g=>(0,to.jsx)(y,{variant:"ghost",className:"w-full justify-start h-auto p-3 mb-1",onClick:()=>f(g),disabled:n,children:(0,to.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,to.jsx)(ci.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,to.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,to.jsx)("div",{className:"font-medium text-sm truncate",children:g.title}),g.description&&(0,to.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:g.description}),g.tags&&g.tags.length>0&&(0,to.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[g.tags.slice(0,3).map(c=>(0,to.jsx)(_,{variant:"outline",className:"text-xs",children:c},c)),g.tags.length>3&&(0,to.jsxs)(_,{variant:"outline",className:"text-xs",children:["+",g.tags.length-3," more"]})]})]})]})},g.id))})})}),u&&r&&l.length===0&&(0,to.jsx)(X,{className:"absolute top-full left-0 right-0 to-10 mt-1",children:(0,to.jsxs)(Y,{className:"p-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',r,'"']})})]}),e.length>0&&(0,to.jsxs)("div",{className:"space-y-2",children:[(0,to.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,to.jsx)("div",{className:"space-y-2",children:e.map(g=>(0,to.jsx)(X,{className:"p-3",children:(0,to.jsxs)("div",{className:"flex items-start gap-3",children:[(0,to.jsx)(ci.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,to.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,to.jsx)("div",{className:"font-medium text-sm",children:g.title}),g.description&&(0,to.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:g.description}),g.tags&&g.tags.length>0&&(0,to.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:g.tags.map(c=>(0,to.jsxs)(_,{variant:"outline",className:"text-xs",children:[(0,to.jsx)(ci.Tag,{className:"h-3 w-3 mr-1"}),c]},c))})]}),(0,to.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>A(g.id),disabled:n,children:(0,to.jsx)(ci.X,{className:"h-3 w-3"})})]})},g.id))})]}),u&&(0,to.jsx)("div",{className:"fixed inset-0 to-0",onClick:()=>k(!1)})]})}function Ua({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:i,cancelLabel:n="Cancel",readOnly:r=!1,availableKnowledgeDocuments:d=[]}){let[l,w]=(0,Oa.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[u,k]=(0,Oa.useState)(""),[f,A]=(0,Oa.useState)(""),[b,g]=(0,Oa.useState)(!r);(0,Oa.useEffect)(()=>{e&&w(e)},[e]);let c=x=>{x.preventDefault();let O=l.version?parseInt(l.version):0,$=e?(O+1).toString():"1",le={id:l.id||Date.now().toString(),name:l.name,type:"digital",status:"active",joinedDate:l.joinedDate||new Date,lastActive:l.lastActive||new Date,description:l.description,jobDescription:l.jobDescription||"",workInstructions:l.workInstructions||"",capabilities:l.capabilities||[],knowledge:l.knowledge||[],coreKnowledge:l.coreKnowledge||[],version:$,lastUpdated:l.lastUpdated||new Date,isActive:!0};t(le)},Z=(x,O,$)=>{if(!O.trim())return;let le=l[x]||[];w({...l,[x]:[...le,O.trim()]}),$("")},C=(x,O)=>{let $=l[x]||[];w({...l,[x]:$.filter((le,q)=>q!==O)})},R=x=>{x.preventDefault(),g(!b)},L=(x,O,$,le,q)=>{let Be=l[x]||[];return(0,to.jsxs)("div",{className:"space-y-2",children:[(0,to.jsx)(Je,{children:O}),b&&(0,to.jsxs)("div",{className:"flex gap-2",children:[(0,to.jsx)(de,{value:$,onChange:m=>le(m.target.value),placeholder:q,onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),Z(x,$,le))},disabled:o}),(0,to.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>Z(x,$,le),disabled:o,children:(0,to.jsx)(ci.Plus,{className:"h-4 w-4"})})]}),(0,to.jsx)("div",{className:"flex flex-wrap gap-2",children:Be.map((m,ee)=>(0,to.jsxs)(_,{className:"gap-1",children:[m,b&&(0,to.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>C(x,ee),disabled:o,children:(0,to.jsx)(ci.X,{className:"h-3 w-3"})})]},`${x}-${ee}-${m}`))})]})},U=s||(b?e?"Edit Colleague":"Add New Colleague":"View Colleague"),ie=i||(e?"Update Colleague":"Add Colleague");return(0,to.jsxs)(X,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,to.jsx)(se,{children:(0,to.jsxs)(ce,{className:"flex items-center gap-2",children:[(0,to.jsx)(ci.Bot,{className:"h-5 w-5"}),U]})}),(0,to.jsx)(Y,{children:(0,to.jsxs)("form",{onSubmit:c,className:"space-y-6",children:[(0,to.jsxs)("div",{className:"space-y-4",children:[(0,to.jsxs)("div",{className:"space-y-2",children:[(0,to.jsx)(Je,{htmlFor:"name",children:"Name *"}),(0,to.jsx)(de,{id:"name",value:l.name||"",onChange:x=>w({...l,name:x.target.value}),required:!0,disabled:o||!b})]}),(0,to.jsxs)("div",{className:"space-y-2",children:[(0,to.jsx)(Je,{htmlFor:"description",children:"Description"}),(0,to.jsx)(gt,{id:"description",value:l.description||"",onChange:x=>w({...l,description:x.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!b})]})]}),(0,to.jsxs)("div",{className:"space-y-4",children:[(0,to.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,to.jsxs)("div",{className:"space-y-2",children:[(0,to.jsx)(Je,{htmlFor:"jobDescription",children:"Job Description *"}),(0,to.jsx)(gt,{id:"jobDescription",value:l.jobDescription||"",onChange:x=>w({...l,jobDescription:x.target.value}),rows:4,required:l.type==="digital",disabled:o||!b})]}),(0,to.jsxs)("div",{className:"space-y-2",children:[(0,to.jsx)(Je,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,to.jsx)(gt,{id:"workInstructions",value:l.workInstructions||"",onChange:x=>w({...l,workInstructions:x.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!b})]}),L("capabilities","Capabilities",f,A,"Add capability"),(0,to.jsx)(Fa,{selectedDocuments:l.knowledge||[],onDocumentsChange:x=>w({...l,knowledge:x}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:o||!b,availableDocuments:d}),(0,to.jsx)(Fa,{selectedDocuments:l.coreKnowledge||[],onDocumentsChange:x=>w({...l,coreKnowledge:x}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!b,availableDocuments:d})]}),(0,to.jsxs)("div",{className:"flex justify-end gap-2 to-4 border-t",children:[(0,to.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:b?n:"Close"}),b?(0,to.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":ie}):(0,to.jsxs)(y,{type:"button",onClick:R,disabled:o,className:"gap-2",children:[(0,to.jsx)(ci.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Xo({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[s,i]=(0,Oa.useState)(""),n=(0,Oa.useMemo)(()=>e.filter(d=>d.name.toLowerCase().includes(s.toLowerCase())||d.email.toLowerCase().includes(s.toLowerCase())||d.role.toLowerCase().includes(s.toLowerCase())||(d.skills||[]).some(w=>w.toLowerCase().includes(s.toLowerCase()))),[e,s]),r=d=>{t(d)};return(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,to.jsx)(ha.AnimatePresence,{mode:"wait",children:(0,to.jsxs)(ha.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,to.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,to.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,to.jsx)(ci.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),(0,to.jsx)(X,{className:"container",children:(0,to.jsx)(Y,{className:"to-6",children:(0,to.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,to.jsx)("div",{className:"flex-1",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,to.jsx)(de,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:d=>i(d.target.value),className:"pl-9"})]})})})})}),(0,to.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(d=>(0,to.jsx)(ha.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,to.jsxs)(X,{className:`cursor-pointer transition-all hover:shadow-lg ${o===d.id?"ring-2 ring-primary":""}`,onClick:()=>r(d),children:[(0,to.jsx)(se,{className:"pb-3",children:(0,to.jsxs)("div",{className:"flex items-start justify-between",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[(0,to.jsxs)(Ge,{children:[(0,to.jsx)(lt,{src:d.avatar,alt:d.name}),(0,to.jsx)(_e,{children:(0,to.jsx)(ci.User,{className:"h-4 w-4"})})]}),(0,to.jsxs)("div",{children:[(0,to.jsx)(ce,{className:"text-lg",children:d.name}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:d.role})]})]}),o===d.id&&(0,to.jsx)(ci.Check,{className:"h-5 w-5 text-primary"})]})}),(0,to.jsx)(Y,{className:"to-0",children:(0,to.jsxs)("div",{className:"space-y-3",children:[(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,to.jsx)("p",{className:"text-sm font-medium",children:d.email})]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"}),(0,to.jsx)(_,{variant:"secondary",children:d.department})]}),d.location&&(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Location"}),(0,to.jsx)("p",{className:"text-sm",children:d.location})]}),d.skills&&d.skills.length>0&&(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,to.jsxs)("div",{className:"flex flex-wrap gap-1",children:[d.skills.slice(0,3).map(l=>(0,to.jsx)(_,{variant:"outline",className:"text-xs",children:l},l)),d.skills.length>3&&(0,to.jsxs)(_,{variant:"outline",className:"text-xs",children:["+",d.skills.length-3]})]})]})]})})]})},d.id))}),n.length===0&&(0,to.jsx)(X,{className:"container mt-4",children:(0,to.jsx)(Y,{className:"to-6",children:(0,to.jsxs)("div",{className:"text-center py-8",children:[(0,to.jsx)(ci.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function Yo({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[s,i]=(0,Oa.useState)(""),[n,r]=(0,Oa.useState)("all"),d=(0,Oa.useMemo)(()=>e.filter(u=>{let k=u.name.toLowerCase().includes(s.toLowerCase())||u.jobDescription.toLowerCase().includes(s.toLowerCase())||u.capabilities.some(A=>A.toLowerCase().includes(s.toLowerCase()))||u.workInstructions.toLowerCase().includes(s.toLowerCase()),f=n==="all"||u.status===n;return k&&f}),[e,s,n]),l=u=>{let k={...u,id:`${u.id}-clone-${Date.now()}`,name:`${u.name} (Copy)`,joinedDate:new Date,lastActive:new Date,lastUpdated:new Date,version:"1.0.0"};t(k)},w=u=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(u);return(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,to.jsx)(ha.AnimatePresence,{mode:"wait",children:(0,to.jsxs)(ha.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,to.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,to.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,to.jsx)(ci.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,to.jsx)(X,{children:(0,to.jsx)(Y,{className:"to-6",children:(0,to.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,to.jsx)("div",{className:"flex-1",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,to.jsx)(de,{placeholder:"Search by name, job description, or capabilities...",value:s,onChange:u=>i(u.target.value),className:"pl-9"})]})}),(0,to.jsxs)("select",{value:n,onChange:u=>r(u.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,to.jsx)("option",{value:"all",children:"All Status"}),(0,to.jsx)("option",{value:"active",children:"Active"}),(0,to.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,to.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:d.map(u=>(0,to.jsx)(ha.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,to.jsxs)(X,{className:`cursor-pointer transition-all hover:shadow-lg ${o===u.id?"ring-2 ring-primary":""}`,onClick:()=>l(u),children:[(0,to.jsx)(se,{className:"pb-3",children:(0,to.jsxs)("div",{className:"flex items-start justify-between",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3",children:[(0,to.jsx)(Ge,{children:(0,to.jsx)(_e,{className:"bg-blue-100",children:(0,to.jsx)(ci.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,to.jsxs)("div",{children:[(0,to.jsxs)(ce,{className:"text-lg flex items-center gap-2",children:[u.name,(0,to.jsx)(_,{variant:u.status==="active"?"default":"secondary",className:"text-xs",children:u.status})]}),(0,to.jsxs)("p",{className:"text-sm text-muted-foreground",children:["to",u.version]})]})]}),(0,to.jsxs)(y,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:k=>{k.stopPropagation(),l(u)},children:[(0,to.jsx)(ci.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,to.jsx)(Y,{className:"to-0",children:(0,to.jsxs)("div",{className:"space-y-3",children:[(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,to.jsx)("p",{className:"text-sm line-clamp-2",children:u.jobDescription})]}),u.capabilities&&u.capabilities.length>0&&(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,to.jsxs)("div",{className:"flex flex-wrap gap-1",children:[u.capabilities.slice(0,3).map(k=>(0,to.jsx)(_,{variant:"outline",className:"text-xs",children:k},k)),u.capabilities.length>3&&(0,to.jsxs)(_,{variant:"outline",className:"text-xs",children:["+",u.capabilities.length-3]})]})]}),(0,to.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,to.jsxs)("div",{className:"flex items-center gap-1",children:[(0,to.jsx)(ci.Calendar,{className:"h-3 w-3"}),(0,to.jsxs)("span",{children:["Updated ",w(u.lastUpdated)]})]}),u.knowledge&&(0,to.jsxs)("div",{className:"flex items-center gap-1",children:[(0,to.jsx)(ci.Users,{className:"h-3 w-3"}),(0,to.jsxs)("span",{children:[u.knowledge.length," docs"]})]})]}),u.workInstructions&&(0,to.jsxs)("div",{children:[(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,to.jsx)("p",{className:"text-xs line-clamp-2",children:u.workInstructions})]})]})})]})},u.id))}),d.length===0&&(0,to.jsx)(X,{children:(0,to.jsx)(Y,{className:"to-6",children:(0,to.jsxs)("div",{className:"text-center py-8",children:[(0,to.jsx)(ci.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Qo({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,to.jsx)(ha.AnimatePresence,{mode:"wait",children:(0,to.jsxs)(ha.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,to.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,to.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,to.jsx)(ci.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,to.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,to.jsx)(ha.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,to.jsxs)(X,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,to.jsxs)(se,{className:"text-center pb-4",children:[(0,to.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,to.jsx)(ci.User,{className:"h-8 w-8 text-blue-600"})}),(0,to.jsx)(ce,{className:"text-xl",children:"Add Human Colleague"})]}),(0,to.jsxs)(Y,{className:"text-center",children:[(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add as team members."}),(0,to.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(ci.Users,{className:"h-4 w-4 text-blue-600"}),(0,to.jsx)("span",{children:"Browse existing users"})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(ci.User,{className:"h-4 w-4 text-blue-600"}),(0,to.jsx)("span",{children:"Import user details automatically"})]})]}),(0,to.jsx)(y,{className:"mt-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,to.jsx)(ha.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,to.jsxs)(X,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,to.jsxs)(se,{className:"text-center pb-4",children:[(0,to.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,to.jsx)(ci.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,to.jsx)(ce,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,to.jsxs)(Y,{className:"text-center",children:[(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,to.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(ci.Bot,{className:"h-4 w-4 text-purple-600"}),(0,to.jsx)("span",{children:"Clone existing colleagues"})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(ci.Users,{className:"h-4 w-4 text-purple-600"}),(0,to.jsx)("span",{children:"Create from templates"})]})]}),(0,to.jsx)(y,{className:"mt-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Zo({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,to.jsx)(ha.AnimatePresence,{mode:"wait",children:(0,to.jsxs)(ha.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,to.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,to.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,to.jsx)(ci.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,to.jsxs)("div",{children:[(0,to.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,to.jsx)("p",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,to.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,to.jsx)(ha.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,to.jsxs)(X,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,to.jsxs)(se,{className:"text-center pb-4",children:[(0,to.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,to.jsx)(ci.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,to.jsx)(ce,{className:"text-xl",children:"Clone Existing"})]}),(0,to.jsxs)(Y,{className:"text-center",children:[(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize ci for your needs."}),(0,to.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(ci.Bot,{className:"h-4 w-4 text-blue-600"}),(0,to.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(ci.Copy,{className:"h-4 w-4 text-blue-600"}),(0,to.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,to.jsx)(y,{className:"mt-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,to.jsx)(ha.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,to.jsxs)(X,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,to.jsxs)(se,{className:"text-center pb-4",children:[(0,to.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,to.jsx)(ci.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,to.jsx)(ce,{className:"text-xl",children:"Create New"})]}),(0,to.jsxs)(Y,{className:"text-center",children:[(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,to.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(ci.Plus,{className:"h-4 w-4 text-green-600"}),(0,to.jsx)("span",{children:"Custom job description"})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,to.jsx)(ci.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,to.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,to.jsx)(y,{className:"mt-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}function Ha({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:s=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:r=[],existingDigitalColleagues:d=[]}){let[l,w]=(0,Oa.useState)(e||[]),[u,k]=(0,Oa.useState)(""),[f,A]=(0,Oa.useState)("all"),[b,g]=(0,Oa.useState)("all"),[c,Z]=(0,Oa.useState)("all"),[C,R]=(0,Oa.useState)(null),[L,U]=(0,Oa.useState)(null),[ie,x]=(0,Oa.useState)("main"),O=l.filter(h=>{let ke=h.name.toLowerCase().includes(u.toLowerCase())||h.type==="human"&&(h.email.toLowerCase().includes(u.toLowerCase())||h.role.toLowerCase().includes(u.toLowerCase()))||h.type==="digital"&&h.jobDescription.toLowerCase().includes(u.toLowerCase()),xe=f==="all"||h.type==="human"&&h.department===f,xa=b==="all"||h.status===b;return ke&&xe&&xa}),$=O.filter(h=>h.type==="human"),le=O.filter(h=>h.type==="digital"),q=()=>{x("typeSelection")},Be=h=>{h.type==="digital"&&(R(h),x("form"))},m=h=>{h.type==="digital"&&(U(h),x("view"))},ee=h=>{let ke={id:`human-${Date.now()}`,type:"human",name:h.name,email:h.email,role:h.role,department:h.department,phone:h.phone,location:h.location,timezone:h.timezone,skills:h.skills,bio:h.bio,status:"active",joinedDate:new Date,lastActive:new Date};w(xe=>[...xe,ke]),t?.(ke),x("main")},te=h=>{w(ke=>[...ke,h]),t?.(h),x("main")},Le=()=>{R(null),x("form")},we=h=>{C?(w(ke=>ke.map(xe=>xe.id===h.id?h:xe)),a?.(h)):(w(ke=>[...ke,h]),t?.(h)),x("main"),R(null)},nt=()=>{x("main"),R(null),U(null)},$t=()=>{x("main"),U(null)},Fe=()=>{L&&(R(L),U(null),x("form"))},ba=h=>{w(ke=>ke.filter(xe=>xe.id!==h)),o?.(h)},pi=()=>{k(""),A("all"),g("all")},Va=()=>{let h=[];return d.forEach(xe=>{h.push(...xe.knowledge,...xe.coreKnowledge)}),l.forEach(xe=>{xe.type==="digital"&&h.push(...xe.knowledge,...xe.coreKnowledge)}),h.filter((xe,xa,ui)=>xa===ui.findIndex(gi=>gi.id===xe.id))};return ie==="typeSelection"?(0,to.jsx)(Qo,{onSelectHuman:()=>x("userSelection"),onSelectDigital:()=>x("digitalOptions"),onCancel:()=>x("main")}):ie==="userSelection"?(0,to.jsx)(Xo,{users:r,onUserSelect:ee,onCancel:()=>x("typeSelection")}):ie==="digitalOptions"?(0,to.jsx)(Zo,{onCloneExisting:()=>x("digitalClone"),onCreateNew:Le,onCancel:()=>x("typeSelection")}):ie==="digitalClone"?(0,to.jsx)(Yo,{digitalColleagues:d,onColleagueClone:te,onCancel:()=>x("digitalOptions")}):ie==="form"?(0,to.jsx)(Ua,{colleague:C||void 0,onSave:we,onCancel:nt,availableKnowledgeDocuments:Va()}):ie==="view"?(0,to.jsx)(Ua,{colleague:L||void 0,onSave:we,onCancel:$t,readOnly:!0,availableKnowledgeDocuments:Va()}):(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,to.jsx)(ha.AnimatePresence,{mode:"wait",children:(0,to.jsx)(ha.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,to.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,to.jsx)(Me,{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:q}}),(0,to.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,to.jsxs)(X,{children:[(0,to.jsxs)(se,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,to.jsx)(ce,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,to.jsx)(ci.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,to.jsxs)(Y,{children:[(0,to.jsx)("div",{className:"text-2xl font-bold",children:l.length}),(0,to.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(h=>h.status==="active").length," active"]})]})]}),(0,to.jsxs)(X,{children:[(0,to.jsxs)(se,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,to.jsx)(ce,{className:"text-sm font-medium",children:"Human Members"}),(0,to.jsx)(ci.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,to.jsxs)(Y,{children:[(0,to.jsx)("div",{className:"text-2xl font-bold",children:l.filter(h=>h.type==="human").length}),(0,to.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(h=>h.type==="human"&&h.status==="active").length," active"]})]})]}),(0,to.jsxs)(X,{children:[(0,to.jsxs)(se,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,to.jsx)(ce,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,to.jsx)(ci.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,to.jsxs)(Y,{children:[(0,to.jsx)("div",{className:"text-2xl font-bold",children:l.filter(h=>h.type==="digital").length}),(0,to.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(h=>h.type==="digital"&&h.status==="active").length," active"]})]})]})]}),(0,to.jsx)(X,{children:(0,to.jsx)(Y,{className:"to-6",children:(0,to.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,to.jsx)("div",{className:"flex-1",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,to.jsx)(de,{placeholder:"Search colleagues...",value:u,onChange:h=>k(h.target.value),className:"pl-9"})]})}),(0,to.jsxs)(Ut,{value:f,onValueChange:A,children:[(0,to.jsx)(Ct,{className:"w-full md:w-[180px]",children:(0,to.jsx)(Ht,{placeholder:"Department"})}),(0,to.jsxs)(Dt,{children:[(0,to.jsx)(Oe,{value:"all",children:"All Departments"}),i.map(h=>(0,to.jsx)(Oe,{value:h,children:h},h))]})]}),(0,to.jsxs)(Ut,{value:b,onValueChange:g,children:[(0,to.jsx)(Ct,{className:"w-full md:w-[140px]",children:(0,to.jsx)(Ht,{placeholder:"Status"})}),(0,to.jsxs)(Dt,{children:[(0,to.jsx)(Oe,{value:"all",children:"All Status"}),(0,to.jsx)(Oe,{value:"active",children:"Active"}),(0,to.jsx)(Oe,{value:"inactive",children:"Inactive"})]})]}),(u||f!=="all"||b!=="all")&&(0,to.jsxs)(y,{variant:"outline",onClick:pi,className:"gap-2",children:[(0,to.jsx)(ci.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,to.jsxs)("div",{className:"space-y-4",children:[(0,to.jsx)(ca,{activeTab:c,onTabChange:Z,tabOptions:[{value:"all",label:`All (${O.length})`},{value:"human",label:`Human (${$.length})`},{value:"digital",label:`Digital (${le.length})`}],maxWidth:"400px",gridCols:3}),c==="all"&&(0,to.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:O.map(h=>(0,to.jsx)(ua,{colleague:h,onEdit:Be,onDelete:ba,onViewDetails:m,compact:s},h.id))}),c==="human"&&(0,to.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:$.map(h=>(0,to.jsx)(ua,{colleague:h,onEdit:Be,onDelete:ba,onViewDetails:m,compact:s},h.id))}),c==="digital"&&(0,to.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:le.map(h=>(0,to.jsx)(ua,{colleague:h,onEdit:Be,onDelete:ba,onViewDetails:m,compact:s},h.id))})]}),O.length===0&&(0,to.jsx)(X,{children:(0,to.jsx)(Y,{className:"to-6",children:(0,to.jsxs)("div",{className:"text-center py-8",children:[(0,to.jsx)(ci.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,to.jsx)("p",{className:"text-muted-foreground mb-4",children:u||f!=="all"||b!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,to.jsxs)(y,{onClick:q,className:"gap-2",children:[(0,to.jsx)(ci.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function ti({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:s=[]}){let[i,n]=(0,Oa.useState)({...e,updatedAt:new Date}),[r,d]=(0,Oa.useState)(!1),[l,w]=(0,Oa.useState)(!1),u=()=>{let C=new Set,R=new Set;return s.forEach(L=>{L.menuConfig.groupBy.forEach(U=>C.add(U))}),o.forEach(L=>{L.metadata&&Object.keys(L.metadata).forEach(U=>R.add(U))}),{contextKeys:Array.from(C).sort(),documentKeys:Array.from(R).sort(),allKeys:Array.from(new Set([...C,...R])).sort()}},k=C=>{let R=new Set;return o.forEach(L=>{L.metadata?.[C]&&R.add(String(L.metadata[C]))}),Array.from(R).sort()},f=u(),A=()=>{t(i)},b=(C,R)=>{n(L=>({...L,metadata:{...L.metadata,[C]:R}}))},g=(C,R)=>{R==="__custom__"?b(C,""):b(C,R)},c=()=>{let C=`field_${Date.now()}`;b(C,"")},Z=C=>{n(R=>{let L={...R.metadata};return delete L[C],{...R,metadata:L}})};return(0,to.jsxs)(ha.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,to.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,to.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,to.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,to.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,to.jsx)(ci.Edit3,{className:"h-6 w-6 text-primary"})}),(0,to.jsx)("div",{className:"flex-1 min-w-0",children:l?(0,to.jsx)(de,{value:i.title,onChange:C=>n(R=>({...R,title:C.target.value})),onBlur:()=>w(!1),onKeyDown:C=>{C.key==="Enter"&&w(!1),C.key==="Escape"&&(n(R=>({...R,title:e.title})),w(!1))},autoFocus:!0,className:"text-xl font-bold border-none p-0 h-auto bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0",placeholder:"Document title..."}):(0,to.jsxs)("div",{className:"flex items-center gap-2 group",children:[(0,to.jsx)("h1",{className:"text-xl font-bold text-foreground cursor-pointer hover:text-primary transition-colors py-1",onClick:()=>w(!0),title:"Click to edit title",children:i.title||"Untitled Document"}),(0,to.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>w(!0),className:"opacity-0 group-hover:opacity-100 transition-opacity h-6 w-6 p-0",children:(0,to.jsx)(ci.Edit3,{className:"h-3 w-3"})})]})})]}),(0,to.jsxs)("div",{className:"flex gap-2",children:[(0,to.jsxs)(y,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,to.jsx)(ci.X,{className:"h-4 w-4"}),"Cancel"]}),(0,to.jsxs)(y,{size:"sm",onClick:A,className:"gap-2",children:[(0,to.jsx)(ci.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,to.jsxs)("div",{className:"space-y-4",children:[(0,to.jsxs)("div",{children:[(0,to.jsx)("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Description"}),(0,to.jsx)(de,{value:i.description||"",onChange:C=>n(R=>({...R,description:C.target.value})),placeholder:"Brief description...",className:"text-sm"})]}),(0,to.jsxs)("div",{children:[(0,to.jsxs)("button",{type:"button",onClick:()=>d(!r),className:"flex items-center justify-between w-full p-3 bg-muted/20 hover:bg-muted/30 rounded-lg border border-border transition-colors",children:[(0,to.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,to.jsx)(ci.ChevronDown,{className:"h-4 w-4 text-muted-foreground"}):(0,to.jsx)(ci.ChevronRight,{className:"h-4 w-4 text-muted-foreground"}),(0,to.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Metadata"}),i.metadata&&Object.keys(i.metadata).length>0&&(0,to.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,to.jsxs)("div",{className:"flex items-center gap-2",children:[f.contextKeys.length>0&&!r&&(0,to.jsxs)("span",{className:"text-xs text-muted-foreground",children:[f.contextKeys.slice(0,2).join(", "),f.contextKeys.length>2&&"..."]}),(0,to.jsxs)(y,{type:"button",variant:"ghost",size:"sm",onClick:C=>{C.stopPropagation(),c(),d(!0)},className:"gap-1 h-6 px-2",children:[(0,to.jsx)(ci.Plus,{className:"h-3 w-3"}),"Add"]})]})]}),r&&(0,to.jsx)("div",{className:"mt-3 space-y-2 pl-6",children:i.metadata&&Object.keys(i.metadata).length>0?Object.entries(i.metadata).map(([C,R])=>{let L=k(C);return(0,to.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,to.jsx)(de,{value:C,onChange:U=>{let ie=U.target.value,x=i.metadata?.[C];n(O=>{let $={...O.metadata};return delete $[C],ie&&($[ie]=x||""),{...O,metadata:$}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${C}`}),(0,to.jsx)("datalist",{id:`metadata-keys-${C}`,children:f.allKeys.map(U=>(0,to.jsx)("option",{value:U},U))}),(0,to.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),L.length>0?(0,to.jsxs)(Ut,{value:String(R||""),onValueChange:U=>g(C,U),children:[(0,to.jsx)(Ct,{className:"flex-1 h-8 text-sm",children:(0,to.jsx)(Ht,{placeholder:"Value"})}),(0,to.jsxs)(Dt,{children:[L.map(U=>(0,to.jsx)(Oe,{value:U,children:U},U)),(0,to.jsx)(Oe,{value:"__custom__",children:(0,to.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,to.jsx)(de,{value:String(R||""),onChange:U=>b(C,U.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,to.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:()=>Z(C),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,to.jsx)(ci.X,{className:"h-3 w-3"})})]},C)}):(0,to.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/10",children:(0,to.jsx)("p",{className:"text-xs text-muted-foreground",children:"No metadata fields yet"})})})]}),(0,to.jsxs)("div",{className:"flex items-center gap-2",children:[(0,to.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,to.jsx)(_,{variant:"secondary",className:"font-mono",children:i.format.toUpperCase()})]})]})]}),(0,to.jsx)("div",{className:"flex-1 overflow-auto",children:(0,to.jsxs)("div",{className:"p-8",children:[(0,to.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,to.jsx)(gt,{value:i.content||"",onChange:C=>n(R=>({...R,content:C.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var ri=e=>(0,to.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>')}}),ai=e=>(0,to.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),vr=e=>(0,to.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,to.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,to.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,to.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,to.jsx)("pre",{className:"text-sm",children:e})]}),hr=e=>(0,to.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,to.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,to.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,to.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),ri(e)]});function si({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:s=[],knowledgeContexts:i=[]}){let[n,r]=(0,Oa.useState)(!1),d=f=>{switch(f){case"markdown":case"mdx":return(0,to.jsx)(ci.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,to.jsx)(ci.File,{className:"h-6 w-6 text-success"});case"text":return(0,to.jsx)(ci.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,to.jsx)(ci.File,{className:"h-6 w-6 text-muted-foreground"})}},l=f=>{switch(f){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"}},w=(f,A)=>{let b={markdown:ri,mdx:hr,richtext:vr,text:ai},g=o?.[A]||b[A];return g?g(f):ai(f)},u=f=>{r(!1),t?.(f)},k=()=>{r(!1)};return n?(0,to.jsx)(ti,{document:e,onSave:u,onCancel:k,availableDocuments:s,knowledgeContexts:i}):(0,to.jsxs)(ha.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,to.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,to.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,to.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,to.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:d(e.format)}),(0,to.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,to.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,to.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,to.jsx)("div",{className:"flex-shrink-0",children:(0,to.jsxs)(y,{variant:"outline",size:"sm",onClick:()=>r(!0),className:"gap-2",children:[(0,to.jsx)(ci.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,to.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,to.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${l(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(f=>(0,to.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",f]},f))]})]}),(0,to.jsx)("div",{className:"flex-1 overflow-auto",children:(0,to.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,to.jsxs)("div",{className:"mb-6",children:[(0,to.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,to.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,to.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(([f,A])=>(0,to.jsxs)("div",{className:"flex gap-1",children:[(0,to.jsxs)("span",{className:"text-muted-foreground font-medium",children:[f.replace(/([A-Z])/g," $1").trim(),":"]}),(0,to.jsx)("span",{className:"text-foreground truncate",children:String(A)})]},f))})})]}),(0,to.jsx)("div",{className:"space-y-4",children:e.content?(0,to.jsx)("div",{className:"relative",children:(0,to.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:w(e.content,e.format)})}):(0,to.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,to.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,to.jsx)(ci.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,to.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,to.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function ni({label:e,documents:t,children:a,level:o,onDocumentClick:s,selectedDocumentId:i,showDocumentCount:n=!0}){let[r,d]=(0,Oa.useState)(o===0),l=a&&Object.keys(a).length>0,w=t.length+(a?Object.values(a).reduce((f,A)=>f+A.documents.length,0):0),u=f=>{switch(f){case"markdown":case"mdx":return(0,to.jsx)(ci.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,to.jsx)(ci.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,to.jsx)(ci.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},k=f=>{let A=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return A[f%A.length]};return(0,to.jsxs)("div",{className:"space-y-1",children:[(l||t.length>0)&&(0,to.jsxs)(ha.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${r?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>d(!r),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,to.jsx)("div",{className:`w-1 h-6 rounded-full ${k(o)}`}),(0,to.jsx)(ha.motion.div,{animate:{rotate:r?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,to.jsx)(ci.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,to.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,to.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,to.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&w>0&&(0,to.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,to.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:w})})]})]}),(0,to.jsx)(ha.motion.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,to.jsxs)("div",{className:"to-2 space-y-1",children:[t.map((f,A)=>(0,to.jsxs)(ha.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:A*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===f.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>s?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,to.jsx)("div",{className:"flex-shrink-0",children:u(f.format)}),(0,to.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,to.jsx)("p",{className:`text-sm truncate transition-colors ${i===f.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,to.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,to.jsx)("div",{className:"flex-shrink-0",children:(0,to.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.id)),a&&Object.entries(a).map(([f,A])=>(0,to.jsx)(ni,{label:f,documents:A.documents,children:A.children,level:o+1,onDocumentClick:s,selectedDocumentId:i,showDocumentCount:n},f))]})})]})}function li({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:s,selectedDocumentId:i,className:n,editable:r=!0}){let[d,l]=(0,Oa.useState)(""),[w,u]=(0,Oa.useState)(null),k=(0,Oa.useMemo)(()=>d?e.filter(b=>b.title.toLowerCase().includes(d.toLowerCase())||b.description?.toLowerCase().includes(d.toLowerCase())||b.tags?.some(g=>g.toLowerCase().includes(d.toLowerCase()))||Object.values(b.metadata||{}).some(g=>String(g).toLowerCase().includes(d.toLowerCase()))):e,[e,d]),f=(0,Oa.useMemo)(()=>{let b=(g,c)=>{if(c.length===0)return{};let[Z,...C]=c;return g.reduce((L,U)=>{let ie=U.metadata?.[Z]||"Uncategorized",x=String(ie);if(L[x]||(L[x]={documents:[],children:{}}),C.length===0)L[x].documents.push(U);else{let O=b([U],C),$=Object.keys(O)[0];$&&(L[x].children||(L[x].children={}),L[x].children[$]?L[x].children[$].documents.push(...O[$].documents):L[x].children[$]=O[$])}return L},{})};return b(k,t.groupBy)},[k,t.groupBy]),A=b=>{u(b),a?.(b)};return(0,to.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,to.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,to.jsx)("div",{className:"p-6 border-b border-border",children:(0,to.jsxs)("div",{className:"relative",children:[(0,to.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,to.jsx)(ci.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,to.jsx)(de,{placeholder:"Search knowledge base...",value:d,onChange:b=>l(b.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,to.jsx)(Ue,{className:"h-[calc(100%-100px)]",children:(0,to.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(f).map(([b,g])=>(0,to.jsx)(ni,{label:b,documents:g.documents,children:g.children,level:0,onDocumentClick:A,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},b)),Object.keys(f).length===0&&(0,to.jsxs)(ha.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,to.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,to.jsx)(ci.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,to.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,to.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,to.jsx)("div",{className:"flex-1 bg-background",children:w?(0,to.jsx)(si,{document:w,onDocumentUpdate:s,editable:r}):(0,to.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,to.jsxs)(ha.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,to.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,to.jsx)(ci.FileText,{className:"h-10 w-10 text-primary"})}),(0,to.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,to.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function Ka({documents:e=[],contexts:t=[],onDocumentClick:a=n=>console.log("Document clicked:",n),onDocumentShare:o=n=>console.log("Share document:",n),onLoadDocumentContent:s,selectedDocumentId:i}){let[n,r]=(0,Oa.useState)(t[0]);return!t||t.length===0?(0,to.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,to.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,to.jsx)(Me,{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,to.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,to.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,to.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,to.jsx)(Me,{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,to.jsxs)("div",{className:"mt-6",children:[(0,to.jsx)("div",{className:"border-b border-border",children:(0,to.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(d=>(0,to.jsxs)("button",{onClick:()=>r(d),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===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))})}),n.description&&(0,to.jsx)("div",{className:"mt-3 px-1",children:(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,to.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,to.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,to.jsx)(li,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function mi({title:e="Digital Colleagues",businessUnits:t}){let[a,o]=(0,Oa.useState)("home"),[s,i]=(0,Oa.useState)(t[0]),n=c=>{console.log("Opening app:",c.name)},r=c=>{console.log("Favoriting app:",c.name)},d=c=>{console.log("Opening file:",c.name)},l=c=>{console.log("Sharing file:",c.name)},w=c=>{console.log("Opening project:",c.name)},u=c=>{console.log("Sharing project:",c.name)},k=c=>{i(c),console.log("Business unit changed to:",c.name)},f=()=>{console.log("Copilot clicked - navigating to chat"),o("chat")},A=c=>{console.log("Notification removed:",c)},b=()=>{console.log("All notifications removed")},g=()=>{switch(a){case"home":return(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,to.jsxs)("section",{className:"text-center py-12",children:[(0,to.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",s.name," team"]}),(0,to.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,to.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,to.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,to.jsx)("p",{className:"text-3xl font-bold text-primary",children:"12"}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,to.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,to.jsx)("p",{className:"text-3xl font-bold text-primary",children:"8"}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,to.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,to.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,to.jsx)("p",{className:"text-3xl font-bold text-primary",children:"156"}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,to.jsx)(Me,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"eo",onClick:()=>o("chat")}})]});case"colleagues":return(0,to.jsx)(Ha,{});case"chat":return(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,to.jsxs)("section",{className:"text-center py-12",children:[(0,to.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,to.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",s.name," team members and collaborate in real-time."]})]}),(0,to.jsx)(Me,{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,to.jsxs)("div",{className:"space-y-8",children:[(0,to.jsx)(Me,{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,to.jsxs)("section",{className:"space-y-4",children:[(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,to.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Ea.filter(c=>c.new).map(c=>(0,to.jsx)(ja,{app:c,showProgress:!0,onOpen:n,onFavorite:r},c.name))})]}),(0,to.jsxs)("section",{className:"space-y-4",children:[(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,to.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:Ea.map(c=>(0,to.jsx)(ja,{app:c,onOpen:n,onFavorite:r},c.name))})]})]});case"knowledge":return(0,to.jsx)(Ka,{});case"files":return(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,to.jsx)(Me,{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,to.jsxs)("section",{className:"space-y-4",children:[(0,to.jsx)("div",{className:"flex items-center justify-between",children:(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,to.jsx)(zo,{files:Ho,onFileClick:d})]})]});case"projects":return(0,to.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,to.jsx)(Me,{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,to.jsxs)("section",{className:"space-y-4",children:[(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,to.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:xo.map(c=>(0,to.jsx)(Uo,{project:c,onOpen:w,onShare:u},c.name))})]})]});case"learn":return(0,to.jsxs)("div",{className:"space-y-8",children:[(0,to.jsx)(Me,{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,to.jsxs)("section",{className:"space-y-4",children:[(0,to.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,to.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Ko.slice(0,3).map(c=>(0,to.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,to.jsx)("h3",{className:"font-semibold mb-2",children:c.title}),(0,to.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:c.description}),(0,to.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,to.jsx)("span",{children:c.duration}),(0,to.jsx)("span",{children:c.level})]})]},c.title))})]})]});default:return null}};return(0,to.jsx)(Mo,{sidebarItems:vo,title:e,notifications:ho,businessUnits:t,currentBusinessUnit:s,onBusinessUnitChange:k,activeTab:a,onTabChange:o,showTabs:!0,onActionClick:f,actionIcon:(0,to.jsx)(ci.Bot,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:A,onRemoveAll:b,children:(0,to.jsx)(ha.AnimatePresence,{mode:"wait",children:(0,to.jsx)(ha.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:g()},a)})})}
5
+ "use strict";"use client";var fi=Object.create;var $t=Object.defineProperty;var vi=Object.getOwnPropertyDescriptor;var hi=Object.getOwnPropertyNames;var bi=Object.getPrototypeOf,xi=Object.prototype.hasOwnProperty;var yi=(e,t)=>{for(var a in t)$t(e,a,{get:t[a],enumerable:!0})},Va=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of hi(t))!xi.call(e,s)&&s!==a&&$t(e,s,{get:()=>t[s],enumerable:!(o=vi(t,s))||o.enumerable});return e};var ae=(e,t,a)=>(a=e!=null?fi(bi(e)):{},Va(t||!e||!e.__esModule?$t(a,"default",{value:e,enumerable:!0}):a,e)),wi=e=>Va($t({},"__esModule",{value:!0}),e);var br={};yi(br,{default:()=>mi});module.exports=wi(br);var Ka=require("react"),va=require("framer-motion"),ci=require("lucide-react");var Qa=require("clsx");var wa="-",Ni=e=>{let t=Di(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let r=n.split(wa);return r[0]===""&&r.length!==1&&r.shift(),Ga(r,t)||Ci(n)},getConflictingClassGroupIds:(n,r)=>{let d=a[n]||[];return r&&o[n]?[...d,...o[n]]:d}}},Ga=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?Ga(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(wa);return t.validators.find(({validator:n})=>n(i))?.classGroupId},$a=/^\[(.+)\]$/,Ci=e=>{if($a.test(e)){let t=$a.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Di=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Pi(Object.entries(e.classGroups),a).forEach(([i,n])=>{ya(n,o,i,t)}),o},ya=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:Wa(t,s);i.classGroupId=a;return}if(typeof s=="function"){if(ki(s)){ya(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([i,n])=>{ya(n,Wa(t,i),a,o)})})},Wa=(e,t)=>{let a=e;return t.split(wa).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},ki=e=>e.isThemeGetter,Pi=(e,t)=>t?e.map(([a,o])=>{let s=o.map(i=>typeof i=="string"?t+i:typeof i=="object"?Object.fromEntries(Object.entries(i).map(([n,r])=>[t+n,r])):i);return[a,s]}):e,Si=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(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 s(i,n),n},set(i,n){a.has(i)?a.set(i,n):s(i,n)}}},_a="!",Ri=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],i=t.length,n=r=>{let d=[],l=0,w=0,u;for(let g=0;g<r.length;g++){let c=r[g];if(l===0){if(c===s&&(o||r.slice(g,g+i)===t)){d.push(r.slice(w,g)),w=g+i;continue}if(c==="/"){u=g;continue}}c==="["?l++:c==="]"&&l--}let k=d.length===0?r:r.substring(w),f=k.startsWith(_a),A=f?k.substring(1):k,b=u&&u>w?u-w:void 0;return{modifiers:d,hasImportantModifier:f,baseClassName:A,maybePostfixModifierPosition:b}};return a?r=>a({className:r,parseClassName:n}):n},Ti=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},Ai=e=>({cache:Si(e.cacheSize),parseClassName:Ri(e),...Ni(e)}),Mi=/\s+/,Ii=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],n=e.trim().split(Mi),r="";for(let d=n.length-1;d>=0;d-=1){let l=n[d],{modifiers:w,hasImportantModifier:u,baseClassName:k,maybePostfixModifierPosition:f}=a(l),A=!!f,b=o(A?k.substring(0,f):k);if(!b){if(!A){r=l+(r.length>0?" "+r:r);continue}if(b=o(k),!b){r=l+(r.length>0?" "+r:r);continue}A=!1}let g=Ti(w).join(":"),c=u?g+_a:g,Z=c+b;if(i.includes(Z))continue;i.push(Z);let C=s(b,A);for(let R=0;R<C.length;++R){let L=C[R];i.push(c+L)}r=l+(r.length>0?" "+r:r)}return r};function Bi(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=qa(t))&&(o&&(o+=" "),o+=a);return o}var qa=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=qa(e[o]))&&(a&&(a+=" "),a+=t);return a};function Li(e,...t){let a,o,s,i=n;function n(d){let l=t.reduce((w,u)=>u(w),e());return a=Ai(l),o=a.cache.get,s=a.cache.set,i=r,r(d)}function r(d){let l=o(d);if(l)return l;let w=Ii(d,a);return s(d,w),w}return function(){return i(Bi.apply(null,arguments))}}var oe=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ja=/^\[(?:([a-eo-]+):)?(.+)\]$/i,ji=/^\d+\/\d+$/,Ei=new Set(["px","full","screen"]),zi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fi=/\d+(%|px|r?em|[sdl]?eo([hwib]|min|max)|eo|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ui=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Hi=/^(inset_)?-?((\d+)?\.?(\d+)[a-eo]+|0)_-?((\d+)?\.?(\d+)[a-eo]+|0)/,Ki=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$e=e=>bt(e)||Ei.has(e)||ji.test(e),Ze=e=>xt(e,"length",Ji),bt=e=>!!e&&!Number.isNaN(Number(e)),xa=e=>xt(e,"number",bt),St=e=>!!e&&Number.isInteger(Number(e)),Oi=e=>e.endsWith("%")&&bt(e.slice(0,-1)),F=e=>Ja.test(e),et=e=>zi.test(e),Vi=new Set(["length","size","percentage"]),$i=e=>xt(e,Vi,Xa),Wi=e=>xt(e,"position",Xa),Gi=new Set(["image","url"]),_i=e=>xt(e,Gi,Yi),qi=e=>xt(e,"",Xi),Rt=()=>!0,xt=(e,t,a)=>{let o=Ja.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Ji=e=>Fi.test(e)&&!Ui.test(e),Xa=()=>!1,Xi=e=>Hi.test(e),Yi=e=>Ki.test(e);var Qi=()=>{let e=oe("colors"),t=oe("spacing"),a=oe("blur"),o=oe("brightness"),s=oe("borderColor"),i=oe("borderRadius"),n=oe("borderSpacing"),r=oe("borderWidth"),d=oe("contrast"),l=oe("grayscale"),w=oe("hueRotate"),u=oe("invert"),k=oe("gap"),f=oe("gradientColorStops"),A=oe("gradientColorStopPositions"),b=oe("inset"),g=oe("margin"),c=oe("opacity"),Z=oe("padding"),C=oe("saturate"),R=oe("scale"),L=oe("sepia"),U=oe("skew"),ie=oe("space"),x=oe("translate"),O=()=>["auto","contain","none"],$=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",F,t],q=()=>[F,t],Be=()=>["",$e,Ze],m=()=>["auto",bt,F],ee=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],Le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],we=()=>["start","end","center","between","around","evenly","stretch"],nt=()=>["","0",F],Vt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Fe=()=>[bt,F];return{cacheSize:500,separator:":",theme:{colors:[Rt],spacing:[$e,Ze],blur:["none","",et,F],brightness:Fe(),borderColor:[e],borderRadius:["none","","full",et,F],borderSpacing:q(),borderWidth:Be(),contrast:Fe(),grayscale:nt(),hueRotate:Fe(),invert:nt(),gap:q(),gradientColorStops:[e],gradientColorStopPositions:[Oi,Ze],inset:ne(),margin:ne(),opacity:Fe(),padding:q(),saturate:Fe(),scale:Fe(),sepia:nt(),skew:Fe(),space:q(),translate:q()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[et]}],"break-after":[{"break-after":Vt()}],"break-before":[{"break-before":Vt()}],"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:[...ee(),F]}],overflow:[{overflow:$()}],"overflow-x":[{"overflow-x":$()}],"overflow-y":[{"overflow-y":$()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],eo:[{eo:["auto",St,F]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",F]}],grow:[{grow:nt()}],shrink:[{shrink:nt()}],order:[{order:["first","last","none",St,F]}],"grid-cols":[{"grid-cols":[Rt]}],"col-start-end":[{col:["auto",{span:["full",St,F]},F]}],"col-start":[{"col-start":m()}],"col-end":[{"col-end":m()}],"grid-rows":[{"grid-rows":[Rt]}],"row-start-end":[{row:["auto",{span:[St,F]},F]}],"row-start":[{"row-start":m()}],"row-end":[{"row-end":m()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[k]}],"gap-x":[{"gap-x":[k]}],"gap-y":[{"gap-y":[k]}],"justify-content":[{justify:["normal",...we()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...we(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...we(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[Z]}],px:[{px:[Z]}],py:[{py:[Z]}],ps:[{ps:[Z]}],eo:[{eo:[Z]}],eo:[{eo:[Z]}],pr:[{pr:[Z]}],pb:[{pb:[Z]}],pl:[{pl:[Z]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],ci:[{ci:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[ie]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ie]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-w":[{"min-w":[F,t,"min","max","fit"]}],"max-w":[{"max-w":[F,t,"none","full","min","max","fit","prose",{screen:[et]},et]}],h:[{h:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[F,t,"auto","min","max","fit"]}],"font-size":[{text:["base",et,Ze]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xa]}],"font-family":[{font:[Rt]}],"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",F]}],"line-clamp":[{"line-clamp":["none",bt,xa]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",$e,F]}],"list-image":[{"list-image":["none",F]}],"list-style-type":[{list:["none","disc","decimal",F]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[c]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[c]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...te(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",$e,Ze]}],"underline-offset":[{"underline-offset":["auto",$e,F]}],"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:q()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F]}],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",F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[c]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...ee(),Wi]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$i]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},_i]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[A]}],"gradient-via-pos":[{via:[A]}],"gradient-to-pos":[{to:[A]}],"gradient-from":[{from:[f]}],"gradient-via":[{via:[f]}],"gradient-to":[{to:[f]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[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:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-y":[{"border-y":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[c]}],"border-style":[{border:[...te(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[r]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[c]}],"divide-style":[{divide:te()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...te()]}],"outline-offset":[{"outline-offset":[$e,F]}],"outline-w":[{outline:[$e,Ze]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Be()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[c]}],"ring-offset-w":[{"ring-offset":[$e,Ze]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",et,qi]}],"shadow-color":[{shadow:[Rt]}],opacity:[{opacity:[c]}],"mix-blend":[{"mix-blend":[...Le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Le()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",et,F]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[u]}],saturate:[{saturate:[C]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[c]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"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",F]}],duration:[{duration:Fe()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:Fe()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[St,F]}],"translate-x":[{"translate-x":[x]}],"translate-y":[{"translate-y":[x]}],"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",F]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",F]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":q()}],"scroll-mx":[{"scroll-mx":q()}],"scroll-my":[{"scroll-my":q()}],"scroll-ms":[{"scroll-ms":q()}],"scroll-ci":[{"scroll-ci":q()}],"scroll-mt":[{"scroll-mt":q()}],"scroll-mr":[{"scroll-mr":q()}],"scroll-mb":[{"scroll-mb":q()}],"scroll-ml":[{"scroll-ml":q()}],"scroll-p":[{"scroll-p":q()}],"scroll-px":[{"scroll-px":q()}],"scroll-py":[{"scroll-py":q()}],"scroll-ps":[{"scroll-ps":q()}],"scroll-eo":[{"scroll-eo":q()}],"scroll-eo":[{"scroll-eo":q()}],"scroll-pr":[{"scroll-pr":q()}],"scroll-pb":[{"scroll-pb":q()}],"scroll-pl":[{"scroll-pl":q()}],"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",F]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[$e,Ze,xa]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","eo","eo","pr","pb","pl"],px:["pr","pl"],py:["eo","pb"],m:["mx","my","ms","ci","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-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-ms","scroll-ci","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-eo","scroll-eo","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-eo","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ya=Li(Qi);function p(...e){return Ya((0,Qa.clsx)(e))}var Zt=ae(require("react")),Ra=ae(require("next/link"));var Za=require("class-variance-authority");var eo=require("react/jsx-runtime"),Zi=(0,Za.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 _({className:e,variant:t,...a}){return(0,eo.jsx)("div",{className:p(Zi({variant:t}),e),...a})}var to=require("@radix-ui/react-slot"),oo=ae(require("react")),er=(0,Za.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"}}}),y=oo.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},i)=>(0,eo.jsx)(e?to.Slot:"button",{className:p(er({className:t,size:a,variant:o})),ref:i,...s}));y.displayName="Button";var ro=ae(require("react"));var le=ro.forwardRef(({className:e,type:t,...a},o)=>(0,eo.jsx)("input",{type:t,className:p("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}));le.displayName="Input";var Na=ae(require("react")),Te=ae(require("@radix-ui/react-scroll-area"));var Ue=Na.forwardRef(({className:e,children:t,...a},o)=>(0,eo.jsxs)(Te.Root,{ref:o,className:p("relative overflow-hidden",e),...a,children:[(0,eo.jsx)(Te.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,eo.jsx)(no,{}),(0,eo.jsx)(Te.Corner,{})]}));Ue.displayName=Te.Root.displayName;var no=Na.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,eo.jsx)(Te.ScrollAreaScrollbar,{ref:o,orientation:t,className:p("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,eo.jsx)(Te.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));no.displayName=Te.ScrollAreaScrollbar.displayName;var Tt=ae(require("react")),ge=ae(require("@radix-ui/react-dialog"));var co=ge.Root;var tr=ge.Portal;var mo=Tt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(ge.Overlay,{ref:a,className:p("fixed inset-0 eo-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}));mo.displayName=ge.Overlay.displayName;var Ca=Tt.forwardRef(({className:e,children:t,...a},o)=>(0,eo.jsxs)(tr,{children:[(0,eo.jsx)(mo,{}),(0,eo.jsxs)(ge.Content,{ref:o,className:p("fixed left-[50%] top-[50%] eo-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,eo.jsxs)(ge.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,eo.jsx)(ci.X,{className:"h-4 w-4"}),(0,eo.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Ca.displayName=ge.Content.displayName;var Da=({className:e,...t})=>(0,eo.jsx)("div",{className:p("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Da.displayName="DialogHeader";var ar=({className:e,...t})=>(0,eo.jsx)("div",{className:p("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ar.displayName="DialogFooter";var ka=Tt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(ge.Title,{ref:a,className:p("text-lg font-semibold leading-none tracking-tight",e),...t}));ka.displayName=ge.Title.displayName;var or=Tt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(ge.Description,{ref:a,className:p("text-sm text-muted-foreground",e),...t}));or.displayName=ge.Description.displayName;var At=ae(require("@radix-ui/react-checkbox")),uo=ae(require("react")),Pa=uo.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(At.Root,{className:p("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,eo.jsx)(At.Indicator,{className:p("flex items-center justify-center text-current"),children:(0,eo.jsx)(ci.Check,{className:"h-4 w-4"})})}));Pa.displayName=At.Root.displayName;var He=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),fo=[{id:"home",title:"Home",icon:(0,eo.jsx)(ci.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,eo.jsx)(ci.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,eo.jsx)(ci.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,eo.jsx)(ci.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,eo.jsx)(ci.FileText,{}),url:"/knowledge"}],vo=[{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'eo 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")}],ho=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,eo.jsx)(ci.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,eo.jsx)(ci.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,eo.jsx)(ci.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,eo.jsx)(ci.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,eo.jsx)(ci.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,eo.jsx)(ci.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,eo.jsx)(ci.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,eo.jsx)(ci.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"ci",name:"IT Support",description:"Information technology and infrastructure",icon:(0,eo.jsx)(ci.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,eo.jsx)(ci.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],qt=[{id:"1",name:"eo-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}],bo=[{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 Sa=[{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}],Gt=[{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}],Xt=[{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")}],ir=[...Xt,{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")}],rr=[...qt,{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}],_t={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},go={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:Xt.filter(e=>e.epicId==="1")};var Ur={empty:{initialProjects:_t.projects,initialEpics:_t.epics,initialSprints:_t.sprints,initialTasks:_t.tasks},default:{initialProjects:qt,initialEpics:Sa,initialSprints:Gt,initialTasks:Xt},highDensity:{initialProjects:qt,initialEpics:Sa,initialSprints:Gt,initialTasks:ir},singleEpic:{initialProjects:qt,initialEpics:go.epics,initialSprints:Gt,initialTasks:go.tasks},multipleProjects:{initialProjects:rr,initialEpics:Sa,initialSprints:Gt,initialTasks:Xt}},Jt=[{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(He),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(He),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(He),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(He),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(He),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(He),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(He),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(He),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(He),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(He),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Hr=[{id:"1",title:"Review quarterly report",description:"Za through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague:Jt.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:Jt.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:Jt.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 Kr=Jt.filter(e=>e.type==="digital");function Qt(e,t){let[a,o]=(0,Ka.useState)(()=>{if(typeof window>"u")return t;try{let i=window.localStorage.getItem(e);return i?JSON.parse(i):t}catch{return t}}),s=i=>{try{o(i),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(i))}catch{}};return(0,Ka.useEffect)(()=>{s(a)},[]),[a,s]}function Ta({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=ho[0],onBusinessUnitChange:i,onSearch:n,className:r,logo:d="/headerlogo.png",appName:l="Nuvia",tagline:w="Collaboration Platform"}){let[u,k]=Zt.useState({}),[f,A]=Qt("sidebar-favorites",{}),[b,g]=Zt.useState(null),[c,Z]=Zt.useState(""),C=m=>{k(ee=>({...ee,[m]:!ee[m]}))},R=m=>{i?.(m)},L=()=>{c.trim()&&n?.(c.trim())},U=m=>{m.key==="Enter"&&(m.preventDefault(),L())},ie=(m,ee)=>{let te=f[m]||[],Le=te.includes(ee)?te.filter(we=>we!==ee):te.concat(ee);A({...f,[m]:Le})},x=m=>{if(!m.items||!m.maxItems||m.items.length<=m.maxItems)return m.items||[];let ee=f[m.id]||[],te=m.items.filter(we=>ee.includes(we.id)),Le=m.items.filter(we=>!ee.includes(we.id));return[...te,...Le].slice(0,m.maxItems)},O=m=>m.maxItems&&m.items&&m.items.length>m.maxItems,$=e,ne=m=>{let ee=O(m),te=x(m),Le=(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsxs)("div",{className:"flex items-center gap-3",children:[m.icon,(0,eo.jsx)("span",{children:m.title})]}),m.badge&&(0,eo.jsx)(_,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:m.badge}),m.items&&(0,eo.jsx)(ci.ChevronDown,{className:p("ml-2 h-4 w-4 transition-transform",u[m.title]?"rotate-180":"")})]}),we=p("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",m.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return m.url?(0,eo.jsx)(Ra.default,{href:m.url,className:we,onClick:a?o:void 0,children:Le}):(0,eo.jsx)("button",{className:we,onClick:()=>m.items&&C(m.title),children:Le})},q=()=>{let m=e.find(te=>te.id===b);if(!m||!m.items||!m.maxItems)return null;let ee=f[m.id]||[];return(0,eo.jsx)(co,{open:!!b,onOpenChange:te=>!te&&g(null),children:(0,eo.jsxs)(Ca,{className:"sm:max-w-md",children:[(0,eo.jsxs)(Da,{children:[(0,eo.jsxs)(ka,{children:["Manage ",m.title," Favorites"]}),(0,eo.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",m.maxItems," items to show in ",m.title.toLowerCase(),"."]})]}),(0,eo.jsx)(Ue,{className:"max-h-96 pr-4",children:(0,eo.jsx)("div",{className:"space-y-4",children:m.items.map(te=>(0,eo.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,eo.jsx)(Pa,{id:te.id,checked:ee.includes(te.id),onCheckedChange:()=>ie(m.id,te.id),disabled:!ee.includes(te.id)&&ee.length>=(m.maxItems||0)}),(0,eo.jsxs)("label",{htmlFor:te.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:[te.title,te.badge&&(0,eo.jsx)(_,{variant:"outline",className:"text-xs",children:te.badge})]})]},te.id))})})]})})},Be=(0,eo.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,eo.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,eo.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,eo.jsx)("img",{src:d,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,eo.jsxs)("div",{children:[(0,eo.jsx)("h2",{className:"font-semibold",children:l}),(0,eo.jsx)("p",{className:"text-xs text-muted-foreground",children:w})]})]}),a&&(0,eo.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,eo.jsx)(ci.X,{className:"h-5 w-5"})})]}),(0,eo.jsx)("div",{className:"px-3 py-2",children:(0,eo.jsxs)("div",{className:"relative",children:[(0,eo.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,eo.jsx)(le,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:c,onChange:m=>Z(m.target.value),onKeyPress:U})]})}),(0,eo.jsx)(Ue,{className:"flex-1 px-3 py-2",children:(0,eo.jsx)("div",{className:"space-y-1",children:$.map(m=>(0,eo.jsxs)("div",{className:"mb-1",children:[ne(m),m.items&&u[m.title]&&(0,eo.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[x(m).map(ee=>(0,eo.jsxs)(Ra.default,{href:ee.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[ee.title,ee.badge&&(0,eo.jsx)(_,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:ee.badge})]},ee.id)),O(m)&&m.items&&m.items.length>x(m).length&&(0,eo.jsxs)("button",{onClick:()=>g(m.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:["...",m.items.length-x(m).length," more available"]})]})]},m.id))})}),(0,eo.jsx)("div",{className:"p-3",children:(0,eo.jsx)("div",{className:"space-y-1",children:(0,eo.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,eo.jsx)(ci.Settings,{className:"h-5 w-5"}),(0,eo.jsx)("span",{children:"Settings"})]})})}),(0,eo.jsx)(q,{})]});return a?(0,eo.jsx)("div",{className:p("fixed inset-y-0 left-0 eo-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Be}):(0,eo.jsx)("div",{className:p("fixed inset-y-0 left-0 eo-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Be})}var ea=ae(require("react")),We=ae(require("@radix-ui/react-avatar"));var Ge=ea.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(We.Root,{ref:a,className:p("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ge.displayName=We.Root.displayName;var lt=ea.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(We.Image,{ref:a,className:p("aspect-square h-full w-full",e),...t}));lt.displayName=We.Image.displayName;var _e=ea.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(We.Fallback,{ref:a,className:p("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));_e.displayName=We.Fallback.displayName;var xo=ae(require("react")),je=ae(require("@radix-ui/react-tooltip"));var aa=je.Provider,oa=je.Root,ia=je.Trigger,Mt=xo.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,eo.jsx)(je.Portal,{children:(0,eo.jsx)(je.Content,{ref:o,sideOffset:t,className:p("eo-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})}));Mt.displayName=je.Content.displayName;var yo=require("next-themes");function wo(){let{setTheme:e,theme:t}=(0,yo.useTheme)();return(0,eo.jsx)(aa,{children:(0,eo.jsxs)(oa,{children:[(0,eo.jsx)(ia,{asChild:!0,children:(0,eo.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,eo.jsx)(ci.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,eo.jsx)(ci.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,eo.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,eo.jsx)(Mt,{children:"Toggle theme"})]})})}function No({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:i}){let n=e.filter(l=>!l.read),r=n.length,d=l=>{switch(l){case"info":return(0,eo.jsx)(ci.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,eo.jsx)(ci.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,eo.jsx)(ci.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,eo.jsx)(ci.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,eo.jsx)(va.AnimatePresence,{children:t&&(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsx)(va.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 eo-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,eo.jsx)(va.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:p("fixed inset-y-0 right-0 eo-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,eo.jsxs)("div",{className:"flex h-full flex-col",children:[(0,eo.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,eo.jsx)(ci.Bell,{className:"h-5 w-5"}),(0,eo.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,eo.jsxs)(_,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,eo.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,eo.jsx)(ci.X,{className:"h-5 w-5"}),(0,eo.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,eo.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,eo.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,eo.jsx)(y,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,eo.jsx)(Ue,{className:"flex-1",children:(0,eo.jsx)("div",{className:"divide-y",children:n.map(l=>(0,eo.jsxs)("div",{className:p("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,eo.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:d(l.type)}),(0,eo.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,eo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,eo.jsx)("p",{className:"font-medium",children:l.title}),(0,eo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,eo.jsx)("p",{className:"text-xs text-muted-foreground",children:l.time}),(0,eo.jsx)(y,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(l.id),title:"Dismiss",children:(0,eo.jsx)(ci.Check,{className:"h-3 w-3"})})]})]}),(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:l.description}),l.actionLabel&&(0,eo.jsxs)(y,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:l.onAction,children:[l.actionLabel,(0,eo.jsx)(ci.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},l.id))})}):(0,eo.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,eo.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,eo.jsx)(ci.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,eo.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,eo.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var dt=ae(require("@radix-ui/react-tabs"));function Co({className:e,...t}){return(0,eo.jsx)(dt.Root,{"data-slot":"tabs",className:p("flex flex-col gap-2",e),...t})}function Do({className:e,...t}){return(0,eo.jsx)(dt.List,{"data-slot":"tabs-list",className:p("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function ko({className:e,...t}){return(0,eo.jsx)(dt.Trigger,{"data-slot":"tabs-trigger",className:p("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var qe=ae(require("react")),W=ae(require("@radix-ui/react-dropdown-menu")),yt=require("@radix-ui/react-icons");var na=W.Root,la=W.Trigger;var sr=qe.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,eo.jsxs)(W.SubTrigger,{ref:s,className:p("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,eo.jsx)(yt.ChevronRightIcon,{className:"ml-auto"})]}));sr.displayName=W.SubTrigger.displayName;var nr=qe.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(W.SubContent,{ref:a,className:p("eo-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));nr.displayName=W.SubContent.displayName;var Bt=qe.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,eo.jsx)(W.Portal,{children:(0,eo.jsx)(W.Content,{ref:o,sideOffset:t,className:p("eo-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Bt.displayName=W.Content.displayName;var ct=qe.forwardRef(({className:e,inset:t,...a},o)=>(0,eo.jsx)(W.Item,{ref:o,className:p("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}));ct.displayName=W.Item.displayName;var lr=qe.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,eo.jsxs)(W.CheckboxItem,{ref:s,className:p("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,eo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,eo.jsx)(W.ItemIndicator,{children:(0,eo.jsx)(yt.CheckIcon,{className:"h-4 w-4"})})}),t]}));lr.displayName=W.CheckboxItem.displayName;var dr=qe.forwardRef(({className:e,children:t,...a},o)=>(0,eo.jsxs)(W.RadioItem,{ref:o,className:p("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,eo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,eo.jsx)(W.ItemIndicator,{children:(0,eo.jsx)(yt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));dr.displayName=W.RadioItem.displayName;var cr=qe.forwardRef(({className:e,inset:t,...a},o)=>(0,eo.jsx)(W.Label,{ref:o,className:p("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));cr.displayName=W.Label.displayName;var mr=qe.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(W.Separator,{ref:a,className:p("-mx-1 my-1 h-px bg-muted",e),...t}));mr.displayName=W.Separator.displayName;var pr=({className:e,...t})=>(0,eo.jsx)("span",{className:p("ml-auto text-xs tracking-widest opacity-60",e),...t});pr.displayName="DropdownMenuShortcut";function da({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:i=6}){let n=a.find(r=>r.value===e);return(0,eo.jsxs)(va.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,eo.jsx)("div",{className:"hidden md:block",children:(0,eo.jsx)(Co,{value:e,onValueChange:t,children:(0,eo.jsx)(Do,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,eo.jsx)(va.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,eo.jsx)(ko,{value:r.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:r.label})},r.value))})})}),(0,eo.jsx)("div",{className:"md:hidden",children:(0,eo.jsxs)(na,{children:[(0,eo.jsx)(la,{asChild:!0,children:(0,eo.jsxs)(y,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[n?.label||"Select",(0,eo.jsx)(ci.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,eo.jsx)(Bt,{align:"center",className:"w-[180px]",children:a.map(r=>(0,eo.jsx)(ct,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function So({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:i,activeTab:n="assistant",onTabChange:r,showTabs:d=!0,tabOptions:l=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:w,actionIcon:u=(0,eo.jsx)(ci.Bot,{className:"mr-2 h-4 w-4"}),actionText:k="Action",onNotificationRemove:f,onRemoveAll:A,logo:b="/headerlogo.png",appName:g="Nuvia",tagline:c="Collaboration Platform"}){let[Z,C]=(0,Ka.useState)(!1),[R,L]=(0,Ka.useState)(t),U=R.filter(O=>!O.read).length,ie=O=>{L($=>$.filter(ne=>ne.id!==O)),f?.(O)},x=()=>{L(O=>O.filter($=>$.read)),A?.()};return(0,eo.jsxs)(eo.Fragment,{children:[(0,eo.jsxs)("header",{className:`sticky top-0 eo-10 flex h-16 items-center gap-3 px-4 backdrop-blur ${i||""}`,children:[(0,eo.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,eo.jsx)(ci.Menu,{className:"h-5 w-5"})}),(0,eo.jsx)(y,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,eo.jsx)(ci.PanelLeft,{className:"h-5 w-5"})}),!s&&(0,eo.jsxs)(va.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,eo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,eo.jsx)("img",{src:b,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,eo.jsxs)("div",{children:[(0,eo.jsx)("h2",{className:"font-semibold text-sm",children:g}),(0,eo.jsx)("p",{className:"text-xs text-muted-foreground",children:c})]})]}),(0,eo.jsxs)("div",{className:"flex flex-1 items-center",children:[d&&(0,eo.jsx)(da,{activeTab:n,onTabChange:r,tabOptions:l}),(0,eo.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,eo.jsx)(va.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,eo.jsx)(va.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,eo.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:w,children:[u,k]})})}),(0,eo.jsx)(wo,{}),(0,eo.jsx)(aa,{children:(0,eo.jsxs)(oa,{children:[(0,eo.jsx)(ia,{asChild:!0,children:(0,eo.jsx)(va.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,eo.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,eo.jsx)(va.motion.div,{animate:U>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:U>0?1/0:0,repeatDelay:3},children:(0,eo.jsx)(ci.Bell,{className:"h-5 w-5"})}),U>0&&(0,eo.jsx)(va.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,eo.jsx)(Mt,{children:"Notifications"})]})}),(0,eo.jsx)(va.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,eo.jsxs)(Ge,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,eo.jsx)(lt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,eo.jsx)(_e,{})]})})]})]})]}),(0,eo.jsx)(No,{notifications:R,open:Z,onClose:()=>C(!1),onNotificationRemove:ie,onRemoveAll:x})]})}var Ro=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,eo.jsx)(ci.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ao({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=Ro[0],onBusinessUnitChange:i,onSearch:n,businessUnits:r=Ro,activeTab:d,onTabChange:l,showTabs:w=!1,onActionClick:u,actionIcon:k,actionText:f="Action",onNotificationRemove:A,onRemoveAll:b,logo:g="/headerlogo.png",appName:c="Nuvia",tagline:Z="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[R,L]=(0,Ka.useState)(!C),[U,ie]=(0,Ka.useState)(!1),[x,O]=(0,Ka.useState)(s),$=ne=>{O(ne),i?.(ne)};return(0,eo.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[U&&(0,eo.jsx)("div",{className:"fixed inset-0 eo-40 bg-black/50 md:hidden",onClick:()=>ie(!1)}),(0,eo.jsx)("div",{className:"md:hidden",children:(0,eo.jsx)(Ta,{items:e,isOpen:U,isMobile:!0,onClose:()=>ie(!1),currentBusinessUnit:x,onBusinessUnitChange:$,onSearch:n,logo:g,appName:c,tagline:Z})}),(0,eo.jsx)("div",{className:"hidden md:block",children:(0,eo.jsx)(Ta,{items:e,isOpen:R,isMobile:!1,currentBusinessUnit:x,onBusinessUnitChange:$,onSearch:n,logo:g,appName:c,tagline:Z})}),(0,eo.jsxs)("div",{className:p("min-h-screen fixed w-full transition-all duration-300 ease-in-out",R?"md:pl-64":"md:pl-0"),children:[(0,eo.jsx)(So,{title:a,notifications:o,onToggleSidebar:()=>L(!R),onToggleMobileMenu:()=>ie(!0),sidebarOpen:R,activeTab:d,onTabChange:l,showTabs:w,onActionClick:u,actionIcon:k,actionText:f,onNotificationRemove:A,onRemoveAll:b,logo:g,appName:c,tagline:Z}),(0,eo.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var ma=require("react-icons/Ka");function Me({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:i,children:n,className:r}){let[d,l]=Qt(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),w=!s&&!t||d;return(0,eo.jsxs)(va.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.5},className:`overflow-hidden rounded-3xl ${i} p-8 text-white ${r||""}`,children:[(0,eo.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,eo.jsx)(_,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,eo.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,eo.jsxs)("div",{className:"flex items-center gap-3",children:[w&&o&&(0,eo.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,eo.jsx)("button",{"aria-label":d?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>l(!d),style:{lineHeight:0},children:d?(0,eo.jsx)(ma.FaChevronDown,{size:22}):(0,eo.jsx)(ma.FaChevronUp,{size:22})})]})]}),!w&&(0,eo.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,eo.jsxs)("div",{className:"space-y-4",children:[(0,eo.jsx)("p",{className:"max-w-[600px] text-white/80",children:t}),(0,eo.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,eo.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,eo.jsx)(y,{variant:"outline",className:"rounded-2xl bg-transparent border-white text-white hover:bg-white/10",onClick:s.onClick,children:s.label})]})]}),n&&(0,eo.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var mt=ae(require("react"));var X=mt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)("div",{ref:a,className:p("rounded-xl border bg-card text-card-foreground shadow",e),...t}));X.displayName="Card";var se=mt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)("div",{ref:a,className:p("flex flex-col space-y-1.5 p-6",e),...t}));se.displayName="CardHeader";var de=mt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)("div",{ref:a,className:p("font-semibold leading-none tracking-tight",e),...t}));de.displayName="CardTitle";var Lt=mt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)("div",{ref:a,className:p("text-sm text-muted-foreground",e),...t}));Lt.displayName="CardDescription";var Y=mt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)("div",{ref:a,className:p("p-6 eo-0",e),...t}));Y.displayName="CardContent";var jt=mt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)("div",{ref:a,className:p("flex items-center p-6 eo-0",e),...t}));jt.displayName="CardFooter";var Io=ae(require("react")),Et=ae(require("@radix-ui/react-progress"));var zt=Io.forwardRef(({className:e,value:t,...a},o)=>(0,eo.jsx)(Et.Root,{ref:o,className:p("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,eo.jsx)(Et.Indicator,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));zt.displayName=Et.Root.displayName;function La({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:s}){return(0,eo.jsx)(va.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:s,children:(0,eo.jsxs)(X,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,eo.jsx)(se,{className:"pb-2",children:(0,eo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,eo.jsx)("div",{className:"flex h-12 w-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,eo.jsx)(_,{className:"rounded-xl bg-amber-500",children:"New"}):(0,eo.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-2xl",onClick:()=>a?.(e),children:(0,eo.jsx)(ci.Star,{className:"h-4 w-4"})})]})}),(0,eo.jsxs)(Y,{className:"pb-2",children:[(0,eo.jsx)(de,{className:"text-lg",children:e.name}),(0,eo.jsx)(Lt,{children:e.description}),o&&e.progress<100&&(0,eo.jsxs)("div",{className:"mt-2",children:[(0,eo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,eo.jsx)("span",{children:"Installation"}),(0,eo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,eo.jsx)(zt,{value:e.progress,className:"h-2 mt-1 rounded-xl"})]})]}),(0,eo.jsx)(jt,{children:(0,eo.jsx)(y,{variant:"secondary",className:"w-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function zo({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:i}){return(0,eo.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[s&&(0,eo.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,eo.jsx)("div",{className:"col-span-6",children:"Name"}),(0,eo.jsx)("div",{className:"col-span-2",children:"Size"}),(0,eo.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,eo.jsx)("div",{className:"divide-y",children:e.map(n=>(0,eo.jsxs)(va.motion.div,{whileHover:{backgroundColor:"rgba(0,0,0,0.02)"},className:"p-3 md:grid md:grid-cols-10 items-center flex flex-col md:flex-row gap-3 md:gap-0 cursor-pointer",onClick:()=>t?.(n),children:[(0,eo.jsxs)("div",{className:"col-span-6 flex items-center gap-3 w-full md:w-auto",children:[(0,eo.jsx)("div",{className:"flex h-10 w-10 items-center justify-center rounded-2xl bg-muted",children:n.icon}),(0,eo.jsx)("div",{children:(0,eo.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,eo.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:n.size}),(0,eo.jsxs)("div",{className:"col-span-2 flex items-center justify-between w-full md:w-auto",children:[(0,eo.jsx)("span",{className:"text-sm md:text-base",children:n.modified}),(0,eo.jsx)("div",{className:"flex gap-1",children:(0,eo.jsx)(y,{variant:"ghost",size:"icon",className:"h-8 w-8 rounded-xl text-red-500 hover:text-red-600",onClick:r=>{r.stopPropagation(),o?.(n)},children:(0,eo.jsx)(ci.Trash2,{className:"h-4 w-4"})})})]})]},n.name))})]})}function Uo({project:e,onOpen:t,onShare:a,className:o}){return(0,eo.jsx)(va.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,eo.jsxs)(X,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,eo.jsxs)(se,{children:[(0,eo.jsxs)("div",{className:"flex items-center justify-between",children:[(0,eo.jsx)(de,{children:e.name}),(0,eo.jsxs)(_,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,eo.jsx)(Lt,{children:e.description})]}),(0,eo.jsxs)(Y,{className:"space-y-4",children:[(0,eo.jsxs)("div",{className:"space-y-2",children:[(0,eo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,eo.jsx)("span",{children:"Progress"}),(0,eo.jsxs)("span",{children:[e.progress,"%"]})]}),(0,eo.jsx)(zt,{value:e.progress,className:"h-2 rounded-xl"})]}),(0,eo.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,eo.jsxs)("div",{className:"flex items-center",children:[(0,eo.jsx)(ci.Users,{className:"mr-1 h-4 w-4"}),e.members," members"]}),(0,eo.jsxs)("div",{className:"flex items-center",children:[(0,eo.jsx)(ci.FileText,{className:"mr-1 h-4 w-4"}),e.files," files"]})]})]}),(0,eo.jsxs)(jt,{className:"flex gap-2",children:[(0,eo.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,eo.jsx)(y,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,eo.jsx)(ci.Share2,{className:"h-4 w-4"})})]})]})})}var ja=[{name:"PixelMaster",icon:(0,eo.jsx)(ci.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,eo.jsx)(ci.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,eo.jsx)(ci.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,eo.jsx)(ci.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,eo.jsx)(ci.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,eo.jsx)(ci.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,eo.jsx)(ci.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,eo.jsx)(ci.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,eo.jsx)(ci.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,eo.jsx)(ci.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,eo.jsx)(ci.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,eo.jsx)(ci.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],Ho=[{name:"Brand Redesign.pxm",app:"PixelMaster",modified:"2 hours ago",icon:(0,eo.jsx)(ci.ImageIcon,{className:"text-violet-500"}),shared:!0,size:"24.5 MB",collaborators:3},{name:"Company Logo.vec",app:"VectorPro",modified:"Yesterday",icon:(0,eo.jsx)(ci.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,eo.jsx)(ci.Video,{className:"text-pink-500"}),shared:!1,size:"1.2 GB",collaborators:0},{name:"UI Animation.mfx",app:"MotionFX",modified:"Last week",icon:(0,eo.jsx)(ci.Sparkles,{className:"text-blue-500"}),shared:!0,size:"345 MB",collaborators:4},{name:"Magazine Layout.pgc",app:"PageCraft",modified:"2 weeks ago",icon:(0,eo.jsx)(ci.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,eo.jsx)(ci.LayoutGrid,{className:"text-fuchsia-500"}),shared:!0,size:"18.3 MB",collaborators:5},{name:"Product Photography.phl",app:"PhotoLab",modified:"Last month",icon:(0,eo.jsx)(ci.Camera,{className:"text-teal-500"}),shared:!1,size:"156 MB",collaborators:0}];var Ko=[{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"}];var G=ae(require("@radix-ui/react-select")),rt=ae(require("react")),Ft=G.Root;var Ut=G.Value,Nt=rt.forwardRef(({children:e,className:t,...a},o)=>(0,eo.jsxs)(G.Trigger,{className:p("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,eo.jsx)(G.Icon,{asChild:!0,children:(0,eo.jsx)(ci.ChevronDown,{className:"h-4 w-4 opacity-50"})})]}));Nt.displayName=G.Trigger.displayName;var Oo=rt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(G.ScrollUpButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,eo.jsx)(ci.ChevronUp,{className:"h-4 w-4"})}));Oo.displayName=G.ScrollUpButton.displayName;var Vo=rt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(G.ScrollDownButton,{className:p("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,eo.jsx)(ci.ChevronDown,{className:"h-4 w-4"})}));Vo.displayName=G.ScrollDownButton.displayName;var Ct=rt.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,eo.jsx)(G.Portal,{children:(0,eo.jsxs)(G.Content,{className:p("relative eo-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:s,...o,children:[(0,eo.jsx)(Oo,{}),(0,eo.jsx)(G.Viewport,{className:p("p-1",a==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),(0,eo.jsx)(Vo,{})]})}));Ct.displayName=G.Content.displayName;var ur=rt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(G.Label,{className:p("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));ur.displayName=G.Label.displayName;var Oe=rt.forwardRef(({children:e,className:t,...a},o)=>(0,eo.jsxs)(G.Item,{className:p("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,eo.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,eo.jsx)(G.ItemIndicator,{children:(0,eo.jsx)(ci.Check,{className:"h-4 w-4"})})}),(0,eo.jsx)(G.ItemText,{children:e})]}));Oe.displayName=G.Item.displayName;var gr=rt.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(G.Separator,{className:p("-mx-1 my-1 h-px bg-muted",e),ref:a,...t}));gr.displayName=G.Separator.displayName;function pa({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:s=!0,compact:i=!1,className:n}){let[r,d]=(0,$o.useState)(!1),l=k=>{switch(k){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},w=k=>{switch(k){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},u=k=>{if(!k)return"Never";let A=Math.floor((new Date().getTime()-k.getTime())/(1e3*60));return A<1?"Just now":A<60?`${A}m ago`:A<1440?`${Math.floor(A/60)}h ago`:`${Math.floor(A/1440)}d ago`};return(0,eo.jsxs)(X,{className:p("hover:shadow-md transition-shadow",i&&"p-2",n),children:[(0,eo.jsx)(se,{className:p("pb-3",i&&"pb-2"),children:(0,eo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,eo.jsx)("div",{className:"relative",children:(0,eo.jsxs)(Ge,{className:p("h-12 w-12",i&&"h-8 w-8"),children:[(0,eo.jsx)(lt,{src:"/placeholder.svg",alt:e.name}),(0,eo.jsx)(_e,{children:e.name.split(" ").map(k=>k[0]).join("")})]})}),(0,eo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,eo.jsx)("h3",{className:p("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,eo.jsx)(ci.Bot,{className:p("h-4 w-4 text-blue-500",i&&"h-3 w-3")}):(0,eo.jsx)(ci.User,{className:p("h-4 w-4 text-green-500",i&&"h-3 w-3")})]}),(0,eo.jsx)("p",{className:p("text-sm text-muted-foreground truncate",i&&"text-xs"),children:e.type==="human"?e.role:e.description}),!i&&(0,eo.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[e.type==="human"&&(0,eo.jsx)(_,{variant:"secondary",className:"text-xs",children:e.department}),e.type==="digital"&&(0,eo.jsxs)(_,{variant:"secondary",className:"text-xs",children:["eo",e.version]}),(0,eo.jsx)(_,{variant:"outline",className:"text-xs",children:w(e.status)})]})]})]}),s&&(0,eo.jsxs)(na,{children:[(0,eo.jsx)(la,{asChild:!0,children:(0,eo.jsx)(y,{variant:"ghost",size:"icon",className:p("h-8 w-8",i&&"h-6 w-6"),children:(0,eo.jsx)(ci.MoreHorizontal,{className:p("h-4 w-4",i&&"h-3 w-3")})})}),(0,eo.jsxs)(Bt,{align:"end",children:[(0,eo.jsxs)(ct,{onClick:()=>o?.(e),children:[(0,eo.jsx)(ci.Settings,{className:"h-4 w-4 mr-2"}),"View Details"]}),(0,eo.jsxs)(ct,{onClick:()=>t?.(e),children:[(0,eo.jsx)(ci.Edit,{className:"h-4 w-4 mr-2"}),"Edit"]}),(0,eo.jsxs)(ct,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,eo.jsx)(ci.Trash2,{className:"h-4 w-4 mr-2"}),"Delete"]})]})]})]})}),!i&&(0,eo.jsxs)(Y,{className:"eo-0",children:[(0,eo.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,eo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,eo.jsx)(ci.Mail,{className:"h-3 w-3"}),(0,eo.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,eo.jsxs)(eo.Fragment,{children:[e.phone&&(0,eo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,eo.jsx)(ci.Phone,{className:"h-3 w-3"}),(0,eo.jsx)("span",{children:e.phone})]}),e.location&&(0,eo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,eo.jsx)(ci.MapPin,{className:"h-3 w-3"}),(0,eo.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,eo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,eo.jsx)(ci.Settings,{className:"h-3 w-3"}),(0,eo.jsxs)("span",{children:["eo",e.version]})]}),(0,eo.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,eo.jsx)(ci.Clock,{className:"h-3 w-3"}),(0,eo.jsxs)("span",{children:["Last active: ",u(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,eo.jsx)("div",{className:"mt-3",children:(0,eo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,r?e.skills.length:3).map(k=>(0,eo.jsx)(_,{variant:"outline",className:"text-xs",children:k},k)),e.skills.length>3&&(0,eo.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>d(!r),children:r?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,eo.jsx)("div",{className:"mt-3",children:(0,eo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,r?e.capabilities.length:2).map(k=>(0,eo.jsx)(_,{variant:"outline",className:"text-xs",children:k},k)),e.capabilities.length>2&&(0,eo.jsx)(y,{variant:"ghost",size:"sm",className:"h-5 px-2 text-xs",onClick:()=>d(!r),children:r?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}var Wo=ae(require("react")),Ea=ae(require("@radix-ui/react-label"));var fr=(0,Za.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Je=Wo.forwardRef(({className:e,...t},a)=>(0,eo.jsx)(Ea.Root,{ref:a,className:p(fr(),e),...t}));Je.displayName=Ea.Root.displayName;var qo=ae(require("react")),gt=qo.forwardRef(({className:e,...t},a)=>(0,eo.jsx)("textarea",{className:p("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}));gt.displayName="Textarea";function za({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:s="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[r,d]=(0,Ka.useState)(""),[l,w]=(0,Ka.useState)([]),[u,k]=(0,Ka.useState)(!1);(0,Ka.useEffect)(()=>{if(!r.trim()){w([]),k(!1);return}let g=a.filter(c=>{if(e.map(R=>R.id).includes(c.id))return!1;let C=r.toLowerCase();return c.title.toLowerCase().includes(C)||c.description?.toLowerCase().includes(C)||c.tags?.some(R=>R.toLowerCase().includes(C))||Object.values(c.metadata||{}).some(R=>String(R).toLowerCase().includes(C))});w(g),k(!0)},[r,e,a]);let f=g=>{i&&e.length>=i||(t([...e,g]),d(""),k(!1))},A=g=>{t(e.filter(c=>c.id!==g))},b=!i||e.length<i;return(0,eo.jsxs)("div",{className:"space-y-2",children:[(0,eo.jsx)(Je,{children:o}),(0,eo.jsxs)("div",{className:"relative",children:[(0,eo.jsxs)("div",{className:"relative",children:[(0,eo.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,eo.jsx)(le,{value:r,onChange:g=>d(g.target.value),placeholder:b?s:`Maximum ${i} documents selected`,className:"pl-9",disabled:n||!b,onFocus:()=>r&&k(!0)})]}),u&&l.length>0&&(0,eo.jsx)(X,{className:"absolute top-full left-0 right-0 eo-10 mt-1 max-h-60",children:(0,eo.jsx)(Ue,{className:"h-full",children:(0,eo.jsx)(Y,{className:"p-2",children:l.map(g=>(0,eo.jsx)(y,{variant:"ghost",className:"w-full justify-start h-auto p-3 mb-1",onClick:()=>f(g),disabled:n,children:(0,eo.jsxs)("div",{className:"flex items-start gap-3 w-full",children:[(0,eo.jsx)(ci.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,eo.jsxs)("div",{className:"text-left flex-1 min-w-0",children:[(0,eo.jsx)("div",{className:"font-medium text-sm truncate",children:g.title}),g.description&&(0,eo.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:g.description}),g.tags&&g.tags.length>0&&(0,eo.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[g.tags.slice(0,3).map(c=>(0,eo.jsx)(_,{variant:"outline",className:"text-xs",children:c},c)),g.tags.length>3&&(0,eo.jsxs)(_,{variant:"outline",className:"text-xs",children:["+",g.tags.length-3," more"]})]})]})]})},g.id))})})}),u&&r&&l.length===0&&(0,eo.jsx)(X,{className:"absolute top-full left-0 right-0 eo-10 mt-1",children:(0,eo.jsxs)(Y,{className:"p-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',r,'"']})})]}),e.length>0&&(0,eo.jsxs)("div",{className:"space-y-2",children:[(0,eo.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,eo.jsx)("div",{className:"space-y-2",children:e.map(g=>(0,eo.jsx)(X,{className:"p-3",children:(0,eo.jsxs)("div",{className:"flex items-start gap-3",children:[(0,eo.jsx)(ci.FileText,{className:"h-4 w-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,eo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,eo.jsx)("div",{className:"font-medium text-sm",children:g.title}),g.description&&(0,eo.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:g.description}),g.tags&&g.tags.length>0&&(0,eo.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:g.tags.map(c=>(0,eo.jsxs)(_,{variant:"outline",className:"text-xs",children:[(0,eo.jsx)(ci.Tag,{className:"h-3 w-3 mr-1"}),c]},c))})]}),(0,eo.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-6 w-6 flex-shrink-0",onClick:()=>A(g.id),disabled:n,children:(0,eo.jsx)(ci.X,{className:"h-3 w-3"})})]})},g.id))})]}),u&&(0,eo.jsx)("div",{className:"fixed inset-0 eo-0",onClick:()=>k(!1)})]})}function Fa({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:i,cancelLabel:n="Cancel",readOnly:r=!1,availableKnowledgeDocuments:d=[]}){let[l,w]=(0,Ka.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[u,k]=(0,Ka.useState)(""),[f,A]=(0,Ka.useState)(""),[b,g]=(0,Ka.useState)(!r);(0,Ka.useEffect)(()=>{e&&w(e)},[e]);let c=x=>{x.preventDefault();let O=l.version?parseInt(l.version):0,$=e?(O+1).toString():"1",ne={id:l.id||Date.now().toString(),name:l.name,type:"digital",status:"active",joinedDate:l.joinedDate||new Date,lastActive:l.lastActive||new Date,description:l.description,jobDescription:l.jobDescription||"",workInstructions:l.workInstructions||"",capabilities:l.capabilities||[],knowledge:l.knowledge||[],coreKnowledge:l.coreKnowledge||[],version:$,lastUpdated:l.lastUpdated||new Date,isActive:!0};t(ne)},Z=(x,O,$)=>{if(!O.trim())return;let ne=l[x]||[];w({...l,[x]:[...ne,O.trim()]}),$("")},C=(x,O)=>{let $=l[x]||[];w({...l,[x]:$.filter((ne,q)=>q!==O)})},R=x=>{x.preventDefault(),g(!b)},L=(x,O,$,ne,q)=>{let Be=l[x]||[];return(0,eo.jsxs)("div",{className:"space-y-2",children:[(0,eo.jsx)(Je,{children:O}),b&&(0,eo.jsxs)("div",{className:"flex gap-2",children:[(0,eo.jsx)(le,{value:$,onChange:m=>ne(m.target.value),placeholder:q,onKeyPress:m=>{m.key==="Enter"&&(m.preventDefault(),Z(x,$,ne))},disabled:o}),(0,eo.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>Z(x,$,ne),disabled:o,children:(0,eo.jsx)(ci.Plus,{className:"h-4 w-4"})})]}),(0,eo.jsx)("div",{className:"flex flex-wrap gap-2",children:Be.map((m,ee)=>(0,eo.jsxs)(_,{className:"gap-1",children:[m,b&&(0,eo.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>C(x,ee),disabled:o,children:(0,eo.jsx)(ci.X,{className:"h-3 w-3"})})]},`${x}-${ee}-${m}`))})]})},U=s||(b?e?"Edit Colleague":"Add New Colleague":"View Colleague"),ie=i||(e?"Update Colleague":"Add Colleague");return(0,eo.jsxs)(X,{className:"m-8 w-full max-w-4xl mx-auto",children:[(0,eo.jsx)(se,{children:(0,eo.jsxs)(de,{className:"flex items-center gap-2",children:[(0,eo.jsx)(ci.Bot,{className:"h-5 w-5"}),U]})}),(0,eo.jsx)(Y,{children:(0,eo.jsxs)("form",{onSubmit:c,className:"space-y-6",children:[(0,eo.jsxs)("div",{className:"space-y-4",children:[(0,eo.jsxs)("div",{className:"space-y-2",children:[(0,eo.jsx)(Je,{htmlFor:"name",children:"Name *"}),(0,eo.jsx)(le,{id:"name",value:l.name||"",onChange:x=>w({...l,name:x.target.value}),required:!0,disabled:o||!b})]}),(0,eo.jsxs)("div",{className:"space-y-2",children:[(0,eo.jsx)(Je,{htmlFor:"description",children:"Description"}),(0,eo.jsx)(gt,{id:"description",value:l.description||"",onChange:x=>w({...l,description:x.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!b})]})]}),(0,eo.jsxs)("div",{className:"space-y-4",children:[(0,eo.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,eo.jsxs)("div",{className:"space-y-2",children:[(0,eo.jsx)(Je,{htmlFor:"jobDescription",children:"Job Description *"}),(0,eo.jsx)(gt,{id:"jobDescription",value:l.jobDescription||"",onChange:x=>w({...l,jobDescription:x.target.value}),rows:4,required:l.type==="digital",disabled:o||!b})]}),(0,eo.jsxs)("div",{className:"space-y-2",children:[(0,eo.jsx)(Je,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,eo.jsx)(gt,{id:"workInstructions",value:l.workInstructions||"",onChange:x=>w({...l,workInstructions:x.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!b})]}),L("capabilities","Capabilities",f,A,"Add capability"),(0,eo.jsx)(za,{selectedDocuments:l.knowledge||[],onDocumentsChange:x=>w({...l,knowledge:x}),label:"Knowledge",placeholder:"Search for knowledge documents to add...",disabled:o||!b,availableDocuments:d}),(0,eo.jsx)(za,{selectedDocuments:l.coreKnowledge||[],onDocumentsChange:x=>w({...l,coreKnowledge:x}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!b,availableDocuments:d})]}),(0,eo.jsxs)("div",{className:"flex justify-end gap-2 eo-4 border-t",children:[(0,eo.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:b?n:"Close"}),b?(0,eo.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":ie}):(0,eo.jsxs)(y,{type:"button",onClick:R,disabled:o,className:"gap-2",children:[(0,eo.jsx)(ci.Edit,{className:"h-4 w-4"}),"Edit"]})]})]})})]})}function Xo({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[s,i]=(0,Ka.useState)(""),n=(0,Ka.useMemo)(()=>e.filter(d=>d.name.toLowerCase().includes(s.toLowerCase())||d.email.toLowerCase().includes(s.toLowerCase())||d.role.toLowerCase().includes(s.toLowerCase())||(d.skills||[]).some(w=>w.toLowerCase().includes(s.toLowerCase()))),[e,s]),r=d=>{t(d)};return(0,eo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,eo.jsx)(va.AnimatePresence,{mode:"wait",children:(0,eo.jsxs)(va.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,eo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,eo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,eo.jsx)(ci.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,eo.jsxs)("div",{children:[(0,eo.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,eo.jsx)("p",{className:"text-muted-foreground",children:"Choose a user to add as a colleague"})]})]}),(0,eo.jsx)(X,{className:"container",children:(0,eo.jsx)(Y,{className:"eo-6",children:(0,eo.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,eo.jsx)("div",{className:"flex-1",children:(0,eo.jsxs)("div",{className:"relative",children:[(0,eo.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,eo.jsx)(le,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:d=>i(d.target.value),className:"pl-9"})]})})})})}),(0,eo.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(d=>(0,eo.jsx)(va.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,eo.jsxs)(X,{className:`cursor-pointer transition-all hover:shadow-lg ${o===d.id?"ring-2 ring-primary":""}`,onClick:()=>r(d),children:[(0,eo.jsx)(se,{className:"pb-3",children:(0,eo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,eo.jsxs)(Ge,{children:[(0,eo.jsx)(lt,{src:d.avatar,alt:d.name}),(0,eo.jsx)(_e,{children:(0,eo.jsx)(ci.User,{className:"h-4 w-4"})})]}),(0,eo.jsxs)("div",{children:[(0,eo.jsx)(de,{className:"text-lg",children:d.name}),(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:d.role})]})]}),o===d.id&&(0,eo.jsx)(ci.Check,{className:"h-5 w-5 text-primary"})]})}),(0,eo.jsx)(Y,{className:"eo-0",children:(0,eo.jsxs)("div",{className:"space-y-3",children:[(0,eo.jsxs)("div",{children:[(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,eo.jsx)("p",{className:"text-sm font-medium",children:d.email})]}),(0,eo.jsxs)("div",{children:[(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"}),(0,eo.jsx)(_,{variant:"secondary",children:d.department})]}),d.location&&(0,eo.jsxs)("div",{children:[(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Location"}),(0,eo.jsx)("p",{className:"text-sm",children:d.location})]}),d.skills&&d.skills.length>0&&(0,eo.jsxs)("div",{children:[(0,eo.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,eo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[d.skills.slice(0,3).map(l=>(0,eo.jsx)(_,{variant:"outline",className:"text-xs",children:l},l)),d.skills.length>3&&(0,eo.jsxs)(_,{variant:"outline",className:"text-xs",children:["+",d.skills.length-3]})]})]})]})})]})},d.id))}),n.length===0&&(0,eo.jsx)(X,{className:"container mt-4",children:(0,eo.jsx)(Y,{className:"eo-6",children:(0,eo.jsxs)("div",{className:"text-center py-8",children:[(0,eo.jsx)(ci.User,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,eo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,eo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function Yo({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[s,i]=(0,Ka.useState)(""),[n,r]=(0,Ka.useState)("all"),d=(0,Ka.useMemo)(()=>e.filter(u=>{let k=u.name.toLowerCase().includes(s.toLowerCase())||u.jobDescription.toLowerCase().includes(s.toLowerCase())||u.capabilities.some(A=>A.toLowerCase().includes(s.toLowerCase()))||u.workInstructions.toLowerCase().includes(s.toLowerCase()),f=n==="all"||u.status===n;return k&&f}),[e,s,n]),l=u=>{let k={...u,id:`${u.id}-clone-${Date.now()}`,name:`${u.name} (Copy)`,joinedDate:new Date,lastActive:new Date,lastUpdated:new Date,version:"1.0.0"};t(k)},w=u=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(u);return(0,eo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,eo.jsx)(va.AnimatePresence,{mode:"wait",children:(0,eo.jsxs)(va.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,eo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,eo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,eo.jsx)(ci.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,eo.jsxs)("div",{children:[(0,eo.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,eo.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague to clone"})]})]}),(0,eo.jsx)(X,{children:(0,eo.jsx)(Y,{className:"eo-6",children:(0,eo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,eo.jsx)("div",{className:"flex-1",children:(0,eo.jsxs)("div",{className:"relative",children:[(0,eo.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,eo.jsx)(le,{placeholder:"Search by name, job description, or capabilities...",value:s,onChange:u=>i(u.target.value),className:"pl-9"})]})}),(0,eo.jsxs)("select",{value:n,onChange:u=>r(u.target.value),className:"h-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,eo.jsx)("option",{value:"all",children:"All Status"}),(0,eo.jsx)("option",{value:"active",children:"Active"}),(0,eo.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,eo.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:d.map(u=>(0,eo.jsx)(va.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,eo.jsxs)(X,{className:`cursor-pointer transition-all hover:shadow-lg ${o===u.id?"ring-2 ring-primary":""}`,onClick:()=>l(u),children:[(0,eo.jsx)(se,{className:"pb-3",children:(0,eo.jsxs)("div",{className:"flex items-start justify-between",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-3",children:[(0,eo.jsx)(Ge,{children:(0,eo.jsx)(_e,{className:"bg-blue-100",children:(0,eo.jsx)(ci.Bot,{className:"h-4 w-4 text-blue-600"})})}),(0,eo.jsxs)("div",{children:[(0,eo.jsxs)(de,{className:"text-lg flex items-center gap-2",children:[u.name,(0,eo.jsx)(_,{variant:u.status==="active"?"default":"secondary",className:"text-xs",children:u.status})]}),(0,eo.jsxs)("p",{className:"text-sm text-muted-foreground",children:["eo",u.version]})]})]}),(0,eo.jsxs)(y,{size:"sm",variant:"outline",className:"gap-2 h-8",onClick:k=>{k.stopPropagation(),l(u)},children:[(0,eo.jsx)(ci.Copy,{className:"h-3 w-3"}),"Clone"]})]})}),(0,eo.jsx)(Y,{className:"eo-0",children:(0,eo.jsxs)("div",{className:"space-y-3",children:[(0,eo.jsxs)("div",{children:[(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,eo.jsx)("p",{className:"text-sm line-clamp-2",children:u.jobDescription})]}),u.capabilities&&u.capabilities.length>0&&(0,eo.jsxs)("div",{children:[(0,eo.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,eo.jsxs)("div",{className:"flex flex-wrap gap-1",children:[u.capabilities.slice(0,3).map(k=>(0,eo.jsx)(_,{variant:"outline",className:"text-xs",children:k},k)),u.capabilities.length>3&&(0,eo.jsxs)(_,{variant:"outline",className:"text-xs",children:["+",u.capabilities.length-3]})]})]}),(0,eo.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,eo.jsx)(ci.Calendar,{className:"h-3 w-3"}),(0,eo.jsxs)("span",{children:["Updated ",w(u.lastUpdated)]})]}),u.knowledge&&(0,eo.jsxs)("div",{className:"flex items-center gap-1",children:[(0,eo.jsx)(ci.Users,{className:"h-3 w-3"}),(0,eo.jsxs)("span",{children:[u.knowledge.length," docs"]})]})]}),u.workInstructions&&(0,eo.jsxs)("div",{children:[(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,eo.jsx)("p",{className:"text-xs line-clamp-2",children:u.workInstructions})]})]})})]})},u.id))}),d.length===0&&(0,eo.jsx)(X,{children:(0,eo.jsx)(Y,{className:"eo-6",children:(0,eo.jsxs)("div",{className:"text-center py-8",children:[(0,eo.jsx)(ci.Bot,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,eo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,eo.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Qo({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,eo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,eo.jsx)(va.AnimatePresence,{mode:"wait",children:(0,eo.jsxs)(va.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,eo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,eo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,eo.jsx)(ci.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,eo.jsxs)("div",{children:[(0,eo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,eo.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague to add"})]})]}),(0,eo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,eo.jsx)(va.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,eo.jsxs)(X,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,eo.jsxs)(se,{className:"text-center pb-4",children:[(0,eo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,eo.jsx)(ci.User,{className:"h-8 w-8 text-blue-600"})}),(0,eo.jsx)(de,{className:"text-xl",children:"Add Human Colleague"})]}),(0,eo.jsxs)(Y,{className:"text-center",children:[(0,eo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization to add as team members."}),(0,eo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,eo.jsx)(ci.Users,{className:"h-4 w-4 text-blue-600"}),(0,eo.jsx)("span",{children:"Browse existing users"})]}),(0,eo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,eo.jsx)(ci.User,{className:"h-4 w-4 text-blue-600"}),(0,eo.jsx)("span",{children:"Import user details automatically"})]})]}),(0,eo.jsx)(y,{className:"mt-6 w-full",onClick:e,children:"Select User"})]})]})}),(0,eo.jsx)(va.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,eo.jsxs)(X,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,eo.jsxs)(se,{className:"text-center pb-4",children:[(0,eo.jsx)("div",{className:"mx-auto w-16 h-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,eo.jsx)(ci.Bot,{className:"h-8 w-8 text-purple-600"})}),(0,eo.jsx)(de,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,eo.jsxs)(Y,{className:"text-center",children:[(0,eo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,eo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,eo.jsx)(ci.Bot,{className:"h-4 w-4 text-purple-600"}),(0,eo.jsx)("span",{children:"Clone existing colleagues"})]}),(0,eo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,eo.jsx)(ci.Users,{className:"h-4 w-4 text-purple-600"}),(0,eo.jsx)("span",{children:"Create from templates"})]})]}),(0,eo.jsx)(y,{className:"mt-6 w-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Zo({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,eo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,eo.jsx)(va.AnimatePresence,{mode:"wait",children:(0,eo.jsxs)(va.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,eo.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,eo.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,eo.jsx)(ci.ChevronLeft,{className:"h-4 w-4"}),"Back"]}),(0,eo.jsxs)("div",{children:[(0,eo.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,eo.jsx)("p",{className:"text-muted-foreground",children:"Choose how to create your digital colleague"})]})]}),(0,eo.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-w-4xl mx-auto",children:[(0,eo.jsx)(va.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,eo.jsxs)(X,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,eo.jsxs)(se,{className:"text-center pb-4",children:[(0,eo.jsx)("div",{className:"mx-auto w-16 h-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,eo.jsx)(ci.Copy,{className:"h-8 w-8 text-blue-600"})}),(0,eo.jsx)(de,{className:"text-xl",children:"Clone Existing"})]}),(0,eo.jsxs)(Y,{className:"text-center",children:[(0,eo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize ci for your needs."}),(0,eo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,eo.jsx)(ci.Bot,{className:"h-4 w-4 text-blue-600"}),(0,eo.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,eo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,eo.jsx)(ci.Copy,{className:"h-4 w-4 text-blue-600"}),(0,eo.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,eo.jsx)(y,{className:"mt-6 w-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,eo.jsx)(va.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,eo.jsxs)(X,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,eo.jsxs)(se,{className:"text-center pb-4",children:[(0,eo.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,eo.jsx)(ci.Sparkles,{className:"h-8 w-8 text-green-600"})}),(0,eo.jsx)(de,{className:"text-xl",children:"Create New"})]}),(0,eo.jsxs)(Y,{className:"text-center",children:[(0,eo.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,eo.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,eo.jsx)(ci.Plus,{className:"h-4 w-4 text-green-600"}),(0,eo.jsx)("span",{children:"Custom job description"})]}),(0,eo.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,eo.jsx)(ci.Sparkles,{className:"h-4 w-4 text-green-600"}),(0,eo.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,eo.jsx)(y,{className:"mt-6 w-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}function Ua({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:s=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:r=[],existingDigitalColleagues:d=[]}){let[l,w]=(0,Ka.useState)(e||[]),[u,k]=(0,Ka.useState)(""),[f,A]=(0,Ka.useState)("all"),[b,g]=(0,Ka.useState)("all"),[c,Z]=(0,Ka.useState)("all"),[C,R]=(0,Ka.useState)(null),[L,U]=(0,Ka.useState)(null),[ie,x]=(0,Ka.useState)("main"),O=l.filter(h=>{let ke=h.name.toLowerCase().includes(u.toLowerCase())||h.type==="human"&&(h.email.toLowerCase().includes(u.toLowerCase())||h.role.toLowerCase().includes(u.toLowerCase()))||h.type==="digital"&&h.jobDescription.toLowerCase().includes(u.toLowerCase()),xe=f==="all"||h.type==="human"&&h.department===f,ba=b==="all"||h.status===b;return ke&&xe&&ba}),$=O.filter(h=>h.type==="human"),ne=O.filter(h=>h.type==="digital"),q=()=>{x("typeSelection")},Be=h=>{h.type==="digital"&&(R(h),x("form"))},m=h=>{h.type==="digital"&&(U(h),x("view"))},ee=h=>{let ke={id:`human-${Date.now()}`,type:"human",name:h.name,email:h.email,role:h.role,department:h.department,phone:h.phone,location:h.location,timezone:h.timezone,skills:h.skills,bio:h.bio,status:"active",joinedDate:new Date,lastActive:new Date};w(xe=>[...xe,ke]),t?.(ke),x("main")},te=h=>{w(ke=>[...ke,h]),t?.(h),x("main")},Le=()=>{R(null),x("form")},we=h=>{C?(w(ke=>ke.map(xe=>xe.id===h.id?h:xe)),a?.(h)):(w(ke=>[...ke,h]),t?.(h)),x("main"),R(null)},nt=()=>{x("main"),R(null),U(null)},Vt=()=>{x("main"),U(null)},Fe=()=>{L&&(R(L),U(null),x("form"))},ha=h=>{w(ke=>ke.filter(xe=>xe.id!==h)),o?.(h)},pi=()=>{k(""),A("all"),g("all")},Oa=()=>{let h=[];return d.forEach(xe=>{h.push(...xe.knowledge,...xe.coreKnowledge)}),l.forEach(xe=>{xe.type==="digital"&&h.push(...xe.knowledge,...xe.coreKnowledge)}),h.filter((xe,ba,ui)=>ba===ui.findIndex(gi=>gi.id===xe.id))};return ie==="typeSelection"?(0,eo.jsx)(Qo,{onSelectHuman:()=>x("userSelection"),onSelectDigital:()=>x("digitalOptions"),onCancel:()=>x("main")}):ie==="userSelection"?(0,eo.jsx)(Xo,{users:r,onUserSelect:ee,onCancel:()=>x("typeSelection")}):ie==="digitalOptions"?(0,eo.jsx)(Zo,{onCloneExisting:()=>x("digitalClone"),onCreateNew:Le,onCancel:()=>x("typeSelection")}):ie==="digitalClone"?(0,eo.jsx)(Yo,{digitalColleagues:d,onColleagueClone:te,onCancel:()=>x("digitalOptions")}):ie==="form"?(0,eo.jsx)(Fa,{colleague:C||void 0,onSave:we,onCancel:nt,availableKnowledgeDocuments:Oa()}):ie==="view"?(0,eo.jsx)(Fa,{colleague:L||void 0,onSave:we,onCancel:Vt,readOnly:!0,availableKnowledgeDocuments:Oa()}):(0,eo.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,eo.jsx)(va.AnimatePresence,{mode:"wait",children:(0,eo.jsx)(va.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,eo.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,eo.jsx)(Me,{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:q}}),(0,eo.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,eo.jsxs)(X,{children:[(0,eo.jsxs)(se,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,eo.jsx)(de,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,eo.jsx)(ci.Users,{className:"h-4 w-4 text-muted-foreground"})]}),(0,eo.jsxs)(Y,{children:[(0,eo.jsx)("div",{className:"text-2xl font-bold",children:l.length}),(0,eo.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(h=>h.status==="active").length," active"]})]})]}),(0,eo.jsxs)(X,{children:[(0,eo.jsxs)(se,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,eo.jsx)(de,{className:"text-sm font-medium",children:"Human Members"}),(0,eo.jsx)(ci.User,{className:"h-4 w-4 text-muted-foreground"})]}),(0,eo.jsxs)(Y,{children:[(0,eo.jsx)("div",{className:"text-2xl font-bold",children:l.filter(h=>h.type==="human").length}),(0,eo.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(h=>h.type==="human"&&h.status==="active").length," active"]})]})]}),(0,eo.jsxs)(X,{children:[(0,eo.jsxs)(se,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,eo.jsx)(de,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,eo.jsx)(ci.Bot,{className:"h-4 w-4 text-muted-foreground"})]}),(0,eo.jsxs)(Y,{children:[(0,eo.jsx)("div",{className:"text-2xl font-bold",children:l.filter(h=>h.type==="digital").length}),(0,eo.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(h=>h.type==="digital"&&h.status==="active").length," active"]})]})]})]}),(0,eo.jsx)(X,{children:(0,eo.jsx)(Y,{className:"eo-6",children:(0,eo.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,eo.jsx)("div",{className:"flex-1",children:(0,eo.jsxs)("div",{className:"relative",children:[(0,eo.jsx)(ci.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,eo.jsx)(le,{placeholder:"Search colleagues...",value:u,onChange:h=>k(h.target.value),className:"pl-9"})]})}),(0,eo.jsxs)(Ft,{value:f,onValueChange:A,children:[(0,eo.jsx)(Nt,{className:"w-full md:w-[180px]",children:(0,eo.jsx)(Ut,{placeholder:"Department"})}),(0,eo.jsxs)(Ct,{children:[(0,eo.jsx)(Oe,{value:"all",children:"All Departments"}),i.map(h=>(0,eo.jsx)(Oe,{value:h,children:h},h))]})]}),(0,eo.jsxs)(Ft,{value:b,onValueChange:g,children:[(0,eo.jsx)(Nt,{className:"w-full md:w-[140px]",children:(0,eo.jsx)(Ut,{placeholder:"Status"})}),(0,eo.jsxs)(Ct,{children:[(0,eo.jsx)(Oe,{value:"all",children:"All Status"}),(0,eo.jsx)(Oe,{value:"active",children:"Active"}),(0,eo.jsx)(Oe,{value:"inactive",children:"Inactive"})]})]}),(u||f!=="all"||b!=="all")&&(0,eo.jsxs)(y,{variant:"outline",onClick:pi,className:"gap-2",children:[(0,eo.jsx)(ci.Filter,{className:"h-4 w-4"}),"Clear"]})]})})}),(0,eo.jsxs)("div",{className:"space-y-4",children:[(0,eo.jsx)(da,{activeTab:c,onTabChange:Z,tabOptions:[{value:"all",label:`All (${O.length})`},{value:"human",label:`Human (${$.length})`},{value:"digital",label:`Digital (${ne.length})`}],maxWidth:"400px",gridCols:3}),c==="all"&&(0,eo.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:O.map(h=>(0,eo.jsx)(pa,{colleague:h,onEdit:Be,onDelete:ha,onViewDetails:m,compact:s},h.id))}),c==="human"&&(0,eo.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:$.map(h=>(0,eo.jsx)(pa,{colleague:h,onEdit:Be,onDelete:ha,onViewDetails:m,compact:s},h.id))}),c==="digital"&&(0,eo.jsx)("div",{className:`grid gap-4 ${s?"grid-cols-1 md:grid-cols-2 lg:grid-cols-4":"grid-cols-1 md:grid-cols-2 lg:grid-cols-3"}`,children:ne.map(h=>(0,eo.jsx)(pa,{colleague:h,onEdit:Be,onDelete:ha,onViewDetails:m,compact:s},h.id))})]}),O.length===0&&(0,eo.jsx)(X,{children:(0,eo.jsx)(Y,{className:"eo-6",children:(0,eo.jsxs)("div",{className:"text-center py-8",children:[(0,eo.jsx)(ci.Users,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),(0,eo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,eo.jsx)("p",{className:"text-muted-foreground mb-4",children:u||f!=="all"||b!=="all"?"Try adjusting your filters to see more results.":"Get started by adding your first colleague."}),(0,eo.jsxs)(y,{onClick:q,className:"gap-2",children:[(0,eo.jsx)(ci.Plus,{className:"h-4 w-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function ti({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:s=[]}){let[i,n]=(0,Ka.useState)({...e,updatedAt:new Date}),[r,d]=(0,Ka.useState)(!1),[l,w]=(0,Ka.useState)(!1),u=()=>{let C=new Set,R=new Set;return s.forEach(L=>{L.menuConfig.groupBy.forEach(U=>C.add(U))}),o.forEach(L=>{L.metadata&&Object.keys(L.metadata).forEach(U=>R.add(U))}),{contextKeys:Array.from(C).sort(),documentKeys:Array.from(R).sort(),allKeys:Array.from(new Set([...C,...R])).sort()}},k=C=>{let R=new Set;return o.forEach(L=>{L.metadata?.[C]&&R.add(String(L.metadata[C]))}),Array.from(R).sort()},f=u(),A=()=>{t(i)},b=(C,R)=>{n(L=>({...L,metadata:{...L.metadata,[C]:R}}))},g=(C,R)=>{R==="__custom__"?b(C,""):b(C,R)},c=()=>{let C=`field_${Date.now()}`;b(C,"")},Z=C=>{n(R=>{let L={...R.metadata};return delete L[C],{...R,metadata:L}})};return(0,eo.jsxs)(va.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,eo.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,eo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[(0,eo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,eo.jsx)(ci.Edit3,{className:"h-6 w-6 text-primary"})}),(0,eo.jsx)("div",{className:"flex-1 min-w-0",children:l?(0,eo.jsx)(le,{value:i.title,onChange:C=>n(R=>({...R,title:C.target.value})),onBlur:()=>w(!1),onKeyDown:C=>{C.key==="Enter"&&w(!1),C.key==="Escape"&&(n(R=>({...R,title:e.title})),w(!1))},autoFocus:!0,className:"text-xl font-bold border-none p-0 h-auto bg-transparent focus-visible:ring-0 focus-visible:ring-offset-0",placeholder:"Document title..."}):(0,eo.jsxs)("div",{className:"flex items-center gap-2 group",children:[(0,eo.jsx)("h1",{className:"text-xl font-bold text-foreground cursor-pointer hover:text-primary transition-colors py-1",onClick:()=>w(!0),title:"Click to edit title",children:i.title||"Untitled Document"}),(0,eo.jsx)(y,{variant:"ghost",size:"sm",onClick:()=>w(!0),className:"opacity-0 group-hover:opacity-100 transition-opacity h-6 w-6 p-0",children:(0,eo.jsx)(ci.Edit3,{className:"h-3 w-3"})})]})})]}),(0,eo.jsxs)("div",{className:"flex gap-2",children:[(0,eo.jsxs)(y,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,eo.jsx)(ci.X,{className:"h-4 w-4"}),"Cancel"]}),(0,eo.jsxs)(y,{size:"sm",onClick:A,className:"gap-2",children:[(0,eo.jsx)(ci.Save,{className:"h-4 w-4"}),"Save Changes"]})]})]}),(0,eo.jsxs)("div",{className:"space-y-4",children:[(0,eo.jsxs)("div",{children:[(0,eo.jsx)("label",{className:"block text-sm font-medium text-foreground mb-1",children:"Description"}),(0,eo.jsx)(le,{value:i.description||"",onChange:C=>n(R=>({...R,description:C.target.value})),placeholder:"Brief description...",className:"text-sm"})]}),(0,eo.jsxs)("div",{children:[(0,eo.jsxs)("button",{type:"button",onClick:()=>d(!r),className:"flex items-center justify-between w-full p-3 bg-muted/20 hover:bg-muted/30 rounded-lg border border-border transition-colors",children:[(0,eo.jsxs)("div",{className:"flex items-center gap-2",children:[r?(0,eo.jsx)(ci.ChevronDown,{className:"h-4 w-4 text-muted-foreground"}):(0,eo.jsx)(ci.ChevronRight,{className:"h-4 w-4 text-muted-foreground"}),(0,eo.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Metadata"}),i.metadata&&Object.keys(i.metadata).length>0&&(0,eo.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,eo.jsxs)("div",{className:"flex items-center gap-2",children:[f.contextKeys.length>0&&!r&&(0,eo.jsxs)("span",{className:"text-xs text-muted-foreground",children:[f.contextKeys.slice(0,2).join(", "),f.contextKeys.length>2&&"..."]}),(0,eo.jsxs)(y,{type:"button",variant:"ghost",size:"sm",onClick:C=>{C.stopPropagation(),c(),d(!0)},className:"gap-1 h-6 px-2",children:[(0,eo.jsx)(ci.Plus,{className:"h-3 w-3"}),"Add"]})]})]}),r&&(0,eo.jsx)("div",{className:"mt-3 space-y-2 pl-6",children:i.metadata&&Object.keys(i.metadata).length>0?Object.entries(i.metadata).map(([C,R])=>{let L=k(C);return(0,eo.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,eo.jsx)(le,{value:C,onChange:U=>{let ie=U.target.value,x=i.metadata?.[C];n(O=>{let $={...O.metadata};return delete $[C],ie&&($[ie]=x||""),{...O,metadata:$}})},placeholder:"Key",className:"w-32 h-8 text-sm",list:`metadata-keys-${C}`}),(0,eo.jsx)("datalist",{id:`metadata-keys-${C}`,children:f.allKeys.map(U=>(0,eo.jsx)("option",{value:U},U))}),(0,eo.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),L.length>0?(0,eo.jsxs)(Ft,{value:String(R||""),onValueChange:U=>g(C,U),children:[(0,eo.jsx)(Nt,{className:"flex-1 h-8 text-sm",children:(0,eo.jsx)(Ut,{placeholder:"Value"})}),(0,eo.jsxs)(Ct,{children:[L.map(U=>(0,eo.jsx)(Oe,{value:U,children:U},U)),(0,eo.jsx)(Oe,{value:"__custom__",children:(0,eo.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,eo.jsx)(le,{value:String(R||""),onChange:U=>b(C,U.target.value),placeholder:"Value",className:"flex-1 h-8 text-sm"}),(0,eo.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:()=>Z(C),className:"h-8 w-8 p-0 text-muted-foreground hover:text-destructive",children:(0,eo.jsx)(ci.X,{className:"h-3 w-3"})})]},C)}):(0,eo.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/10",children:(0,eo.jsx)("p",{className:"text-xs text-muted-foreground",children:"No metadata fields yet"})})})]}),(0,eo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,eo.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,eo.jsx)(_,{variant:"secondary",className:"font-mono",children:i.format.toUpperCase()})]})]})]}),(0,eo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,eo.jsxs)("div",{className:"p-8",children:[(0,eo.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,eo.jsx)(gt,{value:i.content||"",onChange:C=>n(R=>({...R,content:C.target.value})),placeholder:"Document content...",className:"min-h-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var ri=e=>(0,eo.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>')}}),ai=e=>(0,eo.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),vr=e=>(0,eo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,eo.jsx)("div",{className:"bg-amber-50 dark:bg-amber-950/20 border border-amber-200 dark:border-amber-800 rounded-lg p-4 mb-4",children:(0,eo.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,eo.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,eo.jsx)("pre",{className:"text-sm",children:e})]}),hr=e=>(0,eo.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-w-none",children:[(0,eo.jsx)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 mb-4",children:(0,eo.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,eo.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),ri(e)]});function si({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:s=[],knowledgeContexts:i=[]}){let[n,r]=(0,Ka.useState)(!1),d=f=>{switch(f){case"markdown":case"mdx":return(0,eo.jsx)(ci.FileText,{className:"h-6 w-6 text-primary"});case"richtext":return(0,eo.jsx)(ci.File,{className:"h-6 w-6 text-success"});case"text":return(0,eo.jsx)(ci.Type,{className:"h-6 w-6 text-muted-foreground"});default:return(0,eo.jsx)(ci.File,{className:"h-6 w-6 text-muted-foreground"})}},l=f=>{switch(f){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"}},w=(f,A)=>{let b={markdown:ri,mdx:hr,richtext:vr,text:ai},g=o?.[A]||b[A];return g?g(f):ai(f)},u=f=>{r(!1),t?.(f)},k=()=>{r(!1)};return n?(0,eo.jsx)(ti,{document:e,onSave:u,onCancel:k,availableDocuments:s,knowledgeContexts:i}):(0,eo.jsxs)(va.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"h-full flex flex-col",children:[(0,eo.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,eo.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,eo.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[(0,eo.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:d(e.format)}),(0,eo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,eo.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,eo.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,eo.jsx)("div",{className:"flex-shrink-0",children:(0,eo.jsxs)(y,{variant:"outline",size:"sm",onClick:()=>r(!0),className:"gap-2",children:[(0,eo.jsx)(ci.Edit3,{className:"h-4 w-4"}),"Edit"]})})]}),(0,eo.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,eo.jsx)("span",{className:`inline-flex items-center px-3 py-1 rounded-full text-sm font-medium border ${l(e.format)}`,children:e.format.toUpperCase()}),e.tags?.map(f=>(0,eo.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",f]},f))]})]}),(0,eo.jsx)("div",{className:"flex-1 overflow-auto",children:(0,eo.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,eo.jsxs)("div",{className:"mb-6",children:[(0,eo.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,eo.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,eo.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(([f,A])=>(0,eo.jsxs)("div",{className:"flex gap-1",children:[(0,eo.jsxs)("span",{className:"text-muted-foreground font-medium",children:[f.replace(/([A-Z])/g," $1").trim(),":"]}),(0,eo.jsx)("span",{className:"text-foreground truncate",children:String(A)})]},f))})})]}),(0,eo.jsx)("div",{className:"space-y-4",children:e.content?(0,eo.jsx)("div",{className:"relative",children:(0,eo.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:w(e.content,e.format)})}):(0,eo.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,eo.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,eo.jsx)(ci.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,eo.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,eo.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function ni({label:e,documents:t,children:a,level:o,onDocumentClick:s,selectedDocumentId:i,showDocumentCount:n=!0}){let[r,d]=(0,Ka.useState)(o===0),l=a&&Object.keys(a).length>0,w=t.length+(a?Object.values(a).reduce((f,A)=>f+A.documents.length,0):0),u=f=>{switch(f){case"markdown":case"mdx":return(0,eo.jsx)(ci.FileText,{className:"h-3.5 w-3.5 text-muted-foreground"});case"richtext":return(0,eo.jsx)(ci.File,{className:"h-3.5 w-3.5 text-muted-foreground"});default:return(0,eo.jsx)(ci.File,{className:"h-3.5 w-3.5 text-muted-foreground"})}},k=f=>{let A=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return A[f%A.length]};return(0,eo.jsxs)("div",{className:"space-y-1",children:[(l||t.length>0)&&(0,eo.jsxs)(va.motion.div,{className:`group flex items-center gap-3 p-3 rounded-xl cursor-pointer transition-all duration-200 ${r?"bg-card shadow-sm border border-border":"hover:bg-muted/50 hover:shadow-sm"}`,style:{marginLeft:`${o*20}px`},onClick:()=>d(!r),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,eo.jsx)("div",{className:`w-1 h-6 rounded-full ${k(o)}`}),(0,eo.jsx)(va.motion.div,{animate:{rotate:r?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,eo.jsx)(ci.ChevronRight,{className:"h-4 w-4 text-muted-foreground"})}),(0,eo.jsxs)("div",{className:"flex-1 flex items-center justify-between min-w-0",children:[(0,eo.jsx)("div",{className:"flex items-center gap-2 min-w-0",children:(0,eo.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&w>0&&(0,eo.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,eo.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:w})})]})]}),(0,eo.jsx)(va.motion.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,eo.jsxs)("div",{className:"eo-2 space-y-1",children:[t.map((f,A)=>(0,eo.jsxs)(va.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:A*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===f.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>s?.(f),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,eo.jsx)("div",{className:"flex-shrink-0",children:u(f.format)}),(0,eo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,eo.jsx)("p",{className:`text-sm truncate transition-colors ${i===f.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:f.title}),f.description&&(0,eo.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:f.description})]}),f.tags&&f.tags.length>0&&(0,eo.jsx)("div",{className:"flex-shrink-0",children:(0,eo.jsx)("span",{className:"inline-flex items-center px-2 py-1 rounded-md text-xs font-medium bg-muted text-muted-foreground group-hover:bg-muted/80 transition-colors",children:f.tags[0]})})]},f.id)),a&&Object.entries(a).map(([f,A])=>(0,eo.jsx)(ni,{label:f,documents:A.documents,children:A.children,level:o+1,onDocumentClick:s,selectedDocumentId:i,showDocumentCount:n},f))]})})]})}function li({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:s,selectedDocumentId:i,className:n,editable:r=!0}){let[d,l]=(0,Ka.useState)(""),[w,u]=(0,Ka.useState)(null),k=(0,Ka.useMemo)(()=>d?e.filter(b=>b.title.toLowerCase().includes(d.toLowerCase())||b.description?.toLowerCase().includes(d.toLowerCase())||b.tags?.some(g=>g.toLowerCase().includes(d.toLowerCase()))||Object.values(b.metadata||{}).some(g=>String(g).toLowerCase().includes(d.toLowerCase()))):e,[e,d]),f=(0,Ka.useMemo)(()=>{let b=(g,c)=>{if(c.length===0)return{};let[Z,...C]=c;return g.reduce((L,U)=>{let ie=U.metadata?.[Z]||"Uncategorized",x=String(ie);if(L[x]||(L[x]={documents:[],children:{}}),C.length===0)L[x].documents.push(U);else{let O=b([U],C),$=Object.keys(O)[0];$&&(L[x].children||(L[x].children={}),L[x].children[$]?L[x].children[$].documents.push(...O[$].documents):L[x].children[$]=O[$])}return L},{})};return b(k,t.groupBy)},[k,t.groupBy]),A=b=>{u(b),a?.(b)};return(0,eo.jsxs)("div",{className:`flex h-full ${n||""}`,children:[(0,eo.jsxs)("div",{className:"w-1/3 border-r border-border bg-muted/20",children:[(0,eo.jsx)("div",{className:"p-6 border-b border-border",children:(0,eo.jsxs)("div",{className:"relative",children:[(0,eo.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,eo.jsx)(ci.Search,{className:"h-4 w-4 text-muted-foreground"})}),(0,eo.jsx)(le,{placeholder:"Search knowledge base...",value:d,onChange:b=>l(b.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,eo.jsx)(Ue,{className:"h-[calc(100%-100px)]",children:(0,eo.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(f).map(([b,g])=>(0,eo.jsx)(ni,{label:b,documents:g.documents,children:g.children,level:0,onDocumentClick:A,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},b)),Object.keys(f).length===0&&(0,eo.jsxs)(va.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,eo.jsx)("div",{className:"w-16 h-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,eo.jsx)(ci.FileText,{className:"h-8 w-8 text-muted-foreground"})}),(0,eo.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,eo.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,eo.jsx)("div",{className:"flex-1 bg-background",children:w?(0,eo.jsx)(si,{document:w,onDocumentUpdate:s,editable:r}):(0,eo.jsx)("div",{className:"h-full flex items-center justify-center text-center",children:(0,eo.jsxs)(va.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-w-sm",children:[(0,eo.jsx)("div",{className:"w-20 h-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,eo.jsx)(ci.FileText,{className:"h-10 w-10 text-primary"})}),(0,eo.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,eo.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base to view its content and details"})]})})})]})}function Ha({documents:e=[],contexts:t=[],onDocumentClick:a=n=>console.log("Document clicked:",n),onDocumentShare:o=n=>console.log("Share document:",n),onLoadDocumentContent:s,selectedDocumentId:i}){let[n,r]=(0,Ka.useState)(t[0]);return!t||t.length===0?(0,eo.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,eo.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,eo.jsx)(Me,{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,eo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,eo.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,eo.jsxs)("div",{className:"flex flex-col h-full max-h-[calc(100vh-8rem)]",children:[(0,eo.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,eo.jsx)(Me,{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,eo.jsxs)("div",{className:"mt-6",children:[(0,eo.jsx)("div",{className:"border-b border-border",children:(0,eo.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(d=>(0,eo.jsxs)("button",{onClick:()=>r(d),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===d.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[d.icon,d.label]},d.id))})}),n.description&&(0,eo.jsx)("div",{className:"mt-3 px-1",children:(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,eo.jsx)("div",{className:"flex-1 min-h-0 px-2 md:px-4 pb-4",children:(0,eo.jsx)("div",{className:"h-full rounded-3xl border overflow-hidden",children:(0,eo.jsx)(li,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function mi({title:e="Digital Colleagues",businessUnits:t}){let[a,o]=(0,Ka.useState)("home"),[s,i]=(0,Ka.useState)(t[0]),n=c=>{console.log("Opening app:",c.name)},r=c=>{console.log("Favoriting app:",c.name)},d=c=>{console.log("Opening file:",c.name)},l=c=>{console.log("Sharing file:",c.name)},w=c=>{console.log("Opening project:",c.name)},u=c=>{console.log("Sharing project:",c.name)},k=c=>{i(c),console.log("Business unit changed to:",c.name)},f=()=>{console.log("Copilot clicked - navigating to chat"),o("chat")},A=c=>{console.log("Notification removed:",c)},b=()=>{console.log("All notifications removed")},g=()=>{switch(a){case"home":return(0,eo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,eo.jsxs)("section",{className:"text-center py-12",children:[(0,eo.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome to the ",s.name," team"]}),(0,eo.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,eo.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,eo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,eo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,eo.jsx)("p",{className:"text-3xl font-bold text-primary",children:"12"}),(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,eo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,eo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,eo.jsx)("p",{className:"text-3xl font-bold text-primary",children:"8"}),(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,eo.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,eo.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,eo.jsx)("p",{className:"text-3xl font-bold text-primary",children:"156"}),(0,eo.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,eo.jsx)(Me,{title:"Chat with your team",gradient:"bg-gradient-to-r from-pink-600 via-red-600 to-orange-600",primaryAction:{label:"Za",onClick:()=>o("chat")}})]});case"colleagues":return(0,eo.jsx)(Ua,{});case"chat":return(0,eo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,eo.jsxs)("section",{className:"text-center py-12",children:[(0,eo.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,eo.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",s.name," team members and collaborate in real-time."]})]}),(0,eo.jsx)(Me,{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,eo.jsxs)("div",{className:"space-y-8",children:[(0,eo.jsx)(Me,{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,eo.jsxs)("section",{className:"space-y-4",children:[(0,eo.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,eo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:ja.filter(c=>c.new).map(c=>(0,eo.jsx)(La,{app:c,showProgress:!0,onOpen:n,onFavorite:r},c.name))})]}),(0,eo.jsxs)("section",{className:"space-y-4",children:[(0,eo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,eo.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:ja.map(c=>(0,eo.jsx)(La,{app:c,onOpen:n,onFavorite:r},c.name))})]})]});case"knowledge":return(0,eo.jsx)(Ha,{});case"files":return(0,eo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,eo.jsx)(Me,{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,eo.jsxs)("section",{className:"space-y-4",children:[(0,eo.jsx)("div",{className:"flex items-center justify-between",children:(0,eo.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,eo.jsx)(zo,{files:Ho,onFileClick:d})]})]});case"projects":return(0,eo.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,eo.jsx)(Me,{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,eo.jsxs)("section",{className:"space-y-4",children:[(0,eo.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,eo.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:bo.map(c=>(0,eo.jsx)(Uo,{project:c,onOpen:w,onShare:u},c.name))})]})]});case"learn":return(0,eo.jsxs)("div",{className:"space-y-8",children:[(0,eo.jsx)(Me,{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,eo.jsxs)("section",{className:"space-y-4",children:[(0,eo.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,eo.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Ko.slice(0,3).map(c=>(0,eo.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,eo.jsx)("h3",{className:"font-semibold mb-2",children:c.title}),(0,eo.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:c.description}),(0,eo.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,eo.jsx)("span",{children:c.duration}),(0,eo.jsx)("span",{children:c.level})]})]},c.title))})]})]});default:return null}};return(0,eo.jsx)(Ao,{sidebarItems:fo,title:e,notifications:vo,businessUnits:t,currentBusinessUnit:s,onBusinessUnitChange:k,activeTab:a,onTabChange:o,showTabs:!0,onActionClick:f,actionIcon:(0,eo.jsx)(ci.Bot,{className:"mr-2 h-4 w-4"}),actionText:"Start Chat",onNotificationRemove:A,onRemoveAll:b,children:(0,eo.jsx)(va.AnimatePresence,{mode:"wait",children:(0,eo.jsx)(va.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:g()},a)})})}