cortex-react-components 2.18.4 → 2.18.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-2SMCWU5D.mjs → chunk-275W7H4O.mjs} +1 -1
- package/dist/chunk-347B45ZS.mjs +1 -0
- package/dist/{chunk-3QSJWNSG.mjs → chunk-JEWBD2UD.mjs} +1 -1
- package/dist/{chunk-4KQPMKRD.mjs → chunk-JSHD7QTU.mjs} +1 -1
- package/dist/{chunk-32V5QT3S.mjs → chunk-PAEL4O5F.mjs} +1 -1
- package/dist/{chunk-IYJOABIM.mjs → chunk-WAVVCASZ.mjs} +1 -1
- package/dist/chunk-WRZP5K5X.mjs +1 -0
- package/dist/{chunk-UG72MXTU.mjs → chunk-XYJ4S67W.mjs} +1 -1
- package/dist/components/Chat/ChatInterface.js +1 -1
- package/dist/components/Chat/ChatInterface.mjs +1 -1
- package/dist/components/Chat/CopilotInterface.js +1 -1
- package/dist/components/Chat/CopilotInterface.mjs +1 -1
- package/dist/components/Chat/PartTypes/MessageHandler.js +6 -6
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
- package/dist/components/Chat/PartTypes/PartApprovalTool.d.ts +1 -0
- package/dist/components/Chat/PartTypes/PartApprovalTool.js +2 -2
- package/dist/components/Chat/PartTypes/PartApprovalTool.mjs +1 -1
- package/dist/components/Chat/PartTypes/index.js +1 -1
- package/dist/components/Chat/PartTypes/index.mjs +1 -1
- package/dist/components/Chat/demo-long-messages.js +2 -2
- package/dist/components/Chat/demo-long-messages.mjs +1 -1
- package/dist/components/Chat/demo-tests.js +1 -1
- package/dist/components/Chat/demo-tests.mjs +1 -1
- package/dist/components/Chat/demo.js +1 -1
- package/dist/components/Chat/demo.mjs +1 -1
- package/dist/components/Chat/example-usage.js +1 -1
- package/dist/components/Chat/example-usage.mjs +1 -1
- package/dist/components/Chat/example-with-vercel-ai.js +1 -1
- package/dist/components/Chat/example-with-vercel-ai.mjs +1 -1
- package/dist/components/Chat/index.js +1 -1
- package/dist/components/Chat/index.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/Views/ColleaguesView.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/pages/Blog.mjs +1 -1
- package/dist/pages/Documentation.mjs +1 -1
- package/dist/pages/IndexPage.mjs +1 -1
- package/dist/pages/Intranet.mjs +1 -1
- package/dist/pages/LandingPage.mjs +1 -1
- package/dist/pages/Page.mjs +1 -1
- package/dist/pages/Publish.mjs +1 -1
- package/dist/pages/Website.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-CEAEO2FN.mjs +0 -1
- package/dist/chunk-EH3PJU6C.mjs +0 -1
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
`,children:r?"Processing...":"Deny"}),(0,Oo.jsx)("button",{onClick:w,disabled:r,className:`
|
|
19
19
|
px-4 py-2 text-white border-none rounded text-sm
|
|
20
20
|
${r?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
|
|
21
|
-
`,children:"Cancel"})]})]}):null};var ka=({toolPart:e,index:t,addToolResult:o})=>{let[a,n]=wo.default.useState(!0),[i,r]=wo.default.useState(null),s=()=>{o(e.input?.toolCallId,e.input?.tool,"Approved"),n(!1),r("approve")},c=()=>{o(e.input?.toolCallId,e.input?.tool,"Denied"),n(!1),r("deny")};switch(e.state){case"input-available":return(0,Oo.jsxs)("div",{className:"mb-2",children:[(0,Oo.jsx)(Na,{isOpen:a,onApprove:s,onDeny:c,onClose:()=>n(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,Oo.jsxs)(Oo.Fragment,{children:[i==="approve"&&(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.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,Oo.jsx)("svg",{className:"Oo-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Oo.jsx)("svg",{className:"Oo-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Co=require("@radix-ui/react-use-controllable-state");var mt=V(require("@radix-ui/react-collapsible")),Wt=mt.Root,Gt=mt.CollapsibleTrigger,$t=mt.CollapsibleContent;var Ta=require("streamdown"),Tt=(0,ft.memo)(({className:e,...t})=>(0,Oo.jsx)(Ta.Streamdown,{className:l("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Tt.displayName="Response";var Ra=(0,ft.createContext)(null),dr=()=>{let e=(0,ft.useContext)(Ra);if(!e)throw new Error("Reasoning components must _a used within Reasoning");return e},pr=1e3,mr=1e3,No=(0,ft.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:n,duration:i,children:r,...s})=>{let[c,m]=(0,Co.useControllableState)({prop:o,defaultProp:a,onChange:n}),[w,f]=(0,Co.useControllableState)({prop:i,defaultProp:0}),[y,R]=(0,ft.useState)(!1),[I,T]=(0,ft.useState)(null);(0,ft.useEffect)(()=>{t?I===null&&T(Date.now()):I!==null&&(f(Math.ceil((Date.now()-I)/mr)),T(null))},[t,I,f]),(0,ft.useEffect)(()=>{if(a&&!t&&c&&!y){let N=setTimeout(()=>{m(!1),R(!0)},pr);return()=>clearTimeout(N)}},[t,c,a,m,y]);let C=N=>{m(N)};return(0,Oo.jsx)(Ra.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:m,duration:w},children:(0,Oo.jsx)(Wt,{className:l("not-prose mb-4",e),onOpenChange:C,open:c,...s,children:r})})}),ur=(e,t)=>e||t===0?(0,Oo.jsx)("Oo",{children:"Thinking..."}):t===void 0?(0,Oo.jsx)("Oo",{children:"Thought for a few seconds"}):(0,Oo.jsxs)("Oo",{children:["Thought for ",t," seconds"]}),ko=(0,ft.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:n,duration:i}=dr();return(0,Oo.jsx)(Gt,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)(_a.BrainIcon,{className:"size-4"}),ur(a,i),(0,Oo.jsx)(_a.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),Po=(0,ft.memo)(({className:e,children:t,...o})=>(0,Oo.jsx)($t,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Oo.jsx)(Tt,{className:"grid gap-2",children:t})}));No.displayName="Reasoning";ko.displayName="ReasoningTrigger";Po.displayName="ReasoningContent";var To=require("react-syntax-highlighter"),_t=require("react-syntax-highlighter/dist/esm/styles/prism"),gr=(0,ft.createContext)({code:""}),Jt=({code:e,language:t,showLineNumbers:o=!1,className:a,children:n,...i})=>(0,Oo.jsx)(gr.Provider,{value:{code:e},children:(0,Oo.jsx)("div",{className:l("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",a),...i,children:(0,Oo.jsxs)("div",{className:"relative",children:[(0,Oo.jsx)(To.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:_t.oneLight,children:e}),(0,Oo.jsx)(To.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:_t.oneDark,children:e}),n&&(0,Oo.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:n})]})})});var Aa=({className:e,...t})=>(0,Oo.jsx)(Wt,{className:l("not-prose mb-4 w-full",e),...t}),fr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Oo.jsxs)(ie,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Oo.jsx)(_a.CircleIcon,{className:"size-4"}),"input-available":(0,Oo.jsx)(_a.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Oo.jsx)(_a.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Oo.jsx)(_a.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Ia=({className:e,type:t,state:o,...a})=>(0,Oo.jsxs)(Gt,{className:l("flex w-full items-center justify-between gap-4 Oo-3 pl-0 w-2xl",e),...a,children:[(0,Oo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Oo.jsx)(_a.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Oo.jsx)("span",{className:"font-medium text-sm",children:t}),fr(o)]}),(0,Oo.jsx)(_a.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Ma=({className:e,...t})=>(0,Oo.jsx)($t,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Ba=({className:e,input:t,...o})=>(0,Oo.jsxs)("div",{className:l("space-y-2 overflow-hidden Oo-4",e),...o,children:[(0,Oo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Oo.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Oo.jsx)(Jt,{code:JSON.stringify(t,null,2),language:"json"})})]}),La=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let n=(0,Oo.jsx)("div",{children:t});return typeof t=="object"?n=(0,Oo.jsx)(Jt,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(n=(0,Oo.jsx)(Jt,{code:t,language:"json"})),(0,Oo.jsxs)("div",{className:l("space-y-2 Oo-4",e),...a,children:[(0,Oo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,Oo.jsxs)("div",{className:l("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,Oo.jsx)("div",{children:o}),n]})]})};var Ua=require("date-fns");function Ea({taskId:e,polling:t=!0,system:o="payload"}){let[a,n]=(0,ft.useState)(null),[i,r]=(0,ft.useState)(!1),[s,c]=(0,ft.useState)(null),m=async(f=!0)=>{if(e){f&&r(!0);try{let y=await fetch(`/api/tasks/${e}`);if(!y.ok)throw new Error(`Failed to fetch task: ${y.statusText}`);let R=await y.json();n(R)}catch(y){console.error("Error fetching task:",y),c(y instanceof Error?y:new Error("Unknown error occurred"))}finally{f&&r(!1)}}},w=()=>m(!1);return(0,ft.useEffect)(()=>{e&&m(!0);let f=null;return e&&t&&(f=setInterval(w,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:a,loading:i,error:s}}var br=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"}},vr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Fa({data:e}){let{id:t,system:o,fetchLatest:a,taskData:n,error:i}=e||{};if(!t)return null;let r=null,s=!0,c=i,m=a!==void 0?a:!0;if(r=n||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:a,system:o,fetchLatest:m,taskData:r,error:c}),m){let{task:R,loading:I,error:T}=Ea({taskId:t,system:o});r=R,s=I,c=T}else s=!1;let w=br(r?.status||"todo"),f=vr(r?.status||"todo"),y=r?.dateLogged||new Date().toISOString();try{let R=new Date(r?.dateLogged||"");isNaN(R.getTime())||(y=(0,Ua.formatDistanceToNow)(R,{addSuffix:!0}))}catch{}return(0,Oo.jsxs)(fe,{className:l("w-full max-w-md shadow-md",c&&"border border-destructive"),children:[(0,Oo.jsxs)(Ee,{className:"pb-2",children:[(0,Oo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Oo.jsx)(ze,{className:"text-lg font-semibold",children:s?"Loading...":r?.name||"Task"}),(0,Oo.jsx)(ie,{className:`${w}`,children:f})]}),r?.project&&(0,Oo.jsxs)(vo,{className:"text-sm text-gray-500",children:["Project: ",r.project.name]})]}),(0,Oo.jsx)(Pe,{className:"pb-2",children:s?(0,Oo.jsx)("div",{className:"animate-pulse Oo-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,Oo.jsx)("Oo",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Oo.jsx)("Oo",{className:"text-sm text-foreground",children:r?.description||"......."})}),(0,Oo.jsx)(Pt,{className:"pt-2 flex items-center justify-between",children:(0,Oo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Oo.jsx)(_a.Clock,{className:"Oo-3 w-3 mr-1"}),(0,Oo.jsxs)("span",{children:["Created ",y]}),(0,Oo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Oo.jsxs)("span",{children:["Task #",t]})]})})]})}function Oa({artefact:e,taskId:t,taskData:o,loading:a=!1,error:n=null}){let i=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},r=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(r=(0,Ua.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,Oo.jsxs)(fe,{className:"w-full max-w-md shadow-md",children:[(0,Oo.jsx)(Ee,{className:"pb-2",children:(0,Oo.jsx)("div",{className:"flex justify-between items-start",children:(0,Oo.jsx)(ze,{className:"text-lg font-semibold",children:a?"Loading...":i.name})})}),(0,Oo.jsx)(Pe,{className:"pb-2",children:a?(0,Oo.jsx)("div",{className:"animate-pulse Oo-4 bg-gray-200 rounded w-3/4 mb-2"}):n?(0,Oo.jsx)("Oo",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Oo.jsx)("Oo",{className:"text-sm text-foreground",children:e})}),(0,Oo.jsx)(Pt,{className:"pt-2 flex items-center justify-between",children:(0,Oo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Oo.jsx)(_a.Clock,{className:"Oo-3 w-3 mr-1"}),(0,Oo.jsxs)("span",{children:["Created ",r]}),(0,Oo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Oo.jsxs)("span",{children:["Task #",i.id]})]})})]})}var hr=e=>e.startsWith("image/")?(0,Oo.jsx)(_a.Image,{className:"Oo-4 w-4"}):e.startsWith("text/")?(0,Oo.jsx)(_a.FileText,{className:"Oo-4 w-4"}):(0,Oo.jsx)(_a.File,{className:"Oo-4 w-4"}),Va=({message:e,addToolResult:t,status:o,messages:a})=>e.parts.map((n,i)=>{if(n.type==="text")return(0,Oo.jsx)(Tt,{children:n.text},`${i}`);if(n.type==="file"){let r=n;return(0,Oo.jsx)("div",{className:"mb-2 Oo-2 bg-background/50 rounded-lg",children:(0,Oo.jsxs)("div",{className:"flex items-center gap-2",children:[hr(r.mediaType||"application/octet-stream"),(0,Oo.jsx)("div",{className:"flex-1 min-w-0",children:(0,Oo.jsx)("Oo",{className:"text-sm font-medium truncate",children:r.filename||r.url?.split("/").pop()||"File"})}),r.url&&(0,Oo.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(r.url,"_blank"),className:"Oo-8 w-8 Oo-0",children:(0,Oo.jsx)(_a.Download,{className:"Oo-4 w-4"})})]})},i)}if(n.type.startsWith("tool-")){let r=n,s=n.type.replace("tool-","");if(s==="task")switch(r.state){case"input-available":return(0,Oo.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},i);case"output-available":return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(Fa,{data:{id:r.output?.id||r.input?.id,fetchLatest:!1,taskData:r.output||r.input}})},i);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}if(n.type==="tool-requestEndpointLogin")return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(xo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-authenticate")return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(xo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-requestApproval")return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(ka,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(s==="artefact")switch(r.state){case"input-available":return(0,Oo.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},i);case"output-available":return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(Oa,{artefact:r.output?.description||"",taskId:r.output?.id||r.input?.id,taskData:r.output||r.input})},i);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsxs)(fe,{className:"w-full max-w-md",children:[(0,Oo.jsx)(Ee,{children:(0,Oo.jsx)(ze,{className:"text-lg",children:s})}),(0,Oo.jsxs)(Pe,{children:[r.state==="input-available"&&(0,Oo.jsxs)("Oo",{className:"text-sm",children:["Processing ",s,"..."]}),r.state==="output-available"&&(0,Oo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.output,null,2)}),r.state==="output-error"&&(0,Oo.jsxs)("Oo",{className:"text-sm text-red-500",children:["Error: ",r.errorText]})]})]})},i)}if(n.type.startsWith("data-")){let r=n,s=n.type.replace("data-","");return s==="reference"?(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(fe,{className:"w-full",children:(0,Oo.jsx)(Pe,{className:"Oo-4",children:(0,Oo.jsx)("div",{className:"space-y-2",children:r.data?.references?.map((c,m)=>(0,Oo.jsxs)("div",{className:"flex items-center gap-2 Oo-2 rounded-md bg-muted/50",children:[(0,Oo.jsx)(ie,{variant:"outline",children:c.type||"link"}),(0,Oo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Oo.jsx)("Oo",{className:"text-sm font-medium truncate",children:c.title}),c.description&&(0,Oo.jsx)("Oo",{className:"text-xs text-muted-foreground truncate",children:c.description})]}),c.url&&(0,Oo.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(c.url,"_blank"),className:"Oo-8 w-8 Oo-0",children:(0,Oo.jsx)(_a.ExternalLink,{className:"Oo-4 w-4"})})]},m))})})})},i):s==="menu"?(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsxs)(fe,{className:"w-full",children:[(0,Oo.jsx)(Ee,{children:(0,Oo.jsx)(ze,{className:"text-lg",children:r.data?.title})}),(0,Oo.jsx)(Pe,{children:(0,Oo.jsx)("div",{className:"space-y-2",children:r.data?.items?.map((c,m)=>(0,Oo.jsx)(D,{variant:"outline",className:"w-full justify-start",onClick:c.action,children:(0,Oo.jsxs)("div",{className:"text-left",children:[(0,Oo.jsx)("Oo",{className:"font-medium",children:c.label}),c.description&&(0,Oo.jsx)("Oo",{className:"text-xs text-muted-foreground",children:c.description})]})},m))})})]})},i):(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsxs)(fe,{className:"w-full max-w-md",children:[(0,Oo.jsx)(Ee,{children:(0,Oo.jsx)(ze,{className:"text-lg",children:s})}),(0,Oo.jsx)(Pe,{children:(0,Oo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.data,null,2)})})]})},i)}if(n.type==="reasoning")return(0,Oo.jsxs)(No,{className:"w-full",isStreaming:o==="streaming"&&i===e.parts.length-1&&e.id===a.Oo(-1)?.id,children:[(0,Oo.jsx)(ko,{}),(0,Oo.jsx)(Po,{children:n.text})]},`${i}`);if(n.type==="dynamic-tool")return(0,Oo.jsxs)(Aa,{defaultOpen:n.state!=="output-available",children:[(0,Oo.jsx)(Ia,{type:`tool-${n.toolName}`,state:n.state}),(0,Oo.jsxs)(Ma,{children:[(0,Oo.jsx)(Ba,{input:n.input}),(0,Oo.jsx)(La,{output:n.output,errorText:n.errorText})]})]},`${e.id}-${i}`)});var Ga=({className:e,from:t,...o})=>(0,Oo.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...o}),yr=(0,jo.cva)("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),$a=({children:e,className:t,variant:o,...a})=>(0,Oo.jsx)("div",{className:l(yr({variant:o,className:t})),...a,children:e});function qa({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:n,fileUploads:i,isDragOver:r,enableFileUpload:s,onInputChange:c,addToolResult:m,onSendMessage:w,onKeyPress:f,onFileUpload:y,onRemoveFile:R,onDragOver:I,className:T,status:C="ready"}){let N=(0,ft.useRef)(null),H=(0,ft.useRef)(null),S=(0,ft.useRef)(null),[M,_]=(0,ft.useState)(!1),[$,le]=(0,ft.useState)({path:[],selectedItems:[],filters:{}});(0,ft.useEffect)(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,ft.useEffect)(()=>{M&&setTimeout(()=>{N.current?.scrollIntoView({behavior:"smooth"})},100)},[M]);let J=()=>ho($),W=()=>{let u=[];return n.forEach(U=>{U.actions&&U.actions.forEach(he=>{u.push({label:he.label,action:()=>X(he.id,{path:[U],selectedItems:[],filters:{}})})}),U.children&&U.children.forEach(he=>{he.type==="list"&&he.data&&u.push({label:`View ${he.name}`,action:()=>_(!0)})})}),u.slice(0,5)},X=(u,U)=>{console.log("Capability action:",u,U);let he=`Executing ${u} with context: ${JSON.stringify(U.path.map(Ae=>Ae.name))}`;_(!1)},ce=ho({path:[],selectedItems:[],filters:{}}),B=u=>{y(u.target.files),u.target.files&&(u.target.value="")},Se=u=>{u.preventDefault(),I(!0)},d=u=>{u.preventDefault(),I(!1)},E=u=>{u.preventDefault(),I(!1),y(u.dataTransfer.files)},z=u=>{if(u===0)return"0 Bytes";let U=1024,he=["Bytes","KB","MB","GB"],Ae=Math.floor(Math.log(u)/Math.log(U));return parseFloat((u/Math.pow(U,Ae)).toFixed(2))+" "+he[Ae]},G=u=>u.startsWith("image/")?(0,Oo.jsx)(_a.Image,{className:"Oo-4 w-4"}):u.startsWith("text/")?(0,Oo.jsx)(_a.FileText,{className:"Oo-4 w-4"}):(0,Oo.jsx)(_a.File,{className:"Oo-4 w-4"}),Z={messages:e,currentSessionTitle:a,capabilities:n,currentCapabilityContext:$,contextualActions:ce,getQuickSuggestions:W().map(u=>u.label)},ve=()=>{navigator.clipboard.writeText(JSON.stringify(Z,null,2)),alert("Debug info copied to clipboard")};return(0,Oo.jsxs)("div",{className:`Oo-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${T||""}`,children:[(0,Oo.jsxs)(Ce,{ref:H,className:"flex-1 Oo-4 bg-background border-0",onDragOver:Se,onDragLeave:d,onDrop:E,children:[(0,Oo.jsxs)("div",{className:l("space-y-4",r&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Oo.jsx)(gt.animate,{children:e.map(u=>(0,Oo.jsx)(gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Oo.jsx)(Ga,{from:u.role,children:(0,Oo.jsx)($a,{variant:"flat",children:Va({message:u,addToolResult:m??(()=>{}),status:C,messages:e})})},u.id)},u.id))}),M&&(0,Oo.jsxs)(gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Oo.jsx)(nt,{className:"Oo-8 w-8",children:(0,Oo.jsx)(st,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Oo.jsx)(_a.Bot,{className:"Oo-4 w-4"})})}),(0,Oo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Oo.jsx)(ya,{capabilities:n,isOpen:M,onToggle:()=>_(!M),onActionSelect:X,className:"w-full"})})]}),o&&(0,Oo.jsxs)(gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Oo.jsx)(nt,{className:"Oo-8 w-8",children:(0,Oo.jsx)(st,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Oo.jsx)(_a.Bot,{className:"Oo-4 w-4"})})}),(0,Oo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Oo.jsxs)("div",{className:"flex space-x-1",children:[(0,Oo.jsx)("div",{className:"w-2 Oo-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Oo.jsx)("div",{className:"w-2 Oo-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Oo.jsx)("div",{className:"w-2 Oo-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Oo.jsx)("div",{ref:N})]}),i.length>0&&(0,Oo.jsx)("div",{className:"Oo-4 border-t bg-muted/10",children:(0,Oo.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(u=>(0,Oo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg Oo-2 border",children:[G(u.file.type),(0,Oo.jsx)("span",{className:"text-sm font-medium",children:u.file.name}),(0,Oo.jsx)("span",{className:"text-xs text-muted-foreground",children:z(u.file.size)}),(0,Oo.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>R(u.id),className:"Oo-6 w-6 Oo-0",children:(0,Oo.jsx)(_a.X,{className:"Oo-4 w-4"})})]},u.id))})}),(0,Oo.jsxs)("div",{className:"border rounded-2xl Oo-4 bg-muted/20",children:[(0,Oo.jsxs)("div",{className:"flex gap-3",children:[(0,Oo.jsx)(wt,{value:t,onChange:u=>c(u.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),s&&(0,Oo.jsx)(D,{variant:"outline",size:"icon",onClick:()=>S.current?.click(),className:"rounded-2xl Oo-10 w-10 shadow-sm",children:(0,Oo.jsx)(_a.Paperclip,{className:"Oo-4 w-4"})}),(0,Oo.jsx)(D,{onClick:w,disabled:!t.trim()&&i.length===0||o,size:"icon",className:"rounded-2xl Oo-10 w-10 shadow-sm",children:(0,Oo.jsx)(_a.Send,{className:"Oo-4 w-4"})})]}),(0,Oo.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Oo.jsxs)(D,{onClick:()=>_(!M),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Oo.jsx)(_a.Menu,{className:"Oo-3 w-3 mr-1"}),M?"Hide":"Show"," Capabilities"]}),(0,Oo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[J().map((u,U)=>(0,Oo.jsx)(D,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>X(u.id,$),children:u.label},`context-${u.id}`)),J().length===0&&W().map((u,U)=>(0,Oo.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:u.action,children:u.label},`suggestion-${U}`)),(0,Oo.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:ve,children:"Debug"})]})]}),s&&(0,Oo.jsx)("input",{ref:S,type:"file",multiple:!0,onChange:B,className:"hidden"})]})]})}function ot({aiConfig:e,useCustomChat:t,enableAI:o=!0,messages:a=[],businessUnits:n=[],capabilities:i=[],sidebarItems:r=[],notifications:s=[],sessions:c=[],onNewChat:m,onSessionSelect:w,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:R=()=>{},onNotificationRemove:I=()=>{},onRemoveAll:T=()=>{},onActionClick:C=()=>{},onSearch:N=E=>console.log("Search query:",E),initialTeam:H="design",currentSession:S=null,showCapabilities:M=!0,title:_="Digital Colleagues",enableFileUpload:$=!0,maxFileSize:le=10,allowedFileTypes:J=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:W="/headerlogo.png",appName:X="Nuvia",tagline:ce="AI-Powered Workspace",actionIcon:B=(0,Oo.jsx)(_a.Users,{className:"mr-2 Oo-4 w-4"}),actionText:Se="Collaborate",sidebarInitiallyClosed:d=!1}){let E={...e,onError:F=>{G?.setMessages(de=>[...de,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:F.message}]}]),console.error("Error in CopilotInterface:",F)}},z=(0,Do.useChat)(E||{}),G=o?t||z:null,[Z,ve]=(0,ft.useState)(""),[u,U]=(0,ft.useState)(!1),he=G?.messages||a,Ae=Z,Ja=G?.status==="submitted"||u,Xa=G?.addToolResult?(F,de,ee)=>{G.addToolResult({tool:de,toolCallId:F,output:ee}),console.log("Tool result added:",{toolCallId:F,tool:de,output:ee}),G.sendMessage()}:()=>{console.log("addToolResult not available")},vt=n||[],Qa={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"},[Ya,Za]=(0,ft.useState)(()=>vt.length===0?Qa:vt.find(F=>F.id===H)||vt[0]),[ht,Dt]=(0,ft.useState)([]),[ei,ti]=(0,ft.useState)(!1),oi=F=>{if(!F||!$)return;let de=[];Array.from(F).forEach(ee=>{if(ee.size>le*1024*1024){alert(`File ${ee.name} is too large. Maximum size is ${le}MB.`);return}if(J.length>0&&!J.some(Rt=>ee.type.match(Rt))){alert(`File type ${ee.type} is not allowed.`);return}let So={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ee,status:"pending",progress:0};if(ee.type.startsWith("image/")){let Rt=new FileReader;Rt.onload=si=>{Dt(li=>li.map(Yt=>Yt.id===So.id?{...Yt,preview:si.target?.result}:Yt))},Rt.readAsDataURL(ee)}de.push(So)}),Dt(ee=>[...ee,...de])},ai=F=>{Dt(de=>de.filter(ee=>ee.id!==F))},Ro=()=>{if(!(!Ae.trim()&&ht.length===0)){if(G){let F=ht.length>0?ii(ht.map(de=>de.file)):void 0;G.sendMessage({text:Ae,files:F},{body:{timestamp:Date.now()}}),ve("")}else console.log("Message to send:",Ae),console.log("Files to upload:",ht),ve(""),U(!0),setTimeout(()=>{U(!1)},1500);Dt([])}},ii=F=>{let de=new DataTransfer;return F.forEach(ee=>de.items.add(ee)),de.files},ri=F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),Ro())},ni=F=>{ve(F)};return(0,Oo.jsx)(ba,{sidebarItems:r||[],title:_,notifications:s||[],businessUnits:vt,currentBusinessUnit:Ya,onBusinessUnitChange:F=>{F&&(Za(F),R?.(F))},onSearch:N,showTabs:!1,onActionClick:C,actionIcon:B,actionText:Se,onNotificationRemove:I,onRemoveAll:T,logo:W,appName:X,tagline:ce,sidebarInitiallyClosed:d,children:(0,Oo.jsx)(Qt.AnimatePresence,{mode:"wait",children:(0,Oo.jsx)(Qt.motion.div,{className:"flex-1 Oo-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Oo.jsxs)("div",{className:"Oo-full flex",children:[(0,Oo.jsx)("div",{className:"w-80 flex-shrink-0 Oo-full Oo-2",children:(0,Oo.jsx)(va,{sessions:c||[],currentSession:S,teams:vt,onNewChat:m,onSessionSelect:w,onSessionEdit:y,onSessionDelete:f})}),(0,Oo.jsx)("div",{className:"flex-1 Oo-full Oo-2",children:(0,Oo.jsx)(qa,{messages:he||[],input:Ae,isTyping:Ja,currentSessionTitle:S?.title,capabilities:i||[],onInputChange:ni,addToolResult:Xa,onSendMessage:Ro,onKeyPress:ri,fileUploads:ht,isDragOver:ei,enableFileUpload:$,onFileUpload:oi,onRemoveFile:ai,onDragOver:ti})})]})},"chat-interface")})})}var bt=[{id:"1",title:"AI Assistant Chat",lastMessage:"How can I help you today?"}];function xr(){return(0,Oo.jsx)(ot,{businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"AI-Powered Copilot"})}function wr(){return(0,Oo.jsx)(ot,{aiConfig:{onError:e=>console.error("Chat error:",e)},businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Custom AI Copilot"})}function Cr(){return(0,Oo.jsx)(ot,{enableAI:!1,messages:[{id:"1",role:"assistant",parts:[{type:"text",text:"This is demo mode - no AI involved!"}]}],businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>console.log("New chat started"),onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Demo Copilot"})}function Nr(){let e=(0,Do.useChat)({onError:t=>console.error("Custom chat error:",t)});return(0,Oo.jsx)(ot,{useCustomChat:e,businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>{e.setMessages([]),console.log("New chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Advanced AI Copilot"})}function kr(){return(0,Oo.jsx)(ot,{sidebarInitiallyClosed:!0,businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Focused AI Chat"})}function Pr(){let e=(0,Do.useChat)({onError:t=>console.error("File upload chat error:",t),onFinish:t=>console.log("Message with files completed:",t)});return(0,Oo.jsx)(ot,{useCustomChat:e,enableAI:!0,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["image/*","text/*","application/pdf"],businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>{e.setMessages([]),console.log("New file upload chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"AI Copilot with File Uploads"})}0&&(module.exports={AdvancedAICopilot,CustomAICopilot,DemoCopilot,FileUploadAICopilot,FocusedChatCopilot,SimpleAICopilot});
|
|
21
|
+
`,children:"Cancel"})]})]}):null};var ka=({toolPart:e,index:t,addToolResult:o})=>{let[a,n]=wo.default.useState(!0),[i,r]=wo.default.useState(null),s=()=>{o(e.toolCallId,e.type,"Approved"),n(!1),r("approve")},c=()=>{o(e.toolCallId,e.type,"Denied"),n(!1),r("deny")};switch(e.state){case"input-available":return(0,Oo.jsxs)("div",{className:"mb-2",children:[(0,Oo.jsx)(Na,{isOpen:a,onApprove:s,onDeny:c,onClose:()=>n(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,Oo.jsxs)(Oo.Fragment,{children:[i==="approve"&&(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.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,Oo.jsx)("svg",{className:"Oo-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),i==="deny"&&(0,Oo.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Oo.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Oo.jsx)("svg",{className:"Oo-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Oo.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Co=require("@radix-ui/react-use-controllable-state");var mt=V(require("@radix-ui/react-collapsible")),Wt=mt.Root,Gt=mt.CollapsibleTrigger,$t=mt.CollapsibleContent;var Ta=require("streamdown"),Tt=(0,ft.memo)(({className:e,...t})=>(0,Oo.jsx)(Ta.Streamdown,{className:l("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Tt.displayName="Response";var Ra=(0,ft.createContext)(null),dr=()=>{let e=(0,ft.useContext)(Ra);if(!e)throw new Error("Reasoning components must _a used within Reasoning");return e},pr=1e3,mr=1e3,No=(0,ft.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:n,duration:i,children:r,...s})=>{let[c,m]=(0,Co.useControllableState)({prop:o,defaultProp:a,onChange:n}),[w,f]=(0,Co.useControllableState)({prop:i,defaultProp:0}),[y,R]=(0,ft.useState)(!1),[I,T]=(0,ft.useState)(null);(0,ft.useEffect)(()=>{t?I===null&&T(Date.now()):I!==null&&(f(Math.ceil((Date.now()-I)/mr)),T(null))},[t,I,f]),(0,ft.useEffect)(()=>{if(a&&!t&&c&&!y){let N=setTimeout(()=>{m(!1),R(!0)},pr);return()=>clearTimeout(N)}},[t,c,a,m,y]);let C=N=>{m(N)};return(0,Oo.jsx)(Ra.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:m,duration:w},children:(0,Oo.jsx)(Wt,{className:l("not-prose mb-4",e),onOpenChange:C,open:c,...s,children:r})})}),ur=(e,t)=>e||t===0?(0,Oo.jsx)("Oo",{children:"Thinking..."}):t===void 0?(0,Oo.jsx)("Oo",{children:"Thought for a few seconds"}):(0,Oo.jsxs)("Oo",{children:["Thought for ",t," seconds"]}),ko=(0,ft.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:n,duration:i}=dr();return(0,Oo.jsx)(Gt,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Oo.jsxs)(Oo.Fragment,{children:[(0,Oo.jsx)(_a.BrainIcon,{className:"size-4"}),ur(a,i),(0,Oo.jsx)(_a.ChevronDownIcon,{className:l("size-4 transition-transform",n?"rotate-180":"rotate-0")})]})})}),Po=(0,ft.memo)(({className:e,children:t,...o})=>(0,Oo.jsx)($t,{className:l("mt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Oo.jsx)(Tt,{className:"grid gap-2",children:t})}));No.displayName="Reasoning";ko.displayName="ReasoningTrigger";Po.displayName="ReasoningContent";var To=require("react-syntax-highlighter"),_t=require("react-syntax-highlighter/dist/esm/styles/prism"),gr=(0,ft.createContext)({code:""}),Jt=({code:e,language:t,showLineNumbers:o=!1,className:a,children:n,...i})=>(0,Oo.jsx)(gr.Provider,{value:{code:e},children:(0,Oo.jsx)("div",{className:l("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",a),...i,children:(0,Oo.jsxs)("div",{className:"relative",children:[(0,Oo.jsx)(To.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:_t.oneLight,children:e}),(0,Oo.jsx)(To.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:_t.oneDark,children:e}),n&&(0,Oo.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:n})]})})});var Aa=({className:e,...t})=>(0,Oo.jsx)(Wt,{className:l("not-prose mb-4 w-full",e),...t}),fr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Oo.jsxs)(ie,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Oo.jsx)(_a.CircleIcon,{className:"size-4"}),"input-available":(0,Oo.jsx)(_a.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Oo.jsx)(_a.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Oo.jsx)(_a.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Ia=({className:e,type:t,state:o,...a})=>(0,Oo.jsxs)(Gt,{className:l("flex w-full items-center justify-between gap-4 Oo-3 pl-0 w-2xl",e),...a,children:[(0,Oo.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Oo.jsx)(_a.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Oo.jsx)("span",{className:"font-medium text-sm",children:t}),fr(o)]}),(0,Oo.jsx)(_a.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Ma=({className:e,...t})=>(0,Oo.jsx)($t,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Ba=({className:e,input:t,...o})=>(0,Oo.jsxs)("div",{className:l("space-y-2 overflow-hidden Oo-4",e),...o,children:[(0,Oo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Oo.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Oo.jsx)(Jt,{code:JSON.stringify(t,null,2),language:"json"})})]}),La=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let n=(0,Oo.jsx)("div",{children:t});return typeof t=="object"?n=(0,Oo.jsx)(Jt,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(n=(0,Oo.jsx)(Jt,{code:t,language:"json"})),(0,Oo.jsxs)("div",{className:l("space-y-2 Oo-4",e),...a,children:[(0,Oo.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,Oo.jsxs)("div",{className:l("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,Oo.jsx)("div",{children:o}),n]})]})};var Ua=require("date-fns");function Ea({taskId:e,polling:t=!0,system:o="payload"}){let[a,n]=(0,ft.useState)(null),[i,r]=(0,ft.useState)(!1),[s,c]=(0,ft.useState)(null),m=async(f=!0)=>{if(e){f&&r(!0);try{let y=await fetch(`/api/tasks/${e}`);if(!y.ok)throw new Error(`Failed to fetch task: ${y.statusText}`);let R=await y.json();n(R)}catch(y){console.error("Error fetching task:",y),c(y instanceof Error?y:new Error("Unknown error occurred"))}finally{f&&r(!1)}}},w=()=>m(!1);return(0,ft.useEffect)(()=>{e&&m(!0);let f=null;return e&&t&&(f=setInterval(w,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:a,loading:i,error:s}}var br=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"}},vr=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function Fa({data:e}){let{id:t,system:o,fetchLatest:a,taskData:n,error:i}=e||{};if(!t)return null;let r=null,s=!0,c=i,m=a!==void 0?a:!0;if(r=n||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:a,system:o,fetchLatest:m,taskData:r,error:c}),m){let{task:R,loading:I,error:T}=Ea({taskId:t,system:o});r=R,s=I,c=T}else s=!1;let w=br(r?.status||"todo"),f=vr(r?.status||"todo"),y=r?.dateLogged||new Date().toISOString();try{let R=new Date(r?.dateLogged||"");isNaN(R.getTime())||(y=(0,Ua.formatDistanceToNow)(R,{addSuffix:!0}))}catch{}return(0,Oo.jsxs)(fe,{className:l("w-full max-w-md shadow-md",c&&"border border-destructive"),children:[(0,Oo.jsxs)(Ee,{className:"pb-2",children:[(0,Oo.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Oo.jsx)(ze,{className:"text-lg font-semibold",children:s?"Loading...":r?.name||"Task"}),(0,Oo.jsx)(ie,{className:`${w}`,children:f})]}),r?.project&&(0,Oo.jsxs)(vo,{className:"text-sm text-gray-500",children:["Project: ",r.project.name]})]}),(0,Oo.jsx)(Pe,{className:"pb-2",children:s?(0,Oo.jsx)("div",{className:"animate-pulse Oo-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,Oo.jsx)("Oo",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Oo.jsx)("Oo",{className:"text-sm text-foreground",children:r?.description||"......."})}),(0,Oo.jsx)(Pt,{className:"pt-2 flex items-center justify-between",children:(0,Oo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Oo.jsx)(_a.Clock,{className:"Oo-3 w-3 mr-1"}),(0,Oo.jsxs)("span",{children:["Created ",y]}),(0,Oo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Oo.jsxs)("span",{children:["Task #",t]})]})})]})}function Oa({artefact:e,taskId:t,taskData:o,loading:a=!1,error:n=null}){let i=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},r=i.dateLogged;try{let s=new Date(i.dateLogged);isNaN(s.getTime())||(r=(0,Ua.formatDistanceToNow)(s,{addSuffix:!0}))}catch{}return(0,Oo.jsxs)(fe,{className:"w-full max-w-md shadow-md",children:[(0,Oo.jsx)(Ee,{className:"pb-2",children:(0,Oo.jsx)("div",{className:"flex justify-between items-start",children:(0,Oo.jsx)(ze,{className:"text-lg font-semibold",children:a?"Loading...":i.name})})}),(0,Oo.jsx)(Pe,{className:"pb-2",children:a?(0,Oo.jsx)("div",{className:"animate-pulse Oo-4 bg-gray-200 rounded w-3/4 mb-2"}):n?(0,Oo.jsx)("Oo",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Oo.jsx)("Oo",{className:"text-sm text-foreground",children:e})}),(0,Oo.jsx)(Pt,{className:"pt-2 flex items-center justify-between",children:(0,Oo.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Oo.jsx)(_a.Clock,{className:"Oo-3 w-3 mr-1"}),(0,Oo.jsxs)("span",{children:["Created ",r]}),(0,Oo.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Oo.jsxs)("span",{children:["Task #",i.id]})]})})]})}var hr=e=>e.startsWith("image/")?(0,Oo.jsx)(_a.Image,{className:"Oo-4 w-4"}):e.startsWith("text/")?(0,Oo.jsx)(_a.FileText,{className:"Oo-4 w-4"}):(0,Oo.jsx)(_a.File,{className:"Oo-4 w-4"}),Va=({message:e,addToolResult:t,status:o,messages:a})=>e.parts.map((n,i)=>{if(n.type==="text")return(0,Oo.jsx)(Tt,{children:n.text},`${i}`);if(n.type==="file"){let r=n;return(0,Oo.jsx)("div",{className:"mb-2 Oo-2 bg-background/50 rounded-lg",children:(0,Oo.jsxs)("div",{className:"flex items-center gap-2",children:[hr(r.mediaType||"application/octet-stream"),(0,Oo.jsx)("div",{className:"flex-1 min-w-0",children:(0,Oo.jsx)("Oo",{className:"text-sm font-medium truncate",children:r.filename||r.url?.split("/").pop()||"File"})}),r.url&&(0,Oo.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(r.url,"_blank"),className:"Oo-8 w-8 Oo-0",children:(0,Oo.jsx)(_a.Download,{className:"Oo-4 w-4"})})]})},i)}if(n.type.startsWith("tool-")){let r=n,s=n.type.replace("tool-","");if(s==="task")switch(r.state){case"input-available":return(0,Oo.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},i);case"output-available":return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(Fa,{data:{id:r.output?.id||r.input?.id,fetchLatest:!1,taskData:r.output||r.input}})},i);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}if(n.type==="tool-requestEndpointLogin")return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(xo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-authenticate")return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(xo,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(n.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",r),(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(ka,{toolPart:r,index:i,addToolResult:t??(()=>{})})},i);if(s==="artefact")switch(r.state){case"input-available":return(0,Oo.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},i);case"output-available":return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(Oa,{artefact:r.output?.description||"",taskId:r.output?.id||r.input?.id,taskData:r.output||r.input})},i);case"output-error":return(0,Oo.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",r.errorText]},i);default:return null}return(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsxs)(fe,{className:"w-full max-w-md",children:[(0,Oo.jsx)(Ee,{children:(0,Oo.jsx)(ze,{className:"text-lg",children:s})}),(0,Oo.jsxs)(Pe,{children:[r.state==="input-available"&&(0,Oo.jsxs)("Oo",{className:"text-sm",children:["Processing ",s,"..."]}),r.state==="output-available"&&(0,Oo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.output,null,2)}),r.state==="output-error"&&(0,Oo.jsxs)("Oo",{className:"text-sm text-red-500",children:["Error: ",r.errorText]})]})]})},i)}if(n.type.startsWith("data-")){let r=n,s=n.type.replace("data-","");return s==="reference"?(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsx)(fe,{className:"w-full",children:(0,Oo.jsx)(Pe,{className:"Oo-4",children:(0,Oo.jsx)("div",{className:"space-y-2",children:r.data?.references?.map((c,m)=>(0,Oo.jsxs)("div",{className:"flex items-center gap-2 Oo-2 rounded-md bg-muted/50",children:[(0,Oo.jsx)(ie,{variant:"outline",children:c.type||"link"}),(0,Oo.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Oo.jsx)("Oo",{className:"text-sm font-medium truncate",children:c.title}),c.description&&(0,Oo.jsx)("Oo",{className:"text-xs text-muted-foreground truncate",children:c.description})]}),c.url&&(0,Oo.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(c.url,"_blank"),className:"Oo-8 w-8 Oo-0",children:(0,Oo.jsx)(_a.ExternalLink,{className:"Oo-4 w-4"})})]},m))})})})},i):s==="menu"?(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsxs)(fe,{className:"w-full",children:[(0,Oo.jsx)(Ee,{children:(0,Oo.jsx)(ze,{className:"text-lg",children:r.data?.title})}),(0,Oo.jsx)(Pe,{children:(0,Oo.jsx)("div",{className:"space-y-2",children:r.data?.items?.map((c,m)=>(0,Oo.jsx)(D,{variant:"outline",className:"w-full justify-start",onClick:c.action,children:(0,Oo.jsxs)("div",{className:"text-left",children:[(0,Oo.jsx)("Oo",{className:"font-medium",children:c.label}),c.description&&(0,Oo.jsx)("Oo",{className:"text-xs text-muted-foreground",children:c.description})]})},m))})})]})},i):(0,Oo.jsx)("div",{className:"mb-2",children:(0,Oo.jsxs)(fe,{className:"w-full max-w-md",children:[(0,Oo.jsx)(Ee,{children:(0,Oo.jsx)(ze,{className:"text-lg",children:s})}),(0,Oo.jsx)(Pe,{children:(0,Oo.jsx)("pre",{className:"text-sm",children:JSON.stringify(r.data,null,2)})})]})},i)}if(n.type==="reasoning")return(0,Oo.jsxs)(No,{className:"w-full",isStreaming:o==="streaming"&&i===e.parts.length-1&&e.id===a.Oo(-1)?.id,children:[(0,Oo.jsx)(ko,{}),(0,Oo.jsx)(Po,{children:n.text})]},`${i}`);if(n.type==="dynamic-tool")return(0,Oo.jsxs)(Aa,{defaultOpen:n.state!=="output-available",children:[(0,Oo.jsx)(Ia,{type:`tool-${n.toolName}`,state:n.state}),(0,Oo.jsxs)(Ma,{children:[(0,Oo.jsx)(Ba,{input:n.input}),(0,Oo.jsx)(La,{output:n.output,errorText:n.errorText})]})]},`${e.id}-${i}`)});var Ga=({className:e,from:t,...o})=>(0,Oo.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...o}),yr=(0,jo.cva)("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),$a=({children:e,className:t,variant:o,...a})=>(0,Oo.jsx)("div",{className:l(yr({variant:o,className:t})),...a,children:e});function qa({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:n,fileUploads:i,isDragOver:r,enableFileUpload:s,onInputChange:c,addToolResult:m,onSendMessage:w,onKeyPress:f,onFileUpload:y,onRemoveFile:R,onDragOver:I,className:T,status:C="ready"}){let N=(0,ft.useRef)(null),H=(0,ft.useRef)(null),S=(0,ft.useRef)(null),[M,_]=(0,ft.useState)(!1),[$,le]=(0,ft.useState)({path:[],selectedItems:[],filters:{}});(0,ft.useEffect)(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,ft.useEffect)(()=>{M&&setTimeout(()=>{N.current?.scrollIntoView({behavior:"smooth"})},100)},[M]);let J=()=>ho($),W=()=>{let u=[];return n.forEach(U=>{U.actions&&U.actions.forEach(he=>{u.push({label:he.label,action:()=>X(he.id,{path:[U],selectedItems:[],filters:{}})})}),U.children&&U.children.forEach(he=>{he.type==="list"&&he.data&&u.push({label:`View ${he.name}`,action:()=>_(!0)})})}),u.slice(0,5)},X=(u,U)=>{console.log("Capability action:",u,U);let he=`Executing ${u} with context: ${JSON.stringify(U.path.map(Ae=>Ae.name))}`;_(!1)},ce=ho({path:[],selectedItems:[],filters:{}}),B=u=>{y(u.target.files),u.target.files&&(u.target.value="")},Se=u=>{u.preventDefault(),I(!0)},d=u=>{u.preventDefault(),I(!1)},E=u=>{u.preventDefault(),I(!1),y(u.dataTransfer.files)},z=u=>{if(u===0)return"0 Bytes";let U=1024,he=["Bytes","KB","MB","GB"],Ae=Math.floor(Math.log(u)/Math.log(U));return parseFloat((u/Math.pow(U,Ae)).toFixed(2))+" "+he[Ae]},G=u=>u.startsWith("image/")?(0,Oo.jsx)(_a.Image,{className:"Oo-4 w-4"}):u.startsWith("text/")?(0,Oo.jsx)(_a.FileText,{className:"Oo-4 w-4"}):(0,Oo.jsx)(_a.File,{className:"Oo-4 w-4"}),Z={messages:e,currentSessionTitle:a,capabilities:n,currentCapabilityContext:$,contextualActions:ce,getQuickSuggestions:W().map(u=>u.label)},ve=()=>{navigator.clipboard.writeText(JSON.stringify(Z,null,2)),alert("Debug info copied to clipboard")};return(0,Oo.jsxs)("div",{className:`Oo-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${T||""}`,children:[(0,Oo.jsxs)(Ce,{ref:H,className:"flex-1 Oo-4 bg-background border-0",onDragOver:Se,onDragLeave:d,onDrop:E,children:[(0,Oo.jsxs)("div",{className:l("space-y-4",r&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Oo.jsx)(gt.animate,{children:e.map(u=>(0,Oo.jsx)(gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Oo.jsx)(Ga,{from:u.role,children:(0,Oo.jsx)($a,{variant:"flat",children:Va({message:u,addToolResult:m??(()=>{}),status:C,messages:e})})},u.id)},u.id))}),M&&(0,Oo.jsxs)(gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Oo.jsx)(nt,{className:"Oo-8 w-8",children:(0,Oo.jsx)(st,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Oo.jsx)(_a.Bot,{className:"Oo-4 w-4"})})}),(0,Oo.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Oo.jsx)(ya,{capabilities:n,isOpen:M,onToggle:()=>_(!M),onActionSelect:X,className:"w-full"})})]}),o&&(0,Oo.jsxs)(gt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Oo.jsx)(nt,{className:"Oo-8 w-8",children:(0,Oo.jsx)(st,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Oo.jsx)(_a.Bot,{className:"Oo-4 w-4"})})}),(0,Oo.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Oo.jsxs)("div",{className:"flex space-x-1",children:[(0,Oo.jsx)("div",{className:"w-2 Oo-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Oo.jsx)("div",{className:"w-2 Oo-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Oo.jsx)("div",{className:"w-2 Oo-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Oo.jsx)("div",{ref:N})]}),i.length>0&&(0,Oo.jsx)("div",{className:"Oo-4 border-t bg-muted/10",children:(0,Oo.jsx)("div",{className:"flex flex-wrap gap-2",children:i.map(u=>(0,Oo.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg Oo-2 border",children:[G(u.file.type),(0,Oo.jsx)("span",{className:"text-sm font-medium",children:u.file.name}),(0,Oo.jsx)("span",{className:"text-xs text-muted-foreground",children:z(u.file.size)}),(0,Oo.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>R(u.id),className:"Oo-6 w-6 Oo-0",children:(0,Oo.jsx)(_a.X,{className:"Oo-4 w-4"})})]},u.id))})}),(0,Oo.jsxs)("div",{className:"border rounded-2xl Oo-4 bg-muted/20",children:[(0,Oo.jsxs)("div",{className:"flex gap-3",children:[(0,Oo.jsx)(wt,{value:t,onChange:u=>c(u.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),s&&(0,Oo.jsx)(D,{variant:"outline",size:"icon",onClick:()=>S.current?.click(),className:"rounded-2xl Oo-10 w-10 shadow-sm",children:(0,Oo.jsx)(_a.Paperclip,{className:"Oo-4 w-4"})}),(0,Oo.jsx)(D,{onClick:w,disabled:!t.trim()&&i.length===0||o,size:"icon",className:"rounded-2xl Oo-10 w-10 shadow-sm",children:(0,Oo.jsx)(_a.Send,{className:"Oo-4 w-4"})})]}),(0,Oo.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Oo.jsxs)(D,{onClick:()=>_(!M),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Oo.jsx)(_a.Menu,{className:"Oo-3 w-3 mr-1"}),M?"Hide":"Show"," Capabilities"]}),(0,Oo.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[J().map((u,U)=>(0,Oo.jsx)(D,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>X(u.id,$),children:u.label},`context-${u.id}`)),J().length===0&&W().map((u,U)=>(0,Oo.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:u.action,children:u.label},`suggestion-${U}`)),(0,Oo.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:ve,children:"Debug"})]})]}),s&&(0,Oo.jsx)("input",{ref:S,type:"file",multiple:!0,onChange:B,className:"hidden"})]})]})}function ot({aiConfig:e,useCustomChat:t,enableAI:o=!0,messages:a=[],businessUnits:n=[],capabilities:i=[],sidebarItems:r=[],notifications:s=[],sessions:c=[],onNewChat:m,onSessionSelect:w,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:R=()=>{},onNotificationRemove:I=()=>{},onRemoveAll:T=()=>{},onActionClick:C=()=>{},onSearch:N=E=>console.log("Search query:",E),initialTeam:H="design",currentSession:S=null,showCapabilities:M=!0,title:_="Digital Colleagues",enableFileUpload:$=!0,maxFileSize:le=10,allowedFileTypes:J=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:W="/headerlogo.png",appName:X="Nuvia",tagline:ce="AI-Powered Workspace",actionIcon:B=(0,Oo.jsx)(_a.Users,{className:"mr-2 Oo-4 w-4"}),actionText:Se="Collaborate",sidebarInitiallyClosed:d=!1}){let E={...e,onError:F=>{G?.setMessages(de=>[...de,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:F.message}]}]),console.error("Error in CopilotInterface:",F)}},z=(0,Do.useChat)(E||{}),G=o?t||z:null,[Z,ve]=(0,ft.useState)(""),[u,U]=(0,ft.useState)(!1),he=G?.messages||a,Ae=Z,Ja=G?.status==="submitted"||u,Xa=G?.addToolResult?(F,de,ee)=>{G.addToolResult({tool:de,toolCallId:F,output:ee}),console.log("Tool result added:",{toolCallId:F,tool:de,output:ee}),G.sendMessage()}:()=>{console.log("addToolResult not available")},vt=n||[],Qa={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"},[Ya,Za]=(0,ft.useState)(()=>vt.length===0?Qa:vt.find(F=>F.id===H)||vt[0]),[ht,Dt]=(0,ft.useState)([]),[ei,ti]=(0,ft.useState)(!1),oi=F=>{if(!F||!$)return;let de=[];Array.from(F).forEach(ee=>{if(ee.size>le*1024*1024){alert(`File ${ee.name} is too large. Maximum size is ${le}MB.`);return}if(J.length>0&&!J.some(Rt=>ee.type.match(Rt))){alert(`File type ${ee.type} is not allowed.`);return}let So={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:ee,status:"pending",progress:0};if(ee.type.startsWith("image/")){let Rt=new FileReader;Rt.onload=si=>{Dt(li=>li.map(Yt=>Yt.id===So.id?{...Yt,preview:si.target?.result}:Yt))},Rt.readAsDataURL(ee)}de.push(So)}),Dt(ee=>[...ee,...de])},ai=F=>{Dt(de=>de.filter(ee=>ee.id!==F))},Ro=()=>{if(!(!Ae.trim()&&ht.length===0)){if(G){let F=ht.length>0?ii(ht.map(de=>de.file)):void 0;G.sendMessage({text:Ae,files:F},{body:{timestamp:Date.now()}}),ve("")}else console.log("Message to send:",Ae),console.log("Files to upload:",ht),ve(""),U(!0),setTimeout(()=>{U(!1)},1500);Dt([])}},ii=F=>{let de=new DataTransfer;return F.forEach(ee=>de.items.add(ee)),de.files},ri=F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),Ro())},ni=F=>{ve(F)};return(0,Oo.jsx)(ba,{sidebarItems:r||[],title:_,notifications:s||[],businessUnits:vt,currentBusinessUnit:Ya,onBusinessUnitChange:F=>{F&&(Za(F),R?.(F))},onSearch:N,showTabs:!1,onActionClick:C,actionIcon:B,actionText:Se,onNotificationRemove:I,onRemoveAll:T,logo:W,appName:X,tagline:ce,sidebarInitiallyClosed:d,children:(0,Oo.jsx)(Qt.AnimatePresence,{mode:"wait",children:(0,Oo.jsx)(Qt.motion.div,{className:"flex-1 Oo-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Oo.jsxs)("div",{className:"Oo-full flex",children:[(0,Oo.jsx)("div",{className:"w-80 flex-shrink-0 Oo-full Oo-2",children:(0,Oo.jsx)(va,{sessions:c||[],currentSession:S,teams:vt,onNewChat:m,onSessionSelect:w,onSessionEdit:y,onSessionDelete:f})}),(0,Oo.jsx)("div",{className:"flex-1 Oo-full Oo-2",children:(0,Oo.jsx)(qa,{messages:he||[],input:Ae,isTyping:Ja,currentSessionTitle:S?.title,capabilities:i||[],onInputChange:ni,addToolResult:Xa,onSendMessage:Ro,onKeyPress:ri,fileUploads:ht,isDragOver:ei,enableFileUpload:$,onFileUpload:oi,onRemoveFile:ai,onDragOver:ti})})]})},"chat-interface")})})}var bt=[{id:"1",title:"AI Assistant Chat",lastMessage:"How can I help you today?"}];function xr(){return(0,Oo.jsx)(ot,{businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"AI-Powered Copilot"})}function wr(){return(0,Oo.jsx)(ot,{aiConfig:{onError:e=>console.error("Chat error:",e)},businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Custom AI Copilot"})}function Cr(){return(0,Oo.jsx)(ot,{enableAI:!1,messages:[{id:"1",role:"assistant",parts:[{type:"text",text:"This is demo mode - no AI involved!"}]}],businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>console.log("New chat started"),onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Demo Copilot"})}function Nr(){let e=(0,Do.useChat)({onError:t=>console.error("Custom chat error:",t)});return(0,Oo.jsx)(ot,{useCustomChat:e,businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>{e.setMessages([]),console.log("New chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"Advanced AI Copilot"})}function kr(){return(0,Oo.jsx)(ot,{sidebarInitiallyClosed:!0,businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Focused AI Chat"})}function Pr(){let e=(0,Do.useChat)({onError:t=>console.error("File upload chat error:",t),onFinish:t=>console.log("Message with files completed:",t)});return(0,Oo.jsx)(ot,{useCustomChat:e,enableAI:!0,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["image/*","text/*","application/pdf"],businessUnits:Me,capabilities:et,sidebarItems:_e,notifications:Je,sessions:bt,onNewChat:()=>{e.setMessages([]),console.log("New file upload chat started - messages cleared")},onSessionSelect:t=>console.log("Session selected:",t),onSessionDelete:t=>console.log("Session deleted:",t),title:"AI Copilot with File Uploads"})}0&&(module.exports={AdvancedAICopilot,CustomAICopilot,DemoCopilot,FileUploadAICopilot,FocusedChatCopilot,SimpleAICopilot});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a as l}from"../../chunk-
|
|
2
|
+
"use strict";import{a as l}from"../../chunk-JSHD7QTU.mjs";import"../../chunk-CTTBF7F4.mjs";import"../../chunk-56X4PU43.mjs";import"../../chunk-WAVVCASZ.mjs";import"../../chunk-347B45ZS.mjs";import"../../chunk-WRZP5K5X.mjs";import"../../chunk-V5VE3EIY.mjs";import"../../chunk-6OCLRAHU.mjs";import"../../chunk-5Y6FKL5W.mjs";import"../../chunk-EW6KWAHS.mjs";import"../../chunk-7JDMW5R3.mjs";import"../../chunk-6OT5PQXV.mjs";import"../../chunk-YPZAYXNQ.mjs";import"../../chunk-7TSR2LQB.mjs";import"../../chunk-QM5FOQHG.mjs";import"../../chunk-UA2E23AS.mjs";import"../../chunk-2LINLX4S.mjs";import"../../chunk-RL6365DN.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-4WA47ZQA.mjs";import{a as t,b as i,c as n}from"../../chunk-NPVUICIF.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import{b as o}from"../../chunk-Q2DPE66H.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";import{useChat as r}from"@ai-sdk/react";import{jsx as c}from"react/jsx-runtime";var a=[{id:"1",title:"AI Assistant Chat",lastMessage:"How can I help you today?"}];function C(){return c(l,{businessUnits:n,capabilities:o,sidebarItems:t,notifications:i,sessions:a,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"AI-Powered Copilot"})}function S(){return c(l,{aiConfig:{onError:e=>console.error("Chat error:",e)},businessUnits:n,capabilities:o,sidebarItems:t,notifications:i,sessions:a,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Custom AI Copilot"})}function g(){return c(l,{enableAI:!1,messages:[{id:"1",role:"assistant",parts:[{type:"text",text:"This is demo mode - no AI involved!"}]}],businessUnits:n,capabilities:o,sidebarItems:t,notifications:i,sessions:a,onNewChat:()=>console.log("New chat started"),onSessionSelect:s=>console.log("Session selected:",s),onSessionDelete:s=>console.log("Session deleted:",s),title:"Demo Copilot"})}function h(){let e=r({onError:s=>console.error("Custom chat error:",s)});return c(l,{useCustomChat:e,businessUnits:n,capabilities:o,sidebarItems:t,notifications:i,sessions:a,onNewChat:()=>{e.setMessages([]),console.log("New chat started - messages cleared")},onSessionSelect:s=>console.log("Session selected:",s),onSessionDelete:s=>console.log("Session deleted:",s),title:"Advanced AI Copilot"})}function b(){return c(l,{sidebarInitiallyClosed:!0,businessUnits:n,capabilities:o,sidebarItems:t,notifications:i,sessions:a,onNewChat:()=>console.log("New chat started"),onSessionSelect:e=>console.log("Session selected:",e),onSessionDelete:e=>console.log("Session deleted:",e),title:"Focused AI Chat"})}function f(){let e=r({onError:s=>console.error("File upload chat error:",s),onFinish:s=>console.log("Message with files completed:",s)});return c(l,{useCustomChat:e,enableAI:!0,enableFileUpload:!0,maxFileSize:10,allowedFileTypes:["image/*","text/*","application/pdf"],businessUnits:n,capabilities:o,sidebarItems:t,notifications:i,sessions:a,onNewChat:()=>{e.setMessages([]),console.log("New file upload chat started - messages cleared")},onSessionSelect:s=>console.log("Session selected:",s),onSessionDelete:s=>console.log("Session deleted:",s),title:"AI Copilot with File Uploads"})}export{h as AdvancedAICopilot,S as CustomAICopilot,g as DemoCopilot,f as FileUploadAICopilot,b as FocusedChatCopilot,C as SimpleAICopilot};
|
|
@@ -21,4 +21,4 @@
|
|
|
21
21
|
`,children:i?"Processing...":"Deny"}),(0,Rt.jsx)("button",{onClick:w,disabled:i,className:`
|
|
22
22
|
px-4 py-2 text-white border-none rounded text-sm
|
|
23
23
|
${i?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
|
|
24
|
-
`,children:"Cancel"})]})]}):null};var Ma=({toolPart:e,index:t,addToolResult:o})=>{let[a,r]=To.default.useState(!0),[n,i]=To.default.useState(null),s=()=>{o(e.input?.toolCallId,e.input?.tool,"Approved"),r(!1),i("approve")},c=()=>{o(e.input?.toolCallId,e.input?.tool,"Denied"),r(!1),i("deny")};switch(e.state){case"input-available":return(0,Rt.jsxs)("div",{className:"mb-2",children:[(0,Rt.jsx)(Po,{isOpen:a,onApprove:s,onDeny:c,onClose:()=>r(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,Rt.jsxs)(Rt.Fragment,{children:[n==="approve"&&(0,Rt.jsx)("div",{className:"flex items-center justify-center rt-3",children:(0,Rt.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,Rt.jsx)("svg",{className:"Rt-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Rt.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),n==="deny"&&(0,Rt.jsx)("div",{className:"flex items-center justify-center rt-3",children:(0,Rt.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Rt.jsx)("svg",{className:"Rt-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Rt.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Rt.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Do=require("@radix-ui/react-use-controllable-state");var dt=V(require("@radix-ui/react-collapsible")),Wt=dt.Root,$t=dt.CollapsibleTrigger,Gt=dt.CollapsibleContent;var Ba=require("streamdown"),Nt=(0,rt.memo)(({className:e,...t})=>(0,Rt.jsx)(Ba.Streamdown,{className:l("size-full [&>*:first-child]:rt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Nt.displayName="Response";var Ea=(0,rt.createContext)(null),hr=()=>{let e=(0,rt.useContext)(Ea);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},yr=1e3,xr=1e3,Ro=(0,rt.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:r,duration:n,children:i,...s})=>{let[c,p]=(0,Do.useControllableState)({prop:o,defaultProp:a,onChange:r}),[w,f]=(0,Do.useControllableState)({prop:n,defaultProp:0}),[y,R]=(0,rt.useState)(!1),[S,T]=(0,rt.useState)(null);(0,rt.useEffect)(()=>{t?S===null&&T(Date.now()):S!==null&&(f(Math.ceil((Date.now()-S)/xr)),T(null))},[t,S,f]),(0,rt.useEffect)(()=>{if(a&&!t&&c&&!y){let N=setTimeout(()=>{p(!1),R(!0)},yr);return()=>clearTimeout(N)}},[t,c,a,p,y]);let C=N=>{p(N)};return(0,Rt.jsx)(Ea.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:p,duration:w},children:(0,Rt.jsx)(Wt,{className:l("not-prose mb-4",e),onOpenChange:C,open:c,...s,children:i})})}),wr=(e,t)=>e||t===0?(0,Rt.jsx)("p",{children:"Thinking..."}):t===void 0?(0,Rt.jsx)("p",{children:"Thought for a few seconds"}):(0,Rt.jsxs)("p",{children:["Thought for ",t," seconds"]}),Ao=(0,rt.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:r,duration:n}=hr();return(0,Rt.jsx)($t,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(Ko.BrainIcon,{className:"size-4"}),wr(a,n),(0,Rt.jsx)(Ko.ChevronDownIcon,{className:l("size-4 transition-transform",r?"rotate-180":"rotate-0")})]})})}),So=(0,rt.memo)(({className:e,children:t,...o})=>(0,Rt.jsx)(Gt,{className:l("rt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Rt.jsx)(Nt,{className:"grid gap-2",children:t})}));Ro.displayName="Reasoning";Ao.displayName="ReasoningTrigger";So.displayName="ReasoningContent";var Mo=require("react-syntax-highlighter"),_t=require("react-syntax-highlighter/dist/esm/styles/prism"),Cr=(0,rt.createContext)({code:""}),Jt=({code:e,language:t,showLineNumbers:o=!1,className:a,children:r,...n})=>(0,Rt.jsx)(Cr.Provider,{value:{code:e},children:(0,Rt.jsx)("div",{className:l("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",a),...n,children:(0,Rt.jsxs)("div",{className:"relative",children:[(0,Rt.jsx)(Mo.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:_t.oneLight,children:e}),(0,Rt.jsx)(Mo.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:_t.oneDark,children:e}),r&&(0,Rt.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:r})]})})});var Ua=({className:e,...t})=>(0,Rt.jsx)(Wt,{className:l("not-prose mb-4 w-full",e),...t}),Nr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Rt.jsxs)(re,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Rt.jsx)(Ko.CircleIcon,{className:"size-4"}),"input-available":(0,Rt.jsx)(Ko.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Rt.jsx)(Ko.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Rt.jsx)(Ko.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Fa=({className:e,type:t,state:o,...a})=>(0,Rt.jsxs)($t,{className:l("flex w-full items-center justify-between gap-4 p-3 pl-0 w-2xl",e),...a,children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)(Ko.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Rt.jsx)("span",{className:"font-medium text-sm",children:t}),Nr(o)]}),(0,Rt.jsx)(Ko.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),ja=({className:e,...t})=>(0,Rt.jsx)(Gt,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Ha=({className:e,input:t,...o})=>(0,Rt.jsxs)("div",{className:l("space-y-2 overflow-hidden p-4",e),...o,children:[(0,Rt.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Rt.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Rt.jsx)(Jt,{code:JSON.stringify(t,null,2),language:"json"})})]}),Oa=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let r=(0,Rt.jsx)("div",{children:t});return typeof t=="object"?r=(0,Rt.jsx)(Jt,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(r=(0,Rt.jsx)(Jt,{code:t,language:"json"})),(0,Rt.jsxs)("div",{className:l("space-y-2 p-4",e),...a,children:[(0,Rt.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,Rt.jsxs)("div",{className:l("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,Rt.jsx)("div",{children:o}),r]})]})};var kr=e=>e.startsWith("image/")?(0,Rt.jsx)(Ko.Image,{className:"Rt-4 w-4"}):e.startsWith("text/")?(0,Rt.jsx)(Ko.FileText,{className:"Rt-4 w-4"}):(0,Rt.jsx)(Ko.File,{className:"Rt-4 w-4"}),Va=({message:e,addToolResult:t,status:o,messages:a})=>e.parts.map((r,n)=>{if(r.type==="text")return(0,Rt.jsx)(Nt,{children:r.text},`${n}`);if(r.type==="file"){let i=r;return(0,Rt.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[kr(i.mediaType||"application/octet-stream"),(0,Rt.jsx)("div",{className:"flex-1 min-w-0",children:(0,Rt.jsx)("p",{className:"text-sm font-medium truncate",children:i.filename||i.url?.split("/").pop()||"File"})}),i.url&&(0,Rt.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(i.url,"_blank"),className:"Rt-8 w-8 p-0",children:(0,Rt.jsx)(Ko.Download,{className:"Rt-4 w-4"})})]})},n)}if(r.type.startsWith("tool-")){let i=r,s=r.type.replace("tool-","");if(s==="task")switch(i.state){case"input-available":return(0,Rt.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},n);case"output-available":return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(ht,{data:{id:i.output?.id||i.input?.id,fetchLatest:!1,taskData:i.output||i.input}})},n);case"output-error":return(0,Rt.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",i.errorText]},n);default:return null}if(r.type==="tool-requestEndpointLogin")return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(ko,{toolPart:i,index:n,addToolResult:t??(()=>{})})},n);if(r.type==="tool-authenticate")return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(ko,{toolPart:i,index:n,addToolResult:t??(()=>{})})},n);if(r.type==="tool-requestApproval")return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(Ma,{toolPart:i,index:n,addToolResult:t??(()=>{})})},n);if(s==="artefact")switch(i.state){case"input-available":return(0,Rt.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},n);case"output-available":return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(so,{artefact:i.output?.description||"",taskId:i.output?.id||i.input?.id,taskData:i.output||i.input})},n);case"output-error":return(0,Rt.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",i.errorText]},n);default:return null}return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsxs)(ge,{className:"w-full max-w-md",children:[(0,Rt.jsx)(Ue,{children:(0,Rt.jsx)(Fe,{className:"text-lg",children:s})}),(0,Rt.jsxs)(De,{children:[i.state==="input-available"&&(0,Rt.jsxs)("p",{className:"text-sm",children:["Processing ",s,"..."]}),i.state==="output-available"&&(0,Rt.jsx)("pre",{className:"text-sm",children:JSON.stringify(i.output,null,2)}),i.state==="output-error"&&(0,Rt.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",i.errorText]})]})]})},n)}if(r.type.startsWith("data-")){let i=r,s=r.type.replace("data-","");return s==="reference"?(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(ge,{className:"w-full",children:(0,Rt.jsx)(De,{className:"p-4",children:(0,Rt.jsx)("div",{className:"space-y-2",children:i.data?.references?.map((c,p)=>(0,Rt.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,Rt.jsx)(re,{variant:"outline",children:c.type||"link"}),(0,Rt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Rt.jsx)("p",{className:"text-sm font-medium truncate",children:c.title}),c.description&&(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:c.description})]}),c.url&&(0,Rt.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(c.url,"_blank"),className:"Rt-8 w-8 p-0",children:(0,Rt.jsx)(Ko.ExternalLink,{className:"Rt-4 w-4"})})]},p))})})})},n):s==="menu"?(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsxs)(ge,{className:"w-full",children:[(0,Rt.jsx)(Ue,{children:(0,Rt.jsx)(Fe,{className:"text-lg",children:i.data?.title})}),(0,Rt.jsx)(De,{children:(0,Rt.jsx)("div",{className:"space-y-2",children:i.data?.items?.map((c,p)=>(0,Rt.jsx)(D,{variant:"outline",className:"w-full justify-start",onClick:c.action,children:(0,Rt.jsxs)("div",{className:"text-left",children:[(0,Rt.jsx)("p",{className:"font-medium",children:c.label}),c.description&&(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground",children:c.description})]})},p))})})]})},n):(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsxs)(ge,{className:"w-full max-w-md",children:[(0,Rt.jsx)(Ue,{children:(0,Rt.jsx)(Fe,{className:"text-lg",children:s})}),(0,Rt.jsx)(De,{children:(0,Rt.jsx)("pre",{className:"text-sm",children:JSON.stringify(i.data,null,2)})})]})},n)}if(r.type==="reasoning")return(0,Rt.jsxs)(Ro,{className:"w-full",isStreaming:o==="streaming"&&n===e.parts.length-1&&e.id===a.at(-1)?.id,children:[(0,Rt.jsx)(Ao,{}),(0,Rt.jsx)(So,{children:r.text})]},`${n}`);if(r.type==="dynamic-tool")return(0,Rt.jsxs)(Ua,{defaultOpen:r.state!=="output-available",children:[(0,Rt.jsx)(Fa,{type:`tool-${r.toolName}`,state:r.state}),(0,Rt.jsxs)(ja,{children:[(0,Rt.jsx)(Ha,{input:r.input}),(0,Rt.jsx)(Oa,{output:r.output,errorText:r.errorText})]})]},`${e.id}-${n}`)});var $a=({className:e,from:t,...o})=>(0,Rt.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...o}),Pr=(0,$o.cva)("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),Ga=({children:e,className:t,variant:o,...a})=>(0,Rt.jsx)("div",{className:l(Pr({variant:o,className:t})),...a,children:e});function Qt({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:r,fileUploads:n,isDragOver:i,enableFileUpload:s,onInputChange:c,addToolResult:p,onSendMessage:w,onKeyPress:f,onFileUpload:y,onRemoveFile:R,onDragOver:S,className:T,status:C="ready"}){let N=(0,rt.useRef)(null),j=(0,rt.useRef)(null),A=(0,rt.useRef)(null),[M,X]=(0,rt.useState)(!1),[K,ce]=(0,rt.useState)({path:[],selectedItems:[],filters:{}});(0,rt.useEffect)(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,rt.useEffect)(()=>{M&&setTimeout(()=>{N.current?.scrollIntoView({behavior:"smooth"})},100)},[M]);let Q=()=>Mt(K),G=()=>{let u=[];return r.forEach(U=>{U.actions&&U.actions.forEach(xe=>{u.push({label:xe.label,action:()=>Y(xe.id,{path:[U],selectedItems:[],filters:{}})})}),U.children&&U.children.forEach(xe=>{xe.type==="list"&&xe.data&&u.push({label:`View ${xe.name}`,action:()=>X(!0)})})}),u.slice(0,5)},Y=(u,U)=>{console.log("Capability action:",u,U);let xe=`Executing ${u} with context: ${JSON.stringify(U.path.map(Le=>Le.name))}`;X(!1)},de=Mt({path:[],selectedItems:[],filters:{}}),I=u=>{y(u.target.files),u.target.files&&(u.target.value="")},Be=u=>{u.preventDefault(),S(!0)},d=u=>{u.preventDefault(),S(!1)},L=u=>{u.preventDefault(),S(!1),y(u.dataTransfer.files)},E=u=>{if(u===0)return"0 Bytes";let U=1024,xe=["Bytes","KB","MB","GB"],Le=Math.floor(Math.log(u)/Math.log(U));return parseFloat((u/Math.pow(U,Le)).toFixed(2))+" "+xe[Le]},q=u=>u.startsWith("image/")?(0,Rt.jsx)(Ko.Image,{className:"Rt-4 w-4"}):u.startsWith("text/")?(0,Rt.jsx)(Ko.FileText,{className:"Rt-4 w-4"}):(0,Rt.jsx)(Ko.File,{className:"Rt-4 w-4"}),te={messages:e,currentSessionTitle:a,capabilities:r,currentCapabilityContext:K,contextualActions:de,getQuickSuggestions:G().map(u=>u.label)},ye=()=>{navigator.clipboard.writeText(JSON.stringify(te,null,2)),alert("Debug info copied to clipboard")};return(0,Rt.jsxs)("div",{className:`Rt-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${T||""}`,children:[(0,Rt.jsxs)(be,{ref:j,className:"flex-1 p-4 bg-background border-0",onDragOver:Be,onDragLeave:d,onDrop:L,children:[(0,Rt.jsxs)("div",{className:l("space-y-4",i&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Rt.jsx)(pt.animate,{children:e.map(u=>(0,Rt.jsx)(pt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Rt.jsx)($a,{from:u.role,children:(0,Rt.jsx)(Ga,{variant:"flat",children:Va({message:u,addToolResult:p??(()=>{}),status:C,messages:e})})},u.id)},u.id))}),M&&(0,Rt.jsxs)(pt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Rt.jsx)(we,{className:"Rt-8 w-8",children:(0,Rt.jsx)(Ce,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Rt.jsx)(Ko.Bot,{className:"Rt-4 w-4"})})}),(0,Rt.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Rt.jsx)(wo,{capabilities:r,isOpen:M,onToggle:()=>X(!M),onActionSelect:Y,className:"w-full"})})]}),o&&(0,Rt.jsxs)(pt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Rt.jsx)(we,{className:"Rt-8 w-8",children:(0,Rt.jsx)(Ce,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Rt.jsx)(Ko.Bot,{className:"Rt-4 w-4"})})}),(0,Rt.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Rt.jsxs)("div",{className:"flex space-x-1",children:[(0,Rt.jsx)("div",{className:"w-2 Rt-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Rt.jsx)("div",{className:"w-2 Rt-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Rt.jsx)("div",{className:"w-2 Rt-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Rt.jsx)("div",{ref:N})]}),n.length>0&&(0,Rt.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Rt.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(u=>(0,Rt.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[q(u.file.type),(0,Rt.jsx)("span",{className:"text-sm font-medium",children:u.file.name}),(0,Rt.jsx)("span",{className:"text-xs text-muted-foreground",children:E(u.file.size)}),(0,Rt.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>R(u.id),className:"Rt-6 w-6 p-0",children:(0,Rt.jsx)(Ko.X,{className:"Rt-4 w-4"})})]},u.id))})}),(0,Rt.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Rt.jsxs)("div",{className:"flex gap-3",children:[(0,Rt.jsx)(yt,{value:t,onChange:u=>c(u.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),s&&(0,Rt.jsx)(D,{variant:"outline",size:"icon",onClick:()=>A.current?.click(),className:"rounded-2xl Rt-10 w-10 shadow-sm",children:(0,Rt.jsx)(Ko.Paperclip,{className:"Rt-4 w-4"})}),(0,Rt.jsx)(D,{onClick:w,disabled:!t.trim()&&n.length===0||o,size:"icon",className:"rounded-2xl Rt-10 w-10 shadow-sm",children:(0,Rt.jsx)(Ko.Send,{className:"Rt-4 w-4"})})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-3 rt-3",children:[(0,Rt.jsxs)(D,{onClick:()=>X(!M),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Rt.jsx)(Ko.Menu,{className:"Rt-3 w-3 mr-1"}),M?"Hide":"Show"," Capabilities"]}),(0,Rt.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Q().map((u,U)=>(0,Rt.jsx)(D,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>Y(u.id,K),children:u.label},`context-${u.id}`)),Q().length===0&&G().map((u,U)=>(0,Rt.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:u.action,children:u.label},`suggestion-${U}`)),(0,Rt.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:ye,children:"Debug"})]})]}),s&&(0,Rt.jsx)("input",{ref:A,type:"file",multiple:!0,onChange:I,className:"hidden"})]})]})}function Tr({aiConfig:e,useCustomChat:t,enableAI:o=!0,messages:a=[],businessUnits:r=[],capabilities:n=[],sidebarItems:i=[],notifications:s=[],sessions:c=[],onNewChat:p,onSessionSelect:w,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:R=()=>{},onNotificationRemove:S=()=>{},onRemoveAll:T=()=>{},onActionClick:C=()=>{},onSearch:N=L=>console.log("Search query:",L),initialTeam:j="design",currentSession:A=null,showCapabilities:M=!0,title:X="Digital Colleagues",enableFileUpload:K=!0,maxFileSize:ce=10,allowedFileTypes:Q=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:G="/headerlogo.png",appName:Y="Nuvia",tagline:de="AI-Powered Workspace",actionIcon:I=(0,Rt.jsx)(Ko.Users,{className:"mr-2 Rt-4 w-4"}),actionText:Be="Collaborate",sidebarInitiallyClosed:d=!1}){let L={...e,onError:F=>{q?.setMessages(pe=>[...pe,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:F.message}]}]),console.error("Error in CopilotInterface:",F)}},E=(0,qa.useChat)(L||{}),q=o?t||E:null,[te,ye]=(0,rt.useState)(""),[u,U]=(0,rt.useState)(!1),xe=q?.messages||a,Le=te,_a=q?.status==="submitted"||u,Ja=q?.addToolResult?(F,pe,oe)=>{q.addToolResult({tool:pe,toolCallId:F,output:oe}),console.log("Tool result added:",{toolCallId:F,tool:pe,output:oe}),q.sendMessage()}:()=>{console.log("addToolResult not available")},ut=r||[],Xa={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"},[Qa,Ya]=(0,rt.useState)(()=>ut.length===0?Xa:ut.find(F=>F.id===j)||ut[0]),[gt,kt]=(0,rt.useState)([]),[Za,ei]=(0,rt.useState)(!1),ti=F=>{if(!F||!K)return;let pe=[];Array.from(F).forEach(oe=>{if(oe.size>ce*1024*1024){alert(`File ${oe.name} is too large. Maximum size is ${ce}MB.`);return}if(Q.length>0&&!Q.some(Pt=>oe.type.match(Pt))){alert(`File type ${oe.type} is not allowed.`);return}let Bo={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:oe,status:"pending",progress:0};if(oe.type.startsWith("image/")){let Pt=new FileReader;Pt.onload=ni=>{kt(si=>si.map(Zt=>Zt.id===Bo.id?{...Zt,preview:ni.target?.result}:Zt))},Pt.readAsDataURL(oe)}pe.push(Bo)}),kt(oe=>[...oe,...pe])},oi=F=>{kt(pe=>pe.filter(oe=>oe.id!==F))},Io=()=>{if(!(!Le.trim()&>.length===0)){if(q){let F=gt.length>0?ai(gt.map(pe=>pe.file)):void 0;q.sendMessage({text:Le,files:F},{body:{timestamp:Date.now()}}),ye("")}else console.log("Message to send:",Le),console.log("Files to upload:",gt),ye(""),U(!0),setTimeout(()=>{U(!1)},1500);kt([])}},ai=F=>{let pe=new DataTransfer;return F.forEach(oe=>pe.items.add(oe)),pe.files},ii=F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),Io())},ri=F=>{ye(F)};return(0,Rt.jsx)(Da,{sidebarItems:i||[],title:X,notifications:s||[],businessUnits:ut,currentBusinessUnit:Qa,onBusinessUnitChange:F=>{F&&(Ya(F),R?.(F))},onSearch:N,showTabs:!1,onActionClick:C,actionIcon:I,actionText:Be,onNotificationRemove:S,onRemoveAll:T,logo:G,appName:Y,tagline:de,sidebarInitiallyClosed:d,children:(0,Rt.jsx)(Yt.AnimatePresence,{mode:"wait",children:(0,Rt.jsx)(Yt.motion.div,{className:"flex-1 Rt-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Rt.jsxs)("div",{className:"Rt-full flex",children:[(0,Rt.jsx)("div",{className:"w-80 flex-shrink-0 Rt-full p-2",children:(0,Rt.jsx)(Ra,{sessions:c||[],currentSession:A,teams:ut,onNewChat:p,onSessionSelect:w,onSessionEdit:y,onSessionDelete:f})}),(0,Rt.jsx)("div",{className:"flex-1 Rt-full p-2",children:(0,Rt.jsx)(Qt,{messages:xe||[],input:Le,isTyping:_a,currentSessionTitle:A?.title,capabilities:n||[],onInputChange:ri,addToolResult:Ja,onSendMessage:Io,onKeyPress:ii,fileUploads:gt,isDragOver:Za,enableFileUpload:K,onFileUpload:ti,onRemoveFile:oi,onDragOver:ei})})]})},"chat-interface")})})}function Dr(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Rr(e,t){return e.parts.some(o=>o.type===`tool-${t}`)}function Ar(e,t){return e.parts.find(o=>o.type===`tool-${t}`)}function Sr(e){return e.parts.some(t=>t.type==="file")}function Mr(e){return e.parts.filter(t=>t.type==="file")}function Ir(e,t){return e.parts.some(o=>o.type===`data-${t}`)}function Br(e,t){return e.parts.find(o=>o.type===`data-${t}`)}0&&(module.exports={ApprovalRequestModal,CapabilityMenu,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,CopilotInterface,OAuthModal,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,testCapabilities});
|
|
24
|
+
`,children:"Cancel"})]})]}):null};var Ma=({toolPart:e,index:t,addToolResult:o})=>{let[a,r]=To.default.useState(!0),[n,i]=To.default.useState(null),s=()=>{o(e.toolCallId,e.type,"Approved"),r(!1),i("approve")},c=()=>{o(e.toolCallId,e.type,"Denied"),r(!1),i("deny")};switch(e.state){case"input-available":return(0,Rt.jsxs)("div",{className:"mb-2",children:[(0,Rt.jsx)(Po,{isOpen:a,onApprove:s,onDeny:c,onClose:()=>r(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!a&&(0,Rt.jsxs)(Rt.Fragment,{children:[n==="approve"&&(0,Rt.jsx)("div",{className:"flex items-center justify-center rt-3",children:(0,Rt.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,Rt.jsx)("svg",{className:"Rt-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Rt.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),n==="deny"&&(0,Rt.jsx)("div",{className:"flex items-center justify-center rt-3",children:(0,Rt.jsxs)("div",{className:"inline-flex items-center px-4 py-2 rounded-full bg-red-100 text-red-800 text-sm font-medium border border-red-200",children:[(0,Rt.jsx)("svg",{className:"Rt-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Rt.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Rt.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var Do=require("@radix-ui/react-use-controllable-state");var dt=V(require("@radix-ui/react-collapsible")),Wt=dt.Root,$t=dt.CollapsibleTrigger,Gt=dt.CollapsibleContent;var Ba=require("streamdown"),Nt=(0,rt.memo)(({className:e,...t})=>(0,Rt.jsx)(Ba.Streamdown,{className:l("size-full [&>*:first-child]:rt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Nt.displayName="Response";var Ea=(0,rt.createContext)(null),hr=()=>{let e=(0,rt.useContext)(Ea);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},yr=1e3,xr=1e3,Ro=(0,rt.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:a=!0,onOpenChange:r,duration:n,children:i,...s})=>{let[c,p]=(0,Do.useControllableState)({prop:o,defaultProp:a,onChange:r}),[w,f]=(0,Do.useControllableState)({prop:n,defaultProp:0}),[y,R]=(0,rt.useState)(!1),[S,T]=(0,rt.useState)(null);(0,rt.useEffect)(()=>{t?S===null&&T(Date.now()):S!==null&&(f(Math.ceil((Date.now()-S)/xr)),T(null))},[t,S,f]),(0,rt.useEffect)(()=>{if(a&&!t&&c&&!y){let N=setTimeout(()=>{p(!1),R(!0)},yr);return()=>clearTimeout(N)}},[t,c,a,p,y]);let C=N=>{p(N)};return(0,Rt.jsx)(Ea.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:p,duration:w},children:(0,Rt.jsx)(Wt,{className:l("not-prose mb-4",e),onOpenChange:C,open:c,...s,children:i})})}),wr=(e,t)=>e||t===0?(0,Rt.jsx)("p",{children:"Thinking..."}):t===void 0?(0,Rt.jsx)("p",{children:"Thought for a few seconds"}):(0,Rt.jsxs)("p",{children:["Thought for ",t," seconds"]}),Ao=(0,rt.memo)(({className:e,children:t,...o})=>{let{isStreaming:a,isOpen:r,duration:n}=hr();return(0,Rt.jsx)($t,{className:l("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Rt.jsxs)(Rt.Fragment,{children:[(0,Rt.jsx)(Ko.BrainIcon,{className:"size-4"}),wr(a,n),(0,Rt.jsx)(Ko.ChevronDownIcon,{className:l("size-4 transition-transform",r?"rotate-180":"rotate-0")})]})})}),So=(0,rt.memo)(({className:e,children:t,...o})=>(0,Rt.jsx)(Gt,{className:l("rt-4 text-sm","data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-muted-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...o,children:(0,Rt.jsx)(Nt,{className:"grid gap-2",children:t})}));Ro.displayName="Reasoning";Ao.displayName="ReasoningTrigger";So.displayName="ReasoningContent";var Mo=require("react-syntax-highlighter"),_t=require("react-syntax-highlighter/dist/esm/styles/prism"),Cr=(0,rt.createContext)({code:""}),Jt=({code:e,language:t,showLineNumbers:o=!1,className:a,children:r,...n})=>(0,Rt.jsx)(Cr.Provider,{value:{code:e},children:(0,Rt.jsx)("div",{className:l("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",a),...n,children:(0,Rt.jsxs)("div",{className:"relative",children:[(0,Rt.jsx)(Mo.Prism,{className:"overflow-hidden dark:hidden",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:_t.oneLight,children:e}),(0,Rt.jsx)(Mo.Prism,{className:"hidden overflow-hidden dark:block",codeTagProps:{className:"font-mono text-sm"},customStyle:{margin:0,padding:"1rem",fontSize:"0.875rem",background:"hsl(var(--background))",color:"hsl(var(--foreground))"},language:t,lineNumberStyle:{color:"hsl(var(--muted-foreground))",paddingRight:"1rem",minWidth:"2.5rem"},showLineNumbers:o,style:_t.oneDark,children:e}),r&&(0,Rt.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:r})]})})});var Ua=({className:e,...t})=>(0,Rt.jsx)(Wt,{className:l("not-prose mb-4 w-full",e),...t}),Nr=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Rt.jsxs)(re,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Rt.jsx)(Ko.CircleIcon,{className:"size-4"}),"input-available":(0,Rt.jsx)(Ko.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Rt.jsx)(Ko.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Rt.jsx)(Ko.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Fa=({className:e,type:t,state:o,...a})=>(0,Rt.jsxs)($t,{className:l("flex w-full items-center justify-between gap-4 p-3 pl-0 w-2xl",e),...a,children:[(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Rt.jsx)(Ko.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Rt.jsx)("span",{className:"font-medium text-sm",children:t}),Nr(o)]}),(0,Rt.jsx)(Ko.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),ja=({className:e,...t})=>(0,Rt.jsx)(Gt,{className:l("data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-2 data-[state=open]:slide-in-from-top-2 text-popover-foreground outline-none data-[state=closed]:animate-out data-[state=open]:animate-in",e),...t}),Ha=({className:e,input:t,...o})=>(0,Rt.jsxs)("div",{className:l("space-y-2 overflow-hidden p-4",e),...o,children:[(0,Rt.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Rt.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Rt.jsx)(Jt,{code:JSON.stringify(t,null,2),language:"json"})})]}),Oa=({className:e,output:t,errorText:o,...a})=>{if(!(t||o))return null;let r=(0,Rt.jsx)("div",{children:t});return typeof t=="object"?r=(0,Rt.jsx)(Jt,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(r=(0,Rt.jsx)(Jt,{code:t,language:"json"})),(0,Rt.jsxs)("div",{className:l("space-y-2 p-4",e),...a,children:[(0,Rt.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,Rt.jsxs)("div",{className:l("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,Rt.jsx)("div",{children:o}),r]})]})};var kr=e=>e.startsWith("image/")?(0,Rt.jsx)(Ko.Image,{className:"Rt-4 w-4"}):e.startsWith("text/")?(0,Rt.jsx)(Ko.FileText,{className:"Rt-4 w-4"}):(0,Rt.jsx)(Ko.File,{className:"Rt-4 w-4"}),Va=({message:e,addToolResult:t,status:o,messages:a})=>e.parts.map((r,n)=>{if(r.type==="text")return(0,Rt.jsx)(Nt,{children:r.text},`${n}`);if(r.type==="file"){let i=r;return(0,Rt.jsx)("div",{className:"mb-2 p-2 bg-background/50 rounded-lg",children:(0,Rt.jsxs)("div",{className:"flex items-center gap-2",children:[kr(i.mediaType||"application/octet-stream"),(0,Rt.jsx)("div",{className:"flex-1 min-w-0",children:(0,Rt.jsx)("p",{className:"text-sm font-medium truncate",children:i.filename||i.url?.split("/").pop()||"File"})}),i.url&&(0,Rt.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(i.url,"_blank"),className:"Rt-8 w-8 p-0",children:(0,Rt.jsx)(Ko.Download,{className:"Rt-4 w-4"})})]})},n)}if(r.type.startsWith("tool-")){let i=r,s=r.type.replace("tool-","");if(s==="task")switch(i.state){case"input-available":return(0,Rt.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},n);case"output-available":return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(ht,{data:{id:i.output?.id||i.input?.id,fetchLatest:!1,taskData:i.output||i.input}})},n);case"output-error":return(0,Rt.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",i.errorText]},n);default:return null}if(r.type==="tool-requestEndpointLogin")return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(ko,{toolPart:i,index:n,addToolResult:t??(()=>{})})},n);if(r.type==="tool-authenticate")return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(ko,{toolPart:i,index:n,addToolResult:t??(()=>{})})},n);if(r.type==="tool-requestApproval")return console.log("Rendering PartApprovalTool with toolPart:",i),(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(Ma,{toolPart:i,index:n,addToolResult:t??(()=>{})})},n);if(s==="artefact")switch(i.state){case"input-available":return(0,Rt.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},n);case"output-available":return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(so,{artefact:i.output?.description||"",taskId:i.output?.id||i.input?.id,taskData:i.output||i.input})},n);case"output-error":return(0,Rt.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",i.errorText]},n);default:return null}return(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsxs)(ge,{className:"w-full max-w-md",children:[(0,Rt.jsx)(Ue,{children:(0,Rt.jsx)(Fe,{className:"text-lg",children:s})}),(0,Rt.jsxs)(De,{children:[i.state==="input-available"&&(0,Rt.jsxs)("p",{className:"text-sm",children:["Processing ",s,"..."]}),i.state==="output-available"&&(0,Rt.jsx)("pre",{className:"text-sm",children:JSON.stringify(i.output,null,2)}),i.state==="output-error"&&(0,Rt.jsxs)("p",{className:"text-sm text-red-500",children:["Error: ",i.errorText]})]})]})},n)}if(r.type.startsWith("data-")){let i=r,s=r.type.replace("data-","");return s==="reference"?(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsx)(ge,{className:"w-full",children:(0,Rt.jsx)(De,{className:"p-4",children:(0,Rt.jsx)("div",{className:"space-y-2",children:i.data?.references?.map((c,p)=>(0,Rt.jsxs)("div",{className:"flex items-center gap-2 p-2 rounded-md bg-muted/50",children:[(0,Rt.jsx)(re,{variant:"outline",children:c.type||"link"}),(0,Rt.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Rt.jsx)("p",{className:"text-sm font-medium truncate",children:c.title}),c.description&&(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:c.description})]}),c.url&&(0,Rt.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>window.open(c.url,"_blank"),className:"Rt-8 w-8 p-0",children:(0,Rt.jsx)(Ko.ExternalLink,{className:"Rt-4 w-4"})})]},p))})})})},n):s==="menu"?(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsxs)(ge,{className:"w-full",children:[(0,Rt.jsx)(Ue,{children:(0,Rt.jsx)(Fe,{className:"text-lg",children:i.data?.title})}),(0,Rt.jsx)(De,{children:(0,Rt.jsx)("div",{className:"space-y-2",children:i.data?.items?.map((c,p)=>(0,Rt.jsx)(D,{variant:"outline",className:"w-full justify-start",onClick:c.action,children:(0,Rt.jsxs)("div",{className:"text-left",children:[(0,Rt.jsx)("p",{className:"font-medium",children:c.label}),c.description&&(0,Rt.jsx)("p",{className:"text-xs text-muted-foreground",children:c.description})]})},p))})})]})},n):(0,Rt.jsx)("div",{className:"mb-2",children:(0,Rt.jsxs)(ge,{className:"w-full max-w-md",children:[(0,Rt.jsx)(Ue,{children:(0,Rt.jsx)(Fe,{className:"text-lg",children:s})}),(0,Rt.jsx)(De,{children:(0,Rt.jsx)("pre",{className:"text-sm",children:JSON.stringify(i.data,null,2)})})]})},n)}if(r.type==="reasoning")return(0,Rt.jsxs)(Ro,{className:"w-full",isStreaming:o==="streaming"&&n===e.parts.length-1&&e.id===a.at(-1)?.id,children:[(0,Rt.jsx)(Ao,{}),(0,Rt.jsx)(So,{children:r.text})]},`${n}`);if(r.type==="dynamic-tool")return(0,Rt.jsxs)(Ua,{defaultOpen:r.state!=="output-available",children:[(0,Rt.jsx)(Fa,{type:`tool-${r.toolName}`,state:r.state}),(0,Rt.jsxs)(ja,{children:[(0,Rt.jsx)(Ha,{input:r.input}),(0,Rt.jsx)(Oa,{output:r.output,errorText:r.errorText})]})]},`${e.id}-${n}`)});var $a=({className:e,from:t,...o})=>(0,Rt.jsx)("div",{className:l("group flex w-full items-end justify-end gap-2 py-4",t==="user"?"is-user":"is-assistant flex-row-reverse justify-end",e),...o}),Pr=(0,$o.cva)("is-user:dark flex flex-col gap-2 overflow-hidden rounded-lg text-sm",{variants:{variant:{contained:["max-w-[80%] px-4 py-3","group-[.is-user]:bg-primary group-[.is-user]:text-primary-foreground","group-[.is-assistant]:bg-secondary group-[.is-assistant]:text-foreground"],flat:["group-[.is-user]:max-w-[80%] group-[.is-user]:bg-secondary group-[.is-user]:px-4 group-[.is-user]:py-3 group-[.is-user]:text-foreground","group-[.is-assistant]:text-foreground"]}},defaultVariants:{variant:"contained"}}),Ga=({children:e,className:t,variant:o,...a})=>(0,Rt.jsx)("div",{className:l(Pr({variant:o,className:t})),...a,children:e});function Qt({messages:e,input:t,isTyping:o=!1,currentSessionTitle:a,capabilities:r,fileUploads:n,isDragOver:i,enableFileUpload:s,onInputChange:c,addToolResult:p,onSendMessage:w,onKeyPress:f,onFileUpload:y,onRemoveFile:R,onDragOver:S,className:T,status:C="ready"}){let N=(0,rt.useRef)(null),j=(0,rt.useRef)(null),A=(0,rt.useRef)(null),[M,X]=(0,rt.useState)(!1),[K,ce]=(0,rt.useState)({path:[],selectedItems:[],filters:{}});(0,rt.useEffect)(()=>{N.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,rt.useEffect)(()=>{M&&setTimeout(()=>{N.current?.scrollIntoView({behavior:"smooth"})},100)},[M]);let Q=()=>Mt(K),G=()=>{let u=[];return r.forEach(U=>{U.actions&&U.actions.forEach(xe=>{u.push({label:xe.label,action:()=>Y(xe.id,{path:[U],selectedItems:[],filters:{}})})}),U.children&&U.children.forEach(xe=>{xe.type==="list"&&xe.data&&u.push({label:`View ${xe.name}`,action:()=>X(!0)})})}),u.slice(0,5)},Y=(u,U)=>{console.log("Capability action:",u,U);let xe=`Executing ${u} with context: ${JSON.stringify(U.path.map(Le=>Le.name))}`;X(!1)},de=Mt({path:[],selectedItems:[],filters:{}}),I=u=>{y(u.target.files),u.target.files&&(u.target.value="")},Be=u=>{u.preventDefault(),S(!0)},d=u=>{u.preventDefault(),S(!1)},L=u=>{u.preventDefault(),S(!1),y(u.dataTransfer.files)},E=u=>{if(u===0)return"0 Bytes";let U=1024,xe=["Bytes","KB","MB","GB"],Le=Math.floor(Math.log(u)/Math.log(U));return parseFloat((u/Math.pow(U,Le)).toFixed(2))+" "+xe[Le]},q=u=>u.startsWith("image/")?(0,Rt.jsx)(Ko.Image,{className:"Rt-4 w-4"}):u.startsWith("text/")?(0,Rt.jsx)(Ko.FileText,{className:"Rt-4 w-4"}):(0,Rt.jsx)(Ko.File,{className:"Rt-4 w-4"}),te={messages:e,currentSessionTitle:a,capabilities:r,currentCapabilityContext:K,contextualActions:de,getQuickSuggestions:G().map(u=>u.label)},ye=()=>{navigator.clipboard.writeText(JSON.stringify(te,null,2)),alert("Debug info copied to clipboard")};return(0,Rt.jsxs)("div",{className:`Rt-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${T||""}`,children:[(0,Rt.jsxs)(be,{ref:j,className:"flex-1 p-4 bg-background border-0",onDragOver:Be,onDragLeave:d,onDrop:L,children:[(0,Rt.jsxs)("div",{className:l("space-y-4",i&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Rt.jsx)(pt.animate,{children:e.map(u=>(0,Rt.jsx)(pt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Rt.jsx)($a,{from:u.role,children:(0,Rt.jsx)(Ga,{variant:"flat",children:Va({message:u,addToolResult:p??(()=>{}),status:C,messages:e})})},u.id)},u.id))}),M&&(0,Rt.jsxs)(pt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Rt.jsx)(we,{className:"Rt-8 w-8",children:(0,Rt.jsx)(Ce,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Rt.jsx)(Ko.Bot,{className:"Rt-4 w-4"})})}),(0,Rt.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Rt.jsx)(wo,{capabilities:r,isOpen:M,onToggle:()=>X(!M),onActionSelect:Y,className:"w-full"})})]}),o&&(0,Rt.jsxs)(pt.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Rt.jsx)(we,{className:"Rt-8 w-8",children:(0,Rt.jsx)(Ce,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Rt.jsx)(Ko.Bot,{className:"Rt-4 w-4"})})}),(0,Rt.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Rt.jsxs)("div",{className:"flex space-x-1",children:[(0,Rt.jsx)("div",{className:"w-2 Rt-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Rt.jsx)("div",{className:"w-2 Rt-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Rt.jsx)("div",{className:"w-2 Rt-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Rt.jsx)("div",{ref:N})]}),n.length>0&&(0,Rt.jsx)("div",{className:"p-4 border-t bg-muted/10",children:(0,Rt.jsx)("div",{className:"flex flex-wrap gap-2",children:n.map(u=>(0,Rt.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg p-2 border",children:[q(u.file.type),(0,Rt.jsx)("span",{className:"text-sm font-medium",children:u.file.name}),(0,Rt.jsx)("span",{className:"text-xs text-muted-foreground",children:E(u.file.size)}),(0,Rt.jsx)(D,{variant:"ghost",size:"sm",onClick:()=>R(u.id),className:"Rt-6 w-6 p-0",children:(0,Rt.jsx)(Ko.X,{className:"Rt-4 w-4"})})]},u.id))})}),(0,Rt.jsxs)("div",{className:"border rounded-2xl p-4 bg-muted/20",children:[(0,Rt.jsxs)("div",{className:"flex gap-3",children:[(0,Rt.jsx)(yt,{value:t,onChange:u=>c(u.target.value),onKeyPress:f,placeholder:"How can I help you today?",className:"flex-1 rounded-2xl bg-background shadow-sm",disabled:o}),s&&(0,Rt.jsx)(D,{variant:"outline",size:"icon",onClick:()=>A.current?.click(),className:"rounded-2xl Rt-10 w-10 shadow-sm",children:(0,Rt.jsx)(Ko.Paperclip,{className:"Rt-4 w-4"})}),(0,Rt.jsx)(D,{onClick:w,disabled:!t.trim()&&n.length===0||o,size:"icon",className:"rounded-2xl Rt-10 w-10 shadow-sm",children:(0,Rt.jsx)(Ko.Send,{className:"Rt-4 w-4"})})]}),(0,Rt.jsxs)("div",{className:"flex items-center gap-3 rt-3",children:[(0,Rt.jsxs)(D,{onClick:()=>X(!M),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Rt.jsx)(Ko.Menu,{className:"Rt-3 w-3 mr-1"}),M?"Hide":"Show"," Capabilities"]}),(0,Rt.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Q().map((u,U)=>(0,Rt.jsx)(D,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>Y(u.id,K),children:u.label},`context-${u.id}`)),Q().length===0&&G().map((u,U)=>(0,Rt.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:u.action,children:u.label},`suggestion-${U}`)),(0,Rt.jsx)(D,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:ye,children:"Debug"})]})]}),s&&(0,Rt.jsx)("input",{ref:A,type:"file",multiple:!0,onChange:I,className:"hidden"})]})]})}function Tr({aiConfig:e,useCustomChat:t,enableAI:o=!0,messages:a=[],businessUnits:r=[],capabilities:n=[],sidebarItems:i=[],notifications:s=[],sessions:c=[],onNewChat:p,onSessionSelect:w,onSessionDelete:f,onSessionEdit:y=()=>{},onBusinessUnitChange:R=()=>{},onNotificationRemove:S=()=>{},onRemoveAll:T=()=>{},onActionClick:C=()=>{},onSearch:N=L=>console.log("Search query:",L),initialTeam:j="design",currentSession:A=null,showCapabilities:M=!0,title:X="Digital Colleagues",enableFileUpload:K=!0,maxFileSize:ce=10,allowedFileTypes:Q=["image/*","text/*","application/pdf","application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],logo:G="/headerlogo.png",appName:Y="Nuvia",tagline:de="AI-Powered Workspace",actionIcon:I=(0,Rt.jsx)(Ko.Users,{className:"mr-2 Rt-4 w-4"}),actionText:Be="Collaborate",sidebarInitiallyClosed:d=!1}){let L={...e,onError:F=>{q?.setMessages(pe=>[...pe,{role:"assistant",id:`error-${Date.now()}`,createdAt:new Date,parts:[{type:"text",text:F.message}]}]),console.error("Error in CopilotInterface:",F)}},E=(0,qa.useChat)(L||{}),q=o?t||E:null,[te,ye]=(0,rt.useState)(""),[u,U]=(0,rt.useState)(!1),xe=q?.messages||a,Le=te,_a=q?.status==="submitted"||u,Ja=q?.addToolResult?(F,pe,oe)=>{q.addToolResult({tool:pe,toolCallId:F,output:oe}),console.log("Tool result added:",{toolCallId:F,tool:pe,output:oe}),q.sendMessage()}:()=>{console.log("addToolResult not available")},ut=r||[],Xa={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"},[Qa,Ya]=(0,rt.useState)(()=>ut.length===0?Xa:ut.find(F=>F.id===j)||ut[0]),[gt,kt]=(0,rt.useState)([]),[Za,ei]=(0,rt.useState)(!1),ti=F=>{if(!F||!K)return;let pe=[];Array.from(F).forEach(oe=>{if(oe.size>ce*1024*1024){alert(`File ${oe.name} is too large. Maximum size is ${ce}MB.`);return}if(Q.length>0&&!Q.some(Pt=>oe.type.match(Pt))){alert(`File type ${oe.type} is not allowed.`);return}let Bo={id:Date.now().toString()+Math.random().toString(36).substr(2,9),file:oe,status:"pending",progress:0};if(oe.type.startsWith("image/")){let Pt=new FileReader;Pt.onload=ni=>{kt(si=>si.map(Zt=>Zt.id===Bo.id?{...Zt,preview:ni.target?.result}:Zt))},Pt.readAsDataURL(oe)}pe.push(Bo)}),kt(oe=>[...oe,...pe])},oi=F=>{kt(pe=>pe.filter(oe=>oe.id!==F))},Io=()=>{if(!(!Le.trim()&>.length===0)){if(q){let F=gt.length>0?ai(gt.map(pe=>pe.file)):void 0;q.sendMessage({text:Le,files:F},{body:{timestamp:Date.now()}}),ye("")}else console.log("Message to send:",Le),console.log("Files to upload:",gt),ye(""),U(!0),setTimeout(()=>{U(!1)},1500);kt([])}},ai=F=>{let pe=new DataTransfer;return F.forEach(oe=>pe.items.add(oe)),pe.files},ii=F=>{F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),Io())},ri=F=>{ye(F)};return(0,Rt.jsx)(Da,{sidebarItems:i||[],title:X,notifications:s||[],businessUnits:ut,currentBusinessUnit:Qa,onBusinessUnitChange:F=>{F&&(Ya(F),R?.(F))},onSearch:N,showTabs:!1,onActionClick:C,actionIcon:I,actionText:Be,onNotificationRemove:S,onRemoveAll:T,logo:G,appName:Y,tagline:de,sidebarInitiallyClosed:d,children:(0,Rt.jsx)(Yt.AnimatePresence,{mode:"wait",children:(0,Rt.jsx)(Yt.motion.div,{className:"flex-1 Rt-full",initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},children:(0,Rt.jsxs)("div",{className:"Rt-full flex",children:[(0,Rt.jsx)("div",{className:"w-80 flex-shrink-0 Rt-full p-2",children:(0,Rt.jsx)(Ra,{sessions:c||[],currentSession:A,teams:ut,onNewChat:p,onSessionSelect:w,onSessionEdit:y,onSessionDelete:f})}),(0,Rt.jsx)("div",{className:"flex-1 Rt-full p-2",children:(0,Rt.jsx)(Qt,{messages:xe||[],input:Le,isTyping:_a,currentSessionTitle:A?.title,capabilities:n||[],onInputChange:ri,addToolResult:Ja,onSendMessage:Io,onKeyPress:ii,fileUploads:gt,isDragOver:Za,enableFileUpload:K,onFileUpload:ti,onRemoveFile:oi,onDragOver:ei})})]})},"chat-interface")})})}function Dr(e){return e.parts.filter(t=>t.type==="text").map(t=>t.text).join("")}function Rr(e,t){return e.parts.some(o=>o.type===`tool-${t}`)}function Ar(e,t){return e.parts.find(o=>o.type===`tool-${t}`)}function Sr(e){return e.parts.some(t=>t.type==="file")}function Mr(e){return e.parts.filter(t=>t.type==="file")}function Ir(e,t){return e.parts.some(o=>o.type===`data-${t}`)}function Br(e,t){return e.parts.find(o=>o.type===`data-${t}`)}0&&(module.exports={ApprovalRequestModal,CapabilityMenu,ChatCardArtefact,ChatCardTask,ChatInterface,ChatInterfaceMessages,ChatMessage,CopilotInterface,OAuthModal,defaultColorScheme,findCapabilityByPath,getAllCapabilities,getCapabilityByTeam,getContextualActions,getDataPart,getFileParts,getTextContent,getToolPart,hasDataPart,hasFilePart,hasToolPart,testCapabilities});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as p,b as q,c as r,d as s,e as t,f as u,g as v}from"../../chunk-LUPNE23E.mjs";import{a as c}from"../../chunk-N7M6FTIO.mjs";import{a as b}from"../../chunk-BAB3ATRB.mjs";import{a as o}from"../../chunk-
|
|
1
|
+
import{a as p,b as q,c as r,d as s,e as t,f as u,g as v}from"../../chunk-LUPNE23E.mjs";import{a as c}from"../../chunk-N7M6FTIO.mjs";import{a as b}from"../../chunk-BAB3ATRB.mjs";import{a as o}from"../../chunk-JSHD7QTU.mjs";import"../../chunk-CTTBF7F4.mjs";import"../../chunk-56X4PU43.mjs";import{a as n}from"../../chunk-WAVVCASZ.mjs";import"../../chunk-347B45ZS.mjs";import"../../chunk-WRZP5K5X.mjs";import"../../chunk-V5VE3EIY.mjs";import"../../chunk-6OCLRAHU.mjs";import"../../chunk-5Y6FKL5W.mjs";import"../../chunk-EW6KWAHS.mjs";import"../../chunk-7JDMW5R3.mjs";import{a as m}from"../../chunk-6OT5PQXV.mjs";import{a as j}from"../../chunk-YPZAYXNQ.mjs";import"../../chunk-7TSR2LQB.mjs";import{a as l}from"../../chunk-QM5FOQHG.mjs";import"../../chunk-UA2E23AS.mjs";import{a as k}from"../../chunk-2LINLX4S.mjs";import{a}from"../../chunk-RL6365DN.mjs";import"../../chunk-LTTO57ZK.mjs";import"../../chunk-4WA47ZQA.mjs";import"../../chunk-NPVUICIF.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import{a as d,b as e,c as f,d as g,e as h,f as i}from"../../chunk-Q2DPE66H.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-YEKQJ4YC.mjs";export{m as ApprovalRequestModal,k as CapabilityMenu,j as ChatCardArtefact,a as ChatCardTask,n as ChatInterface,c as ChatInterfaceMessages,b as ChatMessage,o as CopilotInterface,l as OAuthModal,d as defaultColorScheme,f as findCapabilityByPath,i as getAllCapabilities,h as getCapabilityByTeam,g as getContextualActions,v as getDataPart,t as getFileParts,p as getTextContent,r as getToolPart,u as hasDataPart,s as hasFilePart,q as hasToolPart,e as testCapabilities};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-JCWFPKF3.mjs";import"../../chunk-AQQCH7Z2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-22LHS2J6.mjs";import"../../chunk-IC2ABKAM.mjs";import"../../chunk-FHMQVAKQ.mjs";import"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-JCWFPKF3.mjs";import"../../chunk-AQQCH7Z2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-22LHS2J6.mjs";import"../../chunk-IC2ABKAM.mjs";import"../../chunk-FHMQVAKQ.mjs";import"../../chunk-55EX54R7.mjs";import"../../chunk-6C4WESLL.mjs";import"../../chunk-LAQ3QAUW.mjs";import"../../chunk-PDY7JYY3.mjs";import"../../chunk-L3BLBPSR.mjs";import"../../chunk-Q5XT55O3.mjs";import"../../chunk-WISC5QJV.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-WU3JMLSC.mjs";import"../../chunk-BZAYEKYC.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"../../chunk-CQAMS7RZ.mjs";import{a as w}from"../../chunk-DKRRVTCV.mjs";import{a as h}from"../../chunk-UENQZNU3.mjs";import{a as P}from"../../chunk-SNTLCFXF.mjs";import{a as C}from"../../chunk-ZNSW443Y.mjs";import{a as u}from"../../chunk-RZELSUQT.mjs";import{a as d}from"../../chunk-ONNK2NEI.mjs";import{a as n}from"../../chunk-CTAIR3TE.mjs";import{a as m}from"../../chunk-EOXVYLPB.mjs";import{a as l}from"../../chunk-AOQPH32M.mjs";import{a as f}from"../../chunk-47OE4ZPY.mjs";import{a as p}from"../../chunk-4USR4WTH.mjs";import{a as x}from"../../chunk-6XUIHSKG.mjs";import{a as g}from"../../chunk-GS3P2V76.mjs";import{a as i}from"../../chunk-CO6AQNZ5.mjs";import{a as t}from"../../chunk-TR6RBROH.mjs";import{a}from"../../chunk-JCWFPKF3.mjs";import{a as r}from"../../chunk-AQQCH7Z2.mjs";import"../../chunk-R4SE63GR.mjs";import{a as S}from"../../chunk-5PJLI46T.mjs";import"../../chunk-QOZ2O3FG.mjs";import{a as c}from"../../chunk-2R3MJSQ7.mjs";import{a as b}from"../../chunk-HSQAHQNP.mjs";import"../../chunk-KPTGYVDM.mjs";import"../../chunk-CDVRH3MC.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-VDFRWGXR.mjs";import"../../chunk-LLP4EFT4.mjs";import"../../chunk-UM57PWI7.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-KZCIHFTM.mjs";import{a as D}from"../../chunk-NAGBKKTZ.mjs";import"../../chunk-JXQRVEQB.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-DXRAJQMA.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-VGWDYD6Z.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-YRMNCHFO.mjs";import{a as o}from"../../chunk-EOR2BAI2.mjs";import{a as e}from"../../chunk-CTTBF7F4.mjs";import"../../chunk-Y7H3EUBR.mjs";import"../../chunk-4WA47ZQA.mjs";import"../../chunk-NPVUICIF.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-22LHS2J6.mjs";import"../../chunk-IC2ABKAM.mjs";import"../../chunk-FHMQVAKQ.mjs";import"../../chunk-
|
|
1
|
+
import{a as s}from"../../chunk-CQAMS7RZ.mjs";import{a as w}from"../../chunk-DKRRVTCV.mjs";import{a as h}from"../../chunk-UENQZNU3.mjs";import{a as P}from"../../chunk-SNTLCFXF.mjs";import{a as C}from"../../chunk-ZNSW443Y.mjs";import{a as u}from"../../chunk-RZELSUQT.mjs";import{a as d}from"../../chunk-ONNK2NEI.mjs";import{a as n}from"../../chunk-CTAIR3TE.mjs";import{a as m}from"../../chunk-EOXVYLPB.mjs";import{a as l}from"../../chunk-AOQPH32M.mjs";import{a as f}from"../../chunk-47OE4ZPY.mjs";import{a as p}from"../../chunk-4USR4WTH.mjs";import{a as x}from"../../chunk-6XUIHSKG.mjs";import{a as g}from"../../chunk-GS3P2V76.mjs";import{a as i}from"../../chunk-CO6AQNZ5.mjs";import{a as t}from"../../chunk-TR6RBROH.mjs";import{a}from"../../chunk-JCWFPKF3.mjs";import{a as r}from"../../chunk-AQQCH7Z2.mjs";import"../../chunk-R4SE63GR.mjs";import{a as S}from"../../chunk-5PJLI46T.mjs";import"../../chunk-QOZ2O3FG.mjs";import{a as c}from"../../chunk-2R3MJSQ7.mjs";import{a as b}from"../../chunk-HSQAHQNP.mjs";import"../../chunk-KPTGYVDM.mjs";import"../../chunk-CDVRH3MC.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-VDFRWGXR.mjs";import"../../chunk-LLP4EFT4.mjs";import"../../chunk-UM57PWI7.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-KZCIHFTM.mjs";import{a as D}from"../../chunk-NAGBKKTZ.mjs";import"../../chunk-JXQRVEQB.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-DXRAJQMA.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-VGWDYD6Z.mjs";import"../../chunk-Z22NSJMF.mjs";import"../../chunk-EZC3YWSQ.mjs";import"../../chunk-YRMNCHFO.mjs";import{a as o}from"../../chunk-EOR2BAI2.mjs";import{a as e}from"../../chunk-CTTBF7F4.mjs";import"../../chunk-Y7H3EUBR.mjs";import"../../chunk-4WA47ZQA.mjs";import"../../chunk-NPVUICIF.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-22LHS2J6.mjs";import"../../chunk-IC2ABKAM.mjs";import"../../chunk-FHMQVAKQ.mjs";import"../../chunk-55EX54R7.mjs";import"../../chunk-6C4WESLL.mjs";import"../../chunk-LAQ3QAUW.mjs";import"../../chunk-PDY7JYY3.mjs";import"../../chunk-L3BLBPSR.mjs";import"../../chunk-Q5XT55O3.mjs";import"../../chunk-WISC5QJV.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-WU3JMLSC.mjs";import"../../chunk-BZAYEKYC.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{r as AppSidebarLeft,l as ColleagueCard,f as ColleagueForm,x as ColleagueTypeSelection,w as ColleaguesView,t as DashboardHeader,s as DashboardPage,e as DigitalColleageusLayout,g as DigitalColleagueClone,i as DigitalColleagueOptions,d as DocumentEdit,u as DocumentPreview,D as FileView,C as KnowledgeBrowser,p as KnowledgeSearch,h as KnowledgeView,a as MainPage,o as ManagementSidebar,c as PlanningView,S as ProjectView,b as ProjectsIndexView,m as SearchableSelect,n as TeamForm,P as TeamsIndexView};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-RS4VD3ML.mjs";import"../../chunk-5NIEZE7A.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-22LHS2J6.mjs";import"../../chunk-IC2ABKAM.mjs";import"../../chunk-FHMQVAKQ.mjs";import"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-RS4VD3ML.mjs";import"../../chunk-5NIEZE7A.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-22LHS2J6.mjs";import"../../chunk-IC2ABKAM.mjs";import"../../chunk-FHMQVAKQ.mjs";import"../../chunk-55EX54R7.mjs";import"../../chunk-6C4WESLL.mjs";import"../../chunk-LAQ3QAUW.mjs";import"../../chunk-PDY7JYY3.mjs";import"../../chunk-L3BLBPSR.mjs";import"../../chunk-Q5XT55O3.mjs";import"../../chunk-WISC5QJV.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-WU3JMLSC.mjs";import"../../chunk-BZAYEKYC.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../../chunk-PAEL4O5F.mjs";import"../../../chunk-275W7H4O.mjs";import"../../../chunk-3ZQFJ5WD.mjs";import"../../../chunk-U2OXF7PJ.mjs";import"../../../chunk-3F6AUCZF.mjs";import"../../../chunk-M2REXGQW.mjs";import"../../../chunk-4DR4ILAP.mjs";import"../../../chunk-I4GYQZGM.mjs";import"../../../chunk-ATBKMJU6.mjs";import"../../../chunk-H3RVI2OI.mjs";import"../../../chunk-5HT2KC5I.mjs";import"../../../chunk-FSCDCSVK.mjs";import"../../../chunk-HHPTGV4F.mjs";import"../../../chunk-3DZFESHK.mjs";import"../../../chunk-QAJBJFRP.mjs";import"../../../chunk-PTJVI53B.mjs";import"../../../chunk-T3F3RQIC.mjs";import"../../../chunk-UP67R64J.mjs";import"../../../chunk-6QERRKM4.mjs";import"../../../chunk-VSU7LYXZ.mjs";import"../../../chunk-IPRG56MW.mjs";import"../../../chunk-HFEN3KJC.mjs";import"../../../chunk-L2UJOICL.mjs";import"../../../chunk-NDZ26EG6.mjs";import"../../../chunk-CRAFZGCI.mjs";import"../../../chunk-R4SE63GR.mjs";import"../../../chunk-KPTGYVDM.mjs";import"../../../chunk-JXQRVEQB.mjs";import"../../../chunk-DXRAJQMA.mjs";import"../../../chunk-5RTGHMF3.mjs";import"../../../chunk-Z22NSJMF.mjs";import"../../../chunk-Y7H3EUBR.mjs";import"../../../chunk-4WA47ZQA.mjs";import"../../../chunk-NPVUICIF.mjs";import"../../../chunk-VDN4LQSS.mjs";import"../../../chunk-FGEFYI5E.mjs";import"../../../chunk-MU5WPW4N.mjs";import"../../../chunk-AZKOVKSK.mjs";import"../../../chunk-U5PBLRRV.mjs";import"../../../chunk-Q5Q3DJWU.mjs";import"../../../chunk-4QRKVSTE.mjs";import"../../../chunk-E4TE4NV6.mjs";import"../../../chunk-JFFTEK6Z.mjs";import"../../../chunk-JHNVX4UB.mjs";import"../../../chunk-7BXIU4ZM.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-INCYANPB.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-76M7JE4D.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-OYZDAMCS.mjs";import"../../../chunk-5NRGSTPV.mjs";import"../../../chunk-ZFUP5NVF.mjs";import"../../../chunk-4UIARERB.mjs";import"../../../chunk-D4IMQTVU.mjs";import"../../../chunk-7GSXNSLD.mjs";import"../../../chunk-YNCJATT7.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-EGEO3FNE.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-FRWX5YES.mjs";import"../../../chunk-CV7PH2KH.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../../chunk-275W7H4O.mjs";import"../../../chunk-M2REXGQW.mjs";import"../../../chunk-ATBKMJU6.mjs";import"../../../chunk-H3RVI2OI.mjs";import"../../../chunk-5HT2KC5I.mjs";import"../../../chunk-FSCDCSVK.mjs";import"../../../chunk-NDZ26EG6.mjs";import"../../../chunk-Z22NSJMF.mjs";import"../../../chunk-Y7H3EUBR.mjs";import"../../../chunk-FGEFYI5E.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-EGEO3FNE.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-275W7H4O.mjs";import{a as b}from"../../../chunk-3ZQFJ5WD.mjs";import"../../../chunk-U2OXF7PJ.mjs";import{a as g}from"../../../chunk-2UNIT7NC.mjs";import"../../../chunk-3F6AUCZF.mjs";import"../../../chunk-M2REXGQW.mjs";import"../../../chunk-4DR4ILAP.mjs";import"../../../chunk-CJ6APTVT.mjs";import"../../../chunk-ATBKMJU6.mjs";import"../../../chunk-H3RVI2OI.mjs";import"../../../chunk-5HT2KC5I.mjs";import"../../../chunk-FSCDCSVK.mjs";import"../../../chunk-HHPTGV4F.mjs";import"../../../chunk-3DZFESHK.mjs";import"../../../chunk-QAJBJFRP.mjs";import"../../../chunk-PTJVI53B.mjs";import"../../../chunk-T3F3RQIC.mjs";import"../../../chunk-UP67R64J.mjs";import"../../../chunk-6QERRKM4.mjs";import"../../../chunk-VSU7LYXZ.mjs";import"../../../chunk-IPRG56MW.mjs";import"../../../chunk-HFEN3KJC.mjs";import"../../../chunk-L2UJOICL.mjs";import"../../../chunk-NDZ26EG6.mjs";import{a as e}from"../../../chunk-5PJLI46T.mjs";import"../../../chunk-QOZ2O3FG.mjs";import{a as d}from"../../../chunk-2R3MJSQ7.mjs";import{a as f}from"../../../chunk-HSQAHQNP.mjs";import"../../../chunk-KPTGYVDM.mjs";import"../../../chunk-CDVRH3MC.mjs";import"../../../chunk-NGX2VCHS.mjs";import"../../../chunk-VDFRWGXR.mjs";import"../../../chunk-LLP4EFT4.mjs";import"../../../chunk-UM57PWI7.mjs";import"../../../chunk-ZHBYZ4HE.mjs";import"../../../chunk-AB43AQKL.mjs";import"../../../chunk-KG7HG2VO.mjs";import"../../../chunk-QC2UWZWL.mjs";import"../../../chunk-KZCIHFTM.mjs";import{a as c}from"../../../chunk-NAGBKKTZ.mjs";import"../../../chunk-JXQRVEQB.mjs";import"../../../chunk-DCOFQFVJ.mjs";import"../../../chunk-L3V5YDPH.mjs";import"../../../chunk-5RTGHMF3.mjs";import"../../../chunk-VGWDYD6Z.mjs";import"../../../chunk-Z22NSJMF.mjs";import"../../../chunk-EZC3YWSQ.mjs";import"../../../chunk-YRMNCHFO.mjs";import"../../../chunk-EOR2BAI2.mjs";import"../../../chunk-Y7H3EUBR.mjs";import"../../../chunk-6SWKEZN6.mjs";import"../../../chunk-DFIXTV2M.mjs";import"../../../chunk-FGEFYI5E.mjs";import"../../../chunk-UVHMI3PU.mjs";import"../../../chunk-U5PBLRRV.mjs";import"../../../chunk-Q5Q3DJWU.mjs";import"../../../chunk-4QRKVSTE.mjs";import"../../../chunk-E4TE4NV6.mjs";import"../../../chunk-JFFTEK6Z.mjs";import"../../../chunk-JHNVX4UB.mjs";import"../../../chunk-7BXIU4ZM.mjs";import"../../../chunk-YFAZQYK4.mjs";import"../../../chunk-INCYANPB.mjs";import"../../../chunk-B4H6T2GP.mjs";import"../../../chunk-TVZOULLL.mjs";import"../../../chunk-RLVKIMGU.mjs";import"../../../chunk-OCPX4QPC.mjs";import"../../../chunk-FT3AE7L2.mjs";import"../../../chunk-76M7JE4D.mjs";import"../../../chunk-3UMMMQEH.mjs";import"../../../chunk-OYZDAMCS.mjs";import"../../../chunk-5NRGSTPV.mjs";import"../../../chunk-ZFUP5NVF.mjs";import"../../../chunk-4UIARERB.mjs";import"../../../chunk-D4IMQTVU.mjs";import"../../../chunk-7GSXNSLD.mjs";import"../../../chunk-YNCJATT7.mjs";import"../../../chunk-L5JPAKPM.mjs";import"../../../chunk-KY7WQYN4.mjs";import"../../../chunk-ZUA4KNIR.mjs";import"../../../chunk-SOLZ4VQH.mjs";import"../../../chunk-CSBGSBEU.mjs";import"../../../chunk-YO3GQYRJ.mjs";import"../../../chunk-EGEO3FNE.mjs";import"../../../chunk-MDJREBVI.mjs";import"../../../chunk-ZWHGOTSF.mjs";import"../../../chunk-Q3G5UAAD.mjs";import"../../../chunk-XGRRLABA.mjs";import"../../../chunk-FLHDNCNY.mjs";import"../../../chunk-FRWX5YES.mjs";import"../../../chunk-CV7PH2KH.mjs";import"../../../chunk-YEKQJ4YC.mjs";export{a as ColleaguesView,c as FileView,b as KnowledgeView,d as PlanningView,e as ProjectView,f as ProjectsIndexView,g as TeamsIndexView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as s}from"../../chunk-
|
|
1
|
+
import{a as s}from"../../chunk-PAEL4O5F.mjs";import{a as n}from"../../chunk-275W7H4O.mjs";import{a as r}from"../../chunk-3ZQFJ5WD.mjs";import"../../chunk-U2OXF7PJ.mjs";import{a as x}from"../../chunk-2UNIT7NC.mjs";import"../../chunk-3F6AUCZF.mjs";import{a as l}from"../../chunk-M2REXGQW.mjs";import{a as q}from"../../chunk-4DR4ILAP.mjs";import{a as m}from"../../chunk-CJ6APTVT.mjs";import"../../chunk-I4GYQZGM.mjs";import{a as g}from"../../chunk-ATBKMJU6.mjs";import{a as i}from"../../chunk-H3RVI2OI.mjs";import{a as h}from"../../chunk-5HT2KC5I.mjs";import{a as j}from"../../chunk-FSCDCSVK.mjs";import{a as p}from"../../chunk-HHPTGV4F.mjs";import{a as o}from"../../chunk-3DZFESHK.mjs";import"../../chunk-QAJBJFRP.mjs";import"../../chunk-PTJVI53B.mjs";import"../../chunk-T3F3RQIC.mjs";import"../../chunk-UP67R64J.mjs";import"../../chunk-6QERRKM4.mjs";import"../../chunk-VSU7LYXZ.mjs";import"../../chunk-IPRG56MW.mjs";import"../../chunk-HFEN3KJC.mjs";import"../../chunk-L2UJOICL.mjs";import{a as k}from"../../chunk-NDZ26EG6.mjs";import{a as c}from"../../chunk-CRAFZGCI.mjs";import{a as b}from"../../chunk-JDMIQLAZ.mjs";import{a as d}from"../../chunk-RS4VD3ML.mjs";import{a}from"../../chunk-5NIEZE7A.mjs";import{a as e}from"../../chunk-J4QINTHR.mjs";import"../../chunk-R4SE63GR.mjs";import{a as v}from"../../chunk-5PJLI46T.mjs";import"../../chunk-QOZ2O3FG.mjs";import{a as u}from"../../chunk-2R3MJSQ7.mjs";import{a as w}from"../../chunk-HSQAHQNP.mjs";import"../../chunk-KPTGYVDM.mjs";import"../../chunk-CDVRH3MC.mjs";import"../../chunk-NGX2VCHS.mjs";import"../../chunk-VDFRWGXR.mjs";import"../../chunk-LLP4EFT4.mjs";import"../../chunk-UM57PWI7.mjs";import"../../chunk-ZHBYZ4HE.mjs";import"../../chunk-AB43AQKL.mjs";import"../../chunk-KG7HG2VO.mjs";import"../../chunk-QC2UWZWL.mjs";import"../../chunk-KZCIHFTM.mjs";import{a as t}from"../../chunk-NAGBKKTZ.mjs";import"../../chunk-JXQRVEQB.mjs";import"../../chunk-DCOFQFVJ.mjs";import"../../chunk-DXRAJQMA.mjs";import"../../chunk-L3V5YDPH.mjs";import"../../chunk-5RTGHMF3.mjs";import"../../chunk-VGWDYD6Z.mjs";import"../../chunk-Z22NSJMF.mjs";import{a as f}from"../../chunk-EZC3YWSQ.mjs";import"../../chunk-YRMNCHFO.mjs";import"../../chunk-EOR2BAI2.mjs";import"../../chunk-Y7H3EUBR.mjs";import"../../chunk-4WA47ZQA.mjs";import"../../chunk-NPVUICIF.mjs";import"../../chunk-6SWKEZN6.mjs";import"../../chunk-DFIXTV2M.mjs";import"../../chunk-VDN4LQSS.mjs";import"../../chunk-FGEFYI5E.mjs";import"../../chunk-MU5WPW4N.mjs";import"../../chunk-AZKOVKSK.mjs";import"../../chunk-UVHMI3PU.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-22LHS2J6.mjs";import"../../chunk-IC2ABKAM.mjs";import"../../chunk-FHMQVAKQ.mjs";import"../../chunk-55EX54R7.mjs";import"../../chunk-6C4WESLL.mjs";import"../../chunk-LAQ3QAUW.mjs";import"../../chunk-PDY7JYY3.mjs";import"../../chunk-L3BLBPSR.mjs";import"../../chunk-Q5XT55O3.mjs";import"../../chunk-WISC5QJV.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-WU3JMLSC.mjs";import"../../chunk-BZAYEKYC.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as AppSidebarLeft,g as ColleagueCard,i as ColleagueForm,j as ColleagueTypeSelection,n as ColleaguesView,b as DashboardHeader,s as DashboardPage,k as DigitalColleagueClone,l as DigitalColleagueOptions,o as DocumentEdit,p as DocumentPreview,t as FileView,c as FoundaryLayout,q as KnowledgeBrowser,h as KnowledgeSearch,r as KnowledgeView,d as MainPage,e as ManagementSidebar,u as PlanningView,v as ProjectView,w as ProjectsIndexView,f as SearchableSelect,m as TeamForm,x as TeamsIndexView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"../../chunk-22LHS2J6.mjs";import{a}from"../../chunk-IC2ABKAM.mjs";import{a as b}from"../../chunk-FHMQVAKQ.mjs";import"../../chunk-
|
|
1
|
+
import{a as h}from"../../chunk-22LHS2J6.mjs";import{a}from"../../chunk-IC2ABKAM.mjs";import{a as b}from"../../chunk-FHMQVAKQ.mjs";import"../../chunk-55EX54R7.mjs";import{a as f}from"../../chunk-6C4WESLL.mjs";import{a as g}from"../../chunk-LAQ3QAUW.mjs";import{a as e}from"../../chunk-PDY7JYY3.mjs";import{a as d}from"../../chunk-L3BLBPSR.mjs";import{a as c}from"../../chunk-Q5XT55O3.mjs";import"../../chunk-WISC5QJV.mjs";import"../../chunk-ZDPQXVTF.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{c as BrandLogo,f as Footer,g as Header,d as HeaderDesktop,e as HeaderMobile,h as RelatedPagesMenu,a as SimpleHeader,b as VideoHeader};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../../chunk-
|
|
1
|
+
import{a,b}from"../../chunk-XYJ4S67W.mjs";import"../../chunk-MZP7RIQZ.mjs";import"../../chunk-MGSTQLZC.mjs";import"../../chunk-6EKGV4I2.mjs";import"../../chunk-VQBOJHZF.mjs";import"../../chunk-MFUZNS7C.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-SRUG246N.mjs";import"../../chunk-4CU7D3X2.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-LVK4QE5D.mjs";import"../../chunk-NSMXJCXE.mjs";import"../../chunk-LKGCU7H6.mjs";import"../../chunk-5WV5ZFEP.mjs";import"../../chunk-KX2NCNCS.mjs";import"../../chunk-LEC6GEWS.mjs";import"../../chunk-X3JZSN3W.mjs";import"../../chunk-XGIYNUGC.mjs";import"../../chunk-2BR55L74.mjs";import"../../chunk-TEB67NCD.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-LXZAOORS.mjs";import"../../chunk-MGYV46AJ.mjs";import"../../chunk-CGDLOY7W.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-BG7QXNV5.mjs";import"../../chunk-BVFUCOCP.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-YEKQJ4YC.mjs";export{b as Breadcrumbs,a as RenderHero};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h}from"../../chunk-Z22NSJMF.mjs";import{a as f,b as g}from"../../chunk-
|
|
1
|
+
import{a as h}from"../../chunk-Z22NSJMF.mjs";import{a as f,b as g}from"../../chunk-XYJ4S67W.mjs";import{a as e}from"../../chunk-MZP7RIQZ.mjs";import{a}from"../../chunk-MGSTQLZC.mjs";import{a as c}from"../../chunk-6EKGV4I2.mjs";import{a as b}from"../../chunk-VQBOJHZF.mjs";import{a as d}from"../../chunk-F5N6KQA2.mjs";import"../../chunk-U5PBLRRV.mjs";import"../../chunk-Q5Q3DJWU.mjs";import"../../chunk-4QRKVSTE.mjs";import"../../chunk-E4TE4NV6.mjs";import"../../chunk-JFFTEK6Z.mjs";import"../../chunk-JHNVX4UB.mjs";import"../../chunk-7BXIU4ZM.mjs";import"../../chunk-YFAZQYK4.mjs";import"../../chunk-INCYANPB.mjs";import"../../chunk-B4H6T2GP.mjs";import"../../chunk-TVZOULLL.mjs";import"../../chunk-RLVKIMGU.mjs";import"../../chunk-OCPX4QPC.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-YNNW2C2U.mjs";import"../../chunk-76M7JE4D.mjs";import"../../chunk-MFUZNS7C.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-SRUG246N.mjs";import"../../chunk-4CU7D3X2.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-LVK4QE5D.mjs";import"../../chunk-NSMXJCXE.mjs";import"../../chunk-LKGCU7H6.mjs";import"../../chunk-5WV5ZFEP.mjs";import"../../chunk-KX2NCNCS.mjs";import"../../chunk-LEC6GEWS.mjs";import"../../chunk-X3JZSN3W.mjs";import"../../chunk-XGIYNUGC.mjs";import"../../chunk-2BR55L74.mjs";import"../../chunk-TEB67NCD.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-LXZAOORS.mjs";import"../../chunk-MGYV46AJ.mjs";import"../../chunk-CGDLOY7W.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-OYZDAMCS.mjs";import"../../chunk-5NRGSTPV.mjs";import"../../chunk-ZFUP5NVF.mjs";import"../../chunk-4UIARERB.mjs";import"../../chunk-D4IMQTVU.mjs";import"../../chunk-7GSXNSLD.mjs";import"../../chunk-YNCJATT7.mjs";import"../../chunk-L5JPAKPM.mjs";import"../../chunk-KY7WQYN4.mjs";import"../../chunk-ZUA4KNIR.mjs";import"../../chunk-BG7QXNV5.mjs";import"../../chunk-BVFUCOCP.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-7WIO2CIC.mjs";import"../../chunk-X5KZKO2V.mjs";import"../../chunk-WISCWNL2.mjs";import"../../chunk-FMJBJ3HN.mjs";import"../../chunk-FVM5SQT2.mjs";import"../../chunk-EGEO3FNE.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-Q3G5UAAD.mjs";import"../../chunk-XGRRLABA.mjs";import"../../chunk-FLHDNCNY.mjs";import"../../chunk-FRWX5YES.mjs";import"../../chunk-CV7PH2KH.mjs";import"../../chunk-YEKQJ4YC.mjs";export{g as Breadcrumbs,h as DashboardHero,a as HighImpactHero,c as LowImpactHero,b as MediumImpactHero,d as PostHero,f as RenderHero,e as SectionHero};
|