cortex-react-components 2.18.0 → 2.18.2
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-3DZFESHK.mjs → chunk-2E7GRMZB.mjs} +1 -1
- package/dist/{chunk-CXOVEABI.mjs → chunk-2WP44BWJ.mjs} +1 -1
- package/dist/{chunk-3NRXQBBS.mjs → chunk-4BKAUTKL.mjs} +1 -1
- package/dist/{chunk-RGOKBIQ5.mjs → chunk-4OROP5TC.mjs} +1 -1
- package/dist/{chunk-HHPTGV4F.mjs → chunk-4RET4JGB.mjs} +1 -1
- package/dist/{chunk-LHO4WFYP.mjs → chunk-5FWH5YVM.mjs} +1 -1
- package/dist/{chunk-WIRQ5IRT.mjs → chunk-5GV4XVLP.mjs} +1 -1
- package/dist/{chunk-UECG3SCG.mjs → chunk-5PJLI46T.mjs} +1 -1
- package/dist/{chunk-6R6NYDWN.mjs → chunk-5PZT7ZV2.mjs} +1 -1
- package/dist/{chunk-3ZQFJ5WD.mjs → chunk-5RKIC5BC.mjs} +1 -1
- package/dist/{chunk-EM3T2XYC.mjs → chunk-64ODZI5O.mjs} +1 -1
- package/dist/{chunk-GHOL5L32.mjs → chunk-7CY3QPBJ.mjs} +1 -1
- package/dist/chunk-7JDMW5R3.mjs +4 -0
- package/dist/{chunk-V6GK2FJG.mjs → chunk-CQAMS7RZ.mjs} +1 -1
- package/dist/{chunk-3HNU2NYP.mjs → chunk-DAAAZF3S.mjs} +1 -1
- package/dist/{chunk-NINFDOV5.mjs → chunk-DEO6EQJR.mjs} +1 -1
- package/dist/{chunk-LX3D4J7I.mjs → chunk-DEVPAZSJ.mjs} +1 -1
- package/dist/{chunk-ZEALRBXW.mjs → chunk-DOPDVMNN.mjs} +1 -1
- package/dist/chunk-ENBMBLW4.mjs +4 -0
- package/dist/{chunk-HUYTXZLC.mjs → chunk-GBKD2LF4.mjs} +1 -1
- package/dist/{chunk-3Y7QG6VP.mjs → chunk-GYLFNLRD.mjs} +1 -1
- package/dist/{chunk-QAJBJFRP.mjs → chunk-HNHUOQGZ.mjs} +1 -1
- package/dist/{chunk-TTWEHUP5.mjs → chunk-HPTE7BNH.mjs} +1 -1
- package/dist/{chunk-TKCFCYEQ.mjs → chunk-HSQAHQNP.mjs} +1 -1
- package/dist/{chunk-5EQXJS23.mjs → chunk-JK2VAKPT.mjs} +1 -1
- package/dist/{chunk-AQQCH7Z2.mjs → chunk-KBEXWUKI.mjs} +1 -1
- package/dist/{chunk-L5NPH5RX.mjs → chunk-LLP4EFT4.mjs} +1 -1
- package/dist/{chunk-4DR4ILAP.mjs → chunk-LYQOKIQY.mjs} +1 -1
- package/dist/{chunk-P7S6XFU4.mjs → chunk-MX3JKY3V.mjs} +1 -1
- package/dist/{chunk-GTZJWMZR.mjs → chunk-N6J2WFC4.mjs} +1 -1
- package/dist/{chunk-PTJVI53B.mjs → chunk-NN4QIXZ2.mjs} +1 -1
- package/dist/{chunk-PWFVXG44.mjs → chunk-O2RJFVGE.mjs} +1 -1
- package/dist/{chunk-ZFUP5NVF.mjs → chunk-O5P35LEY.mjs} +1 -1
- package/dist/{chunk-KWYJ3XZI.mjs → chunk-ONZ32NDG.mjs} +1 -1
- package/dist/{chunk-2BRDNDUB.mjs → chunk-PC2PZNJ6.mjs} +1 -1
- package/dist/chunk-QADUAIFH.mjs +1 -0
- package/dist/{chunk-75F3LJMX.mjs → chunk-QUOSFCS5.mjs} +1 -1
- package/dist/{chunk-D6K6RO5P.mjs → chunk-R5P4ZICA.mjs} +1 -1
- package/dist/{chunk-P55W6AFU.mjs → chunk-RIRZRO6U.mjs} +1 -1
- package/dist/{chunk-AJQHGVZ5.mjs → chunk-RZM6JZBZ.mjs} +1 -1
- package/dist/{chunk-C4RWEPVF.mjs → chunk-SJON62H2.mjs} +1 -1
- package/dist/{chunk-WHDV4REI.mjs → chunk-SWEGT5SP.mjs} +1 -1
- package/dist/{chunk-RSDUFAIB.mjs → chunk-T5HJS6OF.mjs} +1 -1
- package/dist/chunk-UA2E23AS.mjs +4 -0
- package/dist/{chunk-X3JZSN3W.mjs → chunk-UZSBX5GO.mjs} +1 -1
- package/dist/{chunk-6PS55VJZ.mjs → chunk-VDFRWGXR.mjs} +1 -1
- package/dist/{chunk-XGIYNUGC.mjs → chunk-VNYUNZ3M.mjs} +1 -1
- package/dist/{chunk-2BR55L74.mjs → chunk-VRE6VCHX.mjs} +1 -1
- package/dist/{chunk-7R47MHQE.mjs → chunk-WC7IAORY.mjs} +1 -1
- package/dist/{chunk-5NIEZE7A.mjs → chunk-XX4GSGRP.mjs} +1 -1
- package/dist/{chunk-RJGYVDOU.mjs → chunk-YTCTK24K.mjs} +1 -1
- package/dist/{chunk-FE7ZGUPU.mjs → chunk-ZIZENXBP.mjs} +1 -1
- package/dist/{chunk-5MWZTJYP.mjs → chunk-ZKOJRF5P.mjs} +1 -1
- package/dist/components/Blocks/Banner.mjs +1 -1
- package/dist/components/Blocks/CallToAction.mjs +1 -1
- package/dist/components/Blocks/CollapsibleArea.mjs +1 -1
- package/dist/components/Blocks/Content.mjs +1 -1
- package/dist/components/Blocks/FeaturesBlock.mjs +1 -1
- package/dist/components/Blocks/ImageBlock.mjs +1 -1
- package/dist/components/Blocks/MediaBlock.mjs +1 -1
- package/dist/components/Blocks/RelatedPosts.mjs +1 -1
- package/dist/components/Blocks/RenderBlocks.mjs +1 -1
- package/dist/components/Blocks/ReusableContentBlock.mjs +1 -1
- package/dist/components/Blocks/index.mjs +1 -1
- package/dist/components/Cards/ContentCard.mjs +1 -1
- package/dist/components/Cards/FeatureCard.mjs +1 -1
- package/dist/components/Cards/index.mjs +1 -1
- package/dist/components/Chat/ChatInterface.js +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/CodeBlock.js +1 -1
- package/dist/components/Chat/PartTypes/CodeBlock.mjs +1 -1
- package/dist/components/Chat/PartTypes/MessageHandler.js +3 -3
- package/dist/components/Chat/PartTypes/MessageHandler.mjs +1 -1
- package/dist/components/Chat/PartTypes/Tool.js +1 -1
- package/dist/components/Chat/PartTypes/Tool.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 +1 -1
- 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/AppSidebarLeft.mjs +1 -1
- package/dist/components/DigitalColleagues/MainPage.mjs +1 -1
- package/dist/components/DigitalColleagues/Pages/dashboardpage.mjs +1 -1
- package/dist/components/DigitalColleagues/Views/index.mjs +1 -1
- package/dist/components/DigitalColleagues/index.mjs +1 -1
- package/dist/components/Foundary/AppSidebarLeft.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-knowledge-modal.mjs +1 -1
- package/dist/components/Foundary/Knowledge/add-team-context.mjs +1 -1
- package/dist/components/Foundary/MainPage.mjs +1 -1
- package/dist/components/Foundary/Pages/dashboardpage.mjs +1 -1
- package/dist/components/Foundary/RichText/index.mjs +1 -1
- package/dist/components/Foundary/RichText/plugins/toolbar-plugin.mjs +1 -1
- package/dist/components/Foundary/Views/KnowledgeView.mjs +1 -1
- package/dist/components/Foundary/Views/index.mjs +1 -1
- package/dist/components/Foundary/document-edit.mjs +1 -1
- package/dist/components/Foundary/document-preview-examples.mjs +1 -1
- package/dist/components/Foundary/document-preview.mjs +1 -1
- package/dist/components/Foundary/index.mjs +1 -1
- package/dist/components/Foundary/knowledge-browser.mjs +1 -1
- package/dist/components/HeaderFooter/SectionHeading.mjs +1 -1
- package/dist/components/HeaderFooter/VideoHeader.mjs +1 -1
- package/dist/components/HeaderFooter/index.mjs +1 -1
- package/dist/components/Heros/HighImpact/index.mjs +1 -1
- package/dist/components/Heros/LowImpact/index.mjs +1 -1
- package/dist/components/Heros/MediumImpact/index.mjs +1 -1
- package/dist/components/Heros/PostHero/index.mjs +1 -1
- package/dist/components/Heros/RenderHero.mjs +1 -1
- package/dist/components/Heros/SectionHero/index.mjs +1 -1
- package/dist/components/Heros/index.mjs +1 -1
- package/dist/components/Holidays/HolidayTracker.mjs +1 -1
- package/dist/components/Holidays/index.mjs +1 -1
- package/dist/components/Layouts/OutputHeaderFooter.mjs +1 -1
- package/dist/components/Layouts/Print.mjs +1 -1
- package/dist/components/Layouts/SlideShow.mjs +1 -1
- package/dist/components/Layouts/index.mjs +1 -1
- package/dist/components/Menus/SidebarLeft.mjs +1 -1
- package/dist/components/Menus/SidebarRight.mjs +1 -1
- package/dist/components/Menus/index.mjs +1 -1
- package/dist/components/Other/index.mjs +1 -1
- package/dist/components/Payload/CollectionArchive/index.mjs +1 -1
- package/dist/components/Payload/Media/index.mjs +1 -1
- package/dist/components/Payload/PayloadCard/index.mjs +1 -1
- package/dist/components/Payload/RichText/index.mjs +1 -1
- package/dist/components/Payload/RichText/serialize.mjs +1 -1
- package/dist/components/Payload/index.mjs +1 -1
- package/dist/components/Projects/EpicsView.mjs +1 -1
- package/dist/components/Projects/KanbanBoardView.mjs +1 -1
- package/dist/components/Projects/ProjectPage.mjs +1 -1
- package/dist/components/Projects/ProjectView.mjs +1 -1
- package/dist/components/Projects/ProjectsIndexView.mjs +1 -1
- package/dist/components/Projects/index.mjs +1 -1
- package/dist/components/dc-temp/index.mjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/ui/index.mjs +1 -1
- package/dist/components/ui/sidebar.mjs +1 -1
- package/dist/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/AboutSection.mjs +1 -1
- package/dist/sections/BlogDetail.mjs +1 -1
- package/dist/sections/BlogList.mjs +1 -1
- package/dist/sections/BlogListSection.mjs +1 -1
- package/dist/sections/ContactSection.mjs +1 -1
- package/dist/sections/PageSections.mjs +1 -1
- package/dist/sections/PricingSection.mjs +1 -1
- package/dist/sections/ServiceDetail.mjs +1 -1
- package/dist/sections/ServiceDetailSection.mjs +1 -1
- package/dist/sections/ServiceSection.mjs +1 -1
- package/dist/sections/index.mjs +1 -1
- package/package.json +4 -4
- package/dist/chunk-7IARWH7M.mjs +0 -4
- package/dist/chunk-GXRWKWKJ.mjs +0 -1
- package/dist/chunk-UGBDJDPW.mjs +0 -4
- package/dist/chunk-ZN7NNMB7.mjs +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-KG7HG2VO.mjs";import{a as
|
|
1
|
+
import{a as D}from"./chunk-KG7HG2VO.mjs";import{a as P}from"./chunk-QC2UWZWL.mjs";import{a as O}from"./chunk-L3V5YDPH.mjs";import{a as A}from"./chunk-Z22NSJMF.mjs";import{a as x}from"./chunk-UVHMI3PU.mjs";import{a as S}from"./chunk-B4H6T2GP.mjs";import{a as y}from"./chunk-L5JPAKPM.mjs";import{b as m}from"./chunk-ZUA4KNIR.mjs";import{b as u}from"./chunk-CSBGSBEU.mjs";import{a as C}from"./chunk-YO3GQYRJ.mjs";import{useState as n,useRef as H,useEffect as k}from"react";import{Plus as ie,Move as oe,Edit2 as ne,Trash2 as re,Check as de,X as le}from"lucide-react";import{Fragment as B,jsx as t,jsxs as s}from"react/jsx-runtime";var Te=({tasks:M,epics:f,sprints:z,onUpdateTask:R,onTaskClick:I,onAddTaskToEpic:$,onAddEpic:L,onUpdateEpic:F,onDeleteEpic:V})=>{let[j,v]=n(f),[g,E]=n(null),[r,h]=n(null),[o,d]=n({}),[p,w]=n(0),[U,N]=n(!1),[X,T]=n(!1),[q,G]=n(null),l=H(null),J=H(null);k(()=>{v(f)},[f]),k(()=>{let e=()=>{if(l.current){let b=l.current.offsetHeight;w(b)}};e();let a=new ResizeObserver(e);l.current&&a.observe(l.current);let c=()=>{setTimeout(e,100)};return window.addEventListener("storage",c),()=>{a.disconnect(),window.removeEventListener("storage",c)}},[]),k(()=>{let e=setTimeout(()=>{l.current&&w(l.current.offsetHeight)},300);return()=>clearTimeout(e)},[r]);let K=e=>{E(e)},Q=e=>{e.preventDefault()},W=(e,a)=>{e.preventDefault(),g&&x(g.epic).toString()!==a&&(R(g.id.toString(),{epic:Number(a)}),E(null))},Y=e=>M.filter(a=>x(a.epic).toString()===e),Z=e=>{h(e.id.toString()),d({name:e.name,description:e.description,confidence:e.confidence,phase:e.phase})},_=async()=>{r&&o.name&&(await F(r.toString(),o),v(e=>e.map(a=>a.id.toString()===r?{...a,...o}:a)),h(null),d({}))},ee=()=>{h(null),d({})},te=async e=>{window.confirm("Are you sure you want to delete this epic? This will also delete all associated tasks.")&&(await V(e),v(a=>a.filter(c=>c.id.toString()!==e)))},ce=e=>({1:"Planning",2:"Development",3:"Testing",4:"Review",5:"Deployment",6:"Monitoring",7:"Optimization",8:"Maintenance",9:"Complete"})[e]||`Phase ${e}`,se=e=>{switch(e){case"high":return"bg-success/10 text-success";case"medium":return"bg-warning/10 text-warning";case"low":return"bg-destructive/10 text-destructive";default:return"bg-muted text-muted-foreground"}};return s(B,{children:[s("div",{ref:J,className:"h-full flex flex-col px-2 md:px-4 py-4",children:[t("div",{ref:l,className:"flex-shrink-0",children:t(A,{title:"Epic Planning",description:"Organize and manage your project epics, track progress, and assign tasks.",gradient:"bg-gradient-to-r from-rose-600 via-pink-600 to-fuchsia-600",primaryAction:{label:"Add epic",onClick:()=>N(!0)}})}),t("div",{className:"flex-1 min-h-0 mt-8",children:t("div",{className:"h-full overflow-y-auto",style:{height:p>0?`calc(100vh - ${p+120}px)`:"calc(100vh - 12rem)"},children:t("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-6 auto-rows-max",children:j.map(e=>{let a=Y(e.id.toString()),c=a.reduce((i,ae)=>i+(ae.storyPoints||0),0),b=p>0?`calc(100vh - ${p+200}px)`:"calc(100vh - 14rem)";return s(C,{className:`flex flex-col ${r===e.id.toString()?"h-auto":""} bg-card shadow-sm`,style:{height:r===e.id.toString()?"auto":b,minHeight:"400px"},onDragOver:Q,onDrop:i=>W(i,e.id.toString()),children:[t("div",{className:"p-4 border-b border-border",children:r===e.id.toString()?s("div",{className:"space-y-4",children:[s("div",{className:"flex items-center justify-between",children:[t(y,{value:o.name||"",onChange:i=>d({...o,name:i.target.value}),placeholder:"Epic name",className:"font-semibold"}),s("div",{className:"flex gap-2 ml-2",children:[t(m,{size:"sm",variant:"ghost",onClick:_,className:"p-1 h-8 w-8",children:t(de,{className:"h-4 w-4"})}),t(m,{size:"sm",variant:"ghost",onClick:ee,className:"p-1 h-8 w-8",children:t(le,{className:"h-4 w-4"})})]})]}),t(S,{value:o.description||"",onChange:i=>d({...o,description:i.target.value}),placeholder:"Epic description",className:"text-sm min-h-[60px]"}),s("div",{className:"grid grid-cols-2 gap-2",children:[s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Confidence"}),s("select",{value:o.confidence||e.confidence,onChange:i=>d({...o,confidence:i.target.value}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[t("option",{value:"low",children:"Low"}),t("option",{value:"medium",children:"Medium"}),t("option",{value:"high",children:"High"})]})]}),s("div",{children:[t("label",{className:"text-xs text-muted-foreground",children:"Phase"}),t("select",{value:o.phase?.toString()||e.phase.toString(),onChange:i=>d({...o,phase:parseInt(i.target.value)}),className:"flex h-8 w-full rounded-md border border-input bg-background px-3 py-2 text-xs ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",children:[1,2,3,4,5,6,7,8,9].map(i=>s("option",{value:i.toString(),children:["Phase ",i]},i))})]})]})]}):s(B,{children:[s("div",{className:"flex items-center gap-2 mb-2",children:[t("div",{className:`w-4 h-4 rounded-full ${e.color}`}),t("h3",{className:"font-semibold text-foreground select-none flex-1",children:e.name}),s("div",{className:"flex gap-1",children:[t(m,{size:"sm",variant:"ghost",onClick:()=>Z(e),className:"p-1 h-8 w-8",children:t(ne,{className:"h-3 w-3"})}),t(m,{size:"sm",variant:"ghost",onClick:()=>te(e.id.toString()),className:"p-1 h-8 w-8 hover:bg-destructive/10 hover:text-destructive",children:t(re,{className:"h-3 w-3"})})]})]}),s("div",{className:"flex flex-wrap gap-2 mb-3",children:[s(u,{className:`text-xs ${se(e.confidence)}`,children:[e.confidence," confidence"]}),s(u,{variant:"outline",className:"text-xs",children:["Phase ",e.phase]}),s(u,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[a.length," tasks"]}),s(u,{variant:"secondary",className:"text-xs bg-muted text-muted-foreground",children:[c," pts"]})]}),e.description&&t("p",{className:"text-sm text-muted-foreground mb-3 select-none",children:e.description}),s(m,{onClick:()=>{T(!0),G(e)},variant:"outline",size:"sm",className:"w-full gap-2",children:[t(ie,{className:"h-4 w-4"}),"Add Task"]})]})}),t("div",{className:"flex-1 p-4 overflow-y-auto",children:t("div",{className:`space-y-3 min-h-[200px] border-2 border-dashed rounded p-3 transition-colors ${g?"border-primary bg-primary/10":"border-border"}`,children:a.length===0?s("div",{className:"flex flex-col items-center justify-center h-32 text-muted-foreground border-2 border-dashed border-border rounded-lg",children:[t(oe,{className:"h-8 w-8 mb-2"}),t("span",{className:"text-sm select-none",children:"Drop tasks here"})]}):a.map(i=>t(D,{task:i,epic:e,onDragStart:K,onTaskClick:I,isCompact:!0},i.id))})})]},e.id)})})})})]}),t(O,{isOpen:U,onClose:()=>N(!1),onAddEpic:L}),t(P,{isOpen:X,onClose:()=>T(!1),onAddTask:$,assignees:[],epics:[],defaultEpicId:q?.id.toString()||"",sprints:z})]})};export{Te as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./chunk-
|
|
1
|
+
import{a as e}from"./chunk-VRE6VCHX.mjs";import{a}from"./chunk-MDJREBVI.mjs";import{jsx as o}from"react/jsx-runtime";var g=r=>{let{className:t,enableGutter:m=!0,imgClassName:s,media:i,staticImage:n}=r;return o("div",{className:a("",{container:m},t),children:o(e,{imgClassName:a("rounded-[0.8rem]",s),resource:i,src:n})})};export{g as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as r}from"./chunk-KFCSVEI6.mjs";import{a as m}from"./chunk-TEB67NCD.mjs";import{Fragment as n}from"react";import{jsx as o}from"react/jsx-runtime";var y=e=>{let{className:a,htmlElement:t="div",resource:i}=e,s=typeof i=="object"&&i?.mimeType?.includes("video");return o(t||n,{...t!==null?{className:a}:{},children:s?o(r,{...e}):o(m,{...e})})};export{y as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-DAAAZF3S.mjs";import{a as r}from"./chunk-KML6U7IE.mjs";import{a as o}from"./chunk-TXVA6XJT.mjs";import p from"next/image";import{FaEnvelope as c,FaPhoneFlip as d}from"react-icons/fa6";import{jsx as e,jsxs as t}from"react/jsx-runtime";function f(s){let{sectionHeading:i,image:a}=s;return e("div",{className:"relative w-full light py-[60px]",children:t("div",{className:"w-full grid grid-cols-1 md:grid-cols-2 gap-1 items-center justify-center",children:[e("div",{className:"relative h-full w-full",children:e(p,{src:a.src,alt:a.alt,fill:!0,objectFit:"contain",sizes:"(min-width: 768px) 30vw, 50vw",placeholder:"blur",blurDataURL:r})}),e("div",{className:"w-full h-full",children:t("div",{className:"bg-white p-10",children:[e("div",{className:"mb-30px",children:e(l,{...i,invert:!0})}),e(o,{})]})})]})})}function y(s){return e("div",{className:"",children:e("div",{className:"mx-auto max-w-7xl px-6 lg:px-8",children:e("div",{className:"mx-auto max-w-2xl space-y-16 divide-y divide-gray-100 lg:mx-0 lg:max-w-none",children:t("div",{className:"grid grid-cols-1 gap-10 pt-16 lg:grid-cols-3",children:[t("div",{children:[e("h2",{className:"text-pretty text-4xl text-primary",children:"Locations"}),e("p",{className:"mt-4 text-base/7 text-foreground",children:"We have multiple locations across the UK."})]}),e("div",{className:"grid grid-cols-1 gap-6 sm:grid-cols-2 lg:col-span-2 lg:gap-8",children:s.locations&&s.locations.map((i,a)=>t("div",{className:"rounded-2xl p-10 border",children:[e("h3",{className:"text-base/7 text-primary",children:i.title}),t("address",{className:"mt-3 space-y-1 text-sm/6 not-italic text-foreground",children:[i.location.split(",")?.map((m,n)=>e("p",{children:m},n))," ",i.mails&&t("p",{className:"flex items-center space-x-2",children:[e(c,{className:"pr-2 text-primary size-auto"}),e("span",{children:i.mails[0]})]}),i.phoneNumbers&&i.phoneNumbers.length>0&&t("p",{className:"flex items-center space-x-2",children:[e(d,{className:"pr-2 text-primary size-auto"}),i.phoneNumbers[0]]})]})]},a))})]})})})})}export{f as a,y as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-
|
|
4
|
+
import{c as k,h as v,i as R,k as f,l as y,o as x,p as c,q as d,r as h,s as w,v as L,w as P,x as B}from"./chunk-O5P35LEY.mjs";import{a as n}from"./chunk-7GSXNSLD.mjs";import{a as S,b as C,c as M}from"./chunk-YNCJATT7.mjs";import{ChevronRight as G}from"lucide-react";import T from"clsx";import{Fragment as H,jsx as e,jsxs as r}from"react/jsx-runtime";function J({mainNav:u,secondaryNav:s,ongoingWork:l,title:t,subTitle:o,pathName:i,menuHeading:O,onNavClick:m,loading:b=!1,LinkComponent:N,...A}){let g=N?a=>e(N,{...a}):m?({href:a,children:p,...I})=>e("button",{onClick:()=>m&&m(a),className:"flex items-center justify-start w-full text-sm text-left px-4 py-2",...I,children:p}):a=>e("a",{...a});return r(k,{...A,variant:"inset",children:[e(v,{children:e(c,{children:e(d,{children:b?r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e(n,{className:"bg-gray-200 my-2 w-full h-7"}),e(n,{className:"bg-gray-200 w-3/4 my-2 h-5"})]}):r("div",{className:"grid flex-1 p-2 text-left text-m leading-tight",children:[e("span",{className:"truncate font-semibold",children:t}),o&&e("span",{className:"truncate text-sm",children:o})]})})})}),b&&r(f,{children:[e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"}),e(n,{className:"bg-gray-200 w-3/4 h-5"})]}),r(f,{children:[e("div",{className:"px-4 text-sm",children:"Recent Work"}),l&&!b&&l.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e("div",{className:"border-t border-gray-200 my-4"}),u&&!b&&u.map((a,p)=>e(F,{subNav:a,pathName:i,Link:g},p)),e(y,{className:"mt-auto",children:e(x,{children:e(c,{children:s&&!b&&s.map(a=>e(d,{children:e(h,{asChild:!0,size:"sm",children:r(g,{href:a.url||"",children:[a.icon&&e(a.icon,{}),e("span",{children:a.label})]})})},a.label))})})})]}),e(R,{})]})}function F({subNav:u,pathName:s,Link:l}){let t=u,o=!1;return t.links&&t.links.map(i=>{i.url===s&&(o=!0)}),e(S,{defaultOpen:!0,className:"group/collapsible",children:e(y,{className:"py-0",children:e(c,{children:e(S,{asChild:!0,defaultOpen:t.isActive,children:r(d,{children:[e(h,{asChild:!0,tooltip:t.label,className:T(o&&"font-bold text-accent"),children:r(l,{href:t.url,children:[t.icon&&e(t.icon,{}),e("span",{children:t.label})]})}),t.links?.length?r(H,{children:[e(C,{asChild:!0,children:r(w,{className:"data-[state=open]:rotate-90",children:[e(G,{}),e("span",{className:"sr-only",children:"Toggle"})]})}),e(M,{children:e(L,{children:t.links?.map(i=>e(P,{children:e(B,{asChild:!0,className:T(i.url===s&&"font-bold text-accent"),children:e(l,{href:i.url,children:e("span",{children:i.label})})})},i.label))})})]}):null]})},t.label)})})})}export{J as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as n}from"./chunk-SV7NMNDI.mjs";import{a as r}from"./chunk-
|
|
1
|
+
import{a as n}from"./chunk-SV7NMNDI.mjs";import{a as r}from"./chunk-DAAAZF3S.mjs";import{a as o}from"./chunk-KX2NCNCS.mjs";import{a as e}from"./chunk-FMJBJ3HN.mjs";import{jsx as i,jsxs as c}from"react/jsx-runtime";function S({sectionHeading:p,cards:a}){return i("section",{className:"section-padding-primary !pt-0",children:c(e,{children:[i("div",{className:"mx-auto max-w-[630px]","data-aos":"fade-up","data-aos-delay":"100",children:i(r,{...p,alignment:"center",hasBottomSpacing:!0})}),a&&a.length>0&&i("div",{className:"grid gap-30px",children:a.map((d,t)=>i("div",{"data-aos":"fade-up","data-aos-delay":n([200,400,600],t),className:"py-2",children:i(o,{...d})},t))})]})})}export{S as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{b as w,c as C}from"./chunk-
|
|
4
|
+
import{b as w,c as C}from"./chunk-2WP44BWJ.mjs";import{b as y}from"./chunk-N6J2WFC4.mjs";import{a as P}from"./chunk-MDJREBVI.mjs";import{a as b}from"./chunk-Q3G5UAAD.mjs";import{useEffect as d,useRef as s,useState as H,useCallback as x}from"react";import{Previewer as p}from"pagedjs";import{Fragment as N,jsx as n,jsxs as l}from"react/jsx-runtime";function T(r){var e=document.createElement("div");e.style.display="block",e.style.height=r,document.body.appendChild(e);var i=parseFloat(window.getComputedStyle(e,null).height);return e.parentNode&&e.parentNode.removeChild(e),Math.floor(i)}var m=r=>{let e=document.createElement("div");e.style.height="1mm",document.body.appendChild(e);let i=parseFloat(window.getComputedStyle(e).height);return document.body.removeChild(e),Math.floor(r/i)},F=({page:r,layout:e="portrait",logoImage:i})=>e==="flow"?n(E,{page:r,layout:e,logoImage:i}):n(B,{page:r,layout:e,logoImage:i}),E=({page:r,layout:e="portrait",logoImage:i})=>{let{contentWithIds:c}=b(r),u=s(null),a=s(null),h=s(new p),f={id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}};d(()=>{let o=document.getElementById("printable-content");if(o){let t=document.createElement("style");return t.textContent=`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; width: ${m(o.offsetWidth)}mm }; .container : { max-width: ${m(o.offsetWidth)}mm; } .container : { max-width: 100%; }; html body * :not(#prinable-content, #printable-content *) { visibility: hidden !important; }`,document.head.appendChild(t),()=>{document.head.removeChild(t)}}},[e]);let k=x(()=>{if(!a.current)return;a.current&&(a.current.innerHTML="");let o=document.getElementById("printable-content");o&&h.current.preview(document.getElementById("printable-content").innerHTML,[`@page { size: ${m(o.offsetWidth)}mm ${m(o.offsetHeight)}mm ; margin: 0mm; }; .container : { max-width: 100%; }; body { zoom: 100%;}`],a.current).catch(t=>console.error("Paged.js error:",t))},[e]);d(()=>{h.current=new p},[k,e]);let g=[f,...c];return l("div",{children:[n("div",{className:"w-[1123px] print:w-[1123px]",children:l("div",{id:"printable-content",ref:u,children:[g.map((o,t)=>n(N,{children:t===0?n("section",{className:"title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},t):l("section",{className:"normal-page overflow-hidden",children:[o.blockName&&n(w,{title:o.blockName}),n(y,{blocks:[o],fill:!0})]},t)})),n("section",{className:"normal-page",children:l("div",{className:`w-full py-2 px-8 flex justify-between items-center
|
|
5
5
|
dark bg-background text-primary`,children:[l("div",{className:"flex px-6 items-center space-x-2",children:[i&&n("img",{src:i.src,alt:"Cortex Reply Logo",className:"h-8"}),n("span",{className:"pl-12 text-sm",children:"Power up your people"})]}),n("a",{href:"https://cortexreply.com",className:"text-sm hover:underline",children:"cortexreply.com"})]})})]})}),n("div",{ref:a,className:"preview-container"})]})},B=({page:r,layout:e="portrait"})=>{let{contentWithIds:i}=b(r),c=s(null),u=s(null),a=s(new p),[h,f]=H(0),g=[{id:"0000000000000000000",blockName:null,columns:[],blockType:"content",theme:{settings:{theme:"dark",background:"solid",overlay:!0}}},...i],o=x(()=>{c.current&&(c.current&&(c.current.innerHTML=""),a.current.preview(document.getElementById("printable-content").innerHTML,["./print.css",e==="landscape"?"./landscape.css":"./portrait.css"],c.current).then(t=>f(t.pageCount)).catch(t=>console.error("Paged.js error:",t)))},[e]);return d(()=>{a.current=new p,o()},[o,e]),d(()=>{let t=document.createElement("style");return t.textContent=`@page { size: A4 ${e} ; margin: 0mm; };`,document.head.appendChild(t),()=>{document.head.removeChild(t)}},[]),l("div",{className:"pagedjs-container",children:[n("div",{id:"printable-content",ref:u,style:{display:"none"},className:"pagedjs-content",children:g.map((t,v)=>n(N,{children:v===0?n("section",{className:"pagedjs-section title-page w-full h-full",children:n(C,{hero:r.hero,title:r.title})},v):l("section",{className:P("pagedjs-section normal-page h-[699px]",`h-[${T("185mm")}px]`,t.theme?.settings?.theme==="dark"?"dark":"light"),children:[t.blockName&&n(w,{title:t.blockName}),n(y,{blocks:[t],fill:!0})]},v)}))}),n("div",{ref:c,className:"preview-container"})]})};export{F as a,E as b,B as c};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
|
-
import{f as t}from"./chunk-
|
|
4
|
+
import{f as t}from"./chunk-PC2PZNJ6.mjs";import{a}from"./chunk-MDJREBVI.mjs";import n from"react";import*as l from"@radix-ui/react-collapsible";import{ChevronDownIcon as c,ChevronUpIcon as m}from"@radix-ui/react-icons";import{jsx as e,jsxs as s}from"react/jsx-runtime";var h=({title:p,richText:r})=>{let[o,i]=n.useState(!1);return e("div",{className:"border rounded-lg overflow-hidden",children:s(l.Root,{className:a("w-full"),open:o,onOpenChange:i,children:[s(l.Trigger,{className:"flex w-full items-center justify-between bg-white px-4 py-3 text-left hover:bg-gray-50",children:[e("h2",{className:"text-lg font-medium",children:p}),o?e(m,{className:"h-6 w-6"}):e(c,{className:"h-6 w-6"})]}),e(l.Content,{className:"overflow-hidden data-[state=closed]:animate-collapse data-[state=open]:animate-expand border-t",children:e("div",{className:"px-4 py-3 bg-white",children:e(t,{content:r||{},enableGutter:!1})})})]})})};export{h as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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{a as BannerBlock};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{b as a,c as b}from"../../chunk-
|
|
2
|
+
"use strict";import{b as a,c as b}from"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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 CallToActionBlock,a as CallToActionBlockOld};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";import{a}from"../../chunk-
|
|
2
|
+
"use strict";import{a}from"../../chunk-ZKOJRF5P.mjs";import"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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{a as CollapsibleBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-RZM6JZBZ.mjs";import"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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{a as ContentBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as a}from"../../chunk-
|
|
1
|
+
import{d as a}from"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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{a as FeaturesBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as ImageBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-UZSBX5GO.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.mjs";import"../../chunk-MDJREBVI.mjs";import"../../chunk-ZWHGOTSF.mjs";import"../../chunk-YEKQJ4YC.mjs";export{a as MediaBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-GYLFNLRD.mjs";import"../../chunk-T5HJS6OF.mjs";import"../../chunk-RYZTCMVC.mjs";import"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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{a as RelatedPosts};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as a,c as b,d as c,e as d,f as e,g as f}from"../../chunk-
|
|
1
|
+
import{b as a,c as b,d as c,e as d,f as e,g as f}from"../../chunk-N6J2WFC4.mjs";import"../../chunk-RZM6JZBZ.mjs";import"../../chunk-ZKOJRF5P.mjs";import"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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{e as DarkTop,f as LightTop,a as RenderBlocks,c as RenderBlocksWithShapes,b as Theme,d as ThemeWithShapes};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-N6J2WFC4.mjs";import"../../chunk-RZM6JZBZ.mjs";import"../../chunk-ZKOJRF5P.mjs";import"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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{a as ReusableContentBlock};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as m}from"../../chunk-RULSHTXR.mjs";import{a as x}from"../../chunk-
|
|
1
|
+
import{a as l}from"../../chunk-53QLSQCO.mjs";import{a as m}from"../../chunk-RULSHTXR.mjs";import{a as x}from"../../chunk-GYLFNLRD.mjs";import"../../chunk-T5HJS6OF.mjs";import{a as n}from"../../chunk-EPTHSTUM.mjs";import{a as p}from"../../chunk-JCH2CCQ7.mjs";import{a as i}from"../../chunk-RVRIMD6M.mjs";import"../../chunk-WVP4YQCP.mjs";import"../../chunk-J4IHIM6A.mjs";import"../../chunk-RYZTCMVC.mjs";import{a as q,b as r,c as s,d as t,e as u,f as v,g as w}from"../../chunk-N6J2WFC4.mjs";import{a as o}from"../../chunk-RZM6JZBZ.mjs";import"../../chunk-ZKOJRF5P.mjs";import{a,b,c,d as h}from"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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{a as f}from"../../chunk-UZSBX5GO.mjs";import{a as g}from"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.mjs";import{a as e}from"../../chunk-LXZAOORS.mjs";import"../../chunk-MGYV46AJ.mjs";import{a as d}from"../../chunk-CGDLOY7W.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-ZUA4KNIR.mjs";import{a as j}from"../../chunk-H7D3PZKE.mjs";import{a as k}from"../../chunk-IQPZEEYJ.mjs";import"../../chunk-BG7QXNV5.mjs";import"../../chunk-BVFUCOCP.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-WISCWNL2.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{a as BannerBlock,c as CallToActionBlock,b as CallToActionBlockOld,e as CodeBlock,o as ContentBlock,d as CopyButton,v as DarkTop,h as FeaturesBlock,p as HeadingImage,g as ImageBlock,j as InfoTile,i as Insight,w as LightTop,k as MOTD,f as MediaBlock,l as OrgChart,m as ProposalSummary,x as RelatedPosts,r as RenderBlocks,t as RenderBlocksWithShapes,q as ReusableContentBlock,s as Theme,u as ThemeWithShapes,n as WhyUs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as a}from"../../chunk-
|
|
1
|
+
import{h as a}from"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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{a as ContentCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as a}from"../../chunk-
|
|
1
|
+
import{g as a}from"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.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-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.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-WISCWNL2.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{a as FeatureCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as a,h as i}from"../../chunk-
|
|
1
|
+
import{g as a,h as i}from"../../chunk-PC2PZNJ6.mjs";import"../../chunk-O5BAW5XQ.mjs";import"../../chunk-2QZUKVBA.mjs";import"../../chunk-TXVA6XJT.mjs";import"../../chunk-JYL3XIJX.mjs";import"../../chunk-4CU7D3X2.mjs";import"../../chunk-LVK4QE5D.mjs";import{a as f}from"../../chunk-NSMXJCXE.mjs";import{a as h}from"../../chunk-LKGCU7H6.mjs";import{a as e}from"../../chunk-5WV5ZFEP.mjs";import{a as g}from"../../chunk-KX2NCNCS.mjs";import{a as d}from"../../chunk-LEC6GEWS.mjs";import"../../chunk-UZSBX5GO.mjs";import"../../chunk-VNYUNZ3M.mjs";import"../../chunk-VRE6VCHX.mjs";import"../../chunk-KFCSVEI6.mjs";import"../../chunk-TEB67NCD.mjs";import"../../chunk-LXZAOORS.mjs";import"../../chunk-MGYV46AJ.mjs";import"../../chunk-CGDLOY7W.mjs";import"../../chunk-3UMMMQEH.mjs";import"../../chunk-ZUA4KNIR.mjs";import{a as b}from"../../chunk-BG7QXNV5.mjs";import{a as c}from"../../chunk-BVFUCOCP.mjs";import"../../chunk-SOLZ4VQH.mjs";import"../../chunk-CSBGSBEU.mjs";import"../../chunk-YO3GQYRJ.mjs";import"../../chunk-WISCWNL2.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{i as ContentCard,b as CustomerCard,c as EventCard,a as FeatureCard,h as Hero,e as Image,g as PricingCard,d as ProjectCard,f as ServiceCard};
|
|
@@ -18,4 +18,4 @@
|
|
|
18
18
|
`,children:n?"Processing...":"Deny"}),(0,Be.jsx)("button",{onClick:h,disabled:n,className:`
|
|
19
19
|
px-4 py-2 text-white border-none rounded text-sm
|
|
20
20
|
${n?"bg-gray-400 cursor-not-allowed":"bg-gray-500 hover:bg-gray-600 cursor-pointer"}
|
|
21
|
-
`,children:"Cancel"})]})]}):null};var Dt=({toolPart:e,index:t,addToolResult:o})=>{let[r,s]=tt.default.useState(!0),[a,n]=tt.default.useState(null),i=()=>{o(e.input?.toolCallId,e.input?.tool,"Approved"),s(!1),n("approve")},c=()=>{o(e.input?.toolCallId,e.input?.tool,"Denied"),s(!1),n("deny")};switch(e.state){case"input-available":return(0,Be.jsxs)("div",{className:"mb-2",children:[(0,Be.jsx)(Lt,{isOpen:r,onApprove:i,onDeny:c,onClose:()=>s(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!r&&(0,Be.jsxs)(Be.Fragment,{children:[a==="approve"&&(0,Be.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Be.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,Be.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Be.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),a==="deny"&&(0,Be.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Be.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,Be.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Be.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Be.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var ot=require("@radix-ui/react-use-controllable-state");var he=V(require("@radix-ui/react-collapsible")),He=he.Root,Oe=he.CollapsibleTrigger,Fe=he.CollapsibleContent;var zt=require("streamdown"),Te=(0,_.memo)(({className:e,...t})=>(0,Be.jsx)(zt.Streamdown,{className:d("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Te.displayName="Response";var Ht=(0,_.createContext)(null),_o=()=>{let e=(0,_.useContext)(Ht);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},qo=1e3,Ko=1e3,rt=(0,_.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:r=!0,onOpenChange:s,duration:a,children:n,...i})=>{let[c,g]=(0,ot.useControllableState)({prop:o,defaultProp:r,onChange:s}),[h,f]=(0,ot.useControllableState)({prop:a,defaultProp:0}),[v,R]=(0,_.useState)(!1),[P,x]=(0,_.useState)(null);(0,_.useEffect)(()=>{t?P===null&&x(Date.now()):P!==null&&(f(Math.ceil((Date.now()-P)/Ko)),x(null))},[t,P,f]),(0,_.useEffect)(()=>{if(r&&!t&&c&&!v){let C=setTimeout(()=>{g(!1),R(!0)},qo);return()=>clearTimeout(C)}},[t,c,r,g,v]);let y=C=>{g(C)};return(0,Be.jsx)(Ht.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:g,duration:h},children:(0,Be.jsx)(He,{className:d("not-prose mb-4",e),onOpenChange:y,open:c,...i,children:n})})}),Jo=(e,t)=>e||t===0?(0,Be.jsx)("Be",{children:"Thinking..."}):t===void 0?(0,Be.jsx)("Be",{children:"Thought for a few seconds"}):(0,Be.jsxs)("Be",{children:["Thought for ",t," seconds"]}),at=(0,_.memo)(({className:e,children:t,...o})=>{let{isStreaming:r,isOpen:s,duration:a}=_o();return(0,Be.jsx)(Oe,{className:d("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(I.BrainIcon,{className:"size-4"}),Jo(r,a),(0,Be.jsx)(I.ChevronDownIcon,{className:d("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),nt=(0,_.memo)(({className:e,children:t,...o})=>(0,Be.jsx)(Fe,{className:d("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,Be.jsx)(Te,{className:"grid gap-2",children:t})}));rt.displayName="Reasoning";at.displayName="ReasoningTrigger";nt.displayName="ReasoningContent";var st=require("react-syntax-highlighter"),Ge=require("react-syntax-highlighter/dist/esm/styles/prism"),Qo=(0,_.createContext)({code:""}),$e=({code:e,language:t,showLineNumbers:o=!1,className:r,children:s,...a})=>(0,Be.jsx)(Qo.Provider,{value:{code:e},children:(0,Be.jsx)("div",{className:d("relative w-full overflow-hidden rounded-md border bg-background text-foreground",r),...a,children:(0,Be.jsxs)("div",{className:"relative",children:[(0,Be.jsx)(st.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:Ge.oneLight,children:e}),(0,Be.jsx)(st.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:Ge.oneDark,children:e}),s&&(0,Be.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:s})]})})});var Ft=({className:e,...t})=>(0,Be.jsx)(He,{className:d("not-prose mb-4 w-full rounded-md border",e),...t}),Xo=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Be.jsxs)(X,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Be.jsx)(I.CircleIcon,{className:"size-4"}),"input-available":(0,Be.jsx)(I.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Be.jsx)(I.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Be.jsx)(I.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Vt=({className:e,type:t,state:o,...r})=>(0,Be.jsxs)(Oe,{className:d("flex w-full items-center justify-between gap-4 Be-3",e),...r,children:[(0,Be.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Be.jsx)(I.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Be.jsx)("span",{className:"font-medium text-sm",children:t}),Xo(o)]}),(0,Be.jsx)(I.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Ut=({className:e,...t})=>(0,Be.jsx)(Fe,{className:d("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}),Gt=({className:e,input:t,...o})=>(0,Be.jsxs)("div",{className:d("space-y-2 overflow-hidden Be-4",e),...o,children:[(0,Be.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Be.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Be.jsx)($e,{code:JSON.stringify(t,null,2),language:"json"})})]}),$t=({className:e,output:t,errorText:o,...r})=>{if(!(t||o))return null;let s=(0,Be.jsx)("div",{children:t});return typeof t=="object"?s=(0,Be.jsx)($e,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(s=(0,Be.jsx)($e,{code:t,language:"json"})),(0,Be.jsxs)("div",{className:d("space-y-2 Be-4",e),...r,children:[(0,Be.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,Be.jsxs)("div",{className:d("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,Be.jsx)("div",{children:o}),s]})]})};var de=V(require("react"));var $=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("rounded-xl border bg-card text-card-foreground shadow",e),...t}));$.displayName="Card";var te=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("flex flex-col space-y-1.5 Be-6",e),...t}));te.displayName="CardHeader";var oe=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("font-semibold leading-none tracking-tight",e),...t}));oe.displayName="CardTitle";var it=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("text-sm text-muted-foreground",e),...t}));it.displayName="CardDescription";var j=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("Be-6 pt-0",e),...t}));j.displayName="CardContent";var Re=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("flex items-center Be-6 pt-0",e),...t}));Re.displayName="CardFooter";var _t=require("date-fns");function jt({taskId:e,polling:t=!0,system:o="payload"}){let[r,s]=(0,_.useState)(null),[a,n]=(0,_.useState)(!1),[i,c]=(0,_.useState)(null),g=async(f=!0)=>{if(e){f&&n(!0);try{let v=await fetch(`/api/tasks/${e}`);if(!v.ok)throw new Error(`Failed to fetch task: ${v.statusText}`);let R=await v.json();s(R)}catch(v){console.error("Error fetching task:",v),c(v instanceof Error?v:new Error("Unknown error occurred"))}finally{f&&n(!1)}}},h=()=>g(!1);return(0,_.useEffect)(()=>{e&&g(!0);let f=null;return e&&t&&(f=setInterval(h,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:r,loading:a,error:i}}var Yo=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"}},Zo=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function qt({data:e}){let{id:t,system:o,fetchLatest:r,taskData:s,error:a}=e||{};if(!t)return null;let n=null,i=!0,c=a,g=r!==void 0?r:!0;if(n=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:r,system:o,fetchLatest:g,taskData:n,error:c}),g){let{task:R,loading:P,error:x}=jt({taskId:t,system:o});n=R,i=P,c=x}else i=!1;let h=Yo(n?.status||"todo"),f=Zo(n?.status||"todo"),v=n?.dateLogged||new Date().toISOString();try{let R=new Date(n?.dateLogged||"");isNaN(R.getTime())||(v=(0,_t.formatDistanceToNow)(R,{addSuffix:!0}))}catch{}return(0,Be.jsxs)($,{className:d("w-full max-w-md shadow-md",c&&"border border-destructive"),children:[(0,Be.jsxs)(te,{className:"pb-2",children:[(0,Be.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Be.jsx)(oe,{className:"text-lg font-semibold",children:i?"Loading...":n?.name||"Task"}),(0,Be.jsx)(X,{className:`${h}`,children:f})]}),n?.project&&(0,Be.jsxs)(it,{className:"text-sm text-gray-500",children:["Project: ",n.project.name]})]}),(0,Be.jsx)(j,{className:"pb-2",children:i?(0,Be.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,Be.jsx)("Be",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Be.jsx)("Be",{className:"text-sm text-foreground",children:n?.description||"......."})}),(0,Be.jsx)(Re,{className:"pt-2 flex items-center justify-between",children:(0,Be.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Be.jsx)(I.Clock,{className:"h-3 w-3 mr-1"}),(0,Be.jsxs)("span",{children:["Created ",v]}),(0,Be.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Be.jsxs)("span",{children:["Task #",t]})]})})]})}function Qt({artefact:e,taskId:t,taskData:o,loading:r=!1,error:s=null}){let a=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=a.dateLogged;try{let i=new Date(a.dateLogged);isNaN(i.getTime())||(n=(0,_t.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,Be.jsxs)($,{className:"w-full max-w-md shadow-md",children:[(0,Be.jsx)(te,{className:"pb-2",children:(0,Be.jsx)("div",{className:"flex justify-between items-start",children:(0,Be.jsx)(oe,{className:"text-lg font-semibold",children:r?"Loading...":a.name})})}),(0,Be.jsx)(j,{className:"pb-2",children:r?(0,Be.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,Be.jsx)("Be",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Be.jsx)("Be",{className:"text-sm text-foreground",children:e})}),(0,Be.jsx)(Re,{className:"pt-2 flex items-center justify-between",children:(0,Be.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Be.jsx)(I.Clock,{className:"h-3 w-3 mr-1"}),(0,Be.jsxs)("span",{children:["Created ",n]}),(0,Be.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Be.jsxs)("span",{children:["Task #",a.id]})]})})]})}var er=e=>e.startsWith("image/")?(0,Be.jsx)(I.Image,{className:"h-4 w-4"}):e.startsWith("text/")?(0,Be.jsx)(I.FileText,{className:"h-4 w-4"}):(0,Be.jsx)(I.File,{className:"h-4 w-4"}),Xt=({message:e,addToolResult:t,status:o,messages:r})=>e.parts.map((s,a)=>{if(s.type==="text")return(0,Be.jsx)(Te,{children:s.text},`${a}`);if(s.type==="file"){let n=s;return(0,Be.jsx)("div",{className:"mb-2 Be-2 bg-background/50 rounded-lg",children:(0,Be.jsxs)("div",{className:"flex items-center gap-2",children:[er(n.mediaType||"application/octet-stream"),(0,Be.jsx)("div",{className:"flex-1 min-w-0",children:(0,Be.jsx)("Be",{className:"text-sm font-medium truncate",children:n.filename||n.url?.split("/").pop()||"File"})}),n.url&&(0,Be.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>window.open(n.url,"_blank"),className:"h-8 w-8 Be-0",children:(0,Be.jsx)(I.Download,{className:"h-4 w-4"})})]})},a)}if(s.type.startsWith("tool-")){let n=s,i=s.type.replace("tool-","");if(i==="task")switch(n.state){case"input-available":return(0,Be.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},a);case"output-available":return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(qt,{data:{id:n.output?.id||n.input?.id,fetchLatest:!1,taskData:n.output||n.input}})},a);case"output-error":return(0,Be.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},a);default:return null}if(s.type==="tool-requestEndpointLogin")return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(et,{toolPart:n,index:a,addToolResult:t??(()=>{})})},a);if(s.type==="tool-authenticate")return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(et,{toolPart:n,index:a,addToolResult:t??(()=>{})})},a);if(s.type==="tool-requestApproval")return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(Dt,{toolPart:n,index:a,addToolResult:t??(()=>{})})},a);if(i==="artefact")switch(n.state){case"input-available":return(0,Be.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},a);case"output-available":return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(Qt,{artefact:n.output?.description||"",taskId:n.output?.id||n.input?.id,taskData:n.output||n.input})},a);case"output-error":return(0,Be.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},a);default:return null}return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsxs)($,{className:"w-full max-w-md",children:[(0,Be.jsx)(te,{children:(0,Be.jsx)(oe,{className:"text-lg",children:i})}),(0,Be.jsxs)(j,{children:[n.state==="input-available"&&(0,Be.jsxs)("Be",{className:"text-sm",children:["Processing ",i,"..."]}),n.state==="output-available"&&(0,Be.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.output,null,2)}),n.state==="output-error"&&(0,Be.jsxs)("Be",{className:"text-sm text-red-500",children:["Error: ",n.errorText]})]})]})},a)}if(s.type.startsWith("data-")){let n=s,i=s.type.replace("data-","");return i==="reference"?(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)($,{className:"w-full",children:(0,Be.jsx)(j,{className:"Be-4",children:(0,Be.jsx)("div",{className:"space-y-2",children:n.data?.references?.map((c,g)=>(0,Be.jsxs)("div",{className:"flex items-center gap-2 Be-2 rounded-md bg-muted/50",children:[(0,Be.jsx)(X,{variant:"outline",children:c.type||"link"}),(0,Be.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Be.jsx)("Be",{className:"text-sm font-medium truncate",children:c.title}),c.description&&(0,Be.jsx)("Be",{className:"text-xs text-muted-foreground truncate",children:c.description})]}),c.url&&(0,Be.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>window.open(c.url,"_blank"),className:"h-8 w-8 Be-0",children:(0,Be.jsx)(I.ExternalLink,{className:"h-4 w-4"})})]},g))})})})},a):i==="menu"?(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsxs)($,{className:"w-full",children:[(0,Be.jsx)(te,{children:(0,Be.jsx)(oe,{className:"text-lg",children:n.data?.title})}),(0,Be.jsx)(j,{children:(0,Be.jsx)("div",{className:"space-y-2",children:n.data?.items?.map((c,g)=>(0,Be.jsx)(z,{variant:"outline",className:"w-full justify-start",onClick:c.action,children:(0,Be.jsxs)("div",{className:"text-left",children:[(0,Be.jsx)("Be",{className:"font-medium",children:c.label}),c.description&&(0,Be.jsx)("Be",{className:"text-xs text-muted-foreground",children:c.description})]})},g))})})]})},a):(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsxs)($,{className:"w-full max-w-md",children:[(0,Be.jsx)(te,{children:(0,Be.jsx)(oe,{className:"text-lg",children:i})}),(0,Be.jsx)(j,{children:(0,Be.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.data,null,2)})})]})},a)}return s.type==="reasoning"?(0,Be.jsxs)(rt,{className:"w-full",isStreaming:o==="streaming"&&a===e.parts.length-1&&e.id===r.at(-1)?.id,children:[(0,Be.jsx)(at,{}),(0,Be.jsx)(nt,{children:s.text})]},`${a}`):s.type==="dynamic-tool"?(0,Be.jsxs)(Ft,{defaultOpen:!0,children:[(0,Be.jsx)(Vt,{type:`tool-${s.toolName}`,state:s.state}),(0,Be.jsxs)(Ut,{children:[(0,Be.jsx)(Gt,{input:s.input}),(0,Be.jsx)($t,{output:s.output,errorText:s.errorText})]})]},`${e.id}-${a}`):(0,Be.jsxs)(Be.Fragment,{children:["Unknown part type: ",s.type]})});var Zt=({className:e,from:t,...o})=>(0,Be.jsx)("div",{className:d("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}),tr=(0,yt.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"}}),eo=({children:e,className:t,variant:o,...r})=>(0,Be.jsx)("div",{className:d(tr({variant:o,className:t})),...r,children:e});function or({messages:e,input:t,isTyping:o=!1,currentSessionTitle:r,capabilities:s,fileUploads:a,isDragOver:n,enableFileUpload:i,onInputChange:c,addToolResult:g,onSendMessage:h,onKeyPress:f,onFileUpload:v,onRemoveFile:R,onDragOver:P,className:x,status:y="ready"}){let C=(0,_.useRef)(null),E=(0,_.useRef)(null),A=(0,_.useRef)(null),[S,q]=(0,_.useState)(!1),[ue,We]=(0,_.useState)({path:[],selectedItems:[],filters:{}});(0,_.useEffect)(()=>{C.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,_.useEffect)(()=>{S&&setTimeout(()=>{C.current?.scrollIntoView({behavior:"smooth"})},100)},[S]);let Ce=()=>Ye(ue),me=()=>{let u=[];return s.forEach(T=>{T.actions&&T.actions.forEach(K=>{u.push({label:K.label,action:()=>ie(K.id,{path:[T],selectedItems:[],filters:{}})})}),T.children&&T.children.forEach(K=>{K.type==="list"&&K.data&&u.push({label:`View ${K.name}`,action:()=>q(!0)})})}),u.slice(0,5)},ie=(u,T)=>{console.log("Capability action:",u,T);let K=`Executing ${u} with context: ${JSON.stringify(T.path.map(Ie=>Ie.name))}`;q(!1)},we=Ye({path:[],selectedItems:[],filters:{}}),w=u=>{v(u.target.files),u.target.files&&(u.target.value="")},Ae=u=>{u.preventDefault(),P(!0)},ge=u=>{u.preventDefault(),P(!1)},Se=u=>{u.preventDefault(),P(!1),v(u.dataTransfer.files)},fe=u=>{if(u===0)return"0 Bytes";let T=1024,K=["Bytes","KB","MB","GB"],Ie=Math.floor(Math.log(u)/Math.log(T));return parseFloat((u/Math.pow(T,Ie)).toFixed(2))+" "+K[Ie]},Me=u=>u.startsWith("image/")?(0,Be.jsx)(I.Image,{className:"h-4 w-4"}):u.startsWith("text/")?(0,Be.jsx)(I.FileText,{className:"h-4 w-4"}):(0,Be.jsx)(I.File,{className:"h-4 w-4"}),Ne={messages:e,currentSessionTitle:r,capabilities:s,currentCapabilityContext:ue,contextualActions:we,getQuickSuggestions:me().map(u=>u.label)},le=()=>{navigator.clipboard.writeText(JSON.stringify(Ne,null,2)),alert("Debug info copied to clipboard")};return(0,Be.jsxs)("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${x||""}`,children:[(0,Be.jsxs)(Xe,{ref:E,className:"flex-1 Be-4 bg-background border-0",onDragOver:Ae,onDragLeave:ge,onDrop:Se,children:[(0,Be.jsxs)("div",{className:d("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Be.jsx)(xe.animate,{children:e.map(u=>(0,Be.jsx)(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Be.jsx)(Zt,{from:u.role,children:(0,Be.jsx)(eo,{variant:"flat",children:Xt({message:u,addToolResult:g??(()=>{}),status:y,messages:e})})},u.id)},u.id))}),S&&(0,Be.jsxs)(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Be.jsx)(Ee,{className:"h-8 w-8",children:(0,Be.jsx)(ze,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Be.jsx)(I.Bot,{className:"h-4 w-4"})})}),(0,Be.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Be.jsx)(At,{capabilities:s,isOpen:S,onToggle:()=>q(!S),onActionSelect:ie,className:"w-full"})})]}),o&&(0,Be.jsxs)(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Be.jsx)(Ee,{className:"h-8 w-8",children:(0,Be.jsx)(ze,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Be.jsx)(I.Bot,{className:"h-4 w-4"})})}),(0,Be.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Be.jsxs)("div",{className:"flex space-x-1",children:[(0,Be.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Be.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Be.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Be.jsx)("div",{ref:C})]}),a.length>0&&(0,Be.jsx)("div",{className:"Be-4 border-t bg-muted/10",children:(0,Be.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(u=>(0,Be.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg Be-2 border",children:[Me(u.file.type),(0,Be.jsx)("span",{className:"text-sm font-medium",children:u.file.name}),(0,Be.jsx)("span",{className:"text-xs text-muted-foreground",children:fe(u.file.size)}),(0,Be.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>R(u.id),className:"h-6 w-6 Be-0",children:(0,Be.jsx)(I.X,{className:"h-4 w-4"})})]},u.id))})}),(0,Be.jsxs)("div",{className:"border rounded-2xl Be-4 bg-muted/20",children:[(0,Be.jsxs)("div",{className:"flex gap-3",children:[(0,Be.jsx)(Je,{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}),i&&(0,Be.jsx)(z,{variant:"outline",size:"icon",onClick:()=>A.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Be.jsx)(I.Paperclip,{className:"h-4 w-4"})}),(0,Be.jsx)(z,{onClick:h,disabled:!t.trim()&&a.length===0||o,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Be.jsx)(I.Send,{className:"h-4 w-4"})})]}),(0,Be.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Be.jsxs)(z,{onClick:()=>q(!S),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Be.jsx)(I.Menu,{className:"h-3 w-3 mr-1"}),S?"Hide":"Show"," Capabilities"]}),(0,Be.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Ce().map((u,T)=>(0,Be.jsx)(z,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>ie(u.id,ue),children:u.label},`context-${u.id}`)),Ce().length===0&&me().map((u,T)=>(0,Be.jsx)(z,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:u.action,children:u.label},`suggestion-${T}`)),(0,Be.jsx)(z,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:le,children:"Debug"})]})]}),i&&(0,Be.jsx)("input",{ref:A,type:"file",multiple:!0,onChange:w,className:"hidden"})]})]})}0&&(module.exports={ChatInterface});
|
|
21
|
+
`,children:"Cancel"})]})]}):null};var Dt=({toolPart:e,index:t,addToolResult:o})=>{let[r,s]=tt.default.useState(!0),[a,n]=tt.default.useState(null),i=()=>{o(e.input?.toolCallId,e.input?.tool,"Approved"),s(!1),n("approve")},c=()=>{o(e.input?.toolCallId,e.input?.tool,"Denied"),s(!1),n("deny")};switch(e.state){case"input-available":return(0,Be.jsxs)("div",{className:"mb-2",children:[(0,Be.jsx)(Lt,{isOpen:r,onApprove:i,onDeny:c,onClose:()=>s(!1),title:e.input?.title||"Approval Required",reason:e.output?.reason||e.input?.reason}),!r&&(0,Be.jsxs)(Be.Fragment,{children:[a==="approve"&&(0,Be.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Be.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,Be.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Be.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Approved"]})}),a==="deny"&&(0,Be.jsx)("div",{className:"flex items-center justify-center mt-3",children:(0,Be.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,Be.jsx)("svg",{className:"h-4 w-4 mr-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,Be.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})}),"Denied"]})})]})]},t);case"output-error":return(0,Be.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",e.errorText]},t);default:return null}};var ot=require("@radix-ui/react-use-controllable-state");var he=V(require("@radix-ui/react-collapsible")),He=he.Root,Oe=he.CollapsibleTrigger,Fe=he.CollapsibleContent;var zt=require("streamdown"),Te=(0,_.memo)(({className:e,...t})=>(0,Be.jsx)(zt.Streamdown,{className:d("size-full [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",e),...t}),(e,t)=>e.children===t.children);Te.displayName="Response";var Ht=(0,_.createContext)(null),_o=()=>{let e=(0,_.useContext)(Ht);if(!e)throw new Error("Reasoning components must be used within Reasoning");return e},qo=1e3,Ko=1e3,rt=(0,_.memo)(({className:e,isStreaming:t=!1,open:o,defaultOpen:r=!0,onOpenChange:s,duration:a,children:n,...i})=>{let[c,g]=(0,ot.useControllableState)({prop:o,defaultProp:r,onChange:s}),[h,f]=(0,ot.useControllableState)({prop:a,defaultProp:0}),[v,R]=(0,_.useState)(!1),[P,x]=(0,_.useState)(null);(0,_.useEffect)(()=>{t?P===null&&x(Date.now()):P!==null&&(f(Math.ceil((Date.now()-P)/Ko)),x(null))},[t,P,f]),(0,_.useEffect)(()=>{if(r&&!t&&c&&!v){let C=setTimeout(()=>{g(!1),R(!0)},qo);return()=>clearTimeout(C)}},[t,c,r,g,v]);let y=C=>{g(C)};return(0,Be.jsx)(Ht.Provider,{value:{isStreaming:t,isOpen:c,setIsOpen:g,duration:h},children:(0,Be.jsx)(He,{className:d("not-prose mb-4",e),onOpenChange:y,open:c,...i,children:n})})}),Jo=(e,t)=>e||t===0?(0,Be.jsx)("Be",{children:"Thinking..."}):t===void 0?(0,Be.jsx)("Be",{children:"Thought for a few seconds"}):(0,Be.jsxs)("Be",{children:["Thought for ",t," seconds"]}),at=(0,_.memo)(({className:e,children:t,...o})=>{let{isStreaming:r,isOpen:s,duration:a}=_o();return(0,Be.jsx)(Oe,{className:d("flex w-full items-center gap-2 text-muted-foreground text-sm transition-colors hover:text-foreground",e),...o,children:t??(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)(I.BrainIcon,{className:"size-4"}),Jo(r,a),(0,Be.jsx)(I.ChevronDownIcon,{className:d("size-4 transition-transform",s?"rotate-180":"rotate-0")})]})})}),nt=(0,_.memo)(({className:e,children:t,...o})=>(0,Be.jsx)(Fe,{className:d("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,Be.jsx)(Te,{className:"grid gap-2",children:t})}));rt.displayName="Reasoning";at.displayName="ReasoningTrigger";nt.displayName="ReasoningContent";var st=require("react-syntax-highlighter"),Ge=require("react-syntax-highlighter/dist/esm/styles/prism"),Qo=(0,_.createContext)({code:""}),$e=({code:e,language:t,showLineNumbers:o=!1,className:r,children:s,...a})=>(0,Be.jsx)(Qo.Provider,{value:{code:e},children:(0,Be.jsx)("div",{className:d("relative max-w-2xl overflow-hidden rounded-md border bg-background text-foreground",r),...a,children:(0,Be.jsxs)("div",{className:"relative",children:[(0,Be.jsx)(st.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:Ge.oneLight,children:e}),(0,Be.jsx)(st.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:Ge.oneDark,children:e}),s&&(0,Be.jsx)("div",{className:"absolute top-2 right-2 flex items-center gap-2",children:s})]})})});var Ft=({className:e,...t})=>(0,Be.jsx)(He,{className:d("not-prose mb-4 w-full",e),...t}),Xo=e=>{let t={"input-streaming":"Pending","input-available":"Running","output-available":"Completed","output-error":"Error"};return(0,Be.jsxs)(X,{className:"gap-1.5 rounded-full text-xs",variant:"secondary",children:[{"input-streaming":(0,Be.jsx)(I.CircleIcon,{className:"size-4"}),"input-available":(0,Be.jsx)(I.ClockIcon,{className:"size-4 animate-pulse"}),"output-available":(0,Be.jsx)(I.CheckCircleIcon,{className:"size-4 text-green-600"}),"output-error":(0,Be.jsx)(I.XCircleIcon,{className:"size-4 text-red-600"})}[e],t[e]]})},Vt=({className:e,type:t,state:o,...r})=>(0,Be.jsxs)(Oe,{className:d("flex w-full items-center justify-between gap-4 Be-3 pl-0 w-2xl",e),...r,children:[(0,Be.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Be.jsx)(I.WrenchIcon,{className:"size-4 text-muted-foreground"}),(0,Be.jsx)("span",{className:"font-medium text-sm",children:t}),Xo(o)]}),(0,Be.jsx)(I.ChevronDownIcon,{className:"size-4 text-muted-foreground transition-transform group-data-[state=open]:rotate-180"})]}),Ut=({className:e,...t})=>(0,Be.jsx)(Fe,{className:d("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}),Gt=({className:e,input:t,...o})=>(0,Be.jsxs)("div",{className:d("space-y-2 overflow-hidden Be-4",e),...o,children:[(0,Be.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:"Parameters"}),(0,Be.jsx)("div",{className:"rounded-md bg-muted/50",children:(0,Be.jsx)($e,{code:JSON.stringify(t,null,2),language:"json"})})]}),$t=({className:e,output:t,errorText:o,...r})=>{if(!(t||o))return null;let s=(0,Be.jsx)("div",{children:t});return typeof t=="object"?s=(0,Be.jsx)($e,{code:JSON.stringify(t,null,2),language:"json"}):typeof t=="string"&&(s=(0,Be.jsx)($e,{code:t,language:"json"})),(0,Be.jsxs)("div",{className:d("space-y-2 Be-4",e),...r,children:[(0,Be.jsx)("h4",{className:"font-medium text-muted-foreground text-xs uppercase tracking-wide",children:o?"Error":"Result"}),(0,Be.jsxs)("div",{className:d("overflow-x-auto rounded-md text-xs [&_table]:w-full",o?"bg-destructive/10 text-destructive":"bg-muted/50 text-foreground"),children:[o&&(0,Be.jsx)("div",{children:o}),s]})]})};var de=V(require("react"));var $=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("rounded-xl border bg-card text-card-foreground shadow",e),...t}));$.displayName="Card";var te=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("flex flex-col space-y-1.5 Be-6",e),...t}));te.displayName="CardHeader";var oe=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("font-semibold leading-none tracking-tight",e),...t}));oe.displayName="CardTitle";var it=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("text-sm text-muted-foreground",e),...t}));it.displayName="CardDescription";var j=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("Be-6 pt-0",e),...t}));j.displayName="CardContent";var Re=de.forwardRef(({className:e,...t},o)=>(0,Be.jsx)("div",{ref:o,className:d("flex items-center Be-6 pt-0",e),...t}));Re.displayName="CardFooter";var _t=require("date-fns");function jt({taskId:e,polling:t=!0,system:o="payload"}){let[r,s]=(0,_.useState)(null),[a,n]=(0,_.useState)(!1),[i,c]=(0,_.useState)(null),g=async(f=!0)=>{if(e){f&&n(!0);try{let v=await fetch(`/api/tasks/${e}`);if(!v.ok)throw new Error(`Failed to fetch task: ${v.statusText}`);let R=await v.json();s(R)}catch(v){console.error("Error fetching task:",v),c(v instanceof Error?v:new Error("Unknown error occurred"))}finally{f&&n(!1)}}},h=()=>g(!1);return(0,_.useEffect)(()=>{e&&g(!0);let f=null;return e&&t&&(f=setInterval(h,5e3)),()=>{f&&clearInterval(f)}},[e,t]),{task:r,loading:a,error:i}}var Yo=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"}},Zo=e=>{switch(e){case"inProgress":return"In Progress";default:return e.charAt(0).toUpperCase()+e.slice(1)}};function qt({data:e}){let{id:t,system:o,fetchLatest:r,taskData:s,error:a}=e||{};if(!t)return null;let n=null,i=!0,c=a,g=r!==void 0?r:!0;if(n=s||{id:t,name:"Loading...",description:"",status:"todo",dateLogged:new Date().toISOString(),project:void 0},console.log("ChatCardTask",{data:e,id:t,initialFetchLatest:r,system:o,fetchLatest:g,taskData:n,error:c}),g){let{task:R,loading:P,error:x}=jt({taskId:t,system:o});n=R,i=P,c=x}else i=!1;let h=Yo(n?.status||"todo"),f=Zo(n?.status||"todo"),v=n?.dateLogged||new Date().toISOString();try{let R=new Date(n?.dateLogged||"");isNaN(R.getTime())||(v=(0,_t.formatDistanceToNow)(R,{addSuffix:!0}))}catch{}return(0,Be.jsxs)($,{className:d("w-full max-w-md shadow-md",c&&"border border-destructive"),children:[(0,Be.jsxs)(te,{className:"pb-2",children:[(0,Be.jsxs)("div",{className:"flex justify-between items-start",children:[(0,Be.jsx)(oe,{className:"text-lg font-semibold",children:i?"Loading...":n?.name||"Task"}),(0,Be.jsx)(X,{className:`${h}`,children:f})]}),n?.project&&(0,Be.jsxs)(it,{className:"text-sm text-gray-500",children:["Project: ",n.project.name]})]}),(0,Be.jsx)(j,{className:"pb-2",children:i?(0,Be.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):c?(0,Be.jsx)("Be",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Be.jsx)("Be",{className:"text-sm text-foreground",children:n?.description||"......."})}),(0,Be.jsx)(Re,{className:"pt-2 flex items-center justify-between",children:(0,Be.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Be.jsx)(I.Clock,{className:"h-3 w-3 mr-1"}),(0,Be.jsxs)("span",{children:["Created ",v]}),(0,Be.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Be.jsxs)("span",{children:["Task #",t]})]})})]})}function Qt({artefact:e,taskId:t,taskData:o,loading:r=!1,error:s=null}){let a=o||{id:t,name:"Loading...",description:"",status:"done",dateLogged:new Date().toISOString(),project:{id:-1,name:""}},n=a.dateLogged;try{let i=new Date(a.dateLogged);isNaN(i.getTime())||(n=(0,_t.formatDistanceToNow)(i,{addSuffix:!0}))}catch{}return(0,Be.jsxs)($,{className:"w-full max-w-md shadow-md",children:[(0,Be.jsx)(te,{className:"pb-2",children:(0,Be.jsx)("div",{className:"flex justify-between items-start",children:(0,Be.jsx)(oe,{className:"text-lg font-semibold",children:r?"Loading...":a.name})})}),(0,Be.jsx)(j,{className:"pb-2",children:r?(0,Be.jsx)("div",{className:"animate-pulse h-4 bg-gray-200 rounded w-3/4 mb-2"}):s?(0,Be.jsx)("Be",{className:"text-sm text-red-500",children:"Error loading task details"}):(0,Be.jsx)("Be",{className:"text-sm text-foreground",children:e})}),(0,Be.jsx)(Re,{className:"pt-2 flex items-center justify-between",children:(0,Be.jsxs)("div",{className:"flex items-center text-xs text-gray-500",children:[(0,Be.jsx)(I.Clock,{className:"h-3 w-3 mr-1"}),(0,Be.jsxs)("span",{children:["Created ",n]}),(0,Be.jsx)("span",{className:"mx-2",children:"\u2022"}),(0,Be.jsxs)("span",{children:["Task #",a.id]})]})})]})}var er=e=>e.startsWith("image/")?(0,Be.jsx)(I.Image,{className:"h-4 w-4"}):e.startsWith("text/")?(0,Be.jsx)(I.FileText,{className:"h-4 w-4"}):(0,Be.jsx)(I.File,{className:"h-4 w-4"}),Xt=({message:e,addToolResult:t,status:o,messages:r})=>e.parts.map((s,a)=>{if(s.type==="text")return(0,Be.jsx)(Te,{children:s.text},`${a}`);if(s.type==="file"){let n=s;return(0,Be.jsx)("div",{className:"mb-2 Be-2 bg-background/50 rounded-lg",children:(0,Be.jsxs)("div",{className:"flex items-center gap-2",children:[er(n.mediaType||"application/octet-stream"),(0,Be.jsx)("div",{className:"flex-1 min-w-0",children:(0,Be.jsx)("Be",{className:"text-sm font-medium truncate",children:n.filename||n.url?.split("/").pop()||"File"})}),n.url&&(0,Be.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>window.open(n.url,"_blank"),className:"h-8 w-8 Be-0",children:(0,Be.jsx)(I.Download,{className:"h-4 w-4"})})]})},a)}if(s.type.startsWith("tool-")){let n=s,i=s.type.replace("tool-","");if(i==="task")switch(n.state){case"input-available":return(0,Be.jsx)("div",{className:"text-sm opacity-70",children:"Loading task..."},a);case"output-available":return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(qt,{data:{id:n.output?.id||n.input?.id,fetchLatest:!1,taskData:n.output||n.input}})},a);case"output-error":return(0,Be.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},a);default:return null}if(s.type==="tool-requestEndpointLogin")return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(et,{toolPart:n,index:a,addToolResult:t??(()=>{})})},a);if(s.type==="tool-authenticate")return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(et,{toolPart:n,index:a,addToolResult:t??(()=>{})})},a);if(s.type==="tool-requestApproval")return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(Dt,{toolPart:n,index:a,addToolResult:t??(()=>{})})},a);if(i==="artefact")switch(n.state){case"input-available":return(0,Be.jsx)("div",{className:"text-sm opacity-70",children:"Loading artefact..."},a);case"output-available":return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)(Qt,{artefact:n.output?.description||"",taskId:n.output?.id||n.input?.id,taskData:n.output||n.input})},a);case"output-error":return(0,Be.jsxs)("div",{className:"text-sm text-red-500",children:["Error: ",n.errorText]},a);default:return null}return(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsxs)($,{className:"w-full max-w-md",children:[(0,Be.jsx)(te,{children:(0,Be.jsx)(oe,{className:"text-lg",children:i})}),(0,Be.jsxs)(j,{children:[n.state==="input-available"&&(0,Be.jsxs)("Be",{className:"text-sm",children:["Processing ",i,"..."]}),n.state==="output-available"&&(0,Be.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.output,null,2)}),n.state==="output-error"&&(0,Be.jsxs)("Be",{className:"text-sm text-red-500",children:["Error: ",n.errorText]})]})]})},a)}if(s.type.startsWith("data-")){let n=s,i=s.type.replace("data-","");return i==="reference"?(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsx)($,{className:"w-full",children:(0,Be.jsx)(j,{className:"Be-4",children:(0,Be.jsx)("div",{className:"space-y-2",children:n.data?.references?.map((c,g)=>(0,Be.jsxs)("div",{className:"flex items-center gap-2 Be-2 rounded-md bg-muted/50",children:[(0,Be.jsx)(X,{variant:"outline",children:c.type||"link"}),(0,Be.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,Be.jsx)("Be",{className:"text-sm font-medium truncate",children:c.title}),c.description&&(0,Be.jsx)("Be",{className:"text-xs text-muted-foreground truncate",children:c.description})]}),c.url&&(0,Be.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>window.open(c.url,"_blank"),className:"h-8 w-8 Be-0",children:(0,Be.jsx)(I.ExternalLink,{className:"h-4 w-4"})})]},g))})})})},a):i==="menu"?(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsxs)($,{className:"w-full",children:[(0,Be.jsx)(te,{children:(0,Be.jsx)(oe,{className:"text-lg",children:n.data?.title})}),(0,Be.jsx)(j,{children:(0,Be.jsx)("div",{className:"space-y-2",children:n.data?.items?.map((c,g)=>(0,Be.jsx)(z,{variant:"outline",className:"w-full justify-start",onClick:c.action,children:(0,Be.jsxs)("div",{className:"text-left",children:[(0,Be.jsx)("Be",{className:"font-medium",children:c.label}),c.description&&(0,Be.jsx)("Be",{className:"text-xs text-muted-foreground",children:c.description})]})},g))})})]})},a):(0,Be.jsx)("div",{className:"mb-2",children:(0,Be.jsxs)($,{className:"w-full max-w-md",children:[(0,Be.jsx)(te,{children:(0,Be.jsx)(oe,{className:"text-lg",children:i})}),(0,Be.jsx)(j,{children:(0,Be.jsx)("pre",{className:"text-sm",children:JSON.stringify(n.data,null,2)})})]})},a)}return s.type==="reasoning"?(0,Be.jsxs)(rt,{className:"w-full",isStreaming:o==="streaming"&&a===e.parts.length-1&&e.id===r.at(-1)?.id,children:[(0,Be.jsx)(at,{}),(0,Be.jsx)(nt,{children:s.text})]},`${a}`):s.type==="dynamic-tool"?(0,Be.jsxs)(Ft,{defaultOpen:s.state!=="output-available",children:[(0,Be.jsx)(Vt,{type:`tool-${s.toolName}`,state:s.state}),(0,Be.jsxs)(Ut,{children:[(0,Be.jsx)(Gt,{input:s.input}),(0,Be.jsx)($t,{output:s.output,errorText:s.errorText})]})]},`${e.id}-${a}`):(0,Be.jsxs)(Be.Fragment,{children:["Unknown part type: ",s.type]})});var Zt=({className:e,from:t,...o})=>(0,Be.jsx)("div",{className:d("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}),tr=(0,yt.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"}}),eo=({children:e,className:t,variant:o,...r})=>(0,Be.jsx)("div",{className:d(tr({variant:o,className:t})),...r,children:e});function or({messages:e,input:t,isTyping:o=!1,currentSessionTitle:r,capabilities:s,fileUploads:a,isDragOver:n,enableFileUpload:i,onInputChange:c,addToolResult:g,onSendMessage:h,onKeyPress:f,onFileUpload:v,onRemoveFile:R,onDragOver:P,className:x,status:y="ready"}){let C=(0,_.useRef)(null),E=(0,_.useRef)(null),A=(0,_.useRef)(null),[S,q]=(0,_.useState)(!1),[ue,We]=(0,_.useState)({path:[],selectedItems:[],filters:{}});(0,_.useEffect)(()=>{C.current?.scrollIntoView({behavior:"smooth"})},[e]),(0,_.useEffect)(()=>{S&&setTimeout(()=>{C.current?.scrollIntoView({behavior:"smooth"})},100)},[S]);let Ce=()=>Ye(ue),me=()=>{let u=[];return s.forEach(T=>{T.actions&&T.actions.forEach(K=>{u.push({label:K.label,action:()=>ie(K.id,{path:[T],selectedItems:[],filters:{}})})}),T.children&&T.children.forEach(K=>{K.type==="list"&&K.data&&u.push({label:`View ${K.name}`,action:()=>q(!0)})})}),u.slice(0,5)},ie=(u,T)=>{console.log("Capability action:",u,T);let K=`Executing ${u} with context: ${JSON.stringify(T.path.map(Ie=>Ie.name))}`;q(!1)},we=Ye({path:[],selectedItems:[],filters:{}}),w=u=>{v(u.target.files),u.target.files&&(u.target.value="")},Ae=u=>{u.preventDefault(),P(!0)},ge=u=>{u.preventDefault(),P(!1)},Se=u=>{u.preventDefault(),P(!1),v(u.dataTransfer.files)},fe=u=>{if(u===0)return"0 Bytes";let T=1024,K=["Bytes","KB","MB","GB"],Ie=Math.floor(Math.log(u)/Math.log(T));return parseFloat((u/Math.pow(T,Ie)).toFixed(2))+" "+K[Ie]},Me=u=>u.startsWith("image/")?(0,Be.jsx)(I.Image,{className:"h-4 w-4"}):u.startsWith("text/")?(0,Be.jsx)(I.FileText,{className:"h-4 w-4"}):(0,Be.jsx)(I.File,{className:"h-4 w-4"}),Ne={messages:e,currentSessionTitle:r,capabilities:s,currentCapabilityContext:ue,contextualActions:we,getQuickSuggestions:me().map(u=>u.label)},le=()=>{navigator.clipboard.writeText(JSON.stringify(Ne,null,2)),alert("Debug info copied to clipboard")};return(0,Be.jsxs)("div",{className:`h-full flex flex-col relative size-full shadow-sm max-w-4xl mx-auto ${x||""}`,children:[(0,Be.jsxs)(Xe,{ref:E,className:"flex-1 Be-4 bg-background border-0",onDragOver:Ae,onDragLeave:ge,onDrop:Se,children:[(0,Be.jsxs)("div",{className:d("space-y-4",n&&"ring-2 ring-primary ring-offset-2 bg-primary/5"),children:[(0,Be.jsx)(xe.animate,{children:e.map(u=>(0,Be.jsx)(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},children:(0,Be.jsx)(Zt,{from:u.role,children:(0,Be.jsx)(eo,{variant:"flat",children:Xt({message:u,addToolResult:g??(()=>{}),status:y,messages:e})})},u.id)},u.id))}),S&&(0,Be.jsxs)(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},className:"flex gap-3",children:[(0,Be.jsx)(Ee,{className:"h-8 w-8",children:(0,Be.jsx)(ze,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Be.jsx)(I.Bot,{className:"h-4 w-4"})})}),(0,Be.jsx)("div",{className:"flex-1 bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Be.jsx)(At,{capabilities:s,isOpen:S,onToggle:()=>q(!S),onActionSelect:ie,className:"w-full"})})]}),o&&(0,Be.jsxs)(xe.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"flex gap-3",children:[(0,Be.jsx)(Ee,{className:"h-8 w-8",children:(0,Be.jsx)(ze,{className:"bg-gradient-to-br from-purple-600 to-blue-600 text-white",children:(0,Be.jsx)(I.Bot,{className:"h-4 w-4"})})}),(0,Be.jsx)("div",{className:"bg-muted rounded-2xl px-4 py-3 shadow-sm",children:(0,Be.jsxs)("div",{className:"flex space-x-1",children:[(0,Be.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce"}),(0,Be.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.1s"}}),(0,Be.jsx)("div",{className:"w-2 h-2 bg-muted-foreground/50 rounded-full animate-bounce",style:{animationDelay:"0.2s"}})]})})]})]}),(0,Be.jsx)("div",{ref:C})]}),a.length>0&&(0,Be.jsx)("div",{className:"Be-4 border-t bg-muted/10",children:(0,Be.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(u=>(0,Be.jsxs)("div",{className:"flex items-center gap-2 bg-background rounded-lg Be-2 border",children:[Me(u.file.type),(0,Be.jsx)("span",{className:"text-sm font-medium",children:u.file.name}),(0,Be.jsx)("span",{className:"text-xs text-muted-foreground",children:fe(u.file.size)}),(0,Be.jsx)(z,{variant:"ghost",size:"sm",onClick:()=>R(u.id),className:"h-6 w-6 Be-0",children:(0,Be.jsx)(I.X,{className:"h-4 w-4"})})]},u.id))})}),(0,Be.jsxs)("div",{className:"border rounded-2xl Be-4 bg-muted/20",children:[(0,Be.jsxs)("div",{className:"flex gap-3",children:[(0,Be.jsx)(Je,{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}),i&&(0,Be.jsx)(z,{variant:"outline",size:"icon",onClick:()=>A.current?.click(),className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Be.jsx)(I.Paperclip,{className:"h-4 w-4"})}),(0,Be.jsx)(z,{onClick:h,disabled:!t.trim()&&a.length===0||o,size:"icon",className:"rounded-2xl h-10 w-10 shadow-sm",children:(0,Be.jsx)(I.Send,{className:"h-4 w-4"})})]}),(0,Be.jsxs)("div",{className:"flex items-center gap-3 mt-3",children:[(0,Be.jsxs)(z,{onClick:()=>q(!S),variant:"outline",size:"sm",className:"rounded-full text-xs flex-shrink-0",children:[(0,Be.jsx)(I.Menu,{className:"h-3 w-3 mr-1"}),S?"Hide":"Show"," Capabilities"]}),(0,Be.jsxs)("div",{className:"flex flex-wrap gap-2 overflow-hidden",children:[Ce().map((u,T)=>(0,Be.jsx)(z,{variant:"default",size:"sm",className:"rounded-full text-xs bg-accent hover:bg-accent/80",onClick:()=>ie(u.id,ue),children:u.label},`context-${u.id}`)),Ce().length===0&&me().map((u,T)=>(0,Be.jsx)(z,{variant:"outline",size:"sm",className:"rounded-full text-xs",onClick:u.action,children:u.label},`suggestion-${T}`)),(0,Be.jsx)(z,{variant:"outline",size:"sm",className:"rounded-full text-xs ml-auto",onClick:le,children:"Debug"})]})]}),i&&(0,Be.jsx)("input",{ref:A,type:"file",multiple:!0,onChange:w,className:"hidden"})]})]})}0&&(module.exports={ChatInterface});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../chunk-
|
|
1
|
+
import{a}from"../../chunk-DEVPAZSJ.mjs";import"../../chunk-QADUAIFH.mjs";import"../../chunk-EH3PJU6C.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-Q2DPE66H.mjs";import"../../chunk-FT3AE7L2.mjs";import"../../chunk-YNCJATT7.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-YEKQJ4YC.mjs";export{a as ChatInterface};
|