cortex-react-components 2.6.1 → 2.7.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 (143) hide show
  1. package/dist/{chunk-NPGGDQ6F.mjs → chunk-2GM2LPLB.mjs} +1 -1
  2. package/dist/{chunk-B2TBKNIJ.mjs → chunk-2OOJ4ZFB.mjs} +1 -1
  3. package/dist/{chunk-QTILVWJA.mjs → chunk-4RYG24IZ.mjs} +1 -1
  4. package/dist/{chunk-FX6IXEMQ.mjs → chunk-4SRUEQTP.mjs} +1 -1
  5. package/dist/{chunk-WB2Y7HTT.mjs → chunk-55MVSCX4.mjs} +1 -1
  6. package/dist/chunk-56X4PU43.mjs +4 -0
  7. package/dist/{chunk-ABGNIQRP.mjs → chunk-5RDLHKTK.mjs} +1 -1
  8. package/dist/chunk-6OCLRAHU.mjs +1 -0
  9. package/dist/{chunk-RY4C3J33.mjs → chunk-77PCUNUC.mjs} +1 -1
  10. package/dist/{chunk-SPAOEUCG.mjs → chunk-7OMPPFGG.mjs} +1 -1
  11. package/dist/{chunk-M527EJIX.mjs → chunk-AMVJPDM3.mjs} +1 -1
  12. package/dist/{chunk-KY3ELFX5.mjs → chunk-BQQ4V4PX.mjs} +1 -1
  13. package/dist/{chunk-75WE6ZXB.mjs → chunk-CLGBBNRB.mjs} +1 -1
  14. package/dist/{chunk-STX6KQP5.mjs → chunk-DPZHVBGG.mjs} +1 -1
  15. package/dist/{chunk-TK4JC5PG.mjs → chunk-E64KWNOT.mjs} +1 -1
  16. package/dist/{chunk-QWFFSMKK.mjs → chunk-F64CA5CH.mjs} +1 -1
  17. package/dist/{chunk-FRXZ2OKW.mjs → chunk-FYQBRCQM.mjs} +1 -1
  18. package/dist/{chunk-57PJ7CHJ.mjs → chunk-GAZHKHGB.mjs} +1 -1
  19. package/dist/{chunk-VBSFVJM5.mjs → chunk-GETYSIZV.mjs} +1 -1
  20. package/dist/{chunk-3ZF4TV4N.mjs → chunk-GLBQHEMQ.mjs} +1 -1
  21. package/dist/{chunk-S4ES6P3Y.mjs → chunk-HDKHF3EA.mjs} +1 -1
  22. package/dist/{chunk-N52FSTLG.mjs → chunk-HKMNAXLM.mjs} +1 -1
  23. package/dist/chunk-HME6CJ6L.mjs +1 -0
  24. package/dist/{chunk-XD3TBE5O.mjs → chunk-JHYWAL24.mjs} +1 -1
  25. package/dist/{chunk-XDQAH5AP.mjs → chunk-JTC4NOAT.mjs} +1 -1
  26. package/dist/{chunk-AEFWTCCE.mjs → chunk-KZAYLEFB.mjs} +1 -1
  27. package/dist/{chunk-BDDEMCAH.mjs → chunk-MFCVMJBO.mjs} +1 -1
  28. package/dist/{chunk-RUZVSK25.mjs → chunk-MO4HRQEL.mjs} +1 -1
  29. package/dist/{chunk-MPTT6GRI.mjs → chunk-NTS4U2OE.mjs} +1 -1
  30. package/dist/{chunk-Q7KKN6MH.mjs → chunk-P6OSMPUQ.mjs} +1 -1
  31. package/dist/{chunk-3DYGB2K5.mjs → chunk-PIOFHZSJ.mjs} +1 -1
  32. package/dist/{chunk-2VOOH4YJ.mjs → chunk-PNUBVBSR.mjs} +1 -1
  33. package/dist/{chunk-TUACRDU3.mjs → chunk-PTZT4QJW.mjs} +1 -1
  34. package/dist/{chunk-ZFUP5NVF.mjs → chunk-PXLSH6S2.mjs} +1 -1
  35. package/dist/{chunk-TXVA6XJT.mjs → chunk-SRUG246N.mjs} +1 -1
  36. package/dist/{chunk-75XBZHOC.mjs → chunk-U3FYDDE2.mjs} +1 -1
  37. package/dist/{chunk-SEXSYCWD.mjs → chunk-URYIYEGY.mjs} +1 -1
  38. package/dist/{chunk-AFQBDAWS.mjs → chunk-W7MEHF4G.mjs} +1 -1
  39. package/dist/{chunk-RAGDUV7M.mjs → chunk-XIGBDWYI.mjs} +1 -1
  40. package/dist/{chunk-FOEPKY7T.mjs → chunk-XW52WZ2B.mjs} +1 -1
  41. package/dist/{chunk-RRLXKDET.mjs → chunk-YMOW5WNP.mjs} +1 -1
  42. package/dist/components/Blocks/Banner.mjs +1 -1
  43. package/dist/components/Blocks/CallToAction.mjs +1 -1
  44. package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
  45. package/dist/components/Blocks/Content.mjs +1 -1
  46. package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
  47. package/dist/components/Blocks/RelatedPosts.mjs +1 -1
  48. package/dist/components/Blocks/RenderBlocks.mjs +1 -1
  49. package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
  50. package/dist/components/Blocks/index.mjs +1 -1
  51. package/dist/components/CRM/CogeBoard.mjs +1 -1
  52. package/dist/components/CRM/KanbanBoard.mjs +1 -1
  53. package/dist/components/CRM/index.mjs +1 -1
  54. package/dist/components/Cards/ContentCard.mjs +1 -1
  55. package/dist/components/Cards/FeatureCard.mjs +1 -1
  56. package/dist/components/Cards/index.mjs +1 -1
  57. package/dist/components/Chat/ChatInterface.d.ts +3 -3
  58. package/dist/components/Chat/ChatInterface.js +2 -2
  59. package/dist/components/Chat/ChatInterface.mjs +1 -1
  60. package/dist/components/Chat/CopilotInterface.js +3 -3
  61. package/dist/components/Chat/CopilotInterface.mjs +1 -1
  62. package/dist/components/Chat/PartTypes/PartText.d.ts +4 -0
  63. package/dist/components/Chat/PartTypes/PartText.js +1 -0
  64. package/dist/components/Chat/PartTypes/PartText.mjs +1 -0
  65. package/dist/components/Chat/PartTypes/index.d.ts +1 -0
  66. package/dist/components/Chat/PartTypes/index.js +4 -4
  67. package/dist/components/Chat/PartTypes/index.mjs +1 -1
  68. package/dist/components/Chat/chat-session-sidebar.js +1 -1
  69. package/dist/components/Chat/chat-session-sidebar.mjs +1 -1
  70. package/dist/components/Chat/demo-long-messages.js +8 -8
  71. package/dist/components/Chat/demo-long-messages.mjs +1 -1
  72. package/dist/components/Chat/demo-tests.js +28 -28
  73. package/dist/components/Chat/demo-tests.mjs +1 -1
  74. package/dist/components/Chat/demo.js +3 -3
  75. package/dist/components/Chat/demo.mjs +1 -1
  76. package/dist/components/Chat/example-usage.js +3 -3
  77. package/dist/components/Chat/example-usage.mjs +1 -1
  78. package/dist/components/Chat/example-with-vercel-ai.js +3 -3
  79. package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
  80. package/dist/components/Chat/index.js +5 -5
  81. package/dist/components/Chat/index.mjs +1 -1
  82. package/dist/components/DigitalColleagues/AppSidebarLeft.mjs +1 -1
  83. package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
  84. package/dist/components/DigitalColleagues/ManagementSidebar.mjs +1 -1
  85. package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
  86. package/dist/components/DigitalColleagues/Views/KnowledgeView.mjs +1 -1
  87. package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
  88. package/dist/components/DigitalColleagues/index.mjs +1 -1
  89. package/dist/components/HeaderFooter/Header.mjs +1 -1
  90. package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
  91. package/dist/components/HeaderFooter/index.mjs +1 -1
  92. package/dist/components/Heros/HighImpact/index.mjs +1 -1
  93. package/dist/components/Heros/LowImpact/index.mjs +1 -1
  94. package/dist/components/Heros/MediumImpact/index.mjs +1 -1
  95. package/dist/components/Heros/PostHero/index.mjs +1 -1
  96. package/dist/components/Heros/RenderHero.mjs +1 -1
  97. package/dist/components/Heros/index.mjs +1 -1
  98. package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
  99. package/dist/components/Layouts/Print.mjs +1 -1
  100. package/dist/components/Layouts/SlideShow.mjs +1 -1
  101. package/dist/components/Layouts/index.mjs +1 -1
  102. package/dist/components/Menus/SidebarLeft.mjs +1 -1
  103. package/dist/components/Menus/SidebarRight.mjs +1 -1
  104. package/dist/components/Menus/index.mjs +1 -1
  105. package/dist/components/Payload/RichText/index.mjs +1 -1
  106. package/dist/components/Payload/RichText/serialize.mjs +1 -1
  107. package/dist/components/Payload/index.mjs +1 -1
  108. package/dist/components/Projects/KanbanBoardView.mjs +1 -1
  109. package/dist/components/Projects/ProjectPage.mjs +1 -1
  110. package/dist/components/Projects/ProjectView.mjs +1 -1
  111. package/dist/components/dc-temp/index.mjs +1 -1
  112. package/dist/components/index.js +13 -13
  113. package/dist/components/index.mjs +1 -1
  114. package/dist/components/ui/index.mjs +1 -1
  115. package/dist/components/ui/sidebar.mjs +1 -1
  116. package/dist/globals.css +1 -1
  117. package/dist/index.js +16 -16
  118. package/dist/index.mjs +1 -1
  119. package/dist/metafile-cjs.json +1 -1
  120. package/dist/metafile-esm.json +1 -1
  121. package/dist/pages/Blog.mjs +1 -1
  122. package/dist/pages/Documentation.mjs +1 -1
  123. package/dist/pages/IndexPage.mjs +1 -1
  124. package/dist/pages/Intranet.mjs +1 -1
  125. package/dist/pages/LandingPage.mjs +1 -1
  126. package/dist/pages/Page.mjs +1 -1
  127. package/dist/pages/Publish.mjs +1 -1
  128. package/dist/pages/Website.mjs +1 -1
  129. package/dist/sections/AboutSection.mjs +1 -1
  130. package/dist/sections/BlogDetail.mjs +1 -1
  131. package/dist/sections/BlogList.mjs +1 -1
  132. package/dist/sections/BlogListSection.mjs +1 -1
  133. package/dist/sections/ContactSection.mjs +1 -1
  134. package/dist/sections/PageSections.mjs +1 -1
  135. package/dist/sections/PricingSection.mjs +1 -1
  136. package/dist/sections/ServiceDetail.mjs +1 -1
  137. package/dist/sections/ServiceDetailSection.mjs +1 -1
  138. package/dist/sections/ServiceSection.mjs +1 -1
  139. package/dist/sections/form/index.mjs +1 -1
  140. package/dist/sections/index.mjs +1 -1
  141. package/package.json +3 -1
  142. package/dist/chunk-5BK3HTPN.mjs +0 -4
  143. package/dist/chunk-FUEUJPNZ.mjs +0 -1
@@ -2,21 +2,21 @@
2
2
  "use strict";
3
3
  'use client'
4
4
 
5
- "use strict";var vi=Object.create;var pt=Object.defineProperty;var yi=Object.getOwnPropertyDescriptor;var xi=Object.getOwnPropertyNames;var wi=Object.getPrototypeOf,Ci=Object.prototype.hasOwnProperty;var Ni=(e,t)=>{for(var a in t)pt(e,a,{get:t[a],enumerable:!0})},Zt=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of xi(t))!Ci.call(e,s)&&s!==a&&pt(e,s,{get:()=>t[s],enumerable:!(i=yi(t,s))||i.enumerable});return e};var $=(e,t,a)=>(a=e!=null?vi(wi(e)):{},Zt(t||!e||!e.__esModule?pt(a,"default",{value:e,enumerable:!0}):a,e)),ki=e=>Zt(pt({},"__esModule",{value:!0}),e);var No={};Ni(No,{ChatDemoLongMessages:()=>Co});module.exports=ki(No);var si=require("react");var ii=require("@ai-sdk/react"),St=require("framer-motion"),oi=require("lucide-react");var la=require("clsx");var Mt="-",Di=e=>{let t=Ti(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{let n=l.split(Mt);return n[0]===""&&n.length!==1&&n.shift(),aa(n,t)||Pi(l)},getConflictingClassGroupIds:(l,n)=>{let m=a[l]||[];return n&&i[l]?[...m,...i[l]]:m}}},aa=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],i=t.nextPart.get(a),s=i?aa(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;let r=e.join(Mt);return t.validators.find(({validator:l})=>l(r))?.classGroupId},ea=/^\[(.+)\]$/,Pi=e=>{if(ea.test(e)){let t=ea.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Ti=e=>{let{theme:t,prefix:a}=e,i={nextPart:new Map,validators:[]};return Ri(Object.entries(e.classGroups),a).forEach(([r,l])=>{It(l,i,r,t)}),i},It=(e,t,a,i)=>{e.forEach(s=>{if(typeof s=="string"){let r=s===""?t:ta(t,s);r.classGroupId=a;return}if(typeof s=="function"){if(Si(s)){It(s(i),t,a,i);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([r,l])=>{It(l,ta(t,r),a,i)})})},ta=(e,t)=>{let a=e;return t.split(Mt).forEach(i=>{a.nextPart.has(i)||a.nextPart.set(i,{nextPart:new Map,validators:[]}),a=a.nextPart.get(i)}),a},Si=e=>e.isThemeGetter,Ri=(e,t)=>t?e.map(([a,i])=>{let s=i.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([l,n])=>[t+l,n])):r);return[a,s]}):e,Ai=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,i=new Map,s=(r,l)=>{a.set(r,l),t++,t>e&&(t=0,i=a,a=new Map)};return{get(r){let l=a.get(r);if(l!==void 0)return l;if((l=i.get(r))!==void 0)return s(r,l),l},set(r,l){a.has(r)?a.set(r,l):s(r,l)}}},ia="!",Ii=e=>{let{separator:t,experimentalParseClassName:a}=e,i=t.length===1,s=t[0],r=t.length,l=n=>{let m=[],u=0,D=0,f;for(let x=0;x<n.length;x++){let R=n[x];if(u===0){if(R===s&&(i||n.slice(x,x+r)===t)){m.push(n.slice(D,x)),D=x+r;continue}if(R==="/"){f=x;continue}}R==="["?u++:R==="]"&&u--}let y=m.length===0?n:n.substring(D),T=y.startsWith(ia),E=T?y.substring(1):y,S=f&&f>D?f-D:void 0;return{modifiers:m,hasImportantModifier:T,baseClassName:E,maybePostfixModifierPosition:S}};return a?n=>a({className:n,parseClassName:l}):l},Mi=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(i=>{i[0]==="["?(t.push(...a.sort(),i),a=[]):a.push(i)}),t.push(...a.sort()),t},Li=e=>({cache:Ai(e.cacheSize),parseClassName:Ii(e),...Di(e)}),Bi=/\s+/,Ei=(e,t)=>{let{parseClassName:a,getClassGroupId:i,getConflictingClassGroupIds:s}=t,r=[],l=e.trim().split(Bi),n="";for(let m=l.length-1;m>=0;m-=1){let u=l[m],{modifiers:D,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:T}=a(u),E=!!T,S=i(E?y.substring(0,T):y);if(!S){if(!E){n=u+(n.length>0?" "+n:n);continue}if(S=i(y),!S){n=u+(n.length>0?" "+n:n);continue}E=!1}let x=Mi(D).join(":"),R=f?x+ia:x,z=R+S;if(r.includes(z))continue;r.push(z);let w=s(S,E);for(let L=0;L<w.length;++L){let Q=w[L];r.push(R+Q)}n=u+(n.length>0?" "+n:n)}return n};function zi(){let e=0,t,a,i="";for(;e<arguments.length;)(t=arguments[e++])&&(a=oa(t))&&(i&&(i+=" "),i+=a);return i}var oa=e=>{if(typeof e=="string")return e;let t,a="";for(let i=0;i<e.length;i++)e[i]&&(t=oa(e[i]))&&(a&&(a+=" "),a+=t);return a};function Ui(e,...t){let a,i,s,r=l;function l(m){let u=t.reduce((D,f)=>f(D),e());return a=Li(u),i=a.cache.get,s=a.cache.set,r=n,n(m)}function n(m){let u=i(m);if(u)return u;let D=Ei(m,a);return s(m,D),D}return function(){return r(zi.apply(null,arguments))}}var U=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},ra=/^\[(?:([a-z-]+):)?(.+)\]$/i,Fi=/^\d+\/\d+$/,ji=new Set(["px","full","screen"]),Hi=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Oi=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|da|i|da|min|max))|\da(calc|min|max|clamp)\(.+\)|^0$/,Gi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Vi=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)da-?((\d+)?\.?(\d+)[a-z]+|0)/,Wi=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Te=e=>qe(e)||ji.has(e)||Fi.test(e),Be=e=>_e(e,"length",Yi),qe=e=>!!e&&!Number.isNaN(Number(e)),At=e=>_e(e,"number",qe),tt=e=>!!e&&Number.isInteger(Number(e)),$i=e=>e.endsWith("%")&&qe(e.slice(0,-1)),v=e=>ra.test(e),Ee=e=>Hi.test(e),Ki=new Set(["length","size","percentage"]),qi=e=>_e(e,Ki,na),_i=e=>_e(e,"position",na),Ji=new Set(["image","url"]),Qi=e=>_e(e,Ji,eo),Xi=e=>_e(e,"",Zi),at=()=>!0,_e=(e,t,a)=>{let i=ra.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):a(i[2]):!1},Yi=e=>Oi.test(e)&&!Gi.test(e),na=()=>!1,Zi=e=>Vi.test(e),eo=e=>Wi.test(e);var to=()=>{let e=U("colors"),t=U("spacing"),a=U("blur"),i=U("brightness"),s=U("borderColor"),r=U("borderRadius"),l=U("borderSpacing"),n=U("borderWidth"),m=U("contrast"),u=U("grayscale"),D=U("hueRotate"),f=U("invert"),y=U("gap"),T=U("gradientColorStops"),E=U("gradientColorStopPositions"),S=U("inset"),x=U("margin"),R=U("opacity"),z=U("padding"),w=U("saturate"),L=U("scale"),Q=U("sepia"),X=U("skew"),Y=U("space"),J=U("translate"),G=()=>["auto","contain","none"],ee=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",v,t],I=()=>[v,t],Pe=()=>["",Te,Be],d=()=>["auto",qe,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"],H=()=>["","0",v],V=()=>["auto","avoid","all","avoid-page","page","left","right","column"],W=()=>[qe,v];return{cacheSize:500,separator:":",theme:{colors:[at],spacing:[Te,Be],blur:["none","",Ee,v],brightness:W(),borderColor:[e],borderRadius:["none","","full",Ee,v],borderSpacing:I(),borderWidth:Pe(),contrast:W(),grayscale:H(),hueRotate:W(),invert:H(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[$i,Be],inset:ne(),margin:ne(),opacity:W(),padding:I(),saturate:W(),scale:W(),sepia:H(),skew:W(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",v]}],container:["container"],columns:[{columns:[Ee]}],"break-after":[{"break-after":V()}],"break-before":[{"break-before":V()}],"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:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",tt,v]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",v]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",tt,v]}],"grid-cols":[{"grid-cols":[at]}],"col-start-end":[{col:["auto",{span:["full",tt,v]},v]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[at]}],"row-start-end":[{row:["auto",{span:[tt,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:[z]}],px:[{px:[z]}],py:[{py:[z]}],ps:[{ps:[z]}],da:[{da:[z]}],pt:[{pt:[z]}],pr:[{pr:[z]}],pb:[{pb:[z]}],pl:[{pl:[z]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],da:[{da:[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:[Ee]},Ee]}],da:[{da:[v,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-da":[{"min-da":[v,t,"min","max","fit","svh","lvh","dvh"]}],"max-da":[{"max-da":[v,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[v,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ee,Be]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",At]}],"font-family":[{font:[at]}],"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,At]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Te,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":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Te,Be]}],"underline-offset":[{"underline-offset":["auto",Te,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":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...M(),_i]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",qi]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","da","bl","l","tl"]},Qi]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-da":[{"rounded-da":[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:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-da":[{"border-da":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:N()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-da":[{"border-da":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[Te,v]}],"outline-w":[{outline:[Te,Be]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Pe()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[Te,Be]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ee,Xi]}],"shadow-color":[{shadow:[at]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...le(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":le()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[i]}],contrast:[{contrast:[m]}],"drop-shadow":[{"drop-shadow":["","none",Ee,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":[i]}],"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":[R]}],"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:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[tt,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-me":[{"scroll-me":I()}],"scroll-da":[{"scroll-da":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-da":[{"scroll-da":I()}],"scroll-pt":[{"scroll-pt":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:[Te,Be,At]}],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","da","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","da","mr","mb","ml"],mx:["mr","ml"],my:["da","mb"],size:["w","da"],"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-da","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-da":["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-da","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-da"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-da","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-da"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-da","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-da","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-da","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var sa=Ui(to);function c(...e){return sa((0,la.clsx)(e))}var yt=$(require("react")),jt=$(require("next/link"));var ca=require("class-variance-authority");var da=require("react/jsx-runtime"),ao=(0,ca.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,da.jsx)("div",{className:c(ao({variant:t}),e),...a})}var pa=require("@radix-ui/react-slot"),ua=$(require("react")),io=(0,ca.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:"da-10 px-4 py-2",icon:"da-10 w-10",lg:"da-11 rounded px-8",sm:"da-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=ua.forwardRef(({asChild:e=!1,className:t,size:a,variant:i,...s},r)=>(0,da.jsx)(e?pa.Slot:"button",{className:c(io({className:t,size:a,variant:i})),ref:r,...s}));P.displayName="Button";var fa=$(require("react"));var it=fa.forwardRef(({className:e,type:t,...a},i)=>(0,da.jsx)("input",{type:t,className:c("flex da-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:i,...a}));it.displayName="Input";var Lt=$(require("react")),me=$(require("@radix-ui/react-scroll-area"));var xe=Lt.forwardRef(({className:e,children:t,...a},i)=>(0,da.jsxs)(me.Root,{ref:i,className:c("relative overflow-hidden",e),...a,children:[(0,da.jsx)(me.Viewport,{className:"da-full w-full rounded-[inherit]",children:t}),(0,da.jsx)(ha,{}),(0,da.jsx)(me.Corner,{})]}));xe.displayName=me.Root.displayName;var ha=Lt.forwardRef(({className:e,orientation:t="vertical",...a},i)=>(0,da.jsx)(me.ScrollAreaScrollbar,{ref:i,orientation:t,className:c("flex touch-none select-none transition-colors",t==="vertical"&&"da-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"da-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,da.jsx)(me.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ha.displayName=me.ScrollAreaScrollbar.displayName;var ot=$(require("react")),K=$(require("@radix-ui/react-dialog"));var ya=K.Root;var oo=K.Portal;var xa=ot.forwardRef(({className:e,...t},a)=>(0,da.jsx)(K.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}));xa.displayName=K.Overlay.displayName;var Bt=ot.forwardRef(({className:e,children:t,...a},i)=>(0,da.jsxs)(oo,{children:[(0,da.jsx)(xa,{}),(0,da.jsxs)(K.Content,{ref:i,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,da.jsxs)(K.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,da.jsx)(oi.X,{className:"da-4 w-4"}),(0,da.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Bt.displayName=K.Content.displayName;var Et=({className:e,...t})=>(0,da.jsx)("div",{className:c("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Et.displayName="DialogHeader";var ro=({className:e,...t})=>(0,da.jsx)("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});ro.displayName="DialogFooter";var zt=ot.forwardRef(({className:e,...t},a)=>(0,da.jsx)(K.Title,{ref:a,className:c("text-lg font-semibold leading-none tracking-tight",e),...t}));zt.displayName=K.Title.displayName;var no=ot.forwardRef(({className:e,...t},a)=>(0,da.jsx)(K.Description,{ref:a,className:c("text-sm text-muted-foreground",e),...t}));no.displayName=K.Description.displayName;var rt=$(require("@radix-ui/react-checkbox")),Ca=$(require("react")),Ut=Ca.forwardRef(({className:e,...t},a)=>(0,da.jsx)(rt.Root,{className:c("peer da-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,da.jsx)(rt.Indicator,{className:c("flex items-center justify-center text-current"),children:(0,da.jsx)(oi.Check,{className:"da-4 w-4"})})}));Ut.displayName=rt.Root.displayName;var we=e=>({id:Math.random().toString(36).substr(2,9),title:e,format:"markdown",createdAt:new Date});var ka=[{id:"design",name:"Design",description:"Creative and visual design team",icon:(0,da.jsx)(oi.Palette,{className:"da-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,da.jsx)(oi.Code,{className:"da-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,da.jsx)(oi.TrendingUp,{className:"da-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,da.jsx)(oi.DollarSign,{className:"da-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,da.jsx)(oi.Users,{className:"da-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,da.jsx)(oi.Wrench,{className:"da-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,da.jsx)(oi.Scale,{className:"da-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,da.jsx)(oi.Package,{className:"da-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,da.jsx)(oi.Zap,{className:"da-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,da.jsx)(oi.Building2,{className:"da-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],ft=[{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}],ut=[{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}],ht=[{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")}],so=[...ht,{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")}],lo=[...ft,{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}],gt={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:[]},Na={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:ht.filter(e=>e.epicId==="1")};var $da={empty:{initialProjects:gt.projects,initialEpics:gt.epics,initialSprints:gt.sprints,initialTasks:gt.tasks},default:{initialProjects:ft,initialEpics:Ft,initialSprints:ut,initialTasks:ht},highDensity:{initialProjects:ft,initialEpics:Ft,initialSprints:ut,initialTasks:so},singleEpic:{initialProjects:ft,initialEpics:Na.epics,initialSprints:ut,initialTasks:Na.tasks},multipleProjects:{initialProjects:lo,initialEpics:Ft,initialSprints:ut,initialTasks:ht}},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(we),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(we),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(we),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(we),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(we),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(we),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(we),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(we),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(we),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(we),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Ko=[{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 qo=bt.filter(e=>e.type==="digital");function Da(e,t){let[a,i]=(0,si.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),s=r=>{try{i(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,si.useEffect)(()=>{s(a)},[]),[a,s]}function Ht({items:e,isOpen:t,isMobile:a=!1,onClose:i,currentBusinessUnit:s=ka[0],onBusinessUnitChange:r,onSearch:l,className:n,logo:m="/headerlogo.png",appName:u="Nuvia",tagline:D="Collaboration Platform"}){let[f,y]=yt.useState({}),[T,E]=Da("sidebar-favorites",{}),[S,x]=yt.useState(null),[R,z]=yt.useState(""),w=d=>{y(M=>({...M,[d]:!M[d]}))},L=d=>{r?.(d)},Q=()=>{R.trim()&&l?.(R.trim())},X=d=>{d.key==="Enter"&&(d.preventDefault(),Q())},Y=(d,M)=>{let N=T[d]||[],le=N.includes(M)?N.filter(p=>p!==M):N.concat(M);E({...T,[d]:le})},J=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let M=T[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)},G=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,ee=e,ne=d=>{let M=G(d),N=J(d),le=(0,da.jsxs)(da.Fragment,{children:[(0,da.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,da.jsx)("span",{children:d.title})]}),d.badge&&(0,da.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,da.jsx)(oi.ChevronDown,{className:c("ml-2 da-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,da.jsx)(jt.default,{href:d.url,className:p,onClick:a?i:void 0,children:le}):(0,da.jsx)("button",{className:p,onClick:()=>d.items&&w(d.title),children:le})},I=()=>{let d=e.find(N=>N.id===S);if(!d||!d.items||!d.maxItems)return null;let M=T[d.id]||[];return(0,da.jsx)(ya,{open:!!S,onOpenChange:N=>!N&&x(null),children:(0,da.jsxs)(Bt,{className:"sm:max-w-md",children:[(0,da.jsxs)(Et,{children:[(0,da.jsxs)(zt,{children:["Manage ",d.title," Favorites"]}),(0,da.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,da.jsx)(xe,{className:"max-da-96 pr-4",children:(0,da.jsx)("div",{className:"space-y-4",children:d.items.map(N=>(0,da.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,da.jsx)(Ut,{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,da.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,da.jsx)(de,{variant:"outline",className:"text-xs",children:N.badge})]})]},N.id))})})]})})},Pe=(0,da.jsxs)("div",{className:"flex da-full flex-col bg-background",children:[(0,da.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,da.jsxs)("div",{className:"flex items-center gap-3",children:[(0,da.jsx)("div",{className:"flex da-14 w-14 items-center justify-center",children:(0,da.jsx)("img",{src:m,alt:"Header Logo",className:"da-14 w-14 object-contain"})}),(0,da.jsxs)("div",{children:[(0,da.jsx)("h2",{className:"font-semibold",children:u}),(0,da.jsx)("p",{className:"text-xs text-muted-foreground",children:D})]})]}),a&&(0,da.jsx)(P,{variant:"ghost",size:"icon",onClick:i,children:(0,da.jsx)(oi.X,{className:"da-5 w-5"})})]}),(0,da.jsx)("div",{className:"px-3 py-2",children:(0,da.jsxs)("div",{className:"relative",children:[(0,da.jsx)(oi.Search,{className:"absolute left-3 top-3 da-4 w-4 text-muted-foreground"}),(0,da.jsx)(it,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:R,onChange:d=>z(d.target.value),onKeyPress:X})]})}),(0,da.jsx)(xe,{className:"flex-1 px-3 py-2",children:(0,da.jsx)("div",{className:"space-y-1",children:ee.map(d=>(0,da.jsxs)("div",{className:"mb-1",children:[ne(d),d.items&&f[d.title]&&(0,da.jsxs)("div",{className:"da-1 ml-6 space-y-1 border-l pl-3",children:[J(d).map(M=>(0,da.jsxs)(jt.default,{href:M.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?i:void 0,children:[M.title,M.badge&&(0,da.jsx)(de,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:M.badge})]},M.id)),G(d)&&d.items&&d.items.length>J(d).length&&(0,da.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,da.jsx)("div",{className:"p-3",children:(0,da.jsx)("div",{className:"space-y-1",children:(0,da.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,da.jsx)(oi.Settings,{className:"da-5 w-5"}),(0,da.jsx)("span",{children:"Settings"})]})})}),(0,da.jsx)(I,{})]});return a?(0,da.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",n),children:Pe}):(0,da.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",n),children:Pe})}var xt=$(require("react")),Se=$(require("@radix-ui/react-avatar"));var Oe=xt.forwardRef(({className:e,...t},a)=>(0,da.jsx)(Se.Root,{ref:a,className:c("relative flex da-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Oe.displayName=Se.Root.displayName;var Ot=xt.forwardRef(({className:e,...t},a)=>(0,da.jsx)(Se.Image,{ref:a,className:c("aspect-square da-full w-full",e),...t}));Ot.displayName=Se.Image.displayName;var Ge=xt.forwardRef(({className:e,...t},a)=>(0,da.jsx)(Se.Fallback,{ref:a,className:c("flex da-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Ge.displayName=Se.Fallback.displayName;var Pa=$(require("react")),he=$(require("@radix-ui/react-tooltip"));var Ct=he.Provider,Nt=he.Root,kt=he.Trigger,nt=Pa.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,da.jsx)(he.Portal,{children:(0,da.jsx)(he.Content,{ref:i,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})}));nt.displayName=he.Content.displayName;var Ta=require("next-themes");function Sa(){let{setTheme:e,theme:t}=(0,Ta.useTheme)();return(0,da.jsx)(Ct,{children:(0,da.jsxs)(Nt,{children:[(0,da.jsx)(kt,{asChild:!0,children:(0,da.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,da.jsx)(oi.Sun,{className:"da-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,da.jsx)(oi.Moon,{className:"absolute da-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,da.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,da.jsx)(nt,{children:"Toggle theme"})]})})}function Ra({notifications:e,open:t,onClose:a,onNotificationRemove:i,onRemoveAll:s,className:r}){let l=e.filter(u=>!u.read),n=l.length,m=u=>{switch(u){case"info":return(0,da.jsx)(oi.Info,{className:"da-5 w-5 text-blue-500"});case"success":return(0,da.jsx)(oi.Check,{className:"da-5 w-5 text-green-500"});case"warning":return(0,da.jsx)(oi.AlertTriangle,{className:"da-5 w-5 text-amber-500"});case"error":return(0,da.jsx)(oi.AlertTriangle,{className:"da-5 w-5 text-red-500"})}};return(0,da.jsx)(St.AnimatePresence,{children:t&&(0,da.jsxs)(da.Fragment,{children:[(0,da.jsx)(St.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,da.jsx)(St.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,da.jsxs)("div",{className:"flex da-full flex-col",children:[(0,da.jsxs)("div",{className:"flex items-center justify-between border-da p-4",children:[(0,da.jsxs)("div",{className:"flex items-center gap-2",children:[(0,da.jsx)(oi.Bell,{className:"da-5 w-5"}),(0,da.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),n>0&&(0,da.jsxs)(de,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[n," new"]})]}),(0,da.jsxs)(P,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,da.jsx)(oi.X,{className:"da-5 w-5"}),(0,da.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n>0&&(0,da.jsxs)("div",{className:"flex items-center justify-between border-da p-2",children:[(0,da.jsxs)("span",{className:"text-sm text-muted-foreground",children:[n," unread notification",n!==1?"s":""]}),(0,da.jsx)(P,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),l.length>0?(0,da.jsx)(xe,{className:"flex-1",children:(0,da.jsx)("div",{className:"divide-y",children:l.map(u=>(0,da.jsxs)("div",{className:c("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,da.jsx)("div",{className:"flex da-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:m(u.type)}),(0,da.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,da.jsxs)("div",{className:"flex items-center justify-between",children:[(0,da.jsx)("p",{className:"font-medium",children:u.title}),(0,da.jsxs)("div",{className:"flex items-center gap-2",children:[(0,da.jsx)("p",{className:"text-xs text-muted-foreground",children:u.time}),(0,da.jsx)(P,{variant:"ghost",size:"sm",className:"da-6 w-6 p-0",onClick:()=>i?.(u.id),title:"Dismiss",children:(0,da.jsx)(oi.Check,{className:"da-3 w-3"})})]})]}),(0,da.jsx)("p",{className:"text-sm text-muted-foreground",children:u.description}),u.actionLabel&&(0,da.jsxs)(P,{variant:"link",size:"sm",className:"da-auto p-0 text-sm",onClick:u.onAction,children:[u.actionLabel,(0,da.jsx)(oi.ChevronRight,{className:"ml-1 da-3 w-3"})]})]})]},u.id))})}):(0,da.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,da.jsx)("div",{className:"flex da-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,da.jsx)(oi.Bell,{className:"da-8 w-8 text-muted-foreground"})}),(0,da.jsx)("h3",{className:"da-4 text-lg font-medium",children:"No notifications"}),(0,da.jsx)("p",{className:"da-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Ve=$(require("@radix-ui/react-tabs"));function Aa({className:e,...t}){return(0,da.jsx)(Ve.Root,{"data-slot":"tabs",className:c("flex flex-col gap-2",e),...t})}function Ia({className:e,...t}){return(0,da.jsx)(Ve.List,{"data-slot":"tabs-list",className:c("bg-muted text-muted-foreground inline-flex da-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function Ma({className:e,...t}){return(0,da.jsx)(Ve.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 da-[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=$(require("react")),k=$(require("@radix-ui/react-dropdown-menu")),Je=require("@radix-ui/react-icons");var La=k.Root,Ba=k.Trigger;var co=Re.forwardRef(({className:e,inset:t,children:a,...i},s)=>(0,da.jsxs)(k.SubTrigger,{ref:s,className:c("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[a,(0,da.jsx)(Je.ChevronRightIcon,{className:"ml-auto"})]}));co.displayName=k.SubTrigger.displayName;var po=Re.forwardRef(({className:e,...t},a)=>(0,da.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}));po.displayName=k.SubContent.displayName;var Vt=Re.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,da.jsx)(k.Portal,{children:(0,da.jsx)(k.Content,{ref:i,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})}));Vt.displayName=k.Content.displayName;var Wt=Re.forwardRef(({className:e,inset:t,...a},i)=>(0,da.jsx)(k.Item,{ref:i,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}));Wt.displayName=k.Item.displayName;var mo=Re.forwardRef(({className:e,children:t,checked:a,...i},s)=>(0,da.jsxs)(k.CheckboxItem,{ref:s,className:c("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...i,children:[(0,da.jsx)("span",{className:"absolute left-2 flex da-3.5 w-3.5 items-center justify-center",children:(0,da.jsx)(k.ItemIndicator,{children:(0,da.jsx)(Je.CheckIcon,{className:"da-4 w-4"})})}),t]}));mo.displayName=k.CheckboxItem.displayName;var uo=Re.forwardRef(({className:e,children:t,...a},i)=>(0,da.jsxs)(k.RadioItem,{ref:i,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,da.jsx)("span",{className:"absolute left-2 flex da-3.5 w-3.5 items-center justify-center",children:(0,da.jsx)(k.ItemIndicator,{children:(0,da.jsx)(Je.DotFilledIcon,{className:"da-4 w-4 fill-current"})})}),t]}));uo.displayName=k.RadioItem.displayName;var go=Re.forwardRef(({className:e,inset:t,...a},i)=>(0,da.jsx)(k.Label,{ref:i,className:c("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));go.displayName=k.Label.displayName;var fo=Re.forwardRef(({className:e,...t},a)=>(0,da.jsx)(k.Separator,{ref:a,className:c("-mx-1 my-1 da-px bg-muted",e),...t}));fo.displayName=k.Separator.displayName;var bo=({className:e,...t})=>(0,da.jsx)("span",{className:c("ml-auto text-xs tracking-widest opacity-60",e),...t});bo.displayName="DropdownMenuShortcut";function za({activeTab:e,onTabChange:t,tabOptions:a,className:i="",maxWidth:s="700px",gridCols:r=6}){let l=a.find(n=>n.value===e);return(0,da.jsxs)($t.motion.div,{className:`flex-1 flex justify-center ${i}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,da.jsx)("div",{className:"hidden md:block",children:(0,da.jsx)(Aa,{value:e,onValueChange:t,children:(0,da.jsx)(Ia,{className:"grid w-full rounded-2xl p-0 da-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,da.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,da.jsx)(Ma,{value:n.value,className:"w-full da-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,da.jsx)("div",{className:"md:hidden",children:(0,da.jsxs)(La,{children:[(0,da.jsx)(Ba,{asChild:!0,children:(0,da.jsxs)(P,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[l?.label||"Select",(0,da.jsx)(oi.ChevronDown,{className:"da-4 w-4 ml-2"})]})}),(0,da.jsx)(Vt,{align:"center",className:"w-[180px]",children:a.map(n=>(0,da.jsx)(Wt,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function Ua({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:i,sidebarOpen:s=!0,className:r,activeTab:l="assistant",onTabChange:n,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,da.jsx)(oi.Bot,{className:"mr-2 da-4 w-4"}),actionText:y="Action",onNotificationRemove:T,onRemoveAll:E,logo:S="/headerlogo.png",appName:x="Nuvia",tagline:R="Collaboration Platform"}){let[z,w]=(0,si.useState)(!1),[L,Q]=(0,si.useState)(t),X=L.filter(G=>!G.read).length,Y=G=>{Q(ee=>ee.filter(ne=>ne.id!==G)),T?.(G)},J=()=>{Q(G=>G.filter(ee=>ee.read)),E?.()};return(0,da.jsxs)(da.Fragment,{children:[(0,da.jsxs)("header",{className:`sticky top-0 z-10 flex da-16 items-center gap-3 px-4 backdrop-blur ${r||""}`,children:[(0,da.jsx)(P,{variant:"ghost",size:"icon",className:"md:hidden",onClick:i,children:(0,da.jsx)(oi.Menu,{className:"da-5 w-5"})}),(0,da.jsx)(P,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,da.jsx)(oi.PanelLeft,{className:"da-5 w-5"})}),!s&&(0,da.jsxs)(St.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,da.jsx)("div",{className:"flex da-10 w-10 items-center justify-center",children:(0,da.jsx)("img",{src:S,alt:"Logo",className:"da-10 w-10 object-contain"})}),(0,da.jsxs)("div",{children:[(0,da.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,da.jsx)("p",{className:"text-xs text-muted-foreground",children:R})]})]}),(0,da.jsxs)("div",{className:"flex flex-1 items-center",children:[m&&(0,da.jsx)(za,{activeTab:l,onTabChange:n,tabOptions:u}),(0,da.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,da.jsx)(St.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,da.jsx)(St.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,da.jsxs)(P,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:D,children:[f,y]})})}),(0,da.jsx)(Sa,{}),(0,da.jsx)(Ct,{children:(0,da.jsxs)(Nt,{children:[(0,da.jsx)(kt,{asChild:!0,children:(0,da.jsx)(St.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,da.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>w(!0),children:[(0,da.jsx)(St.motion.div,{animate:X>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:X>0?1/0:0,repeatDelay:3},children:(0,da.jsx)(oi.Bell,{className:"da-5 w-5"})}),X>0&&(0,da.jsx)(St.motion.span,{className:"absolute -right-1 -top-1 flex da-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,da.jsx)(nt,{children:"Notifications"})]})}),(0,da.jsx)(St.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,da.jsxs)(Oe,{className:"da-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,da.jsx)(Ot,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,da.jsx)(Ge,{})]})})]})]})]}),(0,da.jsx)(Ra,{notifications:L,open:z,onClose:()=>w(!1),onNotificationRemove:Y,onRemoveAll:J})]})}var Fa=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,da.jsx)(oi.User,{className:"da-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ha({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:i=[],currentBusinessUnit:s=Fa[0],onBusinessUnitChange:r,onSearch:l,businessUnits:n=Fa,activeTab:m,onTabChange:u,showTabs:D=!1,onActionClick:f,actionIcon:y,actionText:T="Action",onNotificationRemove:E,onRemoveAll:S,logo:x="/headerlogo.png",appName:R="Nuvia",tagline:z="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[L,Q]=(0,si.useState)(!w),[X,Y]=(0,si.useState)(!1),[J,G]=(0,si.useState)(s),ee=ne=>{G(ne),r?.(ne)};return(0,da.jsxs)("div",{className:"flex da-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[X&&(0,da.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>Y(!1)}),(0,da.jsx)("div",{className:"md:hidden",children:(0,da.jsx)(Ht,{items:e,isOpen:X,isMobile:!0,onClose:()=>Y(!1),currentBusinessUnit:J,onBusinessUnitChange:ee,onSearch:l,logo:x,appName:R,tagline:z})}),(0,da.jsx)("div",{className:"hidden md:block",children:(0,da.jsx)(Ht,{items:e,isOpen:L,isMobile:!1,currentBusinessUnit:J,onBusinessUnitChange:ee,onSearch:l,logo:x,appName:R,tagline:z})}),(0,da.jsxs)("div",{className:c("min-da-screen fixed w-full transition-all duration-300 ease-in-out",L?"md:pl-64":"md:pl-0"),children:[(0,da.jsx)(Ua,{title:a,notifications:i,onToggleSidebar:()=>Q(!L),onToggleMobileMenu:()=>Y(!0),sidebarOpen:L,activeTab:m,onTabChange:u,showTabs:D,onActionClick:f,actionIcon:y,actionText:T,onNotificationRemove:E,onRemoveAll:S,logo:x,appName:R,tagline:z}),(0,da.jsx)("main",{className:"flex-1 p-0 flex flex-col da-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var We=$(require("react"));var ge=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));ge.displayName="Card";var Ae=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("flex flex-col space-y-1.5 p-6",e),...t}));Ae.displayName="CardHeader";var Ie=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("font-semibold leading-none tracking-tight",e),...t}));Ie.displayName="CardTitle";var qt=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("text-sm text-muted-foreground",e),...t}));qt.displayName="CardDescription";var Ne=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("p-6 pt-0",e),...t}));Ne.displayName="CardContent";var lt=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("flex items-center p-6 pt-0",e),...t}));lt.displayName="CardFooter";function Oa({sessions:e,currentSession:t,teams:a,onNewChat:i,onSessionSelect:s,onSessionEdit:r,onSessionDelete:l,className:n}){return(0,da.jsx)("div",{className:`space-y-4 da-full ${n||""}`,children:(0,da.jsxs)(ge,{className:"shadow-sm da-full",children:[(0,da.jsx)("div",{className:"p-4 border-da",children:(0,da.jsxs)("div",{className:"flex items-center justify-between",children:[(0,da.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,da.jsx)(oi.Clock,{className:"da-4 w-4"}),"Recent Chats"]}),(0,da.jsxs)(P,{onClick:i,size:"sm",className:"gap-1 da-7 px-2 rounded-lg shadow-sm",children:[(0,da.jsx)(oi.Plus,{className:"da-3 w-3"}),"New"]})]})}),(0,da.jsx)(xe,{className:"da-[600px]",children:(0,da.jsx)("div",{className:"p-2",children:e.length===0?(0,da.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(m=>(0,da.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:()=>s(m),children:(0,da.jsx)("div",{className:"flex items-start gap-3",children:(0,da.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,da.jsxs)("div",{className:"flex items-center justify-between mb-1",children:[(0,da.jsx)("h4",{className:"font-medium text-sm truncate",children:m.title}),(0,da.jsx)("div",{className:"flex items-center gap-1",children:(0,da.jsxs)("div",{className:"opacity-0 group-hover:opacity-100 transition-opacity flex gap-1",children:[r&&(0,da.jsx)(P,{variant:"ghost",size:"icon",className:"da-5 w-5 rounded",onClick:u=>{u.stopPropagation(),r(m.id)},children:(0,da.jsx)(oi.Edit3,{className:"da-3 w-3"})}),l&&(0,da.jsx)(P,{variant:"ghost",size:"icon",className:"da-5 w-5 rounded text-destructive hover:text-destructive",onClick:u=>{u.stopPropagation(),l(m.id)},children:(0,da.jsx)(oi.Trash2,{className:"da-3 w-3"})})]})})]}),(0,da.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:m.lastMessage})]})})},m.id))})})]})})}var Ga={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"]},Va=[{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 _t(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Wa({capabilities:e,isOpen:t,onToggle:a,onActionSelect:i,onContextChange:s,colorScheme:r=Ga,className:l}){let[n,m]=(0,si.useState)([]),[u,D]=(0,si.useState)([]),f=n[n.length-1],y=f?.children||e,T=(w,L)=>{switch(w.type){case"category":return r.categories[L%r.categories.length];case"list":return r.lists[L%r.lists.length];case"item":return r.items[L%r.items.length];default:return r.primary}},E=(0,si.useMemo)(()=>({path:n,selectedItems:u,filters:{}}),[n,u]);(0,si.useEffect)(()=>{s&&s(E)},[E,s]);let S=w=>{w.type==="category"||w.type==="list"?m([...n,w]):w.type==="item"&&D([...u,w])},x=()=>{m(n.slice(0,-1))},R=w=>{m(n.slice(0,w+1))},z=()=>f?.actions?f.actions:[];return t?(0,da.jsxs)("div",{className:c("w-full",l),children:[(0,da.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,da.jsxs)("div",{className:"flex items-center gap-2",children:[n.length>0&&(0,da.jsx)(St.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 da-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,da.jsx)(oi.ChevronLeft,{className:c("da-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,da.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,da.jsx)(St.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 da-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,da.jsx)(oi.X,{className:c("da-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),n.length>0&&(0,da.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,da.jsx)(St.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,da.jsxs)("span",{className:"relative",children:["Capabilities",(0,da.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 da-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),n.map((w,L)=>(0,da.jsxs)("div",{className:"flex items-center gap-1",children:[(0,da.jsx)(oi.ChevronRight,{className:"da-2 w-2"}),(0,da.jsx)(St.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>R(L),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,da.jsxs)("span",{className:"relative",children:[w.name,(0,da.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 da-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},w.id))]}),(0,da.jsx)("div",{className:"max-da-40 overflow-y-auto",children:(0,da.jsx)(St.AnimatePresence,{mode:"wait",children:(0,da.jsx)(St.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,da.jsx)(yo,{data:f.data,onItemSelect:w=>D([...u,w]),colorScheme:r}):(0,da.jsx)(ho,{capabilities:y,onSelect:S,colorScheme:r})},f?.id||"root")})})]}):(0,da.jsxs)(P,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,da.jsx)(oi.Menu,{className:"da-4 w-4"}),(0,da.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function ho({capabilities:e,onSelect:t,colorScheme:a}){return(0,da.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((i,s)=>(0,da.jsx)(vo,{capability:i,onClick:()=>t(i),color:a.categories[s%a.categories.length]},i.id))})}function vo({capability:e,onClick:t,selected:a,color:i}){return(0,da.jsxs)(St.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,da.jsx)("div",{className:c("w-2 da-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",i)}),(0,da.jsxs)("span",{className:"truncate relative",children:[e.name,(0,da.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 da-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,da.jsx)(oi.ChevronRight,{className:c("da-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,da.jsx)(de,{variant:"secondary",className:c("text-xs da-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function yo({data:e,onItemSelect:t,colorScheme:a}){return(0,da.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((i,s)=>(0,da.jsxs)(St.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(i),children:[(0,da.jsx)("div",{className:c("w-2 da-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[s%a.items.length])}),(0,da.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,da.jsxs)("span",{className:"truncate relative font-medium",children:[i.title,(0,da.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 da-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),i.subtitle&&(0,da.jsx)("div",{className:c("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:i.subtitle})]}),i.value&&(0,da.jsx)(de,{variant:"secondary",className:c("text-xs da-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:i.value})]},i.id))})}var qa=require("date-fns");function $a({taskId:e,polling:t=!0,system:a="payload"}){let[i,s]=(0,si.useState)(null),[r,l]=(0,si.useState)(!1),[n,m]=(0,si.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 T=await y.json();s(T)}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,si.useEffect)(()=>{e&&u(!0);let f=null;return e&&t&&(f=setInterval(D,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:i,loading:r,error:n}}var xo=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"}},wo=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:i,taskData:s,error:r}=e||{};if(!t)return null;let l=null,n=!0,m=r,u=i!==void 0?i:!0;if(l=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:i,system:a,fetchLatest:u,taskData:l,error:m}),u){let{task:T,loading:E,error:S}=$a({taskId:t,system:a});l=T,n=E,m=S}else n=!1;let D=xo(l?.status||"todo"),f=wo(l?.status||"todo"),y=l?.dateLogged||new Date().toISOString();try{let T=new Date(l?.dateLogged||"");isNaN(T.getTime())||(y=(0,qa.formatDistanceToNow)(T,{addSuffix:!0}))}catch{}return(0,da.jsxs)(ge,{className:c("w-full max-w-md shadow-md",m&&"border border-destructive"),children:[(0,da.jsxs)(Ae,{className:"pb-2",children:[(0,da.jsxs)("div",{className:"flex justify-between items-start",children:[(0,da.jsx)(Ie,{className:"text-lg font-semibold",children:n?"Loading...":l?.name||"Task"}),(0,da.jsx)(de,{className:`${D}`,children:f})]}),l?.project&&(0,da.jsxs)(qt,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,da.jsx)(Ne,{className:"pb-2",children:n?(0,da.jsx)("div",{className:"animate-pulse da-4 bg-gray-200 rounded w-3/4 mb-2"}):m?(0,da.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,da.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,da.jsx)(lt,{className:"pt-2 flex items-center justify-between",children:(0,da.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,da.jsx)(oi.Clock,{className:"da-3 w-3 mr-1"}),(0,da.jsxs)("span",{children:["Created ",y]}),(0,da.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,da.jsxs)("span",{children:["Task #",t]})]})})]})}function Xa({artefact:e,taskId:t,taskData:a,loading:i=!1,error:s=null}){let r=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=r.dateLogged;try{let n=new Date(r.dateLogged);isNaN(n.getTime())||(l=(0,qa.formatDistanceToNow)(n,{addSuffix:!0}))}catch{}return(0,da.jsxs)(ge,{className:"w-full max-w-md shadow-md",children:[(0,da.jsx)(Ae,{className:"pb-2",children:(0,da.jsx)("div",{className:"flex justify-between items-start",children:(0,da.jsx)(Ie,{className:"text-lg font-semibold",children:i?"Loading...":r.name})})}),(0,da.jsx)(Ne,{className:"pb-2",children:i?(0,da.jsx)("div",{className:"animate-pulse da-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,da.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,da.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,da.jsx)(lt,{className:"pt-2 flex items-center justify-between",children:(0,da.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,da.jsx)(oi.Clock,{className:"da-3 w-3 mr-1"}),(0,da.jsxs)("span",{children:["Created ",l]}),(0,da.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,da.jsxs)("span",{children:["Task #",r.id]})]})})]})}function Ya(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}var ei=$(require("react"));var Za=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:i,description:s="This endpoint requires authentication to sync functions."})=>{let[r,l]=(0,si.useState)(!1),[n,m]=(0,si.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),i(),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,da.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,da.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,da.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,da.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s}),n&&(0,da.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:n}),(0,da.jsxs)("div",{className:"flex gap-2",children:[(0,da.jsx)("button",{onClick:u,disabled:r||!t,className:`
5
+ "use strict";var Ni=Object.create;var gt=Object.defineProperty;var ki=Object.getOwnPropertyDescriptor;var Di=Object.getOwnPropertyNames;var Pi=Object.getPrototypeOf,Ti=Object.prototype.hasOwnProperty;var Si=(e,t)=>{for(var a in t)gt(e,a,{get:t[a],enumerable:!0})},ta=(e,t,a,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let s of Di(t))!Ti.call(e,s)&&s!==a&&gt(e,s,{get:()=>t[s],enumerable:!(i=ki(t,s))||i.enumerable});return e};var $=(e,t,a)=>(a=e!=null?Ni(Pi(e)):{},ta(t||!e||!e.__esModule?gt(a,"default",{value:e,enumerable:!0}):a,e)),Ri=e=>ta(gt({},"__esModule",{value:!0}),e);var Ro={};Si(Ro,{ChatDemoLongMessages:()=>So});module.exports=Ri(Ro);var mi=require("react");var si=require("@ai-sdk/react"),St=require("framer-motion"),li=require("lucide-react");var da=require("clsx");var Mt="-",Ai=e=>{let t=Mi(e),{conflictingClassGroups:a,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{let n=l.split(Mt);return n[0]===""&&n.length!==1&&n.shift(),oa(n,t)||Ii(l)},getConflictingClassGroupIds:(l,n)=>{let p=a[l]||[];return n&&i[l]?[...p,...i[l]]:p}}},oa=(e,t)=>{if(e.length===0)return t.classGroupId;let a=e[0],i=t.nextPart.get(a),s=i?oa(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;let r=e.join(Mt);return t.validators.find(({validator:l})=>l(r))?.classGroupId},aa=/^\[(.+)\]$/,Ii=e=>{if(aa.test(e)){let t=aa.exec(e)[1],a=t?.substring(0,t.indexOf(":"));if(a)return"arbitrary.."+a}},Mi=e=>{let{theme:t,prefix:a}=e,i={nextPart:new Map,validators:[]};return Li(Object.entries(e.classGroups),a).forEach(([r,l])=>{It(l,i,r,t)}),i},It=(e,t,a,i)=>{e.forEach(s=>{if(typeof s=="string"){let r=s===""?t:ia(t,s);r.classGroupId=a;return}if(typeof s=="function"){if(Bi(s)){It(s(i),t,a,i);return}t.validators.push({validator:s,classGroupId:a});return}Object.entries(s).forEach(([r,l])=>{It(l,ia(t,r),a,i)})})},ia=(e,t)=>{let a=e;return t.split(Mt).forEach(i=>{a.nextPart.has(i)||a.nextPart.set(i,{nextPart:new Map,validators:[]}),a=a.nextPart.get(i)}),a},Bi=e=>e.isThemeGetter,Li=(e,t)=>t?e.map(([a,i])=>{let s=i.map(r=>typeof r=="string"?t+r:typeof r=="object"?Object.fromEntries(Object.entries(r).map(([l,n])=>[t+l,n])):r);return[a,s]}):e,zi=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,a=new Map,i=new Map,s=(r,l)=>{a.set(r,l),t++,t>e&&(t=0,i=a,a=new Map)};return{get(r){let l=a.get(r);if(l!==void 0)return l;if((l=i.get(r))!==void 0)return s(r,l),l},set(r,l){a.has(r)?a.set(r,l):s(r,l)}}},ra="!",Ei=e=>{let{separator:t,experimentalParseClassName:a}=e,i=t.length===1,s=t[0],r=t.length,l=n=>{let p=[],u=0,D=0,f;for(let x=0;x<n.length;x++){let R=n[x];if(u===0){if(R===s&&(i||n.slice(x,x+r)===t)){p.push(n.slice(D,x)),D=x+r;continue}if(R==="/"){f=x;continue}}R==="["?u++:R==="]"&&u--}let y=p.length===0?n:n.substring(D),T=y.startsWith(ra),U=T?y.substring(1):y,S=f&&f>D?f-D:void 0;return{modifiers:p,hasImportantModifier:T,baseClassName:U,maybePostfixModifierPosition:S}};return a?n=>a({className:n,parseClassName:l}):l},Ui=e=>{if(e.length<=1)return e;let t=[],a=[];return e.forEach(i=>{i[0]==="["?(t.push(...a.sort(),i),a=[]):a.push(i)}),t.push(...a.sort()),t},Fi=e=>({cache:zi(e.cacheSize),parseClassName:Ei(e),...Ai(e)}),ji=/\s+/,Hi=(e,t)=>{let{parseClassName:a,getClassGroupId:i,getConflictingClassGroupIds:s}=t,r=[],l=e.trim().split(ji),n="";for(let p=l.length-1;p>=0;p-=1){let u=l[p],{modifiers:D,hasImportantModifier:f,baseClassName:y,maybePostfixModifierPosition:T}=a(u),U=!!T,S=i(U?y.substring(0,T):y);if(!S){if(!U){n=u+(n.length>0?" "+n:n);continue}if(S=i(y),!S){n=u+(n.length>0?" "+n:n);continue}U=!1}let x=Ui(D).join(":"),R=f?x+ra:x,F=R+S;if(r.includes(F))continue;r.push(F);let w=s(S,U);for(let L=0;L<w.length;++L){let Y=w[L];r.push(R+Y)}n=u+(n.length>0?" "+n:n)}return n};function Oi(){let e=0,t,a,i="";for(;e<arguments.length;)(t=arguments[e++])&&(a=na(t))&&(i&&(i+=" "),i+=a);return i}var na=e=>{if(typeof e=="string")return e;let t,a="";for(let i=0;i<e.length;i++)e[i]&&(t=na(e[i]))&&(a&&(a+=" "),a+=t);return a};function Gi(e,...t){let a,i,s,r=l;function l(p){let u=t.reduce((D,f)=>f(D),e());return a=Fi(u),i=a.cache.get,s=a.cache.set,r=n,n(p)}function n(p){let u=i(p);if(u)return u;let D=Hi(p,a);return s(p,D),D}return function(){return r(Oi.apply(null,arguments))}}var j=e=>{let t=a=>a[e]||[];return t.isThemeGetter=!0,t},sa=/^\[(?:([a-z-]+):)?(.+)\]$/i,Vi=/^\d+\/\d+$/,Wi=new Set(["px","full","screen"]),$i=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ki=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|pa|i|pa|min|max))|\pa(calc|min|max|clamp)\(.+\)|^0$/,qi=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_i=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ji=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pe=e=>qe(e)||Wi.has(e)||Vi.test(e),Be=e=>_e(e,"length",io),qe=e=>!!e&&!Number.isNaN(Number(e)),At=e=>_e(e,"number",qe),ot=e=>!!e&&Number.isInteger(Number(e)),Qi=e=>e.endsWith("%")&&qe(e.slice(0,-1)),v=e=>sa.test(e),Le=e=>$i.test(e),Xi=new Set(["length","size","percentage"]),Yi=e=>_e(e,Xi,la),Zi=e=>_e(e,"position",la),eo=new Set(["image","url"]),to=e=>_e(e,eo,ro),ao=e=>_e(e,"",oo),rt=()=>!0,_e=(e,t,a)=>{let i=sa.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):a(i[2]):!1},io=e=>Ki.test(e)&&!qi.test(e),la=()=>!1,oo=e=>_i.test(e),ro=e=>Ji.test(e);var no=()=>{let e=j("colors"),t=j("spacing"),a=j("blur"),i=j("brightness"),s=j("borderColor"),r=j("borderRadius"),l=j("borderSpacing"),n=j("borderWidth"),p=j("contrast"),u=j("grayscale"),D=j("hueRotate"),f=j("invert"),y=j("gap"),T=j("gradientColorStops"),U=j("gradientColorStopPositions"),S=j("inset"),x=j("margin"),R=j("opacity"),F=j("padding"),w=j("saturate"),L=j("scale"),Y=j("sepia"),Z=j("skew"),ee=j("space"),Q=j("translate"),V=()=>["auto","contain","none"],ae=()=>["auto","hidden","clip","visible","scroll"],ne=()=>["auto",v,t],I=()=>[v,t],De=()=>["",Pe,Be],d=()=>["auto",qe,v],B=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],N=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],m=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",v],W=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>[qe,v];return{cacheSize:500,separator:":",theme:{colors:[rt],spacing:[Pe,Be],blur:["none","",Le,v],brightness:z(),borderColor:[e],borderRadius:["none","","full",Le,v],borderSpacing:I(),borderWidth:De(),contrast:z(),grayscale:O(),hueRotate:z(),invert:O(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Qi,Be],inset:ne(),margin:ne(),opacity:z(),padding:I(),saturate:z(),scale:z(),sepia:O(),skew:z(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",v]}],container:["container"],columns:[{columns:[Le]}],"break-after":[{"break-after":W()}],"break-before":[{"break-before":W()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...B(),v]}],overflow:[{overflow:ae()}],"overflow-x":[{"overflow-x":ae()}],"overflow-y":[{"overflow-y":ae()}],overscroll:[{overscroll:V()}],"overscroll-x":[{"overscroll-x":V()}],"overscroll-y":[{"overscroll-y":V()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ot,v]}],basis:[{basis:ne()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",v]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",ot,v]}],"grid-cols":[{"grid-cols":[rt]}],"col-start-end":[{col:["auto",{span:["full",ot,v]},v]}],"col-start":[{"col-start":d()}],"col-end":[{"col-end":d()}],"grid-rows":[{"grid-rows":[rt]}],"row-start-end":[{row:["auto",{span:[ot,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",...m()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...m(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...m(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[F]}],px:[{px:[F]}],py:[{py:[F]}],ps:[{ps:[F]}],pe:[{pe:[F]}],pt:[{pt:[F]}],pr:[{pr:[F]}],pb:[{pb:[F]}],pl:[{pl:[F]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],pa:[{pa:[x]}],mi:[{mi:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[ee]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[ee]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",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]}],pa:[{pa:[v,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-pa":[{"min-pa":[v,t,"min","max","fit","svh","lvh","dvh"]}],"max-pa":[{"max-pa":[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",At]}],"font-family":[{font:[rt]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",v]}],"line-clamp":[{"line-clamp":["none",qe,At]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Pe,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":[R]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[R]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...N(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Pe,Be]}],"underline-offset":[{"underline-offset":["auto",Pe,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":[R]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...B(),Zi]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Yi]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","pa","bl","l","tl"]},to]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[U]}],"gradient-via-pos":[{via:[U]}],"gradient-to-pos":[{to:[U]}],"gradient-from":[{from:[T]}],"gradient-via":[{via:[T]}],"gradient-to":[{to:[T]}],rounded:[{rounded:[r]}],"rounded-s":[{"rounded-s":[r]}],"rounded-e":[{"rounded-e":[r]}],"rounded-t":[{"rounded-t":[r]}],"rounded-r":[{"rounded-r":[r]}],"rounded-pa":[{"rounded-pa":[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:[n]}],"border-w-x":[{"border-x":[n]}],"border-w-y":[{"border-y":[n]}],"border-w-s":[{"border-s":[n]}],"border-w-e":[{"border-e":[n]}],"border-w-t":[{"border-t":[n]}],"border-w-r":[{"border-r":[n]}],"border-w-pa":[{"border-pa":[n]}],"border-w-l":[{"border-l":[n]}],"border-opacity":[{"border-opacity":[R]}],"border-style":[{border:[...N(),"hidden"]}],"divide-x":[{"divide-x":[n]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[n]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[R]}],"divide-style":[{divide:N()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-pa":[{"border-pa":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...N()]}],"outline-offset":[{"outline-offset":[Pe,v]}],"outline-w":[{outline:[Pe,Be]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:De()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[R]}],"ring-offset-w":[{"ring-offset":[Pe,Be]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Le,ao]}],"shadow-color":[{shadow:[rt]}],opacity:[{opacity:[R]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[a]}],brightness:[{brightness:[i]}],contrast:[{contrast:[p]}],"drop-shadow":[{"drop-shadow":["","none",Le,v]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[D]}],invert:[{invert:[f]}],saturate:[{saturate:[w]}],sepia:[{sepia:[Y]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[a]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[p]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[D]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[R]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"backdrop-sepia":[{"backdrop-sepia":[Y]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",v]}],duration:[{duration:z()}],ease:[{ease:["linear","in","out","in-out",v]}],delay:[{delay:z()}],animate:[{animate:["none","spin","ping","pulse","bounce",v]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[L]}],"scale-x":[{"scale-x":[L]}],"scale-y":[{"scale-y":[L]}],rotate:[{rotate:[ot,v]}],"translate-x":[{"translate-x":[Q]}],"translate-y":[{"translate-y":[Q]}],"skew-x":[{"skew-x":[Z]}],"skew-y":[{"skew-y":[Z]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",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-pa":[{"scroll-pa":I()}],"scroll-mi":[{"scroll-mi":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-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":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:[Pe,Be,At]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","pa","mi","mr","mb","ml"],mx:["mr","ml"],my:["mi","mb"],size:["w","pa"],"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-pa","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-pa":["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-pa","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-pa"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-pa","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-pa"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-pa","scroll-mi","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mi","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var ca=Gi(no);function c(...e){return ca((0,da.clsx)(e))}var Ct=$(require("react")),jt=$(require("next/link"));var ma=require("class-variance-authority");var pa=require("react/jsx-runtime"),so=(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 le({className:e,variant:t,...a}){return(0,pa.jsx)("div",{className:c(so({variant:t}),e),...a})}var ua=require("@radix-ui/react-slot"),fa=$(require("react")),lo=(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:"pa-10 px-4 py-2",icon:"pa-10 w-10",lg:"pa-11 rounded px-8",sm:"pa-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=fa.forwardRef(({asChild:e=!1,className:t,size:a,variant:i,...s},r)=>(0,pa.jsx)(e?ua.Slot:"button",{className:c(lo({className:t,size:a,variant:i})),ref:r,...s}));P.displayName="Button";var ha=$(require("react"));var nt=ha.forwardRef(({className:e,type:t,...a},i)=>(0,pa.jsx)("input",{type:t,className:c("flex pa-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:i,...a}));nt.displayName="Input";var Bt=$(require("react")),de=$(require("@radix-ui/react-scroll-area"));var ye=Bt.forwardRef(({className:e,children:t,...a},i)=>(0,pa.jsxs)(de.Root,{ref:i,className:c("relative overflow-hidden",e),...a,children:[(0,pa.jsx)(de.Viewport,{className:"pa-full w-full rounded-[inherit]",children:t}),(0,pa.jsx)(ya,{}),(0,pa.jsx)(de.Corner,{})]}));ye.displayName=de.Root.displayName;var ya=Bt.forwardRef(({className:e,orientation:t="vertical",...a},i)=>(0,pa.jsx)(de.ScrollAreaScrollbar,{ref:i,orientation:t,className:c("flex touch-none select-none transition-colors",t==="vertical"&&"pa-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"pa-2.5 flex-col border-t border-t-transparent p-[1px]",e),...a,children:(0,pa.jsx)(de.ScrollAreaThumb,{className:"relative flex-1 rounded-full bg-border"})}));ya.displayName=de.ScrollAreaScrollbar.displayName;var st=$(require("react")),K=$(require("@radix-ui/react-dialog"));var wa=K.Root;var co=K.Portal;var Ca=st.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(K.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}));Ca.displayName=K.Overlay.displayName;var Lt=st.forwardRef(({className:e,children:t,...a},i)=>(0,pa.jsxs)(co,{children:[(0,pa.jsx)(Ca,{}),(0,pa.jsxs)(K.Content,{ref:i,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,pa.jsxs)(K.Close,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,pa.jsx)(li.X,{className:"pa-4 w-4"}),(0,pa.jsx)("span",{className:"sr-only",children:"Close"})]})]})]}));Lt.displayName=K.Content.displayName;var zt=({className:e,...t})=>(0,pa.jsx)("div",{className:c("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});zt.displayName="DialogHeader";var mo=({className:e,...t})=>(0,pa.jsx)("div",{className:c("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});mo.displayName="DialogFooter";var Et=st.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(K.Title,{ref:a,className:c("text-lg font-semibold leading-none tracking-tight",e),...t}));Et.displayName=K.Title.displayName;var po=st.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(K.Description,{ref:a,className:c("text-sm text-muted-foreground",e),...t}));po.displayName=K.Description.displayName;var lt=$(require("@radix-ui/react-checkbox")),ka=$(require("react")),Ut=ka.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(lt.Root,{className:c("peer pa-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,pa.jsx)(lt.Indicator,{className:c("flex items-center justify-center text-current"),children:(0,pa.jsx)(li.Check,{className:"pa-4 w-4"})})}));Ut.displayName=lt.Root.displayName;var xe=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,pa.jsx)(li.Palette,{className:"pa-4 w-4"}),color:"bg-purple-600",accentColor:"text-purple-600"},{id:"engineering",name:"Engineering",description:"Software development and technical teams",icon:(0,pa.jsx)(li.Code,{className:"pa-4 w-4"}),color:"bg-blue-600",accentColor:"text-blue-600"},{id:"marketing",name:"Marketing",description:"Brand, campaigns, and growth marketing",icon:(0,pa.jsx)(li.TrendingUp,{className:"pa-4 w-4"}),color:"bg-pink-600",accentColor:"text-pink-600"},{id:"sales",name:"Sales",description:"Revenue generation and customer acquisition",icon:(0,pa.jsx)(li.DollarSign,{className:"pa-4 w-4"}),color:"bg-green-600",accentColor:"text-green-600"},{id:"hr",name:"Human Resources",description:"People operations and talent management",icon:(0,pa.jsx)(li.Users,{className:"pa-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"},{id:"operations",name:"Operations",description:"Business operations and process optimization",icon:(0,pa.jsx)(li.Wrench,{className:"pa-4 w-4"}),color:"bg-indigo-600",accentColor:"text-indigo-600"},{id:"legal",name:"Legal",description:"Legal affairs and compliance",icon:(0,pa.jsx)(li.Scale,{className:"pa-4 w-4"}),color:"bg-slate-600",accentColor:"text-slate-600"},{id:"product",name:"Product",description:"Product strategy and management",icon:(0,pa.jsx)(li.Package,{className:"pa-4 w-4"}),color:"bg-violet-600",accentColor:"text-violet-600"},{id:"it",name:"IT Support",description:"Information technology and infrastructure",icon:(0,pa.jsx)(li.Zap,{className:"pa-4 w-4"}),color:"bg-cyan-600",accentColor:"text-cyan-600"},{id:"company",name:"Company",description:"Company-wide resources and information",icon:(0,pa.jsx)(li.Building2,{className:"pa-4 w-4"}),color:"bg-gray-600",accentColor:"text-gray-600"}],vt=[{id:"1",name:"li-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}],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}],xt=[{id:"1",title:"Design login page",description:"Create wireframes and mockups for the login interface",status:"todo",priority:"high",type:"story",points:5,epicId:"1",sprintId:"2",assignee:"John Doe",createdAt:new Date("2024-01-15")},{id:"2",title:"Implement OAuth integration",description:"Add Google and GitHub OAuth authentication",status:"review",priority:"high",type:"task",points:8,epicId:"1",sprintId:"2",assignee:"Jane Smith",createdAt:new Date("2024-01-16")},{id:"3",title:"Create dashboard widgets",description:"Build analytics and metrics widgets for the main dashboard",status:"todo",priority:"medium",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Mike Johnson",createdAt:new Date("2024-01-17")},{id:"4",title:"Fix login redirect bug",description:"Resolve issue where users are not redirected after login",status:"done",priority:"high",type:"bug",points:3,epicId:"1",sprintId:"1",assignee:"Sarah Wilson",createdAt:new Date("2024-01-14")},{id:"5",title:"Research mobile frameworks",description:"Investigate best practices for mobile responsive design",status:"in-progress",priority:"medium",type:"spike",points:5,epicId:"3",assignee:"Alex Brown",createdAt:new Date("2024-01-18")},{id:"6",title:"Update user profile page",description:"Enhance user profile with new settings and preferences",status:"review",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Emma Davis",createdAt:new Date("2024-01-19")},{id:"7",title:"Performance optimization",description:"Optimize database queries and improve page load times",status:"done",priority:"high",type:"task",points:13,epicId:"4",sprintId:"1",assignee:"Tom Wilson",createdAt:new Date("2024-01-13")}],uo=[...xt,{id:"8",title:"Add search functionality",description:"Implement search across all dashboard widgets",status:"todo",priority:"medium",type:"story",points:8,epicId:"2",sprintId:"2",assignee:"Chris Lee",createdAt:new Date("2024-01-20")},{id:"9",title:"Fix mobile responsive issues",description:"Resolve layout problems on mobile devices",status:"in-progress",priority:"high",type:"bug",points:5,epicId:"3",sprintId:"2",assignee:"Taylor Swift",createdAt:new Date("2024-01-21")},{id:"10",title:"Implement dark mode",description:"Add dark theme support across the application",status:"review",priority:"low",type:"story",points:13,epicId:"2",sprintId:"2",assignee:"Jordan Smith",createdAt:new Date("2024-01-22")},{id:"11",title:"API rate limiting",description:"Implement rate limiting for API endpoints",status:"done",priority:"high",type:"task",points:8,epicId:"4",sprintId:"1",assignee:"Morgan Davis",createdAt:new Date("2024-01-12")},{id:"12",title:"User onboarding flow",description:"Create guided tour for new users",status:"todo",priority:"medium",type:"story",points:21,epicId:"1",sprintId:"2",assignee:"Casey Johnson",createdAt:new Date("2024-01-23")}],go=[...vt,{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}],ht={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:[]},Da={epics:[{id:"1",name:"User Authentication",color:"bg-blue-500",description:"Implement secure user authentication system",confidence:"high",phase:2,startDate:new Date("2024-01-01"),endDate:new Date("2024-02-15"),progress:75,isSelected:!0}],tasks:xt.filter(e=>e.epicId==="1")};var Xo={empty:{initialProjects:ht.projects,initialEpics:ht.epics,initialSprints:ht.sprints,initialTasks:ht.tasks},default:{initialProjects:vt,initialEpics:Ft,initialSprints:bt,initialTasks:xt},highDensity:{initialProjects:vt,initialEpics:Ft,initialSprints:bt,initialTasks:uo},singleEpic:{initialProjects:vt,initialEpics:Da.epics,initialSprints:bt,initialTasks:Da.tasks},multipleProjects:{initialProjects:go,initialEpics:Ft,initialSprints:bt,initialTasks:xt}},yt=[{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(xe),coreKnowledge:["Company coding standards","Architecture patterns","Security guidelines"].map(xe),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(xe),coreKnowledge:["Brand guidelines","Target audience personas","Marketing objectives"].map(xe),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(xe),coreKnowledge:["Company data sources","KPI definitions","Reporting standards"].map(xe),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(xe),coreKnowledge:["Company project templates","Resource availability","Project methodologies"].map(xe),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(xe),coreKnowledge:["Product catalog","Support processes","Escalation procedures"].map(xe),version:"1.8",lastUpdated:new Date("2024-02-25"),isActive:!0}],Yo=[{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:yt.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:yt.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:yt.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 Zo=yt.filter(e=>e.type==="digital");function Ta(e,t){let[a,i]=(0,mi.useState)(()=>{if(typeof window>"u")return t;try{let r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch{return t}}),s=r=>{try{i(r),typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(r))}catch{}};return(0,mi.useEffect)(()=>{s(a)},[]),[a,s]}function Ht({items:e,isOpen:t,isMobile:a=!1,onClose:i,currentBusinessUnit:s=Pa[0],onBusinessUnitChange:r,onSearch:l,className:n,logo:p="/headerlogo.png",appName:u="Nuvia",tagline:D="Collaboration Platform"}){let[f,y]=Ct.useState({}),[T,U]=Ta("sidebar-favorites",{}),[S,x]=Ct.useState(null),[R,F]=Ct.useState(""),w=d=>{y(B=>({...B,[d]:!B[d]}))},L=d=>{r?.(d)},Y=()=>{R.trim()&&l?.(R.trim())},Z=d=>{d.key==="Enter"&&(d.preventDefault(),Y())},ee=(d,B)=>{let N=T[d]||[],se=N.includes(B)?N.filter(m=>m!==B):N.concat(B);U({...T,[d]:se})},Q=d=>{if(!d.items||!d.maxItems||d.items.length<=d.maxItems)return d.items||[];let B=T[d.id]||[],N=d.items.filter(m=>B.includes(m.id)),se=d.items.filter(m=>!B.includes(m.id));return[...N,...se].slice(0,d.maxItems)},V=d=>d.maxItems&&d.items&&d.items.length>d.maxItems,ae=e,ne=d=>{let B=V(d),N=Q(d),se=(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsxs)("div",{className:"flex items-center gap-3",children:[d.icon,(0,pa.jsx)("span",{children:d.title})]}),d.badge&&(0,pa.jsx)(le,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:d.badge}),d.items&&(0,pa.jsx)(li.ChevronDown,{className:c("ml-2 pa-4 w-4 transition-transform",f[d.title]?"rotate-180":"")})]}),m=c("flex w-full items-center justify-between rounded-2xl px-3 py-2 text-sm font-medium",d.isActive?"bg-primary/10 text-primary":"hover:bg-muted");return d.url?(0,pa.jsx)(jt.default,{href:d.url,className:m,onClick:a?i:void 0,children:se}):(0,pa.jsx)("button",{className:m,onClick:()=>d.items&&w(d.title),children:se})},I=()=>{let d=e.find(N=>N.id===S);if(!d||!d.items||!d.maxItems)return null;let B=T[d.id]||[];return(0,pa.jsx)(wa,{open:!!S,onOpenChange:N=>!N&&x(null),children:(0,pa.jsxs)(Lt,{className:"sm:max-w-md",children:[(0,pa.jsxs)(zt,{children:[(0,pa.jsxs)(Et,{children:["Manage ",d.title," Favorites"]}),(0,pa.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Select up to ",d.maxItems," items to show in ",d.title.toLowerCase(),"."]})]}),(0,pa.jsx)(ye,{className:"max-pa-96 pr-4",children:(0,pa.jsx)("div",{className:"space-y-4",children:d.items.map(N=>(0,pa.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,pa.jsx)(Ut,{id:N.id,checked:B.includes(N.id),onCheckedChange:()=>ee(d.id,N.id),disabled:!B.includes(N.id)&&B.length>=(d.maxItems||0)}),(0,pa.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,pa.jsx)(le,{variant:"outline",className:"text-xs",children:N.badge})]})]},N.id))})})]})})},De=(0,pa.jsxs)("div",{className:"flex pa-full flex-col bg-background",children:[(0,pa.jsxs)("div",{className:"flex items-center justify-between p-4",children:[(0,pa.jsxs)("div",{className:"flex items-center gap-3",children:[(0,pa.jsx)("div",{className:"flex pa-14 w-14 items-center justify-center",children:(0,pa.jsx)("img",{src:p,alt:"Header Logo",className:"pa-14 w-14 object-contain"})}),(0,pa.jsxs)("div",{children:[(0,pa.jsx)("h2",{className:"font-semibold",children:u}),(0,pa.jsx)("p",{className:"text-xs text-muted-foreground",children:D})]})]}),a&&(0,pa.jsx)(P,{variant:"ghost",size:"icon",onClick:i,children:(0,pa.jsx)(li.X,{className:"pa-5 w-5"})})]}),(0,pa.jsx)("div",{className:"px-3 py-2",children:(0,pa.jsxs)("div",{className:"relative",children:[(0,pa.jsx)(li.Search,{className:"absolute left-3 top-3 pa-4 w-4 text-muted-foreground"}),(0,pa.jsx)(nt,{type:"search",placeholder:"Search...",className:"w-full rounded-2xl bg-muted pl-9 pr-4 py-2",value:R,onChange:d=>F(d.target.value),onKeyPress:Z})]})}),(0,pa.jsx)(ye,{className:"flex-1 px-3 py-2",children:(0,pa.jsx)("div",{className:"space-y-1",children:ae.map(d=>(0,pa.jsxs)("div",{className:"mb-1",children:[ne(d),d.items&&f[d.title]&&(0,pa.jsxs)("div",{className:"mi-1 ml-6 space-y-1 border-l pl-3",children:[Q(d).map(B=>(0,pa.jsxs)(jt.default,{href:B.url,className:"flex items-center justify-between rounded-2xl px-3 py-2 text-sm hover:bg-muted",onClick:a?i:void 0,children:[B.title,B.badge&&(0,pa.jsx)(le,{variant:"outline",className:"ml-auto rounded-full px-2 py-0.5 text-xs",children:B.badge})]},B.id)),V(d)&&d.items&&d.items.length>Q(d).length&&(0,pa.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-Q(d).length," more available"]})]})]},d.id))})}),(0,pa.jsx)("div",{className:"p-3",children:(0,pa.jsx)("div",{className:"space-y-1",children:(0,pa.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,pa.jsx)(li.Settings,{className:"pa-5 w-5"}),(0,pa.jsx)("span",{children:"Settings"})]})})}),(0,pa.jsx)(I,{})]});return a?(0,pa.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",n),children:De}):(0,pa.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",n),children:De})}var Nt=$(require("react")),Te=$(require("@radix-ui/react-avatar"));var He=Nt.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(Te.Root,{ref:a,className:c("relative flex pa-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));He.displayName=Te.Root.displayName;var Ot=Nt.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(Te.Image,{ref:a,className:c("aspect-square pa-full w-full",e),...t}));Ot.displayName=Te.Image.displayName;var Oe=Nt.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(Te.Fallback,{ref:a,className:c("flex pa-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Oe.displayName=Te.Fallback.displayName;var Sa=$(require("react")),fe=$(require("@radix-ui/react-tooltip"));var Je=fe.Provider,Qe=fe.Root,Xe=fe.Trigger,Ge=Sa.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,pa.jsx)(fe.Portal,{children:(0,pa.jsx)(fe.Content,{ref:i,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})}));Ge.displayName=fe.Content.displayName;var Ra=require("next-themes");function Aa(){let{setTheme:e,theme:t}=(0,Ra.useTheme)();return(0,pa.jsx)(Je,{children:(0,pa.jsxs)(Qe,{children:[(0,pa.jsx)(Xe,{asChild:!0,children:(0,pa.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl",onClick:()=>e(t==="light"?"dark":"light"),children:[(0,pa.jsx)(li.Sun,{className:"pa-5 w-5 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),(0,pa.jsx)(li.Moon,{className:"absolute pa-5 w-5 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),(0,pa.jsx)("span",{className:"sr-only",children:"Toggle theme"})]})}),(0,pa.jsx)(Ge,{children:"Toggle theme"})]})})}function Ia({notifications:e,open:t,onClose:a,onNotificationRemove:i,onRemoveAll:s,className:r}){let l=e.filter(u=>!u.read),n=l.length,p=u=>{switch(u){case"info":return(0,pa.jsx)(li.Info,{className:"pa-5 w-5 text-blue-500"});case"success":return(0,pa.jsx)(li.Check,{className:"pa-5 w-5 text-green-500"});case"warning":return(0,pa.jsx)(li.AlertTriangle,{className:"pa-5 w-5 text-amber-500"});case"error":return(0,pa.jsx)(li.AlertTriangle,{className:"pa-5 w-5 text-red-500"})}};return(0,pa.jsx)(St.AnimatePresence,{children:t&&(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsx)(St.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,pa.jsx)(St.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,pa.jsxs)("div",{className:"flex pa-full flex-col",children:[(0,pa.jsxs)("div",{className:"flex items-center justify-between border-pa p-4",children:[(0,pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,pa.jsx)(li.Bell,{className:"pa-5 w-5"}),(0,pa.jsx)("h2",{className:"text-lg font-semibold",children:"Notifications"}),n>0&&(0,pa.jsxs)(le,{variant:"secondary",className:"rounded-full px-2 py-0.5",children:[n," new"]})]}),(0,pa.jsxs)(P,{variant:"ghost",size:"icon",onClick:a,className:"rounded-full",children:[(0,pa.jsx)(li.X,{className:"pa-5 w-5"}),(0,pa.jsx)("span",{className:"sr-only",children:"Close"})]})]}),n>0&&(0,pa.jsxs)("div",{className:"flex items-center justify-between border-pa p-2",children:[(0,pa.jsxs)("span",{className:"text-sm text-muted-foreground",children:[n," unread notification",n!==1?"s":""]}),(0,pa.jsx)(P,{variant:"ghost",size:"sm",onClick:s,className:"text-sm",children:"Dismiss all"})]}),l.length>0?(0,pa.jsx)(ye,{className:"flex-1",children:(0,pa.jsx)("div",{className:"divide-y",children:l.map(u=>(0,pa.jsxs)("div",{className:c("flex gap-3 p-4 transition-colors bg-muted/50"),children:[(0,pa.jsx)("div",{className:"flex pa-10 w-10 flex-shrink-0 items-center justify-center rounded-full bg-muted",children:p(u.type)}),(0,pa.jsxs)("div",{className:"flex-1 space-y-1",children:[(0,pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,pa.jsx)("p",{className:"font-medium",children:u.title}),(0,pa.jsxs)("div",{className:"flex items-center gap-2",children:[(0,pa.jsx)("p",{className:"text-xs text-muted-foreground",children:u.time}),(0,pa.jsx)(P,{variant:"ghost",size:"sm",className:"pa-6 w-6 p-0",onClick:()=>i?.(u.id),title:"Dismiss",children:(0,pa.jsx)(li.Check,{className:"pa-3 w-3"})})]})]}),(0,pa.jsx)("p",{className:"text-sm text-muted-foreground",children:u.description}),u.actionLabel&&(0,pa.jsxs)(P,{variant:"link",size:"sm",className:"pa-auto p-0 text-sm",onClick:u.onAction,children:[u.actionLabel,(0,pa.jsx)(li.ChevronRight,{className:"ml-1 pa-3 w-3"})]})]})]},u.id))})}):(0,pa.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center p-8 text-center",children:[(0,pa.jsx)("div",{className:"flex pa-16 w-16 items-center justify-center rounded-full bg-muted",children:(0,pa.jsx)(li.Bell,{className:"pa-8 w-8 text-muted-foreground"})}),(0,pa.jsx)("h3",{className:"mi-4 text-lg font-medium",children:"No notifications"}),(0,pa.jsx)("p",{className:"mi-2 text-sm text-muted-foreground",children:"When you receive notifications, they'll appear here."})]})]})})]})})}var Ve=$(require("@radix-ui/react-tabs"));function Ma({className:e,...t}){return(0,pa.jsx)(Ve.Root,{"data-slot":"tabs",className:c("flex flex-col gap-2",e),...t})}function Ba({className:e,...t}){return(0,pa.jsx)(Ve.List,{"data-slot":"tabs-list",className:c("bg-muted text-muted-foreground inline-flex pa-9 w-fit items-center justify-center rounded-lg p-[3px]",e),...t})}function La({className:e,...t}){return(0,pa.jsx)(Ve.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 pa-[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 Se=$(require("react")),k=$(require("@radix-ui/react-dropdown-menu")),Ye=require("@radix-ui/react-icons");var za=k.Root,Ea=k.Trigger;var fo=Se.forwardRef(({className:e,inset:t,children:a,...i},s)=>(0,pa.jsxs)(k.SubTrigger,{ref:s,className:c("flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...i,children:[a,(0,pa.jsx)(Ye.ChevronRightIcon,{className:"ml-auto"})]}));fo.displayName=k.SubTrigger.displayName;var bo=Se.forwardRef(({className:e,...t},a)=>(0,pa.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}));bo.displayName=k.SubContent.displayName;var Vt=Se.forwardRef(({className:e,sideOffset:t=4,...a},i)=>(0,pa.jsx)(k.Portal,{children:(0,pa.jsx)(k.Content,{ref:i,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})}));Vt.displayName=k.Content.displayName;var Wt=Se.forwardRef(({className:e,inset:t,...a},i)=>(0,pa.jsx)(k.Item,{ref:i,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}));Wt.displayName=k.Item.displayName;var ho=Se.forwardRef(({className:e,children:t,checked:a,...i},s)=>(0,pa.jsxs)(k.CheckboxItem,{ref:s,className:c("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:a,...i,children:[(0,pa.jsx)("span",{className:"absolute left-2 flex pa-3.5 w-3.5 items-center justify-center",children:(0,pa.jsx)(k.ItemIndicator,{children:(0,pa.jsx)(Ye.CheckIcon,{className:"pa-4 w-4"})})}),t]}));ho.displayName=k.CheckboxItem.displayName;var vo=Se.forwardRef(({className:e,children:t,...a},i)=>(0,pa.jsxs)(k.RadioItem,{ref:i,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,pa.jsx)("span",{className:"absolute left-2 flex pa-3.5 w-3.5 items-center justify-center",children:(0,pa.jsx)(k.ItemIndicator,{children:(0,pa.jsx)(Ye.DotFilledIcon,{className:"pa-4 w-4 fill-current"})})}),t]}));vo.displayName=k.RadioItem.displayName;var yo=Se.forwardRef(({className:e,inset:t,...a},i)=>(0,pa.jsx)(k.Label,{ref:i,className:c("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...a}));yo.displayName=k.Label.displayName;var xo=Se.forwardRef(({className:e,...t},a)=>(0,pa.jsx)(k.Separator,{ref:a,className:c("-mx-1 my-1 pa-px bg-muted",e),...t}));xo.displayName=k.Separator.displayName;var wo=({className:e,...t})=>(0,pa.jsx)("span",{className:c("ml-auto text-xs tracking-widest opacity-60",e),...t});wo.displayName="DropdownMenuShortcut";function Fa({activeTab:e,onTabChange:t,tabOptions:a,className:i="",maxWidth:s="700px",gridCols:r=6}){let l=a.find(n=>n.value===e);return(0,pa.jsxs)($t.motion.div,{className:`flex-1 flex justify-center ${i}`,initial:{opacity:0,y:-20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},children:[(0,pa.jsx)("div",{className:"hidden md:block",children:(0,pa.jsx)(Ma,{value:e,onValueChange:t,children:(0,pa.jsx)(Ba,{className:"grid w-full rounded-2xl p-0 pa-10",style:{maxWidth:s,gridTemplateColumns:`repeat(${Math.min(r,a.length)}, minmax(0, 1fr))`},children:a.map(n=>(0,pa.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,pa.jsx)(La,{value:n.value,className:"w-full pa-8 rounded-xl data-[state=active]:rounded-xl transition-all duration-200 hover:border hover:border-accent hover:bg-accent/10 px-4 py-2 text-sm font-medium",children:n.label})},n.value))})})}),(0,pa.jsx)("div",{className:"md:hidden",children:(0,pa.jsxs)(za,{children:[(0,pa.jsx)(Ea,{asChild:!0,children:(0,pa.jsxs)(P,{variant:"outline",className:"rounded-2xl min-w-[140px] justify-between",children:[l?.label||"Select",(0,pa.jsx)(li.ChevronDown,{className:"pa-4 w-4 ml-2"})]})}),(0,pa.jsx)(Vt,{align:"center",className:"w-[180px]",children:a.map(n=>(0,pa.jsx)(Wt,{onClick:()=>t?.(n.value),className:`cursor-pointer ${e===n.value?"bg-accent":""}`,children:n.label},n.value))})]})})]})}function ja({title:e,notifications:t=[],onToggleSidebar:a,onToggleMobileMenu:i,sidebarOpen:s=!0,className:r,activeTab:l="assistant",onTabChange:n,showTabs:p=!0,tabOptions:u=[{value:"home",label:"Home"},{value:"chat",label:"Chat"},{value:"projects",label:"Projects"},{value:"colleagues",label:"Colleagues"},{value:"knowledge",label:"Knowledge"}],onActionClick:D,actionIcon:f=(0,pa.jsx)(li.Bot,{className:"mr-2 pa-4 w-4"}),actionText:y="Action",onNotificationRemove:T,onRemoveAll:U,logo:S="/headerlogo.png",appName:x="Nuvia",tagline:R="Collaboration Platform"}){let[F,w]=(0,mi.useState)(!1),[L,Y]=(0,mi.useState)(t),Z=L.filter(V=>!V.read).length,ee=V=>{Y(ae=>ae.filter(ne=>ne.id!==V)),T?.(V)},Q=()=>{Y(V=>V.filter(ae=>ae.read)),U?.()};return(0,pa.jsxs)(pa.Fragment,{children:[(0,pa.jsxs)("header",{className:`sticky top-0 z-10 flex pa-16 items-center gap-3 px-4 backdrop-blur ${r||""}`,children:[(0,pa.jsx)(P,{variant:"ghost",size:"icon",className:"md:hidden",onClick:i,children:(0,pa.jsx)(li.Menu,{className:"pa-5 w-5"})}),(0,pa.jsx)(P,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:a,children:(0,pa.jsx)(li.PanelLeft,{className:"pa-5 w-5"})}),!s&&(0,pa.jsxs)(St.motion.div,{className:"flex items-center gap-3",initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.3},children:[(0,pa.jsx)("div",{className:"flex pa-10 w-10 items-center justify-center",children:(0,pa.jsx)("img",{src:S,alt:"Logo",className:"pa-10 w-10 object-contain"})}),(0,pa.jsxs)("div",{children:[(0,pa.jsx)("h2",{className:"font-semibold text-sm",children:x}),(0,pa.jsx)("p",{className:"text-xs text-muted-foreground",children:R})]})]}),(0,pa.jsxs)("div",{className:"flex flex-1 items-center",children:[p&&(0,pa.jsx)(Fa,{activeTab:l,onTabChange:n,tabOptions:u}),(0,pa.jsxs)("div",{className:"flex items-center gap-3 ml-auto",children:[(0,pa.jsx)(St.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,pa.jsx)(St.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,pa.jsxs)(P,{className:"rounded-2xl transition-all duration-200 hover:shadow-md",onClick:D,children:[f,y]})})}),(0,pa.jsx)(Aa,{}),(0,pa.jsx)(Je,{children:(0,pa.jsxs)(Qe,{children:[(0,pa.jsx)(Xe,{asChild:!0,children:(0,pa.jsx)(St.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,pa.jsxs)(P,{variant:"ghost",size:"icon",className:"rounded-2xl relative transition-all duration-200",onClick:()=>w(!0),children:[(0,pa.jsx)(St.motion.div,{animate:Z>0?{rotate:[0,-10,10,-10,0]}:{},transition:{duration:.5,repeat:Z>0?1/0:0,repeatDelay:3},children:(0,pa.jsx)(li.Bell,{className:"pa-5 w-5"})}),Z>0&&(0,pa.jsx)(St.motion.span,{className:"absolute -right-1 -top-1 flex pa-5 w-5 items-center justify-center rounded-full bg-red-500 text-xs text-white",initial:{scale:0},animate:{scale:1},transition:{type:"spring",stiffness:500,damping:15},children:Z})]})})}),(0,pa.jsx)(Ge,{children:"Notifications"})]})}),(0,pa.jsx)(St.motion.div,{whileHover:{scale:1.05},whileTap:{scale:.95},transition:{type:"spring",stiffness:400,damping:17},children:(0,pa.jsxs)(He,{className:"pa-9 w-9 border-2 border-primary transition-all duration-200 hover:shadow-md cursor-pointer",children:[(0,pa.jsx)(Ot,{src:"/placeholder.svg?height=40&width=40",alt:"User"}),(0,pa.jsx)(Oe,{})]})})]})]})]}),(0,pa.jsx)(Ia,{notifications:L,open:F,onClose:()=>w(!1),onNotificationRemove:ee,onRemoveAll:Q})]})}var Ha=[{id:"copilot",name:"Peronal Copilot",description:"Your personal AI assistant for all tasks",icon:(0,pa.jsx)(li.User,{className:"pa-4 w-4"}),color:"bg-orange-600",accentColor:"text-orange-600"}];function Ga({sidebarItems:e,children:t,title:a="Digital Colleagues",notifications:i=[],currentBusinessUnit:s=Ha[0],onBusinessUnitChange:r,onSearch:l,businessUnits:n=Ha,activeTab:p,onTabChange:u,showTabs:D=!1,onActionClick:f,actionIcon:y,actionText:T="Action",onNotificationRemove:U,onRemoveAll:S,logo:x="/headerlogo.png",appName:R="Nuvia",tagline:F="Collaboration Platform",sidebarInitiallyClosed:w=!1}){let[L,Y]=(0,mi.useState)(!w),[Z,ee]=(0,mi.useState)(!1),[Q,V]=(0,mi.useState)(s),ae=ne=>{V(ne),r?.(ne)};return(0,pa.jsxs)("div",{className:"flex pa-full flex-col overflow-hidden rounded-xl bg-background w-[]",children:[Z&&(0,pa.jsx)("div",{className:"fixed inset-0 z-40 bg-black/50 md:hidden",onClick:()=>ee(!1)}),(0,pa.jsx)("div",{className:"md:hidden",children:(0,pa.jsx)(Ht,{items:e,isOpen:Z,isMobile:!0,onClose:()=>ee(!1),currentBusinessUnit:Q,onBusinessUnitChange:ae,onSearch:l,logo:x,appName:R,tagline:F})}),(0,pa.jsx)("div",{className:"hidden md:block",children:(0,pa.jsx)(Ht,{items:e,isOpen:L,isMobile:!1,currentBusinessUnit:Q,onBusinessUnitChange:ae,onSearch:l,logo:x,appName:R,tagline:F})}),(0,pa.jsxs)("div",{className:c("min-pa-screen fixed w-full transition-all duration-300 ease-in-out",L?"md:pl-64":"md:pl-0"),children:[(0,pa.jsx)(ja,{title:a,notifications:i,onToggleSidebar:()=>Y(!L),onToggleMobileMenu:()=>ee(!0),sidebarOpen:L,activeTab:p,onTabChange:u,showTabs:D,onActionClick:f,actionIcon:y,actionText:T,onNotificationRemove:U,onRemoveAll:S,logo:x,appName:R,tagline:F}),(0,pa.jsx)("main",{className:"flex-1 p-0 flex flex-col pa-[calc(100vh-4rem)] overflow-auto",children:t})]})]})}var We=$(require("react"));var pe=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("rounded-xl border bg-card text-card-foreground shadow",e),...t}));pe.displayName="Card";var Re=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("flex flex-col space-y-1.5 p-6",e),...t}));Re.displayName="CardHeader";var Ae=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("font-semibold leading-none tracking-tight",e),...t}));Ae.displayName="CardTitle";var qt=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("text-sm text-muted-foreground",e),...t}));qt.displayName="CardDescription";var Ce=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("p-6 pt-0",e),...t}));Ce.displayName="CardContent";var dt=We.forwardRef(({className:e,...t},a)=>(0,$e.jsx)("div",{ref:a,className:c("flex items-center p-6 pt-0",e),...t}));dt.displayName="CardFooter";function Va({sessions:e,currentSession:t,teams:a,onNewChat:i,onSessionSelect:s,onSessionEdit:r,onSessionDelete:l,className:n}){return(0,pa.jsx)(Je,{children:(0,pa.jsx)("div",{className:`space-y-4 pa-full ${n||""}`,children:(0,pa.jsxs)(pe,{className:"shadow-sm pa-full",children:[(0,pa.jsx)("div",{className:"p-4 border-pa",children:(0,pa.jsxs)("div",{className:"flex items-center justify-between",children:[(0,pa.jsxs)("h3",{className:"font-semibold text-sm flex items-center gap-2",children:[(0,pa.jsx)(li.Clock,{className:"pa-4 w-4"}),"Recent Chats"]}),(0,pa.jsxs)(P,{onClick:i,size:"sm",className:"gap-1 pa-7 px-2 rounded-lg shadow-sm",children:[(0,pa.jsx)(li.Plus,{className:"pa-3 w-3"}),"New"]})]})}),(0,pa.jsx)(ye,{className:"pa-[600px]",children:(0,pa.jsx)("div",{className:"p-2",children:e.length===0?(0,pa.jsx)("div",{className:"p-4 text-center text-sm text-muted-foreground",children:"No chat sessions yet"}):e.map(p=>(0,pa.jsxs)(Qe,{children:[(0,pa.jsx)(Xe,{asChild:!0,children:(0,pa.jsx)("div",{className:c("group relative p-3 rounded-xl cursor-pointer transition-all hover:bg-muted/50 mb-2",t?.id===p.id&&"bg-muted border"),onClick:()=>s(p),children:(0,pa.jsxs)("div",{className:"grid grid-cols-[1fr_auto] gap-2 items-start",children:[(0,pa.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,pa.jsx)("h4",{className:"font-medium text-sm truncate mb-1",children:p.title}),(0,pa.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2",children:p.lastMessage})]}),(0,pa.jsxs)("div",{className:"flex items-start gap-1 pt-0.5",children:[r&&(0,pa.jsx)(P,{variant:"ghost",size:"icon",className:"pa-6 w-6 rounded opacity-30 group-hover:opacity-100 transition-opacity",onClick:u=>{u.stopPropagation(),r(p.id)},children:(0,pa.jsx)(li.Edit3,{className:"pa-3 w-3"})}),l&&(0,pa.jsx)(P,{variant:"ghost",size:"icon",className:"pa-6 w-6 rounded text-destructive hover:text-destructive opacity-30 group-hover:opacity-100 transition-opacity",onClick:u=>{u.stopPropagation(),l(p.id)},children:(0,pa.jsx)(li.Trash2,{className:"pa-3 w-3"})})]})]})})}),(0,pa.jsx)(Ge,{side:"right",className:"max-w-xs",children:(0,pa.jsxs)("div",{className:"space-y-1",children:[(0,pa.jsx)("p",{className:"font-medium text-sm",children:p.title}),(0,pa.jsx)("p",{className:"text-xs",children:p.lastMessage})]})})]},p.id))})})]})})})}var Wa={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"]},$a=[{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 _t(e){let t=e.path[e.path.length-1];return t?.actions?t.actions:[]}function Ka({capabilities:e,isOpen:t,onToggle:a,onActionSelect:i,onContextChange:s,colorScheme:r=Wa,className:l}){let[n,p]=(0,mi.useState)([]),[u,D]=(0,mi.useState)([]),f=n[n.length-1],y=f?.children||e,T=(w,L)=>{switch(w.type){case"category":return r.categories[L%r.categories.length];case"list":return r.lists[L%r.lists.length];case"item":return r.items[L%r.items.length];default:return r.primary}},U=(0,mi.useMemo)(()=>({path:n,selectedItems:u,filters:{}}),[n,u]);(0,mi.useEffect)(()=>{s&&s(U)},[U,s]);let S=w=>{w.type==="category"||w.type==="list"?p([...n,w]):w.type==="item"&&D([...u,w])},x=()=>{p(n.slice(0,-1))},R=w=>{p(n.slice(0,w+1))},F=()=>f?.actions?f.actions:[];return t?(0,pa.jsxs)("div",{className:c("w-full",l),children:[(0,pa.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,pa.jsxs)("div",{className:"flex items-center gap-2",children:[n.length>0&&(0,pa.jsx)(St.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 pa-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,pa.jsx)(li.ChevronLeft,{className:c("pa-3 w-3 transition-transform duration-300 ease-in-out","group-hover:-translate-x-0.5")})}),(0,pa.jsx)("h4",{className:"font-medium text-sm",children:f?.name||"Capabilities"})]}),(0,pa.jsx)(St.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 pa-6 w-6 rounded-md backdrop-blur-sm","transition-all duration-300 ease-in-out","hover:bg-accent/50 hover:shadow-sm"),children:(0,pa.jsx)(li.X,{className:c("pa-3 w-3 transition-transform duration-300 ease-in-out","group-hover:rotate-90")})})]}),n.length>0&&(0,pa.jsxs)("div",{className:"flex items-center gap-1 mb-3 text-xs text-muted-foreground",children:[(0,pa.jsx)(St.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>p([]),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,pa.jsxs)("span",{className:"relative",children:["Capabilities",(0,pa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 pa-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})}),n.map((w,L)=>(0,pa.jsxs)("div",{className:"flex items-center gap-1",children:[(0,pa.jsx)(li.ChevronRight,{className:"pa-2 w-2"}),(0,pa.jsx)(St.motion.button,{whileHover:{scale:1.05,transition:{duration:.3,ease:[.4,0,.2,1]}},onClick:()=>R(L),className:c("group relative transition-colors duration-300 ease-in-out hover:text-accent"),children:(0,pa.jsxs)("span",{className:"relative",children:[w.name,(0,pa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 pa-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]})})]},w.id))]}),(0,pa.jsx)("div",{className:"max-pa-40 overflow-y-auto",children:(0,pa.jsx)(St.AnimatePresence,{mode:"wait",children:(0,pa.jsx)(St.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,pa.jsx)(ko,{data:f.data,onItemSelect:w=>D([...u,w]),colorScheme:r}):(0,pa.jsx)(Co,{capabilities:y,onSelect:S,colorScheme:r})},f?.id||"root")})})]}):(0,pa.jsxs)(P,{onClick:a,size:"sm",variant:"outline",className:"rounded-full",children:[(0,pa.jsx)(li.Menu,{className:"pa-4 w-4"}),(0,pa.jsx)("span",{className:"ml-2",children:"Capabilities"})]})}function Co({capabilities:e,onSelect:t,colorScheme:a}){return(0,pa.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((i,s)=>(0,pa.jsx)(No,{capability:i,onClick:()=>t(i),color:a.categories[s%a.categories.length]},i.id))})}function No({capability:e,onClick:t,selected:a,color:i}){return(0,pa.jsxs)(St.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,pa.jsx)("div",{className:c("w-2 pa-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",i)}),(0,pa.jsxs)("span",{className:"truncate relative",children:[e.name,(0,pa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 pa-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,pa.jsx)(li.ChevronRight,{className:c("pa-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,pa.jsx)(le,{variant:"secondary",className:c("text-xs pa-5 px-1.5 flex-shrink-0","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:e.data.length})]})}function ko({data:e,onItemSelect:t,colorScheme:a}){return(0,pa.jsx)("div",{className:"flex flex-wrap gap-2",children:e.map((i,s)=>(0,pa.jsxs)(St.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(i),children:[(0,pa.jsx)("div",{className:c("w-2 pa-2 rounded-full flex-shrink-0 transition-transform duration-300 ease-in-out","group-hover:scale-125",a.items[s%a.items.length])}),(0,pa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,pa.jsxs)("span",{className:"truncate relative font-medium",children:[i.title,(0,pa.jsx)("span",{className:"absolute -bottom-0.5 left-1/2 w-0 pa-0.5 bg-accent transform -translate-x-1/2 transition-all duration-300 ease-in-out group-hover:w-full"})]}),i.subtitle&&(0,pa.jsx)("div",{className:c("text-xs text-muted-foreground truncate","transition-colors duration-300 ease-in-out group-hover:text-accent/80"),children:i.subtitle})]}),i.value&&(0,pa.jsx)(le,{variant:"secondary",className:c("text-xs pa-5 px-1.5 flex-shrink-0 ml-2","transition-transform duration-300 ease-in-out group-hover:scale-110"),children:i.value})]},i.id))})}var Ja=require("date-fns");function qa({taskId:e,polling:t=!0,system:a="payload"}){let[i,s]=(0,mi.useState)(null),[r,l]=(0,mi.useState)(!1),[n,p]=(0,mi.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 T=await y.json();s(T)}catch(y){console.error("Error fetching task:",y),p(y instanceof Error?y:new Error("Unknown error occurred"))}finally{f&&l(!1)}}},D=()=>u(!1);return(0,mi.useEffect)(()=>{e&&u(!0);let f=null;return e&&t&&(f=setInterval(D,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:i,loading:r,error:n}}var Do=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"}},Po=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:i,taskData:s,error:r}=e||{};if(!t)return null;let l=null,n=!0,p=r,u=i!==void 0?i:!0;if(l=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:i,system:a,fetchLatest:u,taskData:l,error:p}),u){let{task:T,loading:U,error:S}=qa({taskId:t,system:a});l=T,n=U,p=S}else n=!1;let D=Do(l?.status||"todo"),f=Po(l?.status||"todo"),y=l?.dateLogged||new Date().toISOString();try{let T=new Date(l?.dateLogged||"");isNaN(T.getTime())||(y=(0,Ja.formatDistanceToNow)(T,{addSuffix:!0}))}catch{}return(0,pa.jsxs)(pe,{className:c("w-full max-w-md shadow-md",p&&"border border-destructive"),children:[(0,pa.jsxs)(Re,{className:"pb-2",children:[(0,pa.jsxs)("div",{className:"flex justify-between items-start",children:[(0,pa.jsx)(Ae,{className:"text-lg font-semibold",children:n?"Loading...":l?.name||"Task"}),(0,pa.jsx)(le,{className:`${D}`,children:f})]}),l?.project&&(0,pa.jsxs)(qt,{className:"text-sm text-gray-500",children:["Project: ",l.project.name]})]}),(0,pa.jsx)(Ce,{className:"pb-2",children:n?(0,pa.jsx)("div",{className:"animate-pulse pa-4 bg-gray-200 rounded w-3/4 mb-2"}):p?(0,pa.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,pa.jsx)("p",{className:"text-sm text-foreground",children:l?.description||"......."})}),(0,pa.jsx)(dt,{className:"pt-2 flex items-center justify-between",children:(0,pa.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,pa.jsx)(li.Clock,{className:"pa-3 w-3 mr-1"}),(0,pa.jsxs)("span",{children:["Created ",y]}),(0,pa.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,pa.jsxs)("span",{children:["Task #",t]})]})})]})}function Za({artefact:e,taskId:t,taskData:a,loading:i=!1,error:s=null}){let r=a||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},l=r.dateLogged;try{let n=new Date(r.dateLogged);isNaN(n.getTime())||(l=(0,Ja.formatDistanceToNow)(n,{addSuffix:!0}))}catch{}return(0,pa.jsxs)(pe,{className:"w-full max-w-md shadow-md",children:[(0,pa.jsx)(Re,{className:"pb-2",children:(0,pa.jsx)("div",{className:"flex justify-between items-start",children:(0,pa.jsx)(Ae,{className:"text-lg font-semibold",children:i?"Loading...":r.name})})}),(0,pa.jsx)(Ce,{className:"pb-2",children:i?(0,pa.jsx)("div",{className:"animate-pulse pa-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,pa.jsx)("p",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,pa.jsx)("p",{className:"text-sm text-foreground",children:e})}),(0,pa.jsx)(dt,{className:"pt-2 flex items-center justify-between",children:(0,pa.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,pa.jsx)(li.Clock,{className:"pa-3 w-3 mr-1"}),(0,pa.jsxs)("span",{children:["Created ",l]}),(0,pa.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,pa.jsxs)("span",{children:["Task #",r.id]})]})})]})}var ti=$(require("react"));var ei=({isOpen:e=!0,authUrl:t,onClose:a,onSuccess:i,description:s="This endpoint requires authentication to sync functions."})=>{let[r,l]=(0,mi.useState)(!1),[n,p]=(0,mi.useState)(""),u=()=>{if(!t){p("No authentication URL provided");return}l(!0),p("");try{let f=window.open(t,"oauth-popup","width=600,height=700,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,directories=no,status=no");if(!f){p("Popup blocked. Please allow popups for this site and try again."),l(!1);return}let y=setInterval(()=>{try{f.closed&&(clearInterval(y),l(!1),i(),a())}catch{}},1e3);setTimeout(()=>{f.closed||(f.close(),clearInterval(y),l(!1),p("Authentication timed out. Please try again."))},6e5)}catch{p("Failed to open authentication window"),l(!1)}},D=async()=>{try{await navigator.clipboard.writeText(t),p("")}catch{p("Failed to copy URL to clipboard")}};return e?(0,pa.jsx)("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-[1000]",children:(0,pa.jsxs)("div",{className:"bg-white rounded-lg p-6 max-w-md w-[90%] shadow-lg",children:[(0,pa.jsx)("h3",{className:"text-lg font-bold mb-3 text-primary",children:"Authentication Required"}),(0,pa.jsx)("p",{className:"text-sm text-gray-600 mb-4",children:s}),n&&(0,pa.jsx)("div",{className:"mb-4 p-2 bg-red-50 border border-red-200 rounded text-red-600 text-xs",children:n}),(0,pa.jsxs)("div",{className:"flex gap-2",children:[(0,pa.jsx)("button",{onClick:u,disabled:r||!t,className:`
6
6
  px-4 py-2 text-white border-none rounded text-sm font-bold flex-1
7
7
  ${r||!t?"bg-gray-400 cursor-not-allowed":"bg-green-600 hover:bg-green-700 cursor-pointer"}
8
- `,children:r?"Authenticating...":"Authenticate"}),(0,da.jsx)("button",{onClick:D,disabled:!t,className:`
8
+ `,children:r?"Authenticating...":"Authenticate"}),(0,pa.jsx)("button",{onClick:D,disabled:!t,className:`
9
9
  px-4 py-2 text-white border-none rounded text-sm
10
10
  ${t?"bg-blue-600 hover:bg-blue-700 cursor-pointer":"bg-gray-400 cursor-not-allowed"}
11
- `,children:"Copy URL"}),(0,da.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 ti=({toolPart:e,index:t,addToolResult:a})=>{let[i,s]=ei.default.useState(!0),r=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,da.jsxs)("div",{className:"mb-2",children:[(0,da.jsx)(Za,{isOpen:i,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:r,description:e.output?.reason||e.input?.reason}),!i&&(0,da.jsx)("div",{className:"flex items-center justify-center da-3",children:(0,da.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,da.jsx)("svg",{className:"da-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,da.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,da.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};function ai({messages:e,input:t,isTyping:a=!1,currentSessionTitle:i,capabilities:s,fileUploads:r,isDragOver:l,enableFileUpload:n,onInputChange:m,addToolResult:u,onSendMessage:D,onKeyPress:f,onFileUpload:y,onRemoveFile:T,onDragOver:E,className:S}){let x=(0,si.useRef)(null),R=(0,si.useRef)(null),z=(0,si.useRef)(null),[w,L]=(0,si.useState)(!1),[Q,X]=(0,si.useState)({path:[],selectedItems:[],filters:{}});(0,si.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,si.useEffect)(()=>{w&&setTimeout(()=>{x.current?.scrollIntoView({behavior:"smooth"})},100)},[w]);let Y=()=>_t(Q),J=()=>{let p=[];return s.forEach(H=>{H.actions&&H.actions.forEach(V=>{p.push({label:V.label,action:()=>G(V.id,{path:[H],selectedItems:[],filters:{}})})}),H.children&&H.children.forEach(V=>{V.type==="list"&&V.data&&p.push({label:`View ${V.name}`,action:()=>L(!0)})})}),p.slice(0,5)},G=(p,H)=>{console.log("Capability action:",p,H);let V=`Executing ${p} with context: ${JSON.stringify(H.path.map(W=>W.name))}`;L(!1)},ee=_t({path:[],selectedItems:[],filters:{}}),ne=p=>{y(p.target.files),p.target.files&&(p.target.value="")},I=p=>{p.preventDefault(),E(!0)},Pe=p=>{p.preventDefault(),E(!1)},d=p=>{p.preventDefault(),E(!1),y(p.dataTransfer.files)},M=p=>{if(p===0)return"0 Bytes";let H=1024,V=["Bytes","KB","MB","GB"],W=Math.floor(Math.log(p)/Math.log(H));return parseFloat((p/Math.pow(H,W)).toFixed(2))+" "+V[W]},N=p=>p.startsWith("image/")?(0,da.jsx)(oi.Image,{className:"da-4 w-4"}):p.startsWith("text/")?(0,da.jsx)(oi.FileText,{className:"da-4 w-4"}):(0,da.jsx)(oi.File,{className:"da-4 w-4"}),le=p=>{let H=p.role==="assistant",V=p.role==="user",W=Ya(p);return(0,da.jsxs)("div",{className:c("flex items-start gap-3",V?"flex-row-reverse":""),children:[(0,da.jsx)(Oe,{className:"da-8 w-8 shrink-0",children:(0,da.jsx)(Ge,{className:c(V?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:V?(0,da.jsx)(oi.User,{className:"da-4 w-4"}):(0,da.jsx)(oi.Bot,{className:"da-4 w-4"})})}),(0,da.jsxs)("div",{className:c("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",V?"bg-primary text-primary-foreground":"bg-muted"),children:[W&&(0,da.jsx)("div",{className:"mb-2 last:mb-0",children:(0,da.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,da.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,da.jsxs)("div",{className:"flex items-center gap-2",children:[N(A.mediaType||"application/octet-stream"),(0,da.jsx)("div",{className:"flex-1 min-w-0",children:(0,da.jsx)("p",{className:"text-sm font-medium truncate",children:A.filename||A.url?.split("/").pop()||"File"})}),A.url&&(0,da.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(A.url,"_blank"),className:"da-8 w-8 p-0",children:(0,da.jsx)(oi.Download,{className:"da-4 w-4"})})]})},ae)}if(te.type.startsWith("tool-")){let A=te,se=te.type.replace("tool-","");if(se==="task")switch(A.state){case"input-available":return(0,da.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},ae);case"output-available":return(0,da.jsx)("div",{className:"mb-2",children:(0,da.jsx)(_a,{data:{id:A.output?.id||A.input?.id,fetchLatest:!1,taskData:A.output||A.input}})},ae);case"output-error":return(0,da.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",A.errorText]},ae);default:return null}if(te.type==="tool-requestEndpointLogin")return(0,da.jsx)("div",{className:"mb-2",children:(0,da.jsx)(ti,{toolPart:A,index:ae,addToolResult:u??(()=>{})})},ae);if(se==="artefact")switch(A.state){case"input-available":return(0,da.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},ae);case"output-available":return(0,da.jsx)("div",{className:"mb-2",children:(0,da.jsx)(Xa,{artefact:A.output?.description||"",taskId:A.output?.id||A.input?.id,taskData:A.output||A.input})},ae);case"output-error":return(0,da.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",A.errorText]},ae);default:return null}return(0,da.jsx)("div",{className:"mb-2",children:(0,da.jsxs)(ge,{className:"w-full max-w-md",children:[(0,da.jsx)(Ae,{children:(0,da.jsx)(Ie,{className:"text-lg",children:se})}),(0,da.jsxs)(Ne,{children:[A.state==="input-available"&&(0,da.jsxs)("p",{className:"text-sm",children:["Processing ",se,"..."]}),A.state==="output-available"&&(0,da.jsx)("pre",{className:"text-sm",children:JSON.stringify(A.output,null,2)}),A.state==="output-error"&&(0,da.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",A.errorText]})]})]})},ae)}if(te.type.startsWith("data-")){let A=te,se=te.type.replace("data-","");return se==="reference"?(0,da.jsx)("div",{className:"mb-2",children:(0,da.jsx)(ge,{className:"w-full",children:(0,da.jsx)(Ne,{className:"p-4",children:(0,da.jsx)("div",{className:"space-y-2",children:A.data?.references?.map((ce,Ze)=>(0,da.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,da.jsx)(de,{variant:"outline",children:ce.type||"link"}),(0,da.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,da.jsx)("p",{className:"text-sm font-medium truncate",children:ce.title}),ce.description&&(0,da.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:ce.description})]}),ce.url&&(0,da.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(ce.url,"_blank"),className:"da-8 w-8 p-0",children:(0,da.jsx)(oi.ExternalLink,{className:"da-4 w-4"})})]},Ze))})})})},ae):se==="menu"?(0,da.jsx)("div",{className:"mb-2",children:(0,da.jsxs)(ge,{className:"w-full",children:[(0,da.jsx)(Ae,{children:(0,da.jsx)(Ie,{className:"text-lg",children:A.data?.title})}),(0,da.jsx)(Ne,{children:(0,da.jsx)("div",{className:"space-y-2",children:A.data?.items?.map((ce,Ze)=>(0,da.jsx)(P,{variant:"outline",className:"w-full justify-start",onClick:ce.action,children:(0,da.jsxs)("div",{className:"text-left",children:[(0,da.jsx)("p",{className:"font-medium",children:ce.label}),ce.description&&(0,da.jsx)("p",{className:"text-xs text-muted-foreground",children:ce.description})]})},Ze))})})]})},ae):(0,da.jsx)("div",{className:"mb-2",children:(0,da.jsxs)(ge,{className:"w-full max-w-md",children:[(0,da.jsx)(Ae,{children:(0,da.jsx)(Ie,{className:"text-lg",children:se})}),(0,da.jsx)(Ne,{children:(0,da.jsx)("pre",{className:"text-sm",children:JSON.stringify(A.data,null,2)})})]})},ae)}return null})]})]})};return(0,da.jsxs)("div",{className:`da-full flex flex-col shadow-sm max-w-4xl mx-auto ${S||""}`,children:[(0,da.jsxs)(xe,{ref:R,className:"flex-1 p-4 bg-background border-0",onDragOver:I,onDragLeave:Pe,onDrop:d,children:[(0,da.jsxs)("div",{className:c("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,da.jsx)(St.AnimatePresence,{children:e.map(p=>(0,da.jsx)(St.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,da.jsxs)(St.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,da.jsx)(Oe,{className:"da-8 w-8",children:(0,da.jsx)(Ge,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,da.jsx)(oi.Bot,{className:"da-4 w-4"})})}),(0,da.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,da.jsx)(Wa,{capabilities:s,isOpen:w,onToggle:()=>L(!w),onActionSelect:G,className:"w-full"})})]}),a&&(0,da.jsxs)(St.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,da.jsx)(Oe,{className:"da-8 w-8",children:(0,da.jsx)(Ge,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,da.jsx)(oi.Bot,{className:"da-4 w-4"})})}),(0,da.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,da.jsxs)("div",{className:"flex space-x-1",children:[(0,da.jsx)("div",{className:"w-2 da-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,da.jsx)("div",{className:"w-2 da-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,da.jsx)("div",{className:"w-2 da-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,da.jsx)("div",{ref:x})]}),r.length>0&&(0,da.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,da.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(p=>(0,da.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[N(p.file.type),(0,da.jsx)("span",{className:"text-sm font-medium",children:p.file.name}),(0,da.jsx)("span",{className:"text-xs text-muted-foreground",children:M(p.file.size)}),(0,da.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>T(p.id),className:"da-6 w-6 p-0",children:(0,da.jsx)(oi.X,{className:"da-4 w-4"})})]},p.id))})}),(0,da.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,da.jsxs)("div",{className:"flex gap-3",children:[(0,da.jsx)(it,{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}),n&&(0,da.jsx)(P,{variant:"outline",size:"icon",onClick:()=>z.current?.click(),className:"rounded-2xl da-10 w-10 shadow-sm",children:(0,da.jsx)(oi.Paperclip,{className:"da-4 w-4"})}),(0,da.jsx)(P,{onClick:D,disabled:!t.trim()&&r.length===0||a,size:"icon",className:"rounded-2xl da-10 w-10 shadow-sm",children:(0,da.jsx)(oi.Send,{className:"da-4 w-4"})})]}),(0,da.jsxs)("div",{className:"flex items-center gap-3 da-3",children:[(0,da.jsxs)(P,{onClick:()=>L(!w),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,da.jsx)(oi.Menu,{className:"da-3 w-3 mr-1"}),w?"Hide":"Show"," Capabilities"]}),(0,da.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Y().map((p,H)=>(0,da.jsx)(P,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>G(p.id,Q),children:p.label},`context-${p.id}`)),Y().length===0&&J().map((p,H)=>(0,da.jsx)(P,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:p.action,children:p.label},`suggestion-${H}`))]})]}),n&&(0,da.jsx)("input",{ref:z,type:"file",multiple:!0,onChange:ne,className:"hidden"})]})]})}function ri({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:i=[],businessUnits:s=[],capabilities:r=[],sidebarItems:l=[],notifications:n=[],sessions:m=[],onNewChat:u,onSessionSelect:D,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:T=()=>{},onNotificationRemove:E=()=>{},onRemoveAll:S=()=>{},onActionClick:x=()=>{},onSearch:R=M=>console.log("Search query:",M),initialTeam:z="design",currentSession:w=null,showCapabilities:L=!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:G="/headerlogo.png",appName:ee="Nuvia",tagline:ne="AI-Powered Workspace",actionIcon:I=(0,da.jsx)(oi.Users,{className:"mr-2 da-4 w-4"}),actionText:Pe="Collaborate",sidebarInitiallyClosed:d=!1}){let M=(0,ii.useChat)(e||{}),N=a?t||M:null,[le,p]=(0,si.useState)(""),[H,V]=(0,si.useState)(!1),W=N?.messages||i,te=le,ae=N?.status==="submitted"||H,A=N?.addToolResult?(O,fe,ie)=>{N.addToolResult({tool:fe,toolCallId:O,output:ie}),N.sendMessage()}:()=>{},se=s||[],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"},[Ze,li]=(0,si.useState)(()=>se.length===0?ce:se.find(O=>O.id===z)||se[0]),[et,ct]=(0,si.useState)([]),[ci,di]=(0,si.useState)(!1),pi=O=>{if(!O||!X)return;let fe=[];Array.from(O).forEach(ie=>{if(ie.size>Y*1024*1024){alert(`File ${ie.name} is too large. Maximum size is ${Y}MB.`);return}if(J.length>0&&!J.some(dt=>ie.type.match(dt))){alert(`File type ${ie.type} is not allowed.`);return}let Yt={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ie,status:"pending",progress:0};if(ie.type.startsWith("image/")){let dt=new FileReader;dt.onload=bi=>{ct(hi=>hi.map(Rt=>Rt.id===Yt.id?{...Rt,preview:bi.target?.result}:Rt))},dt.readAsDataURL(ie)}fe.push(Yt)}),ct(ie=>[...ie,...fe])},mi=O=>{ct(fe=>fe.filter(ie=>ie.id!==O))},Xt=()=>{if(!(!te.trim()&&et.length===0)){if(N){let O=et.length>0?ui(et.map(fe=>fe.file)):void 0;N.sendMessage({text:te,files:O},{body:{timestamp:Date.now()}}),p("")}else console.log("Message to send:",te),console.log("Files to upload:",et),p(""),V(!0),setTimeout(()=>{V(!1)},1500);ct([])}},ui=O=>{let fe=new DataTransfer;return O.forEach(ie=>fe.items.add(ie)),fe.files},gi=O=>{O.key==="Enter"&&!O.shiftKey&&(O.preventDefault(),Xt())},fi=O=>{p(O)};return(0,da.jsx)(Ha,{sidebarItems:l||[],title:Q,notifications:n||[],businessUnits:se,currentBusinessUnit:Ze,onBusinessUnitChange:O=>{O&&(li(O),T?.(O))},onSearch:R,showTabs:!1,onActionClick:x,actionIcon:I,actionText:Pe,onNotificationRemove:E,onRemoveAll:S,logo:G,appName:ee,tagline:ne,sidebarInitiallyClosed:d,children:(0,da.jsx)(St.AnimatePresence,{mode:"wait",children:(0,da.jsx)(St.motion.div,{className:"flex-1 da-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,da.jsxs)("div",{className:"da-full flex",children:[(0,da.jsx)("div",{className:"w-80 flex-shrink-0 da-full p-2",children:(0,da.jsx)(Oa,{sessions:m||[],currentSession:w,teams:se,onNewChat:u,onSessionSelect:D,onSessionEdit:y,onSessionDelete:f})}),(0,da.jsx)("div",{className:"flex-1 da-full p-2",children:(0,da.jsx)(ai,{messages:W||[],input:te,isTyping:ae,currentSessionTitle:w?.title,capabilities:r||[],onInputChange:fi,addToolResult:A,onSendMessage:Xt,onKeyPress:gi,fileUploads:et,isDragOver:ci,enableFileUpload:X,onFileUpload:pi,onRemoveFile:mi,onDragOver:di})})]})},"chat-interface")})})}var ni=[{id:"1",role:"user",parts:[{type:"text",text:"Can you write me a comprehensive analysis of the current state of artificial intelligence and machine learning technologies, including their applications, limitations, and future prospects?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`Here's a comprehensive analysis of the current state of AI and ML technologies:
11
+ `,children:"Copy URL"}),(0,pa.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 ai=({toolPart:e,index:t,addToolResult:a})=>{let[i,s]=ti.default.useState(!0),r=()=>{a(e.input?.toolCallId,e.input?.tool,"Authentication completed"),s(!1)};switch(e.state){case"input-available":return(0,pa.jsxs)("div",{className:"mb-2",children:[(0,pa.jsx)(ei,{isOpen:i,authUrl:e.input?.url||e.input?.authUrl,onClose:()=>s(!1),onSuccess:r,description:e.output?.reason||e.input?.reason}),!i&&(0,pa.jsx)("div",{className:"flex items-center justify-center mi-3",children:(0,pa.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,pa.jsx)("svg",{className:"pa-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,pa.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Authentication completed"]})})]},t);case"output-error":return(0,pa.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var ii=require("marked"),oi=$(require("react-markdown"));function To(e){return ii.marked.lexer(e).map(a=>a.raw)}var ri=(0,mi.memo)(({content:e})=>(0,pa.jsx)(oi.default,{children:e}),(e,t)=>e.content===t.content);ri.displayName="MemoizedMarkdownBlock";var Qt=(0,mi.memo)(({content:e,id:t})=>(0,mi.useMemo)(()=>To(e),[e]).map((i,s)=>(0,pa.jsx)(ri,{content:i},`${t}-block_${s}`)));Qt.displayName="PartText";function ni({messages:e,input:t,isTyping:a=!1,currentSessionTitle:i,capabilities:s,fileUploads:r,isDragOver:l,enableFileUpload:n,onInputChange:p,addToolResult:u,onSendMessage:D,onKeyPress:f,onFileUpload:y,onRemoveFile:T,onDragOver:U,className:S}){let x=(0,mi.useRef)(null),R=(0,mi.useRef)(null),F=(0,mi.useRef)(null),[w,L]=(0,mi.useState)(!1),[Y,Z]=(0,mi.useState)({path:[],selectedItems:[],filters:{}});(0,mi.useEffect)(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,mi.useEffect)(()=>{w&&setTimeout(()=>{x.current?.scrollIntoView({behavior:"smooth"})},100)},[w]);let ee=()=>_t(Y),Q=()=>{let m=[];return s.forEach(O=>{O.actions&&O.actions.forEach(W=>{m.push({label:W.label,action:()=>V(W.id,{path:[O],selectedItems:[],filters:{}})})}),O.children&&O.children.forEach(W=>{W.type==="list"&&W.data&&m.push({label:`View ${W.name}`,action:()=>L(!0)})})}),m.slice(0,5)},V=(m,O)=>{console.log("Capability action:",m,O);let W=`Executing ${m} with context: ${JSON.stringify(O.path.map(z=>z.name))}`;L(!1)},ae=_t({path:[],selectedItems:[],filters:{}}),ne=m=>{y(m.target.files),m.target.files&&(m.target.value="")},I=m=>{m.preventDefault(),U(!0)},De=m=>{m.preventDefault(),U(!1)},d=m=>{m.preventDefault(),U(!1),y(m.dataTransfer.files)},B=m=>{if(m===0)return"0 Bytes";let O=1024,W=["Bytes","KB","MB","GB"],z=Math.floor(Math.log(m)/Math.log(O));return parseFloat((m/Math.pow(O,z)).toFixed(2))+" "+W[z]},N=m=>m.startsWith("image/")?(0,pa.jsx)(li.Image,{className:"pa-4 w-4"}):m.startsWith("text/")?(0,pa.jsx)(li.FileText,{className:"pa-4 w-4"}):(0,pa.jsx)(li.File,{className:"pa-4 w-4"}),se=m=>{let O=m.role==="assistant",W=m.role==="user";return(0,pa.jsxs)("div",{className:c("flex items-start gap-3",W?"flex-row-reverse":""),children:[(0,pa.jsx)(He,{className:"pa-8 w-8 shrink-0",children:(0,pa.jsx)(Oe,{className:c(W?"bg-primary text-primary-foreground":"bg-gradient-to-br from-purple-600 to-blue-600 text-white"),children:W?(0,pa.jsx)(li.User,{className:"pa-4 w-4"}):(0,pa.jsx)(li.Bot,{className:"pa-4 w-4"})})}),(0,pa.jsx)("div",{className:c("max-w-[80%] rounded-2xl px-4 py-3 shadow-sm",W?"bg-primary text-primary-foreground":"bg-muted"),children:m.parts.map((z,_)=>{if(z.type==="text")return(0,pa.jsx)(Qt,{id:m.id,content:z.text},`${m.id}-text`);if(z.type==="file"){let A=z;return(0,pa.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,pa.jsxs)("div",{className:"flex items-center gap-2",children:[N(A.mediaType||"application/octet-stream"),(0,pa.jsx)("div",{className:"flex-1 min-w-0",children:(0,pa.jsx)("p",{className:"text-sm font-medium truncate",children:A.filename||A.url?.split("/").pop()||"File"})}),A.url&&(0,pa.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(A.url,"_blank"),className:"pa-8 w-8 p-0",children:(0,pa.jsx)(li.Download,{className:"pa-4 w-4"})})]})},_)}if(z.type.startsWith("tool-")){let A=z,ve=z.type.replace("tool-","");if(ve==="task")switch(A.state){case"input-available":return(0,pa.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},_);case"output-available":return(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsx)(Qa,{data:{id:A.output?.id||A.input?.id,fetchLatest:!1,taskData:A.output||A.input}})},_);case"output-error":return(0,pa.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",A.errorText]},_);default:return null}if(z.type==="tool-requestEndpointLogin")return(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsx)(ai,{toolPart:A,index:_,addToolResult:u??(()=>{})})},_);if(ve==="artefact")switch(A.state){case"input-available":return(0,pa.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},_);case"output-available":return(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsx)(Za,{artefact:A.output?.description||"",taskId:A.output?.id||A.input?.id,taskData:A.output||A.input})},_);case"output-error":return(0,pa.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",A.errorText]},_);default:return null}return(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsxs)(pe,{className:"w-full max-w-md",children:[(0,pa.jsx)(Re,{children:(0,pa.jsx)(Ae,{className:"text-lg",children:ve})}),(0,pa.jsxs)(Ce,{children:[A.state==="input-available"&&(0,pa.jsxs)("p",{className:"text-sm",children:["Processing ",ve,"..."]}),A.state==="output-available"&&(0,pa.jsx)("pre",{className:"text-sm",children:JSON.stringify(A.output,null,2)}),A.state==="output-error"&&(0,pa.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",A.errorText]})]})]})},_)}if(z.type.startsWith("data-")){let A=z,ve=z.type.replace("data-","");return ve==="reference"?(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsx)(pe,{className:"w-full",children:(0,pa.jsx)(Ce,{className:"p-4",children:(0,pa.jsx)("div",{className:"space-y-2",children:A.data?.references?.map((X,at)=>(0,pa.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,pa.jsx)(le,{variant:"outline",children:X.type||"link"}),(0,pa.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,pa.jsx)("p",{className:"text-sm font-medium truncate",children:X.title}),X.description&&(0,pa.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:X.description})]}),X.url&&(0,pa.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>window.open(X.url,"_blank"),className:"pa-8 w-8 p-0",children:(0,pa.jsx)(li.ExternalLink,{className:"pa-4 w-4"})})]},at))})})})},_):ve==="menu"?(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsxs)(pe,{className:"w-full",children:[(0,pa.jsx)(Re,{children:(0,pa.jsx)(Ae,{className:"text-lg",children:A.data?.title})}),(0,pa.jsx)(Ce,{children:(0,pa.jsx)("div",{className:"space-y-2",children:A.data?.items?.map((X,at)=>(0,pa.jsx)(P,{variant:"outline",className:"w-full justify-start",onClick:X.action,children:(0,pa.jsxs)("div",{className:"text-left",children:[(0,pa.jsx)("p",{className:"font-medium",children:X.label}),X.description&&(0,pa.jsx)("p",{className:"text-xs text-muted-foreground",children:X.description})]})},at))})})]})},_):(0,pa.jsx)("div",{className:"mb-2",children:(0,pa.jsxs)(pe,{className:"w-full max-w-md",children:[(0,pa.jsx)(Re,{children:(0,pa.jsx)(Ae,{className:"text-lg",children:ve})}),(0,pa.jsx)(Ce,{children:(0,pa.jsx)("pre",{className:"text-sm",children:JSON.stringify(A.data,null,2)})})]})},_)}return null})})]})};return(0,pa.jsxs)("div",{className:`pa-full flex flex-col shadow-sm max-w-4xl mx-auto ${S||""}`,children:[(0,pa.jsxs)(ye,{ref:R,className:"flex-1 p-4 bg-background border-0",onDragOver:I,onDragLeave:De,onDrop:d,children:[(0,pa.jsxs)("div",{className:c("space-y-4",l&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,pa.jsx)(St.AnimatePresence,{children:e.map(m=>(0,pa.jsx)(St.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:c("flex gap-3",m.role==="user"?"flex-row-reverse":"flex-row"),children:se(m)},m.id))}),w&&(0,pa.jsxs)(St.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,pa.jsx)(He,{className:"pa-8 w-8",children:(0,pa.jsx)(Oe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,pa.jsx)(li.Bot,{className:"pa-4 w-4"})})}),(0,pa.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,pa.jsx)(Ka,{capabilities:s,isOpen:w,onToggle:()=>L(!w),onActionSelect:V,className:"w-full"})})]}),a&&(0,pa.jsxs)(St.motion.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,pa.jsx)(He,{className:"pa-8 w-8",children:(0,pa.jsx)(Oe,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,pa.jsx)(li.Bot,{className:"pa-4 w-4"})})}),(0,pa.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,pa.jsxs)("div",{className:"flex space-x-1",children:[(0,pa.jsx)("div",{className:"w-2 pa-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,pa.jsx)("div",{className:"w-2 pa-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,pa.jsx)("div",{className:"w-2 pa-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,pa.jsx)("div",{ref:x})]}),r.length>0&&(0,pa.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,pa.jsx)("div",{className:"flex flex-wrap gap-2",children:r.map(m=>(0,pa.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[N(m.file.type),(0,pa.jsx)("span",{className:"text-sm font-medium",children:m.file.name}),(0,pa.jsx)("span",{className:"text-xs text-muted-foreground",children:B(m.file.size)}),(0,pa.jsx)(P,{variant:"ghost",size:"sm",onClick:()=>T(m.id),className:"pa-6 w-6 p-0",children:(0,pa.jsx)(li.X,{className:"pa-4 w-4"})})]},m.id))})}),(0,pa.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,pa.jsxs)("div",{className:"flex gap-3",children:[(0,pa.jsx)(nt,{value:t,onChange:m=>p(m.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:a}),n&&(0,pa.jsx)(P,{variant:"outline",size:"icon",onClick:()=>F.current?.click(),className:"rounded-2xl pa-10 w-10 shadow-sm",children:(0,pa.jsx)(li.Paperclip,{className:"pa-4 w-4"})}),(0,pa.jsx)(P,{onClick:D,disabled:!t.trim()&&r.length===0||a,size:"icon",className:"rounded-2xl pa-10 w-10 shadow-sm",children:(0,pa.jsx)(li.Send,{className:"pa-4 w-4"})})]}),(0,pa.jsxs)("div",{className:"flex items-center gap-3 mi-3",children:[(0,pa.jsxs)(P,{onClick:()=>L(!w),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,pa.jsx)(li.Menu,{className:"pa-3 w-3 mr-1"}),w?"Hide":"Show"," Capabilities"]}),(0,pa.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[ee().map((m,O)=>(0,pa.jsx)(P,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>V(m.id,Y),children:m.label},`context-${m.id}`)),ee().length===0&&Q().map((m,O)=>(0,pa.jsx)(P,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:m.action,children:m.label},`suggestion-${O}`))]})]}),n&&(0,pa.jsx)("input",{ref:F,type:"file",multiple:!0,onChange:ne,className:"hidden"})]})]})}function ci({aiConfig:e,useCustomChat:t,enableAI:a=!0,messages:i=[],businessUnits:s=[],capabilities:r=[],sidebarItems:l=[],notifications:n=[],sessions:p=[],onNewChat:u,onSessionSelect:D,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:T=()=>{},onNotificationRemove:U=()=>{},onRemoveAll:S=()=>{},onActionClick:x=()=>{},onSearch:R=B=>console.log("Search query:",B),initialTeam:F="design",currentSession:w=null,showCapabilities:L=!0,title:Y="Digital Colleagues",enableFileUpload:Z=!0,maxFileSize:ee=10,allowedFileTypes:Q=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:V="/headerlogo.png",appName:ae="Nuvia",tagline:ne="AI-Powered Workspace",actionIcon:I=(0,pa.jsx)(li.Users,{className:"mr-2 pa-4 w-4"}),actionText:De="Collaborate",sidebarInitiallyClosed:d=!1}){let B=(0,si.useChat)(e||{}),N=a?t||B:null,[se,m]=(0,mi.useState)(""),[O,W]=(0,mi.useState)(!1),z=N?.messages||i,_=se,A=N?.status==="submitted"||O,ve=N?.addToolResult?(G,ue,ie)=>{N.addToolResult({tool:ue,toolCallId:G,output:ie}),N.sendMessage()}:()=>{},X=s||[],at={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"},[pi,ui]=(0,mi.useState)(()=>X.length===0?at:X.find(G=>G.id===F)||X[0]),[it,pt]=(0,mi.useState)([]),[gi,fi]=(0,mi.useState)(!1),bi=G=>{if(!G||!Z)return;let ue=[];Array.from(G).forEach(ie=>{if(ie.size>ee*1024*1024){alert(`File ${ie.name} is too large. Maximum size is ${ee}MB.`);return}if(Q.length>0&&!Q.some(ut=>ie.type.match(ut))){alert(`File type ${ie.type} is not allowed.`);return}let ea={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ie,status:"pending",progress:0};if(ie.type.startsWith("image/")){let ut=new FileReader;ut.onload=wi=>{pt(Ci=>Ci.map(Rt=>Rt.id===ea.id?{...Rt,preview:wi.target?.result}:Rt))},ut.readAsDataURL(ie)}ue.push(ea)}),pt(ie=>[...ie,...ue])},hi=G=>{pt(ue=>ue.filter(ie=>ie.id!==G))},Zt=()=>{if(!(!_.trim()&&it.length===0)){if(N){let G=it.length>0?vi(it.map(ue=>ue.file)):void 0;N.sendMessage({text:_,files:G},{body:{timestamp:Date.now()}}),m("")}else console.log("Message to send:",_),console.log("Files to upload:",it),m(""),W(!0),setTimeout(()=>{W(!1)},1500);pt([])}},vi=G=>{let ue=new DataTransfer;return G.forEach(ie=>ue.items.add(ie)),ue.files},yi=G=>{G.key==="Enter"&&!G.shiftKey&&(G.preventDefault(),Zt())},xi=G=>{m(G)};return(0,pa.jsx)(Ga,{sidebarItems:l||[],title:Y,notifications:n||[],businessUnits:X,currentBusinessUnit:pi,onBusinessUnitChange:G=>{G&&(ui(G),T?.(G))},onSearch:R,showTabs:!1,onActionClick:x,actionIcon:I,actionText:De,onNotificationRemove:U,onRemoveAll:S,logo:V,appName:ae,tagline:ne,sidebarInitiallyClosed:d,children:(0,pa.jsx)(St.AnimatePresence,{mode:"wait",children:(0,pa.jsx)(St.motion.div,{className:"flex-1 pa-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,pa.jsxs)("div",{className:"pa-full flex",children:[(0,pa.jsx)("div",{className:"w-80 flex-shrink-0 pa-full p-2",children:(0,pa.jsx)(Va,{sessions:p||[],currentSession:w,teams:X,onNewChat:u,onSessionSelect:D,onSessionEdit:y,onSessionDelete:f})}),(0,pa.jsx)("div",{className:"flex-1 pa-full p-2",children:(0,pa.jsx)(ni,{messages:z||[],input:_,isTyping:A,currentSessionTitle:w?.title,capabilities:r||[],onInputChange:xi,addToolResult:ve,onSendMessage:Zt,onKeyPress:yi,fileUploads:it,isDragOver:gi,enableFileUpload:Z,onFileUpload:bi,onRemoveFile:hi,onDragOver:fi})})]})},"chat-interface")})})}var di=[{id:"1",role:"user",parts:[{type:"text",text:"Can you write pa a comprehensive analysis of the current state of artificial intelligence and machine learning technologies, including their applications, limitations, and future prospects?"}]},{id:"2",role:"assistant",parts:[{type:"text",text:`Here's a comprehensive analysis of the current state of AI and ML technologies:
12
12
 
13
13
  **Current State of Artificial Intelligence and Machine Learning**
14
14
 
15
- Artificial Intelligence (AI) and Machine Learning (ML) have experienced unprecedented growth and adoption across virtually every industry in recent years. We'da currently in what many experts consider the "golden age" of AI, characterized by breakthrough achievements in natural language processing, computer vision, and autonomous systems.
15
+ Artificial Intelligence (AI) and Machine Learning (ML) have experienced unprecedented growth and adoption across virtually every industry in recent years. We'pa currently in what many experts consider the "golden age" of AI, characterized by breakthrough achievements in natural language processing, computer vision, and autonomous systems.
16
16
 
17
17
  **Key Applications:**
18
18
 
19
- 1. **Natural Language Processing**: Large Language Models like GPT-4, Claude, and others have revolutionized how we interact with computers, enabling conversational AI, content generation, code assistance, and translation services that approach human-level quality.
19
+ 1. **Natural Language Processing**: Large Language Models like GPT-4, Claude, and others have revolutionized how pa interact with computers, enabling conversational AI, content generation, code assistance, and translation services that approach human-level quality.
20
20
 
21
21
  2. **Computer Vision**: AI systems can now accurately identify objects, faces, and scenes in images and videos, powering applications from medical imaging diagnosis to autonomous vehicle navigation and augmented reality experiences.
22
22
 
@@ -30,7 +30,7 @@ Artificial Intelligence (AI) and Machine Learning (ML) have experienced unpreced
30
30
 
31
31
  Despite remarkable progress, several significant limitations remain:
32
32
 
33
- 1. **Data Quality and Bias**: AI systems are only as good as the data they'da trained on, and biased or incomplete datasets can lead to unfair or inaccurate outcomes.
33
+ 1. **Data Quality and Bias**: AI systems are only as good as the data they'pa trained on, and biased or incomplete datasets can lead to unfair or inaccurate outcomes.
34
34
 
35
35
  2. **Interpretability**: Many advanced AI models, particularly deep neural networks, operate as "black boxes," making it difficult to understand how they arrive at specific decisions.
36
36
 
@@ -54,7 +54,7 @@ The future of AI holds immense promise across multiple dimensions:
54
54
 
55
55
  5. **Sustainable AI**: Development of more efficient algorithms and hardware will reduce the environmental impact of AI systems.
56
56
 
57
- The next decade will likely see AI becoming even more integrated into our daily lives, while addressing current limitations through improved techniques, better governance frameworks, and more sustainable practices. The key will da balancing innovation with responsible development to ensure AI benefits humanity as a whole.`}]},{id:"3",role:"user",parts:[{type:"text",text:"This is an extremely long message to test the width constraints of the chat interface and ensure that even when I write a very long message that goes on and on and on, it still maintains proper formatting and doesn't cause the chat interface to become too wide or break the layout. The message should wrap properly and maintain readability while staying within the maximum width constraints that have been set for the chat bubbles. This is important for user experience and ensuring that the interface remains functional and visually appealing even with extensive text content."}]},{id:"4",role:"assistant",parts:[{type:"text",text:`Perfect! Your long message demonstrates exactly what we needed to test. As you can see, the chat interface now properly handles long text messages by:
57
+ The next decade will likely see AI becoming even more integrated into our daily lives, while addressing current limitations through improved techniques, better governance frameworks, and more sustainable practices. The key will pa balancing innovation with responsible development to ensure AI benefits humanity as a whole.`}]},{id:"3",role:"user",parts:[{type:"text",text:"This is an extremely long message to test the width constraints of the chat interface and ensure that even when I write a very long message that goes on and on and on, it still maintains proper formatting and doesn't cause the chat interface to become too wide or break the layout. The message should wrap properly and maintain readability while staying within the maximum width constraints that have been set for the chat bubbles. This is important for user experience and ensuring that the interface remains functional and visually appealing even with extensive text content."}]},{id:"4",role:"assistant",parts:[{type:"text",text:`Perfect! Your long message demonstrates exactly what pa needed to test. As you can see, the chat interface now properly handles long text messages by:
58
58
 
59
59
  \u2022 Constraining the overall chat width with max-w-4xl
60
60
  \u2022 Using break-words to prevent text overflow
@@ -62,4 +62,4 @@ The next decade will likely see AI becoming even more integrated into our daily
62
62
  \u2022 Preserving whitespace and line breaks with whitespace-pre-wrap
63
63
  \u2022 Ensuring proper text wrapping for readability
64
64
 
65
- The interface remains visually appealing and functional regardless of message length, which is crucial for a good user experience.`}]}];function Co(){let[e,t]=(0,si.useState)(ni);return(0,da.jsx)("div",{className:"da-screen w-full",children:(0,da.jsx)(ri,{messages:e,capabilities:Va,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t(ni),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}0&&(module.exports={ChatDemoLongMessages});
65
+ The interface remains visually appealing and functional regardless of message length, which is crucial for a good user experience.`}]}];function So(){let[e,t]=(0,mi.useState)(di);return(0,pa.jsx)("div",{className:"pa-screen w-full",children:(0,pa.jsx)(ci,{messages:e,capabilities:$a,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["*"],businessUnits:[],sessions:[],notifications:[],onNewChat:()=>t(di),onSessionSelect:()=>{},onSessionDelete:()=>{},showCapabilities:!0})})}0&&(module.exports={ChatDemoLongMessages});