@lovelybunch/api 1.0.75-alpha.12 → 1.0.75-alpha.14
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/lib/mail/mail-runner.d.ts +30 -0
- package/dist/lib/mail/mail-runner.js +108 -3
- package/dist/lib/storage/file-storage.js +2 -7
- package/dist/routes/api/v1/mail/index.js +4 -1
- package/dist/routes/api/v1/mail/route.d.ts +42 -0
- package/dist/routes/api/v1/mail/route.js +78 -0
- package/dist/routes/api/v1/slack/route.d.ts +6 -6
- package/dist/routes/api/v1/tasks/[id]/route.d.ts +2 -236
- package/dist/routes/api/v1/tasks/route.d.ts +2 -236
- package/dist/routes/api/v1/tasks/route.js +2 -8
- package/dist/server-with-static.js +2 -0
- package/package.json +4 -4
- package/static/assets/{ActivityPage-nSSbSFAB.js → ActivityPage-Ch44od-j.js} +1 -1
- package/static/assets/{ApiKeysSettingsPage-xrhhroQ_.js → ApiKeysSettingsPage-DuT2DLgr.js} +2 -2
- package/static/assets/{ArchitectureEditPage-CHFEQNgk.js → ArchitectureEditPage-DvJkcnEG.js} +1 -1
- package/static/assets/{ArchitecturePage-EudLa-GY.js → ArchitecturePage-DqSclgRT.js} +1 -1
- package/static/assets/{AuthSettingsPage-C3YTYgj_.js → AuthSettingsPage-yM2zFEcv.js} +2 -2
- package/static/assets/{CallbackPage-VI4m1EWU.js → CallbackPage-Bytr8RS8.js} +1 -1
- package/static/assets/{CodePage-CcH6EB2S.js → CodePage-BlGPi7uk.js} +1 -1
- package/static/assets/{CollapsibleSection-4LvowJQN.js → CollapsibleSection-irzuq21b.js} +1 -1
- package/static/assets/{DashboardPage-Dj2GNTQg.js → DashboardPage-DdA0uFZr.js} +1 -1
- package/static/assets/{GitPage-E9px87JY.js → GitPage-Cl_rMV7q.js} +1 -1
- package/static/assets/{GitSettingsPage-BepF5Dpg.js → GitSettingsPage-B6bQRTLV.js} +1 -1
- package/static/assets/{IdentityPage-Ccarv5Tz.js → IdentityPage-CTsJJ_nR.js} +1 -1
- package/static/assets/{ImplementationStepsEditor-BPeqMfAd.js → ImplementationStepsEditor-D1q30m-M.js} +2 -2
- package/static/assets/{IntegrationsSettingsPage-Dp3FRWNn.js → IntegrationsSettingsPage-au7RbHgk.js} +1 -1
- package/static/assets/{JobDetailPage-DOJKC2Oq.js → JobDetailPage-CDRH2EOg.js} +1 -1
- package/static/assets/KnowledgeDetailPage-DpvktyWP.js +1 -0
- package/static/assets/{KnowledgeEditPage-D7gBI6r-.js → KnowledgeEditPage-bHrMagf9.js} +1 -1
- package/static/assets/KnowledgePage-CHu-yTF2.js +3 -0
- package/static/assets/{LoginPage-nYfkZp1m.js → LoginPage-Dxep5Whg.js} +1 -1
- package/static/assets/MailInboxPage-3enQ9yud.js +1 -0
- package/static/assets/MailProcessingModal-BN-hk7rN.js +6 -0
- package/static/assets/MailReadPage-Dg6oDlFh.js +1 -0
- package/static/assets/{MailSentPage-BqtUkhvw.js → MailSentPage-Dig5IXdR.js} +1 -1
- package/static/assets/McpSettingsPage-CNwqGqLg.js +1 -0
- package/static/assets/{NewKnowledgePage-BsiP9u8K.js → NewKnowledgePage-Czxn4P1j.js} +1 -1
- package/static/assets/{NewSkillPage-BuwLNwdi.js → NewSkillPage-CqaO2xNS.js} +1 -1
- package/static/assets/{NewTaskPage-DVh5Xv1O.js → NewTaskPage-CYITUYtu.js} +2 -2
- package/static/assets/NotFoundPage-BEQ3ZHqV.js +6 -0
- package/static/assets/{NotificationsSettingsPage-BbDASNoh.js → NotificationsSettingsPage-HuOKal9l.js} +1 -1
- package/static/assets/{ProjectEditPage-DdCvF5RR.js → ProjectEditPage-CeHWqhRX.js} +1 -1
- package/static/assets/{ProjectPage-2ujqpmN5.js → ProjectPage-YTFg8Fkd.js} +1 -1
- package/static/assets/{PromptsSettingsPage-xmsIGnw7.js → PromptsSettingsPage-DPTo5b4l.js} +1 -1
- package/static/assets/{ResourceDetailPage--4tTrZYy.js → ResourceDetailPage-CA_ZCk6v.js} +1 -1
- package/static/assets/{ResourcesPage-Nrgt2hCS.js → ResourcesPage-6kcr9x0O.js} +1 -1
- package/static/assets/RoleEditPage-CULuINfL.js +13 -0
- package/static/assets/{RolePage-hS7J_Bhy.js → RolePage-BhJl9l-G.js} +1 -1
- package/static/assets/{RulesSettingsPage-D4K8SBOu.js → RulesSettingsPage-CYhp9PHk.js} +3 -3
- package/static/assets/SchedulePage-vUZaPVX6.js +4 -0
- package/static/assets/{SkillDetailPage-DXtASGaY.js → SkillDetailPage-BT1Gp3Hh.js} +1 -1
- package/static/assets/{SkillEditPage-D75sp5rI.js → SkillEditPage-CV2BMeF_.js} +1 -1
- package/static/assets/{SkillsPage-CsutZlkM.js → SkillsPage-fT1CoBCE.js} +2 -2
- package/static/assets/{SkillsSettingsPage-B8z_IMlS.js → SkillsSettingsPage-TiwaPPcd.js} +1 -1
- package/static/assets/{SourceInput-DkQR44OP.js → SourceInput-B790vfwY.js} +1 -1
- package/static/assets/{TagInput-BkkvY_kU.js → TagInput-Btfjq6aa.js} +1 -1
- package/static/assets/TaskDetailPage-BMGupUYM.js +16 -0
- package/static/assets/{TaskEditPage-CnKiBPvU.js → TaskEditPage-CQz9UIZL.js} +1 -1
- package/static/assets/TasksPage-NbDKSkOe.js +17 -0
- package/static/assets/{TerminalPage-DIXOrK6a.js → TerminalPage-CQLCoRdq.js} +1 -1
- package/static/assets/{TerminalSessionPage-Bu0_HyWE.js → TerminalSessionPage-doL1BiJi.js} +1 -1
- package/static/assets/{UserPreferencesPage-_ZVEA1Ec.js → UserPreferencesPage-D2CiwL2m.js} +1 -1
- package/static/assets/UserSettingsPage-iSTGwM80.js +1 -0
- package/static/assets/{UtilitiesPage-D4Ae45jX.js → UtilitiesPage-B-ZW4kdp.js} +1 -1
- package/static/assets/{alert-oIIrVTSO.js → alert-15F3-9XX.js} +1 -1
- package/static/assets/{arrow-down-Bzd7RaRH.js → arrow-down-BrqEvvfv.js} +1 -1
- package/static/assets/{arrow-left-BjR0fDgf.js → arrow-left-CaqvCoIB.js} +1 -1
- package/static/assets/{arrow-up-C7p7WCEm.js → arrow-up-DNzaGmlT.js} +1 -1
- package/static/assets/arrow-up-down-DCe7-ihF.js +6 -0
- package/static/assets/{badge-C2DkFMMB.js → badge-BnmevczT.js} +1 -1
- package/static/assets/{browser-modal-C6te-uYZ.js → browser-modal-ChaWEpHZ.js} +1 -1
- package/static/assets/{card-WnET8BI8.js → card-NkV5eOu8.js} +1 -1
- package/static/assets/{chevron-left-BIRokVSR.js → chevron-left-Blz556B2.js} +1 -1
- package/static/assets/{chevron-up-Cn_oyEAo.js → chevron-up-rbFu97ce.js} +1 -1
- package/static/assets/{chevrons-up-CupaYlEL.js → chevrons-up-BQMlE7rT.js} +1 -1
- package/static/assets/{circle-alert-aIhIWzZ9.js → circle-alert-B_3aezfy.js} +1 -1
- package/static/assets/{circle-check-Cji8oWtr.js → circle-check-Di9E8LZ0.js} +1 -1
- package/static/assets/{circle-check-big-CfzDBM2L.js → circle-check-big-DeInZUEL.js} +1 -1
- package/static/assets/{circle-play-BAAWTmz3.js → circle-play-_KPAQa5u.js} +1 -1
- package/static/assets/{circle-x-DUrreDIn.js → circle-x-Dqvz_3qq.js} +1 -1
- package/static/assets/{clipboard-BM4PIYFM.js → clipboard-CbMUHSIJ.js} +1 -1
- package/static/assets/{clock-PqCucnPP.js → clock-DYK-k9QO.js} +1 -1
- package/static/assets/{download-BfRAPZa0.js → download-DvfDST0e.js} +1 -1
- package/static/assets/{external-link-BHVp3obJ.js → external-link-4402xHJm.js} +1 -1
- package/static/assets/{eye-DSRHxLqT.js → eye-C96SnuaK.js} +1 -1
- package/static/assets/{folder-git-2-C2qrNCQi.js → folder-git-2-DM9e4LLF.js} +1 -1
- package/static/assets/index-DIPJXXxG.css +2 -0
- package/static/assets/{index-Cv-tURje.js → index-SVcL57hQ.js} +98 -98
- package/static/assets/{info-yTHl9iJb.js → info-C4HFkLJI.js} +1 -1
- package/static/assets/label-MGLxVQcy.js +1 -0
- package/static/assets/{markdown-editor-CKaviYH9.js → markdown-editor-8DjKwEtI.js} +1 -1
- package/static/assets/{message-square-D-mJ-M1p.js → message-square-C3VNiI6M.js} +1 -1
- package/static/assets/{paperclip-BSIzwgES.js → paperclip-o6t1e21X.js} +1 -1
- package/static/assets/{pause-DJ-9PRz9.js → pause-pAcTJVOC.js} +1 -1
- package/static/assets/{play-WwrfRXB7.js → play-Dn69nfRB.js} +1 -1
- package/static/assets/{radio-group-Cahzon6Q.js → radio-group-C_JhFin5.js} +1 -1
- package/static/assets/{refresh-cw-DNc78_Y9.js → refresh-cw-oOjEruv4.js} +1 -1
- package/static/assets/{search-k0E_myGY.js → search-Ck3r4Ru-.js} +1 -1
- package/static/assets/{select-DXmoGuE-.js → select-DY8bp_yH.js} +1 -1
- package/static/assets/{switch-D_BwNkIO.js → switch-CyhPMHQO.js} +1 -1
- package/static/assets/{tabs-Bc7iwFOR.js → tabs-Cjt4N6XC.js} +1 -1
- package/static/assets/{tag-C0GUie9u.js → tag-CajsrbmJ.js} +1 -1
- package/static/assets/{terminal-preview-COHnoVSQ.js → terminal-preview-DkoSzVhy.js} +1 -1
- package/static/assets/{use-terminal-Cnylz5l4.js → use-terminal-CJMIUQKK.js} +1 -1
- package/static/assets/{video-BC93G8Yl.js → video-Db8h41sP.js} +1 -1
- package/static/assets/{zap-Bf22dXda.js → zap-BQyXK_jX.js} +1 -1
- package/static/index.html +2 -2
- package/static/assets/KnowledgeDetailPage-BT0czLqw.js +0 -1
- package/static/assets/KnowledgePage-CcfftMdn.js +0 -8
- package/static/assets/MailInboxPage-DvD2sH0g.js +0 -1
- package/static/assets/MailReadPage-CZ9stBHd.js +0 -1
- package/static/assets/McpSettingsPage-CrNaaXtj.js +0 -1
- package/static/assets/RoleEditPage-D8XSVw9S.js +0 -13
- package/static/assets/SchedulePage-BiJmkZ3Q.js +0 -4
- package/static/assets/TaskDetailPage-Bh3Cb6ce.js +0 -1
- package/static/assets/TasksPage-3UvOASrt.js +0 -17
- package/static/assets/UserSettingsPage-hOWbcJ8X.js +0 -1
- package/static/assets/index-CkH7-cOr.css +0 -2
- package/static/assets/label-DjRbZW_E.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{E as R,u as U,a as H,r as c,A,j as e,B as h,L as p,I as O,X as V,
|
|
1
|
+
import{E as R,u as U,a as H,r as c,A,j as e,B as h,L as p,I as O,X as V,a2 as _}from"./index-SVcL57hQ.js";import{L as j}from"./label-MGLxVQcy.js";import{S as D,a as L,b as F,c as I,d as r}from"./select-DY8bp_yH.js";import{C as f,b as $,a as v,c as q,d as J}from"./card-NkV5eOu8.js";import{M as K}from"./markdown-editor-8DjKwEtI.js";import{C as W}from"./CollapsibleSection-irzuq21b.js";import{I as X,L as G}from"./ImplementationStepsEditor-D1q30m-M.js";import{T as Q}from"./TagInput-Btfjq6aa.js";import{A as N}from"./arrow-left-CaqvCoIB.js";import"./chevron-up-rbFu97ce.js";import"./badge-BnmevczT.js";function de(){const{id:i}=R(),P=U(),{toast:y}=H(),[z,S]=c.useState(!0),[u,k]=c.useState(!1),[C,w]=c.useState(null),[n,o]=c.useState({title:"",description:"",priority:"medium",status:"draft",author:{id:"current-user",name:"Current User",email:"user@example.com"}}),[m,b]=c.useState([]),[E,T]=c.useState([]);c.useEffect(()=>{i&&B()},[i]);const B=async()=>{try{S(!0);const t=await fetch(`${A}/api/v1/tasks/${i}`),s=await t.json();if(s.success||s.data||t.ok){const a=s.data||s;o({title:a.title||a.intent||"",description:a.content||"",priority:a.metadata?.priority||"medium",status:a.status||"draft",author:{id:a.author?.id||"current-user",name:a.author?.name||"Current User",email:a.author?.email||"user@example.com"}});const g=Array.isArray(a.planSteps)?a.planSteps:[];b(g.map((d,x)=>({id:d.id||`step-${x+1}`,description:d.description||"",status:d.status||"pending"}))),T(a.metadata?.tags||[])}else w(s.error?.message||"Failed to fetch task")}catch(t){w(t instanceof Error?t.message:"An error occurred")}finally{S(!1)}},M=async t=>{t.preventDefault(),k(!0);try{const s=m.map(l=>({id:l.id,description:l.description.trim(),status:l.status})).filter(l=>l.description.length>0),a=E.map(l=>l.trim()).filter(l=>l.length>0),g={title:n.title,status:n.status,planSteps:s,metadata:{priority:n.priority,tags:a},content:n.description},d=await fetch(`${A}/api/v1/tasks/${i}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(g)}),x=await d.json();if(x.success||d.ok)y({title:"Success",description:"Task updated successfully."}),P(`/tasks/${i}`);else throw new Error(x.error?.message||"Failed to update task")}catch(s){y({title:"Error",description:`Failed to update task: ${s instanceof Error?s.message:"An error occurred"}`,variant:"destructive"})}finally{k(!1)}};return z?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Edit Task"}),e.jsx("p",{className:"text-muted-foreground",children:"Loading task data..."})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(h,{variant:"ghost",size:"sm",asChild:!0,className:"px-2 hover:bg-transparent",children:e.jsx(p,{to:`/tasks/${i}`,className:"flex items-center text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(N,{className:"h-4 w-4"})})})})]}),e.jsxs(f,{children:[e.jsx($,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"h-6 bg-muted rounded w-1/2 animate-pulse"}),e.jsx("div",{className:"h-4 bg-muted rounded w-3/4 animate-pulse"})]})}),e.jsx(v,{children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"h-10 bg-muted rounded animate-pulse"}),e.jsx("div",{className:"h-64 bg-muted rounded animate-pulse"})]})})]})]}):C?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{children:e.jsx("h3",{className:"text-lg font-semibold text-destructive",children:"Error"})}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(h,{variant:"ghost",size:"sm",asChild:!0,className:"px-2 hover:bg-transparent",children:e.jsx(p,{to:"/tasks",className:"flex items-center text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(N,{className:"h-4 w-4"})})})})]}),e.jsx(f,{children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"text-center",children:[e.jsx("h3",{className:"text-lg font-semibold text-destructive",children:"Error"}),e.jsx("p",{className:"text-muted-foreground mt-2",children:C})]})})})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Edit Task"}),e.jsxs("p",{className:"text-muted-foreground",children:["Editing ",i]})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(h,{variant:"ghost",size:"sm",asChild:!0,children:e.jsx(p,{to:`/tasks/${i}`,className:"flex items-center gap-1 text-muted-foreground hover:text-foreground transition-colors",children:e.jsx(N,{className:"h-4 w-4"})})})})]}),e.jsx("form",{onSubmit:M,children:e.jsxs(f,{children:[e.jsxs($,{children:[e.jsx(q,{children:"Task Details"}),e.jsx(J,{children:"Update the information for your task"})]}),e.jsxs(v,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(j,{htmlFor:"title",children:"Title *"}),e.jsx(O,{id:"title",placeholder:"Brief description of what you want to change",value:n.title,onChange:t=>o(s=>({...s,title:t.target.value})),required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(j,{htmlFor:"description",children:"Description"}),e.jsx(K,{value:n.description,onChange:t=>o(s=>({...s,description:t||""})),placeholder:"Write your task description in markdown...",height:400})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(j,{htmlFor:"status",children:"Status"}),e.jsxs(D,{value:n.status,onValueChange:t=>o(s=>({...s,status:t})),children:[e.jsx(L,{children:e.jsx(F,{placeholder:"Select status"})}),e.jsxs(I,{children:[e.jsx(r,{value:"draft",children:"Draft"}),e.jsx(r,{value:"proposed",children:"Proposed"}),e.jsx(r,{value:"in-review",children:"In Review"}),e.jsx(r,{value:"approved",children:"Approved"}),e.jsx(r,{value:"code-complete",children:"Code Complete"}),e.jsx(r,{value:"rejected",children:"Rejected"}),e.jsx(r,{value:"merged",children:"Merged"})]})]})]}),e.jsx(W,{defaultOpen:!0,icon:e.jsx(G,{className:"h-4 w-4"}),title:"Optional Implementation Detail",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(j,{htmlFor:"priority",children:"Priority"}),e.jsxs(D,{value:n.priority,onValueChange:t=>o(s=>({...s,priority:t})),children:[e.jsx(L,{children:e.jsx(F,{placeholder:"Select priority"})}),e.jsxs(I,{children:[e.jsx(r,{value:"low",children:"Low"}),e.jsx(r,{value:"medium",children:"Medium"}),e.jsx(r,{value:"high",children:"High"}),e.jsx(r,{value:"critical",children:"Critical"})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Implementation Steps"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Keep the implementation plan accurate as work progresses."})]}),m.length>0&&e.jsxs("span",{className:"text-xs text-muted-foreground",children:[m.length," step",m.length===1?"":"s"]})]}),e.jsx(X,{steps:m,onChange:b,disabled:u})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium",children:"Tags"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Tags power filtering and discovery across the task list."}),e.jsx(Q,{tags:E,onChange:T,disabled:u,placeholder:"Add a tag (e.g. backend, rollout)"})]})]})}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(h,{type:"button",variant:"outline",asChild:!0,children:e.jsxs(p,{to:`/tasks/${i}`,children:[e.jsx(V,{className:"mr-2 h-4 w-4"}),"Cancel"]})}),e.jsx(h,{type:"submit",disabled:u||!n.title,children:u?e.jsx(e.Fragment,{children:"Saving..."}):e.jsxs(e.Fragment,{children:[e.jsx(_,{className:"mr-2 h-4 w-4"}),"Save Changes"]})})]})]})]})})]})}export{de as TaskEditPage};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import{c as Ce,z as Ke,u as ze,v as Ve,r as A,j as t,B as P,L as te,P as ue,I as We,X,K as Ue,s as Ge,p as He,G as Qe,C as Ye,A as Xe}from"./index-SVcL57hQ.js";import{C as J,a as Z,c as Je}from"./card-NkV5eOu8.js";import{B as se}from"./badge-BnmevczT.js";import{S as oe,a as he,b as de,c as me,d as B}from"./select-DY8bp_yH.js";import{A as Ze,a as Ee,T as qe,g as et}from"./status-utils-CDkPeVfP.js";import{S as tt}from"./search-Ck3r4Ru-.js";import{C as st}from"./chevron-up-rbFu97ce.js";import{C as rt}from"./chevron-left-Blz556B2.js";/**
|
|
2
|
+
* @license lucide-react v0.542.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const nt=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"M11 4h10",key:"1w87gc"}],["path",{d:"M11 8h7",key:"djye34"}],["path",{d:"M11 12h4",key:"q8tih4"}]],at=Ce("arrow-down-wide-narrow",nt);/**
|
|
7
|
+
* @license lucide-react v0.542.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const it=[["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}],["path",{d:"M11 12h4",key:"q8tih4"}],["path",{d:"M11 16h7",key:"uosisv"}],["path",{d:"M11 20h10",key:"jvxblo"}]],ct=Ce("arrow-up-narrow-wide",it);/**
|
|
12
|
+
* @license lucide-react v0.542.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const lt=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],be=Ce("funnel",lt);function K(s){return Array.isArray?Array.isArray(s):_e(s)==="[object Array]"}function ut(s){if(typeof s=="string")return s;let e=s+"";return e=="0"&&1/s==-1/0?"-0":e}function ot(s){return s==null?"":ut(s)}function O(s){return typeof s=="string"}function De(s){return typeof s=="number"}function ht(s){return s===!0||s===!1||dt(s)&&_e(s)=="[object Boolean]"}function ke(s){return typeof s=="object"}function dt(s){return ke(s)&&s!==null}function D(s){return s!=null}function fe(s){return!s.trim().length}function _e(s){return s==null?s===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(s)}const mt="Incorrect 'index' type",ft=s=>`Invalid value for key ${s}`,gt=s=>`Pattern length exceeds max of ${s}.`,xt=s=>`Missing ${s} property in key`,pt=s=>`Property 'weight' in key '${s}' must be a positive integer`,ve=Object.prototype.hasOwnProperty;class At{constructor(e){this._keys=[],this._keyMap={};let r=0;e.forEach(n=>{let a=Ie(n);this._keys.push(a),this._keyMap[a.id]=a,r+=a.weight}),this._keys.forEach(n=>{n.weight/=r})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Ie(s){let e=null,r=null,n=null,a=1,c=null;if(O(s)||K(s))n=s,e=Fe(s),r=ge(s);else{if(!ve.call(s,"name"))throw new Error(xt("name"));const l=s.name;if(n=l,ve.call(s,"weight")&&(a=s.weight,a<=0))throw new Error(pt(l));e=Fe(l),r=ge(l),c=s.getFn}return{path:e,id:r,weight:a,src:n,getFn:c}}function Fe(s){return K(s)?s:s.split(".")}function ge(s){return K(s)?s.join("."):s}function jt(s,e){let r=[],n=!1;const a=(c,l,u)=>{if(D(c))if(!l[u])r.push(c);else{let o=l[u];const h=c[o];if(!D(h))return;if(u===l.length-1&&(O(h)||De(h)||ht(h)))r.push(ot(h));else if(K(h)){n=!0;for(let d=0,f=h.length;d<f;d+=1)a(h[d],l,u+1)}else l.length&&a(h,l,u+1)}};return a(s,O(e)?e.split("."):e,0),n?r:r[0]}const yt={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},Ct={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(s,e)=>s.score===e.score?s.idx<e.idx?-1:1:s.score<e.score?-1:1},Nt={location:0,threshold:.6,distance:100},wt={useExtendedSearch:!1,getFn:jt,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var m={...Ct,...yt,...Nt,...wt};const Et=/[^ ]+/g;function bt(s=1,e=3){const r=new Map,n=Math.pow(10,e);return{get(a){const c=a.match(Et).length;if(r.has(c))return r.get(c);const l=1/Math.pow(c,.5*s),u=parseFloat(Math.round(l*n)/n);return r.set(c,u),u},clear(){r.clear()}}}class Ne{constructor({getFn:e=m.getFn,fieldNormWeight:r=m.fieldNormWeight}={}){this.norm=bt(r,3),this.getFn=e,this.isCreated=!1,this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((r,n)=>{this._keysMap[r.id]=n})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,O(this.docs[0])?this.docs.forEach((e,r)=>{this._addString(e,r)}):this.docs.forEach((e,r)=>{this._addObject(e,r)}),this.norm.clear())}add(e){const r=this.size();O(e)?this._addString(e,r):this._addObject(e,r)}removeAt(e){this.records.splice(e,1);for(let r=e,n=this.size();r<n;r+=1)this.records[r].i-=1}getValueForItemAtKeyId(e,r){return e[this._keysMap[r]]}size(){return this.records.length}_addString(e,r){if(!D(e)||fe(e))return;let n={v:e,i:r,n:this.norm.get(e)};this.records.push(n)}_addObject(e,r){let n={i:r,$:{}};this.keys.forEach((a,c)=>{let l=a.getFn?a.getFn(e):this.getFn(e,a.path);if(D(l)){if(K(l)){let u=[];const o=[{nestedArrIndex:-1,value:l}];for(;o.length;){const{nestedArrIndex:h,value:d}=o.pop();if(D(d))if(O(d)&&!fe(d)){let f={v:d,i:h,n:this.norm.get(d)};u.push(f)}else K(d)&&d.forEach((f,p)=>{o.push({nestedArrIndex:p,value:f})})}n.$[c]=u}else if(O(l)&&!fe(l)){let u={v:l,n:this.norm.get(l)};n.$[c]=u}}}),this.records.push(n)}toJSON(){return{keys:this.keys,records:this.records}}}function Le(s,e,{getFn:r=m.getFn,fieldNormWeight:n=m.fieldNormWeight}={}){const a=new Ne({getFn:r,fieldNormWeight:n});return a.setKeys(s.map(Ie)),a.setSources(e),a.create(),a}function vt(s,{getFn:e=m.getFn,fieldNormWeight:r=m.fieldNormWeight}={}){const{keys:n,records:a}=s,c=new Ne({getFn:e,fieldNormWeight:r});return c.setKeys(n),c.setIndexRecords(a),c}function re(s,{errors:e=0,currentLocation:r=0,expectedLocation:n=0,distance:a=m.distance,ignoreLocation:c=m.ignoreLocation}={}){const l=e/s.length;if(c)return l;const u=Math.abs(n-r);return a?l+u/a:u?1:l}function Ft(s=[],e=m.minMatchCharLength){let r=[],n=-1,a=-1,c=0;for(let l=s.length;c<l;c+=1){let u=s[c];u&&n===-1?n=c:!u&&n!==-1&&(a=c-1,a-n+1>=e&&r.push([n,a]),n=-1)}return s[c-1]&&c-n>=e&&r.push([n,c-1]),r}const U=32;function Mt(s,e,r,{location:n=m.location,distance:a=m.distance,threshold:c=m.threshold,findAllMatches:l=m.findAllMatches,minMatchCharLength:u=m.minMatchCharLength,includeMatches:o=m.includeMatches,ignoreLocation:h=m.ignoreLocation}={}){if(e.length>U)throw new Error(gt(U));const d=e.length,f=s.length,p=Math.max(0,Math.min(n,f));let x=c,j=p;const C=u>1||o,M=C?Array(f):[];let v;for(;(v=s.indexOf(e,j))>-1;){let E=re(e,{currentLocation:v,expectedLocation:p,distance:a,ignoreLocation:h});if(x=Math.min(E,x),j=v+d,C){let R=0;for(;R<d;)M[v+R]=1,R+=1}}j=-1;let k=[],F=1,L=d+f;const ie=1<<d-1;for(let E=0;E<d;E+=1){let R=0,_=L;for(;R<_;)re(e,{errors:E,currentLocation:p+_,expectedLocation:p,distance:a,ignoreLocation:h})<=x?R=_:L=_,_=Math.floor((L-R)/2+R);L=_;let G=Math.max(1,p-_+1),w=l?f:Math.min(p+_,f)+d,I=Array(w+2);I[w+1]=(1<<E)-1;for(let b=w;b>=G;b-=1){let W=b-1,ee=r[s.charAt(W)];if(C&&(M[W]=+!!ee),I[b]=(I[b+1]<<1|1)&ee,E&&(I[b]|=(k[b+1]|k[b])<<1|1|k[b+1]),I[b]&ie&&(F=re(e,{errors:E,currentLocation:W,expectedLocation:p,distance:a,ignoreLocation:h}),F<=x)){if(x=F,j=W,j<=p)break;G=Math.max(1,2*p-j)}}if(re(e,{errors:E+1,currentLocation:p,expectedLocation:p,distance:a,ignoreLocation:h})>x)break;k=I}const T={isMatch:j>=0,score:Math.max(.001,F)};if(C){const E=Ft(M,u);E.length?o&&(T.indices=E):T.isMatch=!1}return T}function St(s){let e={};for(let r=0,n=s.length;r<n;r+=1){const a=s.charAt(r);e[a]=(e[a]||0)|1<<n-r-1}return e}const ne=String.prototype.normalize?(s=>s.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(s=>s);class Te{constructor(e,{location:r=m.location,threshold:n=m.threshold,distance:a=m.distance,includeMatches:c=m.includeMatches,findAllMatches:l=m.findAllMatches,minMatchCharLength:u=m.minMatchCharLength,isCaseSensitive:o=m.isCaseSensitive,ignoreDiacritics:h=m.ignoreDiacritics,ignoreLocation:d=m.ignoreLocation}={}){if(this.options={location:r,threshold:n,distance:a,includeMatches:c,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:o,ignoreDiacritics:h,ignoreLocation:d},e=o?e:e.toLowerCase(),e=h?ne(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const f=(x,j)=>{this.chunks.push({pattern:x,alphabet:St(x),startIndex:j})},p=this.pattern.length;if(p>U){let x=0;const j=p%U,C=p-j;for(;x<C;)f(this.pattern.substr(x,U),x),x+=U;if(j){const M=p-U;f(this.pattern.substr(M),M)}}else f(this.pattern,0)}searchIn(e){const{isCaseSensitive:r,ignoreDiacritics:n,includeMatches:a}=this.options;if(e=r?e:e.toLowerCase(),e=n?ne(e):e,this.pattern===e){let C={isMatch:!0,score:0};return a&&(C.indices=[[0,e.length-1]]),C}const{location:c,distance:l,threshold:u,findAllMatches:o,minMatchCharLength:h,ignoreLocation:d}=this.options;let f=[],p=0,x=!1;this.chunks.forEach(({pattern:C,alphabet:M,startIndex:v})=>{const{isMatch:k,score:F,indices:L}=Mt(e,C,M,{location:c+v,distance:l,threshold:u,findAllMatches:o,minMatchCharLength:h,includeMatches:a,ignoreLocation:d});k&&(x=!0),p+=F,k&&L&&(f=[...f,...L])});let j={isMatch:x,score:x?p/this.chunks.length:1};return x&&a&&(j.indices=f),j}}class V{constructor(e){this.pattern=e}static isMultiMatch(e){return Me(e,this.multiRegex)}static isSingleMatch(e){return Me(e,this.singleRegex)}search(){}}function Me(s,e){const r=s.match(e);return r?r[1]:null}class Bt extends V{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const r=e===this.pattern;return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class Dt extends V{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const n=e.indexOf(this.pattern)===-1;return{isMatch:n,score:n?0:1,indices:[0,e.length-1]}}}class kt extends V{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const r=e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,this.pattern.length-1]}}}class _t extends V{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const r=!e.startsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class It extends V{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const r=e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[e.length-this.pattern.length,e.length-1]}}}class Lt extends V{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const r=!e.endsWith(this.pattern);return{isMatch:r,score:r?0:1,indices:[0,e.length-1]}}}class Re extends V{constructor(e,{location:r=m.location,threshold:n=m.threshold,distance:a=m.distance,includeMatches:c=m.includeMatches,findAllMatches:l=m.findAllMatches,minMatchCharLength:u=m.minMatchCharLength,isCaseSensitive:o=m.isCaseSensitive,ignoreDiacritics:h=m.ignoreDiacritics,ignoreLocation:d=m.ignoreLocation}={}){super(e),this._bitapSearch=new Te(e,{location:r,threshold:n,distance:a,includeMatches:c,findAllMatches:l,minMatchCharLength:u,isCaseSensitive:o,ignoreDiacritics:h,ignoreLocation:d})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class $e extends V{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let r=0,n;const a=[],c=this.pattern.length;for(;(n=e.indexOf(this.pattern,r))>-1;)r=n+c,a.push([n,r-1]);const l=!!a.length;return{isMatch:l,score:l?0:1,indices:a}}}const xe=[Bt,$e,kt,_t,Lt,It,Dt,Re],Se=xe.length,Tt=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,Rt="|";function $t(s,e={}){return s.split(Rt).map(r=>{let n=r.trim().split(Tt).filter(c=>c&&!!c.trim()),a=[];for(let c=0,l=n.length;c<l;c+=1){const u=n[c];let o=!1,h=-1;for(;!o&&++h<Se;){const d=xe[h];let f=d.isMultiMatch(u);f&&(a.push(new d(f,e)),o=!0)}if(!o)for(h=-1;++h<Se;){const d=xe[h];let f=d.isSingleMatch(u);if(f){a.push(new d(f,e));break}}}return a})}const Ot=new Set([Re.type,$e.type]);class Pt{constructor(e,{isCaseSensitive:r=m.isCaseSensitive,ignoreDiacritics:n=m.ignoreDiacritics,includeMatches:a=m.includeMatches,minMatchCharLength:c=m.minMatchCharLength,ignoreLocation:l=m.ignoreLocation,findAllMatches:u=m.findAllMatches,location:o=m.location,threshold:h=m.threshold,distance:d=m.distance}={}){this.query=null,this.options={isCaseSensitive:r,ignoreDiacritics:n,includeMatches:a,minMatchCharLength:c,findAllMatches:u,ignoreLocation:l,location:o,threshold:h,distance:d},e=r?e:e.toLowerCase(),e=n?ne(e):e,this.pattern=e,this.query=$t(this.pattern,this.options)}static condition(e,r){return r.useExtendedSearch}searchIn(e){const r=this.query;if(!r)return{isMatch:!1,score:1};const{includeMatches:n,isCaseSensitive:a,ignoreDiacritics:c}=this.options;e=a?e:e.toLowerCase(),e=c?ne(e):e;let l=0,u=[],o=0;for(let h=0,d=r.length;h<d;h+=1){const f=r[h];u.length=0,l=0;for(let p=0,x=f.length;p<x;p+=1){const j=f[p],{isMatch:C,indices:M,score:v}=j.search(e);if(C){if(l+=1,o+=v,n){const k=j.constructor.type;Ot.has(k)?u=[...u,...M]:u.push(M)}}else{o=0,l=0,u.length=0;break}}if(l){let p={isMatch:!0,score:o/l};return n&&(p.indices=u),p}}return{isMatch:!1,score:1}}}const pe=[];function Kt(...s){pe.push(...s)}function Ae(s,e){for(let r=0,n=pe.length;r<n;r+=1){let a=pe[r];if(a.condition(s,e))return new a(s,e)}return new Te(s,e)}const ae={AND:"$and",OR:"$or"},je={PATH:"$path",PATTERN:"$val"},ye=s=>!!(s[ae.AND]||s[ae.OR]),zt=s=>!!s[je.PATH],Vt=s=>!K(s)&&ke(s)&&!ye(s),Be=s=>({[ae.AND]:Object.keys(s).map(e=>({[e]:s[e]}))});function Oe(s,e,{auto:r=!0}={}){const n=a=>{let c=Object.keys(a);const l=zt(a);if(!l&&c.length>1&&!ye(a))return n(Be(a));if(Vt(a)){const o=l?a[je.PATH]:c[0],h=l?a[je.PATTERN]:a[o];if(!O(h))throw new Error(ft(o));const d={keyId:ge(o),pattern:h};return r&&(d.searcher=Ae(h,e)),d}let u={children:[],operator:c[0]};return c.forEach(o=>{const h=a[o];K(h)&&h.forEach(d=>{u.children.push(n(d))})}),u};return ye(s)||(s=Be(s)),n(s)}function Wt(s,{ignoreFieldNorm:e=m.ignoreFieldNorm}){s.forEach(r=>{let n=1;r.matches.forEach(({key:a,norm:c,score:l})=>{const u=a?a.weight:null;n*=Math.pow(l===0&&u?Number.EPSILON:l,(u||1)*(e?1:c))}),r.score=n})}function Ut(s,e){const r=s.matches;e.matches=[],D(r)&&r.forEach(n=>{if(!D(n.indices)||!n.indices.length)return;const{indices:a,value:c}=n;let l={indices:a,value:c};n.key&&(l.key=n.key.src),n.idx>-1&&(l.refIndex=n.idx),e.matches.push(l)})}function Gt(s,e){e.score=s.score}function Ht(s,e,{includeMatches:r=m.includeMatches,includeScore:n=m.includeScore}={}){const a=[];return r&&a.push(Ut),n&&a.push(Gt),s.map(c=>{const{idx:l}=c,u={item:e[l],refIndex:l};return a.length&&a.forEach(o=>{o(c,u)}),u})}class H{constructor(e,r={},n){this.options={...m,...r},this.options.useExtendedSearch,this._keyStore=new At(this.options.keys),this.setCollection(e,n)}setCollection(e,r){if(this._docs=e,r&&!(r instanceof Ne))throw new Error(mt);this._myIndex=r||Le(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){D(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=()=>!1){const r=[];for(let n=0,a=this._docs.length;n<a;n+=1){const c=this._docs[n];e(c,n)&&(this.removeAt(n),n-=1,a-=1,r.push(c))}return r}removeAt(e){this._docs.splice(e,1),this._myIndex.removeAt(e)}getIndex(){return this._myIndex}search(e,{limit:r=-1}={}){const{includeMatches:n,includeScore:a,shouldSort:c,sortFn:l,ignoreFieldNorm:u}=this.options;let o=O(e)?O(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e);return Wt(o,{ignoreFieldNorm:u}),c&&o.sort(l),De(r)&&r>-1&&(o=o.slice(0,r)),Ht(o,this._docs,{includeMatches:n,includeScore:a})}_searchStringList(e){const r=Ae(e,this.options),{records:n}=this._myIndex,a=[];return n.forEach(({v:c,i:l,n:u})=>{if(!D(c))return;const{isMatch:o,score:h,indices:d}=r.searchIn(c);o&&a.push({item:c,idx:l,matches:[{score:h,value:c,norm:u,indices:d}]})}),a}_searchLogical(e){const r=Oe(e,this.options),n=(u,o,h)=>{if(!u.children){const{keyId:f,searcher:p}=u,x=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(o,f),searcher:p});return x&&x.length?[{idx:h,item:o,matches:x}]:[]}const d=[];for(let f=0,p=u.children.length;f<p;f+=1){const x=u.children[f],j=n(x,o,h);if(j.length)d.push(...j);else if(u.operator===ae.AND)return[]}return d},a=this._myIndex.records,c={},l=[];return a.forEach(({$:u,i:o})=>{if(D(u)){let h=n(r,u,o);h.length&&(c[o]||(c[o]={idx:o,item:u,matches:[]},l.push(c[o])),h.forEach(({matches:d})=>{c[o].matches.push(...d)}))}}),l}_searchObjectList(e){const r=Ae(e,this.options),{keys:n,records:a}=this._myIndex,c=[];return a.forEach(({$:l,i:u})=>{if(!D(l))return;let o=[];n.forEach((h,d)=>{o.push(...this._findMatches({key:h,value:l[d],searcher:r}))}),o.length&&c.push({idx:u,item:l,matches:o})}),c}_findMatches({key:e,value:r,searcher:n}){if(!D(r))return[];let a=[];if(K(r))r.forEach(({v:c,i:l,n:u})=>{if(!D(c))return;const{isMatch:o,score:h,indices:d}=n.searchIn(c);o&&a.push({score:h,key:e,value:c,idx:l,norm:u,indices:d})});else{const{v:c,n:l}=r,{isMatch:u,score:o,indices:h}=n.searchIn(c);u&&a.push({score:o,key:e,value:c,norm:l,indices:h})}return a}}H.version="7.1.0";H.createIndex=Le;H.parseIndex=vt;H.config=m;H.parseQuery=Oe;Kt(Pt);function Qt(s){switch(s){case"high":case"critical":return"destructive";case"medium":return"secondary";default:return"outline"}}const q=20;function rs(){const[s]=Ke(),e=ze(),r=Ve(),[n,a]=A.useState([]),[c,l]=A.useState([]),[u,o]=A.useState(!0),[h,d]=A.useState(null),[f,p]=A.useState(s.get("status")||"_default"),[x,j]=A.useState(s.get("priority")||"all"),[C,M]=A.useState(s.get("search")||""),[v,k]=A.useState(s.get("sortBy")||"created"),[F,L]=A.useState(s.get("order")||"desc"),[ie,T]=A.useState(()=>{const i=parseInt(s.get("page")||"1",10);return Number.isNaN(i)||i<1?1:i}),[E,R]=A.useState(!1),_=A.useRef(null),G=[f!=="_default",x!=="all",v!=="created",F!=="desc"].filter(Boolean).length,w=A.useCallback(i=>{const g=new URLSearchParams(s);Object.entries(i).forEach(([S,z])=>{z&&z!=="all"&&z!=="_default"&&z!==""?g.set(S,z):g.delete(S)});const y=g.toString(),N=y?`?${y}`:"";e(`${r.pathname}${N}`)},[s,e,r.pathname]),I=A.useCallback(i=>{p(i),T(1),w({status:i==="_default"?null:i,page:null})},[w]),Q=A.useCallback(i=>{j(i),T(1),w({priority:i==="all"?null:i,page:null})},[w]),b=A.useCallback(i=>{M(i),T(1),w({search:i||null,page:null})},[w]),W=A.useCallback(i=>{k(i),T(1),w({sortBy:i==="created"?null:i,page:null})},[w]),ee=A.useCallback(()=>{const i=F==="asc"?"desc":"asc";L(i),T(1),w({order:i==="desc"?null:i,page:null})},[F,w]),ce=A.useCallback(i=>{T(i),w({page:i===1?null:String(i)}),window.scrollTo({top:0,behavior:"smooth"})},[w]),le=A.useCallback(i=>{if(i.key==="s"||i.key==="S"){const g=document.activeElement;g?.tagName==="INPUT"||g?.tagName==="TEXTAREA"||g?.getAttribute("contenteditable")==="true"||(i.preventDefault(),_.current?.focus())}},[]);A.useEffect(()=>(document.addEventListener("keydown",le),()=>{document.removeEventListener("keydown",le)}),[le]);const we=A.useMemo(()=>{const i={keys:[{name:"title",weight:.4},{name:"intent",weight:.3},{name:"id",weight:.2},{name:"author.name",weight:.05},{name:"metadata.tags",weight:.05}],threshold:.3,includeScore:!0};return new H(n,i)},[n]);A.useEffect(()=>{async function i(){try{o(!0);const y=await(await fetch(`${Xe}/api/v1/tasks`)).json();y.success?(a(y.data),l(y.data)):d(y.error?.message||"Failed to fetch tasks")}catch(g){d(g instanceof Error?g.message:"Unknown error")}finally{o(!1)}}i()},[]),A.useEffect(()=>{let i=n;if(f==="_default"?i=i.filter(g=>Ze.includes(g.status)):f!=="all"&&(i=i.filter(g=>g.status===f)),x!=="all"&&(i=i.filter(g=>g.metadata.priority===x)),C.trim()){const g=we.search(C),y=new Set(g.map(N=>N.item.id));i=i.filter(N=>y.has(N.id))}i=i.sort((g,y)=>{let N,S;switch(v){case"created":{N=new Date(g.metadata.createdAt).getTime(),S=new Date(y.metadata.createdAt).getTime();break}case"updated":{N=new Date(g.metadata.updatedAt).getTime(),S=new Date(y.metadata.updatedAt).getTime();break}case"status":{N=g.status,S=y.status;break}case"priority":{const z={critical:4,high:3,medium:2,low:1};N=z[g.metadata.priority]||0,S=z[y.metadata.priority]||0;break}case"intent":{N=(g.title||g.intent||"").toLowerCase(),S=(y.title||y.intent||"").toLowerCase();break}default:N=new Date(g.metadata.createdAt).getTime(),S=new Date(y.metadata.createdAt).getTime()}return F==="asc"?N<S?-1:N>S?1:0:N>S?-1:N<S?1:0}),l(i)},[n,f,x,C,v,F,we]);const Y=Math.max(1,Math.ceil(c.length/q)),$=Math.min(ie,Y),Pe=c.slice(($-1)*q,$*q);return h?t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Tasks"}),t.jsx("p",{className:"text-muted-foreground",children:"Manage tasks for your agents"})]}),t.jsx(P,{asChild:!0,children:t.jsxs(te,{to:"/tasks/new",children:[t.jsx(ue,{className:"mr-2 h-4 w-4"}),"New Task"]})})]}),t.jsx(J,{children:t.jsx(Z,{className:"pt-6",children:t.jsx("div",{className:"text-center",children:t.jsxs("p",{className:"text-destructive",children:["Error: ",h]})})})})]}):t.jsxs("div",{className:"space-y-6",children:[t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{children:[t.jsx("h2",{className:"text-2xl font-bold tracking-tight",children:"Tasks"}),t.jsx("p",{className:"text-muted-foreground",children:"Manage tasks for your agents"})]}),t.jsx(P,{asChild:!0,children:t.jsxs(te,{to:"/tasks/new",children:[t.jsx(ue,{className:"mr-2 h-4 w-4"}),"New Task"]})})]}),t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"relative",children:[t.jsx(tt,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground pointer-events-none"}),t.jsx(We,{ref:_,placeholder:"Search tasks...",value:C,onChange:i=>b(i.target.value),className:"pl-9 pr-20 h-11 bg-muted/40 border-muted-foreground/20 focus:bg-background transition-colors"}),t.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-2",children:C?t.jsx("button",{onClick:()=>b(""),className:"h-5 w-5 rounded-full bg-muted-foreground/20 hover:bg-muted-foreground/30 flex items-center justify-center transition-colors",children:t.jsx(X,{className:"h-3 w-3"})}):t.jsx(Ue,{children:t.jsx(Ge,{children:"S"})})})]}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsxs("button",{onClick:()=>R(!E),className:"flex items-center gap-2 px-3 py-2 text-sm font-medium rounded-lg border border-muted-foreground/20 hover:bg-muted/50 transition-colors",children:[t.jsx(be,{className:"h-4 w-4"}),t.jsx("span",{className:"hidden sm:inline",children:"Filters & Sort"}),t.jsx("span",{className:"sm:hidden",children:"Filters"}),G>0&&t.jsx("span",{className:"flex items-center justify-center h-5 w-5 text-xs font-bold rounded-full bg-primary text-primary-foreground",children:G}),E?t.jsx(st,{className:"h-4 w-4 ml-1"}):t.jsx(He,{className:"h-4 w-4 ml-1"})]}),t.jsxs("div",{className:"flex-1 flex items-center gap-2 overflow-x-auto scrollbar-hide",children:[f!=="_default"&&t.jsxs("button",{onClick:()=>I("_default"),className:"flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-blue-500/15 text-blue-600 dark:text-blue-400 hover:bg-blue-500/25 transition-colors whitespace-nowrap",children:[f==="all"?"All statuses":Ee(f),t.jsx(X,{className:"h-3 w-3"})]}),x!=="all"&&t.jsxs("button",{onClick:()=>Q("all"),className:"flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-amber-500/15 text-amber-600 dark:text-amber-400 hover:bg-amber-500/25 transition-colors whitespace-nowrap",children:[x," priority",t.jsx(X,{className:"h-3 w-3"})]}),(v!=="created"||F!=="desc")&&t.jsxs("button",{onClick:()=>{W("created"),L("desc"),w({sortBy:null,order:null})},className:"flex items-center gap-1 px-2 py-1 text-xs font-medium rounded-full bg-purple-500/15 text-purple-600 dark:text-purple-400 hover:bg-purple-500/25 transition-colors whitespace-nowrap",children:[v," ",F==="asc"?"↑":"↓",t.jsx(X,{className:"h-3 w-3"})]})]}),!u&&t.jsxs("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:[c.length," result",c.length!==1?"s":""]})]}),E&&t.jsxs("div",{className:"p-4 rounded-lg border border-muted-foreground/20 bg-muted/30 space-y-4 animate-in slide-in-from-top-2 duration-200",children:[t.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Status"}),t.jsxs(oe,{value:f,onValueChange:I,children:[t.jsx(he,{className:"w-full bg-background",children:t.jsx(de,{placeholder:"Filter by status"})}),t.jsxs(me,{children:[t.jsx(B,{value:"_default",children:"Active (Default)"}),t.jsx(B,{value:"all",children:"All statuses"}),qe.map(i=>t.jsx(B,{value:i,children:Ee(i)},i))]})]})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Priority"}),t.jsxs(oe,{value:x,onValueChange:Q,children:[t.jsx(he,{className:"w-full bg-background",children:t.jsx(de,{placeholder:"Filter by priority"})}),t.jsxs(me,{children:[t.jsx(B,{value:"all",children:"All priorities"}),t.jsx(B,{value:"low",children:"Low"}),t.jsx(B,{value:"medium",children:"Medium"}),t.jsx(B,{value:"high",children:"High"}),t.jsx(B,{value:"critical",children:"Critical"})]})]})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Sort By"}),t.jsxs(oe,{value:v,onValueChange:i=>W(i),children:[t.jsx(he,{className:"w-full bg-background",children:t.jsx(de,{})}),t.jsxs(me,{children:[t.jsx(B,{value:"created",children:"Created Date"}),t.jsx(B,{value:"updated",children:"Updated Date"}),t.jsx(B,{value:"status",children:"Status"}),t.jsx(B,{value:"priority",children:"Priority"}),t.jsx(B,{value:"intent",children:"Title"})]})]})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:"Order"}),t.jsx(P,{variant:"outline",onClick:ee,className:"w-full justify-between bg-background",children:F==="asc"?t.jsxs(t.Fragment,{children:[t.jsx("span",{children:"Ascending"}),t.jsx(ct,{className:"h-4 w-4"})]}):t.jsxs(t.Fragment,{children:[t.jsx("span",{children:"Descending"}),t.jsx(at,{className:"h-4 w-4"})]})})]})]}),G>0&&t.jsx("div",{className:"pt-2 border-t border-muted-foreground/10",children:t.jsxs(P,{variant:"ghost",size:"sm",onClick:()=>{I("_default"),Q("all"),b("")},className:"text-muted-foreground hover:text-foreground",children:[t.jsx(X,{className:"h-3 w-3 mr-1"}),"Reset all filters"]})})]})]}),u?t.jsx("div",{className:"space-y-3",children:Array.from({length:6}).map((i,g)=>t.jsx(J,{className:"overflow-hidden",children:t.jsx(Z,{className:"py-4",children:t.jsxs("div",{className:"space-y-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4",children:[t.jsx("div",{className:"h-5 bg-muted rounded w-2/3 animate-pulse"}),t.jsxs("div",{className:"flex gap-1.5 flex-shrink-0",children:[t.jsx("div",{className:"h-5 w-14 bg-muted rounded-full animate-pulse"}),t.jsx("div",{className:"h-5 w-14 bg-muted rounded-full animate-pulse"})]})]}),t.jsxs("div",{className:"space-y-1.5",children:[t.jsx("div",{className:"h-3.5 bg-muted rounded w-full animate-pulse"}),t.jsx("div",{className:"h-3.5 bg-muted rounded w-4/5 animate-pulse"})]}),t.jsxs("div",{className:"flex justify-between items-center pt-1",children:[t.jsx("div",{className:"h-3 bg-muted rounded w-1/3 animate-pulse"}),t.jsx("div",{className:"h-3 bg-muted rounded w-1/6 animate-pulse"})]})]})})},g))}):c.length===0&&n.length>0?t.jsx(J,{children:t.jsx(Z,{className:"pt-6",children:t.jsxs("div",{className:"text-center py-6",children:[t.jsx(be,{className:"mx-auto h-12 w-12 text-muted-foreground/50"}),t.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No tasks match your filters"}),t.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Try adjusting your status or priority filters."}),t.jsx(P,{variant:"outline",className:"mt-4",onClick:()=>{I("_default"),Q("all"),b("")},children:"Clear Filters"})]})})}):n.length===0?t.jsx(J,{children:t.jsx(Z,{className:"pt-6",children:t.jsxs("div",{className:"text-center py-6",children:[t.jsx(Qe,{className:"mx-auto h-12 w-12 text-muted-foreground/50"}),t.jsx("h3",{className:"mt-4 text-lg font-semibold",children:"No tasks yet"}),t.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:"Create your first task to get started."}),t.jsx(P,{asChild:!0,className:"mt-4",children:t.jsxs(te,{to:"/tasks/new",children:[t.jsx(ue,{className:"mr-2 h-4 w-4"}),"New Task"]})})]})})}):t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"space-y-3",children:Pe.map(i=>t.jsx(te,{to:`/tasks/${i.id}`,className:"block",children:t.jsx(J,{className:"hover:shadow-md hover:bg-muted/30 transition-all cursor-pointer",children:t.jsx(Z,{className:"py-4",children:t.jsx("div",{className:"flex justify-between items-start gap-4",children:t.jsxs("div",{className:"flex-1 space-y-2",children:[t.jsxs("div",{className:"flex items-start justify-between",children:[t.jsx(Je,{className:"text-base leading-tight",children:i.title||i.intent}),t.jsxs("div",{className:"flex gap-1 ml-3 flex-shrink-0",children:[i.metadata.priority&&t.jsx(se,{variant:Qt(i.metadata.priority),className:"text-xs",children:i.metadata.priority}),t.jsx(se,{variant:et(i.status),className:"text-xs",children:i.status})]})]}),i.content&&t.jsxs("div",{className:"text-sm text-muted-foreground leading-relaxed",children:[i.content.split(`
|
|
17
|
+
`).slice(0,2).join(" ").substring(0,150),i.content.length>150?"...":""]}),t.jsxs("div",{className:"flex justify-between items-center",children:[t.jsxs("div",{className:"text-xs text-muted-foreground",children:[i.id," • by ",i.author.name," • ",new Date(i.metadata.createdAt).toLocaleDateString()]}),t.jsxs("div",{className:"flex gap-3 text-xs text-muted-foreground",children:[i.planSteps.length>0&&t.jsxs("span",{children:[i.planSteps.length," step",i.planSteps.length!==1?"s":""]}),i.metadata.tags&&i.metadata.tags.length>0&&t.jsxs("span",{children:[i.metadata.tags.length," tag",i.metadata.tags.length!==1?"s":""]})]})]}),i.metadata.tags&&i.metadata.tags.length>0&&t.jsxs("div",{className:"flex gap-1 mt-2",children:[i.metadata.tags.slice(0,3).map(g=>t.jsx(se,{variant:"outline",className:"text-xs",children:g},g)),i.metadata.tags.length>3&&t.jsxs(se,{variant:"outline",className:"text-xs",children:["+",i.metadata.tags.length-3]})]})]})})})})},i.id))}),Y>1&&t.jsxs("div",{className:"flex items-center justify-between pt-2",children:[t.jsxs("p",{className:"text-sm text-muted-foreground",children:["Showing ",($-1)*q+1,"–",Math.min($*q,c.length)," of ",c.length]}),t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx(P,{variant:"outline",size:"sm",disabled:$<=1,onClick:()=>ce($-1),children:t.jsx(rt,{className:"h-4 w-4"})}),Array.from({length:Y},(i,g)=>g+1).filter(i=>i===1||i===Y||Math.abs(i-$)<=1).reduce((i,g,y,N)=>(y>0&&g-N[y-1]>1&&i.push("ellipsis"),i.push(g),i),[]).map((i,g)=>i==="ellipsis"?t.jsx("span",{className:"px-2 text-sm text-muted-foreground",children:"…"},`e${g}`):t.jsx(P,{variant:i===$?"default":"outline",size:"sm",className:"min-w-[2rem]",onClick:()=>ce(i),children:i},i)),t.jsx(P,{variant:"outline",size:"sm",disabled:$>=Y,onClick:()=>ce($+1),children:t.jsx(Ye,{className:"h-4 w-4"})})]})]})]})]})}export{rs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as U,a as J,r as i,j as e,B as r,T as C,p as K,X as L,x as H,
|
|
1
|
+
import{u as U,a as J,r as i,j as e,B as r,T as C,p as K,X as L,x as H,a3 as G}from"./index-SVcL57hQ.js";import{C as p,a as W}from"./card-NkV5eOu8.js";import{u as X}from"./use-terminal-CJMIUQKK.js";import{T as _}from"./terminal-preview-DkoSzVhy.js";/* empty css */import{R as q}from"./refresh-cw-oOjEruv4.js";import{C as Q,a as V}from"./chevrons-up-BQMlE7rT.js";import{C as Y}from"./chevron-up-rbFu97ce.js";import{P as M}from"./play-Dn69nfRB.js";import{C as Z}from"./circle-play-_KPAQa5u.js";import"./xterm-DTxiCjtJ.js";function he(){const m=U(),{sessions:f,loading:d,error:S,refreshSessions:h,createSession:j,destroySession:B}=X(),{toast:l}=J(),[x,u]=i.useState(""),[g,T]=i.useState(!1),[v,I]=i.useState(!1),[N,$]=i.useState([]),[,w]=i.useState(null),O=s=>{const t=Date.now(),a=new Date(s).getTime(),n=Math.max(0,Math.floor((t-a)/1e3));if(n<60)return`${n}s ago`;const b=Math.floor(n/60);if(b<60)return`${b}m ago`;const k=Math.floor(b/60);return k<24?`${k}h ago`:`${Math.floor(k/24)}d ago`};i.useEffect(()=>{h()},[h]),i.useEffect(()=>{y(s=>{const t={...s};return f.forEach(a=>{a.id in t||(t[a.id]=!0)}),t})},[f]),i.useEffect(()=>{try{const s=localStorage.getItem("terminal.commandHistory");s&&$(JSON.parse(s))}catch{}},[]);const D=s=>{s&&($(t=>{const a=[s,...t.filter(n=>n!==s)].slice(0,5);try{localStorage.setItem("terminal.commandHistory",JSON.stringify(a))}catch{}return a}),w(null))},c=f.filter(s=>!s.taskId?.startsWith("cp-")).sort((s,t)=>new Date(t.lastActivity).getTime()-new Date(s.lastActivity).getTime()),[o,y]=i.useState(()=>{const s={};return f.forEach(t=>{s[t.id]=!0}),s}),R=async()=>{const s=`session-${Date.now()}`;await j(s)&&(l({title:"New terminal started",description:`${s}`}),m(`/terminal/${s}`))},E=async()=>{const s=x.trim();if(!s)return;const t=`session-${Date.now()}`;T(!0);try{await j(t,s)?(D(s),l({title:"Session started",description:`${t}`}),m(`/terminal/${t}`)):l({title:"Failed to start",description:"See error above",variant:"destructive"})}finally{T(!1)}},A=async()=>{const s=x.trim();if(!s)return;const t=`session-${Date.now()}`;I(!0);try{await j(t,s)?(D(s),setTimeout(()=>h(),150),u(""),l({title:"Started in background",description:`${t}`,action:e.jsx(G,{altText:"Open session",onClick:()=>m(`/terminal/${t}`),children:"Open"})})):l({title:"Failed to start",description:"See error above",variant:"destructive"})}finally{I(!1)}},P=async s=>{await B(s)?(l({title:"Session closed",description:s}),setTimeout(()=>h(),100)):l({title:"Failed to close session",description:s,variant:"destructive"})},F=()=>{const s=c.every(a=>o[a.id]),t={};c.forEach(a=>{t[a.id]=!s}),y(t)},z=c.length>0&&c.every(s=>o[s.id]);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Terminal"}),e.jsx("p",{className:"text-muted-foreground hidden sm:block",children:"Manage terminal sessions"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(r,{variant:"outline",onClick:()=>h(),disabled:d,children:[e.jsx(q,{className:`h-4 w-4 sm:mr-2 ${d?"animate-spin":""}`}),e.jsx("span",{className:"hidden sm:inline",children:"Refresh"})]}),c.length>0&&e.jsx(r,{variant:"outline",onClick:F,children:z?e.jsxs(e.Fragment,{children:[e.jsx(Q,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Hide All"})]}):e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Show All"})]})}),e.jsxs(r,{onClick:R,disabled:d,children:[e.jsx(C,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"New Terminal"})]})]})]}),S&&e.jsx("div",{className:"p-4 bg-red-50 border border-red-200 rounded-lg",children:e.jsx("div",{className:"text-red-600",children:S})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Sessions"}),d?e.jsx("div",{className:"space-y-2",children:[...Array(2)].map((s,t)=>e.jsx(p,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"h-4 w-4 rounded bg-muted animate-pulse"}),e.jsxs("div",{children:[e.jsx("div",{className:"h-4 w-40 bg-muted rounded animate-pulse mb-2"}),e.jsx("div",{className:"h-3 w-24 bg-muted rounded animate-pulse"})]})]}),e.jsx("div",{className:"h-6 w-20 bg-muted rounded animate-pulse"})]})},t))}):c.length===0?e.jsx(p,{className:"p-8",children:e.jsxs("div",{className:"flex flex-col items-center justify-center text-center space-y-3",children:[e.jsx(C,{className:"h-12 w-12 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No active sessions"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Get started by launching a new terminal session with the"," ",e.jsx("button",{onClick:R,className:"text-primary hover:underline font-medium",children:"New Terminal"})," ","button above."]})]})]})}):e.jsx("div",{className:"space-y-2",children:c.slice(0,10).map(s=>e.jsxs(p,{className:"p-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(C,{className:"h-4 w-4"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:s.taskId}),e.jsxs("div",{className:"text-xs text-gray-500",children:["Session ",s.id.split("-").slice(-1)[0].substring(0,8)," • Last activity ",O(s.lastActivity)]})]})]}),e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2",children:[e.jsx("div",{className:`flex items-center gap-1 ${s.connected?"text-green-600":"text-gray-400"}`,title:s.connected?"Connected":"Disconnected",children:e.jsx("div",{className:`w-2 h-2 rounded-full ${s.connected?"bg-green-500":"bg-gray-400"}`})}),e.jsx(r,{size:"sm",variant:"outline",onClick:()=>{y(t=>({...t,[s.id]:!t[s.id]}))},"aria-label":o[s.id]?"Hide preview":"Show preview",title:o[s.id]?"Hide preview":"Show preview",children:o[s.id]?e.jsx(Y,{className:"h-4 w-4"}):e.jsx(K,{className:"h-4 w-4"})}),e.jsxs(r,{size:"sm",variant:"outline",onClick:()=>m(`/terminal/${s.taskId}`),children:[e.jsx(M,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"Open"})]}),e.jsx(r,{size:"icon",variant:"destructive",onClick:()=>P(s.id),title:"Close session","aria-label":"Close session",children:e.jsx(L,{className:"h-4 w-4"})})]})]}),o[s.id]&&e.jsx("div",{className:"mt-2 w-full p-2 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>m(`/terminal/${s.taskId}`),title:"Click to open full terminal session",children:e.jsx(_,{sessionId:s.id,heightPx:160,maxScrollback:200})})]},s.id))})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Run Custom Command"}),e.jsx(p,{children:e.jsxs(W,{className:"py-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{value:x,onChange:s=>u(s.target.value),onKeyDown:s=>{s.key==="Enter"?(s.preventDefault(),s.shiftKey?A():E()):s.key==="ArrowUp"?(s.preventDefault(),w(t=>{const a=t===null?0:Math.min((t??0)+1,N.length-1),n=N[a];return n&&u(n),a})):s.key==="ArrowDown"&&(s.preventDefault(),w(t=>{if(t===null)return null;const a=t-1;if(a<0)return u(""),null;const n=N[a];return n&&u(n),a}))},placeholder:"npm run dev",className:"flex-1 h-9 rounded-md border px-3 text-sm bg-white dark:bg-gray-900 border-gray-300 dark:border-gray-700 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400"}),e.jsxs(r,{onClick:A,variant:"secondary",disabled:d||!x.trim()||v||g,children:[v?e.jsx(H,{className:"h-4 w-4 animate-spin sm:mr-1"}):e.jsx(Z,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"Background"})]}),e.jsxs(r,{onClick:E,disabled:d||!x.trim()||g||v,children:[g?e.jsx(H,{className:"h-4 w-4 animate-spin sm:mr-2"}):e.jsx(M,{className:"h-4 w-4 sm:mr-2"}),e.jsx("span",{className:"hidden sm:inline",children:"Run"})]})]}),e.jsx("div",{className:"text-xs text-muted-foreground mt-2",children:"Enter to Run • Shift+Enter to Run in background"})]})})]})]})}export{he as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as Ke,j as e,B as v,
|
|
1
|
+
import{c as Ke,j as e,B as v,a4 as Me,a5 as We,a6 as Le,a7 as Re,a8 as Be,a9 as Xe,s as de,r as a,aa as Qe,E as et,v as tt,u as rt,z as st,a as at,l as ve,T as ye,X as je,P as we,k as ke,m as nt,ab as ze,G as it,D as ct,b as ot,d as lt,f as dt,p as De,ac as Fe,ad as mt,A as me}from"./index-SVcL57hQ.js";import{C as ut,a as ht}from"./card-NkV5eOu8.js";import{B as Je}from"./badge-BnmevczT.js";import{S as Ne,a as Se,b as Ce,c as Ae,d as V}from"./select-DY8bp_yH.js";import{R as xt,a as Te}from"./radio-group-C_JhFin5.js";import{C as ft}from"./CollapsibleSection-irzuq21b.js";import{L as fe}from"./label-MGLxVQcy.js";import{u as gt}from"./use-terminal-CJMIUQKK.js";import{x as pt,a as bt}from"./xterm-DTxiCjtJ.js";import{A as vt}from"./arrow-down-BrqEvvfv.js";/* empty css */import{b as Ue,a as yt,c as jt,d as wt}from"./droid-GYYyVzN-.js";import{R as kt}from"./refresh-cw-oOjEruv4.js";import{P as Ee}from"./play-Dn69nfRB.js";import{E as Nt}from"./eye-C96SnuaK.js";import{Z as St}from"./zap-BQyXK_jX.js";import{M as Ct}from"./message-square-C3VNiI6M.js";import"./chevron-up-rbFu97ce.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,a as k,
|
|
1
|
+
import{r as i,a as k,a_ as N,A as g,j as e,b1 as P,I as b,B as C}from"./index-SVcL57hQ.js";import{C as F,b as w,c as T,d as L,a as D}from"./card-NkV5eOu8.js";import{L as o}from"./label-MGLxVQcy.js";import{S as h,a as u,b as m,c as f,d as a}from"./select-DY8bp_yH.js";import"./chevron-up-rbFu97ce.js";const r={theme:"coconut",defaultEditor:"cursor",terminalShell:"bash",autoSaveInterval:60,notifications:{email:!1,desktop:!1,slack:!1}};function V(s){return{theme:s?.theme??r.theme,defaultEditor:s?.defaultEditor??r.defaultEditor,terminalShell:s?.terminalShell??r.terminalShell,autoSaveInterval:s?.autoSaveInterval??r.autoSaveInterval,notifications:{email:s?.notifications?.email??r.notifications.email,desktop:s?.notifications?.desktop??r.notifications.desktop,slack:s?.notifications?.slack??r.notifications.slack}}}function O(){const[s,v]=i.useState(r),[y,E]=i.useState(!0),[c,x]=i.useState(!1),{toast:d}=k(),{theme:j,setTheme:p}=N();i.useEffect(()=>{S()},[]),i.useEffect(()=>{s.theme!==j&&p(s.theme)},[s.theme,j,p]);const S=async()=>{try{const l=await(await fetch(`${g}/api/v1/user/settings`)).json();l.success&&v(V(l.data.preferences))}catch(t){console.error("Failed to load preferences:",t),d({title:"Error",description:"Failed to load user preferences",variant:"destructive"})}finally{E(!1)}},I=async()=>{x(!0);try{const l=await(await fetch(`${g}/api/v1/user/settings`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({preferences:s})})).json();if(l.success)d({title:"Preferences saved",description:"Your personal preferences have been updated."});else throw new Error(l.error)}catch(t){console.error("Failed to save preferences:",t),d({title:"Error",description:"Failed to save preferences",variant:"destructive"})}finally{x(!1)}},n=t=>{v(l=>({...l,...t,notifications:{...l.notifications,...t.notifications}}))};return y?e.jsx("div",{children:"Loading..."}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"User Preferences"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure defaults for editors, shells, themes, and notifications."})]}),e.jsx(P,{}),e.jsxs(F,{children:[e.jsxs(w,{children:[e.jsx(T,{children:"Workspace Defaults"}),e.jsx(L,{children:"Set the defaults Coconut uses when creating sessions and surfaces."})]}),e.jsxs(D,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"theme",children:"Theme"}),e.jsxs(h,{value:s.theme,onValueChange:t=>n({theme:t}),children:[e.jsx(u,{id:"theme",children:e.jsx(m,{placeholder:"Select theme"})}),e.jsxs(f,{children:[e.jsx(a,{value:"coconut",children:"Coconut"}),e.jsx(a,{value:"system",children:"System"}),e.jsx(a,{value:"light",children:"Light"}),e.jsx(a,{value:"dark",children:"Dark"})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"System follows your OS preference. Coconut is the default branded theme."})]}),e.jsxs("div",{className:"grid gap-4 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"defaultEditor",children:"Default Editor"}),e.jsxs(h,{value:s.defaultEditor,onValueChange:t=>n({defaultEditor:t}),children:[e.jsx(u,{id:"defaultEditor",children:e.jsx(m,{placeholder:"Select editor"})}),e.jsxs(f,{children:[e.jsx(a,{value:"cursor",children:"Cursor"}),e.jsx(a,{value:"vscode",children:"VS Code"}),e.jsx(a,{value:"vim",children:"Vim"}),e.jsx(a,{value:"emacs",children:"Emacs"})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"terminalShell",children:"Preferred Shell"}),e.jsxs(h,{value:s.terminalShell,onValueChange:t=>n({terminalShell:t}),children:[e.jsx(u,{id:"terminalShell",children:e.jsx(m,{placeholder:"Select shell"})}),e.jsxs(f,{children:[e.jsx(a,{value:"bash",children:"Bash"}),e.jsx(a,{value:"zsh",children:"Zsh"}),e.jsx(a,{value:"fish",children:"Fish"}),e.jsx(a,{value:"sh",children:"sh"}),e.jsx(a,{value:"system",children:"System Default"})]})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{htmlFor:"autoSaveInterval",children:"Auto-save Interval (seconds)"}),e.jsx(b,{id:"autoSaveInterval",type:"number",min:10,max:600,value:s.autoSaveInterval,onChange:t=>n({autoSaveInterval:Number.parseInt(t.target.value,10)||r.autoSaveInterval})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Controls how often Coconut persists draft work to disk."})]})]})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(C,{variant:"outline",onClick:S,disabled:c,children:"Reset"}),e.jsx(C,{onClick:I,disabled:c,children:c?"Saving...":"Save Preferences"})]})]})}export{O as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,a as S,A as j,j as e,b1 as b,B as m,I as u,L as w}from"./index-SVcL57hQ.js";import{C as E,b as I,c as F,d as L,a as k}from"./card-NkV5eOu8.js";import{L as h}from"./label-MGLxVQcy.js";import{C as D,a as P}from"./clipboard-CbMUHSIJ.js";function B(){const[r,l]=i.useState({}),[o,c]=i.useState(null),[f,p]=i.useState(!1),[v,C]=i.useState(!0),[d,x]=i.useState(!1),{toast:n}=S();i.useEffect(()=>{g()},[]);const g=async()=>{try{try{const t=await fetch(`${j}/api/v1/config`),s=await t.json();if(t.ok&&s?.success){const a=s.data?.coconut||{};c(a.id??null),(a.firstName||a.lastName||a.email)&&l({firstName:a.firstName,lastName:a.lastName,email:a.email})}else c(null)}catch(t){console.error("Failed to load coconut config:",t),c(null)}}catch(t){console.error("Failed to load settings:",t),n({title:"Error",description:"Failed to load user settings",variant:"destructive"})}finally{C(!1)}},N=async()=>{x(!0);try{const s=await(await fetch(`${j}/api/v1/config`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({coconut:{...r,id:o||void 0}})})).json();if(s.success)window.dispatchEvent(new CustomEvent("config-updated")),n({title:"Success",description:"Settings saved successfully"});else throw new Error(s.error||"Failed to save settings")}catch(t){console.error("Failed to save settings:",t),n({title:"Error",description:"Failed to save settings",variant:"destructive"})}finally{x(!1)}},y=async()=>{if(o)try{await navigator.clipboard.writeText(o),p(!0),n({title:"Copied",description:"Coconut ID copied to clipboard."}),setTimeout(()=>p(!1),1500)}catch(t){console.error("Failed to copy coconut ID:",t),n({title:"Copy failed",description:"Unable to copy the Coconut ID to the clipboard.",variant:"destructive"})}};return v?e.jsx("div",{children:"Loading..."}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-medium",children:"Coconut Settings"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Manage the Coconut's profile information."})]}),e.jsx(b,{}),e.jsx("div",{className:"rounded-lg border border-dashed bg-muted/40 p-4",children:o?e.jsxs("div",{className:"flex items-center justify-between gap-3",children:[e.jsxs("div",{className:"flex flex-col",children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Coconut ID"}),e.jsx("p",{className:"mt-1 font-mono text-sm",children:o})]}),e.jsxs(m,{variant:"outline",size:"sm",onClick:y,children:[f?e.jsx(D,{className:"h-4 w-4"}):e.jsx(P,{className:"h-4 w-4"}),e.jsx("span",{className:"ml-2",children:f?"Copied":"Copy"})]})]}):e.jsxs("div",{className:"space-y-1",children:[e.jsx("h4",{className:"text-sm font-medium text-muted-foreground",children:"Coconut ID not configured"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Add an `id` under the `coconut` section in `.nut/config.json` to register this Coconut instance."})]})}),e.jsxs(E,{children:[e.jsxs(I,{children:[e.jsx(F,{children:"Coconut Profile"}),e.jsx(L,{children:"Update the Coconut's identifying details."})]}),e.jsxs(k,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(h,{htmlFor:"firstName",children:"First Name"}),e.jsx(u,{id:"firstName",value:r.firstName||"",onChange:t=>l(s=>({...s,firstName:t.target.value})),placeholder:"Enter first name"})]}),e.jsxs("div",{children:[e.jsx(h,{htmlFor:"lastName",children:"Last Name"}),e.jsx(u,{id:"lastName",value:r.lastName||"",onChange:t=>l(s=>({...s,lastName:t.target.value})),placeholder:"Enter last name"})]})]}),e.jsxs("div",{children:[e.jsx(h,{htmlFor:"email",children:"Email"}),e.jsx(u,{id:"email",type:"email",value:r.email||"",onChange:t=>l(s=>({...s,email:t.target.value})),placeholder:"Enter email address"})]})]})]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["You can also manage the Coconut's identity to other agents on the"," ",e.jsx(w,{to:"/identity",className:"underline underline-offset-4 hover:text-primary",children:"Identity page"}),"."]}),e.jsxs("div",{className:"flex justify-end space-x-2",children:[e.jsx(m,{variant:"outline",onClick:g,disabled:d,children:"Cancel"}),e.jsx(m,{onClick:N,disabled:d,children:d?"Saving...":"Save Changes"})]})]})}export{B as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as v,a as w,r as n,j as e,B as g,
|
|
1
|
+
import{u as v,a as w,r as n,j as e,B as g,ae as b,L as C,A as S,a3 as I}from"./index-SVcL57hQ.js";import{C as R,a as B}from"./card-NkV5eOu8.js";import{u as Q}from"./use-terminal-CJMIUQKK.js";import{C as $}from"./circle-play-_KPAQa5u.js";import{P as O}from"./play-Dn69nfRB.js";function L(){const o=v(),{loading:l,createSession:d,refreshSessions:j}=Q(),{toast:i}=w(),[m,u]=n.useState(!1),[x,h]=n.useState(!1),[,f]=n.useState([]),[c,y]=n.useState({});n.useEffect(()=>{try{const t=localStorage.getItem("terminal.commandHistory");t&&f(JSON.parse(t))}catch{}},[]),n.useEffect(()=>{(async()=>{try{const s=await fetch(`${S}/api/v1/context/architecture`);if(!s.ok)return;const a=await s.json();a?.success&&a?.document?.metadata?.commands&&y(a.document.metadata.commands)}catch{}})()},[]);const p=t=>{t&&f(s=>{const a=[t,...s.filter(r=>r!==t)].slice(0,5);try{localStorage.setItem("terminal.commandHistory",JSON.stringify(a))}catch{}return a})},N=async t=>{const s=(t||"").trim();if(!s)return;const a=`session-${Date.now()}`;u(!0);try{await d(a,s)?(p(s),i({title:"Session started",description:`${a}`}),o(`/terminal/${a}`)):i({title:"Failed to start",description:"See error above",variant:"destructive"})}finally{u(!1)}},k=async t=>{const s=(t||"").trim();if(!s)return;const a=`session-${Date.now()}`;h(!0);try{await d(a,s)?(p(s),setTimeout(()=>j(),150),i({title:"Started in background",description:`${a}`,action:e.jsx(I,{altText:"Open session",onClick:()=>o(`/terminal/${a}`),children:"Open"})})):i({title:"Failed to start",description:"See error above",variant:"destructive"})}finally{h(!1)}};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold tracking-tight",children:"Utilities"}),e.jsx("p",{className:"text-muted-foreground",children:"Quick commands and shortcuts"})]})}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Quick Commands"}),e.jsx(R,{children:e.jsx(B,{className:"pt-6",children:c&&Object.keys(c).length>0?e.jsx("div",{className:"space-y-2",children:e.jsx("div",{className:"rounded-md border divide-y",children:Object.entries(c).map(([t,s])=>e.jsxs("div",{className:"flex items-center gap-2 sm:gap-3 p-2",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:t}),e.jsx("span",{className:"text-muted-foreground hidden sm:inline",children:":"}),e.jsx("span",{className:"truncate max-w-full",children:e.jsx("code",{className:"bg-muted px-2 py-0.5 rounded text-xs",children:s})})]}),e.jsxs("div",{className:"flex items-center gap-1 sm:gap-2 flex-shrink-0",children:[e.jsxs(g,{onClick:()=>k(s),variant:"secondary",size:"sm",disabled:l||x||m,title:"Run in background",children:[e.jsx($,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"Background"})]}),e.jsxs(g,{onClick:()=>N(s),size:"sm",disabled:l||m||x,title:"Run",children:[e.jsx(O,{className:"h-4 w-4 sm:mr-1"}),e.jsx("span",{className:"hidden sm:inline",children:"Run"})]})]})]},t))})}):e.jsxs("div",{className:"flex flex-col items-center justify-center text-center space-y-3 py-8",children:[e.jsx(b,{className:"h-12 w-12 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold text-lg mb-2",children:"No quick commands configured"}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-md leading-relaxed",children:"Quick commands let you run common tasks with one click, like starting your development server or running build scripts."}),e.jsxs("p",{className:"text-sm text-muted-foreground max-w-md mt-2",children:["Set them up in the"," ",e.jsx(C,{to:"/context/architecture/edit",className:"text-primary hover:underline font-medium",children:"Quick Commands section"}),"."]})]})]})})})]})]})}export{L as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as a,e as o}from"./index-
|
|
1
|
+
import{r,j as a,e as o}from"./index-SVcL57hQ.js";const v=r.forwardRef(({className:e,variant:t="default",...s},d)=>{const l="relative w-full rounded-lg border px-4 py-3 text-sm [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",i=t==="destructive"?"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive":"bg-background text-foreground";return a.jsx("div",{ref:d,role:"alert",className:o(l,i,e),...s})});v.displayName="Alert";const c=r.forwardRef(({className:e,...t},s)=>a.jsx("div",{ref:s,className:o("text-sm [&_p]:leading-relaxed",e),...t}));c.displayName="AlertDescription";export{v as A,c as a};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{c as o}from"./index-SVcL57hQ.js";/**
|
|
2
|
+
* @license lucide-react v0.542.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const e=[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]],a=o("arrow-up-down",e);export{a as A};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as o,e as n,b4 as a}from"./index-
|
|
1
|
+
import{j as o,e as n,b4 as a}from"./index-SVcL57hQ.js";const s=a("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function i({className:r,variant:e,...t}){return o.jsx("div",{className:n(s({variant:e}),r),...t})}export{i as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as z,r,j as e,D as G,b as J,d as K,f as Q,I as V,x as M,S as W,e as X,
|
|
1
|
+
import{c as z,r,j as e,D as G,b as J,d as K,f as Q,I as V,x as M,S as W,e as X,_ as Y,B}from"./index-SVcL57hQ.js";import{B as v}from"./badge-BnmevczT.js";import{a as Z}from"./registry-ANRa5WBi.js";import{S as O}from"./search-Ck3r4Ru-.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r,j as d,e as t}from"./index-
|
|
1
|
+
import{r,j as d,e as t}from"./index-SVcL57hQ.js";const o=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("rounded-xl border bg-card text-card-foreground shadow",a),...e}));o.displayName="Card";const c=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("flex flex-col space-y-1.5 p-6",a),...e}));c.displayName="CardHeader";const i=r.forwardRef(({className:a,...e},s)=>d.jsx("h3",{ref:s,className:t("font-semibold leading-none tracking-tight",a),...e}));i.displayName="CardTitle";const n=r.forwardRef(({className:a,...e},s)=>d.jsx("p",{ref:s,className:t("text-sm text-muted-foreground",a),...e}));n.displayName="CardDescription";const l=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("p-6 pt-0",a),...e}));l.displayName="CardContent";const f=r.forwardRef(({className:a,...e},s)=>d.jsx("div",{ref:s,className:t("flex items-center p-6 pt-0",a),...e}));f.displayName="CardFooter";export{o as C,l as a,c as b,i as c,n as d,f as e};
|