cortex-react-components 2.5.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (168) hide show
  1. package/dist/{chunk-GETYSIZV.mjs → chunk-255P6K5W.mjs} +1 -1
  2. package/dist/{chunk-VRE6VCHX.mjs → chunk-2BR55L74.mjs} +1 -1
  3. package/dist/{chunk-P6OSMPUQ.mjs → chunk-2RQDJ5XT.mjs} +1 -1
  4. package/dist/{chunk-LW4QFIFR.mjs → chunk-3PHJWI4Q.mjs} +1 -1
  5. package/dist/{chunk-QTILVWJA.mjs → chunk-4RYG24IZ.mjs} +1 -1
  6. package/dist/{chunk-WB2Y7HTT.mjs → chunk-55MVSCX4.mjs} +1 -1
  7. package/dist/{chunk-ABGNIQRP.mjs → chunk-5RDLHKTK.mjs} +1 -1
  8. package/dist/{chunk-BQQ4V4PX.mjs → chunk-5SHZBJ5R.mjs} +1 -1
  9. package/dist/{chunk-GAZHKHGB.mjs → chunk-67QPOSVV.mjs} +1 -1
  10. package/dist/{chunk-CLGBBNRB.mjs → chunk-75WE6ZXB.mjs} +1 -1
  11. package/dist/{chunk-7OMPPFGG.mjs → chunk-7GMAMIHM.mjs} +1 -1
  12. package/dist/chunk-CSDKRMII.mjs +4 -0
  13. package/dist/{chunk-TK4JC5PG.mjs → chunk-E64KWNOT.mjs} +1 -1
  14. package/dist/{chunk-2GM2LPLB.mjs → chunk-ERJXTG6X.mjs} +1 -1
  15. package/dist/{chunk-HDKHF3EA.mjs → chunk-FKU4VQR6.mjs} +1 -1
  16. package/dist/{chunk-MO2B5CDW.mjs → chunk-FQMEHUDP.mjs} +1 -1
  17. package/dist/{chunk-77PCUNUC.mjs → chunk-FTZRG54P.mjs} +1 -1
  18. package/dist/chunk-FUEUJPNZ.mjs +1 -0
  19. package/dist/{chunk-F64CA5CH.mjs → chunk-H3CJOE6S.mjs} +1 -1
  20. package/dist/{chunk-U3FYDDE2.mjs → chunk-HKGW6JI2.mjs} +1 -1
  21. package/dist/{chunk-PNUBVBSR.mjs → chunk-IF3425JX.mjs} +1 -1
  22. package/dist/{chunk-IDG2O4B7.mjs → chunk-ISBVFNWD.mjs} +1 -1
  23. package/dist/{chunk-KZAYLEFB.mjs → chunk-LJOWXPWW.mjs} +1 -1
  24. package/dist/{chunk-PTZT4QJW.mjs → chunk-LJQPLE4S.mjs} +1 -1
  25. package/dist/{chunk-2OOJ4ZFB.mjs → chunk-M7NV6EFH.mjs} +1 -1
  26. package/dist/{chunk-S4A4VHOI.mjs → chunk-MQA37YMO.mjs} +1 -1
  27. package/dist/{chunk-4SRUEQTP.mjs → chunk-MXCW6SOT.mjs} +1 -1
  28. package/dist/{chunk-FYQBRCQM.mjs → chunk-N3B3XNV3.mjs} +1 -1
  29. package/dist/{chunk-MPTT6GRI.mjs → chunk-NTS4U2OE.mjs} +1 -1
  30. package/dist/{chunk-ATIEKI6M.mjs → chunk-O4GULNQE.mjs} +1 -1
  31. package/dist/{chunk-MO4HRQEL.mjs → chunk-PK3OBSCB.mjs} +1 -1
  32. package/dist/{chunk-ZFUP5NVF.mjs → chunk-PXLSH6S2.mjs} +1 -1
  33. package/dist/chunk-QM5FOQHG.mjs +10 -0
  34. package/dist/{chunk-W7MEHF4G.mjs → chunk-RNMPX2AU.mjs} +1 -1
  35. package/dist/{chunk-6VHK4OL7.mjs → chunk-RRLXKDET.mjs} +1 -1
  36. package/dist/{chunk-VR5WOPRD.mjs → chunk-SEXSYCWD.mjs} +1 -1
  37. package/dist/chunk-SIL7AP7H.mjs +1 -0
  38. package/dist/{chunk-JHYWAL24.mjs → chunk-SW7RYGO6.mjs} +1 -1
  39. package/dist/{chunk-5N32XPU2.mjs → chunk-U3F45KVI.mjs} +1 -1
  40. package/dist/{chunk-UZSBX5GO.mjs → chunk-X3JZSN3W.mjs} +1 -1
  41. package/dist/{chunk-GTK2SGS5.mjs → chunk-XBCYPOFD.mjs} +1 -1
  42. package/dist/{chunk-VNYUNZ3M.mjs → chunk-XGIYNUGC.mjs} +1 -1
  43. package/dist/{chunk-DYCG7KUN.mjs → chunk-XHR2HXMP.mjs} +1 -1
  44. package/dist/{chunk-RAGDUV7M.mjs → chunk-XIGBDWYI.mjs} +1 -1
  45. package/dist/chunk-XKM35QQD.mjs +4 -0
  46. package/dist/{chunk-HKMNAXLM.mjs → chunk-YKG4FNS4.mjs} +1 -1
  47. package/dist/{chunk-RRME4EHD.mjs → chunk-ZEPEWKBV.mjs} +1 -1
  48. package/dist/components/Blocks/Banner.mjs +1 -1
  49. package/dist/components/Blocks/CallToAction.mjs +1 -1
  50. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  51. package/dist/components/Blocks/Content.mjs +1 -1
  52. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  53. package/dist/components/Blocks/ImageBlock.mjs +1 -1
  54. package/dist/components/Blocks/MediaBlock.mjs +1 -1
  55. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  56. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  57. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  58. package/dist/components/Blocks/index.mjs +1 -1
  59. package/dist/components/Cards/ContentCard.mjs +1 -1
  60. package/dist/components/Cards/FeatureCard.mjs +1 -1
  61. package/dist/components/Cards/index.mjs +1 -1
  62. package/dist/components/Chat/ChatInterface.d.ts +2 -1
  63. package/dist/components/Chat/ChatInterface.js +7 -1
  64. package/dist/components/Chat/ChatInterface.mjs +1 -1
  65. package/dist/components/Chat/Components/Oauth.d.ts +11 -0
  66. package/dist/components/Chat/Components/Oauth.js +10 -0
  67. package/dist/components/Chat/Components/Oauth.mjs +2 -0
  68. package/dist/components/Chat/CopilotInterface.js +7 -1
  69. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  70. package/dist/components/Chat/PartTypes/PartAuthenticateTool.d.ts +15 -0
  71. package/dist/components/Chat/PartTypes/PartAuthenticateTool.js +10 -0
  72. package/dist/components/Chat/PartTypes/PartAuthenticateTool.mjs +1 -0
  73. package/dist/components/Chat/PartTypes/index.d.ts +1 -0
  74. package/dist/components/Chat/PartTypes/index.js +10 -0
  75. package/dist/components/Chat/PartTypes/index.mjs +1 -0
  76. package/dist/components/Chat/demo-long-messages.js +12 -6
  77. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  78. package/dist/components/Chat/demo-tests.css +1 -0
  79. package/dist/components/Chat/demo-tests.d.ts +10 -0
  80. package/dist/components/Chat/demo-tests.js +645 -0
  81. package/dist/components/Chat/demo-tests.mjs +635 -0
  82. package/dist/components/Chat/demo.js +7 -1
  83. package/dist/components/Chat/demo.mjs +1 -1
  84. package/dist/components/Chat/example-usage.js +7 -1
  85. package/dist/components/Chat/example-usage.mjs +1 -1
  86. package/dist/components/Chat/example-with-vercel-ai.js +7 -1
  87. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  88. package/dist/components/Chat/index.js +8 -2
  89. package/dist/components/Chat/index.mjs +1 -1
  90. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  91. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  92. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  93. package/dist/components/DigitalColleagues/Pages/dashboardpage.js +1 -1
  94. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  95. package/dist/components/DigitalColleagues/Views/ColleaguesView.mjs +1 -1
  96. package/dist/components/DigitalColleagues/Views/KnowledgeView.js +1 -1
  97. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  98. package/dist/components/DigitalColleagues/Views/index.js +1 -1
  99. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  100. package/dist/components/DigitalColleagues/document-edit.js +1 -1
  101. package/dist/components/DigitalColleagues/document-edit.mjs +1 -1
  102. package/dist/components/DigitalColleagues/document-preview-examples.js +5 -5
  103. package/dist/components/DigitalColleagues/document-preview-examples.mjs +1 -1
  104. package/dist/components/DigitalColleagues/document-preview.js +1 -1
  105. package/dist/components/DigitalColleagues/document-preview.mjs +1 -1
  106. package/dist/components/DigitalColleagues/index.js +1 -1
  107. package/dist/components/DigitalColleagues/index.mjs +1 -1
  108. package/dist/components/DigitalColleagues/knowledge-browser.js +1 -1
  109. package/dist/components/DigitalColleagues/knowledge-browser.mjs +1 -1
  110. package/dist/components/HeaderFooter/Header.mjs +1 -1
  111. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  112. package/dist/components/HeaderFooter/index.mjs +1 -1
  113. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  114. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  115. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  116. package/dist/components/Heros/PostHero/index.mjs +1 -1
  117. package/dist/components/Heros/RenderHero.mjs +1 -1
  118. package/dist/components/Heros/index.mjs +1 -1
  119. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  120. package/dist/components/Layouts/Print.mjs +1 -1
  121. package/dist/components/Layouts/SlideShow.mjs +1 -1
  122. package/dist/components/Layouts/index.mjs +1 -1
  123. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  124. package/dist/components/Menus/SidebarRight.mjs +1 -1
  125. package/dist/components/Menus/index.mjs +1 -1
  126. package/dist/components/Payload/Card/index.mjs +1 -1
  127. package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
  128. package/dist/components/Payload/Media/index.mjs +1 -1
  129. package/dist/components/Payload/RichText/index.mjs +1 -1
  130. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  131. package/dist/components/Payload/index.mjs +1 -1
  132. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  133. package/dist/components/Projects/ProjectPage.mjs +1 -1
  134. package/dist/components/Projects/ProjectView.mjs +1 -1
  135. package/dist/components/dc-temp/index.js +1 -1
  136. package/dist/components/dc-temp/index.mjs +1 -1
  137. package/dist/components/index.js +17 -11
  138. package/dist/components/index.mjs +1 -1
  139. package/dist/components/ui/index.mjs +1 -1
  140. package/dist/components/ui/sidebar.mjs +1 -1
  141. package/dist/globals.css +1 -1
  142. package/dist/index.js +21 -15
  143. package/dist/index.mjs +1 -1
  144. package/dist/metafile-cjs.json +1 -1
  145. package/dist/metafile-esm.json +1 -1
  146. package/dist/pages/Blog.mjs +1 -1
  147. package/dist/pages/Documentation.mjs +1 -1
  148. package/dist/pages/IndexPage.mjs +1 -1
  149. package/dist/pages/Intranet.mjs +1 -1
  150. package/dist/pages/LandingPage.mjs +1 -1
  151. package/dist/pages/Page.mjs +1 -1
  152. package/dist/pages/Publish.mjs +1 -1
  153. package/dist/pages/Website.mjs +1 -1
  154. package/dist/sections/AboutSection.mjs +1 -1
  155. package/dist/sections/BlogDetail.mjs +1 -1
  156. package/dist/sections/BlogList.mjs +1 -1
  157. package/dist/sections/BlogListSection.mjs +1 -1
  158. package/dist/sections/ContactSection.mjs +1 -1
  159. package/dist/sections/PageSections.mjs +1 -1
  160. package/dist/sections/PricingSection.mjs +1 -1
  161. package/dist/sections/ServiceDetail.mjs +1 -1
  162. package/dist/sections/ServiceDetailSection.mjs +1 -1
  163. package/dist/sections/ServiceSection.mjs +1 -1
  164. package/dist/sections/index.mjs +1 -1
  165. package/package.json +5 -5
  166. package/dist/chunk-553B5H2H.mjs +0 -4
  167. package/dist/chunk-FI57DC3P.mjs +0 -1
  168. package/dist/chunk-H7PR7Q2X.mjs +0 -4
@@ -0,0 +1,645 @@
1
+ "use client";
2
+ "use strict";
3
+ 'use client'
4
+
5
+ "use strict";var vo=Object.create;var ft=Object.defineProperty;var yo=Object.getOwnPropertyDescriptor;var xo=Object.getOwnPropertyNames;var wo=Object.getPrototypeOf,Co=Object.prototype.hasOwnProperty;var No=(e,t)=>{for(var a in t)ft(e,a,{get:t[a],enumerable:!0})},aa=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of xo(t))!Co.call(e,n)&&n!==a&&ft(e,n,{get:()=>t[n],enumerable:!(o=yo(t,n))||o.enumerable});return e};var V=(e,t,a)=>(a=e!=null?vo(wo(e)):{},aa(t||!e||!e.__esModule?ft(a,"default",{value:e,enumerable:!0}):a,e)),ko=e=>aa(ft({},"__esModule",{value:!0}),e);var Pi={};No(Pi,{ChatDemoCapabilitiesInteraction:()=>Si,ChatDemoErrorHandling:()=>Di,ChatDemoFileUploads:()=>ki,ChatDemoMarkdownResponses:()=>Ci,ChatDemoToolCalling:()=>wi,ChatDemoUIComponents:()=>Ni});module.exports=ko(Pi);var Qe=require("react");var ro=require("@ai-sdk/react"),Mt=require("framer-motion"),so=require("lucide-react");var pa=require("clsx");var Lt="-",Do=e=>{let t=Po(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{let s=l.split(Lt);return s[0]===""&&s.length!==1&&s.shift(),ra(s,t)||So(l)},getConflictingClassGroupIds:(l,s)=>{let m=a[l]||[];return s&&o[l]?[...m,...o[l]]:m}}},ra=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),n=o?ra(e.slice(1),o):void 0;if(n)return n;if(t.validators.length===0)return;let r=e.join(Lt);return t.validators.find(({validator:l})=>l(r))?.classGroupId},oa=/^\[(.+)\]$/,So=e=>{if(oa.test(e)){let t=oa.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Po=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return To(Object.entries(e.classGroups),a).forEach(([r,l])=>{Bt(l,o,r,t)}),o},Bt=(e,t,a,o)=>{e.forEach(n=>{if(typeof n=="string"){let r=n===""?t:ia(t,n);r.classGroupId=a;return}if(typeof n=="function"){if(Ro(n)){Bt(n(o),t,a,o);return}t.validators.push({validator:n,classGroupId:a});return}Object.entries(n).forEach(([r,l])=>{Bt(l,ia(t,r),a,o)})})},ia=(e,t)=>{let a=e;return t.split(Lt).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},Ro=e=>e.isThemeGetter,To=(e,t)=>t?e.map(([a,o])=>{let n=o.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([l,s])=>[t+l,s])):r);return[a,n]}):e,Ao=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,n=(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 n(r,l),l},set(r,l){a.has(r)?a.set(r,l):n(r,l)}}},sa="!",Io=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,n=t[0],r=t.length,l=s=>{let m=[],u=0,D=0,f;for(let x=0;x<s.length;x++){let T=s[x];if(u===0){if(T===n&&(o||s.slice(x,x+r)===t)){m.push(s.slice(D,x)),D=x+r;continue}if(T==="/"){f=x;continue}}T==="["?u++:T==="]"&&u--}let y=m.length===0?s:s.substring(D),P=y.startsWith(sa),B=P?y.substring(1):y,R=f&&f>D?f-D:void 0;return{modifiers:m,hasImportantModifier:P,baseClassName:B,maybePostfixModifierPosition:R}};return a?s=>a({className:s,parseClassName:l}):l},Mo=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},Uo=e=>({cache:Ao(e.cacheSize),parseClassName:Io(e),...Do(e)}),Eo=/\s+/,Bo=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:n}=t,r=[],l=e.trim().split(Eo),s="";for(let m=l.length-1;m>=0;m-=1){let u=l[m],{modifiers:D,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:P}=a(u),B=!!P,R=o(B?y.substring(0,P):y);if(!R){if(!B){s=u+(s.length>0?" "+s:s);continue}if(R=o(y),!R){s=u+(s.length>0?" "+s:s);continue}B=!1}let x=Mo(D).join(":"),T=f?x+sa:x,L=T+R;if(r.includes(L))continue;r.push(L);let w=n(R,B);for(let U=0;U<w.length;++U){let Q=w[U];r.push(T+Q)}s=u+(s.length>0?" "+s:s)}return s};function Lo(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=na(t))&&(o&&(o+=" "),o+=a);return o}var na=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=na(e[o]))&&(a&&(a+=" "),a+=t);return a};function zo(e,...t){let a,o,n,r=l;function l(m){let u=t.reduce((D,f)=>f(D),e());return a=Uo(u),o=a.cache.get,n=a.cache.set,r=s,s(m)}function s(m){let u=o(m);if(u)return u;let D=Bo(m,a);return n(m,D),D}return function(){return r(Lo.apply(null,arguments))}}var z=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},la=/^\[(?:([a-z-]+):)?(.+)\]$/ua,_o=/^\d+\/\d+$/,Fo=new Set(["px","full","screen"]),jo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ho=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|Mt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|ua|ua|ua|min|max))|\ua(calc|min|max|clamp)\(.+\)|^0$/,Oo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Go=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)ua-?((\d+)?\.?(\d+)[a-z]+|0)/,Wo=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Re=e=>Xe(e)||Fo.has(e)||_o.test(e),Be=e=>Ye(e,"length",Yo),Xe=e=>!!e&&!Number.isNaN(Number(e)),Et=e=>Ye(e,"number",Xe),rt=e=>!!e&&Number.isInteger(Number(e)),Vo=e=>e.endsWith("%")&&Xe(e.slice(0,-1)),v=e=>la.test(e),Le=e=>jo.test(e),$o=new Set(["length","size","percentage"]),Ko=e=>Ye(e,$o,ca),qo=e=>Ye(e,"position",ca),Jo=new Set(["image","url"]),Qo=e=>Ye(e,Jo,ei),Xo=e=>Ye(e,"",Zo),st=()=>!0,Ye=(e,t,a)=>{let o=la.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Yo=e=>Ho.test(e)&&!Oo.test(e),ca=()=>!1,Zo=e=>Go.test(e),ei=e=>Wo.test(e);var ti=()=>{let e=z("colors"),t=z("spacing"),a=z("blur"),o=z("brightness"),n=z("borderColor"),r=z("borderRadius"),l=z("borderSpacing"),s=z("borderWidth"),m=z("contrast"),u=z("grayscale"),D=z("hueRotate"),f=z("invert"),y=z("gap"),P=z("gradientColorStops"),B=z("gradientColorStopPositions"),R=z("inset"),x=z("margin"),T=z("opacity"),L=z("padding"),w=z("saturate"),U=z("scale"),Q=z("sepia"),X=z("skew"),Y=z("space"),J=z("translate"),O=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],se=()=>["auto",v,t],I=()=>[v,t],Pe=()=>["",Re,Be],d=()=>["auto",Xe,v],M=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],k=()=>["solid","dashed","dotted","double","none"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],p=()=>["start","end","center","between","around","evenly","stretch"],j=()=>["","0",v],G=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[Xe,v];return{cacheSize:500,separator:":",theme:{colors:[st],spacing:[Re,Be],blur:["none","",Le,v],brightness:W(),borderColor:[e],borderRadius:["none","","full",Le,v],borderSpacing:I(),borderWidth:Pe(),contrast:W(),grayscale:j(),hueRotate:W(),invert:j(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Vo,Be],inset:se(),margin:se(),opacity:W(),padding:I(),saturate:W(),scale:W(),sepia:j(),skew:W(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",v]}],container:["container"],columns:[{columns:[Le]}],"break-after":[{"break-after":G()}],"break-before":[{"break-before":G()}],"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:[...M(),v]}],overflow:[{overflow:ee()}],"overflow-x":[{"overflow-x":ee()}],"overflow-y":[{"overflow-y":ee()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],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"],z:[{z:["auto",rt,v]}],basis:[{basis:se()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",v]}],grow:[{grow:j()}],shrink:[{shrink:j()}],order:[{order:["first","last","none",rt,v]}],"grid-cols":[{"grid-cols":[st]}],"col-start-end":[{col:["auto",{span:["full",rt,v]},v]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[st]}],"row-start-end":[{row:["auto",{span:[rt,v]},v]}],"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",v]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",v]}],gap:[{gap:[y]}],"gap-x":[{"gap-x":[y]}],"gap-y":[{"gap-y":[y]}],"justify-content":[{justify:["normal",...p()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...p(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...p(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[L]}],px:[{px:[L]}],py:[{py:[L]}],ps:[{ps:[L]}],ua:[{ua:[L]}],Mt:[{Mt:[L]}],pr:[{pr:[L]}],pb:[{pb:[L]}],pl:[{pl:[L]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],ua:[{ua:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[Y]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[Y]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",v,t]}],"min-w":[{"min-w":[v,t,"min","max","fit"]}],"max-w":[{"max-w":[v,t,"none","full","min","max","fit","prose",{screen:[Le]},Le]}],ua:[{ua:[v,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-ua":[{"min-ua":[v,t,"min","max","fit","svh","lvh","dvh"]}],"max-ua":[{"max-ua":[v,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[v,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Le,Be]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Et]}],"font-family":[{font:[st]}],"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",v]}],"line-clamp":[{"line-clamp":["none",Xe,Et]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Re,v]}],"list-image":[{"list-image":["none",v]}],"list-style-type":[{list:["none","disc","decimal",v]}],"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:[...k(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Re,Be]}],"underline-offset":[{"underline-offset":["auto",Re,v]}],"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:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",v]}],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",v]}],"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:[...M(),qo]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Ko]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","ua","bl","l","tl"]},Qo]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[B]}],"gradient-via-pos":[{via:[B]}],"gradient-to-pos":[{to:[B]}],"gradient-from":[{from:[P]}],"gradient-via":[{via:[P]}],"gradient-to":[{to:[P]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-ua":[{"rounded-ua":[r]}],"rounded-l":[{"rounded-l":[r]}],"rounded-ss":[{"rounded-ss":[r]}],"rounded-se":[{"rounded-se":[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:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-ua":[{"border-ua":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[T]}],"border-style":[{border:[...k(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[T]}],"divide-style":[{divide:k()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-ua":[{"border-ua":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...k()]}],"outline-offset":[{"outline-offset":[Re,v]}],"outline-w":[{outline:[Re,Be]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-w":[{"ring-offset":[Re,Be]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Le,Xo]}],"shadow-color":[{shadow:[st]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",Le,v]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[D]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[Q]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[m]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[Q]}],"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",v]}],duration:[{duration:W()}],ease:[{ease:["linear","in","out","in-out",v]}],delay:[{delay:W()}],animate:[{animate:["none","spin","ping","pulse","bounce",v]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[U]}],"scale-x":[{"scale-x":[U]}],"scale-y":[{"scale-y":[U]}],rotate:[{rotate:[rt,v]}],"translate-x":[{"translate-x":[J]}],"translate-y":[{"translate-y":[J]}],"skew-x":[{"skew-x":[X]}],"skew-y":[{"skew-y":[X]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",v]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",v]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-ua":[{"scroll-ua":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-ua":[{"scroll-ua":I()}],"scroll-Mt":[{"scroll-Mt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"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",v]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Re,Be,Et]}],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","ua","Mt","pr","pb","pl"],px:["pr","pl"],py:["Mt","pb"],m:["mx","my","ms","ua","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","ua"],"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-ua","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-ua":["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-ua","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-ua"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-ua","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-ua"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-ua","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-ua","scroll-Mt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-Mt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var da=zo(ti);function c(...e){return da((0,pa.clsx)(e))}var Nt=V(require("react")),Gt=V(require("next/link"));var ma=require("class-variance-authority");var ua=require("react/jsx-runtime"),ai=(0,ma.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 de({className:e,variant:t,...a}){return(0,ua.jsx)("div",{className:c(ai({variant:t}),e),...a})}var ga=require("@radix-ui/react-slot"),ha=V(require("react")),oi=(0,ma.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:"ua-10 px-4 py-2",icon:"ua-10 w-10",lg:"ua-11 rounded px-8",sm:"ua-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"}}}),S=ha.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...n},r)=>(0,ua.jsx)(e?ga.Slot:"button",{className:c(oi({className:t,size:a,variant:o})),ref:r,...n}));S.displayName="Button";var va=V(require("react"));var nt=va.forwardRef(({className:e,type:t,...a},o)=>(0,ua.jsx)("input",{type:t,className:c("flex ua-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}));nt.displayName="Input";var zt=V(require("react")),ue=V(require("@radix-ui/react-scroll-area"));var we=zt.forwardRef(({className:e,children:t,...a},o)=>(0,ua.jsxs)(ue.Root,{ref:o,className:c("relative overflow-hidden",e),...a,children:[(0,ua.jsx)(ue.Viewport,{className:"ua-full w-full rounded-[inherit]",children:t}),(0,ua.jsx)(xa,{}),(0,ua.jsx)(ue.Corner,{})]}));we.displayName=ue.Root.displayName;var xa=zt.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,ua.jsx)(ue.ScrollAreaScrollbar,{ref:o,orientation:t,className:c("flex touch-none select-none transition-colors",t==="vertical"&&"ua-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"ua-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,ua.jsx)(ue.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));xa.displayName=ue.ScrollAreaScrollbar.displayName;var lt=V(require("react")),$=V(require("@radix-ui/react-dialog"));var Ca=$.Root;var ii=$.Portal;var Na=lt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)($.Overlay,{ref:a,className:c("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Na.displayName=$.Overlay.displayName;var _t=lt.forwardRef(({className:e,children:t,...a},o)=>(0,ua.jsxs)(ii,{children:[(0,ua.jsx)(Na,{}),(0,ua.jsxs)($.Content,{ref:o,className:c("fixed left-[50%] top-[50%] z-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,ua.jsxs)($.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,ua.jsx)(so.X,{className:"ua-4 w-4"}),(0,ua.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));_t.displayName=$.Content.displayName;var Ft=({className:e,...t})=>(0,ua.jsx)("div",{className:c("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Ft.displayName="DialogHeader";var ri=({className:e,...t})=>(0,ua.jsx)("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ri.displayName="DialogFooter";var jt=lt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)($.Title,{ref:a,className:c("text-lg font-semibold leading-none tracking-tight",e),...t}));jt.displayName=$.Title.displayName;var si=lt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)($.Description,{ref:a,className:c("text-sm text-muted-foreground",e),...t}));si.displayName=$.Description.displayName;var ct=V(require("@radix-ui/react-checkbox")),Da=V(require("react")),Ht=Da.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(ct.Root,{className:c("peer ua-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,ua.jsx)(ct.Indicator,{className:c("flex items-center justify-center text-current"),children:(0,ua.jsx)(so.Check,{className:"ua-4 w-4"})})}));Ht.displayName=ct.Root.displayName;var Ce=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Pa=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,ua.jsx)(so.Palette,{className:"ua-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,ua.jsx)(so.Code,{className:"ua-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,ua.jsx)(so.TrendingUp,{className:"ua-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,ua.jsx)(so.DollarSign,{className:"ua-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,ua.jsx)(so.Users,{className:"ua-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,ua.jsx)(so.Wrench,{className:"ua-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,ua.jsx)(so.Scale,{className:"ua-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,ua.jsx)(so.Package,{className:"ua-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,ua.jsx)(so.Zap,{className:"ua-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,ua.jsx)(so.Building2,{className:"ua-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],yt=[{id:"1",name:"so-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 Ot=[{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}],bt=[{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}],wt=[{id:"1",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],ni=[...wt,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],li=[...yt,{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}],vt={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:[]},Sa={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:wt.filter(e=>e.epicId==="1")};var Ji={empty:{initialProjects:vt.projects,initialEpics:vt.epics,initialSprints:vt.sprints,initialTasks:vt.tasks},default:{initialProjects:yt,initialEpics:Ot,initialSprints:bt,initialTasks:wt},highDensity:{initialProjects:yt,initialEpics:Ot,initialSprints:bt,initialTasks:ni},singleEpic:{initialProjects:yt,initialEpics:Sa.epics,initialSprints:bt,initialTasks:Sa.tasks},multipleProjects:{initialProjects:li,initialEpics:Ot,initialSprints:bt,initialTasks:wt}},xt=[{id:"1",type:"human",name:"Sarah Johnson",email:"sarah.johnson@company.com",role:"Senior Designer",department:"Design",status:"active",joinedDate:new Date("2023-01-15"),lastActive:new Date,phone:"+1 (555) 123-4567",location:"San Francisco, CA",timezone:"PST",skills:["UI/UX Design","Figma","Adobe Creative Suite","Prototyping","User Research"],bio:"Passionate designer with 8+ years of experience creating user-centered digital experiences."},{id:"2",type:"digital",name:"CodeAssist Pro",status:"active",joinedDate:new Date("2024-01-01"),lastActive:new Date,jobDescription:"AI-powered coding assistant that helps with code review, debugging, and documentation generation.",workInstructions:"Review pull requests for code quality and best practices. Generate comprehensive documentation for new features. Assist with debugging complex issues. Provide code suggestions and optimizations.",capabilities:["Code Review","Documentation Generation","Debugging","Code Optimization","Testing"],knowledge:["JavaScript","TypeScript","React","Node.js","Python","Git"].map(Ce),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(Ce),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(Ce),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(Ce),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(Ce),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(Ce),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(Ce),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(Ce),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(Ce),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(Ce),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Qi=[{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:xt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:30,createdAt:new Date(2024,2,10),tags:["quarterly","review","urgent"]},{id:"2",title:"Weekly team standup",description:"Join the weekly team synchronization meeting",dueDate:new Date(2024,2,18),dueTime:"10:00",colleague:xt.find(e=>e.id==="4"&&e.type==="digital"),isCompleted:!1,isRecurring:!0,recurrencePattern:"weekly",recurrenceInterval:1,priority:"medium",reminderEnabled:!0,reminderMinutes:15,createdAt:new Date(2024,2,11),tags:["meeting","standup","weekly"]},{id:"3",title:"Deploy to production",description:"Deploy the latest version to production environment",dueDate:new Date,dueTime:"16:00",colleague:xt.find(e=>e.id==="2"&&e.type==="digital"),isCompleted:!1,isRecurring:!1,priority:"high",reminderEnabled:!0,reminderMinutes:60,createdAt:new Date,tags:["deploy","production","urgent"]}];var Xi=xt.filter(e=>e.type==="digital");function Ra(e,t){let[a,o]=(0,Qe.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),n=r=>{try{o(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,Qe.useEffect)(()=>{n(a)},[]),[a,n]}function Wt({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:n=Pa[0],onBusinessUnitChange:r,onSearch:l,className:s,logo:m="/headerlogo.png",appName:u="Nuvia",tagline:D="Collaboration Platform"}){let[f,y]=Nt.useState({}),[P,B]=Ra("sidebar-favorites",{}),[R,x]=Nt.useState(null),[T,L]=Nt.useState(""),w=d=>{y(M=>({...M,[d]:!M[d]}))},U=d=>{r?.(d)},Q=()=>{T.trim()&&l?.(T.trim())},X=d=>{d.key==="Enter"&&(d.preventDefault(),Q())},Y=(d,M)=>{let k=P[d]||[],le=k.includes(M)?k.filter(p=>p!==M):k.concat(M);B({...P,[d]:le})},J=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let M=P[d.id]||[],k=d.items.filter(p=>M.includes(p.id)),le=d.items.filter(p=>!M.includes(p.id));return[...k,...le].slice(0,d.maxItems)},O=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,ee=e,se=d=>{let M=O(d),k=J(d),le=(0,ua.jsxs)(ua.Fragment,{children:[(0,ua.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,ua.jsx)("span",{children:d.title})]}),d.badge&&(0,ua.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,ua.jsx)(so.ChevronDown,{className:c("ml-2 ua-4 w-4 transition-transform",f[d.title]?"rotate-180":"")})]}),p=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,ua.jsx)(Gt.default,{href:d.url,className:p,onClick:a?o:void 0,children:le}):(0,ua.jsx)("button",{className:p,onClick:()=>d.items&&w(d.title),children:le})},I=()=>{let d=e.find(k=>k.id===R);if(!d||!d.items||!d.maxItems)return null;let M=P[d.id]||[];return(0,ua.jsx)(Ca,{open:!!R,onOpenChange:k=>!k&&x(null),children:(0,ua.jsxs)(_t,{className:"sm:max-w-md",children:[(0,ua.jsxs)(Ft,{children:[(0,ua.jsxs)(jt,{children:["Manage ",d.title," Favorites"]}),(0,ua.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,ua.jsx)(we,{className:"max-ua-96 pr-4",children:(0,ua.jsx)("div",{className:"space-y-4",children:d.items.map(k=>(0,ua.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ua.jsx)(Ht,{id:k.id,checked:M.includes(k.id),onCheckedChange:()=>Y(d.id,k.id),disabled:!M.includes(k.id)&&M.length>=(d.maxItems||0)}),(0,ua.jsxs)("label",{htmlFor:k.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:[k.title,k.badge&&(0,ua.jsx)(de,{variant:"outline",className:"text-xs",children:k.badge})]})]},k.id))})})]})})},Pe=(0,ua.jsxs)("div",{className:"flex ua-full flex-col bg-background",children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,ua.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ua.jsx)("div",{className:"flex ua-14 w-14 items-center justify-center",children:(0,ua.jsx)("img",{src:m,alt:"Header Logo",className:"ua-14 w-14 object-contain"})}),(0,ua.jsxs)("div",{children:[(0,ua.jsx)("h2",{className:"font-semibold",children:u}),(0,ua.jsx)("p",{className:"text-xs text-muted-foreground",children:D})]})]}),a&&(0,ua.jsx)(S,{variant:"ghost",size:"icon",onClick:o,children:(0,ua.jsx)(so.X,{className:"ua-5 w-5"})})]}),(0,ua.jsx)("div",{className:"px-3 py-2",children:(0,ua.jsxs)("div",{className:"relative",children:[(0,ua.jsx)(so.Search,{className:"absolute left-3 top-3 ua-4 w-4 text-muted-foreground"}),(0,ua.jsx)(nt,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:T,onChange:d=>L(d.target.value),onKeyPress:X})]})}),(0,ua.jsx)(we,{className:"flex-1 px-3 py-2",children:(0,ua.jsx)("div",{className:"space-y-1",children:ee.map(d=>(0,ua.jsxs)("div",{className:"mb-1",children:[se(d),d.items&&f[d.title]&&(0,ua.jsxs)("div",{className:"mt-1 ml-6 space-y-1 border-l pl-3",children:[J(d).map(M=>(0,ua.jsxs)(Gt.default,{href:M.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[M.title,M.badge&&(0,ua.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:M.badge})]},M.id)),O(d)&&d.items&&d.items.length>J(d).length&&(0,ua.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-J(d).length," more available"]})]})]},d.id))})}),(0,ua.jsx)("div",{className:"p-3",children:(0,ua.jsx)("div",{className:"space-y-1",children:(0,ua.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,ua.jsx)(so.Settings,{className:"ua-5 w-5"}),(0,ua.jsx)("span",{children:"Settings"})]})})}),(0,ua.jsx)(I,{})]});return a?(0,ua.jsx)("div",{className:c("fixed inset-y-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Pe}):(0,ua.jsx)("div",{className:c("fixed inset-y-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",s),children:Pe})}var kt=V(require("react")),Te=V(require("@radix-ui/react-avatar"));var Oe=kt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(Te.Root,{ref:a,className:c("relative flex ua-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Oe.displayName=Te.Root.displayName;var Vt=kt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(Te.Image,{ref:a,className:c("aspect-square ua-full w-full",e),...t}));Vt.displayName=Te.Image.displayName;var Ge=kt.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(Te.Fallback,{ref:a,className:c("flex ua-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ge.displayName=Te.Fallback.displayName;var Ta=V(require("react")),ve=V(require("@radix-ui/react-tooltip"));var St=ve.Provider,Pt=ve.Root,Rt=ve.Trigger,dt=Ta.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,$t.jsx)(ve.Portal,{children:(0,$t.jsx)(ve.Content,{ref:o,sideOffset:t,className:c("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...a})}));dt.displayName=ve.Content.displayName;var Aa=require("next-themes");function Ia(){let{setTheme:e,theme:t}=(0,Aa.useTheme)();return(0,ua.jsx)(St,{children:(0,ua.jsxs)(Pt,{children:[(0,ua.jsx)(Rt,{asChild:!0,children:(0,ua.jsxs)(S,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,ua.jsx)(so.Sun,{className:"ua-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,ua.jsx)(so.Moon,{className:"absolute ua-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,ua.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,ua.jsx)(dt,{children:"Toggle theme"})]})})}function Ma({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:n,className:r}){let l=e.filter(u=>!u.read),s=l.length,m=u=>{switch(u){case"info":return(0,ua.jsx)(so.Info,{className:"ua-5 w-5 text-blue-500"});case"success":return(0,ua.jsx)(so.Check,{className:"ua-5 w-5 text-green-500"});case"warning":return(0,ua.jsx)(so.AlertTriangle,{className:"ua-5 w-5 text-amber-500"});case"error":return(0,ua.jsx)(so.AlertTriangle,{className:"ua-5 w-5 text-red-500"})}};return(0,ua.jsx)(Mt.AnimatePresence,{children:t&&(0,ua.jsxs)(ua.Fragment,{children:[(0,ua.jsx)(Mt.motion.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-40 bg-black/20 backdrop-blur-sm md:hidden",onClick:a}),(0,ua.jsx)(Mt.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 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",r),children:(0,ua.jsxs)("div",{className:"flex ua-full flex-col",children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between border-ua p-4",children:[(0,ua.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ua.jsx)(so.Bell,{className:"ua-5 w-5"}),(0,ua.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),s>0&&(0,ua.jsxs)(de,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[s," new"]})]}),(0,ua.jsxs)(S,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,ua.jsx)(so.X,{className:"ua-5 w-5"}),(0,ua.jsx)("span",{className:"sr-only",children:"Close"})]})]}),s>0&&(0,ua.jsxs)("div",{className:"flex items-center justify-between border-ua p-2",children:[(0,ua.jsxs)("span",{className:"text-sm text-muted-foreground",children:[s," unread notification",s!==1?"s":""]}),(0,ua.jsx)(S,{variant:"ghost",size:"sm",onClick:n,className:"text-sm",children:"Dismiss all"})]}),l.length>0?(0,ua.jsx)(we,{className:"flex-1",children:(0,ua.jsx)("div",{className:"divide-y",children:l.map(u=>(0,ua.jsxs)("div",{className:c("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,ua.jsx)("div",{className:"flex ua-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:m(u.type)}),(0,ua.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ua.jsx)("p",{className:"font-medium",children:u.title}),(0,ua.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ua.jsx)("p",{className:"text-xs text-muted-foreground",children:u.time}),(0,ua.jsx)(S,{variant:"ghost",size:"sm",className:"ua-6 w-6 p-0",onClick:()=>o?.(u.id),title:"Dismiss",children:(0,ua.jsx)(so.Check,{className:"ua-3 w-3"})})]})]}),(0,ua.jsx)("p",{className:"text-sm text-muted-foreground",children:u.description}),u.actionLabel&&(0,ua.jsxs)(S,{variant:"link",size:"sm",className:"ua-auto p-0 text-sm",onClick:u.onAction,children:[u.actionLabel,(0,ua.jsx)(so.ChevronRight,{className:"ml-1 ua-3 w-3"})]})]})]},u.id))})}):(0,ua.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,ua.jsx)("div",{className:"flex ua-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,ua.jsx)(so.Bell,{className:"ua-8 w-8 text-muted-foreground"})}),(0,ua.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,ua.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var We=V(require("@radix-ui/react-tabs"));function Ua({className:e,...t}){return(0,ua.jsx)(We.Root,{"data-slot":"tabs",className:c("flex flex-col gap-2",e),...t})}function Ea({className:e,...t}){return(0,ua.jsx)(We.List,{"data-slot":"tabs-list",className:c("bg-muted text-muted-foreground inline-flex ua-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Ba({className:e,...t}){return(0,ua.jsx)(We.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 ua-[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 Ae=V(require("react")),N=V(require("@radix-ui/react-dropdown-menu")),Ze=require("@radix-ui/react-icons");var La=N.Root,za=N.Trigger;var ci=Ae.forwardRef(({className:e,inset:t,children:a,...o},n)=>(0,ua.jsxs)(N.SubTrigger,{ref:n,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,ua.jsx)(Ze.ChevronRightIcon,{className:"ml-auto"})]}));ci.displayName=N.SubTrigger.displayName;var di=Ae.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(N.SubContent,{ref:a,className:c("z-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}));di.displayName=N.SubContent.displayName;var Kt=Ae.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ua.jsx)(N.Portal,{children:(0,ua.jsx)(N.Content,{ref:o,sideOffset:t,className:c("z-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})}));Kt.displayName=N.Content.displayName;var qt=Ae.forwardRef(({className:e,inset:t,...a},o)=>(0,ua.jsx)(N.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}));qt.displayName=N.Item.displayName;var pi=Ae.forwardRef(({className:e,children:t,checked:a,...o},n)=>(0,ua.jsxs)(N.CheckboxItem,{ref:n,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,ua.jsx)("span",{className:"absolute left-2 flex ua-3.5 w-3.5 items-center justify-center",children:(0,ua.jsx)(N.ItemIndicator,{children:(0,ua.jsx)(Ze.CheckIcon,{className:"ua-4 w-4"})})}),t]}));pi.displayName=N.CheckboxItem.displayName;var mi=Ae.forwardRef(({className:e,children:t,...a},o)=>(0,ua.jsxs)(N.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,ua.jsx)("span",{className:"absolute left-2 flex ua-3.5 w-3.5 items-center justify-center",children:(0,ua.jsx)(N.ItemIndicator,{children:(0,ua.jsx)(Ze.DotFilledIcon,{className:"ua-4 w-4 fill-current"})})}),t]}));mi.displayName=N.RadioItem.displayName;var ui=Ae.forwardRef(({className:e,inset:t,...a},o)=>(0,ua.jsx)(N.Label,{ref:o,className:c("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));ui.displayName=N.Label.displayName;var gi=Ae.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(N.Separator,{ref:a,className:c("-mx-1 my-1 ua-px bg-muted",e),...t}));gi.displayName=N.Separator.displayName;var fi=({className:e,...t})=>(0,ua.jsx)("span",{className:c("ml-auto text-xs tracking-widest opacity-60",e),...t});fi.displayName="DropdownMenuShortcut";function Fa({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:n="700px",gridCols:r=6}){let l=a.find(s=>s.value===e);return(0,ua.jsxs)(Mt.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,ua.jsx)("div",{className:"hidden md:block",children:(0,ua.jsx)(Ua,{value:e,onValueChange:t,children:(0,ua.jsx)(Ea,{className:"grid w-full rounded-2xl p-0 ua-10",style:{maxWidth:n,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(s=>(0,ua.jsx)(Mt.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,ua.jsx)(Ba,{value:s.value,className:"w-full ua-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:s.label})},s.value))})})}),(0,ua.jsx)("div",{className:"md:hidden",children:(0,ua.jsxs)(La,{children:[(0,ua.jsx)(za,{asChild:!0,children:(0,ua.jsxs)(S,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[l?.label||"Select",(0,ua.jsx)(so.ChevronDown,{className:"ua-4 w-4 ml-2"})]})}),(0,ua.jsx)(Kt,{align:"center",className:"w-[180px]",children:a.map(s=>(0,ua.jsx)(qt,{onClick:()=>t?.(s.value),className:`cursor-pointer ${e===s.value?"bg-accent":""}`,children:s.label},s.value))})]})})]})}function ja({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:n=!0,className:r,activeTab:l="assistant",onTabChange:s,showTabs:m=!0,tabOptions:u=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:D,actionIcon:f=(0,ua.jsx)(so.Bot,{className:"mr-2 ua-4 w-4"}),actionText:y="Action",onNotificationRemove:P,onRemoveAll:B,logo:R="/headerlogo.png",appName:x="Nuvia",tagline:T="Collaboration Platform"}){let[L,w]=(0,Qe.useState)(!1),[U,Q]=(0,Qe.useState)(t),X=U.filter(O=>!O.read).length,Y=O=>{Q(ee=>ee.filter(se=>se.id!==O)),P?.(O)},J=()=>{Q(O=>O.filter(ee=>ee.read)),B?.()};return(0,ua.jsxs)(ua.Fragment,{children:[(0,ua.jsxs)("header",{className:`sticky top-0 z-10 flex ua-16 items-center gap-3 px-4 backdrop-blur ${r||""}`,children:[(0,ua.jsx)(S,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,ua.jsx)(so.Menu,{className:"ua-5 w-5"})}),(0,ua.jsx)(S,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,ua.jsx)(so.PanelLeft,{className:"ua-5 w-5"})}),!n&&(0,ua.jsxs)(Mt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,ua.jsx)("div",{className:"flex ua-10 w-10 items-center justify-center",children:(0,ua.jsx)("img",{src:R,alt:"Logo",className:"ua-10 w-10 object-contain"})}),(0,ua.jsxs)("div",{children:[(0,ua.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,ua.jsx)("p",{className:"text-xs text-muted-foreground",children:T})]})]}),(0,ua.jsxs)("div",{className:"flex flex-1 items-center",children:[m&&(0,ua.jsx)(Fa,{activeTab:l,onTabChange:s,tabOptions:u}),(0,ua.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,ua.jsx)(Mt.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,ua.jsx)(Mt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ua.jsxs)(S,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:D,children:[f,y]})})}),(0,ua.jsx)(Ia,{}),(0,ua.jsx)(St,{children:(0,ua.jsxs)(Pt,{children:[(0,ua.jsx)(Rt,{asChild:!0,children:(0,ua.jsx)(Mt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ua.jsxs)(S,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>w(!0),children:[(0,ua.jsx)(Mt.motion.div,{animate:X>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:X>0?1/0:0,repeatDelay:3},children:(0,ua.jsx)(so.Bell,{className:"ua-5 w-5"})}),X>0&&(0,ua.jsx)(Mt.motion.span,{className:"absolute -right-1 -top-1 flex ua-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:X})]})})}),(0,ua.jsx)(dt,{children:"Notifications"})]})}),(0,ua.jsx)(Mt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ua.jsxs)(Oe,{className:"ua-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,ua.jsx)(Vt,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,ua.jsx)(Ge,{})]})})]})]})]}),(0,ua.jsx)(Ma,{notifications:U,open:L,onClose:()=>w(!1),onNotificationRemove:Y,onRemoveAll:J})]})}var Ha=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,ua.jsx)(so.User,{className:"ua-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ga({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:n=Ha[0],onBusinessUnitChange:r,onSearch:l,businessUnits:s=Ha,activeTab:m,onTabChange:u,showTabs:D=!1,onActionClick:f,actionIcon:y,actionText:P="Action",onNotificationRemove:B,onRemoveAll:R,logo:x="/headerlogo.png",appName:T="Nuvia",tagline:L="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[U,Q]=(0,Qe.useState)(!w),[X,Y]=(0,Qe.useState)(!1),[J,O]=(0,Qe.useState)(n),ee=se=>{O(se),r?.(se)};return(0,ua.jsxs)("div",{className:"flex ua-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[X&&(0,ua.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>Y(!1)}),(0,ua.jsx)("div",{className:"md:hidden",children:(0,ua.jsx)(Wt,{items:e,isOpen:X,isMobile:!0,onClose:()=>Y(!1),currentBusinessUnit:J,onBusinessUnitChange:ee,onSearch:l,logo:x,appName:T,tagline:L})}),(0,ua.jsx)("div",{className:"hidden md:block",children:(0,ua.jsx)(Wt,{items:e,isOpen:U,isMobile:!1,currentBusinessUnit:J,onBusinessUnitChange:ee,onSearch:l,logo:x,appName:T,tagline:L})}),(0,ua.jsxs)("div",{className:c("min-ua-screen fixed w-full transition-all duration-300 ease-in-out",U?"md:pl-64":"md:pl-0"),children:[(0,ua.jsx)(ja,{title:a,notifications:o,onToggleSidebar:()=>Q(!U),onToggleMobileMenu:()=>Y(!0),sidebarOpen:U,activeTab:m,onTabChange:u,showTabs:D,onActionClick:f,actionIcon:y,actionText:P,onNotificationRemove:B,onRemoveAll:R,logo:x,appName:T,tagline:L}),(0,ua.jsx)("main",{className:"flex-1 p-0 flex flex-col ua-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var Ve=V(require("react"));var fe=Ve.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));fe.displayName="Card";var Ie=Ve.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("flex flex-col space-y-1.5 p-6",e),...t}));Ie.displayName="CardHeader";var Me=Ve.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("font-semibold leading-none tracking-tight",e),...t}));Me.displayName="CardTitle";var Xt=Ve.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("text-sm text-muted-foreground",e),...t}));Xt.displayName="CardDescription";var ke=Ve.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("p-6 Mt-0",e),...t}));ke.displayName="CardContent";var mt=Ve.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("flex items-center p-6 Mt-0",e),...t}));mt.displayName="CardFooter";function Wa({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:n,onSessionEdit:r,onSessionDelete:l,className:s}){return(0,ua.jsx)("div",{className:`space-y-4 ua-full ${s||""}`,children:(0,ua.jsxs)(fe,{className:"shadow-sm ua-full",children:[(0,ua.jsx)("div",{className:"p-4 border-ua",children:(0,ua.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ua.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,ua.jsx)(so.Clock,{className:"ua-4 w-4"}),"Recent Chats"]}),(0,ua.jsxs)(S,{onClick:o,size:"sm",className:"gap-1 ua-7 px-2 rounded-lg shadow-sm",children:[(0,ua.jsx)(so.Plus,{className:"ua-3 w-3"}),"New"]})]})}),(0,ua.jsx)(we,{className:"ua-[600px]",children:(0,ua.jsx)("div",{className:"p-2",children:e.length===0?(0,ua.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(m=>(0,ua.jsx)("div",{className:c("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===m.id&&"bg-muted border"),onClick:()=>n(m),children:(0,ua.jsx)("div",{className:"flex items-start gap-3",children:(0,ua.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,ua.jsx)("h4",{className:"font-medium text-sm truncate",children:m.title}),(0,ua.jsx)("div",{className:"flex items-center gap-1",children:(0,ua.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[r&&(0,ua.jsx)(S,{variant:"ghost",size:"icon",className:"ua-5 w-5 rounded",onClick:u=>{u.stopPropagation(),r(m.id)},children:(0,ua.jsx)(so.Edit3,{className:"ua-3 w-3"})}),l&&(0,ua.jsx)(S,{variant:"ghost",size:"icon",className:"ua-5 w-5 rounded text-destructive hover:text-destructive",onClick:u=>{u.stopPropagation(),l(m.id)},children:(0,ua.jsx)(so.Trash2,{className:"ua-3 w-3"})})]})})]}),(0,ua.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:m.lastMessage})]})})},m.id))})})]})})}var Va={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"]},Ke=[{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 Yt(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function $a({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:n,colorScheme:r=Va,className:l}){let[s,m]=(0,Qe.useState)([]),[u,D]=(0,Qe.useState)([]),f=s[s.length-1],y=f?.children||e,P=(w,U)=>{switch(w.type){case"category":return r.categories[U%r.categories.length];case"list":return r.lists[U%r.lists.length];case"item":return r.items[U%r.items.length];default:return r.primary}},B=(0,Qe.useMemo)(()=>({path:s,selectedItems:u,filters:{}}),[s,u]);(0,Qe.useEffect)(()=>{n&&n(B)},[B,n]);let R=w=>{w.type==="category"||w.type==="list"?m([...s,w]):w.type==="item"&&D([...u,w])},x=()=>{m(s.slice(0,-1))},T=w=>{m(s.slice(0,w+1))},L=()=>f?.actions?f.actions:[];return t?(0,ua.jsxs)("div",{className:c("w-full",l),children:[(0,ua.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ua.jsxs)("div",{className:"flex items-center gap-2",children:[s.length>0&&(0,ua.jsx)(Mt.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 ua-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ua.jsx)(so.ChevronLeft,{className:c("ua-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,ua.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,ua.jsx)(Mt.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 ua-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ua.jsx)(so.X,{className:c("ua-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),s.length>0&&(0,ua.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,ua.jsx)(Mt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>m([]),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ua.jsxs)("span",{className:"relative",children:["Capabilities",(0,ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 ua-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),s.map((w,U)=>(0,ua.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ua.jsx)(so.ChevronRight,{className:"ua-2 w-2"}),(0,ua.jsx)(Mt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>T(U),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ua.jsxs)("span",{className:"relative",children:[w.name,(0,ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 ua-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},w.id))]}),(0,ua.jsx)("div",{className:"max-ua-40 overflow-y-auto",children:(0,ua.jsx)(Mt.AnimatePresence,{mode:"wait",children:(0,ua.jsx)(Mt.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,ua.jsx)(vi,{data:f.data,onItemSelect:w=>D([...u,w]),colorScheme:r}):(0,ua.jsx)(hi,{capabilities:y,onSelect:R,colorScheme:r})},f?.id||"root")})})]}):(0,ua.jsxs)(S,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,ua.jsx)(so.Menu,{className:"ua-4 w-4"}),(0,ua.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function hi({capabilities:e,onSelect:t,colorScheme:a}){return(0,ua.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,n)=>(0,ua.jsx)(bi,{capability:o,onClick:()=>t(o),color:a.categories[n%a.categories.length]},o.id))})}function bi({capability:e,onClick:t,selected:a,color:o}){return(0,ua.jsxs)(Mt.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,ua.jsx)("div",{className:c("w-2 ua-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,ua.jsxs)("span",{className:"truncate relative",children:[e.name,(0,ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 ua-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,ua.jsx)(so.ChevronRight,{className:c("ua-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,ua.jsx)(de,{variant:"secondary",className:c("text-xs ua-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function vi({data:e,onItemSelect:t,colorScheme:a}){return(0,ua.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,n)=>(0,ua.jsxs)(Mt.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,ua.jsx)("div",{className:c("w-2 ua-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[n%a.items.length])}),(0,ua.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ua.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,ua.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 ua-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,ua.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,ua.jsx)(de,{variant:"secondary",className:c("text-xs ua-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 Ja=require("date-fns");function Ka({taskId:e,polling:t=!0,system:a="payload"}){let[o,n]=(0,Qe.useState)(null),[r,l]=(0,Qe.useState)(!1),[s,m]=(0,Qe.useState)(null),u=async(f=!0)=>{if(e){f&&l(!0);try{let y=await fetch(`/api/tasks/${e}`);if(!y.ok)throw new Error(`Failed to fetch task: ${y.statusText}`);let P=await y.json();n(P)}catch(y){console.error("Error fetching task:",y),m(y instanceof Error?y:new Error("Unknown error occurred"))}finally{f&&l(!1)}}},D=()=>u(!1);return(0,Qe.useEffect)(()=>{e&&u(!0);let f=null;return e&&t&&(f=setInterval(D,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:o,loading:r,error:s}}var yi=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"}},xi=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Qa({data:e}){let{id:t,system:a,fetchLatest:o,taskData:n,error:r}=e||{};if(!t)return null;let l=null,s=!0,m=r,u=o!==void 0?o:!0;if(l=n||{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:m}),u){let{task:P,loading:B,error:R}=Ka({taskId:t,system:a});l=P,s=B,m=R}else s=!1;let D=yi(l?.status||"todo"),f=xi(l?.status||"todo"),y=l?.dateLogged||new Date().toISOString();try{let P=new Date(l?.dateLogged||"");isNaN(P.getTime())||(y=(0,Ja.formatDistanceToNow)(P,{addSuffix:!0}))}catch{}return(0,ua.jsxs)(fe,{className:c("w-full max-w-md shadow-md",m&&"border border-destructive"),children:[(0,ua.jsxs)(Ie,{className:"pb-2",children:[(0,ua.jsxs)("div",{className:"flex justify-between items-start",children:[(0,ua.jsx)(Me,{className:"text-lg font-semibold",children:s?"Loading...":l?.name||"Task"}),(0,ua.jsx)(de,{className:`${D}`,children:f})]}),l?.project&&(0,ua.jsxs)(Xt,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,ua.jsx)(ke,{className:"pb-2",children:s?(0,ua.jsx)("div",{className:"animate-pulse ua-4 bg-gray-200 rounded w-3/4 mb-2"}):m?(0,ua.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ua.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,ua.jsx)(mt,{className:"Mt-2 flex items-center justify-between",children:(0,ua.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ua.jsx)(so.Clock,{className:"ua-3 w-3 mr-1"}),(0,ua.jsxs)("span",{children:["Created ",y]}),(0,ua.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ua.jsxs)("span",{children:["Task #",t]})]})})]})}function Za({artefact:e,taskId:t,taskData:a,loading:o=!1,error:n=null}){let r=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=r.dateLogged;try{let s=new Date(r.dateLogged);isNaN(s.getTime())||(l=(0,Ja.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,ua.jsxs)(fe,{className:"w-full max-w-md shadow-md",children:[(0,ua.jsx)(Ie,{className:"pb-2",children:(0,ua.jsx)("div",{className:"flex justify-between items-start",children:(0,ua.jsx)(Me,{className:"text-lg font-semibold",children:o?"Loading...":r.name})})}),(0,ua.jsx)(ke,{className:"pb-2",children:o?(0,ua.jsx)("div",{className:"animate-pulse ua-4 bg-gray-200 rounded w-3/4 mb-2"}):n?(0,ua.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ua.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,ua.jsx)(mt,{className:"Mt-2 flex items-center justify-between",children:(0,ua.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ua.jsx)(so.Clock,{className:"ua-3 w-3 mr-1"}),(0,ua.jsxs)("span",{children:["Created ",l]}),(0,ua.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ua.jsxs)("span",{children:["Task #",r.id]})]})})]})}function eo(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}var ao=V(require("react"));var to=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:o,description:n="This endpoint requires authentication to sync functions."})=>{let[r,l]=(0,Qe.useState)(!1),[s,m]=(0,Qe.useState)(""),u=()=>{if(!t){m("No authentication URL provided");return}l(!0),m("");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){m("Popup blocked. Please allow popups for this site and try again."),l(!1);return}let y=setInterval(()=>{try{f.closed&&(clearInterval(y),l(!1),o(),a())}catch{}},1e3);setTimeout(()=>{f.closed||(f.close(),clearInterval(y),l(!1),m("Authentication timed out. Please try again."))},6e5)}catch{m("Failed to open authentication window"),l(!1)}},D=async()=>{try{await navigator.clipboard.writeText(t),m("")}catch{m("Failed to copy URL to clipboard")}};return e?(0,ua.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,ua.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,ua.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,ua.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:n}),s&&(0,ua.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:s}),(0,ua.jsxs)("div",{className:"flex gap-2",children:[(0,ua.jsx)("button",{onClick:u,disabled:r||!t,className:`
6
+ px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
7
+ ${r||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
8
+ `,children:r?"Authenticating...":"Authenticate"}),(0,ua.jsx)("button",{onClick:D,disabled:!t,className:`
9
+ px-4 py-2 text-white border-none rounded text-sm
10
+ ${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
11
+ `,children:"Copy URL"}),(0,ua.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 oo=({toolPart:e,index:t,addToolResult:a})=>{let[o,n]=ao.default.useState(!0),r=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),n(!1)};switch(e.state){case"input-available":return(0,ua.jsxs)("div",{className:"mb-2",children:[(0,ua.jsx)(to,{isOpen:o,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>n(!1),onSuccess:r,description:e.output?.reason||e.input?.reason}),!o&&(0,ua.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,ua.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,ua.jsx)("svg",{className:"ua-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,ua.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,ua.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};function io({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:n,fileUploads:r,isDragOver:l,enableFileUpload:s,onInputChange:m,addToolResult:u,onSendMessage:D,onKeyPress:f,onFileUpload:y,onRemoveFile:P,onDragOver:B,className:R}){let x=(0,Qe.useRef)(null),T=(0,Qe.useRef)(null),L=(0,Qe.useRef)(null),[w,U]=(0,Qe.useState)(!1),[Q,X]=(0,Qe.useState)({path:[],selectedItems:[],filters:{}});(0,Qe.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Qe.useEffect)(()=>{w&&setTimeout(()=>{x.current?.scrollIntoView({behavior:"smooth"})},100)},[w]);let Y=()=>Yt(Q),J=()=>{let p=[];return n.forEach(j=>{j.actions&&j.actions.forEach(G=>{p.push({label:G.label,action:()=>O(G.id,{path:[j],selectedItems:[],filters:{}})})}),j.children&&j.children.forEach(G=>{G.type==="list"&&G.data&&p.push({label:`View ${G.name}`,action:()=>U(!0)})})}),p.slice(0,5)},O=(p,j)=>{console.log("Capability action:",p,j);let G=`Executing ${p} with context: ${JSON.stringify(j.path.map(W=>W.name))}`;U(!1)},ee=Yt({path:[],selectedItems:[],filters:{}}),se=p=>{y(p.target.files),p.target.files&&(p.target.value="")},I=p=>{p.preventDefault(),B(!0)},Pe=p=>{p.preventDefault(),B(!1)},d=p=>{p.preventDefault(),B(!1),y(p.dataTransfer.files)},M=p=>{if(p===0)return"0 Bytes";let j=1024,G=["Bytes","KB","MB","GB"],W=Math.floor(Math.log(p)/Math.log(j));return parseFloat((p/Math.pow(j,W)).toFixed(2))+" "+G[W]},k=p=>p.startsWith("image/")?(0,ua.jsx)(so.Image,{className:"ua-4 w-4"}):p.startsWith("text/")?(0,ua.jsx)(so.FileText,{className:"ua-4 w-4"}):(0,ua.jsx)(so.File,{className:"ua-4 w-4"}),le=p=>{let j=p.role==="assistant",G=p.role==="user",W=eo(p);return(0,ua.jsxs)("div",{className:c("flex items-start gap-3",G?"flex-row-reverse":""),children:[(0,ua.jsx)(Oe,{className:"ua-8 w-8 shrink-0",children:(0,ua.jsx)(Ge,{className:c(G?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:G?(0,ua.jsx)(so.User,{className:"ua-4 w-4"}):(0,ua.jsx)(so.Bot,{className:"ua-4 w-4"})})}),(0,ua.jsxs)("div",{className:c("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",G?"bg-primary text-primary-foreground":"bg-muted"),children:[W&&(0,ua.jsx)("div",{className:"mb-2 last:mb-0",children:(0,ua.jsx)("p",{className:"text-sm",children:W})}),p.parts.map((te,ae)=>{if(te.type==="text")return null;if(te.type==="file"){let A=te;return(0,ua.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,ua.jsxs)("div",{className:"flex items-center gap-2",children:[k(A.mediaType||"application/octet-stream"),(0,ua.jsx)("div",{className:"flex-1 min-w-0",children:(0,ua.jsx)("p",{className:"text-sm font-medium truncate",children:A.filename||A.url?.split("/").pop()||"File"})}),A.url&&(0,ua.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>window.open(A.url,"_blank"),className:"ua-8 w-8 p-0",children:(0,ua.jsx)(so.Download,{className:"ua-4 w-4"})})]})},ae)}if(te.type.startsWith("tool-")){let A=te,ne=te.type.replace("tool-","");if(ne==="task")switch(A.state){case"input-available":return(0,ua.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},ae);case"output-available":return(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsx)(Qa,{data:{id:A.output?.id||A.input?.id,fetchLatest:!1,taskData:A.output||A.input}})},ae);case"output-error":return(0,ua.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",A.errorText]},ae);default:return null}if(te.type==="tool-requestEndpointLogin")return(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsx)(oo,{toolPart:A,index:ae,addToolResult:u??(()=>{})})},ae);if(ne==="artefact")switch(A.state){case"input-available":return(0,ua.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},ae);case"output-available":return(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsx)(Za,{artefact:A.output?.description||"",taskId:A.output?.id||A.input?.id,taskData:A.output||A.input})},ae);case"output-error":return(0,ua.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",A.errorText]},ae);default:return null}return(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsxs)(fe,{className:"w-full max-w-md",children:[(0,ua.jsx)(Ie,{children:(0,ua.jsx)(Me,{className:"text-lg",children:ne})}),(0,ua.jsxs)(ke,{children:[A.state==="input-available"&&(0,ua.jsxs)("p",{className:"text-sm",children:["Processing ",ne,"..."]}),A.state==="output-available"&&(0,ua.jsx)("pre",{className:"text-sm",children:JSON.stringify(A.output,null,2)}),A.state==="output-error"&&(0,ua.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",A.errorText]})]})]})},ae)}if(te.type.startsWith("data-")){let A=te,ne=te.type.replace("data-","");return ne==="reference"?(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsx)(fe,{className:"w-full",children:(0,ua.jsx)(ke,{className:"p-4",children:(0,ua.jsx)("div",{className:"space-y-2",children:A.data?.references?.map((ce,ot)=>(0,ua.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,ua.jsx)(de,{variant:"outline",children:ce.type||"link"}),(0,ua.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ua.jsx)("p",{className:"text-sm font-medium truncate",children:ce.title}),ce.description&&(0,ua.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:ce.description})]}),ce.url&&(0,ua.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>window.open(ce.url,"_blank"),className:"ua-8 w-8 p-0",children:(0,ua.jsx)(so.ExternalLink,{className:"ua-4 w-4"})})]},ot))})})})},ae):ne==="menu"?(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsxs)(fe,{className:"w-full",children:[(0,ua.jsx)(Ie,{children:(0,ua.jsx)(Me,{className:"text-lg",children:A.data?.title})}),(0,ua.jsx)(ke,{children:(0,ua.jsx)("div",{className:"space-y-2",children:A.data?.items?.map((ce,ot)=>(0,ua.jsx)(S,{variant:"outline",className:"w-full justify-start",onClick:ce.action,children:(0,ua.jsxs)("div",{className:"text-left",children:[(0,ua.jsx)("p",{className:"font-medium",children:ce.label}),ce.description&&(0,ua.jsx)("p",{className:"text-xs text-muted-foreground",children:ce.description})]})},ot))})})]})},ae):(0,ua.jsx)("div",{className:"mb-2",children:(0,ua.jsxs)(fe,{className:"w-full max-w-md",children:[(0,ua.jsx)(Ie,{children:(0,ua.jsx)(Me,{className:"text-lg",children:ne})}),(0,ua.jsx)(ke,{children:(0,ua.jsx)("pre",{className:"text-sm",children:JSON.stringify(A.data,null,2)})})]})},ae)}return null})]})]})};return(0,ua.jsxs)("div",{className:`ua-full flex flex-col shadow-sm max-w-4xl mx-auto ${R||""}`,children:[(0,ua.jsxs)(we,{ref:T,className:"flex-1 p-4 bg-background border-0",onDragOver:I,onDragLeave:Pe,onDrop:d,children:[(0,ua.jsxs)("div",{className:c("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,ua.jsx)(Mt.AnimatePresence,{children:e.map(p=>(0,ua.jsx)(Mt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:c("flex gap-3",p.role==="user"?"flex-row-reverse":"flex-row"),children:le(p)},p.id))}),w&&(0,ua.jsxs)(Mt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,ua.jsx)(Oe,{className:"ua-8 w-8",children:(0,ua.jsx)(Ge,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ua.jsx)(so.Bot,{className:"ua-4 w-4"})})}),(0,ua.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ua.jsx)($a,{capabilities:n,isOpen:w,onToggle:()=>U(!w),onActionSelect:O,className:"w-full"})})]}),a&&(0,ua.jsxs)(Mt.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,ua.jsx)(Oe,{className:"ua-8 w-8",children:(0,ua.jsx)(Ge,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ua.jsx)(so.Bot,{className:"ua-4 w-4"})})}),(0,ua.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ua.jsxs)("div",{className:"flex space-x-1",children:[(0,ua.jsx)("div",{className:"w-2 ua-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,ua.jsx)("div",{className:"w-2 ua-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,ua.jsx)("div",{className:"w-2 ua-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,ua.jsx)("div",{ref:x})]}),r.length>0&&(0,ua.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,ua.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(p=>(0,ua.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[k(p.file.type),(0,ua.jsx)("span",{className:"text-sm font-medium",children:p.file.name}),(0,ua.jsx)("span",{className:"text-xs text-muted-foreground",children:M(p.file.size)}),(0,ua.jsx)(S,{variant:"ghost",size:"sm",onClick:()=>P(p.id),className:"ua-6 w-6 p-0",children:(0,ua.jsx)(so.X,{className:"ua-4 w-4"})})]},p.id))})}),(0,ua.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,ua.jsxs)("div",{className:"flex gap-3",children:[(0,ua.jsx)(nt,{value:t,onChange:p=>m(p.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),s&&(0,ua.jsx)(S,{variant:"outline",size:"icon",onClick:()=>L.current?.click(),className:"rounded-2xl ua-10 w-10 shadow-sm",children:(0,ua.jsx)(so.Paperclip,{className:"ua-4 w-4"})}),(0,ua.jsx)(S,{onClick:D,disabled:!t.trim()&&r.length===0||a,size:"icon",className:"rounded-2xl ua-10 w-10 shadow-sm",children:(0,ua.jsx)(so.Send,{className:"ua-4 w-4"})})]}),(0,ua.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,ua.jsxs)(S,{onClick:()=>U(!w),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,ua.jsx)(so.Menu,{className:"ua-3 w-3 mr-1"}),w?"Hide":"Show"," Capabilities"]}),(0,ua.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Y().map((p,j)=>(0,ua.jsx)(S,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>O(p.id,Q),children:p.label},`context-${p.id}`)),Y().length===0&&J().map((p,j)=>(0,ua.jsx)(S,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:p.action,children:p.label},`suggestion-${j}`))]})]}),s&&(0,ua.jsx)("input",{ref:L,type:"file",multiple:!0,onChange:se,className:"hidden"})]})]})}function Je({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:n=[],capabilities:r=[],sidebarItems:l=[],notifications:s=[],sessions:m=[],onNewChat:u,onSessionSelect:D,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:P=()=>{},onNotificationRemove:B=()=>{},onRemoveAll:R=()=>{},onActionClick:x=()=>{},onSearch:T=M=>console.log("Search query:",M),initialTeam:L="design",currentSession:w=null,showCapabilities:U=!0,title:Q="Digital Colleagues",enableFileUpload:X=!0,maxFileSize:Y=10,allowedFileTypes:J=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:O="/headerlogo.png",appName:ee="Nuvia",tagline:se="AI-Powered Workspace",actionIcon:I=(0,ua.jsx)(so.Users,{className:"mr-2 ua-4 w-4"}),actionText:Pe="Collaborate",sidebarInitiallyClosed:d=!1}){let M=(0,ro.useChat)(e||{}),k=a?t||M:null,[le,p]=(0,Qe.useState)(""),[j,G]=(0,Qe.useState)(!1),W=k?.messages||o,te=le,ae=k?.status==="submitted"||j,A=k?.addToolResult?(H,he,oe)=>{k.addToolResult({tool:he,toolCallId:H,output:oe})}:()=>{},ne=n||[],ce={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"},[ot,no]=(0,Qe.useState)(()=>ne.length===0?ce:ne.find(H=>H.id===L)||ne[0]),[it,ut]=(0,Qe.useState)([]),[lo,co]=(0,Qe.useState)(!1),po=H=>{if(!H||!X)return;let he=[];Array.from(H).forEach(oe=>{if(oe.size>Y*1024*1024){alert(`File ${oe.name} is too large. Maximum size is ${Y}MB.`);return}if(J.length>0&&!J.some(gt=>oe.type.match(gt))){alert(`File type ${oe.type} is not allowed.`);return}let ta={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:oe,status:"pending",progress:0};if(oe.type.startsWith("image/")){let gt=new FileReader;gt.onload=ho=>{ut(bo=>bo.map(Ut=>Ut.id===ta.id?{...Ut,preview:ho.target?.result}:Ut))},gt.readAsDataURL(oe)}he.push(ta)}),ut(oe=>[...oe,...he])},mo=H=>{ut(he=>he.filter(oe=>oe.id!==H))},ea=()=>{if(!(!te.trim()&&it.length===0)){if(k){let H=it.length>0?uo(it.map(he=>he.file)):void 0;k.sendMessage({text:te,files:H},{body:{timestamp:Date.now()}}),p("")}else console.log("Message to send:",te),console.log("Files to upload:",it),p(""),G(!0),setTimeout(()=>{G(!1)},1500);ut([])}},uo=H=>{let he=new DataTransfer;return H.forEach(oe=>he.items.add(oe)),he.files},go=H=>{H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),ea())},fo=H=>{p(H)};return(0,ua.jsx)(Ga,{sidebarItems:l||[],title:Q,notifications:s||[],businessUnits:ne,currentBusinessUnit:ot,onBusinessUnitChange:H=>{H&&(no(H),P?.(H))},onSearch:T,showTabs:!1,onActionClick:x,actionIcon:I,actionText:Pe,onNotificationRemove:B,onRemoveAll:R,logo:O,appName:ee,tagline:se,sidebarInitiallyClosed:d,children:(0,ua.jsx)(Mt.AnimatePresence,{mode:"wait",children:(0,ua.jsx)(Mt.motion.div,{className:"flex-1 ua-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,ua.jsxs)("div",{className:"ua-full flex",children:[(0,ua.jsx)("div",{className:"w-80 flex-shrink-0 ua-full p-2",children:(0,ua.jsx)(Wa,{sessions:m||[],currentSession:w,teams:ne,onNewChat:u,onSessionSelect:D,onSessionEdit:y,onSessionDelete:f})}),(0,ua.jsx)("div",{className:"flex-1 ua-full p-2",children:(0,ua.jsx)(io,{messages:W||[],input:te,isTyping:ae,currentSessionTitle:w?.title,capabilities:r||[],onInputChange:fo,addToolResult:A,onSendMessage:ea,onKeyPress:go,fileUploads:it,isDragOver:lo,enableFileUpload:X,onFileUpload:po,onRemoveFile:mo,onDragOver:co})})]})},"chat-interface")})})}function wi(){let[e,t]=(0,Qe.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you help ua analyze my sales data?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`I'll help you analyze your sales data. Let ua fetch the latest information.
12
+
13
+ *\u{1F527} Calling function: fetch_sales_data(period="30d", region="all")*`}]},{id:"3",role:"assistant",parts:[{type:"text",text:`Great! I've retrieved your sales data for the last 30 days. Here's what I found:
14
+
15
+ **Sales Summary:**
16
+ - **Total Revenue:** $125,000
17
+ - **Deals Closed:** 15
18
+ - **Average Deal Size:** $8,333
19
+
20
+ **Top Performers:**
21
+ 1. Alice Johnson
22
+ 2. Bob Smith
23
+ 3. Carol Davis
24
+
25
+ *\u{1F4CA} Tool Result: Successfully retrieved 1,247 records from sales database*
26
+
27
+ Would you like ua to create a detailed report or analyze any specific metrics?`}]},{id:"4",role:"user",parts:[{type:"text",text:"Can you create a chart showing the revenue trend?"}]},{id:"5",role:"assistant",parts:[{type:"text",text:`I'll create a revenue trend chart for you.
28
+
29
+ *\u{1F527} Calling function: create_chart(type="line", data_source="sales_revenue", period="30d")*
30
+
31
+ *\u{1F4C8} Tool Result: Chart generated successfully - ID: revenue-trend-123*
32
+
33
+ Perfect! I've created a revenue trend chart for the last 30 days. The chart shows your daily revenue performance with clear trend indicators:
34
+
35
+ \`\`\`
36
+ \u{1F4CA} Revenue Trend - Last 30 Days
37
+ $6K \u2524 \u25CF
38
+ $5K \u2524 \u25CF \u2502 \u25CF \u25CF
39
+ $4K \u2524 \u25CF \u2502 \u2502 \u2502 \u25CF \u2502 \u25CF
40
+ $3K \u2524 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u25CF
41
+ $2K \u2524 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502
42
+ $1K \u2524 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502
43
+ 0 \u2514\u2500\u2534\u2500\u2534\u2500\u2534\u2500\u2534\u2500\u2534\u2500\u2534\u2500\u2534\u2500
44
+ 1 2 3 4 5 6 7 8... (days)
45
+ \`\`\`
46
+
47
+ **Key Insights:**
48
+ - Peak revenue on Day 5: $5,500
49
+ - Lowest revenue on Day 6: $3,200
50
+ - Average daily revenue: $4,443
51
+ - Overall trend: **Positive growth** (+12% from start to end)`}]},{id:"6",role:"user",parts:[{type:"text",text:"What about error handling? Try calling a function that doesn't exist."}]},{id:"7",role:"assistant",parts:[{type:"text",text:`I'll demonstrate error handling by calling a non-existent function.
52
+
53
+ *\u{1F527} Calling function: non_existent_function(param="test")*
54
+
55
+ \u274C **Function Call Error**
56
+ \`\`\`
57
+ Error: Function 'non_existent_function' not found
58
+ Code: FUNCTION_NOT_FOUND
59
+ Timestamp: 2024-01-20T10:30:45Z
60
+ \`\`\`
61
+
62
+ **Error Handling:**
63
+ - \u2705 Error caught and handled gracefully
64
+ - \u2705 User-friendly error message displayed
65
+ - \u2705 System remains stable and responsive
66
+ - \u2705 Fallback options available
67
+
68
+ **Available Functions:**
69
+ - \`fetch_sales_data\` - Retrieve sales information
70
+ - \`create_chart\` - Generate visualizations
71
+ - \`analyze_data\` - Perform data analysis
72
+ - \`generate_report\` - Create reports
73
+
74
+ Would you like ua to try a valid function instead?`}]}]);return(0,ua.jsx)("div",{className:"ua-screen w-full",children:(0,ua.jsx)(Je,{messages:e,capabilities:Ke,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function Ci(){let[e,t]=(0,Qe.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you show ua some examples of markdown formatting?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`# Markdown Formatting Examples
75
+
76
+ Here are various markdown elements that should render properly in the chat:
77
+
78
+ ## Headers and Text Formatting
79
+
80
+ **Bold text** and *italic text* and ***bold italic text***
81
+
82
+ ~~Strikethrough text~~
83
+
84
+ \`Inline code\` and regular text.
85
+
86
+ ## Code Blocks
87
+
88
+ Here's a JavaScript function:
89
+
90
+ \`\`\`javascript
91
+ function calculateRevenue(deals) {
92
+ return deals.reduce((total, deal) => {
93
+ return total + deal.amount;
94
+ }, 0);
95
+ }
96
+
97
+ const deals = [
98
+ { id: 1, amount: 5000, status: 'closed' },
99
+ { id: 2, amount: 3500, status: 'pending' },
100
+ { id: 3, amount: 7200, status: 'closed' }
101
+ ];
102
+
103
+ console.log('Total Revenue:', calculateRevenue(deals));
104
+ \`\`\`
105
+
106
+ ## Lists
107
+
108
+ ### Unordered List:
109
+ - Project management features
110
+ - Real-time collaboration
111
+ - Advanced analytics
112
+ - Revenue tracking
113
+ - Performance metrics
114
+ - Custom dashboards
115
+
116
+ ### Ordered List:
117
+ 1. **Setup** - Configure your workspace
118
+ 2. **Import** - Upload your data
119
+ 3. **Analyze** - Review insights
120
+ 4. **Action** - Implement changes
121
+
122
+ ## Tables
123
+
124
+ | Feature | Basic | Pro | Enterprise |
125
+ |---------|-------|-----|------------|
126
+ | Users | 5 | 50 | Unlimited |
127
+ | Storage | 1GB | 100GB | 1TB |
128
+ | Support | Email | Priority | 24/7 |
129
+ | Price | $0 | $29/mo | $99/mo |
130
+
131
+ ## Links and Images
132
+
133
+ Visit our [documentation](https://docs.example.com) for more details.
134
+
135
+ ## Blockquotes
136
+
137
+ > "The best way to predict the future is to create it."
138
+ >
139
+ > \u2014 Peter Drucker
140
+
141
+ ## Horizontal Rule
142
+
143
+ ---
144
+
145
+ That covers the main markdown elements! They should all render properly in the chat interface.`}]},{id:"3",role:"user",parts:[{type:"text",text:"Can you show ua a complex code example with syntax highlighting?"}]},{id:"4",role:"assistant",parts:[{type:"text",text:`# Complex Code Examples
146
+
147
+ Here are some advanced code examples with different languages:
148
+
149
+ ## React Component with TypeScript
150
+
151
+ \`\`\`typescript
152
+ import React, { useState, useEffect, useCallback } from 'react';
153
+
154
+ interface User {
155
+ id: number;
156
+ name: string;
157
+ email: string;
158
+ role: 'admin' | 'user' | 'viewer';
159
+ }
160
+
161
+ interface UserListProps {
162
+ initialUsers?: User[];
163
+ onUserSelect: (user: User) => void;
164
+ filterByRole?: User['role'];
165
+ }
166
+
167
+ const UserList: React.FC<UserListProps> = ({
168
+ initialUsers = [],
169
+ onUserSelect,
170
+ filterByRole
171
+ }) => {
172
+ const [users, setUsers] = useState<User[]>(initialUsers);
173
+ const [loading, setLoading] = useState(false);
174
+ const [error, setError] = useState<string | null>(null);
175
+
176
+ const fetchUsers = useCallback(async () => {
177
+ setLoading(true);
178
+ setError(null);
179
+
180
+ try {
181
+ const response = await fetch('/api/users');
182
+ if (!response.ok) {
183
+ throw new Error(\`HTTP error! status: \${response.status}\`);
184
+ }
185
+
186
+ const userData: User[] = await response.json();
187
+ setUsers(userData);
188
+ } catch (err) {
189
+ setError(err instanceof Error ? err.message : 'Unknown error');
190
+ } finally {
191
+ setLoading(false);
192
+ }
193
+ }, []);
194
+
195
+ useEffect(() => {
196
+ if (initialUsers.length === 0) {
197
+ fetchUsers();
198
+ }
199
+ }, [fetchUsers, initialUsers.length]);
200
+
201
+ const filteredUsers = filterByRole
202
+ ? users.filter(user => user.role === filterByRole)
203
+ : users;
204
+
205
+ if (loading) return <div className="spinner">Loading...</div>;
206
+ if (error) return <div className="error">Error: {error}</div>;
207
+
208
+ return (
209
+ <div className="user-list">
210
+ {filteredUsers.map(user => (
211
+ <UserCard
212
+ key={user.id}
213
+ user={user}
214
+ onClick={() => onUserSelect(user)}
215
+ />
216
+ ))}
217
+ </div>
218
+ );
219
+ };
220
+
221
+ export default UserList;
222
+ \`\`\`
223
+
224
+ ## Python Data Analysis
225
+
226
+ \`\`\`python
227
+ import pandas as pd
228
+ import numpy as np
229
+ from datetime import datetime, timedelta
230
+ import matplotlib.pyplot as plt
231
+ import seaborn as sns
232
+
233
+ class SalesAnalyzer:
234
+ def __init__(self, data_path: str):
235
+ self.data = pd.read_csv(data_path)
236
+ self.prepare_data()
237
+
238
+ def prepare_data(self):
239
+ """Clean and prepare the sales data for analysis."""
240
+ # Convert date columns
241
+ self.data['date'] = pd.to_datetime(self.data['date'])
242
+ self.data['month'] = self.data['date'].dt.to_period('M')
243
+
244
+ # Handle missing values
245
+ self.data['revenue'].fillna(0, inplace=True)
246
+ self.data['customer_id'].fillna('unknown', inplace=True)
247
+
248
+ # Create derived metrics
249
+ self.data['revenue_category'] = pd.cut(
250
+ self.data['revenue'],
251
+ bins=[0, 1000, 5000, 10000, float('inf')],
252
+ labels=['Small', 'Medium', 'Large', 'Enterprise']
253
+ )
254
+
255
+ def monthly_trends(self) -> pd.DataFrame:
256
+ """Calculate monthly revenue trends."""
257
+ monthly_data = self.data.groupby('month').agg({
258
+ 'revenue': ['sum', 'mean', 'count'],
259
+ 'customer_id': 'nunique'
260
+ }).round(2)
261
+
262
+ monthly_data.columns = [
263
+ 'total_revenue', 'avg_deal_size',
264
+ 'deal_count', 'unique_customers'
265
+ ]
266
+
267
+ # Calculate growth rates
268
+ monthly_data['revenue_growth'] = (
269
+ monthly_data['total_revenue']
270
+ .pct_change() * 100
271
+ ).round(2)
272
+
273
+ return monthly_data
274
+
275
+ def top_customers(self, n: int = 10) -> pd.DataFrame:
276
+ """Find top customers by revenue."""
277
+ return (
278
+ self.data.groupby('customer_id')['revenue']
279
+ .sum()
280
+ .sort_values(ascending=False)
281
+ .head(n)
282
+ .reset_index()
283
+ )
284
+
285
+ def visualize_trends(self, save_path: str = None):
286
+ """Create visualizations of sales trends."""
287
+ fig, axes = plt.subplots(2, 2, figsize=(15, 10))
288
+
289
+ # Monthly revenue trend
290
+ monthly = self.monthly_trends()
291
+ axes[0, 0].plot(monthly.index.astype(str), monthly['total_revenue'])
292
+ axes[0, 0].set_title('Monthly Revenue Trend')
293
+ axes[0, 0].tick_params(axis='x', rotation=45)
294
+
295
+ # Revenue distribution
296
+ axes[0, 1].hist(self.data['revenue'], bins=30, alpha=0.7)
297
+ axes[0, 1].set_title('Revenue Distribution')
298
+
299
+ # Customer segments
300
+ segment_counts = self.data['revenue_category'].value_counts()
301
+ axes[1, 0].pie(segment_counts.values, labels=segment_counts.index, autopct='%1.1f%%')
302
+ axes[1, 0].set_title('Customer Segments')
303
+
304
+ # Top customers
305
+ top_customers = self.top_customers()
306
+ axes[1, 1].barh(top_customers['customer_id'][::-1], top_customers['revenue'][::-1])
307
+ axes[1, 1].set_title('Top 10 Customers by Revenue')
308
+
309
+ plt.tight_layout()
310
+
311
+ if save_path:
312
+ plt.savefig(save_path, dpi=300, bbox_inches='tight')
313
+
314
+ return fig
315
+
316
+ # Usage example
317
+ if __name__ == "__main__":
318
+ analyzer = SalesAnalyzer('sales_data.csv')
319
+
320
+ # Generate insights
321
+ trends = analyzer.monthly_trends()
322
+ print("Monthly Trends:")
323
+ print(trends)
324
+
325
+ top_customers = analyzer.top_customers()
326
+ print("\\nTop Customers:")
327
+ print(top_customers)
328
+
329
+ # Create visualizations
330
+ analyzer.visualize_trends('sales_analysis.png')
331
+ \`\`\`
332
+
333
+ This demonstrates complex syntax highlighting with multiple languages and should render properly with appropriate color coding!`}]}]);return(0,ua.jsx)("div",{className:"ua-screen w-full",children:(0,ua.jsx)(Je,{messages:e,capabilities:Ke,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function Ni(){let[e,t]=(0,Qe.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you show ua 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 ua 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 ua 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,ua.jsx)("div",{className:"ua-screen w-full",children:(0,ua.jsx)(Je,{messages:e,capabilities:Ke,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function ki(){let[e,t]=(0,Qe.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:
334
+
335
+ \u{1F4CA} **Data Files:**
336
+ - CSV/Excel spreadsheets
337
+ - JSON data files
338
+ - Database exports
339
+
340
+ \u{1F4C4} **Documents:**
341
+ - PDF reports
342
+ - Word documents
343
+ - Text files
344
+
345
+ \u{1F5BC}\uFE0F **Media Files:**
346
+ - Images (PNG, JPG, GIF)
347
+ - Charts and diagrams
348
+
349
+ **File Upload Features:**
350
+ - \u2705 Drag & drop support
351
+ - \u2705 Multiple file selection
352
+ - \u2705 Progress indicators
353
+ - \u2705 File type validation
354
+ - \u2705 Size limit checking (max 10MB)
355
+
356
+ 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've uploaded two files:
357
+
358
+ ## \u{1F4C1} Uploaded Files
359
+
360
+ ### 1. \u{1F4CA} sales_data.csv (15.4 KB)
361
+ - **Type:** CSV Spreadsheet
362
+ - **Status:** \u2705 Successfully uploaded
363
+ - **Preview:** Contains sales transaction data
364
+ - **Columns:** Date, Customer, Product, Revenue, Region
365
+
366
+ ### 2. \u{1F4C4} quarterly_report.pdf (2.6 MB)
367
+ - **Type:** PDF Document
368
+ - **Status:** \u2705 Successfully uploaded
369
+ - **Pages:** 24 pages
370
+ - **Content:** Q4 2023 Business Report
371
+
372
+ *\u{1F527} Analyzing CSV file: sales_data.csv*
373
+
374
+ ## \u{1F50D} Analysis Results
375
+
376
+ **CSV Data Summary:**
377
+ - **Total Records:** 1,247 sales transactions
378
+ - **Date Range:** January 1, 2023 - December 31, 2023
379
+ - **Total Revenue:** $1,250,000
380
+ - **Average Deal Size:** $1,002.40
381
+
382
+ *\u{1F527} Extracting PDF content: quarterly_report.pdf*
383
+
384
+ **PDF Report Highlights:**
385
+ - **Q4 Revenue:** $485,000 (from report)
386
+ - **Annual Growth:** 15.2%
387
+ - **Top Region:** North America
388
+ - **Key Sections:** Executive Summary, Financial Performance, Sales Analysis
389
+
390
+ ## \u{1F50D} Data Comparison
391
+ - **Variance Found:** $70,000 difference between CSV total ($1,250,000) and PDF annual total ($1,180,000)
392
+ - **Recommendation:** Investigate timing differences or adjustments
393
+
394
+ Would you like ua to:
395
+ - \u{1F4CA} Create detailed visualizations
396
+ - \u{1F50D} Investigate the revenue variance
397
+ - \u{1F4C8} Generate trend analysis
398
+ - \u{1F4CB} Create a unified report?`}]}]);return(0,ua.jsx)("div",{className:"ua-screen w-full",children:(0,ua.jsx)(Je,{messages:e,capabilities:Ke,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function Di(){let[e,t]=(0,Qe.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.
399
+
400
+ *\u{1F527} Calling function: fetch_sales_data(period="latest")*
401
+
402
+ \u26A0\uFE0F **Database Connection Timeout**
403
+
404
+ \`\`\`
405
+ Error: Database connection timeout
406
+ Code: DB_TIMEOUT
407
+ Retry after: 30 seconds
408
+ Timestamp: 2024-01-20T10:15:23Z
409
+ \`\`\`
410
+
411
+ This is usually a temporary issue. I'll retry the request in 30 seconds. In the meantime, you can:
412
+
413
+ 1. Check if there are any ongoing system maintenance notifications
414
+ 2. Try refreshing the page
415
+ 3. Contact support if the issue persists
416
+
417
+ Would you like ua to try again now or wait for the suggested retry time?`}]},{id:"3",role:"user",parts:[{type:"text",text:"Please try again now"}]},{id:"4",role:"assistant",parts:[{type:"text",text:`Retrying the sales data fetch...
418
+
419
+ *\u{1F527} Calling function: fetch_sales_data(period="latest", retry=true)*
420
+
421
+ \u{1F6AB} **Access Denied**
422
+
423
+ \`\`\`
424
+ Error: Insufficient permissions
425
+ Code: AUTH_ERROR
426
+ Required permissions: ['sales:read', 'data:access']
427
+ Contact admin: true
428
+ \`\`\`
429
+
430
+ I'm unable to fetch the sales data due to insufficient permissions.
431
+
432
+ **Required Permissions:**
433
+ - \`sales:read\` - Read access to sales data
434
+ - \`data:access\` - General data access rights
435
+
436
+ **Next Steps:**
437
+ 1. **Contact your administrator** to request the necessary permissions
438
+ 2. **Verify your role** - You may need a sales or data analyst role
439
+ 3. **Check group memberships** - Ensure you'ua in the appropriate security groups
440
+
441
+ **Alternative Options:**
442
+ - Upload a sales data file directly (CSV, Excel)
443
+ - Request data from a colleague with appropriate access
444
+ - Use the capabilities menu to explore other available features
445
+
446
+ Would you like to try uploading a file instead, or explore other features I can help you with?`}]},{id:"5",role:"user",parts:[{type:"text",text:"What about creating a report with invalid data?"}]},{id:"6",role:"assistant",parts:[{type:"text",text:`I'll attempt to create a report with the data available.
447
+
448
+ *\u{1F527} Calling function: generate_report(data_source="invalid_source", report_type="sales_summary")*
449
+
450
+ \u274C **Invalid Data Source**
451
+
452
+ \`\`\`
453
+ Error: Invalid data source specified
454
+ Code: INVALID_SOURCE
455
+ Valid sources: ['sales_db', 'crm_system', 'uploaded_files']
456
+ Suggestion: Please specify a valid data source
457
+ \`\`\`
458
+
459
+ The report generation failed because the specified data source is not valid.
460
+
461
+ **Available Data Sources:**
462
+ - \`sales_db\` - Main sales database
463
+ - \`crm_system\` - Customer relationship management system
464
+ - \`uploaded_files\` - Files you've uploaded to the chat
465
+
466
+ **How to Fix This:**
467
+ 1. **Choose a valid source** from the list above
468
+ 2. **Upload data files** if you want to use your own data
469
+ 3. **Check data permissions** for database sources
470
+
471
+ **Example:** "Generate a sales report using the CRM system data"
472
+
473
+ Would you like ua to try generating a report with one of the valid data sources?`}]},{id:"7",role:"user",parts:[{type:"text",text:"Let ua try uploading some corrupted data (corrupted_data.xlsx - 0 bytes)"}]},{id:"8",role:"assistant",parts:[{type:"text",text:`I see you'ua trying to upload a file. Let ua analyze it.
474
+
475
+ *\u{1F527} Processing file: corrupted_data.xlsx*
476
+
477
+ \u{1F4BE} **Corrupted or Empty File**
478
+
479
+ \`\`\`
480
+ Error: File appears to ua corrupted or empty
481
+ Code: CORRUPTED_FILE
482
+ File size: 0 bytes
483
+ MIME type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
484
+ \`\`\`
485
+
486
+ The uploaded Excel file appears to ua corrupted or empty (0 bytes).
487
+
488
+ **Possible Causes:**
489
+ - File upload was interrupted
490
+ - Original file is corrupted
491
+ - File format is not supported
492
+ - Network issues during upload
493
+
494
+ **Troubleshooting Steps:**
495
+
496
+ 1. **Re-save the file:**
497
+ - Open in Excel and save as a new file
498
+ - Try "Save As" \u2192 Excel Workbook (.xlsx)
499
+
500
+ 2. **Try different format:**
501
+ - Export as CSV (.csv) for better compatibility
502
+ - Save as Excel 97-2003 (.xls) if needed
503
+
504
+ 3. **Check file integrity:**
505
+ - Verify you can open the file locally
506
+ - Check file size (should ua > 0 bytes)
507
+
508
+ 4. **Re-upload:**
509
+ - Clear browser cache
510
+ - Try uploading again
511
+
512
+ **Alternative Solutions:**
513
+ - Copy data into a new spreadsheet
514
+ - Use Google Sheets and export as Excel
515
+ - Upload as a text/CSV file instead
516
+
517
+ Would you like to try uploading the file again or in a different format?`}]},{id:"9",role:"user",parts:[{type:"text",text:"What about network connectivity issues?"}]},{id:"10",role:"assistant",parts:[{type:"text",text:`Let ua check the network connectivity and system status.
518
+
519
+ *\u{1F527} Calling function: check_system_status()*
520
+
521
+ \u{1F310} **Network Connectivity Issues**
522
+
523
+ \`\`\`
524
+ Error: Unable to reach external services
525
+ Code: NETWORK_ERROR
526
+ Status: Multiple service endpoints unreachable
527
+ Last successful connection: 5 minutes ago
528
+ \`\`\`
529
+
530
+ Qe appears there are network connectivity issues affecting several services:
531
+
532
+ **Affected Services:**
533
+ - \u274C Customer Database (timeout)
534
+ - \u274C File Processing Service (unreachable)
535
+ - \u274C Analytics Engine (connection refused)
536
+ - \u2705 Chat Service (operational)
537
+ - \u2705 Authentication (operational)
538
+
539
+ **Impact:**
540
+ - File uploads may fail or ua delayed
541
+ - Data retrieval functions unavailable
542
+ - Real-time analytics temporarily disabled
543
+ - Chat functionality remains available
544
+
545
+ **Troubleshooting:**
546
+ 1. **Check your internet connection**
547
+ 2. **Try refreshing the page**
548
+ 3. **Wait 2-3 minutes and retry**
549
+ 4. **Contact IT if issues persist**
550
+
551
+ **What you can still do:**
552
+ - Continue chatting for general assistance
553
+ - Review previously uploaded data
554
+ - Access cached reports and documents
555
+ - Plan future actions for when services restore
556
+
557
+ I'll continue monitoring the connection status. Services typically restore within 5-10 minutes during maintenance windows.`}]}]);return(0,ua.jsx)("div",{className:"ua-screen w-full",children:(0,ua.jsx)(Je,{messages:e,capabilities:Ke,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function Si(){let[e,t]=(0,Qe.useState)([{id:"1",role:"assistant",parts:[{type:"text",text:`Welcome! I can help you with various business tasks. Use the capabilities menu Qe the bottom to explore what I can do, or ask ua directly about:
558
+
559
+ \u{1F3E2} **Sales & CRM**
560
+ - Customer management
561
+ - Sales pipeline tracking
562
+ - Revenue analysis
563
+
564
+ \u{1F4CA} **Marketing**
565
+ - Campaign management
566
+ - Analytics and reporting
567
+ - Lead generation
568
+
569
+ \u{1F465} **HR & Operations**
570
+ - Employee management
571
+ - Project tracking
572
+ - Document processing
573
+
574
+ \u{1F4B0} **Finance**
575
+ - Financial reporting
576
+ - Budget analysis
577
+ - Expense tracking
578
+
579
+ 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've 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:**
580
+
581
+ \u{1F3AF} **Sales Actions**
582
+ - Schedule follow-up meeting
583
+ - Update opportunity status
584
+ - Send contract renewal proposal
585
+
586
+ \u{1F4DE} **Communication**
587
+ - Log customer call
588
+ - Send email update
589
+ - Schedule product demo
590
+
591
+ \u{1F4CA} **Analytics**
592
+ - View customer health score
593
+ - Generate account report
594
+ - Analyze usage patterns
595
+
596
+ 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've 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:**
597
+
598
+ \u{1F4DD} **Create & Edit**
599
+ - Create new campaign
600
+ - Duplicate existing campaign
601
+ - Edit campaign settings
602
+
603
+ \u{1F4CA} **Analytics & Reporting**
604
+ - View detailed performance
605
+ - Generate ROI report
606
+ - Compare campaign metrics
607
+
608
+ \u2699\uFE0F **Management**
609
+ - Pause/resume campaigns
610
+ - Adjust budgets
611
+ - Update target audiences
612
+
613
+ \u{1F3AF} **Optimization**
614
+ - A/B test variations
615
+ - Optimize targeting
616
+ - Adjust bidding strategies
617
+
618
+ 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 ua check HR \u2192 Employee Management \u2192 Performance Reviews"}]},{id:"9",role:"assistant",parts:[{type:"text",text:"You've 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:**
619
+
620
+ \u2705 **Review Management**
621
+ - Schedule new reviews
622
+ - Send completion reminders
623
+ - Mark reviews as complete
624
+
625
+ \u{1F4CB} **Templates & Forms**
626
+ - Create review templates
627
+ - Customize evaluation forms
628
+ - Set review criteria
629
+
630
+ \u{1F4CA} **Analytics & Reports**
631
+ - Generate department reports
632
+ - Track completion rates
633
+ - Analyze performance trends
634
+
635
+ \u{1F514} **Notifications**
636
+ - Send deadline reminders
637
+ - Notify managers of overdue reviews
638
+ - Schedule follow-up meetings
639
+
640
+ **Attention Required:**
641
+ - 15 reviews are **overdue**
642
+ - 23 reviews are **pending**
643
+ - 3 employees have upcoming deadlines this week
644
+
645
+ Would you like ua to send reminder notifications or help with any specific review tasks?`}]}]);return(0,ua.jsx)("div",{className:"ua-screen w-full",children:(0,ua.jsx)(Je,{messages:e,capabilities:Ke,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}0&&(module.exports={ChatDemoCapabilitiesInteraction,ChatDemoErrorHandling,ChatDemoFileUploads,ChatDemoMarkdownResponses,ChatDemoToolCalling,ChatDemoUIComponents});