cortex-react-components 2.15.0 → 2.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-N3B3XNV3.mjs → chunk-2BRDNDUB.mjs} +1 -1
- package/dist/{chunk-M7NV6EFH.mjs → chunk-3HNU2NYP.mjs} +1 -1
- package/dist/{chunk-FKU4VQR6.mjs → chunk-3NRXQBBS.mjs} +1 -1
- package/dist/{chunk-NWISIJFD.mjs → chunk-3Y7QG6VP.mjs} +1 -1
- package/dist/{chunk-A2KX5N75.mjs → chunk-4ZWGVKVT.mjs} +1 -1
- package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
- package/dist/{chunk-PK3OBSCB.mjs → chunk-5MWZTJYP.mjs} +1 -1
- package/dist/{chunk-DMCFEJ2C.mjs → chunk-6VRPQKAK.mjs} +1 -1
- package/dist/{chunk-5SHZBJ5R.mjs → chunk-75F3LJMX.mjs} +1 -1
- package/dist/{chunk-MXCW6SOT.mjs → chunk-7R47MHQE.mjs} +1 -1
- package/dist/{chunk-LJQPLE4S.mjs → chunk-AJQHGVZ5.mjs} +1 -1
- package/dist/{chunk-YKG4FNS4.mjs → chunk-C4RWEPVF.mjs} +1 -1
- package/dist/{chunk-7GMAMIHM.mjs → chunk-CXOVEABI.mjs} +1 -1
- package/dist/{chunk-JTVWQ42C.mjs → chunk-DDQWJGAN.mjs} +1 -1
- package/dist/{chunk-D2H36ZLW.mjs → chunk-DXE6AGJX.mjs} +1 -1
- package/dist/{chunk-5WVFEIMC.mjs → chunk-EM3T2XYC.mjs} +1 -1
- package/dist/{chunk-IF3425JX.mjs → chunk-FE7ZGUPU.mjs} +1 -1
- package/dist/{chunk-H3CJOE6S.mjs → chunk-GHOL5L32.mjs} +1 -1
- package/dist/{chunk-2RQDJ5XT.mjs → chunk-GTZJWMZR.mjs} +1 -1
- package/dist/{chunk-AQQCH7Z2.mjs → chunk-KBEXWUKI.mjs} +1 -1
- package/dist/{chunk-I2GNNRFH.mjs → chunk-LJXTXROJ.mjs} +1 -1
- package/dist/{chunk-PO3XUUWY.mjs → chunk-LLP4EFT4.mjs} +1 -1
- package/dist/{chunk-OLIYPWO3.mjs → chunk-LQX37M4T.mjs} +1 -1
- package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
- package/dist/{chunk-HKGW6JI2.mjs → chunk-NINFDOV5.mjs} +1 -1
- package/dist/{chunk-RX63ABAF.mjs → chunk-O54IXEY5.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/chunk-OGAY4DL2.mjs +1 -0
- package/dist/{chunk-TILPSVAP.mjs → chunk-PHQMSVOB.mjs} +1 -1
- package/dist/{chunk-255P6K5W.mjs → chunk-RGOKBIQ5.mjs} +1 -1
- package/dist/{chunk-67QPOSVV.mjs → chunk-RJGYVDOU.mjs} +1 -1
- package/dist/{chunk-XKGBG5FX.mjs → chunk-TVTTUSWM.mjs} +1 -1
- package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
- package/dist/chunk-UGBDJDPW.mjs +4 -0
- package/dist/{chunk-6PS55VJZ.mjs → chunk-VDFRWGXR.mjs} +1 -1
- package/dist/{chunk-ERJXTG6X.mjs → chunk-WIRQ5IRT.mjs} +1 -1
- package/dist/{chunk-2HWSTGAP.mjs → chunk-XQ3XV5DH.mjs} +1 -1
- package/dist/{chunk-5NIEZE7A.mjs → chunk-XX4GSGRP.mjs} +1 -1
- package/dist/{chunk-62A35O55.mjs → chunk-ZEALRBXW.mjs} +1 -1
- package/dist/chunk-ZN7NNMB7.mjs +4 -0
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.js +6 -6
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.js +7 -7
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/CodeBlock.css +1 -0
- package/dist/components/Chat/PartTypes/CodeBlock.d.ts +15 -0
- package/dist/components/Chat/PartTypes/CodeBlock.js +4 -0
- package/dist/components/Chat/PartTypes/CodeBlock.mjs +2 -0
- package/dist/components/Chat/PartTypes/Tool.css +1 -0
- package/dist/components/Chat/PartTypes/Tool.d.ts +22 -0
- package/dist/components/Chat/PartTypes/Tool.js +5 -0
- package/dist/components/Chat/PartTypes/Tool.mjs +2 -0
- package/dist/components/Chat/PartTypes/index.d.ts +2 -0
- package/dist/components/Chat/PartTypes/index.js +6 -6
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +12 -12
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +27 -27
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +7 -7
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +7 -7
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +7 -7
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.js +11 -11
- package/dist/components/Chat/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.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +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.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +14 -14
- 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 +25 -25
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/form/index.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +5 -2
- package/dist/chunk-UTHKFW4R.mjs +0 -1
|
@@ -3,24 +3,24 @@
|
|
|
3
3
|
'use client'
|
|
4
4
|
'use client';
|
|
5
5
|
|
|
6
|
-
"use strict";var $o=Object.create;var Nt=Object.defineProperty;var qo=Object.getOwnPropertyDescriptor;var Ko=Object.getOwnPropertyNames;var Jo=Object.getPrototypeOf,Qo=Object.prototype.hasOwnProperty;var Xo=(e,t)=>{for(var a in t)Nt(e,a,{get:t[a],enumerable:!0})},ha=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Ko(t))!Qo.call(e,s)&&s!==a&&Nt(e,s,{get:()=>t[s],enumerable:!(o=qo(t,s))||o.enumerable});return e};var W=(e,t,a)=>(a=e!=null?$o(Jo(e)):{},ha(t||!e||!e.__esModule?Nt(a,"default",{value:e,enumerable:!0}):a,e)),Yo=e=>ha(Nt({},"__esModule",{value:!0}),e);var nr={};Xo(nr,{ChatDemoCapabilitiesInteraction:()=>rr,ChatDemoErrorHandling:()=>ir,ChatDemoFileUploads:()=>or,ChatDemoMarkdownResponses:()=>tr,ChatDemoToolCalling:()=>er,ChatDemoUIComponents:()=>ar});module.exports=Yo(nr);var at=require("react");var Mo=require("@ai-sdk/react"),_t=require("motion/react"),Eo=require("lucide-react");var Da=require("clsx");var Ht="-",Zo=e=>{let t=ti(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let n=l.split(Ht);return n[0]===""&&n.length!==1&&n.shift(),xa(n,t)||ei(l)},getConflictingClassGroupIds:(l,n)=>{let p=a[l]||[];return n&&o[l]?[...p,...o[l]]:p}}},xa=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?xa(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let i=e.join(Ht);return t.validators.find(({validator:l})=>l(i))?.classGroupId},va=/^\[(.+)\]$/,ei=e=>{if(va.test(e)){let t=va.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},ti=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return oi(Object.entries(e.classGroups),a).forEach(([i,l])=>{jt(l,o,i,t)}),o},jt=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let i=s===""?t:ya(t,s);i.classGroupId=a;return}if(typeof s=="function"){if(ai(s)){jt(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([i,l])=>{jt(l,ya(t,i),a,o)})})},ya=(e,t)=>{let a=e;return t.split(Ht).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},ai=e=>e.isThemeGetter,oi=(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(([l,n])=>[t+l,n])):i);return[a,s]}):e,ii=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(i,l)=>{a.set(i,l),t++,t>e&&(t=0,o=a,a=new Map)};return{get(i){let l=a.get(i);if(l!==void 0)return l;if((l=o.get(i))!==void 0)return s(i,l),l},set(i,l){a.has(i)?a.set(i,l):s(i,l)}}},wa="!",ri=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],i=t.length,l=n=>{let p=[],u=0,w=0,f;for(let x=0;x<n.length;x++){let P=n[x];if(u===0){if(P===s&&(o||n.slice(x,x+i)===t)){p.push(n.slice(w,x)),w=x+i;continue}if(P==="/"){f=x;continue}}P==="["?u++:P==="]"&&u--}let v=p.length===0?n:n.substring(w),T=v.startsWith(wa),I=T?v.substring(1):v,R=f&&f>w?f-w:void 0;return{modifiers:p,hasImportantModifier:T,baseClassName:I,maybePostfixModifierPosition:R}};return a?n=>a({className:n,parseClassName:l}):l},ni=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},si=e=>({cache:ii(e.cacheSize),parseClassName:ri(e),...Zo(e)}),li=/\s+/,ci=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,i=[],l=e.trim().split(li),n="";for(let p=l.length-1;p>=0;p-=1){let u=l[p],{modifiers:w,hasImportantModifier:f,baseClassName:v,maybePostfixModifierPosition:T}=a(u),I=!!T,R=o(I?v.substring(0,T):v);if(!R){if(!I){n=u+(n.length>0?" "+n:n);continue}if(R=o(v),!R){n=u+(n.length>0?" "+n:n);continue}I=!1}let x=ni(w).join(":"),P=f?x+wa:x,_=P+R;if(i.includes(_))continue;i.push(_);let C=s(R,I);for(let L=0;L<C.length;++L){let Y=C[L];i.push(P+Y)}n=u+(n.length>0?" "+n:n)}return n};function di(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ca(t))&&(o&&(o+=" "),o+=a);return o}var Ca=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ca(e[o]))&&(a&&(a+=" "),a+=t);return a};function pi(e,...t){let a,o,s,i=l;function l(p){let u=t.reduce((w,f)=>f(w),e());return a=si(u),o=a.cache.get,s=a.cache.set,i=n,n(p)}function n(p){let u=o(p);if(u)return u;let w=ci(p,a);return s(p,w),w}return function(){return i(di.apply(null,arguments))}}var j=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Na=/^\[(?:([a-Eo-]+):)?(.+)\]$/i,mi=/^\d+\/\d+$/,ui=new Set(["px","full","screen"]),gi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,fi=/\d+(%|px|Ta?em|[sdl]?v([hwib]|min|max)|at|pc|in|cm|mm|cap|ch|ex|Ta?lh|cq(w|Ta|i|Ta|min|max))|\Ta(calc|min|max|clamp)\(.+\)|^0$/,bi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,hi=/^(inset_)?-?((\d+)?\.?(\d+)[a-Eo]+|0)_-?((\d+)?\.?(\d+)[a-Eo]+|0)/,vi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ie=e=>ot(e)||ui.has(e)||mi.test(e),Fe=e=>it(e,"length",Di),ot=e=>!!e&&!Number.isNaN(Number(e)),Ot=e=>it(e,"number",ot),ut=e=>!!e&&Number.isInteger(Number(e)),yi=e=>e.endsWith("%")&&ot(e.slice(0,-1)),y=e=>Na.test(e),Oe=e=>gi.test(e),xi=new Set(["length","size","percentage"]),wi=e=>it(e,xi,ka),Ci=e=>it(e,"position",ka),Ni=new Set(["image","url"]),ki=e=>it(e,Ni,Ti),Pi=e=>it(e,"",Ri),gt=()=>!0,it=(e,t,a)=>{let o=Na.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Di=e=>fi.test(e)&&!bi.test(e),ka=()=>!1,Ri=e=>hi.test(e),Ti=e=>vi.test(e);var Si=()=>{let e=j("colors"),t=j("spacing"),a=j("blur"),o=j("brightness"),s=j("borderColor"),i=j("borderRadius"),l=j("borderSpacing"),n=j("borderWidth"),p=j("contrast"),u=j("grayscale"),w=j("hueRotate"),f=j("invert"),v=j("gap"),T=j("gradientColorStops"),I=j("gradientColorStopPositions"),R=j("inset"),x=j("margin"),P=j("opacity"),_=j("padding"),C=j("saturate"),L=j("scale"),Y=j("sepia"),Z=j("skew"),ee=j("space"),X=j("translate"),G=()=>["auto","contain","none"],oe=()=>["auto","hidden","clip","visible","scroll"],le=()=>["auto",y,t],M=()=>[y,t],Se=()=>["",Ie,Fe],d=()=>["auto",ot,y],B=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],E=()=>["solid","dashed","dotted","double","none"],$=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],m=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",y],q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>[ot,y];return{cacheSize:500,separator:":",theme:{colors:[gt],spacing:[Ie,Fe],blur:["none","",Oe,y],brightness:S(),borderColor:[e],borderRadius:["none","","full",Oe,y],borderSpacing:M(),borderWidth:Se(),contrast:S(),grayscale:F(),hueRotate:S(),invert:F(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[yi,Fe],inset:le(),margin:le(),opacity:S(),padding:M(),saturate:S(),scale:S(),sepia:F(),skew:S(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",y]}],container:["container"],columns:[{columns:[Oe]}],"break-after":[{"break-after":q()}],"break-before":[{"break-before":q()}],"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:[...B(),y]}],overflow:[{overflow:oe()}],"overflow-x":[{"overflow-x":oe()}],"overflow-y":[{"overflow-y":oe()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[R]}],"inset-x":[{"inset-x":[R]}],"inset-y":[{"inset-y":[R]}],start:[{start:[R]}],end:[{end:[R]}],top:[{top:[R]}],right:[{right:[R]}],bottom:[{bottom:[R]}],left:[{left:[R]}],visibility:["visible","invisible","collapse"],Eo:[{Eo:["auto",ut,y]}],basis:[{basis:le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",y]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",ut,y]}],"grid-cols":[{"grid-cols":[gt]}],"col-start-end":[{col:["auto",{span:["full",ut,y]},y]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[gt]}],"row-start-end":[{row:["auto",{span:[ut,y]},y]}],"row-start":[{"row-start":d()}],"row-end":[{"row-end":d()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",y]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...m()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...m(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...m(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],pe:[{pe:[_]}],at:[{at:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ee]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",y,t]}],"min-w":[{"min-w":[y,t,"min","max","fit"]}],"max-w":[{"max-w":[y,t,"none","full","min","max","fit","prose",{screen:[Oe]},Oe]}],Ta:[{Ta:[y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-Ta":[{"min-Ta":[y,t,"min","max","fit","svh","lvh","dvh"]}],"max-Ta":[{"max-Ta":[y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Oe,Fe]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Ot]}],"font-family":[{font:[gt]}],"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",y]}],"line-clamp":[{"line-clamp":["none",ot,Ot]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Ie,y]}],"list-image":[{"list-image":["none",y]}],"list-style-type":[{list:["none","disc","decimal",y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[P]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[P]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...E(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Ie,Fe]}],"underline-offset":[{"underline-offset":["auto",Ie,y]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",y]}],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",y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[P]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...B(),Ci]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",wi]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","Ta","br","Ta","bl","l","tl"]},ki]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[I]}],"gradient-via-pos":[{via:[I]}],"gradient-to-pos":[{to:[I]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-Ta":[{"rounded-Ta":[i]}],"rounded-Ta":[{"rounded-Ta":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-Ta":[{"rounded-Ta":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-Ta":[{"border-Ta":[n]}],"border-w-Ta":[{"border-Ta":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[P]}],"border-style":[{border:[...E(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[P]}],"divide-style":[{divide:E()}],"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-Ta":[{"border-Ta":[s]}],"border-color-Ta":[{"border-Ta":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...E()]}],"outline-offset":[{"outline-offset":[Ie,y]}],"outline-w":[{outline:[Ie,Fe]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Se()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[P]}],"ring-offset-w":[{"ring-offset":[Ie,Fe]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Oe,Pi]}],"shadow-color":[{shadow:[gt]}],opacity:[{opacity:[P]}],"mix-blend":[{"mix-blend":[...$(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":$()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",Oe,y]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[w]}],invert:[{invert:[f]}],saturate:[{saturate:[C]}],sepia:[{sepia:[Y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[w]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[P]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",y]}],duration:[{duration:S()}],ease:[{ease:["linear","in","out","in-out",y]}],delay:[{delay:S()}],animate:[{animate:["none","spin","ping","pulse","bounce",y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[ut,y]}],"translate-x":[{"translate-x":[X]}],"translate-y":[{"translate-y":[X]}],"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",y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","Ta-resize","nw-resize","Ta-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-at":[{"scroll-at":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Ie,Fe,Ot]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","at","pr","pb","pl"],px:["pr","pl"],py:["at","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","Ta"],"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-Ta","rounded-Ta","rounded-l","rounded-ss","rounded-Ta","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-Ta","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-Ta":["rounded-tr","rounded-br"],"rounded-Ta":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-Ta","border-w-Ta","border-w-l"],"border-w-x":["border-w-Ta","border-w-l"],"border-w-y":["border-w-t","border-w-Ta"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-Ta","border-color-Ta","border-color-l"],"border-color-x":["border-color-Ta","border-color-l"],"border-color-y":["border-color-t","border-color-Ta"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-at","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-at","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Pa=pi(Si);function c(...e){return Pa((0,Da.clsx)(e))}var It=W(require("react")),Jt=W(require("next/link"));var Ra=require("class-variance-authority");var Ta=require("react/jsx-runtime"),Ai=(0,Ra.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 me({className:e,variant:t,...a}){return(0,Ta.jsx)("div",{className:c(Ai({variant:t}),e),...a})}var Sa=require("@radix-ui/react-slot"),Ia=W(require("react")),Ii=(0,Ra.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:"Ta-10 px-4 py-2",icon:"Ta-10 w-10",lg:"Ta-11 rounded px-8",sm:"Ta-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"}}}),A=Ia.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},i)=>(0,Ta.jsx)(e?Sa.Slot:"button",{className:c(Ii({className:t,size:a,variant:o})),ref:i,...s}));A.displayName="Button";var Ea=W(require("react"));var ft=Ea.forwardRef(({className:e,type:t,...a},o)=>(0,Ta.jsx)("input",{type:t,className:c("flex Ta-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));ft.displayName="Input";var Wt=W(require("react")),fe=W(require("@radix-ui/react-scroll-area"));var Ne=Wt.forwardRef(({className:e,children:t,...a},o)=>(0,Ta.jsxs)(fe.Root,{ref:o,className:c("relative overflow-hidden",e),...a,children:[(0,Ta.jsx)(fe.Viewport,{className:"Ta-full w-full rounded-[inherit]",children:t}),(0,Ta.jsx)(Ba,{}),(0,Ta.jsx)(fe.Corner,{})]}));Ne.displayName=fe.Root.displayName;var Ba=Wt.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,Ta.jsx)(fe.ScrollAreaScrollbar,{ref:o,orientation:t,className:c("flex touch-none select-none transition-colors",t==="vertical"&&"Ta-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"Ta-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,Ta.jsx)(fe.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Ba.displayName=fe.ScrollAreaScrollbar.displayName;var bt=W(require("react")),K=W(require("@radix-ui/react-dialog"));var za=K.Root;var Mi=K.Portal;var _a=bt.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)(K.Overlay,{ref:a,className:c("fixed inset-0 Eo-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));_a.displayName=K.Overlay.displayName;var Gt=bt.forwardRef(({className:e,children:t,...a},o)=>(0,Ta.jsxs)(Mi,{children:[(0,Ta.jsx)(_a,{}),(0,Ta.jsxs)(K.Content,{ref:o,className:c("fixed left-[50%] top-[50%] Eo-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,Ta.jsxs)(K.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,Ta.jsx)(Eo.X,{className:"Ta-4 w-4"}),(0,Ta.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Gt.displayName=K.Content.displayName;var Vt=({className:e,...t})=>(0,Ta.jsx)("div",{className:c("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Vt.displayName="DialogHeader";var Ei=({className:e,...t})=>(0,Ta.jsx)("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ei.displayName="DialogFooter";var $t=bt.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)(K.Title,{ref:a,className:c("text-lg font-semibold leading-none tracking-tight",e),...t}));$t.displayName=K.Title.displayName;var Ui=bt.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)(K.Description,{ref:a,className:c("text-sm text-muted-foreground",e),...t}));Ui.displayName=K.Description.displayName;var ht=W(require("@radix-ui/react-checkbox")),Oa=W(require("react")),qt=Oa.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)(ht.Root,{className:c("peer Ta-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,Ta.jsx)(ht.Indicator,{className:c("flex items-center justify-center text-current"),children:(0,Ta.jsx)(Eo.Check,{className:"Ta-4 w-4"})})}));qt.displayName=ht.Root.displayName;var ke=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Ha=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,Ta.jsx)(Eo.Palette,{className:"Ta-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,Ta.jsx)(Eo.Code,{className:"Ta-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,Ta.jsx)(Eo.TrendingUp,{className:"Ta-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,Ta.jsx)(Eo.DollarSign,{className:"Ta-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,Ta.jsx)(Eo.Users,{className:"Ta-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,Ta.jsx)(Eo.Wrench,{className:"Ta-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,Ta.jsx)(Eo.Scale,{className:"Ta-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,Ta.jsx)(Eo.Package,{className:"Ta-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,Ta.jsx)(Eo.Zap,{className:"Ta-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,Ta.jsx)(Eo.Building2,{className:"Ta-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],Rt=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var Kt=[{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}],Pt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],St=[{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")}],Bi=[...St,{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")}],Li=[...Rt,{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}],Dt={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},ja={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:St.filter(e=>e.epicId==="1")};var Tr={empty:{initialProjects:Dt.projects,initialEpics:Dt.epics,initialSprints:Dt.sprints,initialTasks:Dt.tasks},default:{initialProjects:Rt,initialEpics:Kt,initialSprints:Pt,initialTasks:St},highDensity:{initialProjects:Rt,initialEpics:Kt,initialSprints:Pt,initialTasks:Bi},singleEpic:{initialProjects:Rt,initialEpics:ja.epics,initialSprints:Pt,initialTasks:ja.tasks},multipleProjects:{initialProjects:Li,initialEpics:Kt,initialSprints:Pt,initialTasks:St}},Tt=[{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 to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(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 to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(ke),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(ke),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Sr=[{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:Tt.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:Tt.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Tt.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 Ar=Tt.filter(e=>e.type==="digital");function Wa(e,t){let[a,o]=(0,at.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,at.useEffect)(()=>{s(a)},[]),[a,s]}function Qt({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=Ha[0],onBusinessUnitChange:i,onSearch:l,className:n,logo:p="/headerlogo.png",appName:u="Nuvia",tagline:w="Collaboration Platform"}){let[f,v]=It.useState({}),[T,I]=Wa("sidebar-favorites",{}),[R,x]=It.useState(null),[P,_]=It.useState(""),C=d=>{v(B=>({...B,[d]:!B[d]}))},L=d=>{i?.(d)},Y=()=>{P.trim()&&l?.(P.trim())},Z=d=>{d.key==="Enter"&&(d.preventDefault(),Y())},ee=(d,B)=>{let E=T[d]||[],$=E.includes(B)?E.filter(m=>m!==B):E.concat(B);I({...T,[d]:$})},X=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let B=T[d.id]||[],E=d.items.filter(m=>B.includes(m.id)),$=d.items.filter(m=>!B.includes(m.id));return[...E,...$].slice(0,d.maxItems)},G=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,oe=e,le=d=>{let B=G(d),E=X(d),$=(0,Ta.jsxs)(Ta.Fragment,{children:[(0,Ta.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,Ta.jsx)("span",{children:d.title})]}),d.badge&&(0,Ta.jsx)(me,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,Ta.jsx)(Eo.ChevronDown,{className:c("ml-2 Ta-4 w-4 transition-transform",f[d.title]?"rotate-180":"")})]}),m=c("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",d.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return d.url?(0,Ta.jsx)(Jt.default,{href:d.url,className:m,onClick:a?o:void 0,children:$}):(0,Ta.jsx)("button",{className:m,onClick:()=>d.items&&C(d.title),children:$})},M=()=>{let d=e.find(E=>E.id===R);if(!d||!d.items||!d.maxItems)return null;let B=T[d.id]||[];return(0,Ta.jsx)(za,{open:!!R,onOpenChange:E=>!E&&x(null),children:(0,Ta.jsxs)(Gt,{className:"sm:max-w-md",children:[(0,Ta.jsxs)(Vt,{children:[(0,Ta.jsxs)($t,{children:["Manage ",d.title," Favorites"]}),(0,Ta.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,Ta.jsx)(Ne,{className:"max-Ta-96 pr-4",children:(0,Ta.jsx)("div",{className:"space-y-4",children:d.items.map(E=>(0,Ta.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,Ta.jsx)(qt,{id:E.id,checked:B.includes(E.id),onCheckedChange:()=>ee(d.id,E.id),disabled:!B.includes(E.id)&&B.length>=(d.maxItems||0)}),(0,Ta.jsxs)("label",{htmlFor:E.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:[E.title,E.badge&&(0,Ta.jsx)(me,{variant:"outline",className:"text-xs",children:E.badge})]})]},E.id))})})]})})},Se=(0,Ta.jsxs)("div",{className:"flex Ta-full flex-col bg-background",children:[(0,Ta.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,Ta.jsxs)("div",{className:"flex items-center gap-3",children:[(0,Ta.jsx)("div",{className:"flex Ta-14 w-14 items-center justify-center",children:(0,Ta.jsx)("img",{src:p,alt:"Header Logo",className:"Ta-14 w-14 object-contain"})}),(0,Ta.jsxs)("div",{children:[(0,Ta.jsx)("h2",{className:"font-semibold",children:u}),(0,Ta.jsx)("p",{className:"text-xs text-muted-foreground",children:w})]})]}),a&&(0,Ta.jsx)(A,{variant:"ghost",size:"icon",onClick:o,children:(0,Ta.jsx)(Eo.X,{className:"Ta-5 w-5"})})]}),(0,Ta.jsx)("div",{className:"px-3 py-2",children:(0,Ta.jsxs)("div",{className:"relative",children:[(0,Ta.jsx)(Eo.Search,{className:"absolute left-3 top-3 Ta-4 w-4 text-muted-foreground"}),(0,Ta.jsx)(ft,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:P,onChange:d=>_(d.target.value),onKeyPress:Z})]})}),(0,Ta.jsx)(Ne,{className:"flex-1 px-3 py-2",children:(0,Ta.jsx)("div",{className:"space-y-1",children:oe.map(d=>(0,Ta.jsxs)("div",{className:"mb-1",children:[le(d),d.items&&f[d.title]&&(0,Ta.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[X(d).map(B=>(0,Ta.jsxs)(Jt.default,{href:B.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[B.title,B.badge&&(0,Ta.jsx)(me,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:B.badge})]},B.id)),G(d)&&d.items&&d.items.length>X(d).length&&(0,Ta.jsxs)("button",{onClick:()=>x(d.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",d.items.length-X(d).length," more available"]})]})]},d.id))})}),(0,Ta.jsx)("div",{className:"p-3",children:(0,Ta.jsx)("div",{className:"space-y-1",children:(0,Ta.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,Ta.jsx)(Eo.Settings,{className:"Ta-5 w-5"}),(0,Ta.jsx)("span",{children:"Settings"})]})})}),(0,Ta.jsx)(M,{})]});return a?(0,Ta.jsx)("div",{className:c("fixed inset-y-0 left-0 Eo-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:Se}):(0,Ta.jsx)("div",{className:c("fixed inset-y-0 left-0 Eo-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:Se})}var Mt=W(require("react")),Me=W(require("@radix-ui/react-avatar"));var $e=Mt.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)(Me.Root,{ref:a,className:c("relative flex Ta-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));$e.displayName=Me.Root.displayName;var Xt=Mt.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)(Me.Image,{ref:a,className:c("aspect-square Ta-full w-full",e),...t}));Xt.displayName=Me.Image.displayName;var qe=Mt.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)(Me.Fallback,{ref:a,className:c("flex Ta-full w-full items-center justify-center rounded-full bg-muted",e),...t}));qe.displayName=Me.Fallback.displayName;var Ga=W(require("react")),ye=W(require("@radix-ui/react-tooltip"));var rt=ye.Provider,nt=ye.Root,st=ye.Trigger,Ke=Ga.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ta.jsx)(ye.Portal,{children:(0,Ta.jsx)(ye.Content,{ref:o,sideOffset:t,className:c("Eo-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Ke.displayName=ye.Content.displayName;var Va=require("next-themes");function $a(){let{setTheme:e,theme:t}=(0,Va.useTheme)();return(0,Ta.jsx)(rt,{children:(0,Ta.jsxs)(nt,{children:[(0,Ta.jsx)(st,{asChild:!0,children:(0,Ta.jsxs)(A,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,Ta.jsx)(Eo.Sun,{className:"Ta-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,Ta.jsx)(Eo.Moon,{className:"absolute Ta-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,Ta.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,Ta.jsx)(Ke,{children:"Toggle theme"})]})})}function qa({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:i}){let l=e.filter(u=>!u.read),n=l.length,p=u=>{switch(u){case"info":return(0,Ta.jsx)(Eo.Info,{className:"Ta-5 w-5 text-blue-500"});case"success":return(0,Ta.jsx)(Eo.Check,{className:"Ta-5 w-5 text-green-500"});case"warning":return(0,Ta.jsx)(Eo.AlertTriangle,{className:"Ta-5 w-5 text-amber-500"});case"error":return(0,Ta.jsx)(Eo.AlertTriangle,{className:"Ta-5 w-5 text-red-500"})}};return(0,Ta.jsx)(_t.AnimatePresence,{children:t&&(0,Ta.jsxs)(Ta.Fragment,{children:[(0,Ta.jsx)(_t.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 Eo-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,Ta.jsx)(_t.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:c("fixed inset-y-0 right-0 Eo-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",i),children:(0,Ta.jsxs)("div",{className:"flex Ta-full flex-col",children:[(0,Ta.jsxs)("div",{className:"flex items-center justify-between border-Ta p-4",children:[(0,Ta.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ta.jsx)(Eo.Bell,{className:"Ta-5 w-5"}),(0,Ta.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),n>0&&(0,Ta.jsxs)(me,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[n," new"]})]}),(0,Ta.jsxs)(A,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,Ta.jsx)(Eo.X,{className:"Ta-5 w-5"}),(0,Ta.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n>0&&(0,Ta.jsxs)("div",{className:"flex items-center justify-between border-Ta p-2",children:[(0,Ta.jsxs)("span",{className:"text-sm text-muted-foreground",children:[n," unread notification",n!==1?"s":""]}),(0,Ta.jsx)(A,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),l.length>0?(0,Ta.jsx)(Ne,{className:"flex-1",children:(0,Ta.jsx)("div",{className:"divide-y",children:l.map(u=>(0,Ta.jsxs)("div",{className:c("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,Ta.jsx)("div",{className:"flex Ta-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:p(u.type)}),(0,Ta.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,Ta.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ta.jsx)("p",{className:"font-medium",children:u.title}),(0,Ta.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Ta.jsx)("p",{className:"text-xs text-muted-foreground",children:u.time}),(0,Ta.jsx)(A,{variant:"ghost",size:"sm",className:"Ta-6 w-6 p-0",onClick:()=>o?.(u.id),title:"Dismiss",children:(0,Ta.jsx)(Eo.Check,{className:"Ta-3 w-3"})})]})]}),(0,Ta.jsx)("p",{className:"text-sm text-muted-foreground",children:u.description}),u.actionLabel&&(0,Ta.jsxs)(A,{variant:"link",size:"sm",className:"Ta-auto p-0 text-sm",onClick:u.onAction,children:[u.actionLabel,(0,Ta.jsx)(Eo.ChevronRight,{className:"ml-1 Ta-3 w-3"})]})]})]},u.id))})}):(0,Ta.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,Ta.jsx)("div",{className:"flex Ta-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,Ta.jsx)(Eo.Bell,{className:"Ta-8 w-8 text-muted-foreground"})}),(0,Ta.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,Ta.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Je=W(require("@radix-ui/react-tabs"));function Ka({className:e,...t}){return(0,Ta.jsx)(Je.Root,{"data-slot":"tabs",className:c("flex flex-col gap-2",e),...t})}function Ja({className:e,...t}){return(0,Ta.jsx)(Je.List,{"data-slot":"tabs-list",className:c("bg-muted text-muted-foreground inline-flex Ta-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Qa({className:e,...t}){return(0,Ta.jsx)(Je.Trigger,{"data-slot":"tabs-trigger",className:c("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 Ta-[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 Ee=W(require("react")),D=W(require("@radix-ui/react-dropdown-menu")),lt=require("@radix-ui/react-icons");var Xa=D.Root,Ya=D.Trigger;var zi=Ee.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,Ta.jsxs)(D.SubTrigger,{ref:s,className:c("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,Ta.jsx)(lt.ChevronRightIcon,{className:"ml-auto"})]}));zi.displayName=D.SubTrigger.displayName;var _i=Ee.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)(D.SubContent,{ref:a,className:c("Eo-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));_i.displayName=D.SubContent.displayName;var Zt=Ee.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,Ta.jsx)(D.Portal,{children:(0,Ta.jsx)(D.Content,{ref:o,sideOffset:t,className:c("Eo-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));Zt.displayName=D.Content.displayName;var ea=Ee.forwardRef(({className:e,inset:t,...a},o)=>(0,Ta.jsx)(D.Item,{ref:o,className:c("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}));ea.displayName=D.Item.displayName;var Fi=Ee.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,Ta.jsxs)(D.CheckboxItem,{ref:s,className:c("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,Ta.jsx)("span",{className:"absolute left-2 flex Ta-3.5 w-3.5 items-center justify-center",children:(0,Ta.jsx)(D.ItemIndicator,{children:(0,Ta.jsx)(lt.CheckIcon,{className:"Ta-4 w-4"})})}),t]}));Fi.displayName=D.CheckboxItem.displayName;var Oi=Ee.forwardRef(({className:e,children:t,...a},o)=>(0,Ta.jsxs)(D.RadioItem,{ref:o,className:c("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,Ta.jsx)("span",{className:"absolute left-2 flex Ta-3.5 w-3.5 items-center justify-center",children:(0,Ta.jsx)(D.ItemIndicator,{children:(0,Ta.jsx)(lt.DotFilledIcon,{className:"Ta-4 w-4 fill-current"})})}),t]}));Oi.displayName=D.RadioItem.displayName;var ji=Ee.forwardRef(({className:e,inset:t,...a},o)=>(0,Ta.jsx)(D.Label,{ref:o,className:c("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));ji.displayName=D.Label.displayName;var Hi=Ee.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)(D.Separator,{ref:a,className:c("-mx-1 my-1 Ta-px bg-muted",e),...t}));Hi.displayName=D.Separator.displayName;var Wi=({className:e,...t})=>(0,Ta.jsx)("span",{className:c("ml-auto text-xs tracking-widest opacity-60",e),...t});Wi.displayName="DropdownMenuShortcut";function eo({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:i=6}){let l=a.find(n=>n.value===e);return(0,Ta.jsxs)(_t.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,Ta.jsx)("div",{className:"hidden lg:block",children:(0,Ta.jsx)(Ka,{value:e,onValueChange:t,children:(0,Ta.jsx)(Ja,{className:"grid w-full rounded-2xl p-0 Ta-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(i,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,Ta.jsx)(_t.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,Ta.jsx)(Qa,{value:n.value,className:"w-full Ta-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:n.label})},n.value))})})}),(0,Ta.jsx)("div",{className:"lg:hidden",children:(0,Ta.jsxs)(Xa,{children:[(0,Ta.jsx)(Ya,{asChild:!0,children:(0,Ta.jsxs)(A,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[l?.label||"Select",(0,Ta.jsx)(Eo.ChevronDown,{className:"Ta-4 w-4 ml-2"})]})}),(0,Ta.jsx)(Zt,{align:"center",className:"w-[180px]",children:a.map(n=>(0,Ta.jsx)(ea,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function to({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:i,activeTab:l="assistant",onTabChange:n,showTabs:p=!0,tabOptions:u=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:w,actionIcon:f=(0,Ta.jsx)(Eo.Bot,{className:"mr-2 Ta-4 w-4"}),actionText:v="Action",onNotificationRemove:T,onRemoveAll:I,logo:R="/headerlogo.png",appName:x="Nuvia",tagline:P="Collaboration Platform"}){let[_,C]=(0,at.useState)(!1),[L,Y]=(0,at.useState)(t),Z=L.filter(G=>!G.read).length,ee=G=>{Y(oe=>oe.filter(le=>le.id!==G)),T?.(G)},X=()=>{Y(G=>G.filter(oe=>oe.read)),I?.()};return(0,Ta.jsxs)(Ta.Fragment,{children:[(0,Ta.jsxs)("header",{className:`sticky top-0 Eo-10 flex Ta-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${i||""}`,children:[(0,Ta.jsx)(A,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,Ta.jsx)(Eo.Menu,{className:"Ta-5 w-5"})}),(0,Ta.jsx)(A,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,Ta.jsx)(Eo.PanelLeft,{className:"Ta-5 w-5"})}),!s&&(0,Ta.jsxs)(_t.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,Ta.jsx)("div",{className:"flex Ta-10 w-10 items-center justify-center",children:(0,Ta.jsx)("img",{src:R,alt:"Logo",className:"Ta-10 w-10 object-contain"})}),(0,Ta.jsxs)("div",{children:[(0,Ta.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,Ta.jsx)("p",{className:"text-xs text-muted-foreground",children:P})]})]}),(0,Ta.jsxs)("div",{className:"flex flex-1 items-center",children:[p&&(0,Ta.jsx)(eo,{activeTab:l,onTabChange:n,tabOptions:u}),(0,Ta.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,Ta.jsx)(_t.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,Ta.jsx)(_t.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ta.jsxs)(A,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:w,children:[f,v]})})}),(0,Ta.jsx)($a,{}),(0,Ta.jsx)(rt,{children:(0,Ta.jsxs)(nt,{children:[(0,Ta.jsx)(st,{asChild:!0,children:(0,Ta.jsx)(_t.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ta.jsxs)(A,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,Ta.jsx)(_t.motion.div,{animate:Z>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:Z>0?1/0:0,repeatDelay:3},children:(0,Ta.jsx)(Eo.Bell,{className:"Ta-5 w-5"})}),Z>0&&(0,Ta.jsx)(_t.motion.span,{className:"absolute -right-1 -top-1 flex Ta-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:Z})]})})}),(0,Ta.jsx)(Ke,{children:"Notifications"})]})}),(0,Ta.jsx)(_t.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,Ta.jsxs)($e,{className:"Ta-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,Ta.jsx)(Xt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,Ta.jsx)(qe,{})]})})]})]})]}),(0,Ta.jsx)(qa,{notifications:L,open:_,onClose:()=>C(!1),onNotificationRemove:ee,onRemoveAll:X})]})}var ao=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,Ta.jsx)(Eo.User,{className:"Ta-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function io({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=ao[0],onBusinessUnitChange:i,onSearch:l,businessUnits:n=ao,activeTab:p,onTabChange:u,showTabs:w=!1,onActionClick:f,actionIcon:v,actionText:T="Action",onNotificationRemove:I,onRemoveAll:R,logo:x="/headerlogo.png",appName:P="Nuvia",tagline:_="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[L,Y]=(0,at.useState)(!C),[Z,ee]=(0,at.useState)(!1),[X,G]=(0,at.useState)(s),oe=le=>{G(le),i?.(le)};return(0,Ta.jsxs)("div",{className:"flex Ta-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[Z&&(0,Ta.jsx)("div",{className:"fixed inset-0 Eo-40 bg-black/50 md:hidden",onClick:()=>ee(!1)}),(0,Ta.jsx)("div",{className:"md:hidden",children:(0,Ta.jsx)(Qt,{items:e,isOpen:Z,isMobile:!0,onClose:()=>ee(!1),currentBusinessUnit:X,onBusinessUnitChange:oe,onSearch:l,logo:x,appName:P,tagline:_})}),(0,Ta.jsx)("div",{className:"hidden md:block",children:(0,Ta.jsx)(Qt,{items:e,isOpen:L,isMobile:!1,currentBusinessUnit:X,onBusinessUnitChange:oe,onSearch:l,logo:x,appName:P,tagline:_})}),(0,Ta.jsxs)("div",{className:c("min-Ta-screen fixed w-full transition-all duration-300 ease-in-out",L?"md:pl-64":"md:pl-0"),children:[(0,Ta.jsx)(to,{title:a,notifications:o,onToggleSidebar:()=>Y(!L),onToggleMobileMenu:()=>ee(!0),sidebarOpen:L,activeTab:p,onTabChange:u,showTabs:w,onActionClick:f,actionIcon:v,actionText:T,onNotificationRemove:I,onRemoveAll:R,logo:x,appName:P,tagline:_}),(0,Ta.jsx)("main",{className:"flex-1 p-0 flex flex-col Ta-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Qe=W(require("react"));var he=Qe.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)("div",{ref:a,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));he.displayName="Card";var Ue=Qe.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)("div",{ref:a,className:c("flex flex-col space-y-1.5 p-6",e),...t}));Ue.displayName="CardHeader";var Be=Qe.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)("div",{ref:a,className:c("font-semibold leading-none tracking-tight",e),...t}));Be.displayName="CardTitle";var oa=Qe.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)("div",{ref:a,className:c("text-sm text-muted-foreground",e),...t}));oa.displayName="CardDescription";var De=Qe.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)("div",{ref:a,className:c("p-6 at-0",e),...t}));De.displayName="CardContent";var yt=Qe.forwardRef(({className:e,...t},a)=>(0,Ta.jsx)("div",{ref:a,className:c("flex items-center p-6 at-0",e),...t}));yt.displayName="CardFooter";function ro({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:s,onSessionEdit:i,onSessionDelete:l,className:n}){return(0,Ta.jsx)(rt,{children:(0,Ta.jsx)("div",{className:`space-y-4 Ta-full ${n||""}`,children:(0,Ta.jsxs)(he,{className:"shadow-sm Ta-full",children:[(0,Ta.jsx)("div",{className:"p-4 border-Ta",children:(0,Ta.jsxs)("div",{className:"flex items-center justify-between",children:[(0,Ta.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,Ta.jsx)(Eo.Clock,{className:"Ta-4 w-4"}),"Recent Chats"]}),(0,Ta.jsxs)(A,{onClick:o,size:"sm",className:"gap-1 Ta-7 px-2 rounded-lg shadow-sm",children:[(0,Ta.jsx)(Eo.Plus,{className:"Ta-3 w-3"}),"New"]})]})}),(0,Ta.jsx)(Ne,{className:"Ta-[600px]",children:(0,Ta.jsx)("div",{className:"p-2",children:e.length===0?(0,Ta.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(p=>(0,Ta.jsxs)(nt,{children:[(0,Ta.jsx)(st,{asChild:!0,children:(0,Ta.jsx)("div",{className:c("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===p.id&&"bg-muted border"),onClick:()=>s(p),children:(0,Ta.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,Ta.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,Ta.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:p.title}),(0,Ta.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:p.lastMessage})]}),(0,Ta.jsxs)("div",{className:"flex items-start gap-1 at-0.5",children:[i&&(0,Ta.jsx)(A,{variant:"ghost",size:"icon",className:"Ta-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:u=>{u.stopPropagation(),i(p.id)},children:(0,Ta.jsx)(Eo.Edit3,{className:"Ta-3 w-3"})}),l&&(0,Ta.jsx)(A,{variant:"ghost",size:"icon",className:"Ta-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:u=>{u.stopPropagation(),l(p.id)},children:(0,Ta.jsx)(Eo.Trash2,{className:"Ta-3 w-3"})})]})]})})}),(0,Ta.jsx)(Ke,{side:"right",className:"max-w-xs",children:(0,Ta.jsxs)("div",{className:"space-y-1",children:[(0,Ta.jsx)("p",{className:"font-medium text-sm",children:p.title}),(0,Ta.jsx)("p",{className:"text-xs",children:p.lastMessage})]})})]},p.id))})})]})})})}var et=W(require("motion/react-client"));var no={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},Ye=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function ia(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function so({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:s,colorScheme:i=no,className:l}){let[n,p]=(0,at.useState)([]),[u,w]=(0,at.useState)([]),f=n[n.length-1],v=f?.children||e,T=(C,L)=>{switch(C.type){case"category":return i.categories[L%i.categories.length];case"list":return i.lists[L%i.lists.length];case"item":return i.items[L%i.items.length];default:return i.primary}},I=(0,at.useMemo)(()=>({path:n,selectedItems:u,filters:{}}),[n,u]);(0,at.useEffect)(()=>{s&&s(I)},[I,s]);let R=C=>{C.type==="category"||C.type==="list"?p([...n,C]):C.type==="item"&&w([...u,C])},x=()=>{p(n.slice(0,-1))},P=C=>{p(n.slice(0,C+1))},_=()=>f?.actions?f.actions:[];return t?(0,Ta.jsxs)("div",{className:c("w-full",l),children:[(0,Ta.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,Ta.jsxs)("div",{className:"flex items-center gap-2",children:[n.length>0&&(0,Ta.jsx)(_t.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:x,className:c("group p-1 Ta-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ta.jsx)(Eo.ChevronLeft,{className:c("Ta-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,Ta.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,Ta.jsx)(_t.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:c("group p-1 Ta-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,Ta.jsx)(Eo.X,{className:c("Ta-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),n.length>0&&(0,Ta.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,Ta.jsx)(_t.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>p([]),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ta.jsxs)("span",{className:"relative",children:["Capabilities",(0,Ta.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ta-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),n.map((C,L)=>(0,Ta.jsxs)("div",{className:"flex items-center gap-1",children:[(0,Ta.jsx)(Eo.ChevronRight,{className:"Ta-2 w-2"}),(0,Ta.jsx)(_t.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>P(L),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,Ta.jsxs)("span",{className:"relative",children:[C.name,(0,Ta.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ta-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.id))]}),(0,Ta.jsx)("div",{className:"max-Ta-40 overflow-y-auto",children:(0,Ta.jsx)(_t.AnimatePresence,{mode:"wait",children:(0,Ta.jsx)(_t.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:f?.type==="list"&&f.data?(0,Ta.jsx)($i,{data:f.data,onItemSelect:C=>w([...u,C]),colorScheme:i}):(0,Ta.jsx)(Gi,{capabilities:v,onSelect:R,colorScheme:i})},f?.id||"root")})})]}):(0,Ta.jsxs)(A,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,Ta.jsx)(Eo.Menu,{className:"Ta-4 w-4"}),(0,Ta.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Gi({capabilities:e,onSelect:t,colorScheme:a}){return(0,Ta.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,Ta.jsx)(Vi,{capability:o,onClick:()=>t(o),color:a.categories[s%a.categories.length]},o.id))})}function Vi({capability:e,onClick:t,selected:a,color:o}){return(0,Ta.jsxs)(_t.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:c("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,Ta.jsx)("div",{className:c("w-2 Ta-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,Ta.jsxs)("span",{className:"truncate relative",children:[e.name,(0,Ta.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ta-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,Ta.jsx)(Eo.ChevronRight,{className:c("Ta-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,Ta.jsx)(me,{variant:"secondary",className:c("text-xs Ta-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function $i({data:e,onItemSelect:t,colorScheme:a}){return(0,Ta.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,Ta.jsxs)(_t.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:c("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,Ta.jsx)("div",{className:c("w-2 Ta-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[s%a.items.length])}),(0,Ta.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ta.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,Ta.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 Ta-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,Ta.jsx)("div",{className:c("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,Ta.jsx)(me,{variant:"secondary",className:c("text-xs Ta-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var po=require("date-fns");function lo({taskId:e,polling:t=!0,system:a="payload"}){let[o,s]=(0,at.useState)(null),[i,l]=(0,at.useState)(!1),[n,p]=(0,at.useState)(null),u=async(f=!0)=>{if(e){f&&l(!0);try{let v=await fetch(`/api/tasks/${e}`);if(!v.ok)throw new Error(`Failed to fetch task: ${v.statusText}`);let T=await v.json();s(T)}catch(v){console.error("Error fetching task:",v),p(v instanceof Error?v:new Error("Unknown error occurred"))}finally{f&&l(!1)}}},w=()=>u(!1);return(0,at.useEffect)(()=>{e&&u(!0);let f=null;return e&&t&&(f=setInterval(w,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:o,loading:i,error:n}}var qi=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},Ki=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function mo({data:e}){let{id:t,system:a,fetchLatest:o,taskData:s,error:i}=e||{};if(!t)return null;let l=null,n=!0,p=i,u=o!==void 0?o:!0;if(l=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:u,taskData:l,error:p}),u){let{task:T,loading:I,error:R}=lo({taskId:t,system:a});l=T,n=I,p=R}else n=!1;let w=qi(l?.status||"todo"),f=Ki(l?.status||"todo"),v=l?.dateLogged||new Date().toISOString();try{let T=new Date(l?.dateLogged||"");isNaN(T.getTime())||(v=(0,po.formatDistanceToNow)(T,{addSuffix:!0}))}catch{}return(0,Ta.jsxs)(he,{className:c("w-full max-w-md shadow-md",p&&"border border-destructive"),children:[(0,Ta.jsxs)(Ue,{className:"pb-2",children:[(0,Ta.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Ta.jsx)(Be,{className:"text-lg font-semibold",children:n?"Loading...":l?.name||"Task"}),(0,Ta.jsx)(me,{className:`${w}`,children:f})]}),l?.project&&(0,Ta.jsxs)(oa,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,Ta.jsx)(De,{className:"pb-2",children:n?(0,Ta.jsx)("div",{className:"animate-pulse Ta-4 bg-gray-200 rounded w-3/4 mb-2"}):p?(0,Ta.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ta.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,Ta.jsx)(yt,{className:"at-2 flex items-center justify-between",children:(0,Ta.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ta.jsx)(Eo.Clock,{className:"Ta-3 w-3 mr-1"}),(0,Ta.jsxs)("span",{children:["Created ",v]}),(0,Ta.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ta.jsxs)("span",{children:["Task #",t]})]})})]})}function fo({artefact:e,taskId:t,taskData:a,loading:o=!1,error:s=null}){let i=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=i.dateLogged;try{let n=new Date(i.dateLogged);isNaN(n.getTime())||(l=(0,po.formatDistanceToNow)(n,{addSuffix:!0}))}catch{}return(0,Ta.jsxs)(he,{className:"w-full max-w-md shadow-md",children:[(0,Ta.jsx)(Ue,{className:"pb-2",children:(0,Ta.jsx)("div",{className:"flex justify-between items-start",children:(0,Ta.jsx)(Be,{className:"text-lg font-semibold",children:o?"Loading...":i.name})})}),(0,Ta.jsx)(De,{className:"pb-2",children:o?(0,Ta.jsx)("div",{className:"animate-pulse Ta-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,Ta.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Ta.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,Ta.jsx)(yt,{className:"at-2 flex items-center justify-between",children:(0,Ta.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Ta.jsx)(Eo.Clock,{className:"Ta-3 w-3 mr-1"}),(0,Ta.jsxs)("span",{children:["Created ",l]}),(0,Ta.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Ta.jsxs)("span",{children:["Task #",i.id]})]})})]})}var ho=W(require("react"));var bo=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:s="This endpoint requires authentication to sync functions."})=>{let[i,l]=(0,at.useState)(!1),[n,p]=(0,at.useState)(""),u=()=>{if(!t){p("No authentication URL provided");return}l(!0),p("");try{let f=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!f){p("Popup blocked. Please allow popups for this site and try again."),l(!1);return}let v=setInterval(()=>{try{f.closed&&(clearInterval(v),l(!1),o(),a())}catch{}},1e3);setTimeout(()=>{f.closed||(f.close(),clearInterval(v),l(!1),p("Authentication timed out. Please try again."))},6e5)}catch{p("Failed to open authentication window"),l(!1)}},w=async()=>{try{await navigator.clipboard.writeText(t),p("")}catch{p("Failed to copy URL to clipboard")}};return e?(0,Ta.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center Eo-[1000]",children:(0,Ta.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,Ta.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,Ta.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s}),n&&(0,Ta.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:n}),(0,Ta.jsxs)("div",{className:"flex gap-2",children:[(0,Ta.jsx)("button",{onClick:u,disabled:i||!t,className:`
|
|
6
|
+
"use strict";var ri=Object.create;var Rt=Object.defineProperty;var ni=Object.getOwnPropertyDescriptor;var si=Object.getOwnPropertyNames;var li=Object.getPrototypeOf,ci=Object.prototype.hasOwnProperty;var di=(e,t)=>{for(var a in t)Rt(e,a,{get:t[a],enumerable:!0})},Ra=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of si(t))!ci.call(e,s)&&s!==a&&Rt(e,s,{get:()=>t[s],enumerable:!(o=ni(t,s))||o.enumerable});return e};var G=(e,t,a)=>(a=e!=null?ri(li(e)):{},Ra(t||!e||!e.__esModule?Rt(a,"default",{value:e,enumerable:!0}):a,e)),pi=e=>Ra(Rt({},"__esModule",{value:!0}),e);var wr={};di(wr,{ChatDemoCapabilitiesInteraction:()=>xr,ChatDemoErrorHandling:()=>yr,ChatDemoFileUploads:()=>hr,ChatDemoMarkdownResponses:()=>br,ChatDemoToolCalling:()=>fr,ChatDemoUIComponents:()=>vr});module.exports=pi(wr);var rt=require("react");var Vo=require("@ai-sdk/react"),Kt=require("motion/react"),$o=require("lucide-react");var La=require("clsx");var Yt="-",mi=e=>{let t=gi(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let n=l.split(Yt);return n[0]===""&&n.length!==1&&n.shift(),Aa(n,t)||ui(l)},getConflictingClassGroupIds:(l,n)=>{let p=a[l]||[];return n&&o[l]?[...p,...o[l]]:p}}},Aa=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),s=o?Aa(e.slice(1),o):void 0;if(s)return s;if(t.validators.length===0)return;let r=e.join(Yt);return t.validators.find(({validator:l})=>l(r))?.classGroupId},Da=/^\[(.+)\]$/,ui=e=>{if(Da.test(e)){let t=Da.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},gi=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return bi(Object.entries(e.classGroups),a).forEach(([r,l])=>{Xt(l,o,r,t)}),o},Xt=(e,t,a,o)=>{e.forEach(s=>{if(typeof s=="string"){let r=s===""?t:Sa(t,s);r.classGroupId=a;return}if(typeof s=="function"){if(fi(s)){Xt(s(o),t,a,o);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([r,l])=>{Xt(l,Sa(t,r),a,o)})})},Sa=(e,t)=>{let a=e;return t.split(Yt).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},fi=e=>e.isThemeGetter,bi=(e,t)=>t?e.map(([a,o])=>{let s=o.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([l,n])=>[t+l,n])):r);return[a,s]}):e,vi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,s=(r,l)=>{a.set(r,l),t++,t>e&&(t=0,o=a,a=new Map)};return{get(r){let l=a.get(r);if(l!==void 0)return l;if((l=o.get(r))!==void 0)return s(r,l),l},set(r,l){a.has(r)?a.set(r,l):s(r,l)}}},Ia="!",hi=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,s=t[0],r=t.length,l=n=>{let p=[],u=0,C=0,f;for(let x=0;x<n.length;x++){let T=n[x];if(u===0){if(T===s&&(o||n.slice(x,x+r)===t)){p.push(n.slice(C,x)),C=x+r;continue}if(T==="/"){f=x;continue}}T==="["?u++:T==="]"&&u--}let h=p.length===0?n:n.substring(C),S=h.startsWith(Ia),I=S?h.substring(1):h,D=f&&f>C?f-C:void 0;return{modifiers:p,hasImportantModifier:S,baseClassName:I,maybePostfixModifierPosition:D}};return a?n=>a({className:n,parseClassName:l}):l},yi=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},xi=e=>({cache:vi(e.cacheSize),parseClassName:hi(e),...mi(e)}),wi=/\s+/,Ci=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:s}=t,r=[],l=e.trim().split(wi),n="";for(let p=l.length-1;p>=0;p-=1){let u=l[p],{modifiers:C,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:S}=a(u),I=!!S,D=o(I?h.substring(0,S):h);if(!D){if(!I){n=u+(n.length>0?" "+n:n);continue}if(D=o(h),!D){n=u+(n.length>0?" "+n:n);continue}I=!1}let x=yi(C).join(":"),T=f?x+Ia:x,_=T+D;if(r.includes(_))continue;r.push(_);let N=s(D,I);for(let L=0;L<N.length;++L){let Z=N[L];r.push(T+Z)}n=u+(n.length>0?" "+n:n)}return n};function Ni(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=Ma(t))&&(o&&(o+=" "),o+=a);return o}var Ma=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=Ma(e[o]))&&(a&&(a+=" "),a+=t);return a};function ki(e,...t){let a,o,s,r=l;function l(p){let u=t.reduce((C,f)=>f(C),e());return a=xi(u),o=a.cache.get,s=a.cache.set,r=n,n(p)}function n(p){let u=o(p);if(u)return u;let C=Ci(p,a);return s(p,C),C}return function(){return r(Ni.apply(null,arguments))}}var H=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},Ba=/^\[(?:([a-$o-]+):)?(.+)\]$/_a,Pi=/^\d+\/\d+$/,Ti=new Set(["px","full","screen"]),Ri=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Di=/\d+(%|px|r?em|[sdl]?_a([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|_a|_a|min|max))|\_a(calc|min|max|clamp)\(.+\)|^0$/,Si=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Ai=/^(inset_)?-?((\d+)?\.?(\d+)[a-$o]+|0)_-?((\d+)?\.?(\d+)[a-$o]+|0)/,Ii=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>nt(e)||Ti.has(e)||Pi.test(e),He=e=>st(e,"length",Fi),nt=e=>!!e&&!Number.isNaN(Number(e)),Qt=e=>st(e,"number",nt),bt=e=>!!e&&Number.isInteger(Number(e)),Mi=e=>e.endsWith("%")&&nt(e.slice(0,-1)),y=e=>Ba.test(e),je=e=>Ri.test(e),Bi=new Set(["length","size","percentage"]),Ei=e=>st(e,Bi,Ea),Ui=e=>st(e,"position",Ea),Li=new Set(["image","url"]),zi=e=>st(e,Li,Hi),_i=e=>st(e,"",Oi),vt=()=>!0,st=(e,t,a)=>{let o=Ba.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Fi=e=>Di.test(e)&&!Si.test(e),Ea=()=>!1,Oi=e=>Ai.test(e),Hi=e=>Ii.test(e);var ji=()=>{let e=H("colors"),t=H("spacing"),a=H("blur"),o=H("brightness"),s=H("borderColor"),r=H("borderRadius"),l=H("borderSpacing"),n=H("borderWidth"),p=H("contrast"),u=H("grayscale"),C=H("hueRotate"),f=H("invert"),h=H("gap"),S=H("gradientColorStops"),I=H("gradientColorStopPositions"),D=H("inset"),x=H("margin"),T=H("opacity"),_=H("padding"),N=H("saturate"),L=H("scale"),Z=H("sepia"),ee=H("skew"),te=H("space"),Y=H("translate"),$=()=>["auto","contain","none"],ie=()=>["auto","hidden","clip","visible","scroll"],de=()=>["auto",y,t],M=()=>[y,t],Ie=()=>["",Be,He],d=()=>["auto",nt,y],U=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],B=()=>["solid","dashed","dotted","double","none"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],m=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",y],K=()=>["auto","avoid","all","avoid-page","page","left","right","column"],w=()=>[nt,y];return{cacheSize:500,separator:":",theme:{colors:[vt],spacing:[Be,He],blur:["none","",je,y],brightness:w(),borderColor:[e],borderRadius:["none","","full",je,y],borderSpacing:M(),borderWidth:Ie(),contrast:w(),grayscale:F(),hueRotate:w(),invert:F(),gap:M(),gradientColorStops:[e],gradientColorStopPositions:[Mi,He],inset:de(),margin:de(),opacity:w(),padding:M(),saturate:w(),scale:w(),sepia:F(),skew:w(),space:M(),translate:M()},classGroups:{aspect:[{aspect:["auto","square","video",y]}],container:["container"],columns:[{columns:[je]}],"break-after":[{"break-after":K()}],"break-before":[{"break-before":K()}],"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:[...U(),y]}],overflow:[{overflow:ie()}],"overflow-x":[{"overflow-x":ie()}],"overflow-y":[{"overflow-y":ie()}],overscroll:[{overscroll:$()}],"overscroll-x":[{"overscroll-x":$()}],"overscroll-y":[{"overscroll-y":$()}],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"],$o:[{$o:["auto",bt,y]}],basis:[{basis:de()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",y]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",bt,y]}],"grid-cols":[{"grid-cols":[vt]}],"col-start-end":[{col:["auto",{span:["full",bt,y]},y]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[vt]}],"row-start-end":[{row:["auto",{span:[bt,y]},y]}],"row-start":[{"row-start":d()}],"row-end":[{"row-end":d()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",y]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",y]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...m()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...m(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...m(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[_]}],px:[{px:[_]}],py:[{py:[_]}],ps:[{ps:[_]}],rt:[{rt:[_]}],pt:[{pt:[_]}],pr:[{pr:[_]}],pb:[{pb:[_]}],pl:[{pl:[_]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],rt:[{rt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[te]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[te]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",y,t]}],"min-w":[{"min-w":[y,t,"min","max","fit"]}],"max-w":[{"max-w":[y,t,"none","full","min","max","fit","prose",{screen:[je]},je]}],h:[{h:[y,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[y,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[y,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[y,t,"auto","min","max","fit"]}],"font-size":[{text:["base",je,He]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Qt]}],"font-family":[{font:[vt]}],"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",y]}],"line-clamp":[{"line-clamp":["none",nt,Qt]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,y]}],"list-image":[{"list-image":["none",y]}],"list-style-type":[{list:["none","disc","decimal",y]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[T]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...B(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,He]}],"underline-offset":[{"underline-offset":["auto",Be,y]}],"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:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",y]}],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",y]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[T]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...U(),Ui]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ei]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","_a","bl","l","tl"]},zi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[I]}],"gradient-via-pos":[{via:[I]}],"gradient-to-pos":[{to:[I]}],"gradient-from":[{from:[S]}],"gradient-via":[{via:[S]}],"gradient-to":[{to:[S]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-_a":[{"rounded-_a":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-$o":[{"rounded-$o":[r]}],"rounded-ee":[{"rounded-ee":[r]}],"rounded-es":[{"rounded-es":[r]}],"rounded-tl":[{"rounded-tl":[r]}],"rounded-tr":[{"rounded-tr":[r]}],"rounded-br":[{"rounded-br":[r]}],"rounded-bl":[{"rounded-bl":[r]}],"border-w":[{border:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-_a":[{"border-_a":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[T]}],"border-style":[{border:[...B(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[T]}],"divide-style":[{divide:B()}],"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-_a":[{"border-_a":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...B()]}],"outline-offset":[{"outline-offset":[Be,y]}],"outline-w":[{outline:[Be,He]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Ie()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-w":[{"ring-offset":[Be,He]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",je,_i]}],"shadow-color":[{shadow:[vt]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...q(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":q()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",je,y]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[C]}],invert:[{invert:[f]}],saturate:[{saturate:[N]}],sepia:[{sepia:[Z]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[C]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[N]}],"backdrop-sepia":[{"backdrop-sepia":[Z]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",y]}],duration:[{duration:w()}],ease:[{ease:["linear","in","out","in-out",y]}],delay:[{delay:w()}],animate:[{animate:["none","spin","ping","pulse","bounce",y]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[bt,y]}],"translate-x":[{"translate-x":[Y]}],"translate-y":[{"translate-y":[Y]}],"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",y]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","$o-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",y]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-rt":[{"scroll-rt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-rt":[{"scroll-rt":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",y]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Be,He,Qt]}],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","rt","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","rt","mr","mb","ml"],mx:["mr","ml"],my:["rt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-_a","rounded-l","rounded-ss","rounded-$o","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-$o","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-_a":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-_a","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-_a"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-_a","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-_a"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-rt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-rt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-rt","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 Ua=ki(ji);function c(...e){return Ua((0,La.clsx)(e))}var Ut=G(require("react")),ra=G(require("next/link"));var za=require("class-variance-authority");var _a=require("react/jsx-runtime"),Wi=(0,za.cva)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function ne({className:e,variant:t,...a}){return(0,_a.jsx)("div",{className:c(Wi({variant:t}),e),...a})}var Fa=require("@radix-ui/react-slot"),Ha=G(require("react")),Gi=(0,za.cva)("inline-flex items-center justify-center whitespace-nowrap rounded text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{defaultVariants:{size:"default",variant:"default"},variants:{size:{clear:"",default:"h-10 px-4 py-2",icon:"h-10 w-10",lg:"h-11 rounded px-8",sm:"h-9 rounded px-3"},variant:{default:"bg-accent text-accent-foreground hover:bg-background hover:text-accent hover:border-accent hover:border",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",ghost:"hover:bg-card hover:text-accent",link:"text-primary items-start justify-start underline-offset-4 hover:underline",outline:"border border-border bg-background hover:bg-card hover:text-accent",secondary:"bg-secondary text-secondary-foreground hover:bg-accent"}}}),A=Ha.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...s},r)=>(0,_a.jsx)(e?Fa.Slot:"button",{className:c(Gi({className:t,size:a,variant:o})),ref:r,...s}));A.displayName="Button";var Wa=G(require("react"));var ht=Wa.forwardRef(({className:e,type:t,...a},o)=>(0,_a.jsx)("input",{type:t,className:c("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...a}));ht.displayName="Input";var Zt=G(require("react")),be=G(require("@radix-ui/react-scroll-area"));var Pe=Zt.forwardRef(({className:e,children:t,...a},o)=>(0,_a.jsxs)(be.Root,{ref:o,className:c("relative overflow-hidden",e),...a,children:[(0,_a.jsx)(be.Viewport,{className:"h-full w-full rounded-[inherit]",children:t}),(0,_a.jsx)(Va,{}),(0,_a.jsx)(be.Corner,{})]}));Pe.displayName=be.Root.displayName;var Va=Zt.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,_a.jsx)(be.ScrollAreaScrollbar,{ref:o,orientation:t,className:c("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,_a.jsx)(be.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));Va.displayName=be.ScrollAreaScrollbar.displayName;var yt=G(require("react")),J=G(require("@radix-ui/react-dialog"));var qa=J.Root;var Vi=J.Portal;var Ka=yt.forwardRef(({className:e,...t},a)=>(0,_a.jsx)(J.Overlay,{ref:a,className:c("fixed inset-0 $o-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}));Ka.displayName=J.Overlay.displayName;var ea=yt.forwardRef(({className:e,children:t,...a},o)=>(0,_a.jsxs)(Vi,{children:[(0,_a.jsx)(Ka,{}),(0,_a.jsxs)(J.Content,{ref:o,className:c("fixed left-[50%] top-[50%] $o-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...a,children:[t,(0,_a.jsxs)(J.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,_a.jsx)($a._a,{className:"h-4 w-4"}),(0,_a.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));ea.displayName=J.Content.displayName;var ta=({className:e,...t})=>(0,_a.jsx)("div",{className:c("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ta.displayName="DialogHeader";var $_a=({className:e,...t})=>(0,_a.jsx)("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});$_a.displayName="DialogFooter";var aa=yt.forwardRef(({className:e,...t},a)=>(0,_a.jsx)(J.Title,{ref:a,className:c("text-lg font-semibold leading-none tracking-tight",e),...t}));aa.displayName=J.Title.displayName;var qi=yt.forwardRef(({className:e,...t},a)=>(0,_a.jsx)(J.Description,{ref:a,className:c("text-sm text-muted-foreground",e),...t}));qi.displayName=J.Description.displayName;var xt=G(require("@radix-ui/react-checkbox")),Qa=G(require("react")),oa=Qa.forwardRef(({className:e,...t},a)=>(0,_a.jsx)(xt.Root,{className:c("peer h-4 w-4 shrink-0 rounded border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),ref:a,...t,children:(0,_a.jsx)(xt.Indicator,{className:c("flex items-center justify-center text-current"),children:(0,_a.jsx)($o.Check,{className:"h-4 w-4"})})}));oa.displayName=xt.Root.displayName;var Te=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Ya=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,_a.jsx)($o.Palette,{className:"h-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,_a.jsx)($o.Code,{className:"h-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,_a.jsx)($o.TrendingUp,{className:"h-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,_a.jsx)($o.DollarSign,{className:"h-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,_a.jsx)($o.Users,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,_a.jsx)($o.Wrench,{className:"h-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,_a.jsx)($o.Scale,{className:"h-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,_a.jsx)($o.Package,{className:"h-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,_a.jsx)($o.Zap,{className:"h-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,_a.jsx)($o.Building2,{className:"h-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],It=[{id:"1",name:"_a-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 ia=[{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}],St=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],Bt=[{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")}],Ki=[...Bt,{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")}],Ji=[...It,{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}],At={projects:[{id:"1",name:"Empty Project",description:"A project with no tasks",isSelected:!0}],epics:[],sprints:[{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0}],tasks:[]},Xa={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:Bt.filter(e=>e.epicId==="1")};var Wr={empty:{initialProjects:At.projects,initialEpics:At.epics,initialSprints:At.sprints,initialTasks:At.tasks},default:{initialProjects:It,initialEpics:ia,initialSprints:St,initialTasks:Bt},highDensity:{initialProjects:It,initialEpics:ia,initialSprints:St,initialTasks:Ki},singleEpic:{initialProjects:It,initialEpics:Xa.epics,initialSprints:St,initialTasks:Xa.tasks},multipleProjects:{initialProjects:Ji,initialEpics:ia,initialSprints:St,initialTasks:Bt}},Mt=[{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(Te),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Te),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(Te),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Te),version:"52",lastUpdated:new Date("2024-02-10"),isActive:!0},{id:"5",type:"human",name:"Emily Rodriguez",email:"emily.rodriguez@company.com",role:"UX Researcher",department:"Design",status:"inactive",joinedDate:new Date("2023-06-10"),lastActive:new Date(Date.now()-7*24*60*60*1e3),phone:"+1 (555) 456-7890",location:"Austin, TX",timezone:"CST",skills:["User Research","Usability Testing","Data Analysis","Survey Design","Interview Techniques"],bio:"User researcher dedicated to understanding user needs and improving product experiences."},{id:"6",type:"digital",name:"DataAnalyzer Pro",status:"active",joinedDate:new Date("2024-01-10"),lastActive:new Date,jobDescription:"Advanced AI assistant specializing in data analysis, reporting, and business intelligence.",workInstructions:"Analyze complex datasets, generate insightful reports, create data visualizations, and provide actionable business recommendations.",capabilities:["Data Analysis","Report Generation","Data Visualization","Business Intelligence","Statistical Analysis"],knowledge:["Python","SQL","Tableau","Excel","R","Statistics"].map(Te),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Te),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(Te),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Te),version:"2.5",lastUpdated:new Date("2024-02-15"),isActive:!0},{id:"8",type:"digital",name:"CustomerSupport Bot",status:"active",joinedDate:new Date("2024-02-01"),lastActive:new Date,jobDescription:"AI-powered customer support assistant that handles inquiries, resolves issues, and escalates complex problems.",workInstructions:"Respond to customer inquiries, troubleshoot common issues, provide product information, and escalate complex cases to human agents.",capabilities:["Customer Support","Issue Resolution","Product Knowledge","Escalation Management","Chat Support"],knowledge:["Product Documentation","FAQ","Troubleshooting Guides","Customer Service Best Practices"].map(Te),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Te),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Gr=[{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:Mt.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:Mt.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:Mt.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 Vr=Mt.filter(e=>e.type==="digital");function Za(e,t){let[a,o]=(0,rt.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),s=r=>{try{o(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,rt.useEffect)(()=>{s(a)},[]),[a,s]}function na({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:s=Ya[0],onBusinessUnitChange:r,onSearch:l,className:n,logo:p="/headerlogo.png",appName:u="Nuvia",tagline:C="Collaboration Platform"}){let[f,h]=Ut.useState({}),[S,I]=Za("sidebar-favorites",{}),[D,x]=Ut.useState(null),[T,_]=Ut.useState(""),N=d=>{h(U=>({...U,[d]:!U[d]}))},L=d=>{r?.(d)},Z=()=>{T.trim()&&l?.(T.trim())},ee=d=>{d.key==="Enter"&&(d.preventDefault(),Z())},te=(d,U)=>{let B=S[d]||[],q=B.includes(U)?B.filter(m=>m!==U):B.concat(U);I({...S,[d]:q})},Y=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let U=S[d.id]||[],B=d.items.filter(m=>U.includes(m.id)),q=d.items.filter(m=>!U.includes(m.id));return[...B,...q].slice(0,d.maxItems)},$=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,ie=e,de=d=>{let U=$(d),B=Y(d),q=(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,_a.jsx)("span",{children:d.title})]}),d.badge&&(0,_a.jsx)(ne,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,_a.jsx)($o.ChevronDown,{className:c("ml-2 h-4 w-4 transition-transform",f[d.title]?"rotate-180":"")})]}),m=c("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",d.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return d.url?(0,_a.jsx)(ra.default,{href:d.url,className:m,onClick:a?o:void 0,children:q}):(0,_a.jsx)("button",{className:m,onClick:()=>d.items&&N(d.title),children:q})},M=()=>{let d=e.find(B=>B.id===D);if(!d||!d.items||!d.maxItems)return null;let U=S[d.id]||[];return(0,_a.jsx)(qa,{open:!!D,onOpenChange:B=>!B&&x(null),children:(0,_a.jsxs)(ea,{className:"sm:max-w-md",children:[(0,_a.jsxs)(ta,{children:[(0,_a.jsxs)(aa,{children:["Manage ",d.title," Favorites"]}),(0,_a.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,_a.jsx)(Pe,{className:"max-h-96 pr-4",children:(0,_a.jsx)("div",{className:"space-y-4",children:d.items.map(B=>(0,_a.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,_a.jsx)(oa,{id:B.id,checked:U.includes(B.id),onCheckedChange:()=>te(d.id,B.id),disabled:!U.includes(B.id)&&U.length>=(d.maxItems||0)}),(0,_a.jsxs)("label",{htmlFor:B.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:[B.title,B.badge&&(0,_a.jsx)(ne,{variant:"outline",className:"text-xs",children:B.badge})]})]},B.id))})})]})})},Ie=(0,_a.jsxs)("div",{className:"flex h-full flex-col bg-background",children:[(0,_a.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,_a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,_a.jsx)("div",{className:"flex h-14 w-14 items-center justify-center",children:(0,_a.jsx)("img",{src:p,alt:"Header Logo",className:"h-14 w-14 object-contain"})}),(0,_a.jsxs)("div",{children:[(0,_a.jsx)("h2",{className:"font-semibold",children:u}),(0,_a.jsx)("p",{className:"text-xs text-muted-foreground",children:C})]})]}),a&&(0,_a.jsx)(A,{variant:"ghost",size:"icon",onClick:o,children:(0,_a.jsx)($o._a,{className:"h-5 w-5"})})]}),(0,_a.jsx)("div",{className:"px-3 py-2",children:(0,_a.jsxs)("div",{className:"relative",children:[(0,_a.jsx)($o.Search,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),(0,_a.jsx)(ht,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:T,onChange:d=>_(d.target.value),onKeyPress:ee})]})}),(0,_a.jsx)(Pe,{className:"flex-1 px-3 py-2",children:(0,_a.jsx)("div",{className:"space-y-1",children:ie.map(d=>(0,_a.jsxs)("div",{className:"mb-1",children:[de(d),d.items&&f[d.title]&&(0,_a.jsxs)("div",{className:"rt-1 ml-6 space-y-1 border-l pl-3",children:[Y(d).map(U=>(0,_a.jsxs)(ra.default,{href:U.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[U.title,U.badge&&(0,_a.jsx)(ne,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:U.badge})]},U.id)),$(d)&&d.items&&d.items.length>Y(d).length&&(0,_a.jsxs)("button",{onClick:()=>x(d.id),className:"w-full px-3 py-2 text-xs text-muted-foreground hover:text-foreground hover:bg-muted rounded-2xl transition-colors text-left",children:["...",d.items.length-Y(d).length," more available"]})]})]},d.id))})}),(0,_a.jsx)("div",{className:"p-3",children:(0,_a.jsx)("div",{className:"space-y-1",children:(0,_a.jsxs)("button",{className:"flex w-full items-center gap-3 rounded-2xl px-3 py-2 text-sm font-medium hover:bg-muted",children:[(0,_a.jsx)($o.Settings,{className:"h-5 w-5"}),(0,_a.jsx)("span",{children:"Settings"})]})})}),(0,_a.jsx)(M,{})]});return a?(0,_a.jsx)("div",{className:c("fixed inset-y-0 left-0 $o-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:Ie}):(0,_a.jsx)("div",{className:c("fixed inset-y-0 left-0 $o-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",n),children:Ie})}var Lt=G(require("react")),Ee=G(require("@radix-ui/react-avatar"));var Je=Lt.forwardRef(({className:e,...t},a)=>(0,_a.jsx)(Ee.Root,{ref:a,className:c("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Je.displayName=Ee.Root.displayName;var sa=Lt.forwardRef(({className:e,...t},a)=>(0,_a.jsx)(Ee.Image,{ref:a,className:c("aspect-square h-full w-full",e),...t}));sa.displayName=Ee.Image.displayName;var Qe=Lt.forwardRef(({className:e,...t},a)=>(0,_a.jsx)(Ee.Fallback,{ref:a,className:c("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Qe.displayName=Ee.Fallback.displayName;var eo=G(require("react")),we=G(require("@radix-ui/react-tooltip"));var lt=we.Provider,ct=we.Root,dt=we.Trigger,Xe=eo.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,_a.jsx)(we.Portal,{children:(0,_a.jsx)(we.Content,{ref:o,sideOffset:t,className:c("$o-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})}));Xe.displayName=we.Content.displayName;var to=require("next-themes");function ao(){let{setTheme:e,theme:t}=(0,to.useTheme)();return(0,_a.jsx)(lt,{children:(0,_a.jsxs)(ct,{children:[(0,_a.jsx)(dt,{asChild:!0,children:(0,_a.jsxs)(A,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,_a.jsx)($o.Sun,{className:"h-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,_a.jsx)($o.Moon,{className:"absolute h-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,_a.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,_a.jsx)(Xe,{children:"Toggle theme"})]})})}function oo({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:s,className:r}){let l=e.filter(u=>!u.read),n=l.length,p=u=>{switch(u){case"info":return(0,_a.jsx)($o.Info,{className:"h-5 w-5 text-blue-500"});case"success":return(0,_a.jsx)($o.Check,{className:"h-5 w-5 text-green-500"});case"warning":return(0,_a.jsx)($o.AlertTriangle,{className:"h-5 w-5 text-amber-500"});case"error":return(0,_a.jsx)($o.AlertTriangle,{className:"h-5 w-5 text-red-500"})}};return(0,_a.jsx)(Kt.AnimatePresence,{children:t&&(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsx)(Kt.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 $o-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,_a.jsx)(Kt.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:c("fixed inset-y-0 right-0 $o-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",r),children:(0,_a.jsxs)("div",{className:"flex h-full flex-col",children:[(0,_a.jsxs)("div",{className:"flex items-center justify-between border-_a p-4",children:[(0,_a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_a.jsx)($o.Bell,{className:"h-5 w-5"}),(0,_a.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),n>0&&(0,_a.jsxs)(ne,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[n," new"]})]}),(0,_a.jsxs)(A,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,_a.jsx)($o._a,{className:"h-5 w-5"}),(0,_a.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n>0&&(0,_a.jsxs)("div",{className:"flex items-center justify-between border-_a p-2",children:[(0,_a.jsxs)("span",{className:"text-sm text-muted-foreground",children:[n," unread notification",n!==1?"s":""]}),(0,_a.jsx)(A,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),l.length>0?(0,_a.jsx)(Pe,{className:"flex-1",children:(0,_a.jsx)("div",{className:"divide-y",children:l.map(u=>(0,_a.jsxs)("div",{className:c("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,_a.jsx)("div",{className:"flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:p(u.type)}),(0,_a.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,_a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_a.jsx)("p",{className:"font-medium",children:u.title}),(0,_a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_a.jsx)("p",{className:"text-xs text-muted-foreground",children:u.time}),(0,_a.jsx)(A,{variant:"ghost",size:"sm",className:"h-6 w-6 p-0",onClick:()=>o?.(u.id),title:"Dismiss",children:(0,_a.jsx)($o.Check,{className:"h-3 w-3"})})]})]}),(0,_a.jsx)("p",{className:"text-sm text-muted-foreground",children:u.description}),u.actionLabel&&(0,_a.jsxs)(A,{variant:"link",size:"sm",className:"h-auto p-0 text-sm",onClick:u.onAction,children:[u.actionLabel,(0,_a.jsx)($o.ChevronRight,{className:"ml-1 h-3 w-3"})]})]})]},u.id))})}):(0,_a.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,_a.jsx)("div",{className:"flex h-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,_a.jsx)($o.Bell,{className:"h-8 w-8 text-muted-foreground"})}),(0,_a.jsx)("h3",{className:"rt-4 text-lg font-medium",children:"$o notifications"}),(0,_a.jsx)("p",{className:"rt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Ye=G(require("@radix-ui/react-tabs"));function io({className:e,...t}){return(0,_a.jsx)(Ye.Root,{"data-slot":"tabs",className:c("flex flex-col gap-2",e),...t})}function ro({className:e,...t}){return(0,_a.jsx)(Ye.List,{"data-slot":"tabs-list",className:c("bg-muted text-muted-foreground inline-flex h-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function no({className:e,...t}){return(0,_a.jsx)(Ye.Trigger,{"data-slot":"tabs-trigger",className:c("data-[state=active]:bg-accent data-[state=active]:text-accent-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring text-foreground inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap transition-[color,box-shadow] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}var Ue=G(require("react")),R=G(require("@radix-ui/react-dropdown-menu")),pt=require("@radix-ui/react-icons");var so=R.Root,lo=R.Trigger;var Qi=Ue.forwardRef(({className:e,inset:t,children:a,...o},s)=>(0,_a.jsxs)(R.SubTrigger,{ref:s,className:c("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,_a.jsx)(pt.ChevronRightIcon,{className:"ml-auto"})]}));Qi.displayName=R.SubTrigger.displayName;var Xi=Ue.forwardRef(({className:e,...t},a)=>(0,_a.jsx)(R.SubContent,{ref:a,className:c("$o-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Xi.displayName=R.SubContent.displayName;var ca=Ue.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,_a.jsx)(R.Portal,{children:(0,_a.jsx)(R.Content,{ref:o,sideOffset:t,className:c("$o-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));ca.displayName=R.Content.displayName;var da=Ue.forwardRef(({className:e,inset:t,...a},o)=>(0,_a.jsx)(R.Item,{ref:o,className:c("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}));da.displayName=R.Item.displayName;var Yi=Ue.forwardRef(({className:e,children:t,checked:a,...o},s)=>(0,_a.jsxs)(R.CheckboxItem,{ref:s,className:c("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,_a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,_a.jsx)(R.ItemIndicator,{children:(0,_a.jsx)(pt.CheckIcon,{className:"h-4 w-4"})})}),t]}));Yi.displayName=R.CheckboxItem.displayName;var Zi=Ue.forwardRef(({className:e,children:t,...a},o)=>(0,_a.jsxs)(R.RadioItem,{ref:o,className:c("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,_a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,_a.jsx)(R.ItemIndicator,{children:(0,_a.jsx)(pt.DotFilledIcon,{className:"h-4 w-4 fill-current"})})}),t]}));Zi.displayName=R.RadioItem.displayName;var er=Ue.forwardRef(({className:e,inset:t,...a},o)=>(0,_a.jsx)(R.Label,{ref:o,className:c("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));er.displayName=R.Label.displayName;var tr=Ue.forwardRef(({className:e,...t},a)=>(0,_a.jsx)(R.Separator,{ref:a,className:c("-mx-1 my-1 h-px bg-muted",e),...t}));tr.displayName=R.Separator.displayName;var ar=({className:e,...t})=>(0,_a.jsx)("span",{className:c("ml-auto text-xs tracking-widest opacity-60",e),...t});ar.displayName="DropdownMenuShortcut";function po({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:s="700px",gridCols:r=6}){let l=a.find(n=>n.value===e);return(0,_a.jsxs)(Kt.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,_a.jsx)("div",{className:"hidden lg:block",children:(0,_a.jsx)(io,{value:e,onValueChange:t,children:(0,_a.jsx)(ro,{className:"grid w-full rounded-2xl p-0 h-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,_a.jsx)(Kt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,_a.jsx)(no,{value:n.value,className:"w-full h-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,_a.jsx)("div",{className:"lg:hidden",children:(0,_a.jsxs)(so,{children:[(0,_a.jsx)(lo,{asChild:!0,children:(0,_a.jsxs)(A,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[l?.label||"Select",(0,_a.jsx)($o.ChevronDown,{className:"h-4 w-4 ml-2"})]})}),(0,_a.jsx)(ca,{align:"center",className:"w-[180px]",children:a.map(n=>(0,_a.jsx)(da,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function mo({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:s=!0,className:r,activeTab:l="assistant",onTabChange:n,showTabs:p=!0,tabOptions:u=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:C,actionIcon:f=(0,_a.jsx)($e.Bot,{className:"mr-2 h-4 w-4"}),actionText:h="Action",onNotificationRemove:S,onRemoveAll:I,logo:D="/headerlogo.png",appName:x="Nuvia",tagline:T="Collaboration Platform"}){let[_,N]=(0,rt.useState)(!1),[L,Z]=(0,rt.useState)(t),ee=L.filter($=>!$.read).length,te=$=>{Z(ie=>ie.filter(de=>de.id!==$)),S?.($)},Y=()=>{Z($=>$.filter(ie=>ie.read)),I?.()};return(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsxs)("header",{className:`sticky top-0 $o-10 flex h-16 items-center gap-3 pl-2 pr-4 backdrop-blur ${r||""}`,children:[(0,_a.jsx)(A,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,_a.jsx)($e.Menu,{className:"h-5 w-5"})}),(0,_a.jsx)(A,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,_a.jsx)($e.PanelLeft,{className:"h-5 w-5"})}),!s&&(0,_a.jsxs)(Kt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,_a.jsx)("div",{className:"flex h-10 w-10 items-center justify-center",children:(0,_a.jsx)("img",{src:D,alt:"Logo",className:"h-10 w-10 object-contain"})}),(0,_a.jsxs)("div",{children:[(0,_a.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,_a.jsx)("p",{className:"text-xs text-muted-foreground",children:T})]})]}),(0,_a.jsxs)("div",{className:"flex flex-1 items-center",children:[p&&(0,_a.jsx)(po,{activeTab:l,onTabChange:n,tabOptions:u}),(0,_a.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,_a.jsx)(Kt.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,_a.jsx)(Kt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,_a.jsxs)(A,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:C,children:[f,h]})})}),(0,_a.jsx)(ao,{}),(0,_a.jsx)(lt,{children:(0,_a.jsxs)(ct,{children:[(0,_a.jsx)(dt,{asChild:!0,children:(0,_a.jsx)(Kt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,_a.jsxs)(A,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>N(!0),children:[(0,_a.jsx)(Kt.motion.div,{animate:ee>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:ee>0?1/0:0,repeatDelay:3},children:(0,_a.jsx)($e.Bell,{className:"h-5 w-5"})}),ee>0&&(0,_a.jsx)(Kt.motion.span,{className:"absolute -right-1 -top-1 flex h-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:ee})]})})}),(0,_a.jsx)(Xe,{children:"Notifications"})]})}),(0,_a.jsx)(Kt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,_a.jsxs)(Je,{className:"h-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,_a.jsx)(sa,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,_a.jsx)(Qe,{})]})})]})]})]}),(0,_a.jsx)(oo,{notifications:L,open:_,onClose:()=>N(!1),onNotificationRemove:te,onRemoveAll:Y})]})}var uo=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,_a.jsx)($o.User,{className:"h-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function fo({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:s=uo[0],onBusinessUnitChange:r,onSearch:l,businessUnits:n=uo,activeTab:p,onTabChange:u,showTabs:C=!1,onActionClick:f,actionIcon:h,actionText:S="Action",onNotificationRemove:I,onRemoveAll:D,logo:x="/headerlogo.png",appName:T="Nuvia",tagline:_="Collaboration Platform",sidebarInitiallyClosed:N=!1}){let[L,Z]=(0,rt.useState)(!N),[ee,te]=(0,rt.useState)(!1),[Y,$]=(0,rt.useState)(s),ie=de=>{$(de),r?.(de)};return(0,_a.jsxs)("div",{className:"flex h-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[ee&&(0,_a.jsx)("div",{className:"fixed inset-0 $o-40 bg-black/50 md:hidden",onClick:()=>te(!1)}),(0,_a.jsx)("div",{className:"md:hidden",children:(0,_a.jsx)(na,{items:e,isOpen:ee,isMobile:!0,onClose:()=>te(!1),currentBusinessUnit:Y,onBusinessUnitChange:ie,onSearch:l,logo:x,appName:T,tagline:_})}),(0,_a.jsx)("div",{className:"hidden md:block",children:(0,_a.jsx)(na,{items:e,isOpen:L,isMobile:!1,currentBusinessUnit:Y,onBusinessUnitChange:ie,onSearch:l,logo:x,appName:T,tagline:_})}),(0,_a.jsxs)("div",{className:c("min-h-screen fixed w-full transition-all duration-300 ease-in-out",L?"md:pl-64":"md:pl-0"),children:[(0,_a.jsx)(mo,{title:a,notifications:o,onToggleSidebar:()=>Z(!L),onToggleMobileMenu:()=>te(!0),sidebarOpen:L,activeTab:p,onTabChange:u,showTabs:C,onActionClick:f,actionIcon:h,actionText:S,onNotificationRemove:I,onRemoveAll:D,logo:x,appName:T,tagline:_}),(0,_a.jsx)("main",{className:"flex-1 p-0 flex flex-col h-[calc(100vh-4rem)] overflow-hidden",children:t})]})]})}var Ze=G(require("react"));var he=Ze.forwardRef(({className:e,...t},a)=>(0,_a.jsx)("div",{ref:a,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));he.displayName="Card";var Le=Ze.forwardRef(({className:e,...t},a)=>(0,_a.jsx)("div",{ref:a,className:c("flex flex-col space-y-1.5 p-6",e),...t}));Le.displayName="CardHeader";var ze=Ze.forwardRef(({className:e,...t},a)=>(0,_a.jsx)("div",{ref:a,className:c("font-semibold leading-none tracking-tight",e),...t}));ze.displayName="CardTitle";var ua=Ze.forwardRef(({className:e,...t},a)=>(0,_a.jsx)("div",{ref:a,className:c("text-sm text-muted-foreground",e),...t}));ua.displayName="CardDescription";var De=Ze.forwardRef(({className:e,...t},a)=>(0,_a.jsx)("div",{ref:a,className:c("p-6 pt-0",e),...t}));De.displayName="CardContent";var Ct=Ze.forwardRef(({className:e,...t},a)=>(0,_a.jsx)("div",{ref:a,className:c("flex items-center p-6 pt-0",e),...t}));Ct.displayName="CardFooter";function bo({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:s,onSessionEdit:r,onSessionDelete:l,className:n}){return(0,_a.jsx)(lt,{children:(0,_a.jsx)("div",{className:`space-y-4 h-full ${n||""}`,children:(0,_a.jsxs)(he,{className:"shadow-sm h-full",children:[(0,_a.jsx)("div",{className:"p-4 border-_a",children:(0,_a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,_a.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,_a.jsx)($o.Clock,{className:"h-4 w-4"}),"Recent Chats"]}),(0,_a.jsxs)(A,{onClick:o,size:"sm",className:"gap-1 h-7 px-2 rounded-lg shadow-sm",children:[(0,_a.jsx)($o.Plus,{className:"h-3 w-3"}),"New"]})]})}),(0,_a.jsx)(Pe,{className:"h-[600px]",children:(0,_a.jsx)("div",{className:"p-2",children:e.length===0?(0,_a.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"$o chat sessions yet"}):e.map(p=>(0,_a.jsxs)(ct,{children:[(0,_a.jsx)(dt,{asChild:!0,children:(0,_a.jsx)("div",{className:c("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===p.id&&"bg-muted border"),onClick:()=>s(p),children:(0,_a.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,_a.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,_a.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:p.title}),(0,_a.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:p.lastMessage})]}),(0,_a.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[r&&(0,_a.jsx)(A,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:u=>{u.stopPropagation(),r(p.id)},children:(0,_a.jsx)($o.Edit3,{className:"h-3 w-3"})}),l&&(0,_a.jsx)(A,{variant:"ghost",size:"icon",className:"h-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:u=>{u.stopPropagation(),l(p.id)},children:(0,_a.jsx)($o.Trash2,{className:"h-3 w-3"})})]})]})})}),(0,_a.jsx)(Xe,{side:"right",className:"max-w-xs",children:(0,_a.jsxs)("div",{className:"space-y-1",children:[(0,_a.jsx)("p",{className:"font-medium text-sm",children:p.title}),(0,_a.jsx)("p",{className:"text-xs",children:p.lastMessage})]})})]},p.id))})})]})})})}var ot=G(require("motion/react-client"));var vo={primary:"bg-blue-500",secondary:"bg-gray-500",accent:"bg-purple-500",categories:["bg-green-500","bg-blue-500","bg-purple-500","bg-pink-500","bg-indigo-500","bg-orange-500"],lists:["bg-green-400","bg-blue-400","bg-purple-400","bg-pink-400","bg-indigo-400","bg-orange-400"],items:["bg-green-300","bg-blue-300","bg-purple-300","bg-pink-300","bg-indigo-300","bg-orange-300"]},tt=[{id:"sales",name:"Sales",description:"Revenue and customer management",iconName:"DollarSign",color:"bg-green-600",type:"category",actions:[{id:"view-pipeline",label:"View Pipeline",description:"See all opportunities in pipeline",iconName:"BarChart",action:e=>console.log("View pipeline",e)},{id:"create-opportunity",label:"Create Opportunity",iconName:"Target",action:e=>console.log("Create opportunity",e)}],children:[{id:"customers",name:"Customers",description:"Customer accounts and contacts",iconName:"Users",color:"bg-blue-500",type:"list",actions:[{id:"add-customer",label:"Add Customer",iconName:"User",action:e=>console.log("Add customer",e)},{id:"export-customers",label:"Export List",iconName:"FileText",action:e=>console.log("Export customers",e)}],data:[{id:"acme-corp",title:"Acme Corp",subtitle:"Enterprise Customer",value:"$125K ARR",metadata:{industry:"Technology",employees:500,lastContact:"2024-01-15"}},{id:"beta-inc",title:"Beta Inc",subtitle:"Mid-market",value:"$45K ARR",metadata:{industry:"Healthcare",employees:150,lastContact:"2024-01-10"}},{id:"gamma-llc",title:"Gamma LLC",subtitle:"Small Business",value:"$15K ARR",metadata:{industry:"Manufacturing",employees:50,lastContact:"2024-01-08"}}]},{id:"opportunities",name:"Opportunities",description:"Sales opportunities and deals",iconName:"Target",color:"bg-yellow-500",type:"list",actions:[{id:"close-won",label:"Mark as Won",iconName:"CheckCircle",action:e=>console.log("Close won",e)},{id:"schedule-followup",label:"Schedule Follow-up",iconName:"Clock",action:e=>console.log("Schedule follow-up",e)}],data:[{id:"opp-1",title:"Acme Corp - Enterprise License",subtitle:"Closing Q1 2024",value:"$85K",metadata:{stage:"Negotiation",probability:80,closeDate:"2024-03-31"}},{id:"opp-2",title:"Beta Inc - Platform Upgrade",subtitle:"Closing Q2 2024",value:"$32K",metadata:{stage:"Proposal",probability:65,closeDate:"2024-06-15"}}]}]},{id:"marketing",name:"Marketing",description:"Marketing campaigns and analytics",iconName:"TrendingUp",color:"bg-pink-600",type:"category",actions:[{id:"view-analytics",label:"View Analytics",iconName:"BarChart",action:e=>console.log("View analytics",e)}],children:[{id:"campaigns",name:"Campaigns",description:"Marketing campaigns and performance",iconName:"TrendingUp",color:"bg-pink-500",type:"list",data:[{id:"campaign-1",title:"Q1 Product Launch",subtitle:"Active Campaign",value:"45% CTR",metadata:{budget:"$50K",spend:"$32K",leads:1250}},{id:"campaign-2",title:"Holiday Promotion",subtitle:"Completed",value:"38% CTR",metadata:{budget:"$25K",spend:"$24K",leads:890}}]}]},{id:"projects",name:"Projects",description:"Project management and tracking",iconName:"Briefcase",color:"bg-blue-600",type:"category",children:[{id:"active-projects",name:"Active Projects",description:"Currently active projects",iconName:"Activity",color:"bg-blue-500",type:"list",data:[{id:"project-1",title:"Website Redesign",subtitle:"In Progress",value:"75% Complete",metadata:{team:"Design",deadline:"2024-02-15",status:"On Track"}},{id:"project-2",title:"Mobile App Development",subtitle:"Planning",value:"25% Complete",metadata:{team:"Engineering",deadline:"2024-03-31",status:"On Track"}}]}]},{id:"engineering",name:"Engineering",description:"Development and technical operations",iconName:"Code",color:"bg-purple-600",type:"category",actions:[{id:"view-repos",label:"View Repositories",description:"See all code repositories",iconName:"Git",action:e=>console.log("View repositories",e)},{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)}],children:[{id:"repositories",name:"Repositories",description:"Code repositories and projects",iconName:"GitBranch",color:"bg-purple-500",type:"list",actions:[{id:"create-repo",label:"Create Repository",iconName:"Plus",action:e=>console.log("Create repository",e)},{id:"view-commits",label:"View Commits",iconName:"Git",action:e=>console.log("View commits",e)}],data:[{id:"repo-1",title:"frontend-app",subtitle:"React Application",value:"Main Branch",metadata:{language:"TypeScript",commits:1247,contributors:8}},{id:"repo-2",title:"backend-api",subtitle:"Node.js API",value:"Main Branch",metadata:{language:"Node.js",commits:892,contributors:5}}]},{id:"tasks",name:"Tasks",description:"Development tasks and issues",iconName:"CheckSquare",color:"bg-blue-500",type:"list",actions:[{id:"create-task",label:"Create Task",iconName:"Plus",action:e=>console.log("Create task",e)},{id:"assign-task",label:"Assign Task",iconName:"UserPlus",action:e=>console.log("Assign task",e)}],data:[{id:"task-1",title:"Fix authentication bug",subtitle:"High Priority",value:"In Progress",metadata:{assignee:"John Doe",priority:"High",estimate:"4h"}},{id:"task-2",title:"Implement dark mode",subtitle:"Feature Request",value:"Todo",metadata:{assignee:"Jane Smith",priority:"Medium",estimate:"8h"}}]}]},{id:"design",name:"Design",description:"User experience and visual design",iconName:"Palette",color:"bg-pink-600",type:"category",actions:[{id:"view-designs",label:"View Designs",description:"See all design assets",iconName:"Image",action:e=>console.log("View designs",e)},{id:"create-mockup",label:"Create Mockup",iconName:"Plus",action:e=>console.log("Create mockup",e)}],children:[{id:"assets",name:"Assets",description:"Design assets and components",iconName:"Package",color:"bg-pink-500",type:"list",actions:[{id:"add-asset",label:"Add Asset",iconName:"Plus",action:e=>console.log("Add asset",e)},{id:"organize-assets",label:"Organize",iconName:"FolderOpen",action:e=>console.log("Organize assets",e)}],data:[{id:"asset-1",title:"Logo Variations",subtitle:"Brand Assets",value:"12 files",metadata:{format:"SVG",size:"2.4MB",updated:"2024-01-20"}},{id:"asset-2",title:"UI Components",subtitle:"Component Library",value:"45 components",metadata:{format:"Figma",size:"18.7MB",updated:"2024-01-22"}}]}]},{id:"product",name:"Product",description:"Product management and strategy",iconName:"Layers",color:"bg-indigo-600",type:"category",actions:[{id:"view-roadmap",label:"View Roadmap",description:"See product roadmap",iconName:"Map",action:e=>console.log("View roadmap",e)},{id:"create-feature",label:"Create Feature",iconName:"Plus",action:e=>console.log("Create feature",e)}],children:[{id:"features",name:"Features",description:"Product features and requirements",iconName:"Star",color:"bg-indigo-500",type:"list",actions:[{id:"add-feature",label:"Add Feature",iconName:"Plus",action:e=>console.log("Add feature",e)},{id:"prioritize-features",label:"Prioritize",iconName:"ArrowUp",action:e=>console.log("Prioritize features",e)}],data:[{id:"feature-1",title:"User Authentication",subtitle:"Security Feature",value:"In Development",metadata:{priority:"High",effort:"Large",impact:"High"}},{id:"feature-2",title:"Dark Mode",subtitle:"UI Enhancement",value:"Backlog",metadata:{priority:"Medium",effort:"Small",impact:"Medium"}}]}]}];function ga(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function ho({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:s,colorScheme:r=vo,className:l}){let[n,p]=(0,rt.useState)([]),[u,C]=(0,rt.useState)([]),f=n[n.length-1],h=f?.children||e,S=(N,L)=>{switch(N.type){case"category":return r.categories[L%r.categories.length];case"list":return r.lists[L%r.lists.length];case"item":return r.items[L%r.items.length];default:return r.primary}},I=(0,rt.useMemo)(()=>({path:n,selectedItems:u,filters:{}}),[n,u]);(0,rt.useEffect)(()=>{s&&s(I)},[I,s]);let D=N=>{N.type==="category"||N.type==="list"?p([...n,N]):N.type==="item"&&C([...u,N])},x=()=>{p(n.slice(0,-1))},T=N=>{p(n.slice(0,N+1))},_=()=>f?.actions?f.actions:[];return t?(0,_a.jsxs)("div",{className:c("w-full",l),children:[(0,_a.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,_a.jsxs)("div",{className:"flex items-center gap-2",children:[n.length>0&&(0,_a.jsx)(Kt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:x,className:c("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,_a.jsx)($o.ChevronLeft,{className:c("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,_a.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,_a.jsx)(Kt.motion.button,{whileHover:{scale:1.1,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.9,transition:{duration:.15,ease:[.4,0,.2,1]}},onClick:a,className:c("group p-1 h-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,_a.jsx)($o._a,{className:c("h-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),n.length>0&&(0,_a.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,_a.jsx)(Kt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>p([]),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,_a.jsxs)("span",{className:"relative",children:["Capabilities",(0,_a.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),n.map((N,L)=>(0,_a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,_a.jsx)($o.ChevronRight,{className:"h-2 w-2"}),(0,_a.jsx)(Kt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>T(L),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,_a.jsxs)("span",{className:"relative",children:[N.name,(0,_a.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},N.id))]}),(0,_a.jsx)("div",{className:"max-h-40 overflow-y-auto",children:(0,_a.jsx)(Kt.AnimatePresence,{mode:"wait",children:(0,_a.jsx)(Kt.motion.div,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:f?.type==="list"&&f.data?(0,_a.jsx)(rr,{data:f.data,onItemSelect:N=>C([...u,N]),colorScheme:r}):(0,_a.jsx)(or,{capabilities:h,onSelect:D,colorScheme:r})},f?.id||"root")})})]}):(0,_a.jsxs)(A,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,_a.jsx)($o.Menu,{className:"h-4 w-4"}),(0,_a.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function or({capabilities:e,onSelect:t,colorScheme:a}){return(0,_a.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,_a.jsx)(ir,{capability:o,onClick:()=>t(o),color:a.categories[s%a.categories.length]},o.id))})}function ir({capability:e,onClick:t,selected:a,color:o}){return(0,_a.jsxs)(Kt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:c("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm",a&&"border-primary bg-accent scale-105"),onClick:t,children:[(0,_a.jsx)("div",{className:c("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,_a.jsxs)("span",{className:"truncate relative",children:[e.name,(0,_a.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),(e.children||e.data)&&(0,_a.jsx)($o.ChevronRight,{className:c("h-3 w-3 text-muted-foreground flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:translate-x-0.5")}),e.type==="list"&&e.data&&(0,_a.jsx)(ne,{variant:"secondary",className:c("text-xs h-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function rr({data:e,onItemSelect:t,colorScheme:a}){return(0,_a.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,s)=>(0,_a.jsxs)(Kt.motion.button,{whileHover:{scale:1.02,transition:{duration:.3,ease:[.4,0,.2,1]}},whileTap:{scale:.95,transition:{duration:.15,ease:[.4,0,.2,1]}},className:c("group relative inline-flex items-center gap-2 px-3 py-2 rounded-lg border cursor-pointer","bg-background text-left text-sm font-medium backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:border-accent/50 hover:shadow-sm"),onClick:()=>t(o),children:[(0,_a.jsx)("div",{className:c("w-2 h-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[s%a.items.length])}),(0,_a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,_a.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,_a.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 h-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,_a.jsx)("div",{className:c("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,_a.jsx)(ne,{variant:"secondary",className:c("text-xs h-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:o.value})]},o.id))})}var wo=require("date-fns");function yo({taskId:e,polling:t=!0,system:a="payload"}){let[o,s]=(0,rt.useState)(null),[r,l]=(0,rt.useState)(!1),[n,p]=(0,rt.useState)(null),u=async(f=!0)=>{if(e){f&&l(!0);try{let h=await fetch(`/api/tasks/${e}`);if(!h.ok)throw new Error(`Failed to fetch task: ${h.statusText}`);let S=await h.json();s(S)}catch(h){console.error("Error fetching task:",h),p(h instanceof Error?h:new Error("Unknown error occurred"))}finally{f&&l(!1)}}},C=()=>u(!1);return(0,rt.useEffect)(()=>{e&&u(!0);let f=null;return e&&t&&(f=setInterval(C,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:o,loading:r,error:n}}var nr=e=>{switch(e){case"backlog":return"bg-gray-200 text-gray-800";case"todo":return"bg-blue-200 text-blue-800";case"inProgress":return"bg-yellow-200 text-yellow-800";case"done":return"bg-green-200 text-green-800";case"cancelled":return"bg-red-200 text-red-800";default:return"bg-gray-200 text-gray-800"}},sr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Co({data:e}){let{id:t,system:a,fetchLatest:o,taskData:s,error:r}=e||{};if(!t)return null;let l=null,n=!0,p=r,u=o!==void 0?o:!0;if(l=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:o,system:a,fetchLatest:u,taskData:l,error:p}),u){let{task:S,loading:I,error:D}=yo({taskId:t,system:a});l=S,n=I,p=D}else n=!1;let C=nr(l?.status||"todo"),f=sr(l?.status||"todo"),h=l?.dateLogged||new Date().toISOString();try{let S=new Date(l?.dateLogged||"");isNaN(S.getTime())||(h=(0,wo.formatDistanceToNow)(S,{addSuffix:!0}))}catch{}return(0,_a.jsxs)(he,{className:c("w-full max-w-md shadow-md",p&&"border border-destructive"),children:[(0,_a.jsxs)(Le,{className:"pb-2",children:[(0,_a.jsxs)("div",{className:"flex justify-between items-start",children:[(0,_a.jsx)(ze,{className:"text-lg font-semibold",children:n?"Loading...":l?.name||"Task"}),(0,_a.jsx)(ne,{className:`${C}`,children:f})]}),l?.project&&(0,_a.jsxs)(ua,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,_a.jsx)(De,{className:"pb-2",children:n?(0,_a.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):p?(0,_a.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,_a.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,_a.jsx)(Ct,{className:"pt-2 flex items-center justify-between",children:(0,_a.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,_a.jsx)($o.Clock,{className:"h-3 w-3 mr-1"}),(0,_a.jsxs)("span",{children:["Created ",h]}),(0,_a.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,_a.jsxs)("span",{children:["Task #",t]})]})})]})}function Po({artefact:e,taskId:t,taskData:a,loading:o=!1,error:s=null}){let r=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=r.dateLogged;try{let n=new Date(r.dateLogged);isNaN(n.getTime())||(l=(0,wo.formatDistanceToNow)(n,{addSuffix:!0}))}catch{}return(0,_a.jsxs)(he,{className:"w-full max-w-md shadow-md",children:[(0,_a.jsx)(Le,{className:"pb-2",children:(0,_a.jsx)("div",{className:"flex justify-between items-start",children:(0,_a.jsx)(ze,{className:"text-lg font-semibold",children:o?"Loading...":r.name})})}),(0,_a.jsx)(De,{className:"pb-2",children:o?(0,_a.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,_a.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,_a.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,_a.jsx)(Ct,{className:"pt-2 flex items-center justify-between",children:(0,_a.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,_a.jsx)($o.Clock,{className:"h-3 w-3 mr-1"}),(0,_a.jsxs)("span",{children:["Created ",l]}),(0,_a.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,_a.jsxs)("span",{children:["Task #",r.id]})]})})]})}var Ro=G(require("react"));var To=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:s="This endpoint requires authentication to sync functions."})=>{let[r,l]=(0,rt.useState)(!1),[n,p]=(0,rt.useState)(""),u=()=>{if(!t){p("$o authentication URL provided");return}l(!0),p("");try{let f=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!f){p("Popup blocked. Please allow popups for this site and try again."),l(!1);return}let h=setInterval(()=>{try{f.closed&&(clearInterval(h),l(!1),o(),a())}catch{}},1e3);setTimeout(()=>{f.closed||(f.close(),clearInterval(h),l(!1),p("Authentication timed out. Please try again."))},6e5)}catch{p("Failed to open authentication window"),l(!1)}},C=async()=>{try{await navigator.clipboard.writeText(t),p("")}catch{p("Failed to copy URL to clipboard")}};return e?(0,_a.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center $o-[1000]",children:(0,_a.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,_a.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,_a.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s}),n&&(0,_a.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:n}),(0,_a.jsxs)("div",{className:"flex gap-2",children:[(0,_a.jsx)("button",{onClick:u,disabled:r||!t,className:`
|
|
7
7
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
8
|
-
${
|
|
9
|
-
`,children:
|
|
8
|
+
${r||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
9
|
+
`,children:r?"Authenticating...":"Authenticate"}),(0,_a.jsx)("button",{onClick:C,disabled:!t,className:`
|
|
10
10
|
px-4 py-2 text-white border-none rounded text-sm
|
|
11
11
|
${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
|
|
12
|
-
`,children:"Copy URL"}),(0,
|
|
12
|
+
`,children:"Copy URL"}),(0,_a.jsx)("button",{onClick:a,className:"px-4 py-2 bg-gray-500 hover:bg-gray-600 text-white border-none rounded text-sm cursor-pointer",children:"Cancel"})]})]})}):null};var ba=({toolPart:e,index:t,addToolResult:a})=>{let[o,s]=Ro.default.useState(!0),r=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,_a.jsxs)("div",{className:"mb-2",children:[(0,_a.jsx)(To,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:r,description:e.output?.reason||e.input?.reason}),!o&&(0,_a.jsx)("div",{className:"flex items-center justify-center rt-3",children:(0,_a.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,_a.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,_a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,_a.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Do=require("marked"),So=G(require("react-markdown"));function lr(e){return Do.marked.lexer(e).map(a=>a.raw)}var Ao=(0,rt.memo)(({content:e})=>(0,_a.jsx)(So.default,{children:e}),(e,t)=>e.content===t.content);Ao.displayName="MemoizedMarkdownBlock";var va=(0,rt.memo)(({content:e,id:t})=>(0,rt.useMemo)(()=>lr(e),[e]).map((o,s)=>(0,_a.jsx)(Ao,{content:o},`${t}-block_${s}`)));va.displayName="PartText";var ya=G(require("react"));var Mo=({isOpen:e=!0,reason:t,onClose:a,onApprove:o,onDeny:s,title:r="Approval Required"})=>{let[l,n]=(0,rt.useState)(!1),p=()=>{n(!0),o(),a()},u=()=>{n(!0),s(),a()},C=()=>{n(!0),s(),a()};return e?(0,_a.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-full shadow-lg",children:[(0,_a.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:r}),(0,_a.jsx)("p",{className:"text-sm text-gray-600 mb-6",children:t}),(0,_a.jsxs)("div",{className:"flex gap-2",children:[(0,_a.jsx)("button",{onClick:p,disabled:l,className:`
|
|
13
13
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
14
14
|
${l?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
|
|
15
|
-
`,children:l?"Processing...":"Approve"}),(0,
|
|
15
|
+
`,children:l?"Processing...":"Approve"}),(0,_a.jsx)("button",{onClick:u,disabled:l,className:`
|
|
16
16
|
px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
|
|
17
17
|
${l?"bg-gray-400 cursor-not-allowed":"bg-red-600 hover:bg-red-700 cursor-pointer"}
|
|
18
|
-
`,children:l?"Processing...":"Deny"}),(0,
|
|
18
|
+
`,children:l?"Processing...":"Deny"}),(0,_a.jsx)("button",{onClick:C,disabled:l,className:`
|
|
19
19
|
px-4 py-2 text-white border-none rounded text-sm
|
|
20
20
|
${l?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
|
|
21
|
-
`,children:"Cancel"})]})]}):null};var No=({toolPart:e,index:t,addToolResult:a})=>{let[o,s]=ca.default.useState(!0),[i,l]=ca.default.useState(null),n=()=>{a(e.input?.toolCallId,e.input?.tool,"Approved"),s(!1),l("approve")},p=()=>{a(e.input?.toolCallId,e.input?.tool,"Denied"),s(!1),l("deny")};switch(e.state){case"input-available":return(0,Ta.jsxs)("div",{className:"mb-2",children:[(0,Ta.jsx)(Co,{isOpen:o,onApprove:n,onDeny:p,onClose:()=>s(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,Ta.jsxs)(Ta.Fragment,{children:[i==="approve"&&(0,Ta.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Ta.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,Ta.jsx)("svg",{className:"Ta-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Ta.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,Ta.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Ta.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Ta.jsx)("svg",{className:"Ta-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Ta.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Ta.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var pa=require("@radix-ui/react-use-controllable-state");var dt=W(require("@radix-ui/react-collapsible")),ko=dt.Root,Po=dt.CollapsibleTrigger,Do=dt.CollapsibleContent;var To=require("streamdown"),da=(0,at.memo)(({className:e,...t})=>(0,Ta.jsx)(To.Streamdown,{className:c("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);da.displayName="Response";var Ao=(0,at.createContext)(null),Qi=()=>{let e=(0,at.useContext)(Ao);if(!e)throw new Error("Reasoning components must Ta used within Reasoning");return e},Xi=1e3,Yi=1e3,ma=(0,at.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:o=!0,onOpenChange:s,duration:i,children:l,...n})=>{let[p,u]=(0,pa.useControllableState)({prop:a,defaultProp:o,onChange:s}),[w,f]=(0,pa.useControllableState)({prop:i,defaultProp:0}),[v,T]=(0,at.useState)(!1),[I,R]=(0,at.useState)(null);(0,at.useEffect)(()=>{t?I===null&&R(Date.now()):I!==null&&(f(Math.ceil((Date.now()-I)/Yi)),R(null))},[t,I,f]),(0,at.useEffect)(()=>{if(o&&!t&&p&&!v){let P=setTimeout(()=>{u(!1),T(!0)},Xi);return()=>clearTimeout(P)}},[t,p,o,u,v]);let x=P=>{u(P)};return(0,Ta.jsx)(Ao.Provider,{value:{isStreaming:t,isOpen:p,setIsOpen:u,duration:w},children:(0,Ta.jsx)(ko,{className:c("not-prose mb-4",e),onOpenChange:x,open:p,...n,children:l})})}),Zi=(e,t)=>e||t===0?(0,Ta.jsx)("p",{children:"Thinking..."}):t===void 0?(0,Ta.jsx)("p",{children:"Thought for a few seconds"}):(0,Ta.jsxs)("p",{children:["Thought for ",t," seconds"]}),ua=(0,at.memo)(({className:e,children:t,...a})=>{let{isStreaming:o,isOpen:s,duration:i}=Qi();return(0,Ta.jsx)(Po,{className:c("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...a,children:t??(0,Ta.jsxs)(Ta.Fragment,{children:[(0,Ta.jsx)(Eo.BrainIcon,{className:"size-4"}),Zi(o,i),(0,Ta.jsx)(Eo.ChevronDownIcon,{className:c("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),ga=(0,at.memo)(({className:e,children:t,...a})=>(0,Ta.jsx)(Do,{className:c("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,children:(0,Ta.jsx)(da,{className:"grid gap-2",children:t})}));ma.displayName="Reasoning";ua.displayName="ReasoningTrigger";ga.displayName="ReasoningContent";function Io({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:s,fileUploads:i,isDragOver:l,enableFileUpload:n,onInputChange:p,addToolResult:u,onSendMessage:w,onKeyPress:f,onFileUpload:v,onRemoveFile:T,onDragOver:I,className:R}){let x=(0,at.useRef)(null),P=(0,at.useRef)(null),_=(0,at.useRef)(null),[C,L]=(0,at.useState)(!1),[Y,Z]=(0,at.useState)({path:[],selectedItems:[],filters:{}});(0,at.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,at.useEffect)(()=>{C&&setTimeout(()=>{x.current?.scrollIntoView({behavior:"smooth"})},100)},[C]);let ee=()=>ia(Y),X=()=>{let m=[];return s.forEach(F=>{F.actions&&F.actions.forEach(q=>{m.push({label:q.label,action:()=>G(q.id,{path:[F],selectedItems:[],filters:{}})})}),F.children&&F.children.forEach(q=>{q.type==="list"&&q.data&&m.push({label:`View ${q.name}`,action:()=>L(!0)})})}),m.slice(0,5)},G=(m,F)=>{console.log("Capability action:",m,F);let q=`Executing ${m} with context: ${JSON.stringify(F.path.map(S=>S.name))}`;L(!1)},oe=ia({path:[],selectedItems:[],filters:{}}),le=m=>{v(m.target.files),m.target.files&&(m.target.value="")},M=m=>{m.preventDefault(),I(!0)},Se=m=>{m.preventDefault(),I(!1)},d=m=>{m.preventDefault(),I(!1),v(m.dataTransfer.files)},B=m=>{if(m===0)return"0 Bytes";let F=1024,q=["Bytes","KB","MB","GB"],S=Math.floor(Math.log(m)/Math.log(F));return parseFloat((m/Math.pow(F,S)).toFixed(2))+" "+q[S]},E=m=>m.startsWith("image/")?(0,Ta.jsx)(Eo.Image,{className:"Ta-4 w-4"}):m.startsWith("text/")?(0,Ta.jsx)(Eo.FileText,{className:"Ta-4 w-4"}):(0,Ta.jsx)(Eo.File,{className:"Ta-4 w-4"}),$=m=>{let F=m.role==="assistant",q=m.role==="user";return(0,Ta.jsxs)("div",{className:c("flex my-2 items-start gap-3",q?"flex-row-reverse":""),children:[(0,Ta.jsx)($e,{className:"Ta-8 w-8 shrink-0",children:(0,Ta.jsx)(qe,{className:c(q?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:q?(0,Ta.jsx)(Eo.User,{className:"Ta-4 w-4"}):(0,Ta.jsx)(Eo.Bot,{className:"Ta-4 w-4"})})}),(0,Ta.jsx)("div",{className:c("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",q?"bg-primary text-primary-foreground":"bg-muted"),children:m.parts.map((S,V)=>{if(S.type==="text")return(0,Ta.jsx)(sa,{id:m.id,content:S.text},`${m.id}-text`);if(S.type==="file"){let k=S;return(0,Ta.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Ta.jsxs)("div",{className:"flex items-center gap-2",children:[E(k.mediaType||"application/octet-stream"),(0,Ta.jsx)("div",{className:"flex-1 min-w-0",children:(0,Ta.jsx)("p",{className:"text-sm font-medium truncate",children:k.filename||k.url?.split("/").pop()||"File"})}),k.url&&(0,Ta.jsx)(A,{variant:"ghost",size:"sm",onClick:()=>window.open(k.url,"_blank"),className:"Ta-8 w-8 p-0",children:(0,Ta.jsx)(Eo.Download,{className:"Ta-4 w-4"})})]})},V)}if(S.type.startsWith("tool-")){let k=S,Ce=S.type.replace("tool-","");if(Ce==="task")switch(k.state){case"input-available":return(0,Ta.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},V);case"output-available":return(0,Ta.jsx)("div",{className:"mb-2",children:(0,Ta.jsx)(mo,{data:{id:k.output?.id||k.input?.id,fetchLatest:!1,taskData:k.output||k.input}})},V);case"output-error":return(0,Ta.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",k.errorText]},V);default:return null}if(S.type==="tool-requestEndpointLogin")return(0,Ta.jsx)("div",{className:"mb-2",children:(0,Ta.jsx)(na,{toolPart:k,index:V,addToolResult:u??(()=>{})})},V);if(S.type==="tool-authenticate")return(0,Ta.jsx)("div",{className:"mb-2",children:(0,Ta.jsx)(na,{toolPart:k,index:V,addToolResult:u??(()=>{})})},V);if(S.type==="tool-requestApproval")return(0,Ta.jsx)("div",{className:"mb-2",children:(0,Ta.jsx)(No,{toolPart:k,index:V,addToolResult:u??(()=>{})})},V);if(Ce==="artefact")switch(k.state){case"input-available":return(0,Ta.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},V);case"output-available":return(0,Ta.jsx)("div",{className:"mb-2",children:(0,Ta.jsx)(fo,{artefact:k.output?.description||"",taskId:k.output?.id||k.input?.id,taskData:k.output||k.input})},V);case"output-error":return(0,Ta.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",k.errorText]},V);default:return null}return(0,Ta.jsx)("div",{className:"mb-2",children:(0,Ta.jsxs)(he,{className:"w-full max-w-md",children:[(0,Ta.jsx)(Ue,{children:(0,Ta.jsx)(Be,{className:"text-lg",children:Ce})}),(0,Ta.jsxs)(De,{children:[k.state==="input-available"&&(0,Ta.jsxs)("p",{className:"text-sm",children:["Processing ",Ce,"..."]}),k.state==="output-available"&&(0,Ta.jsx)("pre",{className:"text-sm",children:JSON.stringify(k.output,null,2)}),k.state==="output-error"&&(0,Ta.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",k.errorText]})]})]})},V)}if(S.type.startsWith("data-")){let k=S,Ce=S.type.replace("data-","");return Ce==="reference"?(0,Ta.jsx)("div",{className:"mb-2",children:(0,Ta.jsx)(he,{className:"w-full",children:(0,Ta.jsx)(De,{className:"p-4",children:(0,Ta.jsx)("div",{className:"space-y-2",children:k.data?.references?.map((de,Ae)=>(0,Ta.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,Ta.jsx)(me,{variant:"outline",children:de.type||"link"}),(0,Ta.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Ta.jsx)("p",{className:"text-sm font-medium truncate",children:de.title}),de.description&&(0,Ta.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:de.description})]}),de.url&&(0,Ta.jsx)(A,{variant:"ghost",size:"sm",onClick:()=>window.open(de.url,"_blank"),className:"Ta-8 w-8 p-0",children:(0,Ta.jsx)(Eo.ExternalLink,{className:"Ta-4 w-4"})})]},Ae))})})})},V):Ce==="menu"?(0,Ta.jsx)("div",{className:"mb-2",children:(0,Ta.jsxs)(he,{className:"w-full",children:[(0,Ta.jsx)(Ue,{children:(0,Ta.jsx)(Be,{className:"text-lg",children:k.data?.title})}),(0,Ta.jsx)(De,{children:(0,Ta.jsx)("div",{className:"space-y-2",children:k.data?.items?.map((de,Ae)=>(0,Ta.jsx)(A,{variant:"outline",className:"w-full justify-start",onClick:de.action,children:(0,Ta.jsxs)("div",{className:"text-left",children:[(0,Ta.jsx)("p",{className:"font-medium",children:de.label}),de.description&&(0,Ta.jsx)("p",{className:"text-xs text-muted-foreground",children:de.description})]})},Ae))})})]})},V):(0,Ta.jsx)("div",{className:"mb-2",children:(0,Ta.jsxs)(he,{className:"w-full max-w-md",children:[(0,Ta.jsx)(Ue,{children:(0,Ta.jsx)(Be,{className:"text-lg",children:Ce})}),(0,Ta.jsx)(De,{children:(0,Ta.jsx)("pre",{className:"text-sm",children:JSON.stringify(k.data,null,2)})})]})},V)}if(S.type==="reasoning")return(0,Ta.jsxs)(ma,{className:"w-full",isStreaming:status==="streaming"&&V===m.parts.length-1&&m.id===e.at(-1)?.id,children:[(0,Ta.jsx)(ua,{}),(0,Ta.jsx)(ga,{children:S.text})]},`${m.id}-${V}`)})})]})};return(0,Ta.jsxs)("div",{className:`Ta-full flex flex-col shadow-sm max-w-4xl mx-auto ${R||""}`,children:[(0,Ta.jsxs)(Ne,{ref:P,className:"flex-1 p-4 bg-background border-0",onDragOver:M,onDragLeave:Se,onDrop:d,children:[(0,Ta.jsxs)("div",{className:c("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Ta.jsx)(et.animate,{children:e.map(m=>(0,Ta.jsx)(et.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:c("flex gap-3",m.role==="user"?"flex-row-reverse":"flex-row"),children:$(m)},m.id))}),C&&(0,Ta.jsxs)(et.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Ta.jsx)($e,{className:"Ta-8 w-8",children:(0,Ta.jsx)(qe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ta.jsx)(Eo.Bot,{className:"Ta-4 w-4"})})}),(0,Ta.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ta.jsx)(so,{capabilities:s,isOpen:C,onToggle:()=>L(!C),onActionSelect:G,className:"w-full"})})]}),a&&(0,Ta.jsxs)(et.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Ta.jsx)($e,{className:"Ta-8 w-8",children:(0,Ta.jsx)(qe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Ta.jsx)(Eo.Bot,{className:"Ta-4 w-4"})})}),(0,Ta.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Ta.jsxs)("div",{className:"flex space-x-1",children:[(0,Ta.jsx)("div",{className:"w-2 Ta-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Ta.jsx)("div",{className:"w-2 Ta-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Ta.jsx)("div",{className:"w-2 Ta-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Ta.jsx)("div",{ref:x})]}),i.length>0&&(0,Ta.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Ta.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(m=>(0,Ta.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[E(m.file.type),(0,Ta.jsx)("span",{className:"text-sm font-medium",children:m.file.name}),(0,Ta.jsx)("span",{className:"text-xs text-muted-foreground",children:B(m.file.size)}),(0,Ta.jsx)(A,{variant:"ghost",size:"sm",onClick:()=>T(m.id),className:"Ta-6 w-6 p-0",children:(0,Ta.jsx)(Eo.X,{className:"Ta-4 w-4"})})]},m.id))})}),(0,Ta.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Ta.jsxs)("div",{className:"flex gap-3",children:[(0,Ta.jsx)(ft,{value:t,onChange:m=>p(m.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),n&&(0,Ta.jsx)(A,{variant:"outline",size:"icon",onClick:()=>_.current?.click(),className:"rounded-2xl Ta-10 w-10 shadow-sm",children:(0,Ta.jsx)(Eo.Paperclip,{className:"Ta-4 w-4"})}),(0,Ta.jsx)(A,{onClick:w,disabled:!t.trim()&&i.length===0||a,size:"icon",className:"rounded-2xl Ta-10 w-10 shadow-sm",children:(0,Ta.jsx)(Eo.Send,{className:"Ta-4 w-4"})})]}),(0,Ta.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Ta.jsxs)(A,{onClick:()=>L(!C),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Ta.jsx)(Eo.Menu,{className:"Ta-3 w-3 mr-1"}),C?"Hide":"Show"," Capabilities"]}),(0,Ta.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[ee().map((m,F)=>(0,Ta.jsx)(A,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>G(m.id,Y),children:m.label},`context-${m.id}`)),ee().length===0&&X().map((m,F)=>(0,Ta.jsx)(A,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:m.action,children:m.label},`suggestion-${F}`))]})]}),n&&(0,Ta.jsx)("input",{ref:_,type:"file",multiple:!0,onChange:le,className:"hidden"})]})]})}function tt({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:s=[],capabilities:i=[],sidebarItems:l=[],notifications:n=[],sessions:p=[],onNewChat:u,onSessionSelect:w,onSessionDelete:f,onSessionEdit:v=()=>{},onBusinessUnitChange:T=()=>{},onNotificationRemove:I=()=>{},onRemoveAll:R=()=>{},onActionClick:x=()=>{},onSearch:P=B=>console.log("Search query:",B),initialTeam:_="design",currentSession:C=null,showCapabilities:L=!0,title:Y="Digital Colleagues",enableFileUpload:Z=!0,maxFileSize:ee=10,allowedFileTypes:X=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:G="/headerlogo.png",appName:oe="Nuvia",tagline:le="AI-Powered Workspace",actionIcon:M=(0,Ta.jsx)(Eo.Users,{className:"mr-2 Ta-4 w-4"}),actionText:Se="Collaborate",sidebarInitiallyClosed:d=!1}){let B={...e,onError:O=>{$?.setMessages(pe=>[...pe,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:O.message}]}]),console.error("Error in CopilotInterface:",O)}},E=(0,Mo.useChat)(B||{}),$=a?t||E:null,[m,F]=(0,at.useState)(""),[q,S]=(0,at.useState)(!1),V=$?.messages||o,k=m,Ce=$?.status==="submitted"||q,de=$?.addToolResult?(O,pe,ie)=>{$.addToolResult({tool:pe,toolCallId:O,output:ie}),$.sendMessage()}:()=>{},Ae=s||[],Uo={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Bo,Lo]=(0,at.useState)(()=>Ae.length===0?Uo:Ae.find(O=>O.id===_)||Ae[0]),[mt,wt]=(0,at.useState)([]),[zo,_o]=(0,at.useState)(!1),Fo=O=>{if(!O||!Z)return;let pe=[];Array.from(O).forEach(ie=>{if(ie.size>ee*1024*1024){alert(`File ${ie.name} is too large. Maximum size is ${ee}MB.`);return}if(X.length>0&&!X.some(Ct=>ie.type.match(Ct))){alert(`File type ${ie.type} is not allowed.`);return}let ba={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ie,status:"pending",progress:0};if(ie.type.startsWith("image/")){let Ct=new FileReader;Ct.onload=Go=>{wt(Vo=>Vo.map(Ft=>Ft.id===ba.id?{...Ft,preview:Go.target?.result}:Ft))},Ct.readAsDataURL(ie)}pe.push(ba)}),wt(ie=>[...ie,...pe])},Oo=O=>{wt(pe=>pe.filter(ie=>ie.id!==O))},fa=()=>{if(!(!k.trim()&&mt.length===0)){if($){let O=mt.length>0?jo(mt.map(pe=>pe.file)):void 0;$.sendMessage({text:k,files:O},{body:{timestamp:Date.now()}}),F("")}else console.log("Message to send:",k),console.log("Files to upload:",mt),F(""),S(!0),setTimeout(()=>{S(!1)},1500);wt([])}},jo=O=>{let pe=new DataTransfer;return O.forEach(ie=>pe.items.add(ie)),pe.files},Ho=O=>{O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),fa())},Wo=O=>{F(O)};return(0,Ta.jsx)(io,{sidebarItems:l||[],title:Y,notifications:n||[],businessUnits:Ae,currentBusinessUnit:Bo,onBusinessUnitChange:O=>{O&&(Lo(O),T?.(O))},onSearch:P,showTabs:!1,onActionClick:x,actionIcon:M,actionText:Se,onNotificationRemove:I,onRemoveAll:R,logo:G,appName:oe,tagline:le,sidebarInitiallyClosed:d,children:(0,Ta.jsx)(_t.AnimatePresence,{mode:"wait",children:(0,Ta.jsx)(_t.motion.div,{className:"flex-1 Ta-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Ta.jsxs)("div",{className:"Ta-full flex",children:[(0,Ta.jsx)("div",{className:"w-80 flex-shrink-0 Ta-full p-2",children:(0,Ta.jsx)(ro,{sessions:p||[],currentSession:C,teams:Ae,onNewChat:u,onSessionSelect:w,onSessionEdit:v,onSessionDelete:f})}),(0,Ta.jsx)("div",{className:"flex-1 Ta-full p-2",children:(0,Ta.jsx)(Io,{messages:V||[],input:k,isTyping:Ce,currentSessionTitle:C?.title,capabilities:i||[],onInputChange:Wo,addToolResult:de,onSendMessage:fa,onKeyPress:Ho,fileUploads:mt,isDragOver:zo,enableFileUpload:Z,onFileUpload:Fo,onRemoveFile:Oo,onDragOver:_o})})]})},"chat-interface")})})}function er(){let[e,t]=(0,at.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you help me analyze my sales data?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`I'll help you analyze your sales data. Let me fetch the latest information.
|
|
21
|
+
`,children:"Cancel"})]})]}):null};var Bo=({toolPart:e,index:t,addToolResult:a})=>{let[o,s]=ya.default.useState(!0),[r,l]=ya.default.useState(null),n=()=>{a(e.input?.toolCallId,e.input?.tool,"Approved"),s(!1),l("approve")},p=()=>{a(e.input?.toolCallId,e.input?.tool,"Denied"),s(!1),l("deny")};switch(e.state){case"input-available":return(0,_a.jsxs)("div",{className:"mb-2",children:[(0,_a.jsx)(Mo,{isOpen:o,onApprove:n,onDeny:p,onClose:()=>s(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!o&&(0,_a.jsxs)(_a.Fragment,{children:[r==="approve"&&(0,_a.jsx)("div",{className:"flex items-center justify-center rt-3",children:(0,_a.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-green-100 text-green-800 text-sm font-medium border border-green-200",children:[(0,_a.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,_a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),r==="deny"&&(0,_a.jsx)("div",{className:"flex items-center justify-center rt-3",children:(0,_a.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,_a.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,_a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,_a.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var xa=require("@radix-ui/react-use-controllable-state");var ut=G(require("@radix-ui/react-collapsible")),Ht=ut.Root,jt=ut.CollapsibleTrigger,Wt=ut.CollapsibleContent;var Uo=require("streamdown"),kt=(0,rt.memo)(({className:e,...t})=>(0,_a.jsx)(Uo.Streamdown,{className:c("size-full [&>*:first-child]:rt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);kt.displayName="Response";var zo=(0,rt.createContext)(null),cr=()=>{let e=(0,rt.useContext)(zo);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},dr=1e3,pr=1e3,wa=(0,rt.memo)(({className:e,isStreaming:t=!1,open:a,defaultOpen:o=!0,onOpenChange:s,duration:r,children:l,...n})=>{let[p,u]=(0,xa.useControllableState)({prop:a,defaultProp:o,onChange:s}),[C,f]=(0,xa.useControllableState)({prop:r,defaultProp:0}),[h,S]=(0,rt.useState)(!1),[I,D]=(0,rt.useState)(null);(0,rt.useEffect)(()=>{t?I===null&&D(Date.now()):I!==null&&(f(Math.ceil((Date.now()-I)/pr)),D(null))},[t,I,f]),(0,rt.useEffect)(()=>{if(o&&!t&&p&&!h){let T=setTimeout(()=>{u(!1),S(!0)},dr);return()=>clearTimeout(T)}},[t,p,o,u,h]);let x=T=>{u(T)};return(0,_a.jsx)(zo.Provider,{value:{isStreaming:t,isOpen:p,setIsOpen:u,duration:C},children:(0,_a.jsx)(Ht,{className:c("not-prose mb-4",e),onOpenChange:x,open:p,...n,children:l})})}),mr=(e,t)=>e||t===0?(0,_a.jsx)("p",{children:"Thinking..."}):t===void 0?(0,_a.jsx)("p",{children:"Thought for a few seconds"}):(0,_a.jsxs)("p",{children:["Thought for ",t," seconds"]}),Ca=(0,rt.memo)(({className:e,children:t,...a})=>{let{isStreaming:o,isOpen:s,duration:r}=cr();return(0,_a.jsx)(jt,{className:c("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...a,children:t??(0,_a.jsxs)(_a.Fragment,{children:[(0,_a.jsx)($o.BrainIcon,{className:"size-4"}),mr(o,r),(0,_a.jsx)($o.ChevronDownIcon,{className:c("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),Na=(0,rt.memo)(({className:e,children:t,...a})=>(0,_a.jsx)(Wt,{className:c("rt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...a,children:(0,_a.jsx)(kt,{className:"grid gap-2",children:t})}));wa.displayName="Reasoning";Ca.displayName="ReasoningTrigger";Na.displayName="ReasoningContent";var ka=require("react-syntax-highlighter"),$t=require("react-syntax-highlighter/dist/esm/styles/prism"),ur=(0,rt.createContext)({code:""}),qt=({code:e,language:t,showLineNumbers:a=!1,className:o,children:s,...r})=>(0,_a.jsx)(ur.Provider,{value:{code:e},children:(0,_a.jsx)("div",{className:c("relative w-full overflow-hidden rounded-md border bg-background text-foreground",o),...r,children:(0,_a.jsxs)("div",{className:"relative",children:[(0,_a.jsx)(ka.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:$t.oneLight,children:e}),(0,_a.jsx)(ka.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:a,style:$t.oneDark,children:e}),s&&(0,_a.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:s})]})})});var Fo=({className:e,...t})=>(0,_a.jsx)(Ht,{className:c("not-prose mb-4 w-full rounded-md border",e),...t}),gr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,_a.jsxs)(ne,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,_a.jsx)($o.CircleIcon,{className:"size-4"}),"input-available":(0,_a.jsx)($o.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,_a.jsx)($o.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,_a.jsx)($o.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Oo=({className:e,type:t,state:a,...o})=>(0,_a.jsxs)(jt,{className:c("flex w-full items-center justify-between gap-4 p-3",e),...o,children:[(0,_a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_a.jsx)($o.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,_a.jsx)("span",{className:"font-medium text-sm",children:t}),gr(a)]}),(0,_a.jsx)($o.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Ho=({className:e,...t})=>(0,_a.jsx)(Wt,{className:c("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),jo=({className:e,input:t,...a})=>(0,_a.jsxs)("div",{className:c("space-y-2 overflow-hidden p-4",e),...a,children:[(0,_a.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,_a.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,_a.jsx)(qt,{code:JSON.stringify(t,null,2),language:"json"})})]}),Wo=({className:e,output:t,errorText:a,...o})=>{if(!(t||a))return null;let s=(0,_a.jsx)("div",{children:t});return typeof t=="object"?s=(0,_a.jsx)(qt,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(s=(0,_a.jsx)(qt,{code:t,language:"json"})),(0,_a.jsxs)("div",{className:c("space-y-2 p-4",e),...o,children:[(0,_a.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:a?"Error":"Result"}),(0,_a.jsxs)("div",{className:c("overflow-x-auto rounded-md text-xs [&_table]:w-full",a?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[a&&(0,_a.jsx)("div",{children:a}),s]})]})};function Go({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:s,fileUploads:r,isDragOver:l,enableFileUpload:n,onInputChange:p,addToolResult:u,onSendMessage:C,onKeyPress:f,onFileUpload:h,onRemoveFile:S,onDragOver:I,className:D}){let x=(0,rt.useRef)(null),T=(0,rt.useRef)(null),_=(0,rt.useRef)(null),[N,L]=(0,rt.useState)(!1),[Z,ee]=(0,rt.useState)({path:[],selectedItems:[],filters:{}});(0,rt.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,rt.useEffect)(()=>{N&&setTimeout(()=>{x.current?.scrollIntoView({behavior:"smooth"})},100)},[N]);let te=()=>ga(Z),Y=()=>{let m=[];return s.forEach(F=>{F.actions&&F.actions.forEach(K=>{m.push({label:K.label,action:()=>$(K.id,{path:[F],selectedItems:[],filters:{}})})}),F.children&&F.children.forEach(K=>{K.type==="list"&&K.data&&m.push({label:`View ${K.name}`,action:()=>L(!0)})})}),m.slice(0,5)},$=(m,F)=>{console.log("Capability action:",m,F);let K=`Executing ${m} with context: ${JSON.stringify(F.path.map(w=>w.name))}`;L(!1)},ie=ga({path:[],selectedItems:[],filters:{}}),de=m=>{h(m.target.files),m.target.files&&(m.target.value="")},M=m=>{m.preventDefault(),I(!0)},Ie=m=>{m.preventDefault(),I(!1)},d=m=>{m.preventDefault(),I(!1),h(m.dataTransfer.files)},U=m=>{if(m===0)return"0 Bytes";let F=1024,K=["Bytes","KB","MB","GB"],w=Math.floor(Math.log(m)/Math.log(F));return parseFloat((m/Math.pow(F,w)).toFixed(2))+" "+K[w]},B=m=>m.startsWith("image/")?(0,_a.jsx)($o.Image,{className:"h-4 w-4"}):m.startsWith("text/")?(0,_a.jsx)($o.FileText,{className:"h-4 w-4"}):(0,_a.jsx)($o.File,{className:"h-4 w-4"}),q=m=>{let F=m.role==="assistant",K=m.role==="user";return(0,_a.jsxs)("div",{className:c("flex my-2 items-start gap-3",K?"flex-row-reverse":""),children:[(0,_a.jsx)(Je,{className:"h-8 w-8 shrink-0",children:(0,_a.jsx)(Qe,{className:c(K?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:K?(0,_a.jsx)($o.User,{className:"h-4 w-4"}):(0,_a.jsx)($o.Bot,{className:"h-4 w-4"})})}),(0,_a.jsx)("div",{className:c("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",K?"bg-primary text-primary-foreground":"bg-muted"),children:m.parts.map((w,V)=>{if(w.type==="text")return(0,_a.jsx)(va,{id:m.id,content:w.text},`${m.id}-text`);if(w.type==="file"){let P=w;return(0,_a.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,_a.jsxs)("div",{className:"flex items-center gap-2",children:[B(P.mediaType||"application/octet-stream"),(0,_a.jsx)("div",{className:"flex-1 min-w-0",children:(0,_a.jsx)("p",{className:"text-sm font-medium truncate",children:P.filename||P.url?.split("/").pop()||"File"})}),P.url&&(0,_a.jsx)(A,{variant:"ghost",size:"sm",onClick:()=>window.open(P.url,"_blank"),className:"h-8 w-8 p-0",children:(0,_a.jsx)($o.Download,{className:"h-4 w-4"})})]})},V)}if(w.type.startsWith("tool-")){let P=w,ke=w.type.replace("tool-","");if(ke==="task")switch(P.state){case"input-available":return(0,_a.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},V);case"output-available":return(0,_a.jsx)("div",{className:"mb-2",children:(0,_a.jsx)(Co,{data:{id:P.output?.id||P.input?.id,fetchLatest:!1,taskData:P.output||P.input}})},V);case"output-error":return(0,_a.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",P.errorText]},V);default:return null}if(w.type==="tool-requestEndpointLogin")return(0,_a.jsx)("div",{className:"mb-2",children:(0,_a.jsx)(ba,{toolPart:P,index:V,addToolResult:u??(()=>{})})},V);if(w.type==="tool-authenticate")return(0,_a.jsx)("div",{className:"mb-2",children:(0,_a.jsx)(ba,{toolPart:P,index:V,addToolResult:u??(()=>{})})},V);if(w.type==="tool-requestApproval")return(0,_a.jsx)("div",{className:"mb-2",children:(0,_a.jsx)(Bo,{toolPart:P,index:V,addToolResult:u??(()=>{})})},V);if(ke==="artefact")switch(P.state){case"input-available":return(0,_a.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},V);case"output-available":return(0,_a.jsx)("div",{className:"mb-2",children:(0,_a.jsx)(Po,{artefact:P.output?.description||"",taskId:P.output?.id||P.input?.id,taskData:P.output||P.input})},V);case"output-error":return(0,_a.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",P.errorText]},V);default:return null}return(0,_a.jsx)("div",{className:"mb-2",children:(0,_a.jsxs)(he,{className:"w-full max-w-md",children:[(0,_a.jsx)(Le,{children:(0,_a.jsx)(ze,{className:"text-lg",children:ke})}),(0,_a.jsxs)(De,{children:[P.state==="input-available"&&(0,_a.jsxs)("p",{className:"text-sm",children:["Processing ",ke,"..."]}),P.state==="output-available"&&(0,_a.jsx)("pre",{className:"text-sm",children:JSON.stringify(P.output,null,2)}),P.state==="output-error"&&(0,_a.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",P.errorText]})]})]})},V)}if(w.type.startsWith("data-")){let P=w,ke=w.type.replace("data-","");return ke==="reference"?(0,_a.jsx)("div",{className:"mb-2",children:(0,_a.jsx)(he,{className:"w-full",children:(0,_a.jsx)(De,{className:"p-4",children:(0,_a.jsx)("div",{className:"space-y-2",children:P.data?.references?.map((me,Me)=>(0,_a.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,_a.jsx)(ne,{variant:"outline",children:me.type||"link"}),(0,_a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,_a.jsx)("p",{className:"text-sm font-medium truncate",children:me.title}),me.description&&(0,_a.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:me.description})]}),me.url&&(0,_a.jsx)(A,{variant:"ghost",size:"sm",onClick:()=>window.open(me.url,"_blank"),className:"h-8 w-8 p-0",children:(0,_a.jsx)($o.ExternalLink,{className:"h-4 w-4"})})]},Me))})})})},V):ke==="menu"?(0,_a.jsx)("div",{className:"mb-2",children:(0,_a.jsxs)(he,{className:"w-full",children:[(0,_a.jsx)(Le,{children:(0,_a.jsx)(ze,{className:"text-lg",children:P.data?.title})}),(0,_a.jsx)(De,{children:(0,_a.jsx)("div",{className:"space-y-2",children:P.data?.items?.map((me,Me)=>(0,_a.jsx)(A,{variant:"outline",className:"w-full justify-start",onClick:me.action,children:(0,_a.jsxs)("div",{className:"text-left",children:[(0,_a.jsx)("p",{className:"font-medium",children:me.label}),me.description&&(0,_a.jsx)("p",{className:"text-xs text-muted-foreground",children:me.description})]})},Me))})})]})},V):(0,_a.jsx)("div",{className:"mb-2",children:(0,_a.jsxs)(he,{className:"w-full max-w-md",children:[(0,_a.jsx)(Le,{children:(0,_a.jsx)(ze,{className:"text-lg",children:ke})}),(0,_a.jsx)(De,{children:(0,_a.jsx)("pre",{className:"text-sm",children:JSON.stringify(P.data,null,2)})})]})},V)}if(w.type==="reasoning")return(0,_a.jsxs)(wa,{className:"w-full",isStreaming:status==="streaming"&&V===m.parts.length-1&&m.id===e.rt(-1)?.id,children:[(0,_a.jsx)(Ca,{}),(0,_a.jsx)(Na,{children:w.text})]},`${m.id}-${V}`);if(w.type==="dynamic-tool")return(0,_a.jsxs)(Fo,{defaultOpen:!0,children:[(0,_a.jsx)(Oo,{type:`tool-${w.toolName}`,state:w.state}),(0,_a.jsxs)(Ho,{children:[(0,_a.jsx)(jo,{input:w.input}),(0,_a.jsx)(Wo,{output:(0,_a.jsx)(kt,{children:String(w.output)}),errorText:w.errorText})]})]},`${m.id}-${V}`)})})]})};return(0,_a.jsxs)("div",{className:`h-full flex flex-col shadow-sm max-w-4xl mx-auto ${D||""}`,children:[(0,_a.jsxs)(Pe,{ref:T,className:"flex-1 p-4 bg-background border-0",onDragOver:M,onDragLeave:Ie,onDrop:d,children:[(0,_a.jsxs)("div",{className:c("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,_a.jsx)(ot.animate,{children:e.map(m=>(0,_a.jsx)(ot.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:c("flex gap-3",m.role==="user"?"flex-row-reverse":"flex-row"),children:q(m)},m.id))}),N&&(0,_a.jsxs)(ot.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,_a.jsx)(Je,{className:"h-8 w-8",children:(0,_a.jsx)(Qe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,_a.jsx)($o.Bot,{className:"h-4 w-4"})})}),(0,_a.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,_a.jsx)(ho,{capabilities:s,isOpen:N,onToggle:()=>L(!N),onActionSelect:$,className:"w-full"})})]}),a&&(0,_a.jsxs)(ot.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,_a.jsx)(Je,{className:"h-8 w-8",children:(0,_a.jsx)(Qe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,_a.jsx)($o.Bot,{className:"h-4 w-4"})})}),(0,_a.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,_a.jsxs)("div",{className:"flex space-x-1",children:[(0,_a.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,_a.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,_a.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,_a.jsx)("div",{ref:x})]}),r.length>0&&(0,_a.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,_a.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(m=>(0,_a.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[B(m.file.type),(0,_a.jsx)("span",{className:"text-sm font-medium",children:m.file.name}),(0,_a.jsx)("span",{className:"text-xs text-muted-foreground",children:U(m.file.size)}),(0,_a.jsx)(A,{variant:"ghost",size:"sm",onClick:()=>S(m.id),className:"h-6 w-6 p-0",children:(0,_a.jsx)($o._a,{className:"h-4 w-4"})})]},m.id))})}),(0,_a.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,_a.jsxs)("div",{className:"flex gap-3",children:[(0,_a.jsx)(ht,{value:t,onChange:m=>p(m.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),n&&(0,_a.jsx)(A,{variant:"outline",size:"icon",onClick:()=>_.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,_a.jsx)($o.Paperclip,{className:"h-4 w-4"})}),(0,_a.jsx)(A,{onClick:C,disabled:!t.trim()&&r.length===0||a,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,_a.jsx)($o.Send,{className:"h-4 w-4"})})]}),(0,_a.jsxs)("div",{className:"flex items-center gap-3 rt-3",children:[(0,_a.jsxs)(A,{onClick:()=>L(!N),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,_a.jsx)($o.Menu,{className:"h-3 w-3 mr-1"}),N?"Hide":"Show"," Capabilities"]}),(0,_a.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[te().map((m,F)=>(0,_a.jsx)(A,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>$(m.id,Z),children:m.label},`context-${m.id}`)),te().length===0&&Y().map((m,F)=>(0,_a.jsx)(A,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:m.action,children:m.label},`suggestion-${F}`))]})]}),n&&(0,_a.jsx)("input",{ref:_,type:"file",multiple:!0,onChange:de,className:"hidden"})]})]})}function it({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:s=[],capabilities:r=[],sidebarItems:l=[],notifications:n=[],sessions:p=[],onNewChat:u,onSessionSelect:C,onSessionDelete:f,onSessionEdit:h=()=>{},onBusinessUnitChange:S=()=>{},onNotificationRemove:I=()=>{},onRemoveAll:D=()=>{},onActionClick:x=()=>{},onSearch:T=U=>console.log("Search query:",U),initialTeam:_="design",currentSession:N=null,showCapabilities:L=!0,title:Z="Digital Colleagues",enableFileUpload:ee=!0,maxFileSize:te=10,allowedFileTypes:Y=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:$="/headerlogo.png",appName:ie="Nuvia",tagline:de="AI-Powered Workspace",actionIcon:M=(0,_a.jsx)($o.Users,{className:"mr-2 h-4 w-4"}),actionText:Ie="Collaborate",sidebarInitiallyClosed:d=!1}){let U={...e,onError:O=>{q?.setMessages(ue=>[...ue,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:O.message}]}]),console.error("Error in CopilotInterface:",O)}},B=(0,Vo.useChat)(U||{}),q=a?t||B:null,[m,F]=(0,rt.useState)(""),[K,w]=(0,rt.useState)(!1),V=q?.messages||o,P=m,ke=q?.status==="submitted"||K,me=q?.addToolResult?(O,ue,re)=>{q.addToolResult({tool:ue,toolCallId:O,output:re}),q.sendMessage()}:()=>{},Me=s||[],qo={id:"default",name:"Default Team",description:"Default team when no business units are available",icon:"\u{1F3E2}",color:"bg-gray-500",accentColor:"bg-gray-600"},[Ko,Jo]=(0,rt.useState)(()=>Me.length===0?qo:Me.find(O=>O.id===_)||Me[0]),[ft,Pt]=(0,rt.useState)([]),[Qo,Xo]=(0,rt.useState)(!1),Yo=O=>{if(!O||!ee)return;let ue=[];Array.from(O).forEach(re=>{if(re.size>te*1024*1024){alert(`File ${re.name} is too large. Maximum size is ${te}MB.`);return}if(Y.length>0&&!Y.some(Tt=>re.type.match(Tt))){alert(`File type ${re.type} is not allowed.`);return}let Ta={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:re,status:"pending",progress:0};if(re.type.startsWith("image/")){let Tt=new FileReader;Tt.onload=oi=>{Pt(ii=>ii.map(Jt=>Jt.id===Ta.id?{...Jt,preview:oi.target?.result}:Jt))},Tt.readAsDataURL(re)}ue.push(Ta)}),Pt(re=>[...re,...ue])},Zo=O=>{Pt(ue=>ue.filter(re=>re.id!==O))},Pa=()=>{if(!(!P.trim()&&ft.length===0)){if(q){let O=ft.length>0?ei(ft.map(ue=>ue.file)):void 0;q.sendMessage({text:P,files:O},{body:{timestamp:Date.now()}}),F("")}else console.log("Message to send:",P),console.log("Files to upload:",ft),F(""),w(!0),setTimeout(()=>{w(!1)},1500);Pt([])}},ei=O=>{let ue=new DataTransfer;return O.forEach(re=>ue.items.add(re)),ue.files},ti=O=>{O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),Pa())},ai=O=>{F(O)};return(0,_a.jsx)(fo,{sidebarItems:l||[],title:Z,notifications:n||[],businessUnits:Me,currentBusinessUnit:Ko,onBusinessUnitChange:O=>{O&&(Jo(O),S?.(O))},onSearch:T,showTabs:!1,onActionClick:x,actionIcon:M,actionText:Ie,onNotificationRemove:I,onRemoveAll:D,logo:$,appName:ie,tagline:de,sidebarInitiallyClosed:d,children:(0,_a.jsx)(Kt.AnimatePresence,{mode:"wait",children:(0,_a.jsx)(Kt.motion.div,{className:"flex-1 h-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,_a.jsxs)("div",{className:"h-full flex",children:[(0,_a.jsx)("div",{className:"w-80 flex-shrink-0 h-full p-2",children:(0,_a.jsx)(bo,{sessions:p||[],currentSession:N,teams:Me,onNewChat:u,onSessionSelect:C,onSessionEdit:h,onSessionDelete:f})}),(0,_a.jsx)("div",{className:"flex-1 h-full p-2",children:(0,_a.jsx)(Go,{messages:V||[],input:P,isTyping:ke,currentSessionTitle:N?.title,capabilities:r||[],onInputChange:ai,addToolResult:me,onSendMessage:Pa,onKeyPress:ti,fileUploads:ft,isDragOver:Qo,enableFileUpload:ee,onFileUpload:Yo,onRemoveFile:Zo,onDragOver:Xo})})]})},"chat-interface")})})}function fr(){let[e,t]=(0,rt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you help me analyze my sales data?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`I'll help you analyze your sales data. Let me fetch the latest information.
|
|
22
22
|
|
|
23
|
-
*\u{1F527} Calling function: fetch_sales_data(period="30d", region="all")*`}]},{id:"3",role:"assistant",parts:[{type:"text",text:`Great! I'
|
|
23
|
+
*\u{1F527} Calling function: fetch_sales_data(period="30d", region="all")*`}]},{id:"3",role:"assistant",parts:[{type:"text",text:`Great! I'_a retrieved your sales data for the last 30 days. Here's what I found:
|
|
24
24
|
|
|
25
25
|
**Sales Summary:**
|
|
26
26
|
- **Total Revenue:** $125,000
|
|
@@ -40,7 +40,7 @@ Would you like me to create a detailed report or analyze any specific metrics?`}
|
|
|
40
40
|
|
|
41
41
|
*\u{1F4C8} Tool Result: Chart generated successfully - ID: revenue-trend-123*
|
|
42
42
|
|
|
43
|
-
Perfect! I'
|
|
43
|
+
Perfect! I'_a created a revenue trend chart for the last 30 days. The chart shows your daily revenue performance with clear trend indicators:
|
|
44
44
|
|
|
45
45
|
\`\`\`
|
|
46
46
|
\u{1F4CA} Revenue Trend - Last 30 Days
|
|
@@ -81,7 +81,7 @@ Timestamp: 2024-01-20T10:30:45Z
|
|
|
81
81
|
- \`analyze_data\` - Perform data analysis
|
|
82
82
|
- \`generate_report\` - Create reports
|
|
83
83
|
|
|
84
|
-
Would you like me to try a valid function instead?`}]}]);return(0,
|
|
84
|
+
Would you like me to try a valid function instead?`}]}]);return(0,_a.jsx)("div",{className:"h-screen w-full",children:(0,_a.jsx)(it,{messages:e,capabilities:tt,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function br(){let[e,t]=(0,rt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you show me some examples of markdown formatting?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`# Markdown Formatting Examples
|
|
85
85
|
|
|
86
86
|
Here are various markdown elements that should render properly in the chat:
|
|
87
87
|
|
|
@@ -340,7 +340,7 @@ if __name__ == "__main__":
|
|
|
340
340
|
analyzer.visualize_trends('sales_analysis.png')
|
|
341
341
|
\`\`\`
|
|
342
342
|
|
|
343
|
-
This demonstrates complex syntax highlighting with multiple languages and should render properly with appropriate color coding!`}]}]);return(0,
|
|
343
|
+
This demonstrates complex syntax highlighting with multiple languages and should render properly with appropriate color coding!`}]}]);return(0,_a.jsx)("div",{className:"h-screen w-full",children:(0,_a.jsx)(it,{messages:e,capabilities:tt,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function vr(){let[e,t]=(0,rt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you show me some interactive dashboard components?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:"I'll create some interactive dashboard components for you. Here are various UI elements:"},{type:"data-dashboard",data:{title:"Sales Dashboard",widgets:[{type:"metric",title:"Total Revenue",value:"$125,000",change:"+12.5%",trend:"up"},{type:"metric",title:"New Customers",value:"47",change:"+8.3%",trend:"up"},{type:"metric",title:"Conversion Rate",value:"3.2%",change:"-2.1%",trend:"down"}]}}]},{id:"3",role:"user",parts:[{type:"text",text:"Can you show me a data table with customer information?"}]},{id:"4",role:"assistant",parts:[{type:"text",text:"Here's a customer data table with sorting and filtering capabilities:"},{type:"data-table",data:{title:"Customer Information",columns:[{key:"name",label:"Customer Name",sortable:!0},{key:"company",label:"Company",sortable:!0},{key:"revenue",label:"Revenue",sortable:!0,type:"currency"},{key:"status",label:"Status",type:"badge"},{key:"lastContact",label:"Last Contact",type:"date"}],rows:[{id:"1",name:"Alice Johnson",company:"Acme Corp",revenue:85e3,status:"active",lastContact:"2024-01-15"},{id:"2",name:"Bob Smith",company:"Beta Inc",revenue:45e3,status:"pending",lastContact:"2024-01-12"},{id:"3",name:"Carol Davis",company:"Gamma LLC",revenue:15e3,status:"inactive",lastContact:"2024-01-08"},{id:"4",name:"David Wilson",company:"Delta Systems",revenue:125e3,status:"active",lastContact:"2024-01-18"}]}}]},{id:"5",role:"user",parts:[{type:"text",text:"Show me a progress tracker for a project"}]},{id:"6",role:"assistant",parts:[{type:"text",text:"Here's a project progress tracker with timeline and milestones:"},{type:"data-progress",data:{title:"Website Redesign Project",overall_progress:65,phases:[{name:"Discovery & Planning",status:"completed",progress:100,start_date:"2024-01-01",end_date:"2024-01-15",tasks:[{name:"Stakeholder interviews",completed:!0},{name:"Requirements gathering",completed:!0},{name:"Project timeline",completed:!0}]},{name:"Design & Prototyping",status:"completed",progress:100,start_date:"2024-01-16",end_date:"2024-02-15",tasks:[{name:"Wireframes",completed:!0},{name:"Visual design",completed:!0},{name:"Interactive prototype",completed:!0}]},{name:"Development",status:"in_progress",progress:75,start_date:"2024-02-16",end_date:"2024-03-30",tasks:[{name:"Frontend development",completed:!0},{name:"Backend integration",completed:!1},{name:"Testing & QA",completed:!1}]},{name:"Launch & Deployment",status:"pending",progress:0,start_date:"2024-03-31",end_date:"2024-04-15",tasks:[{name:"Production deployment",completed:!1},{name:"User training",completed:!1},{name:"Go-live support",completed:!1}]}]}}]}]);return(0,_a.jsx)("div",{className:"h-screen w-full",children:(0,_a.jsx)(it,{messages:e,capabilities:tt,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function hr(){let[e,t]=(0,rt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"I want to upload some files for analysis. I have a sales_data.csv file and a quarterly_report.pdf that I need to analyze."}]},{id:"2",role:"assistant",parts:[{type:"text",text:`Perfect! I can help you analyze various file types. You can upload:
|
|
344
344
|
|
|
345
345
|
\u{1F4CA} **Data Files:**
|
|
346
346
|
- CSV/Excel spreadsheets
|
|
@@ -363,7 +363,7 @@ This demonstrates complex syntax highlighting with multiple languages and should
|
|
|
363
363
|
- \u2705 File type validation
|
|
364
364
|
- \u2705 Size limit checking (max 10MB)
|
|
365
365
|
|
|
366
|
-
Try uploading your files using the attachment button below! I'll analyze them once uploaded.`}]},{id:"3",role:"user",parts:[{type:"text",text:"I just uploaded sales_data.csv (15.4 KB) and quarterly_report.pdf (2.6 MB)"}]},{id:"4",role:"assistant",parts:[{type:"text",text:`Great! I can see you'
|
|
366
|
+
Try uploading your files using the attachment button below! I'll analyze them once uploaded.`}]},{id:"3",role:"user",parts:[{type:"text",text:"I just uploaded sales_data.csv (15.4 KB) and quarterly_report.pdf (2.6 MB)"}]},{id:"4",role:"assistant",parts:[{type:"text",text:`Great! I can see you'_a uploaded two files:
|
|
367
367
|
|
|
368
368
|
## \u{1F4C1} Uploaded Files
|
|
369
369
|
|
|
@@ -405,7 +405,7 @@ Would you like me to:
|
|
|
405
405
|
- \u{1F4CA} Create detailed visualizations
|
|
406
406
|
- \u{1F50D} Investigate the revenue variance
|
|
407
407
|
- \u{1F4C8} Generate trend analysis
|
|
408
|
-
- \u{1F4CB} Create a unified report?`}]}]);return(0,
|
|
408
|
+
- \u{1F4CB} Create a unified report?`}]}]);return(0,_a.jsx)("div",{className:"h-screen w-full",children:(0,_a.jsx)(it,{messages:e,capabilities:tt,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function yr(){let[e,t]=(0,rt.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you fetch my latest sales data?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`I'll fetch your latest sales data right away.
|
|
409
409
|
|
|
410
410
|
*\u{1F527} Calling function: fetch_sales_data(period="latest")*
|
|
411
411
|
|
|
@@ -446,7 +446,7 @@ I'm unable to fetch the sales data due to insufficient permissions.
|
|
|
446
446
|
**Next Steps:**
|
|
447
447
|
1. **Contact your administrator** to request the necessary permissions
|
|
448
448
|
2. **Verify your role** - You may need a sales or data analyst role
|
|
449
|
-
3. **Check group memberships** - Ensure you'
|
|
449
|
+
3. **Check group memberships** - Ensure you're in the appropriate security groups
|
|
450
450
|
|
|
451
451
|
**Alternative Options:**
|
|
452
452
|
- Upload a sales data file directly (CSV, Excel)
|
|
@@ -471,7 +471,7 @@ The report generation failed because the specified data source is not valid.
|
|
|
471
471
|
**Available Data Sources:**
|
|
472
472
|
- \`sales_db\` - Main sales database
|
|
473
473
|
- \`crm_system\` - Customer relationship management system
|
|
474
|
-
- \`uploaded_files\` - Files you'
|
|
474
|
+
- \`uploaded_files\` - Files you'_a uploaded to the chat
|
|
475
475
|
|
|
476
476
|
**How to Fix This:**
|
|
477
477
|
1. **Choose a valid source** from the list above
|
|
@@ -480,20 +480,20 @@ The report generation failed because the specified data source is not valid.
|
|
|
480
480
|
|
|
481
481
|
**Example:** "Generate a sales report using the CRM system data"
|
|
482
482
|
|
|
483
|
-
Would you like me to try generating a report with one of the valid data sources?`}]},{id:"7",role:"user",parts:[{type:"text",text:"Let me try uploading some corrupted data (corrupted_data.xlsx - 0 bytes)"}]},{id:"8",role:"assistant",parts:[{type:"text",text:`I see you'
|
|
483
|
+
Would you like me to try generating a report with one of the valid data sources?`}]},{id:"7",role:"user",parts:[{type:"text",text:"Let me try uploading some corrupted data (corrupted_data.xlsx - 0 bytes)"}]},{id:"8",role:"assistant",parts:[{type:"text",text:`I see you're trying to upload a file. Let me analyze it.
|
|
484
484
|
|
|
485
485
|
*\u{1F527} Processing file: corrupted_data.xlsx*
|
|
486
486
|
|
|
487
487
|
\u{1F4BE} **Corrupted or Empty File**
|
|
488
488
|
|
|
489
489
|
\`\`\`
|
|
490
|
-
Error: File appears to
|
|
490
|
+
Error: File appears to be corrupted or empty
|
|
491
491
|
Code: CORRUPTED_FILE
|
|
492
492
|
File size: 0 bytes
|
|
493
493
|
MIME type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
|
|
494
494
|
\`\`\`
|
|
495
495
|
|
|
496
|
-
The uploaded Excel file appears to
|
|
496
|
+
The uploaded Excel file appears to be corrupted or empty (0 bytes).
|
|
497
497
|
|
|
498
498
|
**Possible Causes:**
|
|
499
499
|
- File upload was interrupted
|
|
@@ -503,7 +503,7 @@ The uploaded Excel file appears to Ta corrupted or empty (0 bytes).
|
|
|
503
503
|
|
|
504
504
|
**Troubleshooting Steps:**
|
|
505
505
|
|
|
506
|
-
1. **
|
|
506
|
+
1. **_a-save the file:**
|
|
507
507
|
- Open in Excel and save as a new file
|
|
508
508
|
- Try "Save As" \u2192 Excel Workbook (.xlsx)
|
|
509
509
|
|
|
@@ -513,9 +513,9 @@ The uploaded Excel file appears to Ta corrupted or empty (0 bytes).
|
|
|
513
513
|
|
|
514
514
|
3. **Check file integrity:**
|
|
515
515
|
- Verify you can open the file locally
|
|
516
|
-
- Check file size (should
|
|
516
|
+
- Check file size (should be > 0 bytes)
|
|
517
517
|
|
|
518
|
-
4. **
|
|
518
|
+
4. **_a-upload:**
|
|
519
519
|
- Clear browser cache
|
|
520
520
|
- Try uploading again
|
|
521
521
|
|
|
@@ -547,7 +547,7 @@ It appears there are network connectivity issues affecting several services:
|
|
|
547
547
|
- \u2705 Authentication (operational)
|
|
548
548
|
|
|
549
549
|
**Impact:**
|
|
550
|
-
- File uploads may fail or
|
|
550
|
+
- File uploads may fail or be delayed
|
|
551
551
|
- Data retrieval functions unavailable
|
|
552
552
|
- Real-time analytics temporarily disabled
|
|
553
553
|
- Chat functionality remains available
|
|
@@ -564,7 +564,7 @@ It appears there are network connectivity issues affecting several services:
|
|
|
564
564
|
- Access cached reports and documents
|
|
565
565
|
- Plan future actions for when services restore
|
|
566
566
|
|
|
567
|
-
I'll continue monitoring the connection status. Services typically restore within 5-10 minutes during maintenance windows.`}]}]);return(0,
|
|
567
|
+
I'll continue monitoring the connection status. Services typically restore within 5-10 minutes during maintenance windows.`}]}]);return(0,_a.jsx)("div",{className:"h-screen w-full",children:(0,_a.jsx)(it,{messages:e,capabilities:tt,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function xr(){let[e,t]=(0,rt.useState)([{id:"1",role:"assistant",parts:[{type:"text",text:`Welcome! I can help you with various business tasks. Use the capabilities menu rt the bottom to explore what I can do, or ask me directly about:
|
|
568
568
|
|
|
569
569
|
\u{1F3E2} **Sales & CRM**
|
|
570
570
|
- Customer management
|
|
@@ -586,7 +586,7 @@ I'll continue monitoring the connection status. Services typically restore withi
|
|
|
586
586
|
- Budget analysis
|
|
587
587
|
- Expense tracking
|
|
588
588
|
|
|
589
|
-
Try clicking on any capability in the menu below to get started!`}]},{id:"2",role:"user",parts:[{type:"text",text:"I clicked on Sales \u2192 Customers \u2192 Acme Corp"}]},{id:"3",role:"assistant",parts:[{type:"text",text:"Great! You'
|
|
589
|
+
Try clicking on any capability in the menu below to get started!`}]},{id:"2",role:"user",parts:[{type:"text",text:"I clicked on Sales \u2192 Customers \u2192 Acme Corp"}]},{id:"3",role:"assistant",parts:[{type:"text",text:"Great! You'_a selected **Acme Corp** from the customers list. Here's what I found:"},{type:"data-customer-card",data:{id:"acme-corp",name:"Acme Corp",type:"Enterprise Customer",revenue:"$125,000 ARR",industry:"Technology",employees:500,lastContact:"2024-01-15",status:"active",contacts:[{name:"John Smith",role:"CTO",email:"john@acme.com"},{name:"Sarah Johnson",role:"Procurement",email:"sarah@acme.com"}],recent_activity:[{date:"2024-01-15",activity:"Contract renewal discussion"},{date:"2024-01-10",activity:"Product demo scheduled"},{date:"2024-01-05",activity:"Support ticket resolved"}],opportunities:[{name:"Enterprise License Renewal",value:"$150K",stage:"Negotiation"},{name:"Additional Modules",value:"$25K",stage:"Proposal"}]}}]},{id:"4",role:"assistant",parts:[{type:"text",text:`**Available Actions for Acme Corp:**
|
|
590
590
|
|
|
591
591
|
\u{1F3AF} **Sales Actions**
|
|
592
592
|
- Schedule follow-up meeting
|
|
@@ -603,7 +603,7 @@ Try clicking on any capability in the menu below to get started!`}]},{id:"2",rol
|
|
|
603
603
|
- Generate account report
|
|
604
604
|
- Analyze usage patterns
|
|
605
605
|
|
|
606
|
-
What would you like to do next?`}]},{id:"5",role:"user",parts:[{type:"text",text:"Now I want to explore Marketing \u2192 Campaign Management"}]},{id:"6",role:"assistant",parts:[{type:"text",text:"Perfect! You'
|
|
606
|
+
What would you like to do next?`}]},{id:"5",role:"user",parts:[{type:"text",text:"Now I want to explore Marketing \u2192 Campaign Management"}]},{id:"6",role:"assistant",parts:[{type:"text",text:"Perfect! You'_a navigated to **Campaign Management**. Here's an overview of your marketing campaigns:"},{type:"data-campaigns",data:{title:"Active Marketing Campaigns",campaigns:[{id:"winter-promo",name:"Winter Promotion 2024",status:"active",type:"Email + Social",start_date:"2024-01-01",end_date:"2024-02-29",budget:15e3,spent:8500,leads:247,conversions:23,roi:"180%"},{id:"product-launch",name:"New Product Launch",status:"planning",type:"Multi-channel",start_date:"2024-02-15",end_date:"2024-04-15",budget:25e3,spent:0,leads:0,conversions:0,roi:"TBD"},{id:"retargeting",name:"Retargeting Campaign",status:"active",type:"Digital Ads",start_date:"2024-01-10",end_date:"2024-03-10",budget:8e3,spent:3200,leads:89,conversions:12,roi:"150%"}]}}]},{id:"7",role:"assistant",parts:[{type:"text",text:`**Campaign Management Actions:**
|
|
607
607
|
|
|
608
608
|
\u{1F4DD} **Create & Edit**
|
|
609
609
|
- Create new campaign
|
|
@@ -625,7 +625,7 @@ What would you like to do next?`}]},{id:"5",role:"user",parts:[{type:"text",text
|
|
|
625
625
|
- Optimize targeting
|
|
626
626
|
- Adjust bidding strategies
|
|
627
627
|
|
|
628
|
-
Which campaign would you like to work with, or what action would you like to take?`}]},{id:"8",role:"user",parts:[{type:"text",text:"Let me check HR \u2192 Employee Management \u2192 Performance Reviews"}]},{id:"9",role:"assistant",parts:[{type:"text",text:"You'
|
|
628
|
+
Which campaign would you like to work with, or what action would you like to take?`}]},{id:"8",role:"user",parts:[{type:"text",text:"Let me check HR \u2192 Employee Management \u2192 Performance Reviews"}]},{id:"9",role:"assistant",parts:[{type:"text",text:"You'_a accessed **Performance Reviews** in HR. Here's the current status of performance reviews:"},{type:"data-performance",data:{title:"Performance Review Dashboard",period:"Q4 2023",overview:{total_employees:127,reviews_completed:89,reviews_pending:23,reviews_overdue:15,completion_rate:70.1},departments:[{name:"Engineering",employees:45,completed:38,pending:5,overdue:2,avg_rating:4.2},{name:"Sales",employees:28,completed:22,pending:4,overdue:2,avg_rating:3.9},{name:"Marketing",employees:18,completed:12,pending:3,overdue:3,avg_rating:4},{name:"Operations",employees:15,completed:9,pending:4,overdue:2,avg_rating:3.8}],upcoming_deadlines:[{employee:"Alex Chen",department:"Engineering",due_date:"2024-01-25"},{employee:"Maria Garcia",department:"Sales",due_date:"2024-01-27"},{employee:"David Kim",department:"Marketing",due_date:"2024-01-30"}]}}]},{id:"10",role:"assistant",parts:[{type:"text",text:`**Performance Review Actions:**
|
|
629
629
|
|
|
630
630
|
\u2705 **Review Management**
|
|
631
631
|
- Schedule new reviews
|
|
@@ -652,4 +652,4 @@ Which campaign would you like to work with, or what action would you like to tak
|
|
|
652
652
|
- 23 reviews are **pending**
|
|
653
653
|
- 3 employees have upcoming deadlines this week
|
|
654
654
|
|
|
655
|
-
Would you like me to send reminder notifications or help with any specific review tasks?`}]}]);return(0,
|
|
655
|
+
Would you like me to send reminder notifications or help with any specific review tasks?`}]}]);return(0,_a.jsx)("div",{className:"h-screen w-full",children:(0,_a.jsx)(it,{messages:e,capabilities:tt,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}0&&(module.exports={ChatDemoCapabilitiesInteraction,ChatDemoErrorHandling,ChatDemoFileUploads,ChatDemoMarkdownResponses,ChatDemoToolCalling,ChatDemoUIComponents});
|