cortex-react-components 2.13.6 → 2.13.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ERJXTG6X.mjs → chunk-2GM2LPLB.mjs} +1 -1
- package/dist/{chunk-M7NV6EFH.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
- package/dist/{chunk-FDRX3CL2.mjs → chunk-3E3GY7S2.mjs} +1 -1
- package/dist/{chunk-MXCW6SOT.mjs → chunk-4SRUEQTP.mjs} +1 -1
- package/dist/{chunk-76AKO55V.mjs → chunk-4VCL66F7.mjs} +1 -1
- package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
- package/dist/{chunk-2HWSTGAP.mjs → chunk-6FHRZHAJ.mjs} +1 -1
- package/dist/{chunk-7GMAMIHM.mjs → chunk-7OMPPFGG.mjs} +1 -1
- package/dist/{chunk-MFCVMJBO.mjs → chunk-BDDEMCAH.mjs} +1 -1
- package/dist/{chunk-5SHZBJ5R.mjs → chunk-BQQ4V4PX.mjs} +1 -1
- package/dist/chunk-DCOFQFVJ.mjs +1 -0
- package/dist/{chunk-QSXEJ2NO.mjs → chunk-DODFVGFK.mjs} +1 -1
- package/dist/{chunk-B7AXSCTN.mjs → chunk-DPZHVBGG.mjs} +1 -1
- package/dist/chunk-DXRAJQMA.mjs +1 -0
- package/dist/{chunk-TO7SVJIU.mjs → chunk-EUGA4BNN.mjs} +1 -1
- package/dist/{chunk-H3CJOE6S.mjs → chunk-F64CA5CH.mjs} +1 -1
- package/dist/{chunk-NWISIJFD.mjs → chunk-FEWOSBUJ.mjs} +1 -1
- package/dist/{chunk-N3B3XNV3.mjs → chunk-FYQBRCQM.mjs} +1 -1
- package/dist/{chunk-67QPOSVV.mjs → chunk-GAZHKHGB.mjs} +1 -1
- package/dist/{chunk-255P6K5W.mjs → chunk-GETYSIZV.mjs} +1 -1
- package/dist/{chunk-FKU4VQR6.mjs → chunk-HDKHF3EA.mjs} +1 -1
- package/dist/{chunk-YKG4FNS4.mjs → chunk-HKMNAXLM.mjs} +1 -1
- package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
- package/dist/chunk-IKZZNNKD.mjs +4 -0
- package/dist/{chunk-AQQCH7Z2.mjs → chunk-KBEXWUKI.mjs} +1 -1
- package/dist/{chunk-XKGBG5FX.mjs → chunk-KVLUT4U2.mjs} +1 -1
- package/dist/{chunk-WUA65ZZB.mjs → chunk-L3BLBPSR.mjs} +1 -1
- package/dist/{chunk-CLGBBNRB.mjs → chunk-LAQ3QAUW.mjs} +1 -1
- package/dist/{chunk-CBYI4FLL.mjs → chunk-LGBD6KGN.mjs} +1 -1
- package/dist/{chunk-X3I4Y44O.mjs → chunk-LITM3HU3.mjs} +1 -1
- package/dist/{chunk-AMVJPDM3.mjs → chunk-M527EJIX.mjs} +1 -1
- package/dist/{chunk-DMCFEJ2C.mjs → chunk-MAZGVZJN.mjs} +1 -1
- package/dist/{chunk-PK3OBSCB.mjs → chunk-MO4HRQEL.mjs} +1 -1
- package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
- package/dist/{chunk-I2GNNRFH.mjs → chunk-O24GFE6Q.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/{chunk-2RQDJ5XT.mjs → chunk-P6OSMPUQ.mjs} +1 -1
- package/dist/{chunk-IF3425JX.mjs → chunk-PNUBVBSR.mjs} +1 -1
- package/dist/{chunk-LJQPLE4S.mjs → chunk-PTZT4QJW.mjs} +1 -1
- package/dist/{chunk-62A35O55.mjs → chunk-QQFIVSBW.mjs} +1 -1
- package/dist/{chunk-5WVFEIMC.mjs → chunk-R6AYIVIR.mjs} +1 -1
- package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
- package/dist/{chunk-MLMDTZHL.mjs → chunk-RVGPGXLB.mjs} +1 -1
- package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
- package/dist/{chunk-HKGW6JI2.mjs → chunk-U3FYDDE2.mjs} +1 -1
- package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
- package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
- package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
- package/dist/{chunk-5NIEZE7A.mjs → chunk-XX4GSGRP.mjs} +1 -1
- package/dist/{chunk-UEBQJNVT.mjs → chunk-ZGQC6O62.mjs} +1 -1
- package/dist/{chunk-GTXTHH5Y.mjs → chunk-ZQG4SJ2M.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/CRM/CogeBoard.mjs +1 -1
- package/dist/components/CRM/KanbanBoard.mjs +1 -1
- package/dist/components/CRM/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DeliveryLead/DeliveryLeadSubmissionWithList.mjs +1 -1
- package/dist/components/DeliveryLead/index.mjs +1 -1
- package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.js +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.js +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.js +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/index.js +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.js +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/HeaderFooter/Header.mjs +1 -1
- package/dist/components/HeaderFooter/HeaderDesktop.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/PayloadCard/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/AddFileModal.css +1 -0
- package/dist/components/Projects/AddFileModal.d.ts +8 -0
- package/dist/components/Projects/AddFileModal.js +4 -0
- package/dist/components/Projects/AddFileModal.mjs +1 -0
- package/dist/components/Projects/FileView.d.ts +2 -2
- package/dist/components/Projects/FileView.js +1 -1
- package/dist/components/Projects/FileView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.js +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.d.ts +1 -1
- package/dist/components/Projects/ProjectView.js +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/file-list.d.ts +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.js +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/dc-temp/mock-data.d.ts +2 -1
- package/dist/components/dc-temp/mock-data.js +1 -1
- package/dist/components/dc-temp/mock-data.mjs +1 -1
- package/dist/components/index.js +11 -11
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/globals.css +1 -1
- package/dist/index.js +16 -16
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-ENRNRNPQ.mjs +0 -1
- package/dist/chunk-QBUU2AQL.mjs +0 -4
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
"use client"
|
|
4
4
|
|
|
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})},Oa=(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 ie=(e,t,a)=>(a=e!=null?fi(bi(e)):{},Oa(t||!e||!e.__esModule?$t(a,"default",{value:e,enumerable:!0}):a,e)),wi=e=>Oa($t({},"__esModule",{value:!0}),e);var br={};yi(br,{default:()=>ci});module.exports=wi(br);var Ka=require("react"),fa=require("motion/react"),di=require("lucide-react");var Ya=require("clsx");var ya="-",Ni=e=>{let t=Di(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let r=n.split(ya);return r[0]===""&&r.length!==1&&r.shift(),Wa(r,t)||Ci(n)},getConflictingClassGroupIds:(n,r)=>{let m=a[n]||[];return r&&o[n]?[...m,...o[n]]:m}}},Wa=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?Wa(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(ya);return t.validators.find(({validator:n})=>n(i))?.classGroupId},Va=/^\[(.+)\]$/,Ci=e=>{if(Va.test(e)){let t=Va.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])=>{xa(n,o,i,t)}),o},xa=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:$a(t,s);i.classGroupId=a;return}if(typeof s=="function"){if(ki(s)){xa(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([i,n])=>{xa(n,$a(t,i),a,o)})})},$a=(e,t)=>{let a=e;return t.split(ya).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)}}},Ga="!",Ri=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],i=t.length,n=r=>{let m=[],l=0,C=0,u;for(let c=0;c<r.length;c++){let b=r[c];if(l===0){if(b===s&&(o||r.slice(c,c+i)===t)){m.push(r.slice(C,c)),C=c+i;continue}if(b==="/"){u=c;continue}}b==="["?l++:b==="]"&&l--}let D=m.length===0?r:r.substring(C),v=D.startsWith(Ga),P=v?D.substring(1):D,d=u&&u>C?u-C:void 0;return{modifiers:m,hasImportantModifier:v,baseClassName:P,maybePostfixModifierPosition:d}};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 m=n.length-1;m>=0;m-=1){let l=n[m],{modifiers:C,hasImportantModifier:u,baseClassName:D,maybePostfixModifierPosition:v}=a(l),P=!!v,d=o(P?D.substring(0,v):D);if(!d){if(!P){r=l+(r.length>0?" "+r:r);continue}if(d=o(D),!d){r=l+(r.length>0?" "+r:r);continue}P=!1}let c=Ti(C).join(":"),b=u?c+Ga:c,B=b+d;if(i.includes(B))continue;i.push(B);let Q=s(d,P);for(let W=0;W<Q.length;++W){let J=Q[W];i.push(b+J)}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=_a(t))&&(o&&(o+=" "),o+=a);return o}var _a=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=_a(e[o]))&&(a&&(a+=" "),a+=t);return a};function Li(e,...t){let a,o,s,i=n;function n(m){let l=t.reduce((C,u)=>u(C),e());return a=Ai(l),o=a.cache.get,s=a.cache.set,i=r,r(m)}function r(m){let l=o(m);if(l)return l;let C=Ii(m,a);return s(m,C),C}return function(){return i(Bi.apply(null,arguments))}}var re=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},qa=/^\[(?:([a-Za-]+):)?(.+)\]$/i,ji=/^\d+\/\d+$/,zi=new Set(["px","full","screen"]),Ei=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(Za|Za|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ui=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ki=/^(inset_)?-?((\d+)?\.?(\d+)[a-Za]+|0)di-?((\d+)?\.?(\d+)[a-Za]+|0)/,Hi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$e=e=>bt(e)||zi.has(e)||ji.test(e),Ze=e=>xt(e,"length",Ji),bt=e=>!!e&&!Number.isNaN(Number(e)),ba=e=>xt(e,"number",bt),Rt=e=>!!e&&Number.isInteger(Number(e)),Oi=e=>e.endsWith("%")&&bt(e.slice(0,-1)),F=e=>qa.test(e),et=e=>Ei.test(e),Vi=new Set(["length","size","percentage"]),$i=e=>xt(e,Vi,Ja),Wi=e=>xt(e,"position",Ja),Gi=new Set(["image","url"]),_i=e=>xt(e,Gi,Yi),qi=e=>xt(e,"",Xi),Tt=()=>!0,xt=(e,t,a)=>{let o=qa.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),Ja=()=>!1,Xi=e=>Ki.test(e),Yi=e=>Hi.test(e);var Qi=()=>{let e=re("colors"),t=re("spacing"),a=re("blur"),o=re("brightness"),s=re("borderColor"),i=re("borderRadius"),n=re("borderSpacing"),r=re("borderWidth"),m=re("contrast"),l=re("grayscale"),C=re("hueRotate"),u=re("invert"),D=re("gap"),v=re("gradientColorStops"),P=re("gradientColorStopPositions"),d=re("inset"),c=re("margin"),b=re("opacity"),B=re("padding"),Q=re("saturate"),W=re("scale"),J=re("sepia"),ee=re("skew"),xe=re("space"),S=re("translate"),H=()=>["auto","contain","none"],M=()=>["auto","hidden","clip","visible","scroll"],ae=()=>["auto",F,t],x=()=>[F,t],Fe=()=>["",$e,Ze],f=()=>["auto",bt,F],Z=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],te=()=>["solid","dashed","dotted","double","none"],Ie=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],De=()=>["start","end","center","between","around","evenly","stretch"],lt=()=>["","0",F],St=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Be=()=>[bt,F];return{cacheSize:500,separator:":",theme:{colors:[Tt],spacing:[$e,Ze],blur:["none","",et,F],brightness:Be(),borderColor:[e],borderRadius:["none","","full",et,F],borderSpacing:x(),borderWidth:Fe(),contrast:Be(),grayscale:lt(),hueRotate:Be(),invert:lt(),gap:x(),gradientColorStops:[e],gradientColorStopPositions:[Oi,Ze],inset:ae(),margin:ae(),opacity:Be(),padding:x(),saturate:Be(),scale:Be(),sepia:lt(),skew:Be(),space:x(),translate:x()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[et]}],"break-after":[{"break-after":St()}],"break-before":[{"break-before":St()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...Z(),F]}],overflow:[{overflow:M()}],"overflow-x":[{"overflow-x":M()}],"overflow-y":[{"overflow-y":M()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[d]}],"inset-x":[{"inset-x":[d]}],"inset-y":[{"inset-y":[d]}],start:[{start:[d]}],end:[{end:[d]}],top:[{top:[d]}],right:[{right:[d]}],bottom:[{bottom:[d]}],left:[{left:[d]}],visibility:["visible","invisible","collapse"],Za:[{Za:["auto",Rt,F]}],basis:[{basis:ae()}],"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:lt()}],shrink:[{shrink:lt()}],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":f()}],"col-end":[{"col-end":f()}],"grid-rows":[{"grid-rows":[Tt]}],"row-start-end":[{row:["auto",{span:[Rt,F]},F]}],"row-start":[{"row-start":f()}],"row-end":[{"row-end":f()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[D]}],"gap-x":[{"gap-x":[D]}],"gap-y":[{"gap-y":[D]}],"justify-content":[{justify:["normal",...De()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...De(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...De(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],Za:[{Za:[B]}],pt:[{pt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[c]}],mx:[{mx:[c]}],my:[{my:[c]}],ms:[{ms:[c]}],me:[{me:[c]}],mt:[{mt:[c]}],mr:[{mr:[c]}],mb:[{mb:[c]}],ml:[{ml:[c]}],"space-x":[{"space-x":[xe]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[xe]}],"space-y-reverse":["space-y-reverse"],Za:[{Za:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-Za":[{"min-Za":[F,t,"min","max","fit"]}],"max-Za":[{"max-Za":[F,t,"none","full","min","max","fit","prose",{screen:[et]},et]}],Za:[{Za:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-Za":[{"min-Za":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-Za":[{"max-Za":[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",ba]}],"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,ba]}],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":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","di-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:x()}],"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":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Z(),Wi]}],"bg-repeat":[{bg:["di-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$i]}],"bg-image":[{bg:["none",{"gradient-Qa":["t","tr","r","br","b","bl","l","tl"]},_i]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[P]}],"gradient-via-pos":[{via:[P]}],"gradient-Qa-pos":[{Qa:[P]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-Qa":[{Qa:[v]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-Za":[{"rounded-Za":[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-Za":[{border:[r]}],"border-Za-x":[{"border-x":[r]}],"border-Za-y":[{"border-y":[r]}],"border-Za-s":[{"border-s":[r]}],"border-Za-e":[{"border-e":[r]}],"border-Za-t":[{"border-t":[r]}],"border-Za-r":[{"border-r":[r]}],"border-Za-b":[{"border-b":[r]}],"border-Za-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[b]}],"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":[b]}],"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-Za":[{outline:[$e,Ze]}],"outline-color":[{outline:[e]}],"ring-Za":[{ring:Fe()}],"ring-Za-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-Za":[{"ring-offset":[$e,Ze]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",et,qi]}],"shadow-color":[{shadow:[Tt]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...Ie(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Ie()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",et,F]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[u]}],saturate:[{saturate:[Q]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[Q]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",F]}],duration:[{duration:Be()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:Be()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[W]}],"scale-x":[{"scale-x":[W]}],"scale-y":[{"scale-y":[W]}],rotate:[{rotate:[Rt,F]}],"translate-x":[{"translate-x":[S]}],"translate-y":[{"translate-y":[S]}],"skew-x":[{"skew-x":[ee]}],"skew-y":[{"skew-y":[ee]}],"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","di-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","Za-resize","ne-resize","nw-resize","Za-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":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-Za":[{"scroll-Za":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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-Za":[{stroke:[$e,Ze,ba]}],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","Za","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["Za","Za"],"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-Za","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Za","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-Za":["border-Za-s","border-Za-e","border-Za-t","border-Za-r","border-Za-b","border-Za-l"],"border-Za-x":["border-Za-r","border-Za-l"],"border-Za-y":["border-Za-t","border-Za-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-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Za","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Xa=Li(Qi);function g(...e){return Xa((0,Ya.clsx)(e))}var Zt=ie(require("react")),Sa=ie(require("next/link"));var Qa=require("class-variance-authority");var Za=require("react/jsx-runtime"),Zi=(0,Qa.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 G({className:e,variant:t,...a}){return(0,Za.jsx)("div",{className:g(Zi({variant:t}),e),...a})}var eo=require("@radix-ui/react-slot"),ao=ie(require("react")),er=(0,Qa.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:"Za-10 px-4 py-2",icon:"Za-10 Za-10",lg:"Za-11 rounded px-8",sm:"Za-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=ao.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},i)=>(0,Za.jsx)(e?eo.Slot:"button",{className:g(er({className:t,size:a,variant:o})),ref:i,...s}));y.displayName="Button";var io=ie(require("react"));var me=io.forwardRef(({className:e,type:t,...a},o)=>(0,Za.jsx)("input",{type:t,className:g("flex Za-9 Za-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}));me.displayName="Input";var wa=ie(require("react")),Re=ie(require("@radix-ui/react-scroll-area"));var Ue=wa.forwardRef(({className:e,children:t,...a},o)=>(0,Za.jsxs)(Re.Root,{ref:o,className:g("relative overflow-hidden",e),...a,children:[(0,Za.jsx)(Re.Viewport,{className:"Za-full Za-full rounded-[inherit]",children:t}),(0,Za.jsx)(so,{}),(0,Za.jsx)(Re.Corner,{})]}));Ue.displayName=Re.Root.displayName;var so=wa.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Za.jsx)(Re.ScrollAreaScrollbar,{ref:o,orientation:t,className:g("flex touch-none select-none transition-colors",t==="vertical"&&"Za-full Za-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"Za-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,Za.jsx)(Re.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));so.displayName=Re.ScrollAreaScrollbar.displayName;var At=ie(require("react")),ge=ie(require("@radix-ui/react-dialog"));var lo=ge.Root;var tr=ge.Portal;var co=At.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(ge.Overlay,{ref:a,className:g("fixed inset-0 Za-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}));co.displayName=ge.Overlay.displayName;var Na=At.forwardRef(({className:e,children:t,...a},o)=>(0,Za.jsxs)(tr,{children:[(0,Za.jsx)(co,{}),(0,Za.jsxs)(ge.Content,{ref:o,className:g("fixed left-[50%] top-[50%] Za-50 grid Za-full max-Za-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-Qa-left-1/2 data-[state=closed]:slide-out-Qa-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,Za.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,Za.jsx)(di.X,{className:"Za-4 Za-4"}),(0,Za.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Na.displayName=ge.Content.displayName;var Ca=({className:e,...t})=>(0,Za.jsx)("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ca.displayName="DialogHeader";var ar=({className:e,...t})=>(0,Za.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ar.displayName="DialogFooter";var Da=At.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(ge.Title,{ref:a,className:g("text-lg font-semibold leading-none tracking-tight",e),...t}));Da.displayName=ge.Title.displayName;var or=At.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(ge.Description,{ref:a,className:g("text-sm text-muted-foreground",e),...t}));or.displayName=ge.Description.displayName;var Mt=ie(require("@radix-ui/react-checkbox")),po=ie(require("react")),ka=po.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(Mt.Root,{className:g("peer Za-4 Za-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,Za.jsx)(Mt.Indicator,{className:g("flex items-center justify-center text-current"),children:(0,Za.jsx)(di.Check,{className:"Za-4 Za-4"})})}));ka.displayName=Mt.Root.displayName;var Ke=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),go=[{id:"home",title:"Home",icon:(0,Za.jsx)(di.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Za.jsx)(di.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,Za.jsx)(di.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 di",url:"#",badge:"2"}]},{id:"copilot",title:"Copilot",icon:(0,Za.jsx)(di.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Za.jsx)(di.FileText,{}),url:"/knowledge"}],fo=[{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 Qa 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'Za 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:"Za 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")}],vo=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Za.jsx)(di.Palette,{className:"Za-4 Za-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Za.jsx)(di.Code,{className:"Za-4 Za-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Za.jsx)(di.TrendingUp,{className:"Za-4 Za-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Za.jsx)(di.DollarSign,{className:"Za-4 Za-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,Za.jsx)(di.Users,{className:"Za-4 Za-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Za.jsx)(di.Wrench,{className:"Za-4 Za-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Za.jsx)(di.Scale,{className:"Za-4 Za-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Za.jsx)(di.Package,{className:"Za-4 Za-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"di",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Za.jsx)(di.Zap,{className:"Za-4 Za-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Za.jsx)(di.Building2,{className:"Za-4 Za-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],qt=[{id:"1",name:"Za-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var Pa=[{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 Qa 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",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],ir=[...Xt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],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:"Za project with di 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:[]},uo={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 Kr={empty:{initialProjects:_t.projects,initialEpics:_t.epics,initialSprints:_t.sprints,initialTasks:_t.tasks},default:{initialProjects:qt,initialEpics:Pa,initialSprints:Gt,initialTasks:Xt},highDensity:{initialProjects:qt,initialEpics:Pa,initialSprints:Gt,initialTasks:ir},singleEpic:{initialProjects:qt,initialEpics:uo.epics,initialSprints:Gt,initialTasks:uo.tasks},multipleProjects:{initialProjects:rr,initialEpics:Pa,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(Ke),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Ke),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(Ke),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Ke),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 Qa 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","Za","Statistics"].map(Ke),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Ke),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(Ke),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Ke),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 Qa customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases Qa human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Ke),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Ke),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Hr=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague: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 Qa production",description:"Deploy the latest version Qa 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 Or=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 Ra({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=vo[0],onBusinessUnitChange:i,onSearch:n,className:r,logo:m="/headerlogo.png",appName:l="Nuvia",tagline:C="Collaboration Platform"}){let[u,D]=Zt.useState({}),[v,P]=Qt("sidebar-favorites",{}),[d,c]=Zt.useState(null),[b,B]=Zt.useState(""),Q=f=>{D(Z=>({...Z,[f]:!Z[f]}))},W=f=>{i?.(f)},J=()=>{b.trim()&&n?.(b.trim())},ee=f=>{f.key==="Enter"&&(f.preventDefault(),J())},xe=(f,Z)=>{let te=v[f]||[],Ie=te.includes(Z)?te.filter(De=>De!==Z):te.concat(Z);P({...v,[f]:Ie})},S=f=>{if(!f.items||!f.maxItems||f.items.length<=f.maxItems)return f.items||[];let Z=v[f.id]||[],te=f.items.filter(De=>Z.includes(De.id)),Ie=f.items.filter(De=>!Z.includes(De.id));return[...te,...Ie].slice(0,f.maxItems)},H=f=>f.maxItems&&f.items&&f.items.length>f.maxItems,M=e,ae=f=>{let Z=H(f),te=S(f),Ie=(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[f.icon,(0,Za.jsx)("span",{children:f.title})]}),f.badge&&(0,Za.jsx)(G,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:f.badge}),f.items&&(0,Za.jsx)(di.ChevronDown,{className:g("ml-2 Za-4 Za-4 transition-transform",u[f.title]?"rotate-180":"")})]}),De=g("flex Za-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",f.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return f.url?(0,Za.jsx)(Sa.default,{href:f.url,className:De,onClick:a?o:void 0,children:Ie}):(0,Za.jsx)("button",{className:De,onClick:()=>f.items&&Q(f.title),children:Ie})},x=()=>{let f=e.find(te=>te.id===d);if(!f||!f.items||!f.maxItems)return null;let Z=v[f.id]||[];return(0,Za.jsx)(lo,{open:!!d,onOpenChange:te=>!te&&c(null),children:(0,Za.jsxs)(Na,{className:"sm:max-Za-md",children:[(0,Za.jsxs)(Ca,{children:[(0,Za.jsxs)(Da,{children:["Manage ",f.title," Favorites"]}),(0,Za.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up Qa ",f.maxItems," items Qa show in ",f.title.toLowerCase(),"."]})]}),(0,Za.jsx)(Ue,{className:"max-Za-96 pr-4",children:(0,Za.jsx)("div",{className:"space-y-4",children:f.items.map(te=>(0,Za.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Za.jsx)(ka,{id:te.id,checked:Z.includes(te.id),onCheckedChange:()=>xe(f.id,te.id),disabled:!Z.includes(te.id)&&Z.length>=(f.maxItems||0)}),(0,Za.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,Za.jsx)(G,{variant:"outline",className:"text-xs",children:te.badge})]})]},te.id))})})]})})},Fe=(0,Za.jsxs)("div",{className:"flex Za-full flex-col bg-background",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsx)("div",{className:"flex Za-14 Za-14 items-center justify-center",children:(0,Za.jsx)("img",{src:m,alt:"Header Logo",className:"Za-14 Za-14 object-contain"})}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h2",{className:"font-semibold",children:l}),(0,Za.jsx)("p",{className:"text-xs text-muted-foreground",children:C})]})]}),a&&(0,Za.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,Za.jsx)(di.X,{className:"Za-5 Za-5"})})]}),(0,Za.jsx)("div",{className:"px-3 py-2",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{type:"search",placeholder:"Search...",className:"Za-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:b,onChange:f=>B(f.target.value),onKeyPress:ee})]})}),(0,Za.jsx)(Ue,{className:"flex-1 px-3 py-2",children:(0,Za.jsx)("div",{className:"space-y-1",children:M.map(f=>(0,Za.jsxs)("div",{className:"mb-1",children:[ae(f),f.items&&u[f.title]&&(0,Za.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[S(f).map(Z=>(0,Za.jsxs)(Sa.default,{href:Z.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[Z.title,Z.badge&&(0,Za.jsx)(G,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:Z.badge})]},Z.id)),H(f)&&f.items&&f.items.length>S(f).length&&(0,Za.jsxs)("button",{onClick:()=>c(f.id),className:"Za-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",f.items.length-S(f).length," more available"]})]})]},f.id))})}),(0,Za.jsx)("div",{className:"p-3",children:(0,Za.jsx)("div",{className:"space-y-1",children:(0,Za.jsxs)("button",{className:"flex Za-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Za.jsx)(di.Settings,{className:"Za-5 Za-5"}),(0,Za.jsx)("span",{children:"Settings"})]})})}),(0,Za.jsx)(x,{})]});return a?(0,Za.jsx)("div",{className:g("fixed inset-y-0 left-0 Za-50 Za-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Fe}):(0,Za.jsx)("div",{className:g("fixed inset-y-0 left-0 Za-30 Za-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Fe})}var ea=ie(require("react")),We=ie(require("@radix-ui/react-avatar"));var Ge=ea.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(We.Root,{ref:a,className:g("relative flex Za-10 Za-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ge.displayName=We.Root.displayName;var dt=ea.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(We.Image,{ref:a,className:g("aspect-square Za-full Za-full",e),...t}));dt.displayName=We.Image.displayName;var _e=ea.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(We.Fallback,{ref:a,className:g("flex Za-full Za-full items-center justify-center rounded-full bg-muted",e),...t}));_e.displayName=We.Fallback.displayName;var ho=ie(require("react")),Le=ie(require("@radix-ui/react-tooltip"));var aa=Le.Provider,oa=Le.Root,ia=Le.Trigger,It=ho.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Za.jsx)(Le.Portal,{children:(0,Za.jsx)(Le.Content,{ref:o,sideOffset:t,className:g("Za-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=Le.Content.displayName;var bo=require("next-themes");function xo(){let{setTheme:e,theme:t}=(0,bo.useTheme)();return(0,Za.jsx)(aa,{children:(0,Za.jsxs)(oa,{children:[(0,Za.jsx)(ia,{asChild:!0,children:(0,Za.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Za.jsx)(di.Sun,{className:"Za-5 Za-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Za.jsx)(di.Moon,{className:"absolute Za-5 Za-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Za.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Za.jsx)(It,{children:"Toggle theme"})]})})}function yo({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:i}){let n=e.filter(l=>!l.read),r=n.length,m=l=>{switch(l){case"info":return(0,Za.jsx)(di.Info,{className:"Za-5 Za-5 text-blue-500"});case"success":return(0,Za.jsx)(di.Check,{className:"Za-5 Za-5 text-green-500"});case"warning":return(0,Za.jsx)(di.AlertTriangle,{className:"Za-5 Za-5 text-amber-500"});case"error":return(0,Za.jsx)(di.AlertTriangle,{className:"Za-5 Za-5 text-red-500"})}};return(0,Za.jsx)(fa.AnimatePresence,{children:t&&(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsx)(fa.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 Za-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,Za.jsx)(fa.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:g("fixed inset-y-0 right-0 Za-50 Za-full max-Za-sm border-l bg-background shadow-lg md:Za-96",i),children:(0,Za.jsxs)("div",{className:"flex Za-full flex-col",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Za.jsx)(di.Bell,{className:"Za-5 Za-5"}),(0,Za.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,Za.jsxs)(G,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,Za.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Za.jsx)(di.X,{className:"Za-5 Za-5"}),(0,Za.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,Za.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,Za.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,Za.jsx)(y,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,Za.jsx)(Ue,{className:"flex-1",children:(0,Za.jsx)("div",{className:"divide-y",children:n.map(l=>(0,Za.jsxs)("div",{className:g("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Za.jsx)("div",{className:"flex Za-10 Za-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:m(l.type)}),(0,Za.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Za.jsx)("p",{className:"font-medium",children:l.title}),(0,Za.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Za.jsx)("p",{className:"text-xs text-muted-foreground",children:l.time}),(0,Za.jsx)(y,{variant:"ghost",size:"sm",className:"Za-6 Za-6 p-0",onClick:()=>o?.(l.id),title:"Dismiss",children:(0,Za.jsx)(di.Check,{className:"Za-3 Za-3"})})]})]}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:l.description}),l.actionLabel&&(0,Za.jsxs)(y,{variant:"link",size:"sm",className:"Za-auto p-0 text-sm",onClick:l.onAction,children:[l.actionLabel,(0,Za.jsx)(di.ChevronRight,{className:"ml-1 Za-3 Za-3"})]})]})]},l.id))})}):(0,Za.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Za.jsx)("div",{className:"flex Za-16 Za-16 items-center justify-center rounded-full bg-muted",children:(0,Za.jsx)(di.Bell,{className:"Za-8 Za-8 text-muted-foreground"})}),(0,Za.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,Za.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var ct=ie(require("@radix-ui/react-tabs"));function wo({className:e,...t}){return(0,Za.jsx)(ct.Root,{"data-slot":"tabs",className:g("flex flex-col gap-2",e),...t})}function No({className:e,...t}){return(0,Za.jsx)(ct.List,{"data-slot":"tabs-list",className:g("bg-muted text-muted-foreground inline-flex Za-9 Za-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Co({className:e,...t}){return(0,Za.jsx)(ct.Trigger,{"data-slot":"tabs-trigger",className:g("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex Za-[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=ie(require("react")),V=ie(require("@radix-ui/react-dropdown-menu")),yt=require("@radix-ui/react-icons");var na=V.Root,la=V.Trigger;var sr=qe.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,Za.jsxs)(V.SubTrigger,{ref:s,className:g("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,Za.jsx)(yt.ChevronRightIcon,{className:"ml-auto"})]}));sr.displayName=V.SubTrigger.displayName;var nr=qe.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(V.SubContent,{ref:a,className:g("Za-50 min-Za-[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=V.SubContent.displayName;var Lt=qe.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Za.jsx)(V.Portal,{children:(0,Za.jsx)(V.Content,{ref:o,sideOffset:t,className:g("Za-50 min-Za-[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=V.Content.displayName;var mt=qe.forwardRef(({className:e,inset:t,...a},o)=>(0,Za.jsx)(V.Item,{ref:o,className:g("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));mt.displayName=V.Item.displayName;var lr=qe.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,Za.jsxs)(V.CheckboxItem,{ref:s,className:g("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,Za.jsx)("span",{className:"absolute left-2 flex Za-3.5 Za-3.5 items-center justify-center",children:(0,Za.jsx)(V.ItemIndicator,{children:(0,Za.jsx)(yt.CheckIcon,{className:"Za-4 Za-4"})})}),t]}));lr.displayName=V.CheckboxItem.displayName;var dr=qe.forwardRef(({className:e,children:t,...a},o)=>(0,Za.jsxs)(V.RadioItem,{ref:o,className:g("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,Za.jsx)("span",{className:"absolute left-2 flex Za-3.5 Za-3.5 items-center justify-center",children:(0,Za.jsx)(V.ItemIndicator,{children:(0,Za.jsx)(yt.DotFilledIcon,{className:"Za-4 Za-4 fill-current"})})}),t]}));dr.displayName=V.RadioItem.displayName;var cr=qe.forwardRef(({className:e,inset:t,...a},o)=>(0,Za.jsx)(V.Label,{ref:o,className:g("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));cr.displayName=V.Label.displayName;var mr=qe.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(V.Separator,{ref:a,className:g("-mx-1 my-1 Za-px bg-muted",e),...t}));mr.displayName=V.Separator.displayName;var pr=({className:e,...t})=>(0,Za.jsx)("span",{className:g("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,Za.jsxs)(fa.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,Za.jsx)("div",{className:"hidden lg:block",children:(0,Za.jsx)(wo,{value:e,onValueChange:t,children:(0,Za.jsx)(No,{className:"grid Za-full rounded-2xl p-0 Za-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Za.jsx)(Co,{value:r.value,className:"Za-full Za-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,Za.jsx)("div",{className:"lg:hidden",children:(0,Za.jsxs)(na,{children:[(0,Za.jsx)(la,{asChild:!0,children:(0,Za.jsxs)(y,{variant:"outline",className:"rounded-2xl min-Za-[140px] justify-between",children:[n?.label||"Select",(0,Za.jsx)(di.ChevronDown,{className:"Za-4 Za-4 ml-2"})]})}),(0,Za.jsx)(Lt,{align:"center",className:"Za-[180px]",children:a.map(r=>(0,Za.jsx)(mt,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function ko({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:i,activeTab:n="assistant",onTabChange:r,showTabs:m=!0,tabOptions:l=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:C,actionIcon:u=(0,Za.jsx)(di.Bot,{className:"mr-2 Za-4 Za-4"}),actionText:D="Action",onNotificationRemove:v,onRemoveAll:P,logo:d="/headerlogo.png",appName:c="Nuvia",tagline:b="Collaboration Platform"}){let[B,Q]=(0,Ka.useState)(!1),[W,J]=(0,Ka.useState)(t),ee=W.filter(H=>!H.read).length,xe=H=>{J(M=>M.filter(ae=>ae.id!==H)),v?.(H)},S=()=>{J(H=>H.filter(M=>M.read)),P?.()};return(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsxs)("header",{className:`sticky top-0 Za-10 flex Za-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Za.jsx)(di.Menu,{className:"Za-5 Za-5"})}),(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Za.jsx)(di.PanelLeft,{className:"Za-5 Za-5"})}),!s&&(0,Za.jsxs)(fa.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Za.jsx)("div",{className:"flex Za-10 Za-10 items-center justify-center",children:(0,Za.jsx)("img",{src:d,alt:"Logo",className:"Za-10 Za-10 object-contain"})}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h2",{className:"font-semibold text-sm",children:c}),(0,Za.jsx)("p",{className:"text-xs text-muted-foreground",children:b})]})]}),(0,Za.jsxs)("div",{className:"flex flex-1 items-center",children:[m&&(0,Za.jsx)(da,{activeTab:n,onTabChange:r,tabOptions:l}),(0,Za.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Za.jsx)(fa.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,Za.jsx)(fa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Za.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:C,children:[u,D]})})}),(0,Za.jsx)(xo,{}),(0,Za.jsx)(aa,{children:(0,Za.jsxs)(oa,{children:[(0,Za.jsx)(ia,{asChild:!0,children:(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Za.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>Q(!0),children:[(0,Za.jsx)(fa.motion.div,{animate:ee>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:ee>0?1/0:0,repeatDelay:3},children:(0,Za.jsx)(di.Bell,{className:"Za-5 Za-5"})}),ee>0&&(0,Za.jsx)(fa.motion.span,{className:"absolute -right-1 -top-1 flex Za-5 Za-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:ee})]})})}),(0,Za.jsx)(It,{children:"Notifications"})]})}),(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Za.jsxs)(Ge,{className:"Za-9 Za-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Za.jsx)(dt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Za.jsx)(_e,{})]})})]})]})]}),(0,Za.jsx)(yo,{notifications:W,open:B,onClose:()=>Q(!1),onNotificationRemove:xe,onRemoveAll:S})]})}var Po=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Za.jsx)(di.User,{className:"Za-4 Za-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ro({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=Po[0],onBusinessUnitChange:i,onSearch:n,businessUnits:r=Po,activeTab:m,onTabChange:l,showTabs:C=!1,onActionClick:u,actionIcon:D,actionText:v="Action",onNotificationRemove:P,onRemoveAll:d,logo:c="/headerlogo.png",appName:b="Nuvia",tagline:B="Collaboration Platform",sidebarInitiallyClosed:Q=!1}){let[W,J]=(0,Ka.useState)(!Q),[ee,xe]=(0,Ka.useState)(!1),[S,H]=(0,Ka.useState)(s),M=ae=>{H(ae),i?.(ae)};return(0,Za.jsxs)("div",{className:"flex Za-full flex-col overflow-hidden rounded-xl bg-background Za-[]",children:[ee&&(0,Za.jsx)("div",{className:"fixed inset-0 Za-40 bg-black/50 md:hidden",onClick:()=>xe(!1)}),(0,Za.jsx)("div",{className:"md:hidden",children:(0,Za.jsx)(Ra,{items:e,isOpen:ee,isMobile:!0,onClose:()=>xe(!1),currentBusinessUnit:S,onBusinessUnitChange:M,onSearch:n,logo:c,appName:b,tagline:B})}),(0,Za.jsx)("div",{className:"hidden md:block",children:(0,Za.jsx)(Ra,{items:e,isOpen:W,isMobile:!1,currentBusinessUnit:S,onBusinessUnitChange:M,onSearch:n,logo:c,appName:b,tagline:B})}),(0,Za.jsxs)("div",{className:g("min-Za-screen fixed Za-full transition-all duration-300 ease-in-out",W?"md:pl-64":"md:pl-0"),children:[(0,Za.jsx)(ko,{title:a,notifications:o,onToggleSidebar:()=>J(!W),onToggleMobileMenu:()=>xe(!0),sidebarOpen:W,activeTab:m,onTabChange:l,showTabs:C,onActionClick:u,actionIcon:D,actionText:v,onNotificationRemove:P,onRemoveAll:d,logo:c,appName:b,tagline:B}),(0,Za.jsx)("main",{className:"flex-1 p-0 flex flex-col Za-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var ma=require("react-icons/fa");function Ae({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:i,children:n,className:r}){let[m,l]=Qt(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),C=!s&&!t||m;return(0,Za.jsxs)(fa.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,Za.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Za.jsx)(G,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Za.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[C&&o&&(0,Za.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,Za.jsx)("button",{"aria-label":m?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>l(!m),style:{lineHeight:0},children:m?(0,Za.jsx)(ma.FaChevronDown,{size:22}):(0,Za.jsx)(ma.FaChevronUp,{size:22})})]})]}),!C&&(0,Za.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsx)("p",{className:"max-Za-[600px] text-white/80",children:t}),(0,Za.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Za.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,Za.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,Za.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var pt=ie(require("react"));var q=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("rounded-xl border bg-card text-card-foreground shadow",e),...t}));q.displayName="Card";var ne=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("flex flex-col space-y-1.5 p-6",e),...t}));ne.displayName="CardHeader";var le=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("font-semibold leading-none tracking-tight",e),...t}));le.displayName="CardTitle";var jt=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("text-sm text-muted-foreground",e),...t}));jt.displayName="CardDescription";var X=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("p-6 pt-0",e),...t}));X.displayName="CardContent";var zt=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("flex items-center p-6 pt-0",e),...t}));zt.displayName="CardFooter";var Ao=ie(require("react")),Et=ie(require("@radix-ui/react-progress"));var Ft=Ao.forwardRef(({className:e,value:t,...a},o)=>(0,Za.jsx)(Et.Root,{ref:o,className:g("relative Za-4 Za-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Za.jsx)(Et.Indicator,{className:"Za-full Za-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ft.displayName=Et.Root.displayName;function Ba({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:s}){return(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:s,children:(0,Za.jsxs)(q,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Za.jsx)(ne,{className:"pb-2",children:(0,Za.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Za.jsx)("div",{className:"flex Za-12 Za-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Za.jsx)(G,{className:"rounded-xl bg-amber-500",children:"New"}):(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:"Za-8 Za-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Za.jsx)(di.Star,{className:"Za-4 Za-4"})})]})}),(0,Za.jsxs)(X,{className:"pb-2",children:[(0,Za.jsx)(le,{className:"text-lg",children:e.name}),(0,Za.jsx)(jt,{children:e.description}),o&&e.progress<100&&(0,Za.jsxs)("div",{className:"mt-2",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Za.jsx)("span",{children:"Installation"}),(0,Za.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Za.jsx)(Ft,{value:e.progress,className:"Za-2 mt-1 rounded-xl"})]})]}),(0,Za.jsx)(zt,{children:(0,Za.jsx)(y,{variant:"secondary",className:"Za-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function jo({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:i}){return(0,Za.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[s&&(0,Za.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Za.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Za.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Za.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Za.jsx)("div",{className:"divide-y",children:e.map(n=>(0,Za.jsxs)(fa.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,Za.jsxs)("div",{className:"col-span-6 flex items-center gap-3 Za-full md:Za-auto",children:[(0,Za.jsx)("div",{className:"flex Za-10 Za-10 items-center justify-center rounded-2xl bg-muted"}),(0,Za.jsx)("div",{children:(0,Za.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,Za.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:n.filesize}),(0,Za.jsxs)("div",{className:"col-span-2 flex items-center justify-between Za-full md:Za-auto",children:[(0,Za.jsx)("span",{className:"text-sm md:text-base",children:typeof n.createdAt=="string"?n.createdAt:new Date(n.createdAt).toLocaleDateString()}),(0,Za.jsx)("div",{className:"flex gap-1",children:(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:"Za-8 Za-8 rounded-xl text-red-500 hover:text-red-600",onClick:r=>{r.stopPropagation(),o?.(n)},children:(0,Za.jsx)(di.Trash2,{className:"Za-4 Za-4"})})})]})]},n.name))})]})}function Eo({project:e,onOpen:t,onShare:a,className:o}){return(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Za.jsxs)(q,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Za.jsxs)(ne,{children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Za.jsx)(le,{children:e.name}),(0,Za.jsxs)(G,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Za.jsx)(jt,{children:e.description})]}),(0,Za.jsxs)(X,{className:"space-y-4",children:[(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Za.jsx)("span",{children:"Progress"}),(0,Za.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Za.jsx)(Ft,{value:e.progress,className:"Za-2 rounded-xl"})]}),(0,Za.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Za.jsxs)("div",{className:"flex items-center",children:[(0,Za.jsx)(di.Users,{className:"mr-1 Za-4 Za-4"}),e.members," members"]}),(0,Za.jsxs)("div",{className:"flex items-center",children:[(0,Za.jsx)(di.FileText,{className:"mr-1 Za-4 Za-4"}),e.files," files"]})]})]}),(0,Za.jsxs)(zt,{className:"flex gap-2",children:[(0,Za.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Za.jsx)(y,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Za.jsx)(di.Share2,{className:"Za-4 Za-4"})})]})]})})}var La=[{name:"PixelMaster",icon:(0,Za.jsx)(di.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Za.jsx)(di.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Za.jsx)(di.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Za.jsx)(di.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Za.jsx)(di.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Za.jsx)(di.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Za.jsx)(di.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Za.jsx)(di.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Za.jsx)(di.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Za.jsx)(di.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Za.jsx)(di.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Za.jsx)(di.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],Fo=[{id:"1",filename:"Brand Redesign.pxm",filesize:24.5,createdAt:new Date,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",app:"PixelMaster",modified:"2 hours ago",icon:(0,Za.jsx)(di.ImageIcon,{className:"text-violet-500"}),shared:!0,size:"24.5 MB",collaborators:3},{id:"2",filename:"Company Logo.vec",filesize:8.2,createdAt:new Date,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",app:"VectorPro",modified:"Yesterday",icon:(0,Za.jsx)(di.Brush,{className:"text-orange-500"}),shared:!0,size:"8.2 MB",collaborators:2},{id:"3",filename:"Product Launch Video.vid",filesize:1.2,createdAt:new Date,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",app:"VideoStudio",modified:"3 days ago",icon:(0,Za.jsx)(di.Video,{className:"text-pink-500"}),shared:!1,size:"1.2 GB",collaborators:0},{id:"4",filename:"UI Animation.mfx",filesize:345,createdAt:new Date,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",app:"MotionFX",modified:"Last week",icon:(0,Za.jsx)(di.Sparkles,{className:"text-blue-500"}),shared:!0,size:"345 MB",collaborators:4},{id:"5",filename:"Magazine Layout.pgc",filesize:42.8,createdAt:new Date,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",app:"PageCraft",modified:"2 weeks ago",icon:(0,Za.jsx)(di.Layers,{className:"text-red-500"}),shared:!1,size:"42.8 MB",collaborators:0},{id:"6",filename:"Mobile App Design.uxf",filesize:18.3,createdAt:new Date,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",app:"UXFlow",modified:"3 weeks ago",icon:(0,Za.jsx)(di.LayoutGrid,{className:"text-fuchsia-500"}),shared:!0,size:"18.3 MB",collaborators:5},{id:"7",filename:"Product Photography.phl",filesize:156,createdAt:new Date,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",app:"PhotoLab",modified:"Last month",icon:(0,Za.jsx)(di.Camera,{className:"text-teal-500"}),shared:!1,size:"156 MB",collaborators:0}];var Uo=[{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 $=ie(require("@radix-ui/react-select")),rt=ie(require("react")),Ut=$.Root;var Kt=$.Value,Nt=rt.forwardRef(({children:e,className:t,...a},o)=>(0,Za.jsxs)($.Trigger,{className:g("flex Za-10 Za-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,Za.jsx)($.Icon,{asChild:!0,children:(0,Za.jsx)(di.ChevronDown,{className:"Za-4 Za-4 opacity-50"})})]}));Nt.displayName=$.Trigger.displayName;var Ko=rt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)($.ScrollUpButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Za.jsx)(di.ChevronUp,{className:"Za-4 Za-4"})}));Ko.displayName=$.ScrollUpButton.displayName;var Ho=rt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)($.ScrollDownButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Za.jsx)(di.ChevronDown,{className:"Za-4 Za-4"})}));Ho.displayName=$.ScrollDownButton.displayName;var Ct=rt.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,Za.jsx)($.Portal,{children:(0,Za.jsxs)($.Content,{className:g("relative Za-50 max-Za-96 min-Za-[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,Za.jsx)(Ko,{}),(0,Za.jsx)($.Viewport,{className:g("p-1",a==="popper"&&"Za-[var(--radix-select-trigger-height)] Za-full min-Za-[var(--radix-select-trigger-width)]"),children:e}),(0,Za.jsx)(Ho,{})]})}));Ct.displayName=$.Content.displayName;var ur=rt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)($.Label,{className:g("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));ur.displayName=$.Label.displayName;var Oe=rt.forwardRef(({children:e,className:t,...a},o)=>(0,Za.jsxs)($.Item,{className:g("relative flex Za-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,Za.jsx)("span",{className:"absolute left-2 flex Za-3.5 Za-3.5 items-center justify-center",children:(0,Za.jsx)($.ItemIndicator,{children:(0,Za.jsx)(di.Check,{className:"Za-4 Za-4"})})}),(0,Za.jsx)($.ItemText,{children:e})]}));Oe.displayName=$.Item.displayName;var gr=rt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)($.Separator,{className:g("-mx-1 my-1 Za-px bg-muted",e),ref:a,...t}));gr.displayName=$.Separator.displayName;function pa({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:s=!0,compact:i=!1,className:n}){let[r,m]=(0,Ka.useState)(!1),l=D=>{switch(D){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},C=D=>{switch(D){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},u=D=>{if(!D)return"Never";let P=Math.floor((new Date().getTime()-D.getTime())/(1e3*60));return P<1?"Just now":P<60?`${P}m ago`:P<1440?`${Math.floor(P/60)}Za ago`:`${Math.floor(P/1440)}d ago`};return(0,Za.jsxs)(q,{className:g("hover:shadow-md transition-shadow",i&&"p-2",n),children:[(0,Za.jsx)(ne,{className:g("pb-3",i&&"pb-2"),children:(0,Za.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsx)("div",{className:"relative",children:(0,Za.jsxs)(Ge,{className:g("Za-12 Za-12",i&&"Za-8 Za-8"),children:[(0,Za.jsx)(dt,{src:"/placeholder.svg",alt:e.name}),(0,Za.jsx)(_e,{children:e.name.split(" ").map(D=>D[0]).join("")})]})}),(0,Za.jsxs)("div",{className:"flex-1 min-Za-0",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Za.jsx)("h3",{className:g("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,Za.jsx)(di.Bot,{className:g("Za-4 Za-4 text-blue-500",i&&"Za-3 Za-3")}):(0,Za.jsx)(di.User,{className:g("Za-4 Za-4 text-green-500",i&&"Za-3 Za-3")})]}),(0,Za.jsx)("p",{className:g("text-sm text-muted-foreground truncate",i&&"text-xs"),children:e.type==="human"?e.role:e.description}),!i&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[e.type==="human"&&(0,Za.jsx)(G,{variant:"secondary",className:"text-xs",children:e.department}),e.type==="digital"&&(0,Za.jsxs)(G,{variant:"secondary",className:"text-xs",children:["v",e.version]}),(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:C(e.status)})]})]})]}),s&&(0,Za.jsxs)(na,{children:[(0,Za.jsx)(la,{asChild:!0,children:(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:g("Za-8 Za-8",i&&"Za-6 Za-6"),children:(0,Za.jsx)(di.MoreHorizontal,{className:g("Za-4 Za-4",i&&"Za-3 Za-3")})})}),(0,Za.jsxs)(Lt,{align:"end",children:[e.type==="digital"&&(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsxs)(mt,{onClick:()=>o?.(e),children:[(0,Za.jsx)(di.Settings,{className:"Za-4 Za-4 mr-2"}),"View Details"]}),(0,Za.jsxs)(mt,{onClick:()=>t?.(e),children:[(0,Za.jsx)(di.Edit,{className:"Za-4 Za-4 mr-2"}),"Edit"]})]}),(0,Za.jsxs)(mt,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,Za.jsx)(di.Trash2,{className:"Za-4 Za-4 mr-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,Za.jsxs)(X,{className:"pt-0",children:[(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.Mail,{className:"Za-3 Za-3"}),(0,Za.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,Za.jsxs)(Za.Fragment,{children:[e.phone&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.Phone,{className:"Za-3 Za-3"}),(0,Za.jsx)("span",{children:e.phone})]}),e.location&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.MapPin,{className:"Za-3 Za-3"}),(0,Za.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.Settings,{className:"Za-3 Za-3"}),(0,Za.jsxs)("span",{children:["v",e.version]})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.Clock,{className:"Za-3 Za-3"}),(0,Za.jsxs)("span",{children:["Last active: ",u(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,Za.jsx)("div",{className:"mt-3",children:(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,r?e.skills.length:3).map(D=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:D},D)),e.skills.length>3&&(0,Za.jsx)(y,{variant:"ghost",size:"sm",className:"Za-5 px-2 text-xs",onClick:()=>m(!r),children:r?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,Za.jsx)("div",{className:"mt-3",children:(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,r?e.capabilities.length:2).map(D=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:D},D)),e.capabilities.length>2&&(0,Za.jsx)(y,{variant:"ghost",size:"sm",className:"Za-5 px-2 text-xs",onClick:()=>m(!r),children:r?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}var Vo=ie(require("react")),ja=ie(require("@radix-ui/react-label"));var fr=(0,$o.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Je=Vo.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(ja.Root,{ref:a,className:g(fr(),e),...t}));Je.displayName=ja.Root.displayName;var Go=ie(require("react")),st=Go.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("textarea",{className:g("flex min-Za-[80px] Za-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}));st.displayName="Textarea";function za({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:s="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[r,m]=(0,Ka.useState)(""),[l,C]=(0,Ka.useState)([]),[u,D]=(0,Ka.useState)(!1);(0,Ka.useEffect)(()=>{if(!r.trim()){C([]),D(!1);return}let c=a.filter(b=>{if(e.map(W=>W.id).includes(b.id))return!1;let Q=r.toLowerCase();return b.title.toLowerCase().includes(Q)||b.description?.toLowerCase().includes(Q)||b.tags?.some(W=>W.toLowerCase().includes(Q))||Object.values(b.metadata||{}).some(W=>String(W).toLowerCase().includes(Q))});C(c),D(!0)},[r,e,a]);let v=c=>{i&&e.length>=i||(t([...e,c]),m(""),D(!1))},P=c=>{t(e.filter(b=>b.id!==c))},d=!i||e.length<i;return(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{children:o}),(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{value:r,onChange:c=>m(c.target.value),placeholder:d?s:`Maximum ${i} documents selected`,className:"pl-9",disabled:n||!d,onFocus:()=>r&&D(!0)})]}),u&&l.length>0&&(0,Za.jsx)(q,{className:"absolute top-full left-0 right-0 Za-10 mt-1 max-Za-60",children:(0,Za.jsx)(Ue,{className:"Za-full",children:(0,Za.jsx)(X,{className:"p-2",children:l.map(c=>(0,Za.jsx)(y,{variant:"ghost",className:"Za-full justify-start Za-auto p-3 mb-1",onClick:()=>v(c),disabled:n,children:(0,Za.jsxs)("div",{className:"flex items-start gap-3 Za-full",children:[(0,Za.jsx)(di.FileText,{className:"Za-4 Za-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,Za.jsxs)("div",{className:"text-left flex-1 min-Za-0",children:[(0,Za.jsx)("div",{className:"font-medium text-sm truncate",children:c.title}),c.description&&(0,Za.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:c.description}),c.tags&&c.tags.length>0&&(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[c.tags.slice(0,3).map(b=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:b},b)),c.tags.length>3&&(0,Za.jsxs)(G,{variant:"outline",className:"text-xs",children:["+",c.tags.length-3," more"]})]})]})]})},c.id))})})}),u&&r&&l.length===0&&(0,Za.jsx)(q,{className:"absolute top-full left-0 right-0 Za-10 mt-1",children:(0,Za.jsxs)(X,{className:"p-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',r,'"']})})]}),e.length>0&&(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,Za.jsx)("div",{className:"space-y-2",children:e.map(c=>(0,Za.jsx)(q,{className:"p-3",children:(0,Za.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Za.jsx)(di.FileText,{className:"Za-4 Za-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,Za.jsxs)("div",{className:"flex-1 min-Za-0",children:[(0,Za.jsx)("div",{className:"font-medium text-sm",children:c.title}),c.description&&(0,Za.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:c.description}),c.tags&&c.tags.length>0&&(0,Za.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:c.tags.map(b=>(0,Za.jsxs)(G,{variant:"outline",className:"text-xs",children:[(0,Za.jsx)(di.Tag,{className:"Za-3 Za-3 mr-1"}),b]},b))})]}),(0,Za.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"Za-6 Za-6 flex-shrink-0",onClick:()=>P(c.id),disabled:n,children:(0,Za.jsx)(di.X,{className:"Za-3 Za-3"})})]})},c.id))})]}),u&&(0,Za.jsx)("div",{className:"fixed inset-0 Za-0",onClick:()=>D(!1)})]})}function Ea({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:i,cancelLabel:n="Cancel",readOnly:r=!1,availableKnowledgeDocuments:m=[]}){let[l,C]=(0,Ka.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[u,D]=(0,Ka.useState)(""),[v,P]=(0,Ka.useState)(""),[d,c]=(0,Ka.useState)(!r);(0,Ka.useEffect)(()=>{e&&C(e)},[e]);let b=S=>{S.preventDefault();let H=l.version?parseInt(l.version):0,M=e?(H+1).toString():"1",ae={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:M,lastUpdated:l.lastUpdated||new Date,isActive:!0};t(ae)},B=(S,H,M)=>{if(!H.trim())return;let ae=l[S]||[];C({...l,[S]:[...ae,H.trim()]}),M("")},Q=(S,H)=>{let M=l[S]||[];C({...l,[S]:M.filter((ae,x)=>x!==H)})},W=S=>{S.preventDefault(),c(!d)},J=(S,H,M,ae,x)=>{let Fe=l[S]||[];return(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{children:H}),d&&(0,Za.jsxs)("div",{className:"flex gap-2",children:[(0,Za.jsx)(me,{value:M,onChange:f=>ae(f.target.value),placeholder:x,onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),B(S,M,ae))},disabled:o}),(0,Za.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>B(S,M,ae),disabled:o,children:(0,Za.jsx)(di.Plus,{className:"Za-4 Za-4"})})]}),(0,Za.jsx)("div",{className:"flex flex-wrap gap-2",children:Fe.map((f,Z)=>(0,Za.jsxs)(G,{className:"gap-1",children:[f,d&&(0,Za.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"Za-4 Za-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>Q(S,Z),disabled:o,children:(0,Za.jsx)(di.X,{className:"Za-3 Za-3"})})]},`${S}-${Z}-${f}`))})]})},ee=s||(d?e?"Edit Colleague":"Add New Colleague":"View Colleague"),xe=i||(e?"Update Colleague":"Add Colleague");return(0,Za.jsxs)(q,{className:"m-8 Za-full max-Za-4xl mx-auto",children:[(0,Za.jsx)(ne,{children:(0,Za.jsxs)(le,{className:"flex items-center gap-2",children:[(0,Za.jsx)(di.Bot,{className:"Za-5 Za-5"}),ee]})}),(0,Za.jsx)(X,{children:(0,Za.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{htmlFor:"name",children:"Name *"}),(0,Za.jsx)(me,{id:"name",value:l.name||"",onChange:S=>C({...l,name:S.target.value}),required:!0,disabled:o||!d})]}),(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{htmlFor:"description",children:"Description"}),(0,Za.jsx)(st,{id:"description",value:l.description||"",onChange:S=>C({...l,description:S.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!d})]})]}),(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Za.jsx)(st,{id:"jobDescription",value:l.jobDescription||"",onChange:S=>C({...l,jobDescription:S.target.value}),rows:4,required:l.type==="digital",disabled:o||!d})]}),(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Za.jsx)(st,{id:"workInstructions",value:l.workInstructions||"",onChange:S=>C({...l,workInstructions:S.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!d})]}),J("capabilities","Capabilities",v,P,"Add capability"),(0,Za.jsx)(za,{selectedDocuments:l.knowledge||[],onDocumentsChange:S=>C({...l,knowledge:S}),label:"Knowledge",placeholder:"Search for knowledge documents Qa add...",disabled:o||!d,availableDocuments:m}),(0,Za.jsx)(za,{selectedDocuments:l.coreKnowledge||[],onDocumentsChange:S=>C({...l,coreKnowledge:S}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!d,availableDocuments:m})]}),(0,Za.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,Za.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,Za.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":xe}):(0,Za.jsxs)(y,{type:"button",onClick:W,disabled:o,className:"gap-2",children:[(0,Za.jsx)(di.Edit,{className:"Za-4 Za-4"}),"Edit"]})]})]})})]})}function qo({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[s,i]=(0,Ka.useState)(""),n=(0,Ka.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(s.toLowerCase())||m.email.toLowerCase().includes(s.toLowerCase())||m.role.toLowerCase().includes(s.toLowerCase())||(m.skills||[]).some(C=>C.toLowerCase().includes(s.toLowerCase()))),[e,s]),r=m=>{t(m)};return(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Za.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Za.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.ChevronLeft,{className:"Za-4 Za-4"}),"Back"]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Choose a user Qa add as a colleague"})]})]}),(0,Za.jsx)(q,{className:"container",children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,Za.jsx)("div",{className:"flex-1",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:m=>i(m.target.value),className:"pl-9"})]})})})})}),(0,Za.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(m=>(0,Za.jsx)(fa.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Za.jsxs)(q,{className:`cursor-pointer transition-all hover:shadow-lg ${o===m.id?"ring-2 ring-primary":""}`,onClick:()=>r(m),children:[(0,Za.jsx)(ne,{className:"pb-3",children:(0,Za.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsxs)(Ge,{children:[(0,Za.jsx)(dt,{src:m.avatar,alt:m.name}),(0,Za.jsx)(_e,{children:(0,Za.jsx)(di.User,{className:"Za-4 Za-4"})})]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)(le,{className:"text-lg",children:m.name}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:m.role})]})]}),o===m.id&&(0,Za.jsx)(di.Check,{className:"Za-5 Za-5 text-primary"})]})}),(0,Za.jsx)(X,{className:"pt-0",children:(0,Za.jsxs)("div",{className:"space-y-3",children:[(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Za.jsx)("p",{className:"text-sm font-medium",children:m.email})]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"}),(0,Za.jsx)(G,{variant:"secondary",children:m.department})]}),m.location&&(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Location"}),(0,Za.jsx)("p",{className:"text-sm",children:m.location})]}),m.skills&&m.skills.length>0&&(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1",children:[m.skills.slice(0,3).map(l=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:l},l)),m.skills.length>3&&(0,Za.jsxs)(G,{variant:"outline",className:"text-xs",children:["+",m.skills.length-3]})]})]})]})})]})},m.id))}),n.length===0&&(0,Za.jsx)(q,{className:"container mt-4",children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"text-center py-8",children:[(0,Za.jsx)(di.User,{className:"Za-12 Za-12 text-muted-foreground mx-auto mb-4"}),(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function Jo({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[s,i]=(0,Ka.useState)(""),[n,r]=(0,Ka.useState)("all"),m=(0,Ka.useMemo)(()=>e.filter(u=>{let D=u.name.toLowerCase().includes(s.toLowerCase())||u.jobDescription.toLowerCase().includes(s.toLowerCase())||u.capabilities.some(P=>P.toLowerCase().includes(s.toLowerCase()))||u.workInstructions.toLowerCase().includes(s.toLowerCase()),v=n==="all"||u.status===n;return D&&v}),[e,s,n]),l=u=>{let D={...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(D)},C=u=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(u);return(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Za.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Za.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.ChevronLeft,{className:"Za-4 Za-4"}),"Back"]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague Qa clone"})]})]}),(0,Za.jsx)(q,{children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Za.jsx)("div",{className:"flex-1",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{placeholder:"Search by name, job description, or capabilities...",value:s,onChange:u=>i(u.target.value),className:"pl-9"})]})}),(0,Za.jsxs)("select",{value:n,onChange:u=>r(u.target.value),className:"Za-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,Za.jsx)("option",{value:"all",children:"All Status"}),(0,Za.jsx)("option",{value:"active",children:"Active"}),(0,Za.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Za.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:m.map(u=>(0,Za.jsx)(fa.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Za.jsxs)(q,{className:`cursor-pointer transition-all hover:shadow-lg ${o===u.id?"ring-2 ring-primary":""}`,onClick:()=>l(u),children:[(0,Za.jsx)(ne,{className:"pb-3",children:(0,Za.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsx)(Ge,{children:(0,Za.jsx)(_e,{className:"bg-blue-100",children:(0,Za.jsx)(di.Bot,{className:"Za-4 Za-4 text-blue-600"})})}),(0,Za.jsxs)("div",{children:[(0,Za.jsxs)(le,{className:"text-lg flex items-center gap-2",children:[u.name,(0,Za.jsx)(G,{variant:u.status==="active"?"default":"secondary",className:"text-xs",children:u.status})]}),(0,Za.jsxs)("p",{className:"text-sm text-muted-foreground",children:["v",u.version]})]})]}),(0,Za.jsxs)(y,{size:"sm",variant:"outline",className:"gap-2 Za-8",onClick:D=>{D.stopPropagation(),l(u)},children:[(0,Za.jsx)(di.Copy,{className:"Za-3 Za-3"}),"Clone"]})]})}),(0,Za.jsx)(X,{className:"pt-0",children:(0,Za.jsxs)("div",{className:"space-y-3",children:[(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Za.jsx)("p",{className:"text-sm line-clamp-2",children:u.jobDescription})]}),u.capabilities&&u.capabilities.length>0&&(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1",children:[u.capabilities.slice(0,3).map(D=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:D},D)),u.capabilities.length>3&&(0,Za.jsxs)(G,{variant:"outline",className:"text-xs",children:["+",u.capabilities.length-3]})]})]}),(0,Za.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Za.jsx)(di.Calendar,{className:"Za-3 Za-3"}),(0,Za.jsxs)("span",{children:["Updated ",C(u.lastUpdated)]})]}),u.knowledge&&(0,Za.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Za.jsx)(di.Users,{className:"Za-3 Za-3"}),(0,Za.jsxs)("span",{children:[u.knowledge.length," docs"]})]})]}),u.workInstructions&&(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Za.jsx)("p",{className:"text-xs line-clamp-2",children:u.workInstructions})]})]})})]})},u.id))}),m.length===0&&(0,Za.jsx)(q,{children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"text-center py-8",children:[(0,Za.jsx)(di.Bot,{className:"Za-12 Za-12 text-muted-foreground mx-auto mb-4"}),(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Xo({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Za.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Za.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.ChevronLeft,{className:"Za-4 Za-4"}),"Back"]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague Qa add"})]})]}),(0,Za.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-Za-4xl mx-auto",children:[(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Za.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Za.jsxs)(ne,{className:"text-center pb-4",children:[(0,Za.jsx)("div",{className:"mx-auto Za-16 Za-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Za.jsx)(di.User,{className:"Za-8 Za-8 text-blue-600"})}),(0,Za.jsx)(le,{className:"text-xl",children:"Add Human Colleague"})]}),(0,Za.jsxs)(X,{className:"text-center",children:[(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization Qa add as team members."}),(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Users,{className:"Za-4 Za-4 text-blue-600"}),(0,Za.jsx)("span",{children:"Browse existing users"})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.User,{className:"Za-4 Za-4 text-blue-600"}),(0,Za.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Za.jsx)(y,{className:"mt-6 Za-full",onClick:e,children:"Select User"})]})]})}),(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Za.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Za.jsxs)(ne,{className:"text-center pb-4",children:[(0,Za.jsx)("div",{className:"mx-auto Za-16 Za-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Za.jsx)(di.Bot,{className:"Za-8 Za-8 text-purple-600"})}),(0,Za.jsx)(le,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,Za.jsxs)(X,{className:"text-center",children:[(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Bot,{className:"Za-4 Za-4 text-purple-600"}),(0,Za.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Users,{className:"Za-4 Za-4 text-purple-600"}),(0,Za.jsx)("span",{children:"Create from templates"})]})]}),(0,Za.jsx)(y,{className:"mt-6 Za-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Yo({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Za.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Za.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.ChevronLeft,{className:"Za-4 Za-4"}),"Back"]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Choose how Qa create your digital colleague"})]})]}),(0,Za.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-Za-4xl mx-auto",children:[(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Za.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Za.jsxs)(ne,{className:"text-center pb-4",children:[(0,Za.jsx)("div",{className:"mx-auto Za-16 Za-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Za.jsx)(di.Copy,{className:"Za-8 Za-8 text-blue-600"})}),(0,Za.jsx)(le,{className:"text-xl",children:"Clone Existing"})]}),(0,Za.jsxs)(X,{className:"text-center",children:[(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize di for your needs."}),(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Bot,{className:"Za-4 Za-4 text-blue-600"}),(0,Za.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Copy,{className:"Za-4 Za-4 text-blue-600"}),(0,Za.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Za.jsx)(y,{className:"mt-6 Za-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Za.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Za.jsxs)(ne,{className:"text-center pb-4",children:[(0,Za.jsx)("div",{className:"mx-auto Za-16 Za-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Za.jsx)(di.Sparkles,{className:"Za-8 Za-8 text-green-600"})}),(0,Za.jsx)(le,{className:"text-xl",children:"Create New"})]}),(0,Za.jsxs)(X,{className:"text-center",children:[(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Plus,{className:"Za-4 Za-4 text-green-600"}),(0,Za.jsx)("span",{children:"Custom job description"})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Sparkles,{className:"Za-4 Za-4 text-green-600"}),(0,Za.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Za.jsx)(y,{className:"mt-6 Za-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}function Fa({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:s=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:r=[],existingDigitalColleagues:m=[]}){let[l,C]=(0,Ka.useState)(e||[]),[u,D]=(0,Ka.useState)(""),[v,P]=(0,Ka.useState)("all"),[d,c]=(0,Ka.useState)("all"),[b,B]=(0,Ka.useState)("all"),[Q,W]=(0,Ka.useState)(null),[J,ee]=(0,Ka.useState)(null);(0,Ka.useEffect)(()=>{C(e||[])},[e]);let xe=Array.isArray(r)?r:[],S=Array.isArray(m)?m:[],[H,M]=(0,Ka.useState)("main"),ae=l.filter(p=>{if(!p||!p.name)return!1;let we=p.name.toLowerCase().includes(u.toLowerCase())||p.type==="human"&&(p.email?.toLowerCase().includes(u.toLowerCase())||p.role?.toLowerCase().includes(u.toLowerCase()))||p.type==="digital"&&p.jobDescription?.toLowerCase().includes(u.toLowerCase()),oe=v==="all"||p.type==="human"&&p.department===v,ha=d==="all"||p.status===d;return we&&oe&&ha}),x=ae.filter(p=>p.type==="human"),Fe=ae.filter(p=>p.type==="digital"),f=()=>{M("typeSelection")},Z=p=>{p.type==="digital"&&(W(p),M("form")),console.log("Editing colleague:",p),a?.(p)},te=p=>{p.type==="digital"&&(ee(p),M("view"))},Ie=p=>{let we={id:`human-${Date.now()}`,type:"human",name:p.name,email:p.email,role:p.role,department:p.department,phone:p.phone,location:p.location,timezone:p.timezone,skills:p.skills||[],bio:p.bio,status:"active",joinedDate:new Date,lastActive:new Date};C(oe=>[...oe,we]),t?.(we),M("main")},De=p=>{if(!p||!p.id){console.error("Invalid cloned colleague provided Qa handleDigitalColleagueClone:",p);return}C(we=>[...we,p]),t?.(p),M("main")},lt=()=>{W(null),M("form")},St=p=>{if(!p||!p.id){console.error("Invalid colleague provided Qa handleSaveColleague:",p);return}Q?(C(we=>we.map(oe=>oe.id===p.id?p:oe)),a?.(p)):(C(we=>[...we,p]),t?.(p)),M("main"),W(null)},Be=()=>{M("main"),W(null),ee(null)},mi=()=>{M("main"),ee(null)},xr=()=>{J&&(W(J),ee(null),M("form"))},va=p=>{o?.(p,l.find(we=>we.id===p).type),C(we=>we.filter(oe=>oe.id!==p))},pi=()=>{D(""),P("all"),c("all")},Ha=()=>{let p=[];return S.forEach(oe=>{oe.knowledge&&Array.isArray(oe.knowledge)&&p.push(...oe.knowledge),oe.coreKnowledge&&Array.isArray(oe.coreKnowledge)&&p.push(...oe.coreKnowledge)}),l.forEach(oe=>{oe.type==="digital"&&(oe.knowledge&&Array.isArray(oe.knowledge)&&p.push(...oe.knowledge),oe.coreKnowledge&&Array.isArray(oe.coreKnowledge)&&p.push(...oe.coreKnowledge))}),p.filter((oe,ha,ui)=>ha===ui.findIndex(gi=>gi.id===oe.id))};return H==="typeSelection"?(0,Za.jsx)(Xo,{onSelectHuman:()=>M("userSelection"),onSelectDigital:()=>M("digitalOptions"),onCancel:()=>M("main")}):H==="userSelection"?(0,Za.jsx)(qo,{users:xe,onUserSelect:Ie,onCancel:()=>M("typeSelection")}):H==="digitalOptions"?(0,Za.jsx)(Yo,{onCloneExisting:()=>M("digitalClone"),onCreateNew:lt,onCancel:()=>M("typeSelection")}):H==="digitalClone"?(0,Za.jsx)(Jo,{digitalColleagues:S,onColleagueClone:De,onCancel:()=>M("digitalOptions")}):H==="form"?(0,Za.jsx)(Ea,{colleague:Q||void 0,onSave:St,onCancel:Be,availableKnowledgeDocuments:Ha()}):H==="view"?(0,Za.jsx)(Ea,{colleague:J||void 0,onSave:St,onCancel:mi,readOnly:!0,availableKnowledgeDocuments:Ha()}):(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsx)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Za.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Za.jsx)(Ae,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-Qa-r from-green-600 via-emerald-600 Qa-teal-600",primaryAction:{label:"Add colleague",onClick:f}}),(0,Za.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Za.jsxs)(q,{children:[(0,Za.jsxs)(ne,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Za.jsx)(le,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Za.jsx)(di.Users,{className:"Za-4 Za-4 text-muted-foreground"})]}),(0,Za.jsxs)(X,{children:[(0,Za.jsx)("div",{className:"text-2xl font-bold",children:l.length}),(0,Za.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(p=>p.status==="active").length," active"]})]})]}),(0,Za.jsxs)(q,{children:[(0,Za.jsxs)(ne,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Za.jsx)(le,{className:"text-sm font-medium",children:"Human Members"}),(0,Za.jsx)(di.User,{className:"Za-4 Za-4 text-muted-foreground"})]}),(0,Za.jsxs)(X,{children:[(0,Za.jsx)("div",{className:"text-2xl font-bold",children:l.filter(p=>p.type==="human").length}),(0,Za.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(p=>p.type==="human"&&p.status==="active").length," ","active"]})]})]}),(0,Za.jsxs)(q,{children:[(0,Za.jsxs)(ne,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Za.jsx)(le,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Za.jsx)(di.Bot,{className:"Za-4 Za-4 text-muted-foreground"})]}),(0,Za.jsxs)(X,{children:[(0,Za.jsx)("div",{className:"text-2xl font-bold",children:l.filter(p=>p.type==="digital").length}),(0,Za.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(p=>p.type==="digital"&&p.status==="active").length," ","active"]})]})]})]}),(0,Za.jsx)(q,{children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Za.jsx)("div",{className:"flex-1",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{placeholder:"Search colleagues...",value:u,onChange:p=>D(p.target.value),className:"pl-9"})]})}),(0,Za.jsxs)(Ut,{value:v,onValueChange:P,children:[(0,Za.jsx)(Nt,{className:"Za-full md:Za-[180px]",children:(0,Za.jsx)(Kt,{placeholder:"Department"})}),(0,Za.jsxs)(Ct,{children:[(0,Za.jsx)(Oe,{value:"all",children:"All Departments"}),i.map(p=>(0,Za.jsx)(Oe,{value:p,children:p},p))]})]}),(0,Za.jsxs)(Ut,{value:d,onValueChange:c,children:[(0,Za.jsx)(Nt,{className:"Za-full md:Za-[140px]",children:(0,Za.jsx)(Kt,{placeholder:"Status"})}),(0,Za.jsxs)(Ct,{children:[(0,Za.jsx)(Oe,{value:"all",children:"All Status"}),(0,Za.jsx)(Oe,{value:"active",children:"Active"}),(0,Za.jsx)(Oe,{value:"inactive",children:"Inactive"})]})]}),(u||v!=="all"||d!=="all")&&(0,Za.jsxs)(y,{variant:"outline",onClick:pi,className:"gap-2",children:[(0,Za.jsx)(di.Filter,{className:"Za-4 Za-4"}),"Clear"]})]})})}),(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsx)(da,{activeTab:b,onTabChange:B,tabOptions:[{value:"all",label:`All (${ae.length})`},{value:"human",label:`Human (${x.length})`},{value:"digital",label:`Digital (${Fe.length})`}],maxWidth:"400px",gridCols:3}),b==="all"&&(0,Za.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:ae.map(p=>(0,Za.jsx)(pa,{colleague:p,onEdit:Z,onDelete:va,onViewDetails:te,compact:s},`${p}-${p.id}`))}),b==="human"&&(0,Za.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:x.map(p=>(0,Za.jsx)(pa,{colleague:p,onEdit:Z,onDelete:va,onViewDetails:te,compact:s},p.id))}),b==="digital"&&(0,Za.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:Fe.map(p=>(0,Za.jsx)(pa,{colleague:p,onEdit:Z,onDelete:va,onViewDetails:te,compact:s},p.id))})]}),ae.length===0&&(0,Za.jsx)(q,{children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"text-center py-8",children:[(0,Za.jsx)(di.Users,{className:"Za-12 Za-12 text-muted-foreground mx-auto mb-4"}),(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:u||v!=="all"||d!=="all"?"Try adjusting your filters Qa see more results.":"Get started by adding your first colleague."}),(0,Za.jsxs)(y,{onClick:f,className:"gap-2",children:[(0,Za.jsx)(di.Plus,{className:"Za-4 Za-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function ei({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:s=[]}){let[i,n]=(0,Ka.useState)({...e,updatedAt:new Date}),r=()=>{let d=new Set,c=new Set;return s.forEach(b=>{b.menuConfig.groupBy.forEach(B=>d.add(B))}),o.forEach(b=>{b.metadata&&Object.keys(b.metadata).forEach(B=>c.add(B))}),{contextKeys:Array.from(d).sort(),documentKeys:Array.from(c).sort(),allKeys:Array.from(new Set([...d,...c])).sort()}},m=d=>{let c=new Set;return o.forEach(b=>{b.metadata?.[d]&&c.add(String(b.metadata[d]))}),Array.from(c).sort()},l=r(),C=()=>{t(i)},u=(d,c)=>{n(b=>({...b,metadata:{...b.metadata,[d]:c}}))},D=(d,c)=>{c==="__custom__"?u(d,""):u(d,c)},v=()=>{let d=`field_${Date.now()}`;u(d,"")},P=d=>{n(c=>{let b={...c.metadata};return delete b[d],{...c,metadata:b}})};return(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"Za-full flex flex-col",children:[(0,Za.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Za.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Za.jsx)(di.Edit3,{className:"Za-6 Za-6 text-primary"})}),(0,Za.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Za.jsxs)("div",{className:"flex gap-2",children:[(0,Za.jsxs)(y,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.X,{className:"Za-4 Za-4"}),"Cancel"]}),(0,Za.jsxs)(y,{size:"sm",onClick:C,className:"gap-2",children:[(0,Za.jsx)(di.Save,{className:"Za-4 Za-4"}),"Save Changes"]})]})]}),(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsxs)("div",{children:[(0,Za.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Za.jsx)(me,{value:i.title,onChange:d=>n(c=>({...c,title:d.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Za.jsx)(st,{value:i.description||"",onChange:d=>n(c=>({...c,description:d.target.value})),placeholder:"Document description...",rows:2})]}),(0,Za.jsxs)("div",{children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Za.jsxs)("div",{children:[(0,Za.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),l.contextKeys.length>0&&(0,Za.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",l.contextKeys.slice(0,4).join(", "),l.contextKeys.length>4&&` +${l.contextKeys.length-4}`]})]}),(0,Za.jsxs)(y,{type:"button",variant:"outline",size:"sm",onClick:v,className:"gap-1 Za-8",children:[(0,Za.jsx)(di.Plus,{className:"Za-3 Za-3"}),"Add"]})]}),i.metadata&&Object.keys(i.metadata).length>0?(0,Za.jsx)("div",{className:"space-y-2",children:Object.entries(i.metadata).map(([d,c])=>{let b=m(d);return(0,Za.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Za.jsx)(me,{value:d,onChange:B=>{let Q=B.target.value,W=i.metadata?.[d];n(J=>{let ee={...J.metadata};return delete ee[d],Q&&(ee[Q]=W||""),{...J,metadata:ee}})},placeholder:"Key",className:"Za-32 Za-8 text-sm",list:`metadata-keys-${d}`}),(0,Za.jsx)("datalist",{id:`metadata-keys-${d}`,children:l.allKeys.map(B=>(0,Za.jsx)("option",{value:B},B))}),(0,Za.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),b.length>0?(0,Za.jsxs)(Ut,{value:String(c||""),onValueChange:B=>D(d,B),children:[(0,Za.jsx)(Nt,{className:"flex-1 Za-8 text-sm",children:(0,Za.jsx)(Kt,{placeholder:"Value"})}),(0,Za.jsxs)(Ct,{children:[b.map(B=>(0,Za.jsx)(Oe,{value:B,children:B},B)),(0,Za.jsx)(Oe,{value:"__custom__",children:(0,Za.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Za.jsx)(me,{value:String(c||""),onChange:B=>u(d,B.target.value),placeholder:"Value",className:"flex-1 Za-8 text-sm"}),(0,Za.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:()=>P(d),className:"Za-8 Za-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Za.jsx)(di.X,{className:"Za-3 Za-3"})})]},d)})}):(0,Za.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Za.jsx)("p",{className:"text-xs text-muted-foreground",children:'No metadata \u2022 Click "Add" Qa create fields'})})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Za.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Za.jsx)(G,{variant:"secondary",className:"font-mono",children:i.format.toUpperCase()})]})]})]}),(0,Za.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Za.jsxs)("div",{className:"p-8",children:[(0,Za.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Za.jsx)(st,{value:i.content||"",onChange:d=>n(c=>({...c,content:d.target.value})),placeholder:"Document content...",className:"min-Za-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var ii=e=>(0,Za.jsx)("div",{className:"prose prose-slate dark:prose-invert max-Za-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>')}}),ti=e=>(0,Za.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),vr=e=>(0,Za.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Za-none",children:[(0,Za.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,Za.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Za.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Za.jsx)("pre",{className:"text-sm",children:e})]}),hr=e=>(0,Za.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Za-none",children:[(0,Za.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,Za.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Za.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),ii(e)]});function ri({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:s=[],knowledgeContexts:i=[]}){let[n,r]=(0,Ka.useState)(!1),m=v=>{switch(v){case"markdown":case"mdx":return(0,Za.jsx)(di.FileText,{className:"Za-6 Za-6 text-primary"});case"richtext":return(0,Za.jsx)(di.File,{className:"Za-6 Za-6 text-success"});case"text":return(0,Za.jsx)(di.Type,{className:"Za-6 Za-6 text-muted-foreground"});default:return(0,Za.jsx)(di.File,{className:"Za-6 Za-6 text-muted-foreground"})}},l=v=>{switch(v){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},C=(v,P)=>{let d={markdown:ii,mdx:hr,richtext:vr,text:ti},c=o?.[P]||d[P];return c?c(v):ti(v)},u=v=>{r(!1),t?.(v)},D=()=>{r(!1)};return n?(0,Za.jsx)(ei,{document:e,onSave:u,onCancel:D,availableDocuments:s,knowledgeContexts:i}):(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"Za-full flex flex-col",children:[(0,Za.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Za.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Za.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-Za-0",children:[(0,Za.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:m(e.format)}),(0,Za.jsxs)("div",{className:"flex-1 min-Za-0",children:[(0,Za.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Za.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,Za.jsx)("div",{className:"flex-shrink-0",children:(0,Za.jsxs)(y,{variant:"outline",size:"sm",onClick:()=>r(!0),className:"gap-2",children:[(0,Za.jsx)(di.Edit3,{className:"Za-4 Za-4"}),"Edit"]})})]}),(0,Za.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Za.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(v=>(0,Za.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",v]},v))]})]}),(0,Za.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Za.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Za.jsxs)("div",{className:"mb-6",children:[(0,Za.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Za.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Za.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(([v,P])=>(0,Za.jsxs)("div",{className:"flex gap-1",children:[(0,Za.jsxs)("span",{className:"text-muted-foreground font-medium",children:[v.replace(/([Za-Z])/g," $1").trim(),":"]}),(0,Za.jsx)("span",{className:"text-foreground truncate",children:String(P)})]},v))})})]}),(0,Za.jsx)("div",{className:"space-y-4",children:e.content?(0,Za.jsx)("div",{className:"relative",children:(0,Za.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:C(e.content,e.format)})}):(0,Za.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Za.jsx)("div",{className:"Za-16 Za-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Za.jsx)(di.FileText,{className:"Za-8 Za-8 text-muted-foreground"})}),(0,Za.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Za.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function si({label:e,documents:t,children:a,level:o,onDocumentClick:s,selectedDocumentId:i,showDocumentCount:n=!0}){let[r,m]=(0,Ka.useState)(o===0),l=a&&Object.keys(a).length>0,C=t.length+(a?Object.values(a).reduce((v,P)=>v+P.documents.length,0):0),u=v=>{switch(v){case"markdown":case"mdx":return(0,Za.jsx)(di.FileText,{className:"Za-3.5 Za-3.5 text-muted-foreground"});case"richtext":return(0,Za.jsx)(di.File,{className:"Za-3.5 Za-3.5 text-muted-foreground"});default:return(0,Za.jsx)(di.File,{className:"Za-3.5 Za-3.5 text-muted-foreground"})}},D=v=>{let P=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return P[v%P.length]};return(0,Za.jsxs)("div",{className:"space-y-1",children:[(l||t.length>0)&&(0,Za.jsxs)(fa.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:()=>m(!r),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Za.jsx)("div",{className:`Za-1 Za-6 rounded-full ${D(o)}`}),(0,Za.jsx)(fa.motion.div,{animate:{rotate:r?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Za.jsx)(di.ChevronRight,{className:"Za-4 Za-4 text-muted-foreground"})}),(0,Za.jsxs)("div",{className:"flex-1 flex items-center justify-between min-Za-0",children:[(0,Za.jsx)("div",{className:"flex items-center gap-2 min-Za-0",children:(0,Za.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&C>0&&(0,Za.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Za.jsx)("span",{className:"inline-flex items-center justify-center Za-6 Za-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:C})})]})]}),(0,Za.jsx)(fa.motion.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Za.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((v,P)=>(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:P*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===v.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>s?.(v),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Za.jsx)("div",{className:"flex-shrink-0",children:u(v.format)}),(0,Za.jsxs)("div",{className:"flex-1 min-Za-0",children:[(0,Za.jsx)("p",{className:`text-sm truncate transition-colors ${i===v.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:v.title}),v.description&&(0,Za.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:v.description})]}),v.tags&&v.tags.length>0&&(0,Za.jsx)("div",{className:"flex-shrink-0",children:(0,Za.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:v.tags[0]})})]},v.id)),a&&Object.entries(a).map(([v,P])=>(0,Za.jsx)(si,{label:v,documents:P.documents,children:P.children,level:o+1,onDocumentClick:s,selectedDocumentId:i,showDocumentCount:n},v))]})})]})}function ni({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:s,selectedDocumentId:i,className:n,editable:r=!0}){let[m,l]=(0,Ka.useState)(""),[C,u]=(0,Ka.useState)(null),D=(0,Ka.useMemo)(()=>m?e.filter(d=>d.title.toLowerCase().includes(m.toLowerCase())||d.description?.toLowerCase().includes(m.toLowerCase())||d.tags?.some(c=>c.toLowerCase().includes(m.toLowerCase()))||Object.values(d.metadata||{}).some(c=>String(c).toLowerCase().includes(m.toLowerCase()))):e,[e,m]),v=(0,Ka.useMemo)(()=>{let d=(c,b)=>{if(b.length===0)return{};let[B,...Q]=b;return c.reduce((J,ee)=>{let xe=ee.metadata?.[B]||"Uncategorized",S=String(xe);if(J[S]||(J[S]={documents:[],children:{}}),Q.length===0)J[S].documents.push(ee);else{let H=d([ee],Q),M=Object.keys(H)[0];M&&(J[S].children||(J[S].children={}),J[S].children[M]?J[S].children[M].documents.push(...H[M].documents):J[S].children[M]=H[M])}return J},{})};return d(D,t.groupBy)},[D,t.groupBy]),P=d=>{u(d),a?.(d)};return(0,Za.jsxs)("div",{className:`flex Za-full ${n||""}`,children:[(0,Za.jsxs)("div",{className:"Za-1/3 border-r border-border bg-muted/20",children:[(0,Za.jsx)("div",{className:"p-6 border-b border-border",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Za.jsx)(di.Search,{className:"Za-4 Za-4 text-muted-foreground"})}),(0,Za.jsx)(me,{placeholder:"Search knowledge base...",value:m,onChange:d=>l(d.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl Za-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Za.jsx)(Ue,{className:"Za-[calc(100%-100px)]",children:(0,Za.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(v).map(([d,c])=>(0,Za.jsx)(si,{label:d,documents:c.documents,children:c.children,level:0,onDocumentClick:P,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},d)),Object.keys(v).length===0&&(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Za.jsx)("div",{className:"Za-16 Za-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Za.jsx)(di.FileText,{className:"Za-8 Za-8 text-muted-foreground"})}),(0,Za.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,Za.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Za.jsx)("div",{className:"flex-1 bg-background",children:C?(0,Za.jsx)(ri,{document:C,onDocumentUpdate:s,editable:r}):(0,Za.jsx)("div",{className:"Za-full flex items-center justify-center text-center",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-Za-sm",children:[(0,Za.jsx)("div",{className:"Za-20 Za-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Za.jsx)(di.FileText,{className:"Za-10 Za-10 text-primary"})}),(0,Za.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Za.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base Qa view its content and details"})]})})})]})}function Ua({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,Za.jsxs)("div",{className:"flex flex-col Za-full max-Za-[calc(100vh-8rem)]",children:[(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Za.jsx)(Ae,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-Qa-r from-teal-600 via-cyan-600 Qa-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Za.jsx)("div",{className:"flex-1 min-Za-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Za.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,Za.jsxs)("div",{className:"flex flex-col Za-full max-Za-[calc(100vh-8rem)]",children:[(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Za.jsx)(Ae,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-Qa-r from-teal-600 via-cyan-600 Qa-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Za.jsxs)("div",{className:"mt-6",children:[(0,Za.jsx)("div",{className:"border-b border-border",children:(0,Za.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(m=>(0,Za.jsxs)("button",{onClick:()=>r(m),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===m.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[m.icon,m.label]},m.id))})}),n.description&&(0,Za.jsx)("div",{className:"mt-3 px-1",children:(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,Za.jsx)("div",{className:"flex-1 min-Za-0 px-2 md:px-4 pb-4",children:(0,Za.jsx)("div",{className:"Za-full rounded-3xl border overflow-hidden",children:(0,Za.jsx)(ni,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function ci({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:s,onCreateProject:i,onOpenProject:n,sidebarItems:r,initialColleagues:m,users:l,onColleagueAdd:C,onColleagueEdit:u,onColleagueDelete:D}){let[v,P]=(0,Ka.useState)("home"),[d,c]=(0,Ka.useState)(t[0]),b=x=>{console.log("Opening app:",x.name)},B=x=>{console.log("Favoriting app:",x.name)},Q=x=>{console.log("Opening file:",x.name)},W=x=>{console.log("Sharing file:",x.name)},J=x=>{console.log("Opening project:",x.name),n(x)},ee=x=>{console.log("Sharing project:",x.name)},xe=x=>{c(x),console.log("Business unit changed Qa:",x.name)},S=()=>{console.log("Copilot clicked - navigating Qa chat"),P("chat")},H=x=>{console.log("Notification removed:",x)},M=()=>{console.log("All notifications removed")},ae=()=>{switch(v){case"home":return(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Za.jsxs)("section",{className:"text-center py-12",children:[(0,Za.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome Qa the ",d.name," team"]}),(0,Za.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,Za.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,Za.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,Za.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Za.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,Za.jsx)("p",{className:"text-3xl font-bold text-primary",children:s}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Za.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,Za.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Za.jsx)(Ae,{title:"Chat with your team",gradient:"bg-gradient-Qa-r from-pink-600 via-red-600 Qa-orange-600",primaryAction:{label:"Go",onClick:()=>P("chat")}})]});case"colleagues":return(0,Za.jsx)(Fa,{initialColleagues:m,availableUsers:l,onColleagueAdd:C,onColleagueEdit:u,onColleagueDelete:D});case"chat":return(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Za.jsxs)("section",{className:"text-center py-12",children:[(0,Za.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,Za.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",d.name," team members and collaborate in real-time."]})]}),(0,Za.jsx)(Ae,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-Qa-r from-blue-600 via-purple-600 Qa-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,Za.jsxs)("div",{className:"space-y-8",children:[(0,Za.jsx)(Ae,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-Qa-r from-pink-600 via-red-600 Qa-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Za.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:La.filter(x=>x.new).map(x=>(0,Za.jsx)(Ba,{app:x,showProgress:!0,onOpen:b,onFavorite:B},x.name))})]}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Za.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:La.map(x=>(0,Za.jsx)(Ba,{app:x,onOpen:b,onFavorite:B},x.name))})]})]});case"knowledge":return(0,Za.jsx)(Ua,{});case"files":return(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Za.jsx)(Ae,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-Qa-r from-teal-600 via-cyan-600 Qa-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("div",{className:"flex items-center justify-between",children:(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Za.jsx)(jo,{files:Fo,onFileClick:Q})]})]});case"projects":return(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Za.jsx)(Ae,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-Qa-r from-purple-600 via-violet-600 Qa-indigo-600",primaryAction:{label:"New Project",onClick:i}}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Za.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:a.map(x=>(0,Za.jsx)(Eo,{project:x,onOpen:J,onShare:ee},x.name))})]})]});case"learn":return(0,Za.jsxs)("div",{className:"space-y-8",children:[(0,Za.jsx)(Ae,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-Qa-r from-green-600 via-emerald-600 Qa-teal-600",primaryAction:{label:"Upgrade Qa Pro",onClick:()=>console.log("Upgrade Qa pro clicked")}}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Za.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Uo.slice(0,3).map(x=>(0,Za.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,Za.jsx)("h3",{className:"font-semibold mb-2",children:x.title}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:x.description}),(0,Za.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Za.jsx)("span",{children:x.duration}),(0,Za.jsx)("span",{children:x.level})]})]},x.title))})]})]});default:return null}};return(0,Za.jsx)(Ro,{sidebarItems:go,title:e,notifications:fo,businessUnits:t,currentBusinessUnit:d,onBusinessUnitChange:xe,activeTab:v,onTabChange:P,showTabs:!0,onActionClick:S,actionIcon:(0,Za.jsx)(di.Bot,{className:"mr-2 Za-4 Za-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:M,children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsx)(fa.motion.div,{className:"flex-1 Za-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:ae()},v)})})}
|
|
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})},Oa=(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 oe=(e,t,a)=>(a=e!=null?fi(bi(e)):{},Oa(t||!e||!e.__esModule?$t(a,"default",{value:e,enumerable:!0}):a,e)),wi=e=>Oa($t({},"__esModule",{value:!0}),e);var br={};yi(br,{default:()=>ci});module.exports=wi(br);var Ka=require("react"),fa=require("motion/react"),di=require("lucide-react");var Qa=require("clsx");var ya="-",Ni=e=>{let t=Di(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:n=>{let r=n.split(ya);return r[0]===""&&r.length!==1&&r.shift(),Wa(r,t)||Ci(n)},getConflictingClassGroupIds:(n,r)=>{let m=a[n]||[];return r&&o[n]?[...m,...o[n]]:m}}},Wa=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?Wa(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(ya);return t.validators.find(({validator:n})=>n(i))?.classGroupId},Va=/^\[(.+)\]$/,Ci=e=>{if(Va.test(e)){let t=Va.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 ki(Object.entries(e.classGroups),a).forEach(([i,n])=>{xa(n,o,i,t)}),o},xa=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:$a(t,s);i.classGroupId=a;return}if(typeof s=="function"){if(Si(s)){xa(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([i,n])=>{xa(n,$a(t,i),a,o)})})},$a=(e,t)=>{let a=e;return t.split(ya).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Si=e=>e.isThemeGetter,ki=(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,Pi=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)}}},Ga="!",Ri=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],i=t.length,n=r=>{let m=[],l=0,C=0,u;for(let c=0;c<r.length;c++){let b=r[c];if(l===0){if(b===s&&(o||r.slice(c,c+i)===t)){m.push(r.slice(C,c)),C=c+i;continue}if(b==="/"){u=c;continue}}b==="["?l++:b==="]"&&l--}let D=m.length===0?r:r.substring(C),v=D.startsWith(Ga),k=v?D.substring(1):D,d=u&&u>C?u-C:void 0;return{modifiers:m,hasImportantModifier:v,baseClassName:k,maybePostfixModifierPosition:d}};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:Pi(e.cacheSize),parseClassName:Ri(e),...Ni(e)}),Ii=/\s+/,Mi=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],n=e.trim().split(Ii),r="";for(let m=n.length-1;m>=0;m-=1){let l=n[m],{modifiers:C,hasImportantModifier:u,baseClassName:D,maybePostfixModifierPosition:v}=a(l),k=!!v,d=o(k?D.substring(0,v):D);if(!d){if(!k){r=l+(r.length>0?" "+r:r);continue}if(d=o(D),!d){r=l+(r.length>0?" "+r:r);continue}k=!1}let c=Ti(C).join(":"),b=u?c+Ga:c,B=b+d;if(i.includes(B))continue;i.push(B);let Q=s(d,k);for(let W=0;W<Q.length;++W){let J=Q[W];i.push(b+J)}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=_a(t))&&(o&&(o+=" "),o+=a);return o}var _a=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=_a(e[o]))&&(a&&(a+=" "),a+=t);return a};function ji(e,...t){let a,o,s,i=n;function n(m){let l=t.reduce((C,u)=>u(C),e());return a=Ai(l),o=a.cache.get,s=a.cache.set,i=r,r(m)}function r(m){let l=o(m);if(l)return l;let C=Mi(m,a);return s(m,C),C}return function(){return i(Bi.apply(null,arguments))}}var ie=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},qa=/^\[(?:([a-Za-]+):)?(.+)\]$/i,Li=/^\d+\/\d+$/,Ei=new Set(["px","full","screen"]),zi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Fi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(Za|Za|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ui=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ki=/^(inset_)?-?((\d+)?\.?(\d+)[a-Za]+|0)di-?((\d+)?\.?(\d+)[a-Za]+|0)/,Hi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,$e=e=>bt(e)||Ei.has(e)||Li.test(e),Ze=e=>xt(e,"length",Ji),bt=e=>!!e&&!Number.isNaN(Number(e)),ba=e=>xt(e,"number",bt),Rt=e=>!!e&&Number.isInteger(Number(e)),Oi=e=>e.endsWith("%")&&bt(e.slice(0,-1)),F=e=>qa.test(e),et=e=>zi.test(e),Vi=new Set(["length","size","percentage"]),$i=e=>xt(e,Vi,Ja),Wi=e=>xt(e,"position",Ja),Gi=new Set(["image","url"]),_i=e=>xt(e,Gi,Qi),qi=e=>xt(e,"",Xi),Tt=()=>!0,xt=(e,t,a)=>{let o=qa.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),Ja=()=>!1,Xi=e=>Ki.test(e),Qi=e=>Hi.test(e);var Yi=()=>{let e=ie("colors"),t=ie("spacing"),a=ie("blur"),o=ie("brightness"),s=ie("borderColor"),i=ie("borderRadius"),n=ie("borderSpacing"),r=ie("borderWidth"),m=ie("contrast"),l=ie("grayscale"),C=ie("hueRotate"),u=ie("invert"),D=ie("gap"),v=ie("gradientColorStops"),k=ie("gradientColorStopPositions"),d=ie("inset"),c=ie("margin"),b=ie("opacity"),B=ie("padding"),Q=ie("saturate"),W=ie("scale"),J=ie("sepia"),Z=ie("skew"),be=ie("space"),P=ie("translate"),H=()=>["auto","contain","none"],I=()=>["auto","hidden","clip","visible","scroll"],te=()=>["auto",F,t],x=()=>[F,t],Fe=()=>["",$e,Ze],f=()=>["auto",bt,F],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ee=()=>["solid","dashed","dotted","double","none"],Me=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Ce=()=>["start","end","center","between","around","evenly","stretch"],lt=()=>["","0",F],Pt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],Be=()=>[bt,F];return{cacheSize:500,separator:":",theme:{colors:[Tt],spacing:[$e,Ze],blur:["none","",et,F],brightness:Be(),borderColor:[e],borderRadius:["none","","full",et,F],borderSpacing:x(),borderWidth:Fe(),contrast:Be(),grayscale:lt(),hueRotate:Be(),invert:lt(),gap:x(),gradientColorStops:[e],gradientColorStopPositions:[Oi,Ze],inset:te(),margin:te(),opacity:Be(),padding:x(),saturate:Be(),scale:Be(),sepia:lt(),skew:Be(),space:x(),translate:x()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[et]}],"break-after":[{"break-after":Pt()}],"break-before":[{"break-before":Pt()}],"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:[...Y(),F]}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:H()}],"overscroll-x":[{"overscroll-x":H()}],"overscroll-y":[{"overscroll-y":H()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[d]}],"inset-x":[{"inset-x":[d]}],"inset-y":[{"inset-y":[d]}],start:[{start:[d]}],end:[{end:[d]}],top:[{top:[d]}],right:[{right:[d]}],bottom:[{bottom:[d]}],left:[{left:[d]}],visibility:["visible","invisible","collapse"],Za:[{Za:["auto",Rt,F]}],basis:[{basis:te()}],"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:lt()}],shrink:[{shrink:lt()}],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":f()}],"col-end":[{"col-end":f()}],"grid-rows":[{"grid-rows":[Tt]}],"row-start-end":[{row:["auto",{span:[Rt,F]},F]}],"row-start":[{"row-start":f()}],"row-end":[{"row-end":f()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[D]}],"gap-x":[{"gap-x":[D]}],"gap-y":[{"gap-y":[D]}],"justify-content":[{justify:["normal",...Ce()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Ce(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Ce(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[B]}],px:[{px:[B]}],py:[{py:[B]}],ps:[{ps:[B]}],Za:[{Za:[B]}],pt:[{pt:[B]}],pr:[{pr:[B]}],pb:[{pb:[B]}],pl:[{pl:[B]}],m:[{m:[c]}],mx:[{mx:[c]}],my:[{my:[c]}],ms:[{ms:[c]}],me:[{me:[c]}],mt:[{mt:[c]}],mr:[{mr:[c]}],mb:[{mb:[c]}],ml:[{ml:[c]}],"space-x":[{"space-x":[be]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[be]}],"space-y-reverse":["space-y-reverse"],Za:[{Za:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-Za":[{"min-Za":[F,t,"min","max","fit"]}],"max-Za":[{"max-Za":[F,t,"none","full","min","max","fit","prose",{screen:[et]},et]}],Za:[{Za:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-Za":[{"min-Za":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-Za":[{"max-Za":[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",ba]}],"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,ba]}],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":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","di-underline"],"text-decoration-style":[{decoration:[...ee(),"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:x()}],"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":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),Wi]}],"bg-repeat":[{bg:["di-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$i]}],"bg-image":[{bg:["none",{"gradient-Ya":["t","tr","r","br","b","bl","l","tl"]},_i]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[k]}],"gradient-via-pos":[{via:[k]}],"gradient-Ya-pos":[{Ya:[k]}],"gradient-from":[{from:[v]}],"gradient-via":[{via:[v]}],"gradient-Ya":[{Ya:[v]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-di":[{"rounded-di":[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-Za":[{border:[r]}],"border-Za-x":[{"border-x":[r]}],"border-Za-y":[{"border-y":[r]}],"border-Za-s":[{"border-s":[r]}],"border-Za-e":[{"border-e":[r]}],"border-Za-t":[{"border-t":[r]}],"border-Za-r":[{"border-r":[r]}],"border-Za-b":[{"border-b":[r]}],"border-Za-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[b]}],"border-style":[{border:[...ee(),"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":[b]}],"divide-style":[{divide:ee()}],"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:["",...ee()]}],"outline-offset":[{"outline-offset":[$e,F]}],"outline-Za":[{outline:[$e,Ze]}],"outline-color":[{outline:[e]}],"ring-Za":[{ring:Fe()}],"ring-Za-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-Za":[{"ring-offset":[$e,Ze]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",et,qi]}],"shadow-color":[{shadow:[Tt]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...Me(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":Me()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",et,F]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[u]}],saturate:[{saturate:[Q]}],sepia:[{sepia:[J]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[u]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[Q]}],"backdrop-sepia":[{"backdrop-sepia":[J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[n]}],"border-spacing-x":[{"border-spacing-x":[n]}],"border-spacing-y":[{"border-spacing-y":[n]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",F]}],duration:[{duration:Be()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:Be()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[W]}],"scale-x":[{"scale-x":[W]}],"scale-y":[{"scale-y":[W]}],rotate:[{rotate:[Rt,F]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"skew-x":[{"skew-x":[Z]}],"skew-y":[{"skew-y":[Z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",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","di-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","Za-resize","ne-resize","nw-resize","di-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":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-Za":[{"scroll-Za":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"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-Za":[{stroke:[$e,Ze,ba]}],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","Za","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["Za","Za"],"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-di","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-di","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-Za":["border-Za-s","border-Za-e","border-Za-t","border-Za-r","border-Za-b","border-Za-l"],"border-Za-x":["border-Za-r","border-Za-l"],"border-Za-y":["border-Za-t","border-Za-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-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-Za","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Xa=ji(Yi);function g(...e){return Xa((0,Qa.clsx)(e))}var Zt=oe(require("react")),Pa=oe(require("next/link"));var Ya=require("class-variance-authority");var Za=require("react/jsx-runtime"),Zi=(0,Ya.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 G({className:e,variant:t,...a}){return(0,Za.jsx)("div",{className:g(Zi({variant:t}),e),...a})}var eo=require("@radix-ui/react-slot"),ao=oe(require("react")),er=(0,Ya.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:"Za-10 px-4 py-2",icon:"Za-10 Za-10",lg:"Za-11 rounded px-8",sm:"Za-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=ao.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},i)=>(0,Za.jsx)(e?eo.Slot:"button",{className:g(er({className:t,size:a,variant:o})),ref:i,...s}));y.displayName="Button";var io=oe(require("react"));var me=io.forwardRef(({className:e,type:t,...a},o)=>(0,Za.jsx)("input",{type:t,className:g("flex Za-9 Za-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}));me.displayName="Input";var wa=oe(require("react")),Re=oe(require("@radix-ui/react-scroll-area"));var Ue=wa.forwardRef(({className:e,children:t,...a},o)=>(0,Za.jsxs)(Re.Root,{ref:o,className:g("relative overflow-hidden",e),...a,children:[(0,Za.jsx)(Re.Viewport,{className:"Za-full Za-full rounded-[inherit]",children:t}),(0,Za.jsx)(so,{}),(0,Za.jsx)(Re.Corner,{})]}));Ue.displayName=Re.Root.displayName;var so=wa.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Za.jsx)(Re.ScrollAreaScrollbar,{ref:o,orientation:t,className:g("flex touch-none select-none transition-colors",t==="vertical"&&"Za-full Za-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"Za-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,Za.jsx)(Re.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));so.displayName=Re.ScrollAreaScrollbar.displayName;var At=oe(require("react")),ue=oe(require("@radix-ui/react-dialog"));var lo=ue.Root;var tr=ue.Portal;var co=At.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(ue.Overlay,{ref:a,className:g("fixed inset-0 Za-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}));co.displayName=ue.Overlay.displayName;var Na=At.forwardRef(({className:e,children:t,...a},o)=>(0,Za.jsxs)(tr,{children:[(0,Za.jsx)(co,{}),(0,Za.jsxs)(ue.Content,{ref:o,className:g("fixed left-[50%] top-[50%] Za-50 grid Za-full max-Za-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-Ya-left-1/2 data-[state=closed]:slide-out-Ya-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,Za.jsxs)(ue.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,Za.jsx)(di.X,{className:"Za-4 Za-4"}),(0,Za.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Na.displayName=ue.Content.displayName;var Ca=({className:e,...t})=>(0,Za.jsx)("div",{className:g("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ca.displayName="DialogHeader";var ar=({className:e,...t})=>(0,Za.jsx)("div",{className:g("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ar.displayName="DialogFooter";var Da=At.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(ue.Title,{ref:a,className:g("text-lg font-semibold leading-none tracking-tight",e),...t}));Da.displayName=ue.Title.displayName;var or=At.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(ue.Description,{ref:a,className:g("text-sm text-muted-foreground",e),...t}));or.displayName=ue.Description.displayName;var It=oe(require("@radix-ui/react-checkbox")),po=oe(require("react")),Sa=po.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(It.Root,{className:g("peer Za-4 Za-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,Za.jsx)(It.Indicator,{className:g("flex items-center justify-center text-current"),children:(0,Za.jsx)(di.Check,{className:"Za-4 Za-4"})})}));Sa.displayName=It.Root.displayName;var Ke=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date}),go=[{id:"home",title:"Home",icon:(0,Za.jsx)(di.Home,{}),isActive:!0},{id:"teams",title:"Teams",icon:(0,Za.jsx)(di.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,Za.jsx)(di.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,Za.jsx)(di.Bot,{}),url:"/copilot"},{id:"knowledge",title:"Knowledge",icon:(0,Za.jsx)(di.FileText,{}),url:"/knowledge"}],fo=[{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 Ya 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'Za 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:"Za 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")}],vo=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Za.jsx)(di.Palette,{className:"Za-4 Za-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Za.jsx)(di.Code,{className:"Za-4 Za-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Za.jsx)(di.TrendingUp,{className:"Za-4 Za-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Za.jsx)(di.DollarSign,{className:"Za-4 Za-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,Za.jsx)(di.Users,{className:"Za-4 Za-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Za.jsx)(di.Wrench,{className:"Za-4 Za-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Za.jsx)(di.Scale,{className:"Za-4 Za-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Za.jsx)(di.Package,{className:"Za-4 Za-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"di",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Za.jsx)(di.Zap,{className:"Za-4 Za-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Za.jsx)(di.Building2,{className:"Za-4 Za-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],qt=[{id:"1",name:"Za-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var ka=[{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 Ya 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",name:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",name:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",name:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",name:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",name:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",name:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",name:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],ir=[...Xt,{id:"8",name:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",name:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",name:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",name:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",name:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],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:"Za project with di 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:[]},uo={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 Kr={empty:{initialProjects:_t.projects,initialEpics:_t.epics,initialSprints:_t.sprints,initialTasks:_t.tasks},default:{initialProjects:qt,initialEpics:ka,initialSprints:Gt,initialTasks:Xt},highDensity:{initialProjects:qt,initialEpics:ka,initialSprints:Gt,initialTasks:ir},singleEpic:{initialProjects:qt,initialEpics:uo.epics,initialSprints:Gt,initialTasks:uo.tasks},multipleProjects:{initialProjects:rr,initialEpics:ka,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(Ke),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Ke),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(Ke),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Ke),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 Ya 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","Za","Statistics"].map(Ke),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Ke),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(Ke),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Ke),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 Ya customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases Ya human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Ke),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Ke),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Hr=[{id:"1",title:"Review quarterly report",description:"Go through Q4 performance metrics and prepare summary for the team meeting",dueDate:new Date(2024,2,15),dueTime:"14:30",colleague: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 Ya production",description:"Deploy the latest version Ya 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 Or=Jt.filter(e=>e.type==="digital");function Yt(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 Ra({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=vo[0],onBusinessUnitChange:i,onSearch:n,className:r,logo:m="/headerlogo.png",appName:l="Nuvia",tagline:C="Collaboration Platform"}){let[u,D]=Zt.useState({}),[v,k]=Yt("sidebar-favorites",{}),[d,c]=Zt.useState(null),[b,B]=Zt.useState(""),Q=f=>{D(Y=>({...Y,[f]:!Y[f]}))},W=f=>{i?.(f)},J=()=>{b.trim()&&n?.(b.trim())},Z=f=>{f.key==="Enter"&&(f.preventDefault(),J())},be=(f,Y)=>{let ee=v[f]||[],Me=ee.includes(Y)?ee.filter(Ce=>Ce!==Y):ee.concat(Y);k({...v,[f]:Me})},P=f=>{if(!f.items||!f.maxItems||f.items.length<=f.maxItems)return f.items||[];let Y=v[f.id]||[],ee=f.items.filter(Ce=>Y.includes(Ce.id)),Me=f.items.filter(Ce=>!Y.includes(Ce.id));return[...ee,...Me].slice(0,f.maxItems)},H=f=>f.maxItems&&f.items&&f.items.length>f.maxItems,I=e,te=f=>{let Y=H(f),ee=P(f),Me=(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[f.icon,(0,Za.jsx)("span",{children:f.title})]}),f.badge&&(0,Za.jsx)(G,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:f.badge}),f.items&&(0,Za.jsx)(di.ChevronDown,{className:g("ml-2 Za-4 Za-4 transition-transform",u[f.title]?"rotate-180":"")})]}),Ce=g("flex Za-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",f.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return f.url?(0,Za.jsx)(Pa.default,{href:f.url,className:Ce,onClick:a?o:void 0,children:Me}):(0,Za.jsx)("button",{className:Ce,onClick:()=>f.items&&Q(f.title),children:Me})},x=()=>{let f=e.find(ee=>ee.id===d);if(!f||!f.items||!f.maxItems)return null;let Y=v[f.id]||[];return(0,Za.jsx)(lo,{open:!!d,onOpenChange:ee=>!ee&&c(null),children:(0,Za.jsxs)(Na,{className:"sm:max-Za-md",children:[(0,Za.jsxs)(Ca,{children:[(0,Za.jsxs)(Da,{children:["Manage ",f.title," Favorites"]}),(0,Za.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up Ya ",f.maxItems," items Ya show in ",f.title.toLowerCase(),"."]})]}),(0,Za.jsx)(Ue,{className:"max-Za-96 pr-4",children:(0,Za.jsx)("div",{className:"space-y-4",children:f.items.map(ee=>(0,Za.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Za.jsx)(Sa,{id:ee.id,checked:Y.includes(ee.id),onCheckedChange:()=>be(f.id,ee.id),disabled:!Y.includes(ee.id)&&Y.length>=(f.maxItems||0)}),(0,Za.jsxs)("label",{htmlFor:ee.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:[ee.title,ee.badge&&(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:ee.badge})]})]},ee.id))})})]})})},Fe=(0,Za.jsxs)("div",{className:"flex Za-full flex-col bg-background",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsx)("div",{className:"flex Za-14 Za-14 items-center justify-center",children:(0,Za.jsx)("img",{src:m,alt:"Header Logo",className:"Za-14 Za-14 object-contain"})}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h2",{className:"font-semibold",children:l}),(0,Za.jsx)("p",{className:"text-xs text-muted-foreground",children:C})]})]}),a&&(0,Za.jsx)(y,{variant:"ghost",size:"icon",onClick:o,children:(0,Za.jsx)(di.X,{className:"Za-5 Za-5"})})]}),(0,Za.jsx)("div",{className:"px-3 py-2",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{type:"search",placeholder:"Search...",className:"Za-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:b,onChange:f=>B(f.target.value),onKeyPress:Z})]})}),(0,Za.jsx)(Ue,{className:"flex-1 px-3 py-2",children:(0,Za.jsx)("div",{className:"space-y-1",children:I.map(f=>(0,Za.jsxs)("div",{className:"mb-1",children:[te(f),f.items&&u[f.title]&&(0,Za.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[P(f).map(Y=>(0,Za.jsxs)(Pa.default,{href:Y.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[Y.title,Y.badge&&(0,Za.jsx)(G,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:Y.badge})]},Y.id)),H(f)&&f.items&&f.items.length>P(f).length&&(0,Za.jsxs)("button",{onClick:()=>c(f.id),className:"Za-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",f.items.length-P(f).length," more available"]})]})]},f.id))})}),(0,Za.jsx)("div",{className:"p-3",children:(0,Za.jsx)("div",{className:"space-y-1",children:(0,Za.jsxs)("button",{className:"flex Za-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Za.jsx)(di.Settings,{className:"Za-5 Za-5"}),(0,Za.jsx)("span",{children:"Settings"})]})})}),(0,Za.jsx)(x,{})]});return a?(0,Za.jsx)("div",{className:g("fixed inset-y-0 left-0 Za-50 Za-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Fe}):(0,Za.jsx)("div",{className:g("fixed inset-y-0 left-0 Za-30 Za-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:Fe})}var ea=oe(require("react")),We=oe(require("@radix-ui/react-avatar"));var Ge=ea.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(We.Root,{ref:a,className:g("relative flex Za-10 Za-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ge.displayName=We.Root.displayName;var dt=ea.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(We.Image,{ref:a,className:g("aspect-square Za-full Za-full",e),...t}));dt.displayName=We.Image.displayName;var _e=ea.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(We.Fallback,{ref:a,className:g("flex Za-full Za-full items-center justify-center rounded-full bg-muted",e),...t}));_e.displayName=We.Fallback.displayName;var ho=oe(require("react")),je=oe(require("@radix-ui/react-tooltip"));var aa=je.Provider,oa=je.Root,ia=je.Trigger,Mt=ho.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Za.jsx)(je.Portal,{children:(0,Za.jsx)(je.Content,{ref:o,sideOffset:t,className:g("Za-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 bo=require("next-themes");function xo(){let{setTheme:e,theme:t}=(0,bo.useTheme)();return(0,Za.jsx)(aa,{children:(0,Za.jsxs)(oa,{children:[(0,Za.jsx)(ia,{asChild:!0,children:(0,Za.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Za.jsx)(di.Sun,{className:"Za-5 Za-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Za.jsx)(di.Moon,{className:"absolute Za-5 Za-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Za.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Za.jsx)(Mt,{children:"Toggle theme"})]})})}function yo({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:i}){let n=e.filter(l=>!l.read),r=n.length,m=l=>{switch(l){case"info":return(0,Za.jsx)(di.Info,{className:"Za-5 Za-5 text-blue-500"});case"success":return(0,Za.jsx)(di.Check,{className:"Za-5 Za-5 text-green-500"});case"warning":return(0,Za.jsx)(di.AlertTriangle,{className:"Za-5 Za-5 text-amber-500"});case"error":return(0,Za.jsx)(di.AlertTriangle,{className:"Za-5 Za-5 text-red-500"})}};return(0,Za.jsx)(fa.AnimatePresence,{children:t&&(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsx)(fa.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 Za-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,Za.jsx)(fa.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:g("fixed inset-y-0 right-0 Za-50 Za-full max-Za-sm border-l bg-background shadow-lg md:Za-96",i),children:(0,Za.jsxs)("div",{className:"flex Za-full flex-col",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Za.jsx)(di.Bell,{className:"Za-5 Za-5"}),(0,Za.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,Za.jsxs)(G,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,Za.jsxs)(y,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Za.jsx)(di.X,{className:"Za-5 Za-5"}),(0,Za.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,Za.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,Za.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,Za.jsx)(y,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),n.length>0?(0,Za.jsx)(Ue,{className:"flex-1",children:(0,Za.jsx)("div",{className:"divide-y",children:n.map(l=>(0,Za.jsxs)("div",{className:g("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Za.jsx)("div",{className:"flex Za-10 Za-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:m(l.type)}),(0,Za.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Za.jsx)("p",{className:"font-medium",children:l.title}),(0,Za.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Za.jsx)("p",{className:"text-xs text-muted-foreground",children:l.time}),(0,Za.jsx)(y,{variant:"ghost",size:"sm",className:"Za-6 Za-6 p-0",onClick:()=>o?.(l.id),title:"Dismiss",children:(0,Za.jsx)(di.Check,{className:"Za-3 Za-3"})})]})]}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:l.description}),l.actionLabel&&(0,Za.jsxs)(y,{variant:"link",size:"sm",className:"Za-auto p-0 text-sm",onClick:l.onAction,children:[l.actionLabel,(0,Za.jsx)(di.ChevronRight,{className:"ml-1 Za-3 Za-3"})]})]})]},l.id))})}):(0,Za.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Za.jsx)("div",{className:"flex Za-16 Za-16 items-center justify-center rounded-full bg-muted",children:(0,Za.jsx)(di.Bell,{className:"Za-8 Za-8 text-muted-foreground"})}),(0,Za.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,Za.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var ct=oe(require("@radix-ui/react-tabs"));function wo({className:e,...t}){return(0,Za.jsx)(ct.Root,{"data-slot":"tabs",className:g("flex flex-col gap-2",e),...t})}function No({className:e,...t}){return(0,Za.jsx)(ct.List,{"data-slot":"tabs-list",className:g("bg-muted text-muted-foreground inline-flex Za-9 Za-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Co({className:e,...t}){return(0,Za.jsx)(ct.Trigger,{"data-slot":"tabs-trigger",className:g("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex Za-[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=oe(require("react")),V=oe(require("@radix-ui/react-dropdown-menu")),yt=require("@radix-ui/react-icons");var na=V.Root,la=V.Trigger;var sr=qe.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,Za.jsxs)(V.SubTrigger,{ref:s,className:g("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...o,children:[a,(0,Za.jsx)(yt.ChevronRightIcon,{className:"ml-auto"})]}));sr.displayName=V.SubTrigger.displayName;var nr=qe.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(V.SubContent,{ref:a,className:g("Za-50 min-Za-[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=V.SubContent.displayName;var jt=qe.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Za.jsx)(V.Portal,{children:(0,Za.jsx)(V.Content,{ref:o,sideOffset:t,className:g("Za-50 min-Za-[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})}));jt.displayName=V.Content.displayName;var mt=qe.forwardRef(({className:e,inset:t,...a},o)=>(0,Za.jsx)(V.Item,{ref:o,className:g("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...a}));mt.displayName=V.Item.displayName;var lr=qe.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,Za.jsxs)(V.CheckboxItem,{ref:s,className:g("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,Za.jsx)("span",{className:"absolute left-2 flex Za-3.5 Za-3.5 items-center justify-center",children:(0,Za.jsx)(V.ItemIndicator,{children:(0,Za.jsx)(yt.CheckIcon,{className:"Za-4 Za-4"})})}),t]}));lr.displayName=V.CheckboxItem.displayName;var dr=qe.forwardRef(({className:e,children:t,...a},o)=>(0,Za.jsxs)(V.RadioItem,{ref:o,className:g("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,Za.jsx)("span",{className:"absolute left-2 flex Za-3.5 Za-3.5 items-center justify-center",children:(0,Za.jsx)(V.ItemIndicator,{children:(0,Za.jsx)(yt.DotFilledIcon,{className:"Za-4 Za-4 fill-current"})})}),t]}));dr.displayName=V.RadioItem.displayName;var cr=qe.forwardRef(({className:e,inset:t,...a},o)=>(0,Za.jsx)(V.Label,{ref:o,className:g("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));cr.displayName=V.Label.displayName;var mr=qe.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(V.Separator,{ref:a,className:g("-mx-1 my-1 Za-px bg-muted",e),...t}));mr.displayName=V.Separator.displayName;var pr=({className:e,...t})=>(0,Za.jsx)("span",{className:g("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,Za.jsxs)(fa.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,Za.jsx)("div",{className:"hidden lg:block",children:(0,Za.jsx)(wo,{value:e,onValueChange:t,children:(0,Za.jsx)(No,{className:"grid Za-full rounded-2xl p-0 Za-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Za.jsx)(Co,{value:r.value,className:"Za-full Za-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,Za.jsx)("div",{className:"lg:hidden",children:(0,Za.jsxs)(na,{children:[(0,Za.jsx)(la,{asChild:!0,children:(0,Za.jsxs)(y,{variant:"outline",className:"rounded-2xl min-Za-[140px] justify-between",children:[n?.label||"Select",(0,Za.jsx)(di.ChevronDown,{className:"Za-4 Za-4 ml-2"})]})}),(0,Za.jsx)(jt,{align:"center",className:"Za-[180px]",children:a.map(r=>(0,Za.jsx)(mt,{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:m=!0,tabOptions:l=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:C,actionIcon:u=(0,Za.jsx)(di.Bot,{className:"mr-2 Za-4 Za-4"}),actionText:D="Action",onNotificationRemove:v,onRemoveAll:k,logo:d="/headerlogo.png",appName:c="Nuvia",tagline:b="Collaboration Platform"}){let[B,Q]=(0,Ka.useState)(!1),[W,J]=(0,Ka.useState)(t),Z=W.filter(H=>!H.read).length,be=H=>{J(I=>I.filter(te=>te.id!==H)),v?.(H)},P=()=>{J(H=>H.filter(I=>I.read)),k?.()};return(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsxs)("header",{className:`sticky top-0 Za-10 flex Za-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Za.jsx)(di.Menu,{className:"Za-5 Za-5"})}),(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Za.jsx)(di.PanelLeft,{className:"Za-5 Za-5"})}),!s&&(0,Za.jsxs)(fa.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Za.jsx)("div",{className:"flex Za-10 Za-10 items-center justify-center",children:(0,Za.jsx)("img",{src:d,alt:"Logo",className:"Za-10 Za-10 object-contain"})}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h2",{className:"font-semibold text-sm",children:c}),(0,Za.jsx)("p",{className:"text-xs text-muted-foreground",children:b})]})]}),(0,Za.jsxs)("div",{className:"flex flex-1 items-center",children:[m&&(0,Za.jsx)(da,{activeTab:n,onTabChange:r,tabOptions:l}),(0,Za.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Za.jsx)(fa.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,Za.jsx)(fa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Za.jsxs)(y,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:C,children:[u,D]})})}),(0,Za.jsx)(xo,{}),(0,Za.jsx)(aa,{children:(0,Za.jsxs)(oa,{children:[(0,Za.jsx)(ia,{asChild:!0,children:(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Za.jsxs)(y,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>Q(!0),children:[(0,Za.jsx)(fa.motion.div,{animate:Z>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:Z>0?1/0:0,repeatDelay:3},children:(0,Za.jsx)(di.Bell,{className:"Za-5 Za-5"})}),Z>0&&(0,Za.jsx)(fa.motion.span,{className:"absolute -right-1 -top-1 flex Za-5 Za-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:Z})]})})}),(0,Za.jsx)(Mt,{children:"Notifications"})]})}),(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Za.jsxs)(Ge,{className:"Za-9 Za-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Za.jsx)(dt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Za.jsx)(_e,{})]})})]})]})]}),(0,Za.jsx)(yo,{notifications:W,open:B,onClose:()=>Q(!1),onNotificationRemove:be,onRemoveAll:P})]})}var ko=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Za.jsx)(di.User,{className:"Za-4 Za-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ro({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=ko[0],onBusinessUnitChange:i,onSearch:n,businessUnits:r=ko,activeTab:m,onTabChange:l,showTabs:C=!1,onActionClick:u,actionIcon:D,actionText:v="Action",onNotificationRemove:k,onRemoveAll:d,logo:c="/headerlogo.png",appName:b="Nuvia",tagline:B="Collaboration Platform",sidebarInitiallyClosed:Q=!1}){let[W,J]=(0,Ka.useState)(!Q),[Z,be]=(0,Ka.useState)(!1),[P,H]=(0,Ka.useState)(s),I=te=>{H(te),i?.(te)};return(0,Za.jsxs)("div",{className:"flex Za-full flex-col overflow-hidden rounded-xl bg-background Za-[]",children:[Z&&(0,Za.jsx)("div",{className:"fixed inset-0 Za-40 bg-black/50 md:hidden",onClick:()=>be(!1)}),(0,Za.jsx)("div",{className:"md:hidden",children:(0,Za.jsx)(Ra,{items:e,isOpen:Z,isMobile:!0,onClose:()=>be(!1),currentBusinessUnit:P,onBusinessUnitChange:I,onSearch:n,logo:c,appName:b,tagline:B})}),(0,Za.jsx)("div",{className:"hidden md:block",children:(0,Za.jsx)(Ra,{items:e,isOpen:W,isMobile:!1,currentBusinessUnit:P,onBusinessUnitChange:I,onSearch:n,logo:c,appName:b,tagline:B})}),(0,Za.jsxs)("div",{className:g("min-Za-screen fixed Za-full transition-all duration-300 ease-in-out",W?"md:pl-64":"md:pl-0"),children:[(0,Za.jsx)(So,{title:a,notifications:o,onToggleSidebar:()=>J(!W),onToggleMobileMenu:()=>be(!0),sidebarOpen:W,activeTab:m,onTabChange:l,showTabs:C,onActionClick:u,actionIcon:D,actionText:v,onNotificationRemove:k,onRemoveAll:d,logo:c,appName:b,tagline:B}),(0,Za.jsx)("main",{className:"flex-1 p-0 flex flex-col Za-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var ma=require("react-icons/fa");function Ae({title:e,description:t,badge:a,primaryAction:o,secondaryAction:s,gradient:i,children:n,className:r}){let[m,l]=Yt(`hero-section-minimized-${e.replace(/\s+/g,"-").toLowerCase()}`,!s&&!t),C=!s&&!t||m;return(0,Za.jsxs)(fa.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,Za.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[a&&(0,Za.jsx)(G,{className:"bg-white/20 text-white hover:bg-white/30 rounded-xl",children:a}),(0,Za.jsx)("h2",{className:"text-3xl font-bold m-0",children:e})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[C&&o&&(0,Za.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),(s||t)&&(0,Za.jsx)("button",{"aria-label":m?"Expand hero section":"Minimize hero section",className:"rounded-full bg-white/20 hover:bg-white/30 p-1 text-white transition-colors",onClick:()=>l(!m),style:{lineHeight:0},children:m?(0,Za.jsx)(ma.FaChevronDown,{size:22}):(0,Za.jsx)(ma.FaChevronUp,{size:22})})]})]}),!C&&(0,Za.jsxs)("div",{className:"flex flex-col gap-6 md:flex-row md:items-center md:justify-between",children:[(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsx)("p",{className:"max-Za-[600px] text-white/80",children:t}),(0,Za.jsxs)("div",{className:"flex flex-wrap gap-3",children:[o&&(0,Za.jsx)(y,{className:"rounded-2xl bg-white text-indigo-700 hover:bg-white/90",onClick:o.onClick,children:o.label}),s&&(0,Za.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,Za.jsx)("div",{className:"hidden lg:block",children:n})]})]})}var pt=oe(require("react"));var q=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("rounded-xl border bg-card text-card-foreground shadow",e),...t}));q.displayName="Card";var ne=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("flex flex-col space-y-1.5 p-6",e),...t}));ne.displayName="CardHeader";var le=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("font-semibold leading-none tracking-tight",e),...t}));le.displayName="CardTitle";var Lt=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("text-sm text-muted-foreground",e),...t}));Lt.displayName="CardDescription";var X=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("p-6 pt-0",e),...t}));X.displayName="CardContent";var Et=pt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("div",{ref:a,className:g("flex items-center p-6 pt-0",e),...t}));Et.displayName="CardFooter";var Ao=oe(require("react")),zt=oe(require("@radix-ui/react-progress"));var Ft=Ao.forwardRef(({className:e,value:t,...a},o)=>(0,Za.jsx)(zt.Root,{ref:o,className:g("relative Za-4 Za-full overflow-hidden rounded-full bg-secondary",e),...a,children:(0,Za.jsx)(zt.Indicator,{className:"Za-full Za-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Ft.displayName=zt.Root.displayName;function Ba({app:e,onOpen:t,onFavorite:a,showProgress:o=!1,className:s}){return(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:s,children:(0,Za.jsxs)(q,{className:"overflow-hidden rounded-3xl border-2 hover:border-primary/50 transition-all duration-300",children:[(0,Za.jsx)(ne,{className:"pb-2",children:(0,Za.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Za.jsx)("div",{className:"flex Za-12 Za-12 items-center justify-center rounded-2xl bg-muted",children:e.icon}),e.new?(0,Za.jsx)(G,{className:"rounded-xl bg-amber-500",children:"New"}):(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:"Za-8 Za-8 rounded-2xl",onClick:()=>a?.(e),children:(0,Za.jsx)(di.Star,{className:"Za-4 Za-4"})})]})}),(0,Za.jsxs)(X,{className:"pb-2",children:[(0,Za.jsx)(le,{className:"text-lg",children:e.name}),(0,Za.jsx)(Lt,{children:e.description}),o&&e.progress<100&&(0,Za.jsxs)("div",{className:"mt-2",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Za.jsx)("span",{children:"Installation"}),(0,Za.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Za.jsx)(Ft,{value:e.progress,className:"Za-2 mt-1 rounded-xl"})]})]}),(0,Za.jsx)(Et,{children:(0,Za.jsx)(y,{variant:"secondary",className:"Za-full rounded-2xl",onClick:()=>t?.(e),children:e.progress<100?"Continue Install":"Open"})})]})})}function Lo({files:e,onFileClick:t,onFileEdit:a,onFileDelete:o,showHeader:s=!0,className:i}){return(0,Za.jsxs)("div",{className:`rounded-3xl border overflow-hidden ${i||""}`,children:[s&&(0,Za.jsxs)("div",{className:"bg-muted/50 p-3 hidden md:grid md:grid-cols-10 text-sm font-medium",children:[(0,Za.jsx)("div",{className:"col-span-6",children:"Name"}),(0,Za.jsx)("div",{className:"col-span-2",children:"Size"}),(0,Za.jsx)("div",{className:"col-span-2",children:"Modified"})]}),(0,Za.jsx)("div",{className:"divide-y",children:e.map(n=>(0,Za.jsxs)(fa.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,Za.jsxs)("div",{className:"col-span-6 flex items-center gap-3 Za-full md:Za-auto",children:[(0,Za.jsx)("div",{className:"flex Za-10 Za-10 items-center justify-center rounded-2xl bg-muted"}),(0,Za.jsx)("div",{children:(0,Za.jsx)("p",{className:"font-medium",children:n.name})})]}),(0,Za.jsx)("div",{className:"col-span-2 text-sm md:text-base",children:n.filesize}),(0,Za.jsxs)("div",{className:"col-span-2 flex items-center justify-between Za-full md:Za-auto",children:[(0,Za.jsx)("span",{className:"text-sm md:text-base",children:typeof n.createdAt=="string"?n.createdAt:new Date(n.createdAt).toLocaleDateString()}),(0,Za.jsx)("div",{className:"flex gap-1",children:(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:"Za-8 Za-8 rounded-xl text-red-500 hover:text-red-600",onClick:r=>{r.stopPropagation(),o?.(n)},children:(0,Za.jsx)(di.Trash2,{className:"Za-4 Za-4"})})})]})]},n.name))})]})}function zo({project:e,onOpen:t,onShare:a,className:o}){return(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02,y:-5},whileTap:{scale:.98},className:o,children:(0,Za.jsxs)(q,{className:"overflow-hidden rounded-3xl border hover:border-primary/50 transition-all duration-300",children:[(0,Za.jsxs)(ne,{children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Za.jsx)(le,{children:e.name}),(0,Za.jsxs)(G,{variant:"outline",className:"rounded-xl",children:["Due ",e.dueDate]})]}),(0,Za.jsx)(Lt,{children:e.description})]}),(0,Za.jsxs)(X,{className:"space-y-4",children:[(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Za.jsx)("span",{children:"Progress"}),(0,Za.jsxs)("span",{children:[e.progress,"%"]})]}),(0,Za.jsx)(Ft,{value:e.progress,className:"Za-2 rounded-xl"})]}),(0,Za.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,Za.jsxs)("div",{className:"flex items-center",children:[(0,Za.jsx)(di.Users,{className:"mr-1 Za-4 Za-4"}),e.members," members"]}),(0,Za.jsxs)("div",{className:"flex items-center",children:[(0,Za.jsx)(di.FileText,{className:"mr-1 Za-4 Za-4"}),e.files," files"]})]})]}),(0,Za.jsxs)(Et,{className:"flex gap-2",children:[(0,Za.jsx)(y,{variant:"secondary",className:"flex-1 rounded-2xl",onClick:()=>t?.(e),children:"Open Project"}),(0,Za.jsx)(y,{variant:"outline",size:"icon",className:"rounded-2xl",onClick:()=>a?.(e),children:(0,Za.jsx)(di.Share2,{className:"Za-4 Za-4"})})]})]})})}var ja=[{name:"PixelMaster",icon:(0,Za.jsx)(di.ImageIcon,{className:"text-violet-500"}),description:"Advanced image editing and composition",category:"Creative",recent:!0,new:!1,progress:100},{name:"VectorPro",icon:(0,Za.jsx)(di.Brush,{className:"text-orange-500"}),description:"Professional vector graphics creation",category:"Creative",recent:!0,new:!1,progress:100},{name:"VideoStudio",icon:(0,Za.jsx)(di.Video,{className:"text-pink-500"}),description:"Cinematic video editing and production",category:"Video",recent:!0,new:!1,progress:100},{name:"MotionFX",icon:(0,Za.jsx)(di.Sparkles,{className:"text-blue-500"}),description:"Stunning visual effects and animations",category:"Video",recent:!1,new:!1,progress:100},{name:"PageCraft",icon:(0,Za.jsx)(di.Layers,{className:"text-red-500"}),description:"Professional page design and layout",category:"Creative",recent:!1,new:!1,progress:100},{name:"UXFlow",icon:(0,Za.jsx)(di.LayoutGrid,{className:"text-fuchsia-500"}),description:"Intuitive user experience design",category:"Design",recent:!1,new:!0,progress:85},{name:"PhotoLab",icon:(0,Za.jsx)(di.Camera,{className:"text-teal-500"}),description:"Advanced photo editing and organization",category:"Photography",recent:!1,new:!1,progress:100},{name:"DocMaster",icon:(0,Za.jsx)(di.FileText,{className:"text-red-600"}),description:"Document editing and management",category:"Document",recent:!1,new:!1,progress:100},{name:"WebCanvas",icon:(0,Za.jsx)(di.Code,{className:"text-emerald-500"}),description:"Web design and development",category:"Web",recent:!1,new:!0,progress:70},{name:"3DStudio",icon:(0,Za.jsx)(di.CuboidIcon,{className:"text-indigo-500"}),description:"3D modeling and rendering",category:"3D",recent:!1,new:!0,progress:60},{name:"FontForge",icon:(0,Za.jsx)(di.Type,{className:"text-amber-500"}),description:"Typography and font creation",category:"Typography",recent:!1,new:!1,progress:100},{name:"ColorPalette",icon:(0,Za.jsx)(di.Palette,{className:"text-purple-500"}),description:"Color scheme creation and management",category:"Design",recent:!1,new:!1,progress:100}],Fo=[{id:1,filename:"Brand Redesign.pxm",filesize:24.5,url:"https://example.com/brand-redesign.pxm",mimeType:"image/png",name:"Brand Redesign.pxm",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:2,filename:"Company Logo.vec",filesize:8.2,url:"https://example.com/company-logo.vec",mimeType:"image/svg+xml",name:"Company Logo.vec",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:3,filename:"Product Launch Video.vid",filesize:1.2,url:"https://example.com/product-launch-video.vid",mimeType:"video/mp4",name:"Product Launch Video.vid",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:4,filename:"UI Animation.mfx",filesize:345,url:"https://example.com/ui-animation.mfx",mimeType:"video/mp4",name:"UI Animation.mfx",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:5,filename:"Magazine Layout.pgc",filesize:42.8,url:"https://example.com/magazine-layout.pgc",mimeType:"image/png",name:"Magazine Layout.pgc",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:6,filename:"Mobile App Design.uxf",filesize:18.3,url:"https://example.com/mobile-app-design.uxf",mimeType:"image/png",name:"Mobile App Design.uxf",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1},{id:7,filename:"Product Photography.phl",filesize:156,url:"https://example.com/product-photography.phl",mimeType:"image/png",name:"Product Photography.phl",createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),project:1}];var Uo=[{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 $=oe(require("@radix-ui/react-select")),rt=oe(require("react")),Ut=$.Root;var Kt=$.Value,Nt=rt.forwardRef(({children:e,className:t,...a},o)=>(0,Za.jsxs)($.Trigger,{className:g("flex Za-10 Za-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,Za.jsx)($.Icon,{asChild:!0,children:(0,Za.jsx)(di.ChevronDown,{className:"Za-4 Za-4 opacity-50"})})]}));Nt.displayName=$.Trigger.displayName;var Ko=rt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)($.ScrollUpButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Za.jsx)(di.ChevronUp,{className:"Za-4 Za-4"})}));Ko.displayName=$.ScrollUpButton.displayName;var Ho=rt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)($.ScrollDownButton,{className:g("flex cursor-default items-center justify-center py-1",e),ref:a,...t,children:(0,Za.jsx)(di.ChevronDown,{className:"Za-4 Za-4"})}));Ho.displayName=$.ScrollDownButton.displayName;var Ct=rt.forwardRef(({children:e,className:t,position:a="popper",...o},s)=>(0,Za.jsx)($.Portal,{children:(0,Za.jsxs)($.Content,{className:g("relative Za-50 max-Za-96 min-Za-[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,Za.jsx)(Ko,{}),(0,Za.jsx)($.Viewport,{className:g("p-1",a==="popper"&&"Za-[var(--radix-select-trigger-height)] Za-full min-Za-[var(--radix-select-trigger-width)]"),children:e}),(0,Za.jsx)(Ho,{})]})}));Ct.displayName=$.Content.displayName;var ur=rt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)($.Label,{className:g("py-1.5 pl-8 pr-2 text-sm font-semibold",e),ref:a,...t}));ur.displayName=$.Label.displayName;var Oe=rt.forwardRef(({children:e,className:t,...a},o)=>(0,Za.jsxs)($.Item,{className:g("relative flex Za-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,Za.jsx)("span",{className:"absolute left-2 flex Za-3.5 Za-3.5 items-center justify-center",children:(0,Za.jsx)($.ItemIndicator,{children:(0,Za.jsx)(di.Check,{className:"Za-4 Za-4"})})}),(0,Za.jsx)($.ItemText,{children:e})]}));Oe.displayName=$.Item.displayName;var gr=rt.forwardRef(({className:e,...t},a)=>(0,Za.jsx)($.Separator,{className:g("-mx-1 my-1 Za-px bg-muted",e),ref:a,...t}));gr.displayName=$.Separator.displayName;function pa({colleague:e,onEdit:t,onDelete:a,onViewDetails:o,showActions:s=!0,compact:i=!1,className:n}){let[r,m]=(0,Ka.useState)(!1),l=D=>{switch(D){case"active":return"bg-green-500";case"inactive":return"bg-gray-500";default:return"bg-gray-500"}},C=D=>{switch(D){case"active":return"Active";case"inactive":return"Inactive";default:return"Unknown"}},u=D=>{if(!D)return"Never";let k=Math.floor((new Date().getTime()-D.getTime())/(1e3*60));return k<1?"Just now":k<60?`${k}m ago`:k<1440?`${Math.floor(k/60)}Za ago`:`${Math.floor(k/1440)}d ago`};return(0,Za.jsxs)(q,{className:g("hover:shadow-md transition-shadow",i&&"p-2",n),children:[(0,Za.jsx)(ne,{className:g("pb-3",i&&"pb-2"),children:(0,Za.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsx)("div",{className:"relative",children:(0,Za.jsxs)(Ge,{className:g("Za-12 Za-12",i&&"Za-8 Za-8"),children:[(0,Za.jsx)(dt,{src:"/placeholder.svg",alt:e.name}),(0,Za.jsx)(_e,{children:e.name.split(" ").map(D=>D[0]).join("")})]})}),(0,Za.jsxs)("div",{className:"flex-1 min-Za-0",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Za.jsx)("h3",{className:g("font-semibold text-sm truncate",i&&"text-xs"),children:e.name}),e.type==="digital"?(0,Za.jsx)(di.Bot,{className:g("Za-4 Za-4 text-blue-500",i&&"Za-3 Za-3")}):(0,Za.jsx)(di.User,{className:g("Za-4 Za-4 text-green-500",i&&"Za-3 Za-3")})]}),(0,Za.jsx)("p",{className:g("text-sm text-muted-foreground truncate",i&&"text-xs"),children:e.type==="human"?e.role:e.description}),!i&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 mt-1",children:[e.type==="human"&&(0,Za.jsx)(G,{variant:"secondary",className:"text-xs",children:e.department}),e.type==="digital"&&(0,Za.jsxs)(G,{variant:"secondary",className:"text-xs",children:["v",e.version]}),(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:C(e.status)})]})]})]}),s&&(0,Za.jsxs)(na,{children:[(0,Za.jsx)(la,{asChild:!0,children:(0,Za.jsx)(y,{variant:"ghost",size:"icon",className:g("Za-8 Za-8",i&&"Za-6 Za-6"),children:(0,Za.jsx)(di.MoreHorizontal,{className:g("Za-4 Za-4",i&&"Za-3 Za-3")})})}),(0,Za.jsxs)(jt,{align:"end",children:[e.type==="digital"&&(0,Za.jsxs)(Za.Fragment,{children:[(0,Za.jsxs)(mt,{onClick:()=>o?.(e),children:[(0,Za.jsx)(di.Settings,{className:"Za-4 Za-4 mr-2"}),"View Details"]}),(0,Za.jsxs)(mt,{onClick:()=>t?.(e),children:[(0,Za.jsx)(di.Edit,{className:"Za-4 Za-4 mr-2"}),"Edit"]})]}),(0,Za.jsxs)(mt,{onClick:()=>a?.(e.id),className:"text-destructive focus:text-destructive",children:[(0,Za.jsx)(di.Trash2,{className:"Za-4 Za-4 mr-2"}),e.type==="digital"?"Delete":"Remove from team"]})]})]})]})}),!i&&(0,Za.jsxs)(X,{className:"pt-0",children:[(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[e.type==="human"&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.Mail,{className:"Za-3 Za-3"}),(0,Za.jsx)("span",{className:"truncate",children:e.email})]}),e.type==="human"&&(0,Za.jsxs)(Za.Fragment,{children:[e.phone&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.Phone,{className:"Za-3 Za-3"}),(0,Za.jsx)("span",{children:e.phone})]}),e.location&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.MapPin,{className:"Za-3 Za-3"}),(0,Za.jsx)("span",{children:e.location})]})]}),e.type==="digital"&&(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.Settings,{className:"Za-3 Za-3"}),(0,Za.jsxs)("span",{children:["v",e.version]})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 text-muted-foreground",children:[(0,Za.jsx)(di.Clock,{className:"Za-3 Za-3"}),(0,Za.jsxs)("span",{children:["Last active: ",u(e.lastActive)]})]})]}),e.type==="human"&&e.skills&&(0,Za.jsx)("div",{className:"mt-3",children:(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.skills.slice(0,r?e.skills.length:3).map(D=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:D},D)),e.skills.length>3&&(0,Za.jsx)(y,{variant:"ghost",size:"sm",className:"Za-5 px-2 text-xs",onClick:()=>m(!r),children:r?"Show less":`+${e.skills.length-3} more`})]})}),e.type==="digital"&&(0,Za.jsx)("div",{className:"mt-3",children:(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1",children:[e.capabilities.slice(0,r?e.capabilities.length:2).map(D=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:D},D)),e.capabilities.length>2&&(0,Za.jsx)(y,{variant:"ghost",size:"sm",className:"Za-5 px-2 text-xs",onClick:()=>m(!r),children:r?"Show less":`+${e.capabilities.length-2} more`})]})})]})]})}var Vo=oe(require("react")),La=oe(require("@radix-ui/react-label"));var fr=(0,$o.cva)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Je=Vo.forwardRef(({className:e,...t},a)=>(0,Za.jsx)(La.Root,{ref:a,className:g(fr(),e),...t}));Je.displayName=La.Root.displayName;var Go=oe(require("react")),st=Go.forwardRef(({className:e,...t},a)=>(0,Za.jsx)("textarea",{className:g("flex min-Za-[80px] Za-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}));st.displayName="Textarea";function Ea({selectedDocuments:e,onDocumentsChange:t,availableDocuments:a,label:o,placeholder:s="Search knowledge documents...",maxSelections:i,disabled:n=!1}){let[r,m]=(0,Ka.useState)(""),[l,C]=(0,Ka.useState)([]),[u,D]=(0,Ka.useState)(!1);(0,Ka.useEffect)(()=>{if(!r.trim()){C([]),D(!1);return}let c=a.filter(b=>{if(e.map(W=>W.id).includes(b.id))return!1;let Q=r.toLowerCase();return b.title.toLowerCase().includes(Q)||b.description?.toLowerCase().includes(Q)||b.tags?.some(W=>W.toLowerCase().includes(Q))||Object.values(b.metadata||{}).some(W=>String(W).toLowerCase().includes(Q))});C(c),D(!0)},[r,e,a]);let v=c=>{i&&e.length>=i||(t([...e,c]),m(""),D(!1))},k=c=>{t(e.filter(b=>b.id!==c))},d=!i||e.length<i;return(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{children:o}),(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{value:r,onChange:c=>m(c.target.value),placeholder:d?s:`Maximum ${i} documents selected`,className:"pl-9",disabled:n||!d,onFocus:()=>r&&D(!0)})]}),u&&l.length>0&&(0,Za.jsx)(q,{className:"absolute top-full left-0 right-0 Za-10 mt-1 max-Za-60",children:(0,Za.jsx)(Ue,{className:"Za-full",children:(0,Za.jsx)(X,{className:"p-2",children:l.map(c=>(0,Za.jsx)(y,{variant:"ghost",className:"Za-full justify-start Za-auto p-3 mb-1",onClick:()=>v(c),disabled:n,children:(0,Za.jsxs)("div",{className:"flex items-start gap-3 Za-full",children:[(0,Za.jsx)(di.FileText,{className:"Za-4 Za-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,Za.jsxs)("div",{className:"text-left flex-1 min-Za-0",children:[(0,Za.jsx)("div",{className:"font-medium text-sm truncate",children:c.title}),c.description&&(0,Za.jsx)("div",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:c.description}),c.tags&&c.tags.length>0&&(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1 mt-2",children:[c.tags.slice(0,3).map(b=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:b},b)),c.tags.length>3&&(0,Za.jsxs)(G,{variant:"outline",className:"text-xs",children:["+",c.tags.length-3," more"]})]})]})]})},c.id))})})}),u&&r&&l.length===0&&(0,Za.jsx)(q,{className:"absolute top-full left-0 right-0 Za-10 mt-1",children:(0,Za.jsxs)(X,{className:"p-4 text-center text-sm text-muted-foreground",children:['No knowledge documents found for "',r,'"']})})]}),e.length>0&&(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsxs)("div",{className:"text-sm text-muted-foreground",children:["Selected (",e.length,i&&`/${i}`,")"]}),(0,Za.jsx)("div",{className:"space-y-2",children:e.map(c=>(0,Za.jsx)(q,{className:"p-3",children:(0,Za.jsxs)("div",{className:"flex items-start gap-3",children:[(0,Za.jsx)(di.FileText,{className:"Za-4 Za-4 mt-0.5 text-muted-foreground flex-shrink-0"}),(0,Za.jsxs)("div",{className:"flex-1 min-Za-0",children:[(0,Za.jsx)("div",{className:"font-medium text-sm",children:c.title}),c.description&&(0,Za.jsx)("div",{className:"text-xs text-muted-foreground mt-1",children:c.description}),c.tags&&c.tags.length>0&&(0,Za.jsx)("div",{className:"flex flex-wrap gap-1 mt-2",children:c.tags.map(b=>(0,Za.jsxs)(G,{variant:"outline",className:"text-xs",children:[(0,Za.jsx)(di.Tag,{className:"Za-3 Za-3 mr-1"}),b]},b))})]}),(0,Za.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"Za-6 Za-6 flex-shrink-0",onClick:()=>k(c.id),disabled:n,children:(0,Za.jsx)(di.X,{className:"Za-3 Za-3"})})]})},c.id))})]}),u&&(0,Za.jsx)("div",{className:"fixed inset-0 Za-0",onClick:()=>D(!1)})]})}function za({colleague:e,onSave:t,onCancel:a,isLoading:o=!1,title:s,submitLabel:i,cancelLabel:n="Cancel",readOnly:r=!1,availableKnowledgeDocuments:m=[]}){let[l,C]=(0,Ka.useState)({type:"digital",name:"",description:"",jobDescription:"",workInstructions:"",capabilities:[],knowledge:[],coreKnowledge:[],version:"1",...e}),[u,D]=(0,Ka.useState)(""),[v,k]=(0,Ka.useState)(""),[d,c]=(0,Ka.useState)(!r);(0,Ka.useEffect)(()=>{e&&C(e)},[e]);let b=P=>{P.preventDefault();let H=l.version?parseInt(l.version):0,I=e?(H+1).toString():"1",te={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:I,lastUpdated:l.lastUpdated||new Date,isActive:!0};t(te)},B=(P,H,I)=>{if(!H.trim())return;let te=l[P]||[];C({...l,[P]:[...te,H.trim()]}),I("")},Q=(P,H)=>{let I=l[P]||[];C({...l,[P]:I.filter((te,x)=>x!==H)})},W=P=>{P.preventDefault(),c(!d)},J=(P,H,I,te,x)=>{let Fe=l[P]||[];return(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{children:H}),d&&(0,Za.jsxs)("div",{className:"flex gap-2",children:[(0,Za.jsx)(me,{value:I,onChange:f=>te(f.target.value),placeholder:x,onKeyPress:f=>{f.key==="Enter"&&(f.preventDefault(),B(P,I,te))},disabled:o}),(0,Za.jsx)(y,{type:"button",variant:"outline",size:"icon",onClick:()=>B(P,I,te),disabled:o,children:(0,Za.jsx)(di.Plus,{className:"Za-4 Za-4"})})]}),(0,Za.jsx)("div",{className:"flex flex-wrap gap-2",children:Fe.map((f,Y)=>(0,Za.jsxs)(G,{className:"gap-1",children:[f,d&&(0,Za.jsx)(y,{type:"button",variant:"ghost",size:"icon",className:"Za-4 Za-4 p-0 hover:bg-accent hover:text-accent-foreground",onClick:()=>Q(P,Y),disabled:o,children:(0,Za.jsx)(di.X,{className:"Za-3 Za-3"})})]},`${P}-${Y}-${f}`))})]})},Z=s||(d?e?"Edit Colleague":"Add New Colleague":"View Colleague"),be=i||(e?"Update Colleague":"Add Colleague");return(0,Za.jsxs)(q,{className:"m-8 Za-full max-Za-4xl mx-auto",children:[(0,Za.jsx)(ne,{children:(0,Za.jsxs)(le,{className:"flex items-center gap-2",children:[(0,Za.jsx)(di.Bot,{className:"Za-5 Za-5"}),Z]})}),(0,Za.jsx)(X,{children:(0,Za.jsxs)("form",{onSubmit:b,className:"space-y-6",children:[(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{htmlFor:"name",children:"Name *"}),(0,Za.jsx)(me,{id:"name",value:l.name||"",onChange:P=>C({...l,name:P.target.value}),required:!0,disabled:o||!d})]}),(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{htmlFor:"description",children:"Description"}),(0,Za.jsx)(st,{id:"description",value:l.description||"",onChange:P=>C({...l,description:P.target.value}),rows:3,placeholder:"Brief description of this digital colleague...",disabled:o||!d})]})]}),(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsx)("h3",{className:"text-lg font-semibold",children:"Digital Colleague Details"}),(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{htmlFor:"jobDescription",children:"Job Description *"}),(0,Za.jsx)(st,{id:"jobDescription",value:l.jobDescription||"",onChange:P=>C({...l,jobDescription:P.target.value}),rows:4,required:l.type==="digital",disabled:o||!d})]}),(0,Za.jsxs)("div",{className:"space-y-2",children:[(0,Za.jsx)(Je,{htmlFor:"workInstructions",children:"Work Instructions"}),(0,Za.jsx)(st,{id:"workInstructions",value:l.workInstructions||"",onChange:P=>C({...l,workInstructions:P.target.value}),rows:4,placeholder:"Enter detailed work instructions for this digital colleague...",disabled:o||!d})]}),J("capabilities","Capabilities",v,k,"Add capability"),(0,Za.jsx)(Ea,{selectedDocuments:l.knowledge||[],onDocumentsChange:P=>C({...l,knowledge:P}),label:"Knowledge",placeholder:"Search for knowledge documents Ya add...",disabled:o||!d,availableDocuments:m}),(0,Za.jsx)(Ea,{selectedDocuments:l.coreKnowledge||[],onDocumentsChange:P=>C({...l,coreKnowledge:P}),label:"Core Knowledge",placeholder:"Search for core knowledge documents...",maxSelections:5,disabled:o||!d,availableDocuments:m})]}),(0,Za.jsxs)("div",{className:"flex justify-end gap-2 pt-4 border-t",children:[(0,Za.jsx)(y,{type:"button",variant:"outline",onClick:a,disabled:o,children:d?n:"Close"}),d?(0,Za.jsx)(y,{type:"submit",disabled:o,children:o?"Saving...":be}):(0,Za.jsxs)(y,{type:"button",onClick:W,disabled:o,className:"gap-2",children:[(0,Za.jsx)(di.Edit,{className:"Za-4 Za-4"}),"Edit"]})]})]})})]})}function qo({users:e,onUserSelect:t,onCancel:a,selectedUserId:o}){let[s,i]=(0,Ka.useState)(""),n=(0,Ka.useMemo)(()=>e.filter(m=>m.name.toLowerCase().includes(s.toLowerCase())||m.email.toLowerCase().includes(s.toLowerCase())||m.role.toLowerCase().includes(s.toLowerCase())||(m.skills||[]).some(C=>C.toLowerCase().includes(s.toLowerCase()))),[e,s]),r=m=>{t(m)};return(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Za.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Za.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.ChevronLeft,{className:"Za-4 Za-4"}),"Back"]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h1",{className:"text-3xl font-bold",children:"Select User"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Choose a user Ya add as a colleague"})]})]}),(0,Za.jsx)(q,{className:"container",children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsx)("div",{className:"flex flex-col md:flex-row gap-4",children:(0,Za.jsx)("div",{className:"flex-1",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{placeholder:"Search users by name, email, role, or skills...",value:s,onChange:m=>i(m.target.value),className:"pl-9"})]})})})})}),(0,Za.jsx)("div",{className:"container grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:n.map(m=>(0,Za.jsx)(fa.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Za.jsxs)(q,{className:`cursor-pointer transition-all hover:shadow-lg ${o===m.id?"ring-2 ring-primary":""}`,onClick:()=>r(m),children:[(0,Za.jsx)(ne,{className:"pb-3",children:(0,Za.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsxs)(Ge,{children:[(0,Za.jsx)(dt,{src:m.avatar,alt:m.name}),(0,Za.jsx)(_e,{children:(0,Za.jsx)(di.User,{className:"Za-4 Za-4"})})]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)(le,{className:"text-lg",children:m.name}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:m.role})]})]}),o===m.id&&(0,Za.jsx)(di.Check,{className:"Za-5 Za-5 text-primary"})]})}),(0,Za.jsx)(X,{className:"pt-0",children:(0,Za.jsxs)("div",{className:"space-y-3",children:[(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Email"}),(0,Za.jsx)("p",{className:"text-sm font-medium",children:m.email})]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Department"}),(0,Za.jsx)(G,{variant:"secondary",children:m.department})]}),m.location&&(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Location"}),(0,Za.jsx)("p",{className:"text-sm",children:m.location})]}),m.skills&&m.skills.length>0&&(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Skills"}),(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1",children:[m.skills.slice(0,3).map(l=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:l},l)),m.skills.length>3&&(0,Za.jsxs)(G,{variant:"outline",className:"text-xs",children:["+",m.skills.length-3]})]})]})]})})]})},m.id))}),n.length===0&&(0,Za.jsx)(q,{className:"container mt-4",children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"text-center py-8",children:[(0,Za.jsx)(di.User,{className:"Za-12 Za-12 text-muted-foreground mx-auto mb-4"}),(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No users found"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"user-selection")})})}function Jo({digitalColleagues:e,onColleagueClone:t,onCancel:a,selectedColleagueId:o}){let[s,i]=(0,Ka.useState)(""),[n,r]=(0,Ka.useState)("all"),m=(0,Ka.useMemo)(()=>e.filter(u=>{let D=u.name.toLowerCase().includes(s.toLowerCase())||u.jobDescription.toLowerCase().includes(s.toLowerCase())||u.capabilities.some(k=>k.toLowerCase().includes(s.toLowerCase()))||u.workInstructions.toLowerCase().includes(s.toLowerCase()),v=n==="all"||u.status===n;return D&&v}),[e,s,n]),l=u=>{let D={...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(D)},C=u=>new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(u);return(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Za.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Za.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.ChevronLeft,{className:"Za-4 Za-4"}),"Back"]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h1",{className:"text-3xl font-bold",children:"Clone Digital Colleague"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Select a digital colleague Ya clone"})]})]}),(0,Za.jsx)(q,{children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Za.jsx)("div",{className:"flex-1",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{placeholder:"Search by name, job description, or capabilities...",value:s,onChange:u=>i(u.target.value),className:"pl-9"})]})}),(0,Za.jsxs)("select",{value:n,onChange:u=>r(u.target.value),className:"Za-10 px-3 rounded-md border border-input bg-background text-sm ring-offset-background",children:[(0,Za.jsx)("option",{value:"all",children:"All Status"}),(0,Za.jsx)("option",{value:"active",children:"Active"}),(0,Za.jsx)("option",{value:"inactive",children:"Inactive"})]})]})})}),(0,Za.jsx)("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:m.map(u=>(0,Za.jsx)(fa.motion.div,{layout:!0,initial:{opacity:0,scale:.9},animate:{opacity:1,scale:1},transition:{duration:.2},children:(0,Za.jsxs)(q,{className:`cursor-pointer transition-all hover:shadow-lg ${o===u.id?"ring-2 ring-primary":""}`,onClick:()=>l(u),children:[(0,Za.jsx)(ne,{className:"pb-3",children:(0,Za.jsxs)("div",{className:"flex items-start justify-between",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsx)(Ge,{children:(0,Za.jsx)(_e,{className:"bg-blue-100",children:(0,Za.jsx)(di.Bot,{className:"Za-4 Za-4 text-blue-600"})})}),(0,Za.jsxs)("div",{children:[(0,Za.jsxs)(le,{className:"text-lg flex items-center gap-2",children:[u.name,(0,Za.jsx)(G,{variant:u.status==="active"?"default":"secondary",className:"text-xs",children:u.status})]}),(0,Za.jsxs)("p",{className:"text-sm text-muted-foreground",children:["v",u.version]})]})]}),(0,Za.jsxs)(y,{size:"sm",variant:"outline",className:"gap-2 Za-8",onClick:D=>{D.stopPropagation(),l(u)},children:[(0,Za.jsx)(di.Copy,{className:"Za-3 Za-3"}),"Clone"]})]})}),(0,Za.jsx)(X,{className:"pt-0",children:(0,Za.jsxs)("div",{className:"space-y-3",children:[(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Job Description"}),(0,Za.jsx)("p",{className:"text-sm line-clamp-2",children:u.jobDescription})]}),u.capabilities&&u.capabilities.length>0&&(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:"Capabilities"}),(0,Za.jsxs)("div",{className:"flex flex-wrap gap-1",children:[u.capabilities.slice(0,3).map(D=>(0,Za.jsx)(G,{variant:"outline",className:"text-xs",children:D},D)),u.capabilities.length>3&&(0,Za.jsxs)(G,{variant:"outline",className:"text-xs",children:["+",u.capabilities.length-3]})]})]}),(0,Za.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Za.jsx)(di.Calendar,{className:"Za-3 Za-3"}),(0,Za.jsxs)("span",{children:["Updated ",C(u.lastUpdated)]})]}),u.knowledge&&(0,Za.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Za.jsx)(di.Users,{className:"Za-3 Za-3"}),(0,Za.jsxs)("span",{children:[u.knowledge.length," docs"]})]})]}),u.workInstructions&&(0,Za.jsxs)("div",{children:[(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Instructions"}),(0,Za.jsx)("p",{className:"text-xs line-clamp-2",children:u.workInstructions})]})]})})]})},u.id))}),m.length===0&&(0,Za.jsx)(q,{children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"text-center py-8",children:[(0,Za.jsx)(di.Bot,{className:"Za-12 Za-12 text-muted-foreground mx-auto mb-4"}),(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No digital colleagues found"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Try adjusting your search terms or filters."})]})})})]},"colleague-clone")})})}function Xo({onSelectHuman:e,onSelectDigital:t,onCancel:a}){return(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Za.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Za.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.ChevronLeft,{className:"Za-4 Za-4"}),"Back"]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h1",{className:"text-3xl font-bold",children:"Add Colleague"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Choose the type of colleague Ya add"})]})]}),(0,Za.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-Za-4xl mx-auto",children:[(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Za.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Za.jsxs)(ne,{className:"text-center pb-4",children:[(0,Za.jsx)("div",{className:"mx-auto Za-16 Za-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Za.jsx)(di.User,{className:"Za-8 Za-8 text-blue-600"})}),(0,Za.jsx)(le,{className:"text-xl",children:"Add Human Colleague"})]}),(0,Za.jsxs)(X,{className:"text-center",children:[(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:"Select from existing users in your organization Ya add as team members."}),(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Users,{className:"Za-4 Za-4 text-blue-600"}),(0,Za.jsx)("span",{children:"Browse existing users"})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.User,{className:"Za-4 Za-4 text-blue-600"}),(0,Za.jsx)("span",{children:"Import user details automatically"})]})]}),(0,Za.jsx)(y,{className:"mt-6 Za-full",onClick:e,children:"Select User"})]})]})}),(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Za.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Za.jsxs)(ne,{className:"text-center pb-4",children:[(0,Za.jsx)("div",{className:"mx-auto Za-16 Za-16 bg-purple-100 rounded-full flex items-center justify-center mb-4",children:(0,Za.jsx)(di.Bot,{className:"Za-8 Za-8 text-purple-600"})}),(0,Za.jsx)(le,{className:"text-xl",children:"Add Digital Colleague"})]}),(0,Za.jsxs)(X,{className:"text-center",children:[(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:"Clone an existing digital colleague or create a new AI assistant for your team."}),(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Bot,{className:"Za-4 Za-4 text-purple-600"}),(0,Za.jsx)("span",{children:"Clone existing colleagues"})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Users,{className:"Za-4 Za-4 text-purple-600"}),(0,Za.jsx)("span",{children:"Create from templates"})]})]}),(0,Za.jsx)(y,{className:"mt-6 Za-full",onClick:t,children:"Add Digital Colleague"})]})]})})]})]},"colleague-type-selection")})})}function Qo({onCloneExisting:e,onCreateNew:t,onCancel:a}){return(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-6",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:[(0,Za.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,Za.jsxs)(y,{variant:"ghost",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.ChevronLeft,{className:"Za-4 Za-4"}),"Back"]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("h1",{className:"text-3xl font-bold",children:"Add Digital Colleague"}),(0,Za.jsx)("p",{className:"text-muted-foreground",children:"Choose how Ya create your digital colleague"})]})]}),(0,Za.jsxs)("div",{className:"grid gap-6 md:grid-cols-2 max-Za-4xl mx-auto",children:[(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Za.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:e,children:[(0,Za.jsxs)(ne,{className:"text-center pb-4",children:[(0,Za.jsx)("div",{className:"mx-auto Za-16 Za-16 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,Za.jsx)(di.Copy,{className:"Za-8 Za-8 text-blue-600"})}),(0,Za.jsx)(le,{className:"text-xl",children:"Clone Existing"})]}),(0,Za.jsxs)(X,{className:"text-center",children:[(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:"Start with an existing digital colleague and customize di for your needs."}),(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Bot,{className:"Za-4 Za-4 text-blue-600"}),(0,Za.jsx)("span",{children:"Pre-configured capabilities"})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Copy,{className:"Za-4 Za-4 text-blue-600"}),(0,Za.jsx)("span",{children:"Inherit knowledge base"})]})]}),(0,Za.jsx)(y,{className:"mt-6 Za-full",onClick:e,children:"Browse & Clone"})]})]})}),(0,Za.jsx)(fa.motion.div,{whileHover:{scale:1.02},whileTap:{scale:.98},transition:{type:"spring",stiffness:300,damping:20},children:(0,Za.jsxs)(q,{className:"cursor-pointer transition-all hover:shadow-lg border-2 hover:border-primary/50",onClick:t,children:[(0,Za.jsxs)(ne,{className:"text-center pb-4",children:[(0,Za.jsx)("div",{className:"mx-auto Za-16 Za-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:(0,Za.jsx)(di.Sparkles,{className:"Za-8 Za-8 text-green-600"})}),(0,Za.jsx)(le,{className:"text-xl",children:"Create New"})]}),(0,Za.jsxs)(X,{className:"text-center",children:[(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:"Build a completely new digital colleague from scratch with custom specifications."}),(0,Za.jsxs)("div",{className:"space-y-2 text-sm",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Plus,{className:"Za-4 Za-4 text-green-600"}),(0,Za.jsx)("span",{children:"Custom job description"})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2 justify-center",children:[(0,Za.jsx)(di.Sparkles,{className:"Za-4 Za-4 text-green-600"}),(0,Za.jsx)("span",{children:"Define unique capabilities"})]})]}),(0,Za.jsx)(y,{className:"mt-6 Za-full",onClick:t,children:"Create from Scratch"})]})]})})]})]},"digital-colleague-options")})})}function Fa({initialColleagues:e,onColleagueAdd:t,onColleagueEdit:a,onColleagueDelete:o,compactView:s=!1,departments:i=["Design","Engineering","Marketing","Product","Sales","Operations"],className:n,availableUsers:r=[],existingDigitalColleagues:m=[]}){let[l,C]=(0,Ka.useState)(e||[]),[u,D]=(0,Ka.useState)(""),[v,k]=(0,Ka.useState)("all"),[d,c]=(0,Ka.useState)("all"),[b,B]=(0,Ka.useState)("all"),[Q,W]=(0,Ka.useState)(null),[J,Z]=(0,Ka.useState)(null);(0,Ka.useEffect)(()=>{C(e||[])},[e]);let be=Array.isArray(r)?r:[],P=Array.isArray(m)?m:[],[H,I]=(0,Ka.useState)("main"),te=l.filter(p=>{if(!p||!p.name)return!1;let ye=p.name.toLowerCase().includes(u.toLowerCase())||p.type==="human"&&(p.email?.toLowerCase().includes(u.toLowerCase())||p.role?.toLowerCase().includes(u.toLowerCase()))||p.type==="digital"&&p.jobDescription?.toLowerCase().includes(u.toLowerCase()),ae=v==="all"||p.type==="human"&&p.department===v,ha=d==="all"||p.status===d;return ye&&ae&&ha}),x=te.filter(p=>p.type==="human"),Fe=te.filter(p=>p.type==="digital"),f=()=>{I("typeSelection")},Y=p=>{p.type==="digital"&&(W(p),I("form")),console.log("Editing colleague:",p),a?.(p)},ee=p=>{p.type==="digital"&&(Z(p),I("view"))},Me=p=>{let ye={id:`human-${Date.now()}`,type:"human",name:p.name,email:p.email,role:p.role,department:p.department,phone:p.phone,location:p.location,timezone:p.timezone,skills:p.skills||[],bio:p.bio,status:"active",joinedDate:new Date,lastActive:new Date};C(ae=>[...ae,ye]),t?.(ye),I("main")},Ce=p=>{if(!p||!p.id){console.error("Invalid cloned colleague provided Ya handleDigitalColleagueClone:",p);return}C(ye=>[...ye,p]),t?.(p),I("main")},lt=()=>{W(null),I("form")},Pt=p=>{if(!p||!p.id){console.error("Invalid colleague provided Ya handleSaveColleague:",p);return}Q?(C(ye=>ye.map(ae=>ae.id===p.id?p:ae)),a?.(p)):(C(ye=>[...ye,p]),t?.(p)),I("main"),W(null)},Be=()=>{I("main"),W(null),Z(null)},mi=()=>{I("main"),Z(null)},xr=()=>{J&&(W(J),Z(null),I("form"))},va=p=>{o?.(p,l.find(ye=>ye.id===p).type),C(ye=>ye.filter(ae=>ae.id!==p))},pi=()=>{D(""),k("all"),c("all")},Ha=()=>{let p=[];return P.forEach(ae=>{ae.knowledge&&Array.isArray(ae.knowledge)&&p.push(...ae.knowledge),ae.coreKnowledge&&Array.isArray(ae.coreKnowledge)&&p.push(...ae.coreKnowledge)}),l.forEach(ae=>{ae.type==="digital"&&(ae.knowledge&&Array.isArray(ae.knowledge)&&p.push(...ae.knowledge),ae.coreKnowledge&&Array.isArray(ae.coreKnowledge)&&p.push(...ae.coreKnowledge))}),p.filter((ae,ha,ui)=>ha===ui.findIndex(gi=>gi.id===ae.id))};return H==="typeSelection"?(0,Za.jsx)(Xo,{onSelectHuman:()=>I("userSelection"),onSelectDigital:()=>I("digitalOptions"),onCancel:()=>I("main")}):H==="userSelection"?(0,Za.jsx)(qo,{users:be,onUserSelect:Me,onCancel:()=>I("typeSelection")}):H==="digitalOptions"?(0,Za.jsx)(Qo,{onCloneExisting:()=>I("digitalClone"),onCreateNew:lt,onCancel:()=>I("typeSelection")}):H==="digitalClone"?(0,Za.jsx)(Jo,{digitalColleagues:P,onColleagueClone:Ce,onCancel:()=>I("digitalOptions")}):H==="form"?(0,Za.jsx)(za,{colleague:Q||void 0,onSave:Pt,onCancel:Be,availableKnowledgeDocuments:Ha()}):H==="view"?(0,Za.jsx)(za,{colleague:J||void 0,onSave:Pt,onCancel:mi,readOnly:!0,availableKnowledgeDocuments:Ha()}):(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsx)(fa.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Za.jsxs)("div",{className:`space-y-6 ${n||""}`,children:[(0,Za.jsx)(Ae,{title:"Colleagues",description:"Manage your team members and digital colleagues.",gradient:"bg-gradient-Ya-r from-green-600 via-emerald-600 Ya-teal-600",primaryAction:{label:"Add colleague",onClick:f}}),(0,Za.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[(0,Za.jsxs)(q,{children:[(0,Za.jsxs)(ne,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Za.jsx)(le,{className:"text-sm font-medium",children:"Total Colleagues"}),(0,Za.jsx)(di.Users,{className:"Za-4 Za-4 text-muted-foreground"})]}),(0,Za.jsxs)(X,{children:[(0,Za.jsx)("div",{className:"text-2xl font-bold",children:l.length}),(0,Za.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(p=>p.status==="active").length," active"]})]})]}),(0,Za.jsxs)(q,{children:[(0,Za.jsxs)(ne,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Za.jsx)(le,{className:"text-sm font-medium",children:"Human Members"}),(0,Za.jsx)(di.User,{className:"Za-4 Za-4 text-muted-foreground"})]}),(0,Za.jsxs)(X,{children:[(0,Za.jsx)("div",{className:"text-2xl font-bold",children:l.filter(p=>p.type==="human").length}),(0,Za.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(p=>p.type==="human"&&p.status==="active").length," ","active"]})]})]}),(0,Za.jsxs)(q,{children:[(0,Za.jsxs)(ne,{className:"flex flex-row items-center justify-between space-y-0 pb-2",children:[(0,Za.jsx)(le,{className:"text-sm font-medium",children:"Digital Colleagues"}),(0,Za.jsx)(di.Bot,{className:"Za-4 Za-4 text-muted-foreground"})]}),(0,Za.jsxs)(X,{children:[(0,Za.jsx)("div",{className:"text-2xl font-bold",children:l.filter(p=>p.type==="digital").length}),(0,Za.jsxs)("p",{className:"text-xs text-muted-foreground",children:[l.filter(p=>p.type==="digital"&&p.status==="active").length," ","active"]})]})]})]}),(0,Za.jsx)(q,{children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"flex flex-col md:flex-row gap-4",children:[(0,Za.jsx)("div",{className:"flex-1",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)(di.Search,{className:"absolute left-3 top-3 Za-4 Za-4 text-muted-foreground"}),(0,Za.jsx)(me,{placeholder:"Search colleagues...",value:u,onChange:p=>D(p.target.value),className:"pl-9"})]})}),(0,Za.jsxs)(Ut,{value:v,onValueChange:k,children:[(0,Za.jsx)(Nt,{className:"Za-full md:Za-[180px]",children:(0,Za.jsx)(Kt,{placeholder:"Department"})}),(0,Za.jsxs)(Ct,{children:[(0,Za.jsx)(Oe,{value:"all",children:"All Departments"}),i.map(p=>(0,Za.jsx)(Oe,{value:p,children:p},p))]})]}),(0,Za.jsxs)(Ut,{value:d,onValueChange:c,children:[(0,Za.jsx)(Nt,{className:"Za-full md:Za-[140px]",children:(0,Za.jsx)(Kt,{placeholder:"Status"})}),(0,Za.jsxs)(Ct,{children:[(0,Za.jsx)(Oe,{value:"all",children:"All Status"}),(0,Za.jsx)(Oe,{value:"active",children:"Active"}),(0,Za.jsx)(Oe,{value:"inactive",children:"Inactive"})]})]}),(u||v!=="all"||d!=="all")&&(0,Za.jsxs)(y,{variant:"outline",onClick:pi,className:"gap-2",children:[(0,Za.jsx)(di.Filter,{className:"Za-4 Za-4"}),"Clear"]})]})})}),(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsx)(da,{activeTab:b,onTabChange:B,tabOptions:[{value:"all",label:`All (${te.length})`},{value:"human",label:`Human (${x.length})`},{value:"digital",label:`Digital (${Fe.length})`}],maxWidth:"400px",gridCols:3}),b==="all"&&(0,Za.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:te.map(p=>(0,Za.jsx)(pa,{colleague:p,onEdit:Y,onDelete:va,onViewDetails:ee,compact:s},`${p}-${p.id}`))}),b==="human"&&(0,Za.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:x.map(p=>(0,Za.jsx)(pa,{colleague:p,onEdit:Y,onDelete:va,onViewDetails:ee,compact:s},p.id))}),b==="digital"&&(0,Za.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:Fe.map(p=>(0,Za.jsx)(pa,{colleague:p,onEdit:Y,onDelete:va,onViewDetails:ee,compact:s},p.id))})]}),te.length===0&&(0,Za.jsx)(q,{children:(0,Za.jsx)(X,{className:"pt-6",children:(0,Za.jsxs)("div",{className:"text-center py-8",children:[(0,Za.jsx)(di.Users,{className:"Za-12 Za-12 text-muted-foreground mx-auto mb-4"}),(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"No colleagues found"}),(0,Za.jsx)("p",{className:"text-muted-foreground mb-4",children:u||v!=="all"||d!=="all"?"Try adjusting your filters Ya see more results.":"Get started by adding your first colleague."}),(0,Za.jsxs)(y,{onClick:f,className:"gap-2",children:[(0,Za.jsx)(di.Plus,{className:"Za-4 Za-4"}),"Add Colleague"]})]})})})]})},"projects-index-view")})})}function ei({document:e,onSave:t,onCancel:a,availableDocuments:o=[],knowledgeContexts:s=[]}){let[i,n]=(0,Ka.useState)({...e,updatedAt:new Date}),r=()=>{let d=new Set,c=new Set;return s.forEach(b=>{b.menuConfig.groupBy.forEach(B=>d.add(B))}),o.forEach(b=>{b.metadata&&Object.keys(b.metadata).forEach(B=>c.add(B))}),{contextKeys:Array.from(d).sort(),documentKeys:Array.from(c).sort(),allKeys:Array.from(new Set([...d,...c])).sort()}},m=d=>{let c=new Set;return o.forEach(b=>{b.metadata?.[d]&&c.add(String(b.metadata[d]))}),Array.from(c).sort()},l=r(),C=()=>{t(i)},u=(d,c)=>{n(b=>({...b,metadata:{...b.metadata,[d]:c}}))},D=(d,c)=>{c==="__custom__"?u(d,""):u(d,c)},v=()=>{let d=`field_${Date.now()}`;u(d,"")},k=d=>{n(c=>{let b={...c.metadata};return delete b[d],{...c,metadata:b}})};return(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"Za-full flex flex-col",children:[(0,Za.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Za.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-6",children:[(0,Za.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Za.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-primary/10 border border-primary/20",children:(0,Za.jsx)(di.Edit3,{className:"Za-6 Za-6 text-primary"})}),(0,Za.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Edit Document"})]}),(0,Za.jsxs)("div",{className:"flex gap-2",children:[(0,Za.jsxs)(y,{variant:"outline",size:"sm",onClick:a,className:"gap-2",children:[(0,Za.jsx)(di.X,{className:"Za-4 Za-4"}),"Cancel"]}),(0,Za.jsxs)(y,{size:"sm",onClick:C,className:"gap-2",children:[(0,Za.jsx)(di.Save,{className:"Za-4 Za-4"}),"Save Changes"]})]})]}),(0,Za.jsxs)("div",{className:"space-y-4",children:[(0,Za.jsxs)("div",{children:[(0,Za.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Title"}),(0,Za.jsx)(me,{value:i.title,onChange:d=>n(c=>({...c,title:d.target.value})),className:"text-lg font-semibold",placeholder:"Document title..."})]}),(0,Za.jsxs)("div",{children:[(0,Za.jsx)("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Description"}),(0,Za.jsx)(st,{value:i.description||"",onChange:d=>n(c=>({...c,description:d.target.value})),placeholder:"Document description...",rows:2})]}),(0,Za.jsxs)("div",{children:[(0,Za.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Za.jsxs)("div",{children:[(0,Za.jsx)("label",{className:"block text-sm font-medium text-foreground",children:"Metadata"}),l.contextKeys.length>0&&(0,Za.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Suggested: ",l.contextKeys.slice(0,4).join(", "),l.contextKeys.length>4&&` +${l.contextKeys.length-4}`]})]}),(0,Za.jsxs)(y,{type:"button",variant:"outline",size:"sm",onClick:v,className:"gap-1 Za-8",children:[(0,Za.jsx)(di.Plus,{className:"Za-3 Za-3"}),"Add"]})]}),i.metadata&&Object.keys(i.metadata).length>0?(0,Za.jsx)("div",{className:"space-y-2",children:Object.entries(i.metadata).map(([d,c])=>{let b=m(d);return(0,Za.jsxs)("div",{className:"flex gap-2 items-center",children:[(0,Za.jsx)(me,{value:d,onChange:B=>{let Q=B.target.value,W=i.metadata?.[d];n(J=>{let Z={...J.metadata};return delete Z[d],Q&&(Z[Q]=W||""),{...J,metadata:Z}})},placeholder:"Key",className:"Za-32 Za-8 text-sm",list:`metadata-keys-${d}`}),(0,Za.jsx)("datalist",{id:`metadata-keys-${d}`,children:l.allKeys.map(B=>(0,Za.jsx)("option",{value:B},B))}),(0,Za.jsx)("span",{className:"text-muted-foreground text-sm",children:"="}),b.length>0?(0,Za.jsxs)(Ut,{value:String(c||""),onValueChange:B=>D(d,B),children:[(0,Za.jsx)(Nt,{className:"flex-1 Za-8 text-sm",children:(0,Za.jsx)(Kt,{placeholder:"Value"})}),(0,Za.jsxs)(Ct,{children:[b.map(B=>(0,Za.jsx)(Oe,{value:B,children:B},B)),(0,Za.jsx)(Oe,{value:"__custom__",children:(0,Za.jsx)("span",{className:"text-muted-foreground text-xs",children:"Custom..."})})]})]}):(0,Za.jsx)(me,{value:String(c||""),onChange:B=>u(d,B.target.value),placeholder:"Value",className:"flex-1 Za-8 text-sm"}),(0,Za.jsx)(y,{type:"button",variant:"ghost",size:"sm",onClick:()=>k(d),className:"Za-8 Za-8 p-0 text-muted-foreground hover:text-destructive",children:(0,Za.jsx)(di.X,{className:"Za-3 Za-3"})})]},d)})}):(0,Za.jsx)("div",{className:"text-center py-3 border border-dashed border-border rounded-lg bg-muted/20",children:(0,Za.jsx)("p",{className:"text-xs text-muted-foreground",children:'No metadata \u2022 Click "Add" Ya create fields'})})]}),(0,Za.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Za.jsx)("span",{className:"text-sm font-medium text-foreground",children:"Format:"}),(0,Za.jsx)(G,{variant:"secondary",className:"font-mono",children:i.format.toUpperCase()})]})]})]}),(0,Za.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Za.jsxs)("div",{className:"p-8",children:[(0,Za.jsx)("label",{className:"block text-sm font-medium text-foreground mb-4",children:"Content"}),(0,Za.jsx)(st,{value:i.content||"",onChange:d=>n(c=>({...c,content:d.target.value})),placeholder:"Document content...",className:"min-Za-[400px] font-mono text-sm",style:{resize:"vertical"}})]})})]})}var ii=e=>(0,Za.jsx)("div",{className:"prose prose-slate dark:prose-invert max-Za-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>')}}),ti=e=>(0,Za.jsx)("div",{className:"whitespace-pre-wrap font-mono text-sm leading-relaxed",children:e}),vr=e=>(0,Za.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Za-none",children:[(0,Za.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,Za.jsxs)("p",{className:"text-amber-800 dark:text-amber-200 text-sm",children:[(0,Za.jsx)("strong",{children:"RichText Renderer:"})," This is a placeholder. Integrate with @payloadcms/richtext-lexical for full rendering."]})}),(0,Za.jsx)("pre",{className:"text-sm",children:e})]}),hr=e=>(0,Za.jsxs)("div",{className:"prose prose-slate dark:prose-invert max-Za-none",children:[(0,Za.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,Za.jsxs)("p",{className:"text-blue-800 dark:text-blue-200 text-sm",children:[(0,Za.jsx)("strong",{children:"MDX Renderer:"})," This is a placeholder. Integrate with @mdx-js/react for full MDX rendering."]})}),ii(e)]});function ri({document:e,onDocumentUpdate:t,editable:a=!0,renderers:o,availableDocuments:s=[],knowledgeContexts:i=[]}){let[n,r]=(0,Ka.useState)(!1),m=v=>{switch(v){case"markdown":case"mdx":return(0,Za.jsx)(di.FileText,{className:"Za-6 Za-6 text-primary"});case"richtext":return(0,Za.jsx)(di.File,{className:"Za-6 Za-6 text-success"});case"text":return(0,Za.jsx)(di.Type,{className:"Za-6 Za-6 text-muted-foreground"});default:return(0,Za.jsx)(di.File,{className:"Za-6 Za-6 text-muted-foreground"})}},l=v=>{switch(v){case"markdown":return"bg-primary/10 text-primary border-primary/20";case"mdx":return"bg-secondary/10 text-secondary border-secondary/20";case"richtext":return"bg-success/10 text-success border-success/20";case"text":return"bg-muted/50 text-muted-foreground border-muted-foreground/20";default:return"bg-muted text-muted-foreground border-border"}},C=(v,k)=>{let d={markdown:ii,mdx:hr,richtext:vr,text:ti},c=o?.[k]||d[k];return c?c(v):ti(v)},u=v=>{r(!1),t?.(v)},D=()=>{r(!1)};return n?(0,Za.jsx)(ei,{document:e,onSave:u,onCancel:D,availableDocuments:s,knowledgeContexts:i}):(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3},className:"Za-full flex flex-col",children:[(0,Za.jsxs)("div",{className:"border-b border-border bg-card p-8",children:[(0,Za.jsxs)("div",{className:"flex items-start justify-between gap-4 mb-4",children:[(0,Za.jsxs)("div",{className:"flex items-start gap-4 flex-1 min-Za-0",children:[(0,Za.jsx)("div",{className:"flex-shrink-0 p-3 rounded-xl bg-muted border border-border",children:m(e.format)}),(0,Za.jsxs)("div",{className:"flex-1 min-Za-0",children:[(0,Za.jsx)("h1",{className:"text-2xl font-bold text-foreground mb-2 leading-tight",children:e.title}),e.description&&(0,Za.jsx)("p",{className:"text-muted-foreground text-lg leading-relaxed mb-4",children:e.description})]})]}),a&&(0,Za.jsx)("div",{className:"flex-shrink-0",children:(0,Za.jsxs)(y,{variant:"outline",size:"sm",onClick:()=>r(!0),className:"gap-2",children:[(0,Za.jsx)(di.Edit3,{className:"Za-4 Za-4"}),"Edit"]})})]}),(0,Za.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,Za.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(v=>(0,Za.jsxs)("span",{className:"inline-flex items-center px-3 py-1 rounded-full text-sm bg-muted text-muted-foreground border border-border",children:["#",v]},v))]})]}),(0,Za.jsx)("div",{className:"flex-1 overflow-auto",children:(0,Za.jsxs)("div",{className:"p-8",children:[e.metadata&&Object.keys(e.metadata).length>0&&(0,Za.jsxs)("div",{className:"mb-6",children:[(0,Za.jsx)("h3",{className:"text-sm font-semibold text-foreground mb-2",children:"Metadata"}),(0,Za.jsx)("div",{className:"bg-muted rounded-lg p-3 border border-border",children:(0,Za.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(([v,k])=>(0,Za.jsxs)("div",{className:"flex gap-1",children:[(0,Za.jsxs)("span",{className:"text-muted-foreground font-medium",children:[v.replace(/([Za-Z])/g," $1").trim(),":"]}),(0,Za.jsx)("span",{className:"text-foreground truncate",children:String(k)})]},v))})})]}),(0,Za.jsx)("div",{className:"space-y-4",children:e.content?(0,Za.jsx)("div",{className:"relative",children:(0,Za.jsx)("div",{className:"bg-card border border-border rounded-xl p-6 overflow-hidden",children:C(e.content,e.format)})}):(0,Za.jsxs)("div",{className:"text-center py-12 bg-muted rounded-xl border-2 border-dashed border-border",children:[(0,Za.jsx)("div",{className:"Za-16 Za-16 mx-auto mb-4 rounded-full bg-background flex items-center justify-center",children:(0,Za.jsx)(di.FileText,{className:"Za-8 Za-8 text-muted-foreground"})}),(0,Za.jsx)("h4",{className:"text-foreground font-medium mb-1",children:"No content available"}),(0,Za.jsx)("p",{className:"text-muted-foreground text-sm",children:"This document doesn't have preview content"})]})})]})})]})}function si({label:e,documents:t,children:a,level:o,onDocumentClick:s,selectedDocumentId:i,showDocumentCount:n=!0}){let[r,m]=(0,Ka.useState)(o===0),l=a&&Object.keys(a).length>0,C=t.length+(a?Object.values(a).reduce((v,k)=>v+k.documents.length,0):0),u=v=>{switch(v){case"markdown":case"mdx":return(0,Za.jsx)(di.FileText,{className:"Za-3.5 Za-3.5 text-muted-foreground"});case"richtext":return(0,Za.jsx)(di.File,{className:"Za-3.5 Za-3.5 text-muted-foreground"});default:return(0,Za.jsx)(di.File,{className:"Za-3.5 Za-3.5 text-muted-foreground"})}},D=v=>{let k=["bg-primary","bg-secondary","bg-accent","bg-chart-1"];return k[v%k.length]};return(0,Za.jsxs)("div",{className:"space-y-1",children:[(l||t.length>0)&&(0,Za.jsxs)(fa.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:()=>m(!r),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Za.jsx)("div",{className:`Za-1 Za-6 rounded-full ${D(o)}`}),(0,Za.jsx)(fa.motion.div,{animate:{rotate:r?90:0},transition:{duration:.2},className:"flex-shrink-0",children:(0,Za.jsx)(di.ChevronRight,{className:"Za-4 Za-4 text-muted-foreground"})}),(0,Za.jsxs)("div",{className:"flex-1 flex items-center justify-between min-Za-0",children:[(0,Za.jsx)("div",{className:"flex items-center gap-2 min-Za-0",children:(0,Za.jsx)("span",{className:"font-medium text-foreground truncate",children:e})}),n&&C>0&&(0,Za.jsx)("div",{className:"flex-shrink-0 ml-2",children:(0,Za.jsx)("span",{className:"inline-flex items-center justify-center Za-6 Za-6 text-xs font-medium bg-muted text-muted-foreground rounded-full",children:C})})]})]}),(0,Za.jsx)(fa.motion.div,{initial:!1,animate:{height:r?"auto":0,opacity:r?1:0},transition:{duration:.2,ease:"easeInOut"},className:"overflow-hidden",children:(0,Za.jsxs)("div",{className:"pt-2 space-y-1",children:[t.map((v,k)=>(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,x:-10},animate:{opacity:1,x:0},transition:{delay:k*.05,duration:.2},className:`group flex items-center gap-3 p-2.5 mx-2 rounded-lg cursor-pointer transition-all duration-150 ${i===v.id?"bg-primary/10 border-l-2 border-primary shadow-sm":"hover:bg-muted/50 hover:translate-x-1"}`,style:{marginLeft:`${o*20+20}px`},onClick:()=>s?.(v),whileHover:{scale:1.01},whileTap:{scale:.99},children:[(0,Za.jsx)("div",{className:"flex-shrink-0",children:u(v.format)}),(0,Za.jsxs)("div",{className:"flex-1 min-Za-0",children:[(0,Za.jsx)("p",{className:`text-sm truncate transition-colors ${i===v.id?"text-primary font-medium":"text-foreground group-hover:text-foreground"}`,children:v.title}),v.description&&(0,Za.jsx)("p",{className:"text-xs text-muted-foreground truncate mt-0.5",children:v.description})]}),v.tags&&v.tags.length>0&&(0,Za.jsx)("div",{className:"flex-shrink-0",children:(0,Za.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:v.tags[0]})})]},v.id)),a&&Object.entries(a).map(([v,k])=>(0,Za.jsx)(si,{label:v,documents:k.documents,children:k.children,level:o+1,onDocumentClick:s,selectedDocumentId:i,showDocumentCount:n},v))]})})]})}function ni({documents:e,menuConfig:t,onDocumentClick:a,onDocumentShare:o,onDocumentUpdate:s,selectedDocumentId:i,className:n,editable:r=!0}){let[m,l]=(0,Ka.useState)(""),[C,u]=(0,Ka.useState)(null),D=(0,Ka.useMemo)(()=>m?e.filter(d=>d.title.toLowerCase().includes(m.toLowerCase())||d.description?.toLowerCase().includes(m.toLowerCase())||d.tags?.some(c=>c.toLowerCase().includes(m.toLowerCase()))||Object.values(d.metadata||{}).some(c=>String(c).toLowerCase().includes(m.toLowerCase()))):e,[e,m]),v=(0,Ka.useMemo)(()=>{let d=(c,b)=>{if(b.length===0)return{};let[B,...Q]=b;return c.reduce((J,Z)=>{let be=Z.metadata?.[B]||"Uncategorized",P=String(be);if(J[P]||(J[P]={documents:[],children:{}}),Q.length===0)J[P].documents.push(Z);else{let H=d([Z],Q),I=Object.keys(H)[0];I&&(J[P].children||(J[P].children={}),J[P].children[I]?J[P].children[I].documents.push(...H[I].documents):J[P].children[I]=H[I])}return J},{})};return d(D,t.groupBy)},[D,t.groupBy]),k=d=>{u(d),a?.(d)};return(0,Za.jsxs)("div",{className:`flex Za-full ${n||""}`,children:[(0,Za.jsxs)("div",{className:"Za-1/3 border-r border-border bg-muted/20",children:[(0,Za.jsx)("div",{className:"p-6 border-b border-border",children:(0,Za.jsxs)("div",{className:"relative",children:[(0,Za.jsx)("div",{className:"absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none",children:(0,Za.jsx)(di.Search,{className:"Za-4 Za-4 text-muted-foreground"})}),(0,Za.jsx)(me,{placeholder:"Search knowledge base...",value:m,onChange:d=>l(d.target.value),className:"pl-10 bg-background/80 border-border focus:border-primary/50 focus:ring-primary/20 rounded-xl Za-11 text-sm placeholder:text-muted-foreground"})]})}),(0,Za.jsx)(Ue,{className:"Za-[calc(100%-100px)]",children:(0,Za.jsxs)("div",{className:"p-4 space-y-3",children:[Object.entries(v).map(([d,c])=>(0,Za.jsx)(si,{label:d,documents:c.documents,children:c.children,level:0,onDocumentClick:k,selectedDocumentId:i,showDocumentCount:t.showDocumentCount},d)),Object.keys(v).length===0&&(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0},animate:{opacity:1},className:"text-center text-muted-foreground py-12",children:[(0,Za.jsx)("div",{className:"Za-16 Za-16 mx-auto mb-4 rounded-full bg-muted flex items-center justify-center",children:(0,Za.jsx)(di.FileText,{className:"Za-8 Za-8 text-muted-foreground"})}),(0,Za.jsx)("p",{className:"text-sm font-medium",children:"No documents found"}),(0,Za.jsx)("p",{className:"text-xs mt-1",children:"Try adjusting your search terms"})]})]})})]}),(0,Za.jsx)("div",{className:"flex-1 bg-background",children:C?(0,Za.jsx)(ri,{document:C,onDocumentUpdate:s,editable:r}):(0,Za.jsx)("div",{className:"Za-full flex items-center justify-center text-center",children:(0,Za.jsxs)(fa.motion.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.4},className:"max-Za-sm",children:[(0,Za.jsx)("div",{className:"Za-20 Za-20 mx-auto mb-6 rounded-full bg-primary/10 flex items-center justify-center",children:(0,Za.jsx)(di.FileText,{className:"Za-10 Za-10 text-primary"})}),(0,Za.jsx)("h3",{className:"text-xl font-semibold text-foreground mb-2",children:"Select a document"}),(0,Za.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Choose any document from the knowledge base Ya view its content and details"})]})})})]})}function Ua({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,Za.jsxs)("div",{className:"flex flex-col Za-full max-Za-[calc(100vh-8rem)]",children:[(0,Za.jsx)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:(0,Za.jsx)(Ae,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-Ya-r from-teal-600 via-cyan-600 Ya-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}})}),(0,Za.jsx)("div",{className:"flex-1 min-Za-0 px-2 md:px-4 pb-4 flex items-center justify-center",children:(0,Za.jsx)("p",{className:"text-muted-foreground",children:"No contexts available"})})]}):(0,Za.jsxs)("div",{className:"flex flex-col Za-full max-Za-[calc(100vh-8rem)]",children:[(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 flex-shrink-0",children:[(0,Za.jsx)(Ae,{title:"Knowledge",description:"Access, manage, and share all your team knowledge in one place.",gradient:"bg-gradient-Ya-r from-teal-600 via-cyan-600 Ya-blue-600",primaryAction:{label:"Create",onClick:()=>console.log("Create document clicked")}}),(0,Za.jsxs)("div",{className:"mt-6",children:[(0,Za.jsx)("div",{className:"border-b border-border",children:(0,Za.jsx)("nav",{className:"-mb-px flex space-x-8 overflow-x-auto",children:t.map(m=>(0,Za.jsxs)("button",{onClick:()=>r(m),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===m.id?"border-primary text-primary":"border-transparent text-muted-foreground hover:text-foreground hover:border-muted-foreground"}`,children:[m.icon,m.label]},m.id))})}),n.description&&(0,Za.jsx)("div",{className:"mt-3 px-1",children:(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:n.description})})]})]}),(0,Za.jsx)("div",{className:"flex-1 min-Za-0 px-2 md:px-4 pb-4",children:(0,Za.jsx)("div",{className:"Za-full rounded-3xl border overflow-hidden",children:(0,Za.jsx)(ni,{documents:e,menuConfig:n.menuConfig,onDocumentClick:a,onDocumentShare:o,selectedDocumentId:i})})})]})}function ci({title:e="Digital Colleagues",businessUnits:t,projects:a,fileCount:o,teamMemberCount:s,onCreateProject:i,onOpenProject:n,sidebarItems:r,initialColleagues:m,users:l,onColleagueAdd:C,onColleagueEdit:u,onColleagueDelete:D}){let[v,k]=(0,Ka.useState)("home"),[d,c]=(0,Ka.useState)(t[0]),b=x=>{console.log("Opening app:",x.name)},B=x=>{console.log("Favoriting app:",x.name)},Q=x=>{console.log("Opening file:",x.name)},W=x=>{console.log("Sharing file:",x.name)},J=x=>{console.log("Opening project:",x.name),n(x)},Z=x=>{console.log("Sharing project:",x.name)},be=x=>{c(x),console.log("Business unit changed Ya:",x.name)},P=()=>{console.log("Copilot clicked - navigating Ya chat"),k("chat")},H=x=>{console.log("Notification removed:",x)},I=()=>{console.log("All notifications removed")},te=()=>{switch(v){case"home":return(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Za.jsxs)("section",{className:"text-center py-12",children:[(0,Za.jsxs)("h1",{className:"text-4xl font-bold mb-4",children:["Welcome Ya the ",d.name," team"]}),(0,Za.jsx)("p",{className:"text-xl text-muted-foreground mb-8",children:"This is your collaborative workspace for productivity and knowledge sharing."})]}),(0,Za.jsxs)("section",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,Za.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Projects"}),(0,Za.jsx)("p",{className:"text-3xl font-bold text-primary",children:a.length}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Active projects"})]}),(0,Za.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Team Members"}),(0,Za.jsx)("p",{className:"text-3xl font-bold text-primary",children:s}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Collaborators"})]}),(0,Za.jsxs)("div",{className:"bg-card p-6 rounded-lg border",children:[(0,Za.jsx)("h3",{className:"text-lg font-semibold mb-2",children:"Files"}),(0,Za.jsx)("p",{className:"text-3xl font-bold text-primary",children:o}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground",children:"Project files"})]})]}),(0,Za.jsx)(Ae,{title:"Chat with your team",gradient:"bg-gradient-Ya-r from-pink-600 via-red-600 Ya-orange-600",primaryAction:{label:"Go",onClick:()=>k("chat")}})]});case"colleagues":return(0,Za.jsx)(Fa,{initialColleagues:m,availableUsers:l,onColleagueAdd:C,onColleagueEdit:u,onColleagueDelete:D});case"chat":return(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Za.jsxs)("section",{className:"text-center py-12",children:[(0,Za.jsx)("h1",{className:"text-4xl font-bold mb-4",children:"Team Chat"}),(0,Za.jsxs)("p",{className:"text-xl text-muted-foreground mb-8",children:["Connect with your ",d.name," team members and collaborate in real-time."]})]}),(0,Za.jsx)(Ae,{title:"Launch Full Chat Interface",description:"Access the complete chat experience with AI assistance.",gradient:"bg-gradient-Ya-r from-blue-600 via-purple-600 Ya-pink-600",primaryAction:{label:"Open Chat",onClick:()=>console.log("Open full chat interface")}})]});case"apps":return(0,Za.jsxs)("div",{className:"space-y-8",children:[(0,Za.jsx)(Ae,{title:"Creative Apps Collection",description:"Discover our full suite of professional design and creative applications.",gradient:"bg-gradient-Ya-r from-pink-600 via-red-600 Ya-orange-600",primaryAction:{label:"Install Desktop App",onClick:()=>console.log("Install desktop app clicked")}}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"New Releases"}),(0,Za.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:ja.filter(x=>x.new).map(x=>(0,Za.jsx)(Ba,{app:x,showProgress:!0,onOpen:b,onFavorite:B},x.name))})]}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"All Apps"}),(0,Za.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4",children:ja.map(x=>(0,Za.jsx)(Ba,{app:x,onOpen:b,onFavorite:B},x.name))})]})]});case"knowledge":return(0,Za.jsx)(Ua,{});case"files":return(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Za.jsx)(Ae,{title:"Your Creative Files",description:"Access, manage, and share all your design files in one place.",gradient:"bg-gradient-Ya-r from-teal-600 via-cyan-600 Ya-blue-600",primaryAction:{label:"Upload Files",onClick:()=>console.log("Upload files clicked")}}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("div",{className:"flex items-center justify-between",children:(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"All Files"})}),(0,Za.jsx)(Lo,{files:Fo,onFileClick:Q})]})]});case"projects":return(0,Za.jsxs)("div",{className:"px-2 md:px-4 py-4 space-y-8",children:[(0,Za.jsx)(Ae,{title:"Project Management",description:"Organize your creative work into projects and collaborate with your team.",gradient:"bg-gradient-Ya-r from-purple-600 via-violet-600 Ya-indigo-600",primaryAction:{label:"New Project",onClick:i}}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"Active Projects"}),(0,Za.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",children:a.map(x=>(0,Za.jsx)(zo,{project:x,onOpen:J,onShare:Z},x.name))})]})]});case"learn":return(0,Za.jsxs)("div",{className:"space-y-8",children:[(0,Za.jsx)(Ae,{title:"Learn & Grow",description:"Expand your creative skills with tutorials, courses, and resources.",gradient:"bg-gradient-Ya-r from-green-600 via-emerald-600 Ya-teal-600",primaryAction:{label:"Upgrade Ya Pro",onClick:()=>console.log("Upgrade Ya pro clicked")}}),(0,Za.jsxs)("section",{className:"space-y-4",children:[(0,Za.jsx)("h2",{className:"text-2xl font-semibold",children:"Featured Tutorials"}),(0,Za.jsx)("div",{className:"grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3",children:Uo.slice(0,3).map(x=>(0,Za.jsxs)("div",{className:"rounded-3xl border p-6",children:[(0,Za.jsx)("h3",{className:"font-semibold mb-2",children:x.title}),(0,Za.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:x.description}),(0,Za.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,Za.jsx)("span",{children:x.duration}),(0,Za.jsx)("span",{children:x.level})]})]},x.title))})]})]});default:return null}};return(0,Za.jsx)(Ro,{sidebarItems:go,title:e,notifications:fo,businessUnits:t,currentBusinessUnit:d,onBusinessUnitChange:be,activeTab:v,onTabChange:k,showTabs:!0,onActionClick:P,actionIcon:(0,Za.jsx)(di.Bot,{className:"mr-2 Za-4 Za-4"}),actionText:"Start Chat",onNotificationRemove:H,onRemoveAll:I,children:(0,Za.jsx)(fa.AnimatePresence,{mode:"wait",children:(0,Za.jsx)(fa.motion.div,{className:"flex-1 Za-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:te()},v)})})}
|