cortex-react-components 2.5.1 → 2.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (149) hide show
  1. package/dist/{chunk-PZXOH6CZ.mjs → chunk-2SAKLSZ4.mjs} +1 -1
  2. package/dist/{chunk-WSI4B2MA.mjs → chunk-2VOOH4YJ.mjs} +1 -1
  3. package/dist/{chunk-IHPO27W4.mjs → chunk-3DYGB2K5.mjs} +1 -1
  4. package/dist/{chunk-W4UCTPLC.mjs → chunk-3ZF4TV4N.mjs} +1 -1
  5. package/dist/{chunk-GQ7ONZTM.mjs → chunk-57PJ7CHJ.mjs} +1 -1
  6. package/dist/{chunk-CLGBBNRB.mjs → chunk-75WE6ZXB.mjs} +1 -1
  7. package/dist/{chunk-ULEGY3LW.mjs → chunk-75XBZHOC.mjs} +1 -1
  8. package/dist/{chunk-5RDLHKTK.mjs → chunk-ABGNIQRP.mjs} +1 -1
  9. package/dist/{chunk-LIVFM3OH.mjs → chunk-AEFWTCCE.mjs} +1 -1
  10. package/dist/{chunk-53FA54L3.mjs → chunk-AFQBDAWS.mjs} +1 -1
  11. package/dist/{chunk-5ZAEFDWB.mjs → chunk-B2TBKNIJ.mjs} +1 -1
  12. package/dist/{chunk-MFCVMJBO.mjs → chunk-BDDEMCAH.mjs} +1 -1
  13. package/dist/{chunk-XW52WZ2B.mjs → chunk-FOEPKY7T.mjs} +1 -1
  14. package/dist/{chunk-I2KSLUQI.mjs → chunk-FRXZ2OKW.mjs} +1 -1
  15. package/dist/chunk-FUEUJPNZ.mjs +1 -0
  16. package/dist/{chunk-FJJXYLRH.mjs → chunk-FX6IXEMQ.mjs} +1 -1
  17. package/dist/{chunk-SWECU7TM.mjs → chunk-KY3ELFX5.mjs} +1 -1
  18. package/dist/{chunk-AMVJPDM3.mjs → chunk-M527EJIX.mjs} +1 -1
  19. package/dist/{chunk-HPYNP5UQ.mjs → chunk-MPTT6GRI.mjs} +1 -1
  20. package/dist/{chunk-AUYUGOC2.mjs → chunk-N52FSTLG.mjs} +1 -1
  21. package/dist/{chunk-BZ2WQV4P.mjs → chunk-NPGGDQ6F.mjs} +1 -1
  22. package/dist/{chunk-JZZS5W5F.mjs → chunk-Q7KKN6MH.mjs} +1 -1
  23. package/dist/chunk-QM5FOQHG.mjs +10 -0
  24. package/dist/{chunk-4RYG24IZ.mjs → chunk-QTILVWJA.mjs} +1 -1
  25. package/dist/{chunk-VH6OVYYB.mjs → chunk-QWFFSMKK.mjs} +1 -1
  26. package/dist/{chunk-XIGBDWYI.mjs → chunk-RAGDUV7M.mjs} +1 -1
  27. package/dist/{chunk-2R2QNFSX.mjs → chunk-RRLXKDET.mjs} +1 -1
  28. package/dist/{chunk-3GYD63ZU.mjs → chunk-RUZVSK25.mjs} +1 -1
  29. package/dist/{chunk-TN56JEUK.mjs → chunk-RY4C3J33.mjs} +1 -1
  30. package/dist/{chunk-Q6IE534E.mjs → chunk-S4ES6P3Y.mjs} +1 -1
  31. package/dist/{chunk-URYIYEGY.mjs → chunk-SEXSYCWD.mjs} +1 -1
  32. package/dist/chunk-SIL7AP7H.mjs +1 -0
  33. package/dist/{chunk-Z57EE3LL.mjs → chunk-SPAOEUCG.mjs} +1 -1
  34. package/dist/{chunk-ZI4KMPQF.mjs → chunk-STX6KQP5.mjs} +1 -1
  35. package/dist/{chunk-E64KWNOT.mjs → chunk-TK4JC5PG.mjs} +1 -1
  36. package/dist/{chunk-FBL3GXOL.mjs → chunk-TUACRDU3.mjs} +1 -1
  37. package/dist/{chunk-SRUG246N.mjs → chunk-TXVA6XJT.mjs} +1 -1
  38. package/dist/{chunk-GP4TAG4X.mjs → chunk-VBSFVJM5.mjs} +1 -1
  39. package/dist/{chunk-J3UUZDJ7.mjs → chunk-WB2Y7HTT.mjs} +1 -1
  40. package/dist/{chunk-YQWQFS72.mjs → chunk-XD3TBE5O.mjs} +1 -1
  41. package/dist/chunk-XDQAH5AP.mjs +4 -0
  42. package/dist/{chunk-PXLSH6S2.mjs → chunk-ZFUP5NVF.mjs} +1 -1
  43. package/dist/components/Blocks/Banner.mjs +1 -1
  44. package/dist/components/Blocks/CallToAction.mjs +1 -1
  45. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  46. package/dist/components/Blocks/Content.mjs +1 -1
  47. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  48. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  49. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  50. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  51. package/dist/components/Blocks/index.mjs +1 -1
  52. package/dist/components/CRM/CogeBoard.mjs +1 -1
  53. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  54. package/dist/components/CRM/index.mjs +1 -1
  55. package/dist/components/Cards/ContentCard.mjs +1 -1
  56. package/dist/components/Cards/FeatureCard.mjs +1 -1
  57. package/dist/components/Cards/index.mjs +1 -1
  58. package/dist/components/Chat/ChatInterface.d.ts +2 -1
  59. package/dist/components/Chat/ChatInterface.js +7 -1
  60. package/dist/components/Chat/ChatInterface.mjs +1 -1
  61. package/dist/components/Chat/Components/Oauth.d.ts +11 -0
  62. package/dist/components/Chat/Components/Oauth.js +10 -0
  63. package/dist/components/Chat/Components/Oauth.mjs +2 -0
  64. package/dist/components/Chat/CopilotInterface.js +7 -1
  65. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  66. package/dist/components/Chat/PartTypes/PartAuthenticateTool.d.ts +15 -0
  67. package/dist/components/Chat/PartTypes/PartAuthenticateTool.js +10 -0
  68. package/dist/components/Chat/PartTypes/PartAuthenticateTool.mjs +1 -0
  69. package/dist/components/Chat/PartTypes/index.d.ts +1 -0
  70. package/dist/components/Chat/PartTypes/index.js +10 -0
  71. package/dist/components/Chat/PartTypes/index.mjs +1 -0
  72. package/dist/components/Chat/demo-long-messages.js +12 -6
  73. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  74. package/dist/components/Chat/demo-tests.js +26 -20
  75. package/dist/components/Chat/demo-tests.mjs +1 -1
  76. package/dist/components/Chat/demo.js +7 -1
  77. package/dist/components/Chat/demo.mjs +1 -1
  78. package/dist/components/Chat/example-usage.js +7 -1
  79. package/dist/components/Chat/example-usage.mjs +1 -1
  80. package/dist/components/Chat/example-with-vercel-ai.js +7 -1
  81. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  82. package/dist/components/Chat/index.js +8 -2
  83. package/dist/components/Chat/index.mjs +1 -1
  84. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  85. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  86. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  87. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  88. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  89. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  90. package/dist/components/DigitalColleagues/index.mjs +1 -1
  91. package/dist/components/HeaderFooter/Header.mjs +1 -1
  92. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  93. package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
  94. package/dist/components/HeaderFooter/index.mjs +1 -1
  95. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  96. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  97. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  98. package/dist/components/Heros/PostHero/index.mjs +1 -1
  99. package/dist/components/Heros/RenderHero.mjs +1 -1
  100. package/dist/components/Heros/SectionHero/index.mjs +1 -1
  101. package/dist/components/Heros/index.mjs +1 -1
  102. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  103. package/dist/components/Layouts/Print.mjs +1 -1
  104. package/dist/components/Layouts/SlideShow.mjs +1 -1
  105. package/dist/components/Layouts/index.mjs +1 -1
  106. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  107. package/dist/components/Menus/SidebarRight.mjs +1 -1
  108. package/dist/components/Menus/index.mjs +1 -1
  109. package/dist/components/Other/index.mjs +1 -1
  110. package/dist/components/Payload/RichText/index.mjs +1 -1
  111. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  112. package/dist/components/Payload/index.mjs +1 -1
  113. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  114. package/dist/components/Projects/ProjectPage.mjs +1 -1
  115. package/dist/components/Projects/ProjectView.mjs +1 -1
  116. package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
  117. package/dist/components/dc-temp/index.mjs +1 -1
  118. package/dist/components/index.js +16 -10
  119. package/dist/components/index.mjs +1 -1
  120. package/dist/components/ui/index.mjs +1 -1
  121. package/dist/components/ui/sidebar.mjs +1 -1
  122. package/dist/globals.css +1 -1
  123. package/dist/index.js +21 -15
  124. package/dist/index.mjs +1 -1
  125. package/dist/metafile-cjs.json +1 -1
  126. package/dist/metafile-esm.json +1 -1
  127. package/dist/pages/Blog.mjs +1 -1
  128. package/dist/pages/Documentation.mjs +1 -1
  129. package/dist/pages/IndexPage.mjs +1 -1
  130. package/dist/pages/Intranet.mjs +1 -1
  131. package/dist/pages/LandingPage.mjs +1 -1
  132. package/dist/pages/Page.mjs +1 -1
  133. package/dist/pages/Publish.mjs +1 -1
  134. package/dist/pages/Website.mjs +1 -1
  135. package/dist/sections/AboutSection.mjs +1 -1
  136. package/dist/sections/BlogDetail.mjs +1 -1
  137. package/dist/sections/BlogList.mjs +1 -1
  138. package/dist/sections/BlogListSection.mjs +1 -1
  139. package/dist/sections/ContactSection.mjs +1 -1
  140. package/dist/sections/PageSections.mjs +1 -1
  141. package/dist/sections/PricingSection.mjs +1 -1
  142. package/dist/sections/ServiceDetail.mjs +1 -1
  143. package/dist/sections/ServiceDetailSection.mjs +1 -1
  144. package/dist/sections/ServiceSection.mjs +1 -1
  145. package/dist/sections/form/index.mjs +1 -1
  146. package/dist/sections/index.mjs +1 -1
  147. package/package.json +1 -1
  148. package/dist/chunk-FI57DC3P.mjs +0 -1
  149. package/dist/chunk-H7PR7Q2X.mjs +0 -4
@@ -2,7 +2,13 @@
2
2
  "use strict";
3
3
  'use client'
4
4
 
5
- "use strict";var po=Object.create;var mt=Object.defineProperty;var mo=Object.getOwnPropertyDescriptor;var uo=Object.getOwnPropertyNames;var go=Object.getPrototypeOf,fo=Object.prototype.hasOwnProperty;var ho=(e,t)=>{for(var a in t)mt(e,a,{get:t[a],enumerable:!0})},Yt=(e,t,a,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let l of uo(t))!fo.call(e,l)&&l!==a&&mt(e,l,{get:()=>t[l],enumerable:!(o=mo(t,l))||o.enumerable});return e};var J=(e,t,a)=>(a=e!=null?po(go(e)):{},Yt(t||!e||!e.__esModule?mt(a,"default",{value:e,enumerable:!0}):a,e)),bo=e=>Yt(mt({},"__esModule",{value:!0}),e);var xi={};ho(xi,{ChatDemoCapabilitiesInteraction:()=>yi,ChatDemoErrorHandling:()=>vi,ChatDemoFileUploads:()=>bi,ChatDemoMarkdownResponses:()=>fi,ChatDemoToolCalling:()=>gi,ChatDemoUIComponents:()=>hi});module.exports=bo(xi);var Ke=require("react");var Ya=require("@ai-sdk/react"),Tt=require("framer-motion"),Za=require("lucide-react");var na=require("clsx");var Ut="-",vo=e=>{let t=xo(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:c=>{let r=c.split(Ut);return r[0]===""&&r.length!==1&&r.shift(),ta(r,t)||yo(c)},getConflictingClassGroupIds:(c,r)=>{let u=a[c]||[];return r&&o[c]?[...u,...o[c]]:u}}},ta=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],o=t.nextPart.get(a),l=o?ta(e.slice(1),o):void 0;if(l)return l;if(t.validators.length===0)return;let s=e.join(Ut);return t.validators.find(({validator:c})=>c(s))?.classGroupId},Zt=/^\[(.+)\]$/,yo=e=>{if(Zt.test(e)){let t=Zt.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},xo=e=>{let{theme:t,prefix:a}=e,o={nextPart:new Map,validators:[]};return Co(Object.entries(e.classGroups),a).forEach(([s,c])=>{Mt(c,o,s,t)}),o},Mt=(e,t,a,o)=>{e.forEach(l=>{if(typeof l=="string"){let s=l===""?t:ea(t,l);s.classGroupId=a;return}if(typeof l=="function"){if(wo(l)){Mt(l(o),t,a,o);return}t.validators.push({validator:l,classGroupId:a});return}Object.entries(l).forEach(([s,c])=>{Mt(c,ea(t,s),a,o)})})},ea=(e,t)=>{let a=e;return t.split(Ut).forEach(o=>{a.nextPart.has(o)||a.nextPart.set(o,{nextPart:new Map,validators:[]}),a=a.nextPart.get(o)}),a},wo=e=>e.isThemeGetter,Co=(e,t)=>t?e.map(([a,o])=>{let l=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([c,r])=>[t+c,r])):s);return[a,l]}):e,No=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,o=new Map,l=(s,c)=>{a.set(s,c),t++,t>e&&(t=0,o=a,a=new Map)};return{get(s){let c=a.get(s);if(c!==void 0)return c;if((c=o.get(s))!==void 0)return l(s,c),c},set(s,c){a.has(s)?a.set(s,c):l(s,c)}}},aa="!",ko=e=>{let{separator:t,experimentalParseClassName:a}=e,o=t.length===1,l=t[0],s=t.length,c=r=>{let u=[],m=0,R=0,b;for(let x=0;x<r.length;x++){let S=r[x];if(m===0){if(S===l&&(o||r.slice(x,x+s)===t)){u.push(r.slice(R,x)),R=x+s;continue}if(S==="/"){b=x;continue}}S==="["?m++:S==="]"&&m--}let N=u.length===0?r:r.substring(R),D=N.startsWith(aa),_=D?N.substring(1):N,k=b&&b>R?b-R:void 0;return{modifiers:u,hasImportantModifier:D,baseClassName:_,maybePostfixModifierPosition:k}};return a?r=>a({className:r,parseClassName:c}):c},Do=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},So=e=>({cache:No(e.cacheSize),parseClassName:ko(e),...vo(e)}),Po=/\s+/,Ro=(e,t)=>{let{parseClassName:a,getClassGroupId:o,getConflictingClassGroupIds:l}=t,s=[],c=e.trim().split(Po),r="";for(let u=c.length-1;u>=0;u-=1){let m=c[u],{modifiers:R,hasImportantModifier:b,baseClassName:N,maybePostfixModifierPosition:D}=a(m),_=!!D,k=o(_?N.substring(0,D):N);if(!k){if(!_){r=m+(r.length>0?" "+r:r);continue}if(k=o(N),!k){r=m+(r.length>0?" "+r:r);continue}_=!1}let x=Do(R).join(":"),S=b?x+aa:x,I=S+k;if(s.includes(I))continue;s.push(I);let C=l(k,_);for(let z=0;z<C.length;++z){let oe=C[z];s.push(S+oe)}r=m+(r.length>0?" "+r:r)}return r};function To(){let e=0,t,a,o="";for(;e<arguments.length;)(t=arguments[e++])&&(a=oa(t))&&(o&&(o+=" "),o+=a);return o}var oa=e=>{if(typeof e=="string")return e;let t,a="";for(let o=0;o<e.length;o++)e[o]&&(t=oa(e[o]))&&(a&&(a+=" "),a+=t);return a};function Ao(e,...t){let a,o,l,s=c;function c(u){let m=t.reduce((R,b)=>b(R),e());return a=So(m),o=a.cache.get,l=a.cache.set,s=r,r(u)}function r(u){let m=o(u);if(m)return m;let R=Ro(u,a);return l(u,R),R}return function(){return s(To.apply(null,arguments))}}var L=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},ia=/^\[(?:([a-z-]+):)?(.+)\]$/ca,Io=/^\d+\/\d+$/,Mo=new Set(["px","full","screen"]),Uo=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Eo=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|ca|ca|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Bo=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,zo=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,_o=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Se=e=>qe(e)||Mo.has(e)||Io.test(e),Me=e=>Je(e,"length",Vo),qe=e=>!!e&&!Number.isNaN(Number(e)),It=e=>Je(e,"number",qe),at=e=>!!e&&Number.isInteger(Number(e)),Lo=e=>e.endsWith("%")&&qe(e.slice(0,-1)),v=e=>ia.test(e),Ue=e=>Uo.test(e),Fo=new Set(["length","size","percentage"]),jo=e=>Je(e,Fo,ra),Ho=e=>Je(e,"position",ra),Oo=new Set(["image","url"]),Go=e=>Je(e,Oo,Ko),Wo=e=>Je(e,"",$o),ot=()=>!0,Je=(e,t,a)=>{let o=ia.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):a(o[2]):!1},Vo=e=>Eo.test(e)&&!Bo.test(e),ra=()=>!1,$o=e=>zo.test(e),Ko=e=>_o.test(e);var qo=()=>{let e=L("colors"),t=L("spacing"),a=L("blur"),o=L("brightness"),l=L("borderColor"),s=L("borderRadius"),c=L("borderSpacing"),r=L("borderWidth"),u=L("contrast"),m=L("grayscale"),R=L("hueRotate"),b=L("invert"),N=L("gap"),D=L("gradientColorStops"),_=L("gradientColorStopPositions"),k=L("inset"),x=L("margin"),S=L("opacity"),I=L("padding"),C=L("saturate"),z=L("scale"),oe=L("sepia"),K=L("skew"),ee=L("space"),W=L("translate"),q=()=>["auto","contain","none"],X=()=>["auto","hidden","clip","visible","scroll"],ie=()=>["auto",v,t],U=()=>[v,t],ke=()=>["",Se,Me],d=()=>["auto",qe,v],E=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],T=()=>["solid","dashed","dotted","double","none"],p=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],A=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",v],se=()=>["auto","avoid","all","avoid-page","page","left","right","column"],O=()=>[qe,v];return{cacheSize:500,separator:":",theme:{colors:[ot],spacing:[Se,Me],blur:["none","",Ue,v],brightness:O(),borderColor:[e],borderRadius:["none","","full",Ue,v],borderSpacing:U(),borderWidth:ke(),contrast:O(),grayscale:H(),hueRotate:O(),invert:H(),gap:U(),gradientColorStops:[e],gradientColorStopPositions:[Lo,Me],inset:ie(),margin:ie(),opacity:O(),padding:U(),saturate:O(),scale:O(),sepia:H(),skew:O(),space:U(),translate:U()},classGroups:{aspect:[{aspect:["auto","square","video",v]}],container:["container"],columns:[{columns:[Ue]}],"break-after":[{"break-after":se()}],"break-before":[{"break-before":se()}],"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:[...E(),v]}],overflow:[{overflow:X()}],"overflow-x":[{"overflow-x":X()}],"overflow-ca":[{"overflow-ca":X()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-ca":[{"overscroll-ca":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[k]}],"inset-x":[{"inset-x":[k]}],"inset-ca":[{"inset-ca":[k]}],start:[{start:[k]}],end:[{end:[k]}],top:[{top:[k]}],right:[{right:[k]}],bottom:[{bottom:[k]}],left:[{left:[k]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",at,v]}],basis:[{basis:ie()}],"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:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",at,v]}],"grid-cols":[{"grid-cols":[ot]}],"col-start-end":[{col:["auto",{span:["full",at,v]},v]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[ot]}],"row-start-end":[{row:["auto",{span:[at,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:[N]}],"gap-x":[{"gap-x":[N]}],"gap-ca":[{"gap-ca":[N]}],"justify-content":[{justify:["normal",...A()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...A(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...A(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],ca:[{ca:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-ca":[{"space-ca":[ee]}],"space-ca-reverse":["space-ca-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:[Ue]},Ue]}],ca:[{ca:[v,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-ca":[{"min-ca":[v,t,"min","max","fit","svh","lvh","dvh"]}],"max-ca":[{"max-ca":[v,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[v,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ue,Me]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",It]}],"font-family":[{font:[ot]}],"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",qe,It]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Se,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":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...T(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Se,Me]}],"underline-offset":[{"underline-offset":["auto",Se,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:U()}],"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":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...E(),Ho]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","ca","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",jo]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Go]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[D]}],"gradient-via":[{via:[D]}],"gradient-to":[{to:[D]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[r]}],"border-w-x":[{"border-x":[r]}],"border-w-ca":[{"border-ca":[r]}],"border-w-s":[{"border-s":[r]}],"border-w-e":[{"border-e":[r]}],"border-w-t":[{"border-t":[r]}],"border-w-r":[{"border-r":[r]}],"border-w-b":[{"border-b":[r]}],"border-w-l":[{"border-l":[r]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...T(),"hidden"]}],"divide-x":[{"divide-x":[r]}],"divide-x-reverse":["divide-x-reverse"],"divide-ca":[{"divide-ca":[r]}],"divide-ca-reverse":["divide-ca-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:T()}],"border-color":[{border:[l]}],"border-color-x":[{"border-x":[l]}],"border-color-ca":[{"border-ca":[l]}],"border-color-s":[{"border-s":[l]}],"border-color-e":[{"border-e":[l]}],"border-color-t":[{"border-t":[l]}],"border-color-r":[{"border-r":[l]}],"border-color-b":[{"border-b":[l]}],"border-color-l":[{"border-l":[l]}],"divide-color":[{divide:[l]}],"outline-style":[{outline:["",...T()]}],"outline-offset":[{"outline-offset":[Se,v]}],"outline-w":[{outline:[Se,Me]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ke()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Se,Me]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ue,Wo]}],"shadow-color":[{shadow:[ot]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...p(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":p()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",Ue,v]}],grayscale:[{grayscale:[m]}],"hue-rotate":[{"hue-rotate":[R]}],invert:[{invert:[b]}],saturate:[{saturate:[C]}],sepia:[{sepia:[oe]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[m]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[R]}],"backdrop-invert":[{"backdrop-invert":[b]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[C]}],"backdrop-sepia":[{"backdrop-sepia":[oe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[c]}],"border-spacing-x":[{"border-spacing-x":[c]}],"border-spacing-ca":[{"border-spacing-ca":[c]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",v]}],duration:[{duration:O()}],ease:[{ease:["linear","in","out","in-out",v]}],delay:[{delay:O()}],animate:[{animate:["none","spin","ping","pulse","bounce",v]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[z]}],"scale-x":[{"scale-x":[z]}],"scale-ca":[{"scale-ca":[z]}],rotate:[{rotate:[at,v]}],"translate-x":[{"translate-x":[W]}],"translate-ca":[{"translate-ca":[W]}],"skew-x":[{"skew-x":[K]}],"skew-ca":[{"skew-ca":[K]}],"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","ca","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":U()}],"scroll-mx":[{"scroll-mx":U()}],"scroll-my":[{"scroll-my":U()}],"scroll-ms":[{"scroll-ms":U()}],"scroll-me":[{"scroll-me":U()}],"scroll-mt":[{"scroll-mt":U()}],"scroll-mr":[{"scroll-mr":U()}],"scroll-mb":[{"scroll-mb":U()}],"scroll-ml":[{"scroll-ml":U()}],"scroll-p":[{"scroll-p":U()}],"scroll-px":[{"scroll-px":U()}],"scroll-py":[{"scroll-py":U()}],"scroll-ps":[{"scroll-ps":U()}],"scroll-ca":[{"scroll-ca":U()}],"scroll-pt":[{"scroll-pt":U()}],"scroll-pr":[{"scroll-pr":U()}],"scroll-pb":[{"scroll-pb":U()}],"scroll-pl":[{"scroll-pl":U()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","ca","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-ca":[{"touch-pan":["ca","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:[Se,Me,It]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-ca"],overscroll:["overscroll-x","overscroll-ca"],inset:["inset-x","inset-ca","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-ca":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-ca"],p:["px","py","ps","ca","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","ca"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-ca"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-ca":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-ca":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-ca","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-ca","touch-pz"],"touch-x":["touch"],"touch-ca":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var sa=Ao(qo);function n(...e){return sa((0,na.clsx)(e))}var xt=J(require("react")),jt=J(require("next/link"));var la=require("class-variance-authority");var ca=require("react/jsx-runtime"),Jo=(0,la.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 ce({className:e,variant:t,...a}){return(0,ca.jsx)("div",{className:n(Jo({variant:t}),e),...a})}var da=require("@radix-ui/react-slot"),ma=J(require("react")),Qo=(0,la.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:"ca-10 px-4 py-2",icon:"ca-10 w-10",lg:"ca-11 rounded px-8",sm:"ca-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"}}}),P=ma.forwardRef(({asChild:e=!1,className:t,size:a,variant:o,...l},s)=>(0,ca.jsx)(e?da.Slot:"button",{className:n(Qo({className:t,size:a,variant:o})),ref:s,...l}));P.displayName="Button";var ga=J(require("react"));var it=ga.forwardRef(({className:e,type:t,...a},o)=>(0,ca.jsx)("input",{type:t,className:n("flex ca-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}));it.displayName="Input";var Et=J(require("react")),me=J(require("@radix-ui/react-scroll-area"));var ve=Et.forwardRef(({className:e,children:t,...a},o)=>(0,ca.jsxs)(me.Root,{ref:o,className:n("relative overflow-hidden",e),...a,children:[(0,ca.jsx)(me.Viewport,{className:"ca-full w-full rounded-[inherit]",children:t}),(0,ca.jsx)(ha,{}),(0,ca.jsx)(me.Corner,{})]}));ve.displayName=me.Root.displayName;var ha=Et.forwardRef(({className:e,orientation:t="vertical",...a},o)=>(0,ca.jsx)(me.ScrollAreaScrollbar,{ref:o,orientation:t,className:n("flex touch-none select-none transition-colors",t==="vertical"&&"ca-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"ca-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,ca.jsx)(me.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ha.displayName=me.ScrollAreaScrollbar.displayName;var rt=J(require("react")),V=J(require("@radix-ui/react-dialog"));var va=V.Root;var Xo=V.Portal;var ya=rt.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(V.Overlay,{ref:a,className:n("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}));ya.displayName=V.Overlay.displayName;var Bt=rt.forwardRef(({className:e,children:t,...a},o)=>(0,ca.jsxs)(Xo,{children:[(0,ca.jsx)(ya,{}),(0,ca.jsxs)(V.Content,{ref:o,className:n("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-ca-[-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,ca.jsxs)(V.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,ca.jsx)(Za.X,{className:"ca-4 w-4"}),(0,ca.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Bt.displayName=V.Content.displayName;var zt=({className:e,...t})=>(0,ca.jsx)("div",{className:n("flex flex-col space-ca-1.5 text-center sm:text-left",e),...t});zt.displayName="DialogHeader";var Yo=({className:e,...t})=>(0,ca.jsx)("div",{className:n("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yo.displayName="DialogFooter";var _t=rt.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(V.Title,{ref:a,className:n("text-lg font-semibold leading-none tracking-tight",e),...t}));_t.displayName=V.Title.displayName;var Zo=rt.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(V.Description,{ref:a,className:n("text-sm text-muted-foreground",e),...t}));Zo.displayName=V.Description.displayName;var st=J(require("@radix-ui/react-checkbox")),wa=J(require("react")),Lt=wa.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(st.Root,{className:n("peer ca-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,ca.jsx)(st.Indicator,{className:n("flex items-center justify-center text-current"),children:(0,ca.jsx)(Za.Check,{className:"ca-4 w-4"})})}));Lt.displayName=st.Root.displayName;var ye=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var Na=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,ca.jsx)(Za.Palette,{className:"ca-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,ca.jsx)(Za.Code,{className:"ca-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,ca.jsx)(Za.TrendingUp,{className:"ca-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,ca.jsx)(Za.DollarSign,{className:"ca-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,ca.jsx)(Za.Users,{className:"ca-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,ca.jsx)(Za.Wrench,{className:"ca-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,ca.jsx)(Za.Scale,{className:"ca-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,ca.jsx)(Za.Package,{className:"ca-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,ca.jsx)(Za.Zap,{className:"ca-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,ca.jsx)(Za.Building2,{className:"ca-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],ht=[{id:"1",name:"E-commerce Platform",description:"Main customer-facing e-commerce application",isSelected:!0},{id:"2",name:"Admin Dashboard",description:"Internal administration and analytics dashboard",isSelected:!1},{id:"3",name:"Mobile App",description:"Native mobile application for iOS and Android",isSelected:!1}];var Ft=[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0},{id:"2",name:"Dashboard Features",color:"bg-green-500",description:"Build comprehensive dashboard functionality",confidence:"medium",phase:1,startDate:new Date("2024-02-01"),endDate:new Date("2024-03-15"),progress:30,isSelected:!0},{id:"3",name:"Mobile Optimization",color:"bg-purple-500",description:"Optimize application for mobile devices",confidence:"low",phase:1,startDate:new Date("2024-03-01"),endDate:new Date("2024-04-15"),progress:10,isSelected:!0},{id:"4",name:"Performance Improvements",color:"bg-orange-500",description:"Enhance application performance and speed",confidence:"high",phase:3,startDate:new Date("2024-01-15"),endDate:new Date("2024-02-28"),progress:90,isSelected:!0}],gt=[{id:"backlog",name:"Backlog",description:"Tasks not yet assigned to a sprint",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!1},{id:"all-tasks",name:"All Tasks",description:"View all tasks across all sprints",startDate:new Date("2024-01-01"),endDate:new Date("2024-12-31"),isActive:!1,isSelected:!0},{id:"1",name:"Sprint 1",description:"Initial development phase",startDate:new Date("2024-01-01"),endDate:new Date("2024-01-14"),isActive:!1,isSelected:!1},{id:"2",name:"Sprint 2",description:"Feature development",startDate:new Date("2024-01-15"),endDate:new Date("2024-01-28"),isActive:!0,isSelected:!1}],vt=[{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")}],ei=[...vt,{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")}],ti=[...ht,{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}],ft={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:[]},Ca={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:vt.filter(e=>e.epicId==="1")};var Oi={empty:{initialProjects:ft.projects,initialEpics:ft.epics,initialSprints:ft.sprints,initialTasks:ft.tasks},default:{initialProjects:ht,initialEpics:Ft,initialSprints:gt,initialTasks:vt},highDensity:{initialProjects:ht,initialEpics:Ft,initialSprints:gt,initialTasks:ei},singleEpic:{initialProjects:ht,initialEpics:Ca.epics,initialSprints:gt,initialTasks:Ca.tasks},multipleProjects:{initialProjects:ti,initialEpics:Ft,initialSprints:gt,initialTasks:vt}},bt=[{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(ye),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(ye),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(ye),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(ye),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(ye),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(ye),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(ye),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(ye),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(ye),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(ye),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Gi=[{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:bt.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:bt.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:bt.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 Wi=bt.filter(e=>e.type==="digital");function ka(e,t){let[a,o]=(0,Ke.useState)(()=>{if(typeof window>"u")return t;try{let s=window.localStorage.getItem(e);return s?JSON.parse(s):t}catch{return t}}),l=s=>{try{o(s),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(s))}catch{}};return(0,Ke.useEffect)(()=>{l(a)},[]),[a,l]}function Ht({items:e,isOpen:t,isMobile:a=!1,onClose:o,currentBusinessUnit:l=Na[0],onBusinessUnitChange:s,onSearch:c,className:r,logo:u="/headerlogo.png",appName:m="Nuvia",tagline:R="Collaboration Platform"}){let[b,N]=xt.useState({}),[D,_]=ka("sidebar-favorites",{}),[k,x]=xt.useState(null),[S,I]=xt.useState(""),C=d=>{N(E=>({...E,[d]:!E[d]}))},z=d=>{s?.(d)},oe=()=>{S.trim()&&c?.(S.trim())},K=d=>{d.key==="Enter"&&(d.preventDefault(),oe())},ee=(d,E)=>{let T=D[d]||[],p=T.includes(E)?T.filter(A=>A!==E):T.concat(E);_({...D,[d]:p})},W=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let E=D[d.id]||[],T=d.items.filter(A=>E.includes(A.id)),p=d.items.filter(A=>!E.includes(A.id));return[...T,...p].slice(0,d.maxItems)},q=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,X=e,ie=d=>{let E=q(d),T=W(d),p=(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,ca.jsx)("span",{children:d.title})]}),d.badge&&(0,ca.jsx)(ce,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,ca.jsx)(Za.ChevronDown,{className:n("ml-2 ca-4 w-4 transition-transform",b[d.title]?"rotate-180":"")})]}),A=n("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,ca.jsx)(jt.default,{href:d.url,className:A,onClick:a?o:void 0,children:p}):(0,ca.jsx)("button",{className:A,onClick:()=>d.items&&C(d.title),children:p})},U=()=>{let d=e.find(T=>T.id===k);if(!d||!d.items||!d.maxItems)return null;let E=D[d.id]||[];return(0,ca.jsx)(va,{open:!!k,onOpenChange:T=>!T&&x(null),children:(0,ca.jsxs)(Bt,{className:"sm:max-w-md",children:[(0,ca.jsxs)(zt,{children:[(0,ca.jsxs)(_t,{children:["Manage ",d.title," Favorites"]}),(0,ca.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,ca.jsx)(ve,{className:"max-ca-96 pr-4",children:(0,ca.jsx)("div",{className:"space-ca-4",children:d.items.map(T=>(0,ca.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ca.jsx)(Lt,{id:T.id,checked:E.includes(T.id),onCheckedChange:()=>ee(d.id,T.id),disabled:!E.includes(T.id)&&E.length>=(d.maxItems||0)}),(0,ca.jsxs)("label",{htmlFor:T.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:[T.title,T.badge&&(0,ca.jsx)(ce,{variant:"outline",className:"text-xs",children:T.badge})]})]},T.id))})})]})})},ke=(0,ca.jsxs)("div",{className:"flex ca-full flex-col bg-background",children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,ca.jsxs)("div",{className:"flex items-center gap-3",children:[(0,ca.jsx)("div",{className:"flex ca-14 w-14 items-center justify-center",children:(0,ca.jsx)("img",{src:u,alt:"Header Logo",className:"ca-14 w-14 object-contain"})}),(0,ca.jsxs)("div",{children:[(0,ca.jsx)("h2",{className:"font-semibold",children:m}),(0,ca.jsx)("p",{className:"text-xs text-muted-foreground",children:R})]})]}),a&&(0,ca.jsx)(P,{variant:"ghost",size:"icon",onClick:o,children:(0,ca.jsx)(Za.X,{className:"ca-5 w-5"})})]}),(0,ca.jsx)("div",{className:"px-3 py-2",children:(0,ca.jsxs)("div",{className:"relative",children:[(0,ca.jsx)(Za.Search,{className:"absolute left-3 top-3 ca-4 w-4 text-muted-foreground"}),(0,ca.jsx)(it,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:S,onChange:d=>I(d.target.value),onKeyPress:K})]})}),(0,ca.jsx)(ve,{className:"flex-1 px-3 py-2",children:(0,ca.jsx)("div",{className:"space-ca-1",children:X.map(d=>(0,ca.jsxs)("div",{className:"mb-1",children:[ie(d),d.items&&b[d.title]&&(0,ca.jsxs)("div",{className:"mt-1 ml-6 space-ca-1 border-l pl-3",children:[W(d).map(E=>(0,ca.jsxs)(jt.default,{href:E.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?o:void 0,children:[E.title,E.badge&&(0,ca.jsx)(ce,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:E.badge})]},E.id)),q(d)&&d.items&&d.items.length>W(d).length&&(0,ca.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-W(d).length," more available"]})]})]},d.id))})}),(0,ca.jsx)("div",{className:"p-3",children:(0,ca.jsx)("div",{className:"space-ca-1",children:(0,ca.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,ca.jsx)(Za.Settings,{className:"ca-5 w-5"}),(0,ca.jsx)("span",{children:"Settings"})]})})}),(0,ca.jsx)(U,{})]});return a?(0,ca.jsx)("div",{className:n("fixed inset-ca-0 left-0 z-50 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:ke}):(0,ca.jsx)("div",{className:n("fixed inset-ca-0 left-0 z-30 w-64 transform bg-background transition-transform duration-300 ease-in-out",t?"translate-x-0":"-translate-x-full",r),children:ke})}var wt=J(require("react")),Pe=J(require("@radix-ui/react-avatar"));var Fe=wt.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(Pe.Root,{ref:a,className:n("relative flex ca-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Fe.displayName=Pe.Root.displayName;var Ot=wt.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(Pe.Image,{ref:a,className:n("aspect-square ca-full w-full",e),...t}));Ot.displayName=Pe.Image.displayName;var je=wt.forwardRef(({className:e,...t},a)=>(0,ca.jsx)(Pe.Fallback,{ref:a,className:n("flex ca-full w-full items-center justify-center rounded-full bg-muted",e),...t}));je.displayName=Pe.Fallback.displayName;var Da=J(require("react")),he=J(require("@radix-ui/react-tooltip"));var Nt=he.Provider,kt=he.Root,Dt=he.Trigger,nt=Da.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ca.jsx)(he.Portal,{children:(0,ca.jsx)(he.Content,{ref:o,sideOffset:t,className:n("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})}));nt.displayName=he.Content.displayName;var Sa=require("next-themes");function Pa(){let{setTheme:e,theme:t}=(0,Sa.useTheme)();return(0,ca.jsx)(Nt,{children:(0,ca.jsxs)(kt,{children:[(0,ca.jsx)(Dt,{asChild:!0,children:(0,ca.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,ca.jsx)(Za.Sun,{className:"ca-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,ca.jsx)(Za.Moon,{className:"absolute ca-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,ca.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,ca.jsx)(nt,{children:"Toggle theme"})]})})}function Ra({notifications:e,open:t,onClose:a,onNotificationRemove:o,onRemoveAll:l,className:s}){let c=e.filter(m=>!m.read),r=c.length,u=m=>{switch(m){case"info":return(0,ca.jsx)(Za.Info,{className:"ca-5 w-5 text-blue-500"});case"success":return(0,ca.jsx)(Za.Check,{className:"ca-5 w-5 text-green-500"});case"warning":return(0,ca.jsx)(Za.AlertTriangle,{className:"ca-5 w-5 text-amber-500"});case"error":return(0,ca.jsx)(Za.AlertTriangle,{className:"ca-5 w-5 text-red-500"})}};return(0,ca.jsx)(Tt.AnimatePresence,{children:t&&(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsx)(Tt.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,ca.jsx)(Tt.motion.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:20,stiffness:300},className:n("fixed inset-ca-0 right-0 z-50 w-full max-w-sm border-l bg-background shadow-lg md:w-96",s),children:(0,ca.jsxs)("div",{className:"flex ca-full flex-col",children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between border-b p-4",children:[(0,ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ca.jsx)(Za.Bell,{className:"ca-5 w-5"}),(0,ca.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),r>0&&(0,ca.jsxs)(ce,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[r," new"]})]}),(0,ca.jsxs)(P,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,ca.jsx)(Za.X,{className:"ca-5 w-5"}),(0,ca.jsx)("span",{className:"sr-only",children:"Close"})]})]}),r>0&&(0,ca.jsxs)("div",{className:"flex items-center justify-between border-b p-2",children:[(0,ca.jsxs)("span",{className:"text-sm text-muted-foreground",children:[r," unread notification",r!==1?"s":""]}),(0,ca.jsx)(P,{variant:"ghost",size:"sm",onClick:l,className:"text-sm",children:"Dismiss all"})]}),c.length>0?(0,ca.jsx)(ve,{className:"flex-1",children:(0,ca.jsx)("div",{className:"divide-ca",children:c.map(m=>(0,ca.jsxs)("div",{className:n("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,ca.jsx)("div",{className:"flex ca-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:u(m.type)}),(0,ca.jsxs)("div",{className:"flex-1 space-ca-1",children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ca.jsx)("p",{className:"font-medium",children:m.title}),(0,ca.jsxs)("div",{className:"flex items-center gap-2",children:[(0,ca.jsx)("p",{className:"text-xs text-muted-foreground",children:m.time}),(0,ca.jsx)(P,{variant:"ghost",size:"sm",className:"ca-6 w-6 p-0",onClick:()=>o?.(m.id),title:"Dismiss",children:(0,ca.jsx)(Za.Check,{className:"ca-3 w-3"})})]})]}),(0,ca.jsx)("p",{className:"text-sm text-muted-foreground",children:m.description}),m.actionLabel&&(0,ca.jsxs)(P,{variant:"link",size:"sm",className:"ca-auto p-0 text-sm",onClick:m.onAction,children:[m.actionLabel,(0,ca.jsx)(Za.ChevronRight,{className:"ml-1 ca-3 w-3"})]})]})]},m.id))})}):(0,ca.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,ca.jsx)("div",{className:"flex ca-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,ca.jsx)(Za.Bell,{className:"ca-8 w-8 text-muted-foreground"})}),(0,ca.jsx)("h3",{className:"mt-4 text-lg font-medium",children:"No notifications"}),(0,ca.jsx)("p",{className:"mt-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var He=J(require("@radix-ui/react-tabs"));function Ta({className:e,...t}){return(0,ca.jsx)(He.Root,{"data-slot":"tabs",className:n("flex flex-col gap-2",e),...t})}function Aa({className:e,...t}){return(0,ca.jsx)(He.List,{"data-slot":"tabs-list",className:n("bg-muted text-muted-foreground inline-flex ca-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Ia({className:e,...t}){return(0,ca.jsx)(He.Trigger,{"data-slot":"tabs-trigger",className:n("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 ca-[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 Re=J(require("react")),w=J(require("@radix-ui/react-dropdown-menu")),Qe=require("@radix-ui/react-icons");var Ma=w.Root,Ua=w.Trigger;var ai=Re.forwardRef(({className:e,inset:t,children:a,...o},l)=>(0,$.jsxs)(w.SubTrigger,{ref:l,className:n("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,$.jsx)(Qe.ChevronRightIcon,{className:"ml-auto"})]}));ai.displayName=w.SubTrigger.displayName;var oi=Re.forwardRef(({className:e,...t},a)=>(0,$.jsx)(w.SubContent,{ref:a,className:n("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}));oi.displayName=w.SubContent.displayName;var Wt=Re.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,$.jsx)(w.Portal,{children:(0,$.jsx)(w.Content,{ref:o,sideOffset:t,className:n("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})}));Wt.displayName=w.Content.displayName;var Vt=Re.forwardRef(({className:e,inset:t,...a},o)=>(0,$.jsx)(w.Item,{ref:o,className:n("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}));Vt.displayName=w.Item.displayName;var ii=Re.forwardRef(({className:e,children:t,checked:a,...o},l)=>(0,$.jsxs)(w.CheckboxItem,{ref:l,className:n("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,$.jsx)("span",{className:"absolute left-2 flex ca-3.5 w-3.5 items-center justify-center",children:(0,$.jsx)(w.ItemIndicator,{children:(0,$.jsx)(Qe.CheckIcon,{className:"ca-4 w-4"})})}),t]}));ii.displayName=w.CheckboxItem.displayName;var ri=Re.forwardRef(({className:e,children:t,...a},o)=>(0,$.jsxs)(w.RadioItem,{ref:o,className:n("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,$.jsx)("span",{className:"absolute left-2 flex ca-3.5 w-3.5 items-center justify-center",children:(0,$.jsx)(w.ItemIndicator,{children:(0,$.jsx)(Qe.DotFilledIcon,{className:"ca-4 w-4 fill-current"})})}),t]}));ri.displayName=w.RadioItem.displayName;var si=Re.forwardRef(({className:e,inset:t,...a},o)=>(0,$.jsx)(w.Label,{ref:o,className:n("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));si.displayName=w.Label.displayName;var ni=Re.forwardRef(({className:e,...t},a)=>(0,$.jsx)(w.Separator,{ref:a,className:n("-mx-1 my-1 ca-px bg-muted",e),...t}));ni.displayName=w.Separator.displayName;var li=({className:e,...t})=>(0,$.jsx)("span",{className:n("ml-auto text-xs tracking-widest opacity-60",e),...t});li.displayName="DropdownMenuShortcut";function Ba({activeTab:e,onTabChange:t,tabOptions:a,className:o="",maxWidth:l="700px",gridCols:s=6}){let c=a.find(r=>r.value===e);return(0,ca.jsxs)($t.motion.div,{className:`flex-1 flex justify-center ${o}`,initial:{opacity:0,ca:-20},animate:{opacity:1,ca:0},transition:{duration:.3,ease:"easeOut"},children:[(0,ca.jsx)("div",{className:"hidden md:block",children:(0,ca.jsx)(Ta,{value:e,onValueChange:t,children:(0,ca.jsx)(Aa,{className:"grid w-full rounded-2xl p-0 ca-10",style:{maxWidth:l,gridTemplateColumns:`repeat(${Math.min(s,a.length)}, minmax(0, 1fr))`},children:a.map(r=>(0,ca.jsx)($t.motion.div,{whileHover:{scale:1.1},whileTap:{scale:.98},transition:{type:"spring",stiffness:400,damping:17},className:"flex-1 px-2",children:(0,ca.jsx)(Ia,{value:r.value,className:"w-full ca-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:r.label})},r.value))})})}),(0,ca.jsx)("div",{className:"md:hidden",children:(0,ca.jsxs)(Ma,{children:[(0,ca.jsx)(Ua,{asChild:!0,children:(0,ca.jsxs)(P,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[c?.label||"Select",(0,ca.jsx)(Za.ChevronDown,{className:"ca-4 w-4 ml-2"})]})}),(0,ca.jsx)(Wt,{align:"center",className:"w-[180px]",children:a.map(r=>(0,ca.jsx)(Vt,{onClick:()=>t?.(r.value),className:`cursor-pointer ${e===r.value?"bg-accent":""}`,children:r.label},r.value))})]})})]})}function za({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:o,sidebarOpen:l=!0,className:s,activeTab:c="assistant",onTabChange:r,showTabs:u=!0,tabOptions:m=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:R,actionIcon:b=(0,ca.jsx)(Za.Bot,{className:"mr-2 ca-4 w-4"}),actionText:N="Action",onNotificationRemove:D,onRemoveAll:_,logo:k="/headerlogo.png",appName:x="Nuvia",tagline:S="Collaboration Platform"}){let[I,C]=(0,Ke.useState)(!1),[z,oe]=(0,Ke.useState)(t),K=z.filter(q=>!q.read).length,ee=q=>{oe(X=>X.filter(ie=>ie.id!==q)),D?.(q)},W=()=>{oe(q=>q.filter(X=>X.read)),_?.()};return(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsxs)("header",{className:`sticky top-0 z-10 flex ca-16 items-center gap-3 px-4 backdrop-blur ${s||""}`,children:[(0,ca.jsx)(P,{variant:"ghost",size:"icon",className:"md:hidden",onClick:o,children:(0,ca.jsx)(Za.Menu,{className:"ca-5 w-5"})}),(0,ca.jsx)(P,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,ca.jsx)(Za.PanelLeft,{className:"ca-5 w-5"})}),!l&&(0,ca.jsxs)(Tt.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,ca.jsx)("div",{className:"flex ca-10 w-10 items-center justify-center",children:(0,ca.jsx)("img",{src:k,alt:"Logo",className:"ca-10 w-10 object-contain"})}),(0,ca.jsxs)("div",{children:[(0,ca.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,ca.jsx)("p",{className:"text-xs text-muted-foreground",children:S})]})]}),(0,ca.jsxs)("div",{className:"flex flex-1 items-center",children:[u&&(0,ca.jsx)(Ba,{activeTab:c,onTabChange:r,tabOptions:m}),(0,ca.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,ca.jsx)(Tt.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,ca.jsx)(Tt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ca.jsxs)(P,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:R,children:[b,N]})})}),(0,ca.jsx)(Pa,{}),(0,ca.jsx)(Nt,{children:(0,ca.jsxs)(kt,{children:[(0,ca.jsx)(Dt,{asChild:!0,children:(0,ca.jsx)(Tt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ca.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>C(!0),children:[(0,ca.jsx)(Tt.motion.div,{animate:K>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:K>0?1/0:0,repeatDelay:3},children:(0,ca.jsx)(Za.Bell,{className:"ca-5 w-5"})}),K>0&&(0,ca.jsx)(Tt.motion.span,{className:"absolute -right-1 -top-1 flex ca-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:K})]})})}),(0,ca.jsx)(nt,{children:"Notifications"})]})}),(0,ca.jsx)(Tt.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,ca.jsxs)(Fe,{className:"ca-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,ca.jsx)(Ot,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,ca.jsx)(je,{})]})})]})]})]}),(0,ca.jsx)(Ra,{notifications:z,open:I,onClose:()=>C(!1),onNotificationRemove:ee,onRemoveAll:W})]})}var _a=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,ca.jsx)(Za.User,{className:"ca-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Fa({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:o=[],currentBusinessUnit:l=_a[0],onBusinessUnitChange:s,onSearch:c,businessUnits:r=_a,activeTab:u,onTabChange:m,showTabs:R=!1,onActionClick:b,actionIcon:N,actionText:D="Action",onNotificationRemove:_,onRemoveAll:k,logo:x="/headerlogo.png",appName:S="Nuvia",tagline:I="Collaboration Platform",sidebarInitiallyClosed:C=!1}){let[z,oe]=(0,Ke.useState)(!C),[K,ee]=(0,Ke.useState)(!1),[W,q]=(0,Ke.useState)(l),X=ie=>{q(ie),s?.(ie)};return(0,ca.jsxs)("div",{className:"flex ca-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[K&&(0,ca.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>ee(!1)}),(0,ca.jsx)("div",{className:"md:hidden",children:(0,ca.jsx)(Ht,{items:e,isOpen:K,isMobile:!0,onClose:()=>ee(!1),currentBusinessUnit:W,onBusinessUnitChange:X,onSearch:c,logo:x,appName:S,tagline:I})}),(0,ca.jsx)("div",{className:"hidden md:block",children:(0,ca.jsx)(Ht,{items:e,isOpen:z,isMobile:!1,currentBusinessUnit:W,onBusinessUnitChange:X,onSearch:c,logo:x,appName:S,tagline:I})}),(0,ca.jsxs)("div",{className:n("min-ca-screen fixed w-full transition-all duration-300 ease-in-out",z?"md:pl-64":"md:pl-0"),children:[(0,ca.jsx)(za,{title:a,notifications:o,onToggleSidebar:()=>oe(!z),onToggleMobileMenu:()=>ee(!0),sidebarOpen:z,activeTab:u,onTabChange:m,showTabs:R,onActionClick:b,actionIcon:N,actionText:D,onNotificationRemove:_,onRemoveAll:k,logo:x,appName:S,tagline:I}),(0,ca.jsx)("main",{className:"flex-1 p-0 flex flex-col ca-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var Oe=J(require("react"));var ge=Oe.forwardRef(({className:e,...t},a)=>(0,ca.jsx)("div",{ref:a,className:n("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ge.displayName="Card";var Te=Oe.forwardRef(({className:e,...t},a)=>(0,ca.jsx)("div",{ref:a,className:n("flex flex-col space-ca-1.5 p-6",e),...t}));Te.displayName="CardHeader";var Ae=Oe.forwardRef(({className:e,...t},a)=>(0,ca.jsx)("div",{ref:a,className:n("font-semibold leading-none tracking-tight",e),...t}));Ae.displayName="CardTitle";var qt=Oe.forwardRef(({className:e,...t},a)=>(0,ca.jsx)("div",{ref:a,className:n("text-sm text-muted-foreground",e),...t}));qt.displayName="CardDescription";var we=Oe.forwardRef(({className:e,...t},a)=>(0,ca.jsx)("div",{ref:a,className:n("p-6 pt-0",e),...t}));we.displayName="CardContent";var ct=Oe.forwardRef(({className:e,...t},a)=>(0,ca.jsx)("div",{ref:a,className:n("flex items-center p-6 pt-0",e),...t}));ct.displayName="CardFooter";function ja({sessions:e,currentSession:t,teams:a,onNewChat:o,onSessionSelect:l,onSessionEdit:s,onSessionDelete:c,className:r}){return(0,ca.jsx)("div",{className:`space-ca-4 ca-full ${r||""}`,children:(0,ca.jsxs)(ge,{className:"shadow-sm ca-full",children:[(0,ca.jsx)("div",{className:"p-4 border-b",children:(0,ca.jsxs)("div",{className:"flex items-center justify-between",children:[(0,ca.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,ca.jsx)(Za.Clock,{className:"ca-4 w-4"}),"Recent Chats"]}),(0,ca.jsxs)(P,{onClick:o,size:"sm",className:"gap-1 ca-7 px-2 rounded-lg shadow-sm",children:[(0,ca.jsx)(Za.Plus,{className:"ca-3 w-3"}),"New"]})]})}),(0,ca.jsx)(ve,{className:"ca-[600px]",children:(0,ca.jsx)("div",{className:"p-2",children:e.length===0?(0,ca.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(u=>(0,ca.jsx)("div",{className:n("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===u.id&&"bg-muted border"),onClick:()=>l(u),children:(0,ca.jsx)("div",{className:"flex items-start gap-3",children:(0,ca.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,ca.jsx)("h4",{className:"font-medium text-sm truncate",children:u.title}),(0,ca.jsx)("div",{className:"flex items-center gap-1",children:(0,ca.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[s&&(0,ca.jsx)(P,{variant:"ghost",size:"icon",className:"ca-5 w-5 rounded",onClick:m=>{m.stopPropagation(),s(u.id)},children:(0,ca.jsx)(Za.Edit3,{className:"ca-3 w-3"})}),c&&(0,ca.jsx)(P,{variant:"ghost",size:"icon",className:"ca-5 w-5 rounded text-destructive hover:text-destructive",onClick:m=>{m.stopPropagation(),c(u.id)},children:(0,ca.jsx)(Za.Trash2,{className:"ca-3 w-3"})})]})})]}),(0,ca.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:u.lastMessage})]})})},u.id))})})]})})}var Ha={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"]},We=[{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 Jt(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Oa({capabilities:e,isOpen:t,onToggle:a,onActionSelect:o,onContextChange:l,colorScheme:s=Ha,className:c}){let[r,u]=(0,Ke.useState)([]),[m,R]=(0,Ke.useState)([]),b=r[r.length-1],N=b?.children||e,D=(C,z)=>{switch(C.type){case"category":return s.categories[z%s.categories.length];case"list":return s.lists[z%s.lists.length];case"item":return s.items[z%s.items.length];default:return s.primary}},_=(0,Ke.useMemo)(()=>({path:r,selectedItems:m,filters:{}}),[r,m]);(0,Ke.useEffect)(()=>{l&&l(_)},[_,l]);let k=C=>{C.type==="category"||C.type==="list"?u([...r,C]):C.type==="item"&&R([...m,C])},x=()=>{u(r.slice(0,-1))},S=C=>{u(r.slice(0,C+1))},I=()=>b?.actions?b.actions:[];return t?(0,ca.jsxs)("div",{className:n("w-full",c),children:[(0,ca.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,ca.jsxs)("div",{className:"flex items-center gap-2",children:[r.length>0&&(0,ca.jsx)(Tt.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:n("group p-1 ca-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ca.jsx)(Za.ChevronLeft,{className:n("ca-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,ca.jsx)("h4",{className:"font-medium text-sm",children:b?.name||"Capabilities"})]}),(0,ca.jsx)(Tt.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:n("group p-1 ca-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,ca.jsx)(Za.X,{className:n("ca-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),r.length>0&&(0,ca.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,ca.jsx)(Tt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>u([]),className:n("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ca.jsxs)("span",{className:"relative",children:["Capabilities",(0,ca.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 ca-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),r.map((C,z)=>(0,ca.jsxs)("div",{className:"flex items-center gap-1",children:[(0,ca.jsx)(Za.ChevronRight,{className:"ca-2 w-2"}),(0,ca.jsx)(Tt.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>S(z),className:n("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,ca.jsxs)("span",{className:"relative",children:[C.name,(0,ca.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 ca-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},C.id))]}),(0,ca.jsx)("div",{className:"max-ca-40 overflow-ca-auto",children:(0,ca.jsx)(Tt.AnimatePresence,{mode:"wait",children:(0,ca.jsx)(Tt.motion.div,{initial:{opacity:0,ca:-4},animate:{opacity:1,ca:0},exit:{opacity:0,ca:4},transition:{duration:.2,ease:[.4,0,.2,1]},children:b?.type==="list"&&b.data?(0,ca.jsx)(pi,{data:b.data,onItemSelect:C=>R([...m,C]),colorScheme:s}):(0,ca.jsx)(ci,{capabilities:N,onSelect:k,colorScheme:s})},b?.id||"root")})})]}):(0,ca.jsxs)(P,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,ca.jsx)(Za.Menu,{className:"ca-4 w-4"}),(0,ca.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function ci({capabilities:e,onSelect:t,colorScheme:a}){return(0,ca.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,ca.jsx)(di,{capability:o,onClick:()=>t(o),color:a.categories[l%a.categories.length]},o.id))})}function di({capability:e,onClick:t,selected:a,color:o}){return(0,ca.jsxs)(Tt.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:n("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,ca.jsx)("div",{className:n("w-2 ca-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",o)}),(0,ca.jsxs)("span",{className:"truncate relative",children:[e.name,(0,ca.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 ca-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,ca.jsx)(Za.ChevronRight,{className:n("ca-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,ca.jsx)(ce,{variant:"secondary",className:n("text-xs ca-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function pi({data:e,onItemSelect:t,colorScheme:a}){return(0,ca.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((o,l)=>(0,ca.jsxs)(Tt.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:n("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,ca.jsx)("div",{className:n("w-2 ca-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[l%a.items.length])}),(0,ca.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ca.jsxs)("span",{className:"truncate relative font-medium",children:[o.title,(0,ca.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 ca-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),o.subtitle&&(0,ca.jsx)("div",{className:n("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:o.subtitle})]}),o.value&&(0,ca.jsx)(ce,{variant:"secondary",className:n("text-xs ca-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 Va=require("date-fns");function Ga({taskId:e,polling:t=!0,system:a="payload"}){let[o,l]=(0,Ke.useState)(null),[s,c]=(0,Ke.useState)(!1),[r,u]=(0,Ke.useState)(null),m=async(b=!0)=>{if(e){b&&c(!0);try{let N=await fetch(`/api/tasks/${e}`);if(!N.ok)throw new Error(`Failed to fetch task: ${N.statusText}`);let D=await N.json();l(D)}catch(N){console.error("Error fetching task:",N),u(N instanceof Error?N:new Error("Unknown error occurred"))}finally{b&&c(!1)}}},R=()=>m(!1);return(0,Ke.useEffect)(()=>{e&&m(!0);let b=null;return e&&t&&(b=setInterval(R,5e3)),()=>{b&&clearInterval(b)}},[e,t]),{task:o,loading:s,error:r}}var mi=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"}},ui=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function $a({data:e}){let{id:t,system:a,fetchLatest:o,taskData:l,error:s}=e||{};if(!t)return null;let c=null,r=!0,u=s,m=o!==void 0?o:!0;if(c=l||{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:m,taskData:c,error:u}),m){let{task:D,loading:_,error:k}=Ga({taskId:t,system:a});c=D,r=_,u=k}else r=!1;let R=mi(c?.status||"todo"),b=ui(c?.status||"todo"),N=c?.dateLogged||new Date().toISOString();try{let D=new Date(c?.dateLogged||"");isNaN(D.getTime())||(N=(0,Va.formatDistanceToNow)(D,{addSuffix:!0}))}catch{}return(0,ca.jsxs)(ge,{className:n("w-full max-w-md shadow-md",u&&"border border-destructive"),children:[(0,ca.jsxs)(Te,{className:"pb-2",children:[(0,ca.jsxs)("div",{className:"flex justify-between items-start",children:[(0,ca.jsx)(Ae,{className:"text-lg font-semibold",children:r?"Loading...":c?.name||"Task"}),(0,ca.jsx)(ce,{className:`${R}`,children:b})]}),c?.project&&(0,ca.jsxs)(qt,{className:"text-sm text-gray-500",children:["Project: ",c.project.name]})]}),(0,ca.jsx)(we,{className:"pb-2",children:r?(0,ca.jsx)("div",{className:"animate-pulse ca-4 bg-gray-200 rounded w-3/4 mb-2"}):u?(0,ca.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ca.jsx)("p",{className:"text-sm text-foreground",children:c?.description||"......."})}),(0,ca.jsx)(ct,{className:"pt-2 flex items-center justify-between",children:(0,ca.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ca.jsx)(Za.Clock,{className:"ca-3 w-3 mr-1"}),(0,ca.jsxs)("span",{children:["Created ",N]}),(0,ca.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ca.jsxs)("span",{children:["Task #",t]})]})})]})}function Ja({artefact:e,taskId:t,taskData:a,loading:o=!1,error:l=null}){let s=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},c=s.dateLogged;try{let r=new Date(s.dateLogged);isNaN(r.getTime())||(c=(0,Va.formatDistanceToNow)(r,{addSuffix:!0}))}catch{}return(0,ca.jsxs)(ge,{className:"w-full max-w-md shadow-md",children:[(0,ca.jsx)(Te,{className:"pb-2",children:(0,ca.jsx)("div",{className:"flex justify-between items-start",children:(0,ca.jsx)(Ae,{className:"text-lg font-semibold",children:o?"Loading...":s.name})})}),(0,ca.jsx)(we,{className:"pb-2",children:o?(0,ca.jsx)("div",{className:"animate-pulse ca-4 bg-gray-200 rounded w-3/4 mb-2"}):l?(0,ca.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,ca.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,ca.jsx)(ct,{className:"pt-2 flex items-center justify-between",children:(0,ca.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,ca.jsx)(Za.Clock,{className:"ca-3 w-3 mr-1"}),(0,ca.jsxs)("span",{children:["Created ",c]}),(0,ca.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,ca.jsxs)("span",{children:["Task #",s.id]})]})})]})}function Qa(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Xa({messages:e,input:t,isTyping:a=!1,currentSessionTitle:o,capabilities:l,fileUploads:s,isDragOver:c,enableFileUpload:r,onInputChange:u,onSendMessage:m,onKeyPress:R,onFileUpload:b,onRemoveFile:N,onDragOver:D,className:_}){let k=(0,Ke.useRef)(null),x=(0,Ke.useRef)(null),S=(0,Ke.useRef)(null),[I,C]=(0,Ke.useState)(!1),[z,oe]=(0,Ke.useState)({path:[],selectedItems:[],filters:{}});(0,Ke.useEffect)(()=>{k.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,Ke.useEffect)(()=>{I&&setTimeout(()=>{k.current?.scrollIntoView({behavior:"smooth"})},100)},[I]);let K=()=>Jt(z),ee=()=>{let p=[];return l.forEach(A=>{A.actions&&A.actions.forEach(H=>{p.push({label:H.label,action:()=>W(H.id,{path:[A],selectedItems:[],filters:{}})})}),A.children&&A.children.forEach(H=>{H.type==="list"&&H.data&&p.push({label:`View ${H.name}`,action:()=>C(!0)})})}),p.slice(0,5)},W=(p,A)=>{console.log("Capability action:",p,A);let H=`Executing ${p} with context: ${JSON.stringify(A.path.map(se=>se.name))}`;C(!1)},q=Jt({path:[],selectedItems:[],filters:{}}),X=p=>{b(p.target.files),p.target.files&&(p.target.value="")},ie=p=>{p.preventDefault(),D(!0)},U=p=>{p.preventDefault(),D(!1)},ke=p=>{p.preventDefault(),D(!1),b(p.dataTransfer.files)},d=p=>{if(p===0)return"0 Bytes";let A=1024,H=["Bytes","KB","MB","GB"],se=Math.floor(Math.log(p)/Math.log(A));return parseFloat((p/Math.pow(A,se)).toFixed(2))+" "+H[se]},E=p=>p.startsWith("image/")?(0,ca.jsx)(Za.Image,{className:"ca-4 w-4"}):p.startsWith("text/")?(0,ca.jsx)(Za.FileText,{className:"ca-4 w-4"}):(0,ca.jsx)(Za.File,{className:"ca-4 w-4"}),T=p=>{let A=p.role==="assistant",H=p.role==="user",se=Qa(p);return(0,ca.jsxs)("div",{className:n("flex items-start gap-3",H?"flex-row-reverse":""),children:[(0,ca.jsx)(Fe,{className:"ca-8 w-8 shrink-0",children:(0,ca.jsx)(je,{className:n(H?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:H?(0,ca.jsx)(Za.User,{className:"ca-4 w-4"}):(0,ca.jsx)(Za.Bot,{className:"ca-4 w-4"})})}),(0,ca.jsxs)("div",{className:n("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",H?"bg-primary text-primary-foreground":"bg-muted"),children:[se&&(0,ca.jsx)("div",{className:"mb-2 last:mb-0",children:(0,ca.jsx)("p",{className:"text-sm",children:se})}),p.parts.map((O,Y)=>{if(O.type==="text")return null;if(O.type==="file"){let M=O;return(0,ca.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,ca.jsxs)("div",{className:"flex items-center gap-2",children:[E(M.mediaType||"application/octet-stream"),(0,ca.jsx)("div",{className:"flex-1 min-w-0",children:(0,ca.jsx)("p",{className:"text-sm font-medium truncate",children:M.filename||M.url?.split("/").pop()||"File"})}),M.url&&(0,ca.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(M.url,"_blank"),className:"ca-8 w-8 p-0",children:(0,ca.jsx)(Za.Download,{className:"ca-4 w-4"})})]})},Y)}if(O.type.startsWith("tool-")){let M=O,re=O.type.replace("tool-","");if(re==="task")switch(M.state){case"input-available":return(0,ca.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},Y);case"output-available":return(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsx)($a,{data:{id:M.output?.id||M.input?.id,fetchLatest:!1,taskData:M.output||M.input}})},Y);case"output-error":return(0,ca.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",M.errorText]},Y);default:return null}if(re==="artefact")switch(M.state){case"input-available":return(0,ca.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},Y);case"output-available":return(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsx)(Ja,{artefact:M.output?.description||"",taskId:M.output?.id||M.input?.id,taskData:M.output||M.input})},Y);case"output-error":return(0,ca.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",M.errorText]},Y);default:return null}return(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsxs)(ge,{className:"w-full max-w-md",children:[(0,ca.jsx)(Te,{children:(0,ca.jsx)(Ae,{className:"text-lg",children:re})}),(0,ca.jsxs)(we,{children:[M.state==="input-available"&&(0,ca.jsxs)("p",{className:"text-sm",children:["Processing ",re,"..."]}),M.state==="output-available"&&(0,ca.jsx)("pre",{className:"text-sm",children:JSON.stringify(M.output,null,2)}),M.state==="output-error"&&(0,ca.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",M.errorText]})]})]})},Y)}if(O.type.startsWith("data-")){let M=O,re=O.type.replace("data-","");return re==="reference"?(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsx)(ge,{className:"w-full",children:(0,ca.jsx)(we,{className:"p-4",children:(0,ca.jsx)("div",{className:"space-ca-2",children:M.data?.references?.map((ne,et)=>(0,ca.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,ca.jsx)(ce,{variant:"outline",children:ne.type||"link"}),(0,ca.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,ca.jsx)("p",{className:"text-sm font-medium truncate",children:ne.title}),ne.description&&(0,ca.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:ne.description})]}),ne.url&&(0,ca.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(ne.url,"_blank"),className:"ca-8 w-8 p-0",children:(0,ca.jsx)(Za.ExternalLink,{className:"ca-4 w-4"})})]},et))})})})},Y):re==="menu"?(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsxs)(ge,{className:"w-full",children:[(0,ca.jsx)(Te,{children:(0,ca.jsx)(Ae,{className:"text-lg",children:M.data?.title})}),(0,ca.jsx)(we,{children:(0,ca.jsx)("div",{className:"space-ca-2",children:M.data?.items?.map((ne,et)=>(0,ca.jsx)(P,{variant:"outline",className:"w-full justify-start",onClick:ne.action,children:(0,ca.jsxs)("div",{className:"text-left",children:[(0,ca.jsx)("p",{className:"font-medium",children:ne.label}),ne.description&&(0,ca.jsx)("p",{className:"text-xs text-muted-foreground",children:ne.description})]})},et))})})]})},Y):(0,ca.jsx)("div",{className:"mb-2",children:(0,ca.jsxs)(ge,{className:"w-full max-w-md",children:[(0,ca.jsx)(Te,{children:(0,ca.jsx)(Ae,{className:"text-lg",children:re})}),(0,ca.jsx)(we,{children:(0,ca.jsx)("pre",{className:"text-sm",children:JSON.stringify(M.data,null,2)})})]})},Y)}return null})]})]})};return(0,ca.jsxs)("div",{className:`ca-full flex flex-col shadow-sm max-w-4xl mx-auto ${_||""}`,children:[(0,ca.jsxs)(ve,{ref:x,className:"flex-1 p-4 bg-background border-0",onDragOver:ie,onDragLeave:U,onDrop:ke,children:[(0,ca.jsxs)("div",{className:n("space-ca-4",c&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,ca.jsx)(Tt.AnimatePresence,{children:e.map(p=>(0,ca.jsx)(Tt.motion.div,{initial:{opacity:0,ca:10},animate:{opacity:1,ca:0},className:n("flex gap-3",p.role==="user"?"flex-row-reverse":"flex-row"),children:T(p)},p.id))}),I&&(0,ca.jsxs)(Tt.motion.div,{initial:{opacity:0,ca:10},animate:{opacity:1,ca:0},exit:{opacity:0,ca:-10},className:"flex gap-3",children:[(0,ca.jsx)(Fe,{className:"ca-8 w-8",children:(0,ca.jsx)(je,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ca.jsx)(Za.Bot,{className:"ca-4 w-4"})})}),(0,ca.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ca.jsx)(Oa,{capabilities:l,isOpen:I,onToggle:()=>C(!I),onActionSelect:W,className:"w-full"})})]}),a&&(0,ca.jsxs)(Tt.motion.div,{initial:{opacity:0,ca:10},animate:{opacity:1,ca:0},className:"flex gap-3",children:[(0,ca.jsx)(Fe,{className:"ca-8 w-8",children:(0,ca.jsx)(je,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,ca.jsx)(Za.Bot,{className:"ca-4 w-4"})})}),(0,ca.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,ca.jsxs)("div",{className:"flex space-x-1",children:[(0,ca.jsx)("div",{className:"w-2 ca-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,ca.jsx)("div",{className:"w-2 ca-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,ca.jsx)("div",{className:"w-2 ca-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,ca.jsx)("div",{ref:k})]}),s.length>0&&(0,ca.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,ca.jsx)("div",{className:"flex flex-wrap gap-2",children:s.map(p=>(0,ca.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[E(p.file.type),(0,ca.jsx)("span",{className:"text-sm font-medium",children:p.file.name}),(0,ca.jsx)("span",{className:"text-xs text-muted-foreground",children:d(p.file.size)}),(0,ca.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>N(p.id),className:"ca-6 w-6 p-0",children:(0,ca.jsx)(Za.X,{className:"ca-4 w-4"})})]},p.id))})}),(0,ca.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,ca.jsxs)("div",{className:"flex gap-3",children:[(0,ca.jsx)(it,{value:t,onChange:p=>u(p.target.value),onKeyPress:R,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),r&&(0,ca.jsx)(P,{variant:"outline",size:"icon",onClick:()=>S.current?.click(),className:"rounded-2xl ca-10 w-10 shadow-sm",children:(0,ca.jsx)(Za.Paperclip,{className:"ca-4 w-4"})}),(0,ca.jsx)(P,{onClick:m,disabled:!t.trim()&&s.length===0||a,size:"icon",className:"rounded-2xl ca-10 w-10 shadow-sm",children:(0,ca.jsx)(Za.Send,{className:"ca-4 w-4"})})]}),(0,ca.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,ca.jsxs)(P,{onClick:()=>C(!I),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,ca.jsx)(Za.Menu,{className:"ca-3 w-3 mr-1"}),I?"Hide":"Show"," Capabilities"]}),(0,ca.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[K().map((p,A)=>(0,ca.jsx)(P,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>W(p.id,z),children:p.label},`context-${p.id}`)),K().length===0&&ee().map((p,A)=>(0,ca.jsx)(P,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:p.action,children:p.label},`suggestion-${A}`))]})]}),r&&(0,ca.jsx)("input",{ref:S,type:"file",multiple:!0,onChange:X,className:"hidden"})]})]})}function $e({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:o=[],businessUnits:l=[],capabilities:s=[],sidebarItems:c=[],notifications:r=[],sessions:u=[],onNewChat:m,onSessionSelect:R,onSessionDelete:b,onSessionEdit:N=()=>{},onBusinessUnitChange:D=()=>{},onNotificationRemove:_=()=>{},onRemoveAll:k=()=>{},onActionClick:x=()=>{},onSearch:S=E=>console.log("Search query:",E),initialTeam:I="design",currentSession:C=null,showCapabilities:z=!0,title:oe="Digital Colleagues",enableFileUpload:K=!0,maxFileSize:ee=10,allowedFileTypes:W=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:q="/headerlogo.png",appName:X="Nuvia",tagline:ie="AI-Powered Workspace",actionIcon:U=(0,ca.jsx)(Za.Users,{className:"mr-2 ca-4 w-4"}),actionText:ke="Collaborate",sidebarInitiallyClosed:d=!1}){let E=(0,Ya.useChat)(e||{}),T=a?t||E:null,[p,A]=(0,Ke.useState)(""),[H,se]=(0,Ke.useState)(!1),O=T?.messages||o,Y=p,M=T?.status==="submitted"||H,re=l||[],ne={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"},[et,eo]=(0,Ke.useState)(()=>re.length===0?ne:re.find(G=>G.id===I)||re[0]),[tt,dt]=(0,Ke.useState)([]),[to,ao]=(0,Ke.useState)(!1),oo=G=>{if(!G||!K)return;let De=[];Array.from(G).forEach(le=>{if(le.size>ee*1024*1024){alert(`File ${le.name} is too large. Maximum size is ${ee}MB.`);return}if(W.length>0&&!W.some(pt=>le.type.match(pt))){alert(`File type ${le.type} is not allowed.`);return}let Xt={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:le,status:"pending",progress:0};if(le.type.startsWith("image/")){let pt=new FileReader;pt.onload=lo=>{dt(co=>co.map(At=>At.id===Xt.id?{...At,preview:lo.target?.result}:At))},pt.readAsDataURL(le)}De.push(Xt)}),dt(le=>[...le,...De])},io=G=>{dt(De=>De.filter(le=>le.id!==G))},Qt=()=>{if(!(!Y.trim()&&tt.length===0)){if(T){let G=tt.length>0?ro(tt.map(De=>De.file)):void 0;T.sendMessage({text:Y,files:G},{body:{timestamp:Date.now()}}),A("")}else console.log("Message to send:",Y),console.log("Files to upload:",tt),A(""),se(!0),setTimeout(()=>{se(!1)},1500);dt([])}},ro=G=>{let De=new DataTransfer;return G.forEach(le=>De.items.add(le)),De.files},so=G=>{G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),Qt())},no=G=>{A(G)};return(0,ca.jsx)(Fa,{sidebarItems:c||[],title:oe,notifications:r||[],businessUnits:re,currentBusinessUnit:et,onBusinessUnitChange:G=>{G&&(eo(G),D?.(G))},onSearch:S,showTabs:!1,onActionClick:x,actionIcon:U,actionText:ke,onNotificationRemove:_,onRemoveAll:k,logo:q,appName:X,tagline:ie,sidebarInitiallyClosed:d,children:(0,ca.jsx)(Tt.AnimatePresence,{mode:"wait",children:(0,ca.jsx)(Tt.motion.div,{className:"flex-1 ca-full",initial:{opacity:0,ca:10},animate:{opacity:1,ca:0},exit:{opacity:0,ca:-10},transition:{duration:.2},children:(0,ca.jsxs)("div",{className:"ca-full flex",children:[(0,ca.jsx)("div",{className:"w-80 flex-shrink-0 ca-full p-2",children:(0,ca.jsx)(ja,{sessions:u||[],currentSession:C,teams:re,onNewChat:m,onSessionSelect:R,onSessionEdit:N,onSessionDelete:b})}),(0,ca.jsx)("div",{className:"flex-1 ca-full p-2",children:(0,ca.jsx)(Xa,{messages:O||[],input:Y,isTyping:M,currentSessionTitle:C?.title,capabilities:s||[],onInputChange:no,onSendMessage:Qt,onKeyPress:so,fileUploads:tt,isDragOver:to,enableFileUpload:K,onFileUpload:oo,onRemoveFile:io,onDragOver:ao})})]})},"chat-interface")})})}function gi(){let[e,t]=(0,Ke.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you help me analyze my sales data?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`I'll help you analyze your sales data. Let me fetch the latest information.
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"],N=()=>["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:[...N(),"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:[...N(),"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:N()}],"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:["",...N()]}],"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 N=P[d]||[],le=N.includes(M)?N.filter(p=>p!==M):N.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]||[],N=d.items.filter(p=>M.includes(p.id)),le=d.items.filter(p=>!M.includes(p.id));return[...N,...le].slice(0,d.maxItems)},O=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,ee=e,se=d=>{let M=O(d),N=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(N=>N.id===R);if(!d||!d.items||!d.maxItems)return null;let M=P[d.id]||[];return(0,ua.jsx)(Ca,{open:!!R,onOpenChange:N=>!N&&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(N=>(0,ua.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,ua.jsx)(Ht,{id:N.id,checked:M.includes(N.id),onCheckedChange:()=>Y(d.id,N.id),disabled:!M.includes(N.id)&&M.length>=(d.maxItems||0)}),(0,ua.jsxs)("label",{htmlFor:N.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:[N.title,N.badge&&(0,ua.jsx)(de,{variant:"outline",className:"text-xs",children:N.badge})]})]},N.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")),k=V(require("@radix-ui/react-dropdown-menu")),Ze=require("@radix-ui/react-icons");var La=k.Root,za=k.Trigger;var ci=Ae.forwardRef(({className:e,inset:t,children:a,...o},n)=>(0,ua.jsxs)(k.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=k.SubTrigger.displayName;var di=Ae.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(k.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=k.SubContent.displayName;var Kt=Ae.forwardRef(({className:e,sideOffset:t=4,...a},o)=>(0,ua.jsx)(k.Portal,{children:(0,ua.jsx)(k.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=k.Content.displayName;var qt=Ae.forwardRef(({className:e,inset:t,...a},o)=>(0,ua.jsx)(k.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=k.Item.displayName;var pi=Ae.forwardRef(({className:e,children:t,checked:a,...o},n)=>(0,ua.jsxs)(k.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)(k.ItemIndicator,{children:(0,ua.jsx)(Ze.CheckIcon,{className:"ua-4 w-4"})})}),t]}));pi.displayName=k.CheckboxItem.displayName;var mi=Ae.forwardRef(({className:e,children:t,...a},o)=>(0,ua.jsxs)(k.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)(k.ItemIndicator,{children:(0,ua.jsx)(Ze.DotFilledIcon,{className:"ua-4 w-4 fill-current"})})}),t]}));mi.displayName=k.RadioItem.displayName;var ui=Ae.forwardRef(({className:e,inset:t,...a},o)=>(0,ua.jsx)(k.Label,{ref:o,className:c("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));ui.displayName=k.Label.displayName;var gi=Ae.forwardRef(({className:e,...t},a)=>(0,ua.jsx)(k.Separator,{ref:a,className:c("-mx-1 my-1 ua-px bg-muted",e),...t}));gi.displayName=k.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]},N=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:[N(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:[N(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||{}),N=a?t||M:null,[le,p]=(0,Qe.useState)(""),[j,G]=(0,Qe.useState)(!1),W=N?.messages||o,te=le,ae=N?.status==="submitted"||j,A=N?.addToolResult?(H,he,oe)=>{N.addToolResult({tool:he,toolCallId:H,output:oe}),N.sendMessage()}:()=>{},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(N){let H=it.length>0?uo(it.map(he=>he.file)):void 0;N.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.
6
12
 
7
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:
8
14
 
@@ -18,7 +24,7 @@
18
24
 
19
25
  *\u{1F4CA} Tool Result: Successfully retrieved 1,247 records from sales database*
20
26
 
21
- Would you like me 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.
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.
22
28
 
23
29
  *\u{1F527} Calling function: create_chart(type="line", data_source="sales_revenue", period="30d")*
24
30
 
@@ -65,7 +71,7 @@ Timestamp: 2024-01-20T10:30:45Z
65
71
  - \`analyze_data\` - Perform data analysis
66
72
  - \`generate_report\` - Create reports
67
73
 
68
- Would you like me to try a valid function instead?`}]}]);return(0,ca.jsx)("div",{className:"ca-screen w-full",children:(0,ca.jsx)($e,{messages:e,capabilities:We,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function fi(){let[e,t]=(0,Ke.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you show me some examples of markdown formatting?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`# Markdown Formatting Examples
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
69
75
 
70
76
  Here are various markdown elements that should render properly in the chat:
71
77
 
@@ -136,7 +142,7 @@ Visit our [documentation](https://docs.example.com) for more details.
136
142
 
137
143
  ---
138
144
 
139
- 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 me a complex code example with syntax highlighting?"}]},{id:"4",role:"assistant",parts:[{type:"text",text:`# Complex Code Examples
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
140
146
 
141
147
  Here are some advanced code examples with different languages:
142
148
 
@@ -324,7 +330,7 @@ if __name__ == "__main__":
324
330
  analyzer.visualize_trends('sales_analysis.png')
325
331
  \`\`\`
326
332
 
327
- This demonstrates complex syntax highlighting with multiple languages and should render properly with appropriate color coding!`}]}]);return(0,ca.jsx)("div",{className:"ca-screen w-full",children:(0,ca.jsx)($e,{messages:e,capabilities:We,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function hi(){let[e,t]=(0,Ke.useState)([{id:"1",role:"user",parts:[{type:"text",text:"Can you show me some interactive dashboard components?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:"I'll create some interactive dashboard components for you. Here are various UI elements:"},{type:"data-dashboard",data:{title:"Sales Dashboard",widgets:[{type:"metric",title:"Total Revenue",value:"$125,000",change:"+12.5%",trend:"up"},{type:"metric",title:"New Customers",value:"47",change:"+8.3%",trend:"up"},{type:"metric",title:"Conversion Rate",value:"3.2%",change:"-2.1%",trend:"down"}]}}]},{id:"3",role:"user",parts:[{type:"text",text:"Can you show me a data table with customer information?"}]},{id:"4",role:"assistant",parts:[{type:"text",text:"Here's a customer data table with sorting and filtering capabilities:"},{type:"data-table",data:{title:"Customer Information",columns:[{key:"name",label:"Customer Name",sortable:!0},{key:"company",label:"Company",sortable:!0},{key:"revenue",label:"Revenue",sortable:!0,type:"currency"},{key:"status",label:"Status",type:"badge"},{key:"lastContact",label:"Last Contact",type:"date"}],rows:[{id:"1",name:"Alice Johnson",company:"Acme Corp",revenue:85e3,status:"active",lastContact:"2024-01-15"},{id:"2",name:"Bob Smith",company:"Beta Inc",revenue:45e3,status:"pending",lastContact:"2024-01-12"},{id:"3",name:"Carol Davis",company:"Gamma LLC",revenue:15e3,status:"inactive",lastContact:"2024-01-08"},{id:"4",name:"David Wilson",company:"Delta Systems",revenue:125e3,status:"active",lastContact:"2024-01-18"}]}}]},{id:"5",role:"user",parts:[{type:"text",text:"Show me a progress tracker for a project"}]},{id:"6",role:"assistant",parts:[{type:"text",text:"Here's a project progress tracker with timeline and milestones:"},{type:"data-progress",data:{title:"Website Redesign Project",overall_progress:65,phases:[{name:"Discovery & Planning",status:"completed",progress:100,start_date:"2024-01-01",end_date:"2024-01-15",tasks:[{name:"Stakeholder interviews",completed:!0},{name:"Requirements gathering",completed:!0},{name:"Project timeline",completed:!0}]},{name:"Design & Prototyping",status:"completed",progress:100,start_date:"2024-01-16",end_date:"2024-02-15",tasks:[{name:"Wireframes",completed:!0},{name:"Visual design",completed:!0},{name:"Interactive prototype",completed:!0}]},{name:"Development",status:"in_progress",progress:75,start_date:"2024-02-16",end_date:"2024-03-30",tasks:[{name:"Frontend development",completed:!0},{name:"Backend integration",completed:!1},{name:"Testing & QA",completed:!1}]},{name:"Launch & Deployment",status:"pending",progress:0,start_date:"2024-03-31",end_date:"2024-04-15",tasks:[{name:"Production deployment",completed:!1},{name:"User training",completed:!1},{name:"Go-live support",completed:!1}]}]}}]}]);return(0,ca.jsx)("div",{className:"ca-screen w-full",children:(0,ca.jsx)($e,{messages:e,capabilities:We,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function bi(){let[e,t]=(0,Ke.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:
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:
328
334
 
329
335
  \u{1F4CA} **Data Files:**
330
336
  - CSV/Excel spreadsheets
@@ -385,11 +391,11 @@ Try uploading your files using the attachment button below! I'll analyze them on
385
391
  - **Variance Found:** $70,000 difference between CSV total ($1,250,000) and PDF annual total ($1,180,000)
386
392
  - **Recommendation:** Investigate timing differences or adjustments
387
393
 
388
- Would you like me to:
394
+ Would you like ua to:
389
395
  - \u{1F4CA} Create detailed visualizations
390
396
  - \u{1F50D} Investigate the revenue variance
391
397
  - \u{1F4C8} Generate trend analysis
392
- - \u{1F4CB} Create a unified report?`}]}]);return(0,ca.jsx)("div",{className:"ca-screen w-full",children:(0,ca.jsx)($e,{messages:e,capabilities:We,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function vi(){let[e,t]=(0,Ke.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.
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.
393
399
 
394
400
  *\u{1F527} Calling function: fetch_sales_data(period="latest")*
395
401
 
@@ -408,7 +414,7 @@ This is usually a temporary issue. I'll retry the request in 30 seconds. In the
408
414
  2. Try refreshing the page
409
415
  3. Contact support if the issue persists
410
416
 
411
- Would you like me 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...
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...
412
418
 
413
419
  *\u{1F527} Calling function: fetch_sales_data(period="latest", retry=true)*
414
420
 
@@ -430,7 +436,7 @@ I'm unable to fetch the sales data due to insufficient permissions.
430
436
  **Next Steps:**
431
437
  1. **Contact your administrator** to request the necessary permissions
432
438
  2. **Verify your role** - You may need a sales or data analyst role
433
- 3. **Check group memberships** - Ensure you're in the appropriate security groups
439
+ 3. **Check group memberships** - Ensure you'ua in the appropriate security groups
434
440
 
435
441
  **Alternative Options:**
436
442
  - Upload a sales data file directly (CSV, Excel)
@@ -464,20 +470,20 @@ The report generation failed because the specified data source is not valid.
464
470
 
465
471
  **Example:** "Generate a sales report using the CRM system data"
466
472
 
467
- Would you like me to try generating a report with one of the valid data sources?`}]},{id:"7",role:"user",parts:[{type:"text",text:"Let me try uploading some corrupted data (corrupted_data.xlsx - 0 bytes)"}]},{id:"8",role:"assistant",parts:[{type:"text",text:`I see you're trying to upload a file. Let me analyze it.
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.
468
474
 
469
475
  *\u{1F527} Processing file: corrupted_data.xlsx*
470
476
 
471
477
  \u{1F4BE} **Corrupted or Empty File**
472
478
 
473
479
  \`\`\`
474
- Error: File appears to ca corrupted or empty
480
+ Error: File appears to ua corrupted or empty
475
481
  Code: CORRUPTED_FILE
476
482
  File size: 0 bytes
477
483
  MIME type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
478
484
  \`\`\`
479
485
 
480
- The uploaded Excel file appears to ca corrupted or empty (0 bytes).
486
+ The uploaded Excel file appears to ua corrupted or empty (0 bytes).
481
487
 
482
488
  **Possible Causes:**
483
489
  - File upload was interrupted
@@ -497,7 +503,7 @@ The uploaded Excel file appears to ca corrupted or empty (0 bytes).
497
503
 
498
504
  3. **Check file integrity:**
499
505
  - Verify you can open the file locally
500
- - Check file size (should ca > 0 bytes)
506
+ - Check file size (should ua > 0 bytes)
501
507
 
502
508
  4. **Re-upload:**
503
509
  - Clear browser cache
@@ -508,7 +514,7 @@ The uploaded Excel file appears to ca corrupted or empty (0 bytes).
508
514
  - Use Google Sheets and export as Excel
509
515
  - Upload as a text/CSV file instead
510
516
 
511
- 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 me check the network connectivity and system status.
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.
512
518
 
513
519
  *\u{1F527} Calling function: check_system_status()*
514
520
 
@@ -521,7 +527,7 @@ Status: Multiple service endpoints unreachable
521
527
  Last successful connection: 5 minutes ago
522
528
  \`\`\`
523
529
 
524
- It appears there are network connectivity issues affecting several services:
530
+ Qe appears there are network connectivity issues affecting several services:
525
531
 
526
532
  **Affected Services:**
527
533
  - \u274C Customer Database (timeout)
@@ -531,7 +537,7 @@ It appears there are network connectivity issues affecting several services:
531
537
  - \u2705 Authentication (operational)
532
538
 
533
539
  **Impact:**
534
- - File uploads may fail or ca delayed
540
+ - File uploads may fail or ua delayed
535
541
  - Data retrieval functions unavailable
536
542
  - Real-time analytics temporarily disabled
537
543
  - Chat functionality remains available
@@ -548,7 +554,7 @@ It appears there are network connectivity issues affecting several services:
548
554
  - Access cached reports and documents
549
555
  - Plan future actions for when services restore
550
556
 
551
- I'll continue monitoring the connection status. Services typically restore within 5-10 minutes during maintenance windows.`}]}]);return(0,ca.jsx)("div",{className:"ca-screen w-full",children:(0,ca.jsx)($e,{messages:e,capabilities:We,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}function yi(){let[e,t]=(0,Ke.useState)([{id:"1",role:"assistant",parts:[{type:"text",text:`Welcome! I can help you with various business tasks. Use the capabilities menu at the bottom to explore what I can do, or ask me directly about:
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:
552
558
 
553
559
  \u{1F3E2} **Sales & CRM**
554
560
  - Customer management
@@ -605,11 +611,11 @@ What would you like to do next?`}]},{id:"5",role:"user",parts:[{type:"text",text
605
611
  - Update target audiences
606
612
 
607
613
  \u{1F3AF} **Optimization**
608
- - A/Za test variations
614
+ - A/B test variations
609
615
  - Optimize targeting
610
616
  - Adjust bidding strategies
611
617
 
612
- Which campaign would you like to work with, or what action would you like to take?`}]},{id:"8",role:"user",parts:[{type:"text",text:"Let me check HR \u2192 Employee Management \u2192 Performance Reviews"}]},{id:"9",role:"assistant",parts:[{type:"text",text:"You'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:**
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:**
613
619
 
614
620
  \u2705 **Review Management**
615
621
  - Schedule new reviews
@@ -636,4 +642,4 @@ Which campaign would you like to work with, or what action would you like to tak
636
642
  - 23 reviews are **pending**
637
643
  - 3 employees have upcoming deadlines this week
638
644
 
639
- Would you like me to send reminder notifications or help with any specific review tasks?`}]}]);return(0,ca.jsx)("div",{className:"ca-screen w-full",children:(0,ca.jsx)($e,{messages:e,capabilities:We,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t([]),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}0&&(module.exports={ChatDemoCapabilitiesInteraction,ChatDemoErrorHandling,ChatDemoFileUploads,ChatDemoMarkdownResponses,ChatDemoToolCalling,ChatDemoUIComponents});
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});